Interrupts from external peripherals - can I (or should I) use FIRQ? #91
-
I have some peripherals connected via Wishbone interface to the noerv32 and I would like them to request interrupts. At the beginning I thought I would use
second one stating that :
And I don't quite understand. If I shouldn't use those interrupts for any "external stuff" then why they are available as an input in top entity? Why there are only 6 of them in the top module? Have I confused these with other interrupts? How can I implement what I want in the "right" way? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Right. The FIRQ signals are no longer available via the processor top entity. I decided to use them only for processor internal modules.
Seems like this section is a little bit misleading - I will fix the text there. 😉 So if you want to use "custom processor-external interrupts" you can use one of the processor top' interrupt signals: -- Interrupts --
nm_irq_i : in std_ulogic := '0'; -- non-maskable interrupt
mtime_irq_i : in std_ulogic := '0'; -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i : in std_ulogic := '0'; -- machine software interrupt
mext_irq_i : in std_ulogic := '0' -- machine external interrupt
Btw, how many interrupt sources do you have? Maybe it would be a good idea to add an interrupt controller right inside the processor. This could serve as "external interrupt controller" providing something like 16 interrupt signals (via a new top signal) for custom usage. 🤔 I think this would make creating setups that require several interrupts much easier as there is no need to write a custom interrupt controller. |
Beta Was this translation helpful? Give feedback.
-
It is good to know all about FIRQ because I used them. So if it disappear I would to use maybe: With last option, you can use CFS interrupt and have registers to enable/disable, choose rising/falling edge, etc... btw if you add a specific interrupt controller, it would be better ! 😃 |
Beta Was this translation helpful? Give feedback.
-
I have added a first (tested!) version of the new external interrupt controller Top Entity
Sources
Feel free to comment if have questions, ideas or any remarks. 😉 |
Beta Was this translation helpful? Give feedback.
Right. The FIRQ signals are no longer available via the processor top entity. I decided to use them only for processor internal modules.
Seems like this section is a little bit misleading - I will fix the text there. 😉
So if you want to use "custom processor-external interrupts" you can use one of the processor top' interrupt …