summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorJim Lawson2018-07-19 10:23:03 -0700
committeredwardcwang2018-07-19 21:06:50 -0400
commit8f96e509215e092799cddd992dc2e42bedd4e2ad (patch)
treef981fad2f5328a730f24cd9d37f55fd4e2b3781d /src/test
parent1fd9957b077a2c5e02886ba85dd7a82e5de27876 (diff)
Add support for Input() and Output() (available in Chisel2 since ucb-bar/chisel2-deprecated#734) and test for same.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/chiselTests/CompatibilitySpec.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala
index eb38cab1..339f2af1 100644
--- a/src/test/scala/chiselTests/CompatibilitySpec.scala
+++ b/src/test/scala/chiselTests/CompatibilitySpec.scala
@@ -322,4 +322,18 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks
})
}
+ "Chisel3 IO constructs" should "be useable in Chisel2" in {
+ import Chisel._
+ elaborate(new Module {
+ val io = IO(new Bundle {
+ val in = Input(Bool())
+ val foo = Output(Bool())
+ val bar = Flipped(Bool())
+ })
+ Chisel.assert(io.in.dir == INPUT)
+ Chisel.assert(io.foo.dir == OUTPUT)
+ Chisel.assert(io.bar.dir == INPUT)
+ })
+ }
+
}