Gabriel L. Somlo
unread,May 3, 2019, 1:28:39 PM5/3/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hw-...@groups.riscv.org
Hi,
I configured and built my RocketChip with "new WithNExtTopInterrupts(4)",
which as expected generated a 4-bit interrupt input signal to the
ExampleRocketSystem module: "input [3:0] interrupts,".
It is my understanding that all four of these count as "external", and
that if any of them is asserted, I'd get a trap, provided bit 3 (MIE)
of the "mstatus" CSR is enabled, *and* bit 11 (MEIE) of the "mie" CSR
is also enabled (dealing with machine mode only, for now).
If I'm right so far, how would I figure out which of the several
external interrupt pins was asserted once I get to the trap handler
and realize MEIP is asserted in "mip", and "mcause" says it's an
external interrupt (0x800000000000000b)?
Is there some PLIC specific CSR or register I could read to get that
information?
Thanks,
--Gabriel