diff options
| author | Jim Lawson | 2016-07-19 15:08:22 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-19 15:08:22 -0700 |
| commit | 3120eefc8a73b5ab3d8f909445a3e004b5e60cc6 (patch) | |
| tree | e1a2aa9591ccc882a941d1ddbc9ded3218b5bc85 /src/test/scala/chiselTests/MultiAssign.scala | |
| parent | b27f29902d9f1d886e8edf1fc5e960cf9a634184 (diff) | |
Incorporate connection logic.
Compiles but fails tests.
Diffstat (limited to 'src/test/scala/chiselTests/MultiAssign.scala')
| -rw-r--r-- | src/test/scala/chiselTests/MultiAssign.scala | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/test/scala/chiselTests/MultiAssign.scala b/src/test/scala/chiselTests/MultiAssign.scala index d5e9b998..fc6c5edc 100644 --- a/src/test/scala/chiselTests/MultiAssign.scala +++ b/src/test/scala/chiselTests/MultiAssign.scala @@ -12,29 +12,30 @@ class LastAssignTester() extends BasicTester { val cnt = Counter(2) val test = Wire(UInt(width=4)) - assert(test === UInt.Lit(7)) // allow read references before assign references + assert(test === 7.U) // allow read references before assign references - test := UInt.Lit(13) - assert(test === UInt.Lit(7)) // output value should be position-independent + test := 13.U + assert(test === 7.U) // output value should be position-independent - test := UInt.Lit(7) - assert(test === UInt.Lit(7)) // this obviously should work + test := 7.U + assert(test === 7.U) // this obviously should work - when(cnt.value === UInt.Lit(1)) { + when(cnt.value === 1.U) { stop() } } class ReassignmentTester() extends BasicTester { - val test = UInt.Lit(15) - test := UInt.Lit(7) + val test = 15.U + test := 7.U } class MultiAssignSpec extends ChiselFlatSpec { "The last assignment" should "be used when multiple assignments happen" in { assertTesterPasses{ new LastAssignTester } } - "Reassignments to non-wire types" should "be disallowed" in { + intercept[chisel3.internal.ChiselException] { +// "Reassignments to non-wire types" should "be disallowed" in { assertTesterFails{ new ReassignmentTester } } } |
