chisel6.4.0 < Back


# Packages

-  package root
  Definition Classes
    root
-  package firrtl
  Definition Classes
    root
-  package annotations
  Definition Classes
    firrtl
- Annotation
- AnnotationClassNotFoundException
- AnnotationException
- AnnotationFileNotFoundException
- AnnotationUtils
- CircuitName
- CircuitTarget
- CompleteTarget
- ComponentName
- GenericTarget
- HasSerializationHints
- InstanceTarget
- InvalidAnnotationFileException
- InvalidAnnotationJSONException
- IsComponent
- IsMember
- IsModule
- JsonProtocol
- LoadMemoryAnnotation
- MemoryFileInlineAnnotation
- MemoryInitAnnotation
- MemoryLoadFileType
- ModuleName
- ModuleTarget
- Named
- NoTargetAnnotation
- ReferenceTarget
- SingleTargetAnnotation
- Target
- TargetToken
- UnrecogizedAnnotationsException
- UnrecognizedAnnotation
- UnserializableAnnotationException
- UnserializeableAnnotation

t

firrtl.annotations

# Target

###
Companion object Target

#### sealed trait Target extends Named

Refers to something in a FIRRTL firrtl.ir.Circuit. Used for Annotation targets.

Can be in various states of completion/resolved:

- Legal: TargetToken's in tokens are in an order that makes sense
- Complete: circuitOpt and moduleOpt are non-empty, and all Instance(_) are followed by OfModule(_)
- Local: tokens does not refer to things through an instance hierarchy (no Instance(_) or OfModule(_) tokens)

Source
  Target.scala

Linear Supertypes
Named, AnyRef, Any
Known Subclasses
CircuitTarget, CompleteTarget, GenericTarget, InstanceTarget, IsComponent, IsMember, IsModule, ModuleTarget, ReferenceTarget
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Target
2. Named
3. AnyRef
4. Any

Implicitly

1. by convertNamed2Target
2. by convertTarget2Named
3. by any2stringadd
4. by StringFormat
5. by Ensuring
6. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Abstract Value Members

1.  abstract def circuitOpt: Option[String]

   returns

     Circuit name, if it exists

2.  abstract def getComplete: Option[CompleteTarget]

   returns

     If legal, convert this Target into a CompleteTarget

3.  abstract def isLocal: Boolean

   Whether the target is directly instantiated in its root module

4.  abstract def moduleOpt: Option[String]

   returns

     Module name, if it exists

5.  abstract def path: Seq[(Instance, OfModule)]

   returns

     Returns the instance hierarchy path, if one exists

6.  abstract def toTarget: CompleteTarget
   Definition Classes
     Named
7.  abstract def tokens: Seq[TargetToken]

   returns

     Target tokens

### Concrete Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from Target toany2stringadd[Target] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (Target, B)
   Implicit
     This member is added by an implicit conversion from Target toArrowAssoc[Target] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  def addHierarchy(root: String, instance: String): IsComponent

   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

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Definition Classes
     CompleteTarget
7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def circuit: String

   returns

     The circuit of this target

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Definition Classes
     CompleteTarget
9.  def circuitTarget: CircuitTarget

   returns

     The CircuitTarget of this target's circuit

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Definition Classes
     CompleteTarget
10.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
11.  def complete: CompleteTarget

    returns

      Converts this Target into a CompleteTarget

12.  def encapsulatedBy(other: IsModule): Boolean

    Checks whether this is inside of other

13.  def ensuring(cond: (Target) => Boolean, msg: => Any): Target
    Implicit
      This member is added by an implicit conversion from Target toEnsuring[Target] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
14.  def ensuring(cond: (Target) => Boolean): Target
    Implicit
      This member is added by an implicit conversion from Target toEnsuring[Target] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
15.  def ensuring(cond: Boolean, msg: => Any): Target
    Implicit
      This member is added by an implicit conversion from Target toEnsuring[Target] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
16.  def ensuring(cond: Boolean): Target
    Implicit
      This member is added by an implicit conversion from Target toEnsuring[Target] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
17.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
19.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
20.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
22.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
23.  def modify(circuitOpt: Option[String] = circuitOpt, moduleOpt: Option[String] = moduleOpt, tokens: Seq[TargetToken] = tokens): GenericTarget

    returns

      Returns a new GenericTarget with new values

24.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
25.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
26.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
27.  def prettyPrint(tab: String = ""): String

    Pretty serialization, ideal for error messages.

    Pretty serialization, ideal for error messages. Cannot be deserialized.

    returns

      Human-readable serialization

28.  def serialize: String

    returns

      Human-readable serialization

    Definition Classes
      Target → Named
29.  def sharedRoot(other: Target): Boolean

    Share root module

30.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
31.  def toGenericTarget: GenericTarget

    returns

      Converts this Target into a GenericTarget

32.  def toNamed: Named

    returns

      Converts this Target into either a CircuitName, ModuleName, or ComponentName

33.  def toString(): String
    Definition Classes
      AnyRef → Any
34.  def tryToComplete: Target

    returns

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

35.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
36.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
37.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Shadowed Implicit Value Members

1.  def circuitOpt: Option[String]

   returns

     Circuit name, if it exists

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).circuitOpt

2.  def complete: CompleteTarget

   returns

     Converts this Target into a CompleteTarget

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).complete

3.  def encapsulatedBy(other: IsModule): Boolean

   Checks whether this is inside of other

   Checks whether this is inside of other

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).encapsulatedBy(other)

4.  def getComplete: Option[CompleteTarget]

   returns

     If legal, convert this Target into a CompleteTarget

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).getComplete

   Definition Classes
     CompleteTarget → Target
5.  def isLocal: Boolean

   Whether the target is directly instantiated in its root module

   Whether the target is directly instantiated in its root module

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).isLocal

6.  def modify(circuitOpt: Option[String] = circuitOpt, moduleOpt: Option[String] = moduleOpt, tokens: Seq[TargetToken] = tokens): GenericTarget

   returns

     Returns a new GenericTarget with new values

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).modify(circuitOpt, moduleOpt, tokens)

7.  def moduleOpt: Option[String]

   returns

     Module name, if it exists

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).moduleOpt

8.  def path: Seq[(Instance, OfModule)]

   returns

     Returns the instance hierarchy path, if one exists

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).path

9.  def prettyPrint(tab: String = ""): String

   Pretty serialization, ideal for error messages.

   Pretty serialization, ideal for error messages. Cannot be deserialized.

   returns

     Human-readable serialization

   Implicit
     This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
   Shadowing
     This implicitly inherited member is shadowed by one or more members in this class.
     To access this member you can use a type ascription:

         (target: CompleteTarget).prettyPrint(tab)

10.  def serialize: String

    returns

      Human-readable serialization

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).serialize

    Definition Classes
      Target → Named
11.  def serialize: String
    Implicit
      This member is added by an implicit conversion from Target toNamed performed by method convertTarget2Named in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: Named).serialize

    Definition Classes
      Named
12.  def sharedRoot(other: Target): Boolean

    Share root module

    Share root module

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).sharedRoot(other)

13.  def toGenericTarget: GenericTarget

    returns

      Converts this Target into a GenericTarget

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).toGenericTarget

14.  def toNamed: Named

    returns

      Converts this Target into either a CircuitName, ModuleName, or ComponentName

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).toNamed

15.  def toString(): String
    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).toString()

    Definition Classes
      CompleteTarget → AnyRef → Any
16.  def toTarget: CompleteTarget
    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).toTarget

    Definition Classes
      CompleteTarget → Named
17.  def toTarget: CompleteTarget
    Implicit
      This member is added by an implicit conversion from Target toNamed performed by method convertTarget2Named in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: Named).toTarget

    Definition Classes
      Named
18.  def tokens: Seq[TargetToken]

    returns

      Target tokens

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).tokens

19.  def tryToComplete: Target

    returns

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

    Implicit
      This member is added by an implicit conversion from Target toCompleteTarget performed by method convertNamed2Target in firrtl.annotations.Target.
    Shadowing
      This implicitly inherited member is shadowed by one or more members in this class.
      To access this member you can use a type ascription:

          (target: CompleteTarget).tryToComplete

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from Target toStringFormat[Target] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

2.  def →[B](y: B): (Target, B)
   Implicit
     This member is added by an implicit conversion from Target toArrowAssoc[Target] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from Named

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion convertNamed2Target fromTarget to CompleteTarget

### Inherited by implicit conversion convertTarget2Named fromTarget to Named

### Inherited by implicit conversion any2stringadd fromTarget to any2stringadd[Target]

### Inherited by implicit conversion StringFormat fromTarget to StringFormat[Target]

### Inherited by implicit conversion Ensuring fromTarget to Ensuring[Target]

### Inherited by implicit conversion ArrowAssoc fromTarget to ArrowAssoc[Target]

### Ungrouped