diff options
| author | Jack Koenig | 2020-11-17 14:49:49 -0800 |
|---|---|---|
| committer | GitHub | 2020-11-17 22:49:49 +0000 |
| commit | cd845bdbfea0c09e9edbf61e651ede5197d8a084 (patch) | |
| tree | c3760c58f26929130c9ca2333a3162dac47ac177 /src | |
| parent | d645921b4ec432e5554863959c3a0cabe5e9a72d (diff) | |
Make MultiTargetAnnotation.targets a def (#1969)
* 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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/annotations/Annotation.scala | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/annotations/Annotation.scala b/src/main/scala/firrtl/annotations/Annotation.scala index bea88e51..5f792127 100644 --- a/src/main/scala/firrtl/annotations/Annotation.scala +++ b/src/main/scala/firrtl/annotations/Annotation.scala @@ -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))` |
