diff options
| author | Jim Lawson | 2016-07-20 14:49:35 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-20 14:49:35 -0700 |
| commit | 2dce378deda1cc33833eb378c89a1c5415817bae (patch) | |
| tree | e3bc5361030d63e017d065491e9e7e4cf788fe3c /src/test/scala/chiselTests/BlackBox.scala | |
| parent | 28e80311f172ae4d1d477e8bb47ca3719c9a8fc5 (diff) | |
Distinguish between ?Int.Lit and ?Int.width
Diffstat (limited to 'src/test/scala/chiselTests/BlackBox.scala')
| -rw-r--r-- | src/test/scala/chiselTests/BlackBox.scala | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/test/scala/chiselTests/BlackBox.scala b/src/test/scala/chiselTests/BlackBox.scala index c1154883..9b43f0ef 100644 --- a/src/test/scala/chiselTests/BlackBox.scala +++ b/src/test/scala/chiselTests/BlackBox.scala @@ -35,11 +35,11 @@ class BlackBoxTester extends BasicTester { val blackBoxPos = Module(new BlackBoxInverter) val blackBoxNeg = Module(new BlackBoxInverter) - blackBoxPos.io.in := UInt(1) - blackBoxNeg.io.in := UInt(0) + blackBoxPos.io.in := UInt.Lit(1) + blackBoxNeg.io.in := UInt.Lit(0) - assert(blackBoxNeg.io.out === UInt(1)) - assert(blackBoxPos.io.out === UInt(0)) + assert(blackBoxNeg.io.out === UInt.Lit(1)) + assert(blackBoxPos.io.out === UInt.Lit(0)) stop() } @@ -54,15 +54,15 @@ class MultiBlackBoxTester extends BasicTester { val blackBoxPassPos = Module(new BlackBoxPassthrough) val blackBoxPassNeg = Module(new BlackBoxPassthrough) - blackBoxInvPos.io.in := UInt(1) - blackBoxInvNeg.io.in := UInt(0) - blackBoxPassPos.io.in := UInt(1) - blackBoxPassNeg.io.in := UInt(0) + blackBoxInvPos.io.in := UInt.Lit(1) + blackBoxInvNeg.io.in := UInt.Lit(0) + blackBoxPassPos.io.in := UInt.Lit(1) + blackBoxPassNeg.io.in := UInt.Lit(0) - assert(blackBoxInvNeg.io.out === UInt(1)) - assert(blackBoxInvPos.io.out === UInt(0)) - assert(blackBoxPassNeg.io.out === UInt(0)) - assert(blackBoxPassPos.io.out === UInt(1)) + assert(blackBoxInvNeg.io.out === UInt.Lit(1)) + assert(blackBoxInvPos.io.out === UInt.Lit(0)) + assert(blackBoxPassNeg.io.out === UInt.Lit(0)) + assert(blackBoxPassPos.io.out === UInt.Lit(1)) stop() } @@ -77,7 +77,7 @@ class BlackBoxWithClockTester extends BasicTester { blackBox.io.in := impetus model := impetus - when(cycles > UInt(0)) { + when(cycles > UInt.Lit(0)) { assert(blackBox.io.out === model) } when(end) { stop() } @@ -98,8 +98,8 @@ class BlackBoxWithParamsTester extends BasicTester { val (cycles, end) = Counter(Bool(true), 4) - assert(blackBoxOne.io.out === UInt(1)) - assert(blackBoxFour.io.out === UInt(4)) + assert(blackBoxOne.io.out === UInt.Lit(1)) + assert(blackBoxFour.io.out === UInt.Lit(4)) when(end) { stop() } } |
