Remove redundant check in interrupt priority encoding
chooseInterrupts already sorts M interrupts above S interrupts.
This commit is contained in:
parent
cbe7c51b50
commit
8087a205cc
@ -300,7 +300,7 @@ class CSRFile(perfEventSets: EventSets = new EventSets(Seq()))(implicit p: Param
|
|||||||
val pending_interrupts = read_mip & reg_mie
|
val pending_interrupts = read_mip & reg_mie
|
||||||
val d_interrupts = reg_debugint << CSR.debugIntCause
|
val d_interrupts = reg_debugint << CSR.debugIntCause
|
||||||
val m_interrupts = Mux(reg_mstatus.prv <= PRV.S || (reg_mstatus.prv === PRV.M && reg_mstatus.mie), pending_interrupts & ~reg_mideleg, UInt(0))
|
val m_interrupts = Mux(reg_mstatus.prv <= PRV.S || (reg_mstatus.prv === PRV.M && reg_mstatus.mie), pending_interrupts & ~reg_mideleg, UInt(0))
|
||||||
val s_interrupts = Mux(m_interrupts === 0 && (reg_mstatus.prv < PRV.S || (reg_mstatus.prv === PRV.S && reg_mstatus.sie)), pending_interrupts & reg_mideleg, UInt(0))
|
val s_interrupts = Mux(reg_mstatus.prv < PRV.S || (reg_mstatus.prv === PRV.S && reg_mstatus.sie), pending_interrupts & reg_mideleg, UInt(0))
|
||||||
val (anyInterrupt, whichInterrupt) = chooseInterrupt(Seq(s_interrupts, m_interrupts, d_interrupts))
|
val (anyInterrupt, whichInterrupt) = chooseInterrupt(Seq(s_interrupts, m_interrupts, d_interrupts))
|
||||||
val interruptMSB = BigInt(1) << (xLen-1)
|
val interruptMSB = BigInt(1) << (xLen-1)
|
||||||
val interruptCause = UInt(interruptMSB) + whichInterrupt
|
val interruptCause = UInt(interruptMSB) + whichInterrupt
|
||||||
|
Loading…
Reference in New Issue
Block a user