summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/When.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-25 14:06:51 -0700
committerJim Lawson2016-07-25 17:07:33 -0700
commit7aa05590382b0528799ad5e9f1318ce42e409793 (patch)
tree9af7c7513f60efa30c59172a234a8f2926b5430f /src/test/scala/chiselTests/When.scala
parent3624751e2e63ba9f107c795529edfe48cf8340b2 (diff)
Minimize differences with master.
Remove .Lit(x) usage. Undo "private" scope change. Change "firing" back to "fire". Add package level NODIR definition.
Diffstat (limited to 'src/test/scala/chiselTests/When.scala')
-rw-r--r--src/test/scala/chiselTests/When.scala36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/scala/chiselTests/When.scala b/src/test/scala/chiselTests/When.scala
index 2f5c49e4..07ab3444 100644
--- a/src/test/scala/chiselTests/When.scala
+++ b/src/test/scala/chiselTests/When.scala
@@ -13,19 +13,19 @@ class WhenTester() extends BasicTester {
when(Bool(true)) { cnt.inc() }
val out = Wire(UInt.width(3))
- when(cnt.value === UInt.Lit(0)) {
- out := UInt.Lit(1)
- } .elsewhen (cnt.value === UInt.Lit(1)) {
- out := UInt.Lit(2)
- } .elsewhen (cnt.value === UInt.Lit(2)) {
- out := UInt.Lit(3)
+ when(cnt.value === UInt(0)) {
+ out := UInt(1)
+ } .elsewhen (cnt.value === UInt(1)) {
+ out := UInt(2)
+ } .elsewhen (cnt.value === UInt(2)) {
+ out := UInt(3)
} .otherwise {
- out := UInt.Lit(0)
+ out := UInt(0)
}
- assert(out === cnt.value + UInt.Lit(1))
+ assert(out === cnt.value + UInt(1))
- when(cnt.value === UInt.Lit(3)) {
+ when(cnt.value === UInt(3)) {
stop()
}
}
@@ -35,19 +35,19 @@ class OverlappedWhenTester() extends BasicTester {
when(Bool(true)) { cnt.inc() }
val out = Wire(UInt.width(3))
- when(cnt.value <= UInt.Lit(0)) {
- out := UInt.Lit(1)
- } .elsewhen (cnt.value <= UInt.Lit(1)) {
- out := UInt.Lit(2)
- } .elsewhen (cnt.value <= UInt.Lit(2)) {
- out := UInt.Lit(3)
+ when(cnt.value <= UInt(0)) {
+ out := UInt(1)
+ } .elsewhen (cnt.value <= UInt(1)) {
+ out := UInt(2)
+ } .elsewhen (cnt.value <= UInt(2)) {
+ out := UInt(3)
} .otherwise {
- out := UInt.Lit(0)
+ out := UInt(0)
}
- assert(out === cnt.value + UInt.Lit(1))
+ assert(out === cnt.value + UInt(1))
- when(cnt.value === UInt.Lit(3)) {
+ when(cnt.value === UInt(3)) {
stop()
}
}