summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/ComplexAssign.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/chiselTests/ComplexAssign.scala')
-rw-r--r--src/test/scala/chiselTests/ComplexAssign.scala15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/scala/chiselTests/ComplexAssign.scala b/src/test/scala/chiselTests/ComplexAssign.scala
index 304fbcf5..48a673cf 100644
--- a/src/test/scala/chiselTests/ComplexAssign.scala
+++ b/src/test/scala/chiselTests/ComplexAssign.scala
@@ -8,20 +8,21 @@ import org.scalatest.prop._
import chisel3._
import chisel3.testers.BasicTester
import chisel3.util._
+import chisel3.NotStrict.CompileOptions
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