diff options
Diffstat (limited to 'core/src/main/scala/chisel3/internal')
| -rw-r--r-- | core/src/main/scala/chisel3/internal/Builder.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/main/scala/chisel3/internal/Builder.scala b/core/src/main/scala/chisel3/internal/Builder.scala index d06b7992..fe7d7bea 100644 --- a/core/src/main/scala/chisel3/internal/Builder.scala +++ b/core/src/main/scala/chisel3/internal/Builder.scala @@ -485,6 +485,10 @@ private[chisel3] class DynamicContext( val newAnnotations = ArrayBuffer[ChiselMultiAnnotation]() var currentModule: Option[BaseModule] = None + // Enum annotations are added every time a StrongEnum is bound + // To keep the number down, we keep them unique in the annotations + val enumAnnos = mutable.HashSet[ChiselAnnotation]() + /** Contains a mapping from a elaborated module to their aspect * Set by [[ModuleAspect]] */ @@ -553,6 +557,8 @@ private[chisel3] object Builder extends LazyLogging { def components: ArrayBuffer[Component] = dynamicContext.components def annotations: ArrayBuffer[ChiselAnnotation] = dynamicContext.annotations + def enumAnnos: mutable.HashSet[ChiselAnnotation] = dynamicContext.enumAnnos + // TODO : Unify this with annotations in the future - done this way for backward compatability def newAnnotations: ArrayBuffer[ChiselMultiAnnotation] = dynamicContext.newAnnotations |
