
NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 187 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
5.4.3 Block Diagram
AIC_CTRL
Recorder
(AIC_IREC)
Encoder
(AIC_
IENC)
status
mask rstatus
status
nIRQ
PRIOR
POLAR
TRIG
astatus
Rd_IPER
EOS
Vector
Generator
(AIC_
IVEC)
prior_status
VECTOR
nFIQ
APB
bus
CLREDG
IRQ
OIRQ
Wr_IPER
NUMBER
Figure 5.4-1 Advanced Interrupt Controller (AIC) Block Diagram
5.4.4 Functional Description
Hardware Interrupt Vectoring
5.4.4.1
The hardware interrupt vectoring can be used to shorten the interrupt latency. If it is not be used,
priority determination must be carried out by software. When the Interrupt Priority Encoding Register
(AIC_IPER) is read, it will return an integer representing the channel that is active and having the
highest priority. This integer is equivalent to interrupt number multiplied by 4 (shifted left two bits to
word-align it), such that it can be used directly to index into a interrupt vector table to select the
appropriate interrupt service routine vector.
Priority Controller
5.4.4.2
An 8-level priority encoder controls the NIRQ line. Each interrupt source belongs to priority group
between of 0 to 7. Group 0 has the highest priority and group 7 the lowest. When more than one
unmasked interrupt channels are active at the same time, the interrupt with the highest priority is
serviced first. If all active interrupts have equal priority, the interrupt with the lowest interrupt source
number is serviced firstly.
The current priority level is defined as the priority level of the interrupt with the highest priority at the
time the register AIC_IPER is read. In the case when a higher priority unmasked interrupt occurs while
an interrupt already exits, there are two possible outcomes depending on whether the AIC_IPER has
been read.
If the processor has already read the AIC_IPER and caused the NIRQ line to be de-asserted, then the
NIRQ line is reasserted. When the processor has enabled nested interrupts and reads the AIC_IPER
again, it reads the new, higher priority interrupt vector. At the same time, the current priority level is