Add JTAG tunnel without TAP in EmbeddedRiscvJtag
This commit is contained in:
parent
2073047272
commit
bd7c4c3281
|
@ -14,6 +14,7 @@ import vexriscv._
|
||||||
|
|
||||||
class EmbeddedRiscvJtag(var p : DebugTransportModuleParameter,
|
class EmbeddedRiscvJtag(var p : DebugTransportModuleParameter,
|
||||||
var debugCd : ClockDomain = null,
|
var debugCd : ClockDomain = null,
|
||||||
|
var jtagCd : ClockDomain = null,
|
||||||
var withTap : Boolean = true,
|
var withTap : Boolean = true,
|
||||||
var withTunneling : Boolean = false
|
var withTunneling : Boolean = false
|
||||||
) extends Plugin[VexRiscv] with VexRiscvRegressionArg{
|
) extends Plugin[VexRiscv] with VexRiscvRegressionArg{
|
||||||
|
@ -61,7 +62,7 @@ class EmbeddedRiscvJtag(var p : DebugTransportModuleParameter,
|
||||||
dm.io.ctrl <> logic.io.bus
|
dm.io.ctrl <> logic.io.bus
|
||||||
logic.io.jtag <> jtag
|
logic.io.jtag <> jtag
|
||||||
}
|
}
|
||||||
val dmiTunneled = if(withTap && withTunneling) new Area {
|
val dmiTunneledWithTap = if(withTap && withTunneling) new Area {
|
||||||
val logic = DebugTransportModuleJtagTapWithTunnel(
|
val logic = DebugTransportModuleJtagTapWithTunnel(
|
||||||
p.copy(addressWidth = 7),
|
p.copy(addressWidth = 7),
|
||||||
debugCd = ClockDomain.current
|
debugCd = ClockDomain.current
|
||||||
|
@ -69,6 +70,15 @@ class EmbeddedRiscvJtag(var p : DebugTransportModuleParameter,
|
||||||
dm.io.ctrl <> logic.io.bus
|
dm.io.ctrl <> logic.io.bus
|
||||||
logic.io.jtag <> jtag
|
logic.io.jtag <> jtag
|
||||||
}
|
}
|
||||||
|
val dmiTunneledNoTap = if (!withTap && withTunneling) new Area {
|
||||||
|
val logic = DebugTransportModuleTunneled(
|
||||||
|
p.copy(addressWidth = 7),
|
||||||
|
debugCd = ClockDomain.current,
|
||||||
|
jtagCd = jtagCd
|
||||||
|
)
|
||||||
|
logic.io.instruction <> jtagInstruction
|
||||||
|
dm.io.ctrl <> logic.io.bus
|
||||||
|
}
|
||||||
|
|
||||||
val privBus = pipeline.service(classOf[CsrPlugin]).debugBus.setAsDirectionLess()
|
val privBus = pipeline.service(classOf[CsrPlugin]).debugBus.setAsDirectionLess()
|
||||||
privBus <> dm.io.harts(0)
|
privBus <> dm.io.harts(0)
|
||||||
|
|
Loading…
Reference in New Issue