diff options
| author | Jack Koenig | 2019-11-27 16:29:32 -0800 |
|---|---|---|
| committer | GitHub | 2019-11-27 16:29:32 -0800 |
| commit | 2c53527f6c232121a2340e75c0109c1618fc2428 (patch) | |
| tree | fa453dd84cdd4dee2472414fd66f25d8c72c4757 /src/test/scala | |
| parent | fdc41387d37abb8d2a75efa30a2d30d9373dd785 (diff) | |
Fix bidirectional Wire with Analog (#1252)
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/chiselTests/AnalogSpec.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/AnalogSpec.scala b/src/test/scala/chiselTests/AnalogSpec.scala index d81ed009..c443ce7b 100644 --- a/src/test/scala/chiselTests/AnalogSpec.scala +++ b/src/test/scala/chiselTests/AnalogSpec.scala @@ -194,6 +194,27 @@ class AnalogSpec extends ChiselFlatSpec { }) } + it should "work in bidirectional Aggregate wires" in { + class MyBundle extends Bundle { + val x = Input(UInt(8.W)) + val y = Analog(8.W) + } + elaborate(new Module { + val io = IO(new Bundle { + val a = new MyBundle + }) + val w = Wire(new MyBundle) + w <> io.a + }) + elaborate(new Module { + val io = IO(new Bundle { + val a = Vec(1, new MyBundle) + }) + val w = Wire(Vec(1, new MyBundle)) + w <> io.a + }) + } + it should "work with 3 blackboxes attached" in { assertTesterPasses(new AnalogTester { val mods = Seq.fill(2)(Module(new AnalogReaderBlackBox)) |
