From 4d784ad693acc2d92389189c3123a91fa0ce2be2 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Tue, 18 Jul 2017 18:52:31 -0700 Subject: [PATCH] add cloneType to RegisterWriteIO and RegisterReadIO (#874) --- src/main/scala/regmapper/RegisterCrossing.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/scala/regmapper/RegisterCrossing.scala b/src/main/scala/regmapper/RegisterCrossing.scala index 212ecedc..99bc578b 100644 --- a/src/main/scala/regmapper/RegisterCrossing.scala +++ b/src/main/scala/regmapper/RegisterCrossing.scala @@ -52,6 +52,8 @@ class RegisterCrossingAssertion extends Module { class RegisterWriteIO[T <: Data](gen: T) extends Bundle { val request = Decoupled(gen).flip val response = Irrevocable(Bool()) // ignore .bits + + override def cloneType = new RegisterWriteIO(gen).asInstanceOf[this.type] } // To turn off=>on a domain: @@ -126,6 +128,8 @@ class RegisterWriteCrossing[T <: Data](gen: T, sync: Int = 3) extends Module { class RegisterReadIO[T <: Data](gen: T) extends Bundle { val request = Decoupled(Bool()).flip // ignore .bits val response = Irrevocable(gen) + + override def cloneType = new RegisterReadIO(gen).asInstanceOf[this.type] } class RegisterReadCrossingIO[T <: Data](gen: T) extends Bundle {