Plic: support 0 interrupts gracefully
This commit is contained in:
parent
13ec3853ed
commit
5b594ced29
@ -135,7 +135,7 @@ class TLPLIC(supervisor: Boolean, maxPriorities: Int, address: BigInt = 0xC00000
|
|||||||
val gateway = Module(new LevelGateway)
|
val gateway = Module(new LevelGateway)
|
||||||
gateway.io.interrupt := i
|
gateway.io.interrupt := i
|
||||||
gateway.io.plic
|
gateway.io.plic
|
||||||
})
|
} ++ (if (interrupts.isEmpty) Some(Wire(new GatewayPLICIO)) else None))
|
||||||
|
|
||||||
val priority =
|
val priority =
|
||||||
if (nPriorities > 0) Reg(Vec(nDevices+1, UInt(width=log2Up(nPriorities+1))))
|
if (nPriorities > 0) Reg(Vec(nDevices+1, UInt(width=log2Up(nPriorities+1))))
|
||||||
|
Loading…
Reference in New Issue
Block a user