Instance

chisel3.experimental.hierarchy.core.Instance
See theInstance companion object
final case class Instance[+A]

User-facing Instance type. Represents a unique instance of type A which are marked as @instantiable Can be created using Instance.apply method.

Value parameters

underlying

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

Attributes

Companion
object
Source
Instance.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Hierarchy[A]
trait HierarchyIsA[A]
trait HierarchyProto[A]
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
Instance.scala
def suggestName(name: String): Unit
Implicitly added by InstanceBaseModuleExtensions

Attributes

Source
Instance.scala
Implicitly added by InstanceBaseModuleExtensions

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
Instance.scala
override def toDefinition: Definition[A]

Returns the definition of this Instance

Returns the definition of this Instance

Attributes

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

Attributes

Returns

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

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

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

If root is defined, the target is a hierarchical path starting from root.

If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.

Attributes

Note

If root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

The NamedComponent must be a descendant of root, if it is defined.

This doesn't have special handling for Views.

Source
Instance.scala
Implicitly added by InstanceBaseModuleExtensions

Attributes

Source
Instance.scala
Implicitly added by InstanceBaseModuleExtensions

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
Instance.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