ibex icon indicating copy to clipboard operation
ibex copied to clipboard

Non-maskable interrupt handling

Open udinator opened this issue 7 years ago • 1 comments

Hi all, In testing Ibex's interrupt interface, I ran into the following situation: Screenshot from 2019-09-10 14-39-58 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?

udinator avatar Sep 10 '19 21:09 udinator

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.

vogelpi avatar Sep 11 '19 09:09 vogelpi