diff options
| author | azidar | 2015-11-06 12:24:00 -0800 |
|---|---|---|
| committer | azidar | 2015-11-06 12:24:53 -0800 |
| commit | 89c5d10c81808406b6ae684e1e122d440466280c (patch) | |
| tree | 571153d80523551cdffa3547dba315b5bfab7742 /src/test/scala | |
| parent | beb67ebad0799bc30ecd6b99601ed6aa8f501892 (diff) | |
Fixed bug that created Vec(Reg(...)) instead of Reg(Vec(...))
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/chiselTests/Vec.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/Vec.scala b/src/test/scala/chiselTests/Vec.scala index 4430ab66..6d16ec08 100644 --- a/src/test/scala/chiselTests/Vec.scala +++ b/src/test/scala/chiselTests/Vec.scala @@ -29,7 +29,7 @@ class ShiftRegisterTester(n: Int) extends BasicTester { val (cnt, wrap) = Counter(Bool(true), n*2) when(wrap) { io.done := Bool(true) } - val shifter = Vec(Reg(UInt(width = log2Up(n))), n) + val shifter = Reg(Vec(UInt(width = log2Up(n)), n)) (shifter, shifter drop 1).zipped.foreach(_ := _) shifter(n-1) := cnt val expected = cnt - UInt(n) @@ -48,7 +48,7 @@ class VecSpec extends ChiselPropSpec { forAll(smallPosInts) { (n: Int) => assert(execute{ new TabulateTester(n) }) } } - property("Vecs of regs should be usable as shift registers") { + property("Regs of vecs should be usable as shift registers") { forAll(smallPosInts) { (n: Int) => assert(execute{ new ShiftRegisterTester(n) }) } } } |
