diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilitySpec.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala index d24c3b4d..eb38cab1 100644 --- a/src/test/scala/chiselTests/CompatibilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilitySpec.scala @@ -304,4 +304,22 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks } } + "Mux return value" should "be able to be used on the RHS" in { + import Chisel._ + elaborate(new Module { + val gen = new Bundle { val foo = UInt(width = 8) } + val io = new Bundle { + val a = Vec(2, UInt(width = 8)).asInput + val b = Vec(2, UInt(width = 8)).asInput + val c = gen.asInput + val d = gen.asInput + val en = Bool(INPUT) + val y = Vec(2, UInt(width = 8)).asOutput + val z = gen.asOutput + } + io.y := Mux(io.en, io.a, io.b) + io.z := Mux(io.en, io.c, io.d) + }) + } + } |
