Exception Processing; Exception Vectors - Motorola MC68030 User Manual

Enhanced 32-811 microprocessor
Hide thumbs Also See for MC68030:
Table of Contents

Advertisement

-
4.3 EXCEPTION, PROCESSING
An exception is defined as a special condition that pre-empts normal pro-
cessing. Both internal and external conditions cause exceptions. External
conditions that cause exceptions are interrupts from external devices, bus
errors, coprocessor detected errors, and reset. Instructions, address errors,
tracing, and breakpoints are internal conditions that cause exceptions. The
TRAP, TRAPcc, TRAPV, cpTRAPcc, CHK, CHK2, RTE, and DIV instructions can
all generate exceptions as part of their normal execution. In addition, illegal
instructions, privilege violations, and coprocessor protocol violations cause
exceptions.
Exception processing, which is the transition from the normal processing of
a program to the processing required for the exception condition, involves
the exception vector table and an exception stack frame. The following par-
agraphs describe the vector table and a generalized exception stack frame.
Exception processing is discussed in detail in SECTION 8 EXCEPTION PRO-
CESSING. Coprocessor detected exceptions are discussed in detail in SEC-
TION
10
COPROCESSOR INTERFACE DESCRIPTION.
4.3.1 Exception Vectors
4-6
The vector base register (VBR) contains the base address of the 1024-byte
exception vector table, which consists of 256 exception vectors. Exception
vectors contain the memory addresses of routines that begin execution at
the completion of exception processing. These routines perform a series of
operations appropriate for the corresponding exceptions. Because the ex-
ception vectors contain memory addresses, each consists of one long word,
except for the reset vector. The reset vector consists of two long words: the
address used to initialize the interrupt stack pointer and the address used to
initialize the program counter.
The address of an exception vector is derived from an 8-bit vector number
and the VBR. The vector numbers for some exceptions are obtained from an
external device; others are supplied automatically by the processor. The
processor multiplies the vector number by four to calculate the vector offset,
which it adds to the VBR. The sum is the memory address of the vector. All
exception vectors are located in supervisor data space, except the reset vec-
tor, which is located in supervisor program space. Only the initial reset vector
is fixed in the processor's memory map; once initialization is complete, there
are no fixed assignments. Since the VBR provides the base address of the
vector table, the vector table can be located anywhere in memory; it can
MC68030 USER'S MANUAL
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents