7- 22
M68020 USER’S MANUAL
MOTOROLA
7.2.3.3.2 Protocol. Figure 7-16 shows the protocol for the coprocessor context save
instruction. The main processor initiates execution of the cpSAVE instruction by reading
the save CIR. Thus, the cpSAVE instruction is the only coprocessor instruction that begins
by reading from a CIR. All other coprocessor instructions write to a CIR to initiate
execution of the instruction by the coprocessor. The coprocessor communicates status
information associated with the context save operation to the main processor by placing
coprocessor format codes in the save CIR.
M1
RECOGNIZE COPROCESSOR INSTRUCTION F-LINE
OPERATION WORD
M2
READ SAVE CIR TO INITIATE THE cpSAVE INSTRUCTION
M3
IF (FORMAT = NOT READY) DO STEPS 1) AND 2) BELOW
1) SERVICE PENDING INTERRUPTS
2) GO TO M2
M4
EVALUATE EFFECTIVE ADDRESS SPECIFIED IN
F-LINE OPWORD AND STORE FORMAT WORD AT
EFFECTIVE ADDRESS
M5
IF (FORMAT = EMPTY) GO TO M6 ELSE, TRANSFER
NUMBER OF BYTES INDICATED IN FORMAT WORD
FROM OPERAND CIR TO EFFECTIVE ADDRESS
M6
PROCEED WITH EXECUTION OF NEXT INSTRUCTION
MAIN PROCESSOR
COPROCESSOR
Figure 7-16. Coprocessor Context Save Instruction Protocol
If the coprocessor is not ready to suspend its current operation when the main processor
reads the save CIR, it returns a not-ready format code. The main processor services any
pending interrupts and then reads the save CIR again. After placing the not-ready format
code in the save CIR, the coprocessor should either suspend or complete the instruction it
is currently executing.
Once the coprocessor has suspended or completed the instruction it is executing, it places
a format code representing the internal coprocessor state in the save CIR. When the main
processor reads the save CIR, it transfers the format word to the effective address
specified in the cpSAVE instruction. The lower byte of the coprocessor format word
specifies the number of bytes of state information, not including the format word and
associated null word, to be transferred from the coprocessor to the effective address
specified. If the state information is not a multiple of four bytes in size, the
MC68020/EC020 initiates format error exception processing (refer to 7.5.1.5 Format
Errors). The coprocessor and main processor coordinate the transfer of the internal state
of the coprocessor using the operand CIR. The MC68020/EC020 completes the
coprocessor context save by repeatedly reading the operand CIR and writing the
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
..
.