summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Counter.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-20 14:49:35 -0700
committerJim Lawson2016-07-20 14:49:35 -0700
commit2dce378deda1cc33833eb378c89a1c5415817bae (patch)
treee3bc5361030d63e017d065491e9e7e4cf788fe3c /src/test/scala/chiselTests/Counter.scala
parent28e80311f172ae4d1d477e8bb47ca3719c9a8fc5 (diff)
Distinguish between ?Int.Lit and ?Int.width
Diffstat (limited to 'src/test/scala/chiselTests/Counter.scala')
-rw-r--r--src/test/scala/chiselTests/Counter.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/chiselTests/Counter.scala b/src/test/scala/chiselTests/Counter.scala
index 69d8a44a..af2fa550 100644
--- a/src/test/scala/chiselTests/Counter.scala
+++ b/src/test/scala/chiselTests/Counter.scala
@@ -12,20 +12,20 @@ import chisel3.util._
class CountTester(max: Int) extends BasicTester {
val cnt = Counter(max)
when(Bool(true)) { cnt.inc() }
- when(cnt.value === UInt(max-1)) {
+ when(cnt.value === UInt.Lit(max-1)) {
stop()
}
}
class EnableTester(seed: Int) extends BasicTester {
- val ens = Reg(init = UInt(seed))
+ val ens = Reg(init = UInt.Lit(seed))
ens := ens >> 1
val (cntEnVal, _) = Counter(ens(0), 32)
val (_, done) = Counter(Bool(true), 33)
when(done) {
- assert(cntEnVal === UInt(popCount(seed)))
+ assert(cntEnVal === UInt.Lit(popCount(seed)))
stop()
}
}
@@ -33,7 +33,7 @@ class EnableTester(seed: Int) extends BasicTester {
class WrapTester(max: Int) extends BasicTester {
val (cnt, wrap) = Counter(Bool(true), max)
when(wrap) {
- assert(cnt === UInt(max - 1))
+ assert(cnt === UInt.Lit(max - 1))
stop()
}
}