7- 46
M68020 USER’S MANUAL
MOTOROLA
If SP = 0 and DR = 0, the main processor writes the 16-bit SR value to the operand CIR. If
SP = 0 and DR = 1, the main processor reads a 16-bit value from the operand CIR into the
main processor SR.
If SP = 1 and DR = 0, the main processor writes the long-word value in the scanPC to the
instruction address CIR and then writes the SR value to the operand CIR. If SP = 1 and
DR = 1, the main processor reads a 16-bit value from the operand CIR into the SR and
then reads a long-word value from the instruction address CIR into the scanPC.
With this primitive, a general category instruction can change the main processor program
flow by placing a new value in the SR, in the scanPC, or new values in both the SR and
the scanPC. By accessing the SR, the coprocessor can determine and manipulate the
main processor condition codes, supervisor status, trace modes, selection of the active
stack, and interrupt mask level.
The MC68020/EC020 discards any instruction words that have been prefetched beyond
the current scanPC location when this primitive is issued with DR = 1 (transfer to main
processor). The MC68020/EC020 then refills the instruction pipe from the scanPC
address in the address space indicated by the S-bit of the SR.
If the MC68020/EC020 is operating in the trace on change of flow mode (T1, T0 in the SR
= 01) when the coprocessor instruction begins to execute and if this primitive is issued
with DR = 1 (from coprocessor to main processor), the MC68020/EC020 prepares to take
a trace exception. The trace exception occurs when the coprocessor signals that it has
completed all processing associated with the instruction. Changes in the trace modes due
to the transfer of the SR to the main processor take effect on execution of the next
instruction.
7.4.18 Take Preinstruction Exception Primitive
The take preinstruction exception primitive initiates exception processing using a
coprocessor-supplied exception vector number and the preinstruction exception stack
frame format. This primitive applies to general and conditional category instructions.
Figure 7-40 shows the format of the take preinstruction exception primitive.
15
0
PC
0
14
13
12
1
11
10
9
8
7
VECTOR NUMBER
1
0
Figure 7-40. Take Preinstruction Exception Primitive Format
The take preinstruction exception primitive uses the PC bit as described in 7.4.2
Coprocessor Response Primitive General Format. The vector number field contains
the exception vector number used by the main processor to initiate exception processing.
When the main processor receives this primitive, it acknowledges the coprocessor
exception request by writing an exception acknowledge mask to the control CIR (refer to
7.3.2 Control CIR). The MC68020/EC020 then proceeds with exception processing as
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.