diff options
| author | Jiuyang Liu | 2021-02-27 05:01:10 +0800 |
|---|---|---|
| committer | GitHub | 2021-02-26 13:01:10 -0800 |
| commit | 923ccbde1353e37f0948d3c5d94b49965dc6d950 (patch) | |
| tree | 0565112847c8aef6cf8aaf2562a3e97ead026d24 /src/test/scala/chiselTests/Module.scala | |
| parent | c2ba4098d0a2f7ca056ea198d68b1d3bfaf40f3b (diff) | |
Expose AnnotationSeq to Module. (#1731)
Diffstat (limited to 'src/test/scala/chiselTests/Module.scala')
| -rw-r--r-- | src/test/scala/chiselTests/Module.scala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/Module.scala b/src/test/scala/chiselTests/Module.scala index 932c94a5..bc9c524a 100644 --- a/src/test/scala/chiselTests/Module.scala +++ b/src/test/scala/chiselTests/Module.scala @@ -3,8 +3,10 @@ package chiselTests import chisel3._ -import chisel3.stage.ChiselStage import chisel3.experimental.DataMirror +import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage, NoRunFirrtlCompilerAnnotation} +import firrtl.annotations.NoTargetAnnotation +import firrtl.options.Unserializable class SimpleIO extends Bundle { val in = Input(UInt(32.W)) @@ -140,6 +142,17 @@ class ModuleSpec extends ChiselPropSpec with Utils { assert(checkModule(this)) }) } + + property("object chisel3.util.experimental.getAnnotations should return current annotations.") { + case class DummyAnnotation() extends NoTargetAnnotation with Unserializable + (new ChiselStage).transform(Seq( + ChiselGeneratorAnnotation(() => new RawModule { + assert(chisel3.util.experimental.getAnnotations().contains(DummyAnnotation())) + }), + DummyAnnotation(), + NoRunFirrtlCompilerAnnotation)) + } + property("DataMirror.modulePorts should work") { ChiselStage.elaborate(new Module { val io = IO(new Bundle { }) |
