summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/ComplexAssign.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/ComplexAssign.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/ComplexAssign.scala')
-rw-r--r--src/test/scala/chiselTests/ComplexAssign.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/scala/chiselTests/ComplexAssign.scala b/src/test/scala/chiselTests/ComplexAssign.scala
index 304fbcf5..0a1f31cc 100644
--- a/src/test/scala/chiselTests/ComplexAssign.scala
+++ b/src/test/scala/chiselTests/ComplexAssign.scala
@@ -11,17 +11,17 @@ import chisel3.util._
class Complex[T <: Data](val re: T, val im: T) extends Bundle {
override def cloneType: this.type =
- new Complex(re.cloneType, im.cloneType).asInstanceOf[this.type]
+ new Complex(re.chiselCloneType, im.chiselCloneType).asInstanceOf[this.type]
}
class ComplexAssign(w: Int) extends Module {
- val io = new Bundle {
- val e = new Bool(INPUT)
- val in = new Complex(UInt(width = w), UInt(width = w)).asInput
- val out = new Complex(UInt(width = w), UInt(width = w)).asOutput
- }
+ val io = IO(new Bundle {
+ val e = Input(Bool())
+ val in = Input(new Complex(UInt.width(w), UInt.width(w)))
+ val out = Output(new Complex(UInt.width(w), UInt.width(w)))
+ })
when (io.e) {
- val tmp = Wire(new Complex(UInt(width = w), UInt(width = w)))
+ val tmp = Wire(new Complex(UInt.width(w), UInt.width(w)))
tmp := io.in
io.out.re := tmp.re
io.out.im := tmp.im