ReferenceTarget

firrtl.annotations.ReferenceTarget
case class ReferenceTarget(module: String, path: Seq[(Instance, OfModule)], ref: String, component: Seq[TargetToken]) extends IsComponent

Target pointing to a declared named component in a firrtl.ir.DefModule This includes: firrtl.ir.Port, firrtl.ir.DefWire, firrtl.ir.DefRegister, firrtl.ir.DefMemory, firrtl.ir.DefNode

Value parameters

component

Subcomponent of this reference, e.g. field or index

module

Name of the root module of this reference

path

Path through instance/ofModules

ref

Name of component

Attributes

Deprecated
[Since version Chisel 7.0.0] All APIs in package firrtl are deprecated.
Source
Target.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait IsComponent
trait IsMember
trait Target
trait Named
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def addHierarchy(root: String, instance: String): ReferenceTarget

Adds another level of instance hierarchy Example: Given root=A and instance=b, transforms (Top, B)/c:C -> (Top, A)/b:B/c:C

Adds another level of instance hierarchy Example: Given root=A and instance=b, transforms (Top, B)/c:C -> (Top, A)/b:B/c:C

Attributes

Definition Classes
Source
Target.scala

Attributes

Source
Target.scala
override def asPath: Seq[(Instance, OfModule)]

Attributes

Returns

Creates a path, assuming all Instance and OfModules in this IsMember is used as a path

Definition Classes
Source
Target.scala
def componentType(baseType: Type): Type

Value parameters

the

type of this target's ref

Attributes

Returns

the type of the subcomponent specified by this target's component

Source
Target.scala
def field(value: String): ReferenceTarget

Value parameters

value

Field name of this target

Attributes

Returns

A new ReferenceTarget to the specified field of this ReferenceTarget

Source
Target.scala
def index(value: Int): ReferenceTarget

Value parameters

value

Index value of this target

Attributes

Returns

A new ReferenceTarget to the specified index of this ReferenceTarget

Source
Target.scala
override def leafModule: String

Attributes

Definition Classes
Source
Target.scala

Attributes

Source
Target.scala
override def moduleOpt: Option[String]

Attributes

Returns

Module name, if it exists

Definition Classes
Source
Target.scala

Attributes

Source
Target.scala
override def notPath: Seq[TargetToken]

Attributes

Returns

Local tokens of what this member points (not a path)

Definition Classes
Source
Target.scala

Returns the local form of this ReferenceTarget

Returns the local form of this ReferenceTarget

For example, given ~Top|Top/foo:Foo/bar:Bar>x,

.pathlessTarget returns ~Top|Bar>x

This is useful for cases in which annotations must point to the module itself rather than an absolute instance of the module (e.g. deduplication).

Attributes

Definition Classes
Source
Target.scala
override def setPathTarget(newPath: IsModule): ReferenceTarget

Resets this target to have a new path

Resets this target to have a new path

Attributes

Definition Classes
Source
Target.scala
override def stripHierarchy(n: Int): ReferenceTarget

Removes n levels of instance hierarchy

Removes n levels of instance hierarchy

Example: n=1, transforms (Top, A)/b:B/c:C -> (Top, B)/c:C

Attributes

Definition Classes
Source
Target.scala

Inherited methods

Attributes

Returns

Converts this Target into a CompleteTarget

Inherited from:
Target
Source
Target.scala
def encapsulatedBy(other: IsModule): Boolean

Checks whether this is inside of other

Checks whether this is inside of other

Attributes

Inherited from:
Target
Source
Target.scala
def encapsulatingModule: String

Attributes

Returns

The ModuleTarget of the module that directly contains this component

Inherited from:
IsMember
Source
Target.scala

Attributes

Inherited from:
IsMember
Source
Target.scala

Attributes

Returns

If legal, convert this Target into a CompleteTarget

Inherited from:
CompleteTarget
Source
Target.scala
override def isLocal: Boolean

Whether the target is directly instantiated in its root module

Whether the target is directly instantiated in its root module

Attributes

Definition Classes
Inherited from:
IsComponent
Source
Target.scala
override def justPath: Seq[TargetToken]

Attributes

Returns

Tokens of just this member's path

Definition Classes
Inherited from:
IsComponent
Source
Target.scala
def modify(moduleOpt: Option[String] = ..., tokens: Seq[TargetToken] = ...): GenericTarget

Attributes

Returns

Returns a new GenericTarget with new values

Inherited from:
Target
Source
Target.scala

Attributes

Returns

Member's top-level module target

Inherited from:
IsMember
Source
Target.scala

Attributes

Returns

List of local Instance Targets refering to each instance/ofModule in this member's path

Inherited from:
IsMember
Source
Target.scala
override def pathTarget: IsModule

Attributes

Returns

Member's path target

Definition Classes
Inherited from:
IsComponent
Source
Target.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def serialize: String

Attributes

Returns

Human-readable serialization

Inherited from:
Target
Source
Target.scala
def sharedRoot(other: Target): Boolean

Share root module

Share root module

Attributes

Inherited from:
Target
Source
Target.scala

Attributes

Returns

Converts this Target into a GenericTarget

Inherited from:
Target
Source
Target.scala
override def toNamed: ComponentName

Attributes

Returns

Converts this Target into either a ModuleName, or ComponentName

Definition Classes
Inherited from:
IsComponent
Source
Target.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
CompleteTarget
Source
Target.scala
override def toTarget: CompleteTarget

Attributes

Definition Classes
Inherited from:
CompleteTarget
Source
Target.scala
override def tokens: Seq[TargetToken]

Attributes

Returns

Target tokens

Definition Classes
Inherited from:
IsComponent
Source
Target.scala

Attributes

Returns

Converts this Target into a CompleteTarget, or if it can't, return original Target

Inherited from:
Target
Source
Target.scala