diff options
| author | Jim Lawson | 2020-01-21 14:37:40 -0800 |
|---|---|---|
| committer | GitHub | 2020-01-21 14:37:40 -0800 |
| commit | 76c986ebb2107c9872479d478d0e269ad5e5b08a (patch) | |
| tree | dbfabb158592e44028ebecf9610e1fa896c9a497 /src/test | |
| parent | ce82ffaaeb2301af756b032c01e879e700299ea1 (diff) | |
| parent | c7715c160a0dd07765e736b813c8b6b26b27de28 (diff) | |
Merge branch 'master' into fix-bitpat-whitespace
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/chiselTests/aop/SelectSpec.scala | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/aop/SelectSpec.scala b/src/test/scala/chiselTests/aop/SelectSpec.scala index f3c756ab..80ab518f 100644 --- a/src/test/scala/chiselTests/aop/SelectSpec.scala +++ b/src/test/scala/chiselTests/aop/SelectSpec.scala @@ -7,7 +7,9 @@ import chiselTests.ChiselFlatSpec import chisel3._ import chisel3.aop.Select.{PredicatedConnect, When, WhenNot} import chisel3.aop.{Aspect, Select} -import firrtl.{AnnotationSeq} +import chisel3.experimental.ExtModule +import chisel3.stage.{ChiselGeneratorAnnotation, DesignAnnotation} +import firrtl.AnnotationSeq import scala.reflect.runtime.universe.TypeTag @@ -139,5 +141,17 @@ class SelectSpec extends ChiselFlatSpec { ) } + "Blackboxes" should "be supported in Select.instances" in { + class BB extends ExtModule { } + class Top extends RawModule { + val bb = Module(new BB) + } + val top = ChiselGeneratorAnnotation(() => { + new Top() + }).elaborate(1).asInstanceOf[DesignAnnotation[Top]].design + val bbs = Select.collectDeep(top) { case b: BB => b } + assert(bbs.size == 1) + } + } |
