local_interrupts: Correct off-by-1 if there is no SEIP
This commit is contained in:
parent
1ecd63611f
commit
922a8ef5e0
@ -50,11 +50,12 @@ trait HasExternalInterruptsModule {
|
|||||||
val periph_ips = Seq(
|
val periph_ips = Seq(
|
||||||
core.msip,
|
core.msip,
|
||||||
core.mtip,
|
core.mtip,
|
||||||
core.meip,
|
core.meip)
|
||||||
core.seip.getOrElse(Wire(Bool())))
|
|
||||||
|
val seip = if (core.seip.isDefined) Seq(core.seip.get) else Nil
|
||||||
|
|
||||||
val core_ips = core.lip
|
val core_ips = core.lip
|
||||||
|
|
||||||
(async_ips ++ periph_ips ++ core_ips).zip(io.interrupts(0)).foreach { case(c, i) => c := i }
|
(async_ips ++ periph_ips ++ seip ++ core_ips).zip(io.interrupts(0)).foreach { case(c, i) => c := i }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user