Non-maskable interrupt handling
Hi all,
In testing Ibex's interrupt interface, I ran into the following situation:
I drive irq_nm_i, signaling a non-maskable interrupt to Ibex. Since Ibex treats interrupts as level sensitive, and relies on handler routines to deassert the interrupt lines, I treat non-maskable interrupts the same way, and leave it driven to 1'b1 until the handler code is completed. However, Ibex, after jumping into the DECODE state from IRQ_TAKEN upon detection of the irq_nm, seems to keep detecting that irq_nm is high, and then infinitely loops between the DECODE and IRQ_TAKEN states, causing the simulation to time out. Since according to #199 as well as the docs this seems to be incorrect behavior for irq_nm, would it be possible to clarify what expected behavior for non-maskable interrupt should be?
Thanks Udi for reporting this bug. There was a wrong default assignment for nmi_mode_d. The NMI mode register was thus constantly cleared (unless the core was in the IRQ_TAKEN) state. I have created a PR to fix it.