summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/UIntOps.scala
diff options
context:
space:
mode:
authorJim Lawson2016-08-18 12:35:34 -0700
committerJim Lawson2016-08-18 12:35:34 -0700
commitd18274e307271809db2c27676f1dca40a49c9627 (patch)
tree2632a0e409bea3f9069c5ebfb555cc1ec04caa4f /src/test/scala/chiselTests/UIntOps.scala
parentddb7278760029be9d960ba8bf2b06ac8a8aac767 (diff)
parent7922f8d4998dd902ee18a6e85e4a404a1f29eb3f (diff)
Merge branch 'sdtwigg_connectwrap_renamechisel3' into gsdt_tests
Revive support for firrtl flip direction. Remove compileOptions.internalConnectionToInputOk
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 c5069fc4..ad5aecd8 100644
--- a/src/test/scala/chiselTests/UIntOps.scala
+++ b/src/test/scala/chiselTests/UIntOps.scala
@@ -7,23 +7,23 @@ import org.scalatest._
import chisel3.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.width(16))
+ val b = Input(UInt.width(16))
+ val addout = Output(UInt.width(16))
+ val subout = Output(UInt.width(16))
+ val timesout = Output(UInt.width(16))
+ val divout = Output(UInt.width(16))
+ val modout = Output(UInt.width(16))
+ val lshiftout = Output(UInt.width(16))
+ val rshiftout = Output(UInt.width(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
@@ -77,18 +77,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.width(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
}