summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/aop
diff options
context:
space:
mode:
authorchick2020-01-21 16:49:35 -0800
committerchick2020-01-21 16:49:35 -0800
commit6356d3297052cecf209eeb3256fb72150a914e38 (patch)
treeaafb3d2a6daa2b82f9ae2bbfb85a36de0f675884 /src/test/scala/chiselTests/aop
parent0bcce65d5e3001b1b7098aa2c1ccd60fcc2a6628 (diff)
parent7341082e3c5b08dc9d1a01937b5aad55e9833603 (diff)
Merge branch 'master' into big-decimal-methods-for-num-types
# Conflicts: # src/test/scala/chiselTests/IntervalSpec.scala
Diffstat (limited to 'src/test/scala/chiselTests/aop')
-rw-r--r--src/test/scala/chiselTests/aop/SelectSpec.scala16
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)
+ }
+
}