1
0

Add cloneType methods for Chisel3

This commit is contained in:
Palmer Dabbelt 2016-03-14 14:12:21 -07:00
parent 1344d09cef
commit aa22f175c3

View File

@ -38,6 +38,8 @@ class HostIO(w: Int) extends Bundle {
val in = Decoupled(Bits(width = w)).flip val in = Decoupled(Bits(width = w)).flip
val out = Decoupled(Bits(width = w)) val out = Decoupled(Bits(width = w))
val debug_stats_csr = Bool(OUTPUT) val debug_stats_csr = Bool(OUTPUT)
override def cloneType = new HostIO(w).asInstanceOf[this.type]
} }
class HtifIO(implicit p: Parameters) extends HtifBundle()(p) { class HtifIO(implicit p: Parameters) extends HtifBundle()(p) {
@ -235,6 +237,8 @@ class NastiIOHostIOConverter(htifW: Int)(implicit val p: Parameters)
val reset = Bool(OUTPUT) val reset = Bool(OUTPUT)
} }
def cloneType = new NastiIOHostIOConverter(htifW).asInstanceOf[this.type]
val raddr = io.nasti.ar.bits.addr(6, 2) val raddr = io.nasti.ar.bits.addr(6, 2)
val waddr = io.nasti.aw.bits.addr(6, 2) val waddr = io.nasti.aw.bits.addr(6, 2)