Exception Vectors; Figure 4-4. General Form Of Exception Stack Frame - Motorola MC68306 User Manual

Integrated ec000 processor
Table of Contents

Advertisement

The third step is to save the current processor contents for all exceptions other than reset
exception, which does not stack information. The processor creates an exception stack
frame on the active supervisor stack and fills it with information appropriate for the type of
exception. Other information can also be stacked, depending on which exception is being
processed and the state of the processor prior to the exception. Figure 4-4 illustrates the
general form of the exception stack frame.
SSP

Figure 4-4. General Form of Exception Stack Frame

The last step initiates execution of the exception handler. The new program counter value
is fetched from the exception vector. The processor then resumes instruction execution.
The instruction at the address in the exception vector is fetched, and normal instruction
decoding and execution is started.

4.5.1 Exception Vectors

An exception vector is a memory location from which the processor fetches the address of
a routine to handle an exception. Each exception type requires a handler routine and a
unique vector. All exception vectors are two words in length (see Figure 4-5), except for
the reset vector, which is four words long. All exception vectors reside in the supervisor
data space, except for the reset vector, which is in the supervisor program space. A vector
number is an 8-bit number that is multiplied by four to obtain the offset of an exception
vector. Vector numbers are generated internally or externally, depending on the cause of
the exception. For interrupts, during the interrupt acknowledge bus cycle, a peripheral
provides an 8-bit vector number (see Figure 4-6) to the processor on data bus lines D7–
D0.
The processor forms the vector offset by left-shifting the vector number two bit positions
and zero-filling the upper-order bits to obtain a 32-bit long-word vector offset. In the
EC000 core this offset is used as the absolute address to obtain the exception vector
itself, which is illustrated in Figure 4-6.
4-14
EVEN BYTE
7
15
STATUS REGISTER
PROGRAM COUNTER HIGH
PROGRAM COUNTER LOW
MC68306 USER'S MANUAL
ODD BYTE
0
7
0
0
HIGHER
ADDRESS
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents