summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/UIntOps.scala
diff options
context:
space:
mode:
authorJim Lawson2016-06-21 10:13:51 -0700
committerJim Lawson2016-06-21 10:13:51 -0700
commit083610b2faa456dfccc4365dd115565d36e522fa (patch)
tree40df9237ddc8789f24d924c0cfa63a066fcc1f1c /src/test/scala/chiselTests/UIntOps.scala
parentd675043717593fb7e96fb0f1952debbeb7f20a57 (diff)
Most of the remaining tests with Module, IO wrapping.
Diffstat (limited to 'src/test/scala/chiselTests/UIntOps.scala')
-rw-r--r--src/test/scala/chiselTests/UIntOps.scala50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/test/scala/chiselTests/UIntOps.scala b/src/test/scala/chiselTests/UIntOps.scala
index bb0b0f06..4e8506cf 100644
--- a/src/test/scala/chiselTests/UIntOps.scala
+++ b/src/test/scala/chiselTests/UIntOps.scala
@@ -6,23 +6,23 @@ import org.scalatest._
import Chisel.testers.BasicTester
class UIntOps extends Module {
- val io = new Bundle {
- val a = UInt(INPUT, 16)
- val b = UInt(INPUT, 16)
- val addout = UInt(OUTPUT, 16)
- val subout = UInt(OUTPUT, 16)
- val timesout = UInt(OUTPUT, 16)
- val divout = UInt(OUTPUT, 16)
- val modout = UInt(OUTPUT, 16)
- val lshiftout = UInt(OUTPUT, 16)
- val rshiftout = UInt(OUTPUT, 16)
- val lessout = Bool(OUTPUT)
- val greatout = Bool(OUTPUT)
- val eqout = Bool(OUTPUT)
- val noteqout = Bool(OUTPUT)
- val lesseqout = Bool(OUTPUT)
- val greateqout = Bool(OUTPUT)
- }
+ val io = IO(new Bundle {
+ val a = Input(UInt(16))
+ val b = Input(UInt(16))
+ val addout = Output(UInt(16))
+ val subout = Output(UInt(16))
+ val timesout = Output(UInt(16))
+ val divout = Output(UInt(16))
+ val modout = Output(UInt(16))
+ val lshiftout = Output(UInt(16))
+ val rshiftout = Output(UInt(16))
+ val lessout = Output(Bool())
+ val greatout = Output(Bool())
+ val eqout = Output(Bool())
+ val noteqout = Output(Bool())
+ val lesseqout = Output(Bool())
+ val greateqout = Output(Bool())
+ })
val a = io.a
val b = io.b
@@ -76,18 +76,18 @@ class UIntOpsTester(c: UIntOps) extends Tester(c) {
*/
class GoodBoolConversion extends Module {
- val io = new Bundle {
- val u = UInt(1, width = 1).asInput
- val b = Bool(OUTPUT)
- }
+ val io = IO(new Bundle {
+ val u = Input(UInt(1))
+ val b = Output(Bool())
+ })
io.b := io.u.toBool
}
class BadBoolConversion extends Module {
- val io = new Bundle {
- val u = UInt(1, width = 5).asInput
- val b = Bool(OUTPUT)
- }
+ val io = IO(new Bundle {
+ val u = Input(UInt(width = 5))
+ val b = Output(Bool())
+ })
io.b := io.u.toBool
}