Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThose functionalities (IRQ enable and clear) need to be done in your custom component, using additional registers. What I usually do in a custom component is to create two registers: a status register and a mask register.
Each bit in the status register represents an event that can trigger an interrupt. When the corresponding event occurs, the bit is set to '1' inside the component. The software can then read this status register to know what happened, and clear the status bits to say it has handled the event (write '1' to a bit to clear it). The mask register can be used to enable/disable the IRQ, and decide what events should trigger an interrupt. What I do is an AND between the mask and the status register, and activate the IRQ signal to the CPU if the result is non-zero. This is a pretty standard way of handling interrupts, but it needs to be done in each individual custom component.