mirror of
https://github.com/SpinalHDL/VexRiscv.git
synced 2025-01-03 03:43:39 -05:00
DebugPlugin doesn't require memory/writeback stage anymore
This commit is contained in:
parent
58d7a4784d
commit
3d71045159
1 changed files with 4 additions and 4 deletions
|
@ -141,7 +141,7 @@ class DebugPlugin(val debugClockDomain : ClockDomain, hardwareBreakpointCount :
|
||||||
val haltIt = RegInit(False)
|
val haltIt = RegInit(False)
|
||||||
val stepIt = RegInit(False)
|
val stepIt = RegInit(False)
|
||||||
|
|
||||||
val isPipActive = RegNext(List(decode,execute, memory, writeBack).map(_.arbitration.isValid).orR)
|
val isPipActive = RegNext(stages.map(_.arbitration.isValid).orR)
|
||||||
val isPipBusy = isPipActive || RegNext(isPipActive)
|
val isPipBusy = isPipActive || RegNext(isPipActive)
|
||||||
val haltedByBreak = RegInit(False)
|
val haltedByBreak = RegInit(False)
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ class DebugPlugin(val debugClockDomain : ClockDomain, hardwareBreakpointCount :
|
||||||
hardwareBreakpoints.foreach(_.valid init(False))
|
hardwareBreakpoints.foreach(_.valid init(False))
|
||||||
|
|
||||||
val busReadDataReg = Reg(Bits(32 bit))
|
val busReadDataReg = Reg(Bits(32 bit))
|
||||||
when(writeBack.arbitration.isValid) {
|
when(stages.last.arbitration.isValid) {
|
||||||
busReadDataReg := writeBack.output(REGFILE_WRITE_DATA)
|
busReadDataReg := stages.last.output(REGFILE_WRITE_DATA)
|
||||||
}
|
}
|
||||||
io.bus.cmd.ready := True
|
io.bus.cmd.ready := True
|
||||||
io.bus.rsp.data := busReadDataReg
|
io.bus.rsp.data := busReadDataReg
|
||||||
|
@ -199,7 +199,7 @@ class DebugPlugin(val debugClockDomain : ClockDomain, hardwareBreakpointCount :
|
||||||
when(execute.arbitration.isValid && execute.input(DO_EBREAK)){
|
when(execute.arbitration.isValid && execute.input(DO_EBREAK)){
|
||||||
execute.arbitration.haltByOther := True
|
execute.arbitration.haltByOther := True
|
||||||
busReadDataReg := execute.input(PC).asBits
|
busReadDataReg := execute.input(PC).asBits
|
||||||
when(List(memory, writeBack).map(_.arbitration.isValid).orR === False){
|
when(stagesFromExecute.tail.map(_.arbitration.isValid).orR === False){
|
||||||
iBusFetcher.flushIt()
|
iBusFetcher.flushIt()
|
||||||
iBusFetcher.haltIt()
|
iBusFetcher.haltIt()
|
||||||
execute.arbitration.flushAll := True
|
execute.arbitration.flushAll := True
|
||||||
|
|
Loading…
Reference in a new issue