Definition

chisel3.experimental.hierarchy.core.Definition
See theDefinition companion object
final case class Definition[+A] extends IsLookupable

User-facing Definition type. Represents a definition of an object of type A which are marked as @instantiable Can be created using Definition.apply method.

These definitions are then used to create multiple Instances.

Value parameters

underlying

The internal representation of the definition, which may be either be directly the object, or a clone of an object

Attributes

Companion
object
Source
Definition.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Hierarchy[A]
trait HierarchyIsA[A]
trait HierarchyProto[A]
trait IsLookupable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def _lookup[B, C](that: A => B)(implicit lookup: Lookupable[B], macroGenerated: MacroGenerated): lookup.C

Used by Chisel's internal macros. DO NOT USE in your normal Chisel code!!! Instead, mark the field you are accessing with public

Used by Chisel's internal macros. DO NOT USE in your normal Chisel code!!! Instead, mark the field you are accessing with public

Given a selector function (that) which selects a member from the original, return the corresponding member from the instance.

Our @instantiable and @public macros generate the calls to this apply method

By calling this function, we summon the proper Lookupable typeclass from our implicit scope.

Value parameters

lookup

typeclass which contains the correct lookup function, based on the types of A and B

macroGenerated

a value created in the macro, to make it harder for users to use this API

that

a user-specified lookup function

Attributes

Source
Definition.scala
def name: String
Implicitly added by DefinitionBaseModuleExtensions

The name of the Module definition

The name of the Module definition

Attributes

Source
Definition.scala
Implicitly added by DefinitionBaseModuleExtensions

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

Attributes

Returns

absoluteTarget of this instance

Source
Definition.scala
override def toDefinition: Definition[A]

Attributes

Returns

Return the underlying Definition[A] of this Hierarchy[A]

Definition Classes
Source
Definition.scala
override def toInstance: Instance[A]

Attributes

Returns

Convert this Hierarchy[A] as a top-level Instance[A]

Definition Classes
Source
Definition.scala
def toRelativeTarget(root: Option[BaseModule]): IsModule
Implicitly added by DefinitionBaseModuleExtensions

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

Attributes

Returns

absoluteTarget of this instance

Source
Definition.scala
Implicitly added by DefinitionBaseModuleExtensions

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

If this is an instance of a Module, returns the toAbsoluteTarget of this instance

Attributes

Returns

absoluteTarget of this instance

Source
Definition.scala
Implicitly added by DefinitionBaseModuleExtensions

If this is an instance of a Module, returns the toTarget of this instance

If this is an instance of a Module, returns the toTarget of this instance

Attributes

Returns

target of this instance

Source
Definition.scala

Inherited methods

def isA[B]: Boolean

Determine whether underlying proto is of type provided.

Determine whether underlying proto is of type provided.

Attributes

Returns

Whether underlying proto is of provided type (with caveats outlined above)

Note

IMPORTANT: this function requires summoning a TypeTag[B], which will fail if B is an inner class.

IMPORTANT: this function IGNORES type parameters, akin to normal type erasure.

IMPORTANT: this function relies on Java reflection for underlying proto, but Scala reflection for provided type E.g. isA[List[Int]] will return true, even if underlying proto is of type List[String]

Inherited from:
HierarchyIsA
Source
IsA.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product