EC000 Core Processor
MOTOROLA
MC68307 USER’S MANUAL
4-19
4.6.11 Multiple Exceptions
When multiple exceptions occur simultaneously, they are processed according to a fixed pri-
ority.
Table 4-6 lists the exceptions, grouped by characteristics, with group 0 as the highest
priority. Within group 0, reset has highest priority, followed by address error and then bus
error. Within group 1, trace has priority over external interrupts, which in turn takes priority
over illegal instruction and privilege violation. Since only one instruction can be executed at
a time, no priority relationship applies within group 2.
The priority relationship between two exceptions determines which is taken, or taken first, if
the conditions for both arise simultaneously. Therefore, if a bus error occurs during a TRAP
instruction, the bus error takes precedence, and the TRAP instruction processing is aborted.
In another example, if an interrupt request occurs during the execution of an instruction while
the T-bit in the status register (SR) is asserted, the trace exception has priority and is pro-
cessed first. Before instruction execution resumes, however, the interrupt exception is also
processed, and instruction processing finally commences in the interrupt handler routine. As
a general rule, the lower the priority of an exception, the sooner the handler routine for that
exception executes. This rule does not apply to the reset exception; its handler is executed
first even though it has the highest priority, because the reset operation clears all other
exceptions.
Figure 4-7. Supervisor Stack Order
for Bus or Address Error Exception
Table 4-6. Exception Grouping and Priority
Group
Exception
Processing
0
Reset, Address Error, and Bus Error Exception processing begins within two clock cycles.
1
Trace, Interrupt, Illegal, and Privilege Exception processing begins before the next instruction.
2
TRAP, TRAPV, CHK, and DIV
Exception processing is started by normal instruction execution.
LOWER
ADDRESS
0
15
I/N
FUNCTION CODE
HIGH
LOW
2
3
4
5
R/W
STATUS REGISTER
INSTRUCTION REGISTER
LOW
HIGH
ACCESS ADDRESS
PROGRAM COUNTER
R/W (READ/WRITE): WRITE = 0, READ = 1. I/N
(INSTRUCTION/NOT): INSTRUCTION = 0, NOT = 1.