diff options
| author | Jack Koenig | 2017-12-20 15:54:25 -0800 |
|---|---|---|
| committer | GitHub | 2017-12-20 15:54:25 -0800 |
| commit | e27657118ff5915b96f8e3a467d464245fe09769 (patch) | |
| tree | 2353d94bc70fa006639bf5019bde366b15e82b29 /src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala | |
| parent | 0f5ba51572b22ff5c85f9dd1add82680e0620797 (diff) | |
Add compileOptions to Module.apply, use for invalidating submod ports (#747)
Fixes #746
Also add test for https://github.com/freechipsproject/firrtl/issues/705
Diffstat (limited to 'src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala b/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala index c0538123..457f26de 100644 --- a/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala @@ -217,5 +217,27 @@ class CompatibiltyInteroperabilitySpec extends ChiselFlatSpec { stop() }) } + + "An instance of a chisel3.Module inside a Chisel.Module" should "have its inputs invalidated" in { + compile { + import Chisel._ + new Module { + val io = new Bundle { + val in = UInt(INPUT, width = 32) + val cond = Bool(INPUT) + val out = UInt(OUTPUT, width = 32) + } + val children = Seq(Module(new PassthroughModule), + Module(new PassthroughMultiIOModule), + Module(new PassthroughRawModule)) + io.out := children.map(_.io.out).reduce(_ + _) + children.foreach { child => + when (io.cond) { + child.io.in := io.in + } + } + } + } + } } |
