Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Make MultiTargetAnnotation.targets a def (#1969)
Browse files Browse the repository at this point in the history
* Make MultiTargetAnnotation.targets a def

This enables the annotation writer to choose their own underlying data structure

* Update MultiTargetAnnotation ScalaDoc

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
jackkoenig and mergify[bot] authored Nov 17, 2020
1 parent d645921 commit cd845bd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/main/scala/firrtl/annotations/Annotation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,19 @@ trait SingleTargetAnnotation[T <: Named] extends Annotation {
/** [[MultiTargetAnnotation]] keeps the renamed targets grouped within a single annotation. */
trait MultiTargetAnnotation extends Annotation {

/** Contains a sequence of [[firrtl.annotations.Target Target]].
* When created, [[targets]] should be assigned by `Seq(Seq(TargetA), Seq(TargetB), Seq(TargetC))`
/** Contains a nested sequence of [[firrtl.annotations.Target Target]]
*
* Each inner Seq should contain a single element. For example:
* {{{
* def targets = Seq(Seq(foo), Seq(bar))
* }}}
*/
val targets: Seq[Seq[Target]]
def targets: Seq[Seq[Target]]

/** Create another instance of this Annotation */
/** Create another instance of this Annotation
*
* The inner Seqs correspond to the renames of the inner Seqs of targets
*/
def duplicate(n: Seq[Seq[Target]]): Annotation

/** Assume [[RenameMap]] is `Map(TargetA -> Seq(TargetA1, TargetA2, TargetA3), TargetB -> Seq(TargetB1, TargetB2))`
Expand Down

0 comments on commit cd845bd

Please sign in to comment.