The PowerPC Core
MOTOROLA
MPC801 USER’S MANUAL
6-13
6
6.2.7 The External Interrupt
The core provides one external interrupt line—the architectural maskable external interrupt.
In the MPC801, this interrupt is generated by the on-chip interrupt controller. It is software
acknowledged and maskable by the MSR
EE
bit, which is automatically cleared by the
hardware to disable external interrupts when any interrupt is taken.
6.2.7.1 LATENCY
When an external interrupt is detected, every instruction that can retire from the history
buffer does so and the interrupt is assigned to the instruction at the head of the history buffer.
However, the following conditions must be met before the instructions at the head of the
queue can retire.
The instructions at the head of the history buffer must be completed without exception
The instructions at the head of the history buffer must either be a
instruction, a memory reference, or a storage or cache control instruction.
mtspr
,
mtmsr
, or
rfi
Any instruction that does not meet these criteria is discarded with all of its side effects and
the execution at the end of the interrupt handler resumes with the first instruction that was
discarded. If all the instructions in the history buffer were allowed to complete, execution at
the end of the interrupt handler resumes with the next instruction. External interrupt latency
depends on the time required to reference memory. The measurement is equal to one of the
following, in addition to the interval between B and E shown in Table 6-4.
Longest load/store multiple/string instruction used
One bus cycle for aligned access
Two bus cycles for unaligned access
Actual system-level interrupt latency can be worse than just the interval between B and E.
If the instruction prior to the one in which the interrupt gets assigned generates an exception,
the exception is recognized first. If minimal interrupt latency is an important system
parameter, interrupt handlers should save the machine context and reenable an external
interrupt as quickly as possible so that a pending external interrupt will get fast service.
6.2.8 Interrupt Ordering
There are two major types of interrupts:
Instruction-related interrupts
Asynchronous (noninstruction-related) interrupts
Instruction-related exceptions are detected while the instruction is in various stages of being
processed by the core. Exceptions detected early in instruction processing avoid detection
of other exceptions for the same instruction. This earlier interrupt will eventually be taken. If
more than one instruction in the pipeline causes an exception, only the first exception is
taken and causes an interrupt. Remaining instruction-induced exceptions are ignored. The
following table lists the instruction-related interrupts in the order of detection within the
instruction processing.