29
0851B–HIREL–06/07
e2v semiconductors SAS 2007
TS68040
10. Functional Description
10.1 Programming Model
The TS68040 integrates the functions of the integer unit, MMU, and FPU. As shown in Figure 9-1, the
registers depicted in the programming model provide access and control for the three units. The regis-
ters are partitioned into two levels of privilege: user and supervisor. User programs, executing in the user
mode, can only use the resources of the user model. System software, executing in the supervisor
mode, has unrestricted access to all processor resources.
The integer portion of the user programming model, consisting of 16, general-purpose, 32-bit registers
and two control registers, is the same as the user programming model of the TS68030. The TS68040
user programming model also incorporates the TS68882 programming model consisting of eight, float-
ing-point, 80-bit data registers, a floating-point control register, a floating-point status register, and a
floating-point instruction address register.
The supervisor programming model is used exclusively by TS68040 system programmers to implement
operating system functions, I/O control, and memory management subsystems. This supervisor/user
distinction in the TS68000 architecture was carefully planned so that all application software can be writ-
ten to execute in the nonprivileged user mode and migrate to the TS68040 from any TS68000 platform
without modification. Since system software is usually modified by system designers when porting to a
new design, the control features are properly placed in the supervisor programming model. For example,
the transparent translation registers of the TS68040 can only be read or written by the supervisor soft-
ware; the programming resources of user application programs are unaffected by the existence of the
transparent translation registers
Registers D0-D7 are data registers containing operands for bit and bit field (1- to 32-bit), byte (8-bit),
word (16-bit), long-word (32-bit), and quad-word (64-bit) operations. Registers A0-A6 and the stack
pointer registers (user, interrupt, and master) are address registers that may be used as software stack
pointers or base address registers. Register A7 is the user stack pointer in user mode, and is either the
interrupt or master stack pointer (A7’ or A7’’) in supervisor mode. In supervisor mode, the active stack
pointer (interrupt or master) is selected based on a bit in the status register (SR). The address registers
may be used for word and long-word operations, and all of the 16 general-purpose registers (D0-D7, A0-
A7 in Figure 9-1) may be used as index registers.
The eight, 80-bit, floating-point data registers (FP0-FP7) are analogous to the integer data registers (D0-
D7) of all TS68000 Family processors. Floating-point data registers always contain extended-precision
numbers. All external operands, regardless of the data format, are converted to extended-precision val-
ues before being used in any floating-point calculation or stored in a floating-point data register.
The program counter (PC) usually contains the address of the instruction being executed by the
TS68040. During instruction execution and exception processing, the processor automatically incre-
ments the contents of the PC or places a new value in the PC, as appropriate. The status register (SR in
the supervisor programming model) contains the condition codes that reflect the results of a previous
operation and can be used for conditional instruction execution in a program. The lower byte of the SR is
accessible in user mode as the condition code register (CCR). Access to the upper byte of the SR is
restricted to the supervisor mode.
As part of exception processing, the vector number of the exception provides an index into the exception
vector table. The base address of the exception vector table is stored in the vector base register (VBR).
The displacement of an exception vector is added to the value in the VBR when the TS68040 accesses
the vector table during exception processing.