debug: redirect DMI NOPs to CONTROL register so things don't hang during reset
This commit is contained in:
parent
eef05cc1fc
commit
b94f1f15b0
@ -1141,9 +1141,14 @@ class DMIToTL(implicit p: Parameters) extends LazyModule {
|
|||||||
|
|
||||||
val (_, gbits) = edge.Get(src, addr, size)
|
val (_, gbits) = edge.Get(src, addr, size)
|
||||||
val (_, pfbits) = edge.Put(src, addr, size, io.dmi.req.bits.data)
|
val (_, pfbits) = edge.Put(src, addr, size, io.dmi.req.bits.data)
|
||||||
// This is just used for the DMI's NOP. TODO: Consider whether to send this
|
|
||||||
// across TL at all or just respond immediately.
|
// Note we force DMI NOPs to go to CONTROL register because
|
||||||
val (_, nbits) = edge.Put(src, addr, size, io.dmi.req.bits.data, mask = 0.U)
|
// Inner may be in reset / not have a clock,
|
||||||
|
// so we force address to be the one that goes to Outer.
|
||||||
|
// Besides, for a NOP we don't really need to pay the penalty to go
|
||||||
|
// across the CDC.
|
||||||
|
|
||||||
|
val (_, nbits) = edge.Put(src, toAddress = (DMI_RegAddrs.DMI_DMCONTROL << 2).U, size, data=0.U, mask = 0.U)
|
||||||
|
|
||||||
when (io.dmi.req.bits.op === DMIConsts.dmi_OP_WRITE) { tl.a.bits := pfbits
|
when (io.dmi.req.bits.op === DMIConsts.dmi_OP_WRITE) { tl.a.bits := pfbits
|
||||||
}.elsewhen (io.dmi.req.bits.op === DMIConsts.dmi_OP_READ) { tl.a.bits := gbits
|
}.elsewhen (io.dmi.req.bits.op === DMIConsts.dmi_OP_READ) { tl.a.bits := gbits
|
||||||
|
Loading…
Reference in New Issue
Block a user