Fix PLIC instantiation when S-mode is disabled
This commit is contained in:
parent
6aa708bcee
commit
684d902059
@ -93,11 +93,13 @@ class DefaultConfig extends Config (
|
|||||||
res append s" thresh 0x${(plicAddr + plicInfo.threshAddr(i, 'M')).toString(16)};\n"
|
res append s" thresh 0x${(plicAddr + plicInfo.threshAddr(i, 'M')).toString(16)};\n"
|
||||||
res append s" claim 0x${(plicAddr + plicInfo.claimAddr(i, 'M')).toString(16)};\n"
|
res append s" claim 0x${(plicAddr + plicInfo.claimAddr(i, 'M')).toString(16)};\n"
|
||||||
res append s" };\n"
|
res append s" };\n"
|
||||||
|
if (site(UseVM)) {
|
||||||
res append s" s {\n"
|
res append s" s {\n"
|
||||||
res append s" ie 0x${(plicAddr + plicInfo.enableAddr(i, 'S')).toString(16)};\n"
|
res append s" ie 0x${(plicAddr + plicInfo.enableAddr(i, 'S')).toString(16)};\n"
|
||||||
res append s" thresh 0x${(plicAddr + plicInfo.threshAddr(i, 'S')).toString(16)};\n"
|
res append s" thresh 0x${(plicAddr + plicInfo.threshAddr(i, 'S')).toString(16)};\n"
|
||||||
res append s" claim 0x${(plicAddr + plicInfo.claimAddr(i, 'S')).toString(16)};\n"
|
res append s" claim 0x${(plicAddr + plicInfo.claimAddr(i, 'S')).toString(16)};\n"
|
||||||
res append s" };\n"
|
res append s" };\n"
|
||||||
|
}
|
||||||
res append s" };\n"
|
res append s" };\n"
|
||||||
res append " };\n"
|
res append " };\n"
|
||||||
res append " };\n"
|
res append " };\n"
|
||||||
|
@ -222,6 +222,7 @@ class Uncore(implicit val p: Parameters) extends Module
|
|||||||
prci.io.id := UInt(i)
|
prci.io.id := UInt(i)
|
||||||
prci.io.interrupts.mtip := rtc.io.irqs(i)
|
prci.io.interrupts.mtip := rtc.io.irqs(i)
|
||||||
prci.io.interrupts.meip := plic.io.harts(plic.cfg.context(i, 'M'))
|
prci.io.interrupts.meip := plic.io.harts(plic.cfg.context(i, 'M'))
|
||||||
|
if (p(UseVM))
|
||||||
prci.io.interrupts.seip := plic.io.harts(plic.cfg.context(i, 'S'))
|
prci.io.interrupts.seip := plic.io.harts(plic.cfg.context(i, 'S'))
|
||||||
prci.io.interrupts.debug := Bool(false)
|
prci.io.interrupts.debug := Bool(false)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user