diff options
| author | Jared Barocsi | 2021-07-14 13:10:15 -0700 |
|---|---|---|
| committer | GitHub | 2021-07-14 13:10:15 -0700 |
| commit | 4081d9f45a30d9f9e5711563b828f34257d4c19d (patch) | |
| tree | 5e9e47ff023d816cea66f10b44d5ecb23fd314b6 /src/main/scala/firrtl/Compiler.scala | |
| parent | 87ab555023760e7fe6f517c5776975bbc93ebe8c (diff) | |
Fix memory annotation deduplication (#2286)
* Add transform to deduplicate memory annotations
* Add annotation deduplication to Dedup stage
* ResolveAnnotationPaths and EliminateTargetPaths now invalidate the dedup annotations transform
* Verilog emitter now throws exception when memory annotations fail to dedup
Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'src/main/scala/firrtl/Compiler.scala')
| -rw-r--r-- | src/main/scala/firrtl/Compiler.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala index 7354b8ee..2017633d 100644 --- a/src/main/scala/firrtl/Compiler.scala +++ b/src/main/scala/firrtl/Compiler.scala @@ -14,6 +14,7 @@ import firrtl.Utils.throwInternalError import firrtl.annotations.transforms.{EliminateTargetPaths, ResolvePaths} import firrtl.options.{Dependency, DependencyAPI, StageUtils, TransformLike} import firrtl.stage.Forms +import firrtl.transforms.DedupAnnotationsTransform /** Container of all annotations for a Firrtl compiler */ class AnnotationSeq private (private[firrtl] val underlying: List[Annotation]) { @@ -396,6 +397,9 @@ trait ResolvedAnnotationPaths { override def prepare(state: CircuitState): CircuitState = { state.resolvePathsOf(annotationClasses.toSeq: _*) } + + // Any transform with this trait invalidates DedupAnnotationsTransform + override def invalidates(a: Transform) = a.isInstanceOf[DedupAnnotationsTransform] } /** Defines old API for Emission. Deprecated */ |
