Using the Interrupt Generation Trickbox
You can generate interrupts either: on demand, by writing to a control register, or automatically at regular intervals, using a programmable timer.
Program the INT_SEQx registers with integers in the range
These numbers refer to the interrupt line that fires each time the trickbox generates an interrupt. The value in each INT_SEQx register must be unique.
- Program the INT_TYPEx registers to configure whether each interrupt is level-triggered or edge-triggered, as required.
If the trickbox must automatically generate interrupts at regular
intervals, set INT_FREQ to the required frequency.
The values are as follows:
0 A value of 0 means that an interrupt is generated on every clock cycle. 1 A value of 1 means that an interrupt is generated every other clock cycle.The timer does not start until interrupt generation is globally enabled.
Set INT_CTRL.ENABLE to 1 to enable the generation of interrupts.
Interrupts start to fire automatically if INT_CTRL.TIMER_EN is 1. Otherwise, manual generation of interrupts is enabled.
Run the code of interest across which the interrupts are to be
Option Description Interrupts are to be generated manually. Write 1 to INT_GENERATE at the required points in the code to fire the next interrupt. Interrupts are to be timer-generated. You can pause generation at any time by clearing INT_CTRL.TIMER_EN. Additional interrupts can be generated manually If INT_CTRL.ENABLE is HIGH.
- Write 0 to INT_CTRL.ENABLE to stop the generation of subsequent interrupts.
Read INT_NUMBER to determine how many interrupts fired.
If this value is
0x8hFF, then all possible interrupts fired, as the INTGEN_INTS option configures. If the value is not
0x8hFF, then it provides the actual number of interrupts that fired.
Write 1 to INT_ACK to clear all level-sensitive interrupts and to reset
INT_NUMBER back to zero.
The interrupt generator is now ready to be reconfigured or restarted.