summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Counter.scala
diff options
context:
space:
mode:
authorducky2016-11-17 13:16:40 -0800
committerducky2016-11-21 13:31:12 -0800
commit37a569372c70a651c813d0beb44124878a596e73 (patch)
treec5a691564f37110e1c056227a9d0818ea337af69 /src/test/scala/chiselTests/Counter.scala
parent73906fcc796b259c81d5df7733968b77fbb81ba8 (diff)
Fix all deprecations from new style
Diffstat (limited to 'src/test/scala/chiselTests/Counter.scala')
-rw-r--r--src/test/scala/chiselTests/Counter.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/scala/chiselTests/Counter.scala b/src/test/scala/chiselTests/Counter.scala
index cccd8c0e..55c07772 100644
--- a/src/test/scala/chiselTests/Counter.scala
+++ b/src/test/scala/chiselTests/Counter.scala
@@ -12,7 +12,7 @@ import chisel3.util._
class CountTester(max: Int) extends BasicTester {
val cnt = Counter(max)
when(true.B) { cnt.inc() }
- when(cnt.value === UInt(max-1)) {
+ when(cnt.value === (max-1).asUInt) {
stop()
}
}
@@ -25,7 +25,7 @@ class EnableTester(seed: Int) extends BasicTester {
val (_, done) = Counter(true.B, 33)
when(done) {
- assert(cntEnVal === UInt(popCount(seed)))
+ assert(cntEnVal === popCount(seed).asUInt)
stop()
}
}
@@ -33,7 +33,7 @@ class EnableTester(seed: Int) extends BasicTester {
class WrapTester(max: Int) extends BasicTester {
val (cnt, wrap) = Counter(true.B, max)
when(wrap) {
- assert(cnt === UInt(max - 1))
+ assert(cnt === (max - 1).asUInt)
stop()
}
}