Forum Discussion
NIOS handle IRQ from FPGA register
- 1 year ago
see answer on the new case (with same related issue) you opened: https://community.intel.com/t5/Nios-V-II-Embedded-Design-Suite/NIOS-connected-to-IRQ-from-FPGA-but-not-PIO/m-p/1693761/highlight/true#M53832:~:text=NIOS%20connected%20to%20IRQ%20from%20FPGA%20but%20not%20PIO
Hi,
1) Why do all xx_IRQ_INTERRUPT_CONTROLLER_ID values equal 0?
In a standard Nios II system, there is only one interrupt controller: the internal interrupt controller. So all peripherals using interrupts will use the same controller ID. "-1" reflects peripherals not using interrupts at all.
2 and 3) Nios II supports up to 32 independent HW interrupts with the std. IIC (internal interrupt controller).
You can expose one "common" IRQ output from your IP component and internally OR-combine the 32 individual interrupt sources. Your ISR must poll internal status to identify the active interrupt (your IP should expose a status register to identify the source).
As an alternative your IP could also expose 32 separate IRQ outputs (wiring in platform designer more tedious).
In this case you register a separate ISR for each interrupt source. Each ISR only needs to handle one specific source, no need for polling a status register.