Timing Example 2: Branch Instructions - Motorola CPU32 Reference Manual

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

8.2.2 Timing Example 2: Branch Instructions

Example 2 shows what happens when a branch instruction is executed, in both the
taken and not-taken cases. (Refer to Figures 8-5 and 8-6). The instruction stream is
for a simple limit check with the variable already in a data register.
1
2
CLOCK
1 PRE-
BUS
FETCH
CONTROLLER
INSTRUCTION
MOVEQ
CONTROLLER
EXECUTION
MOVEQ
TIME
#7,D1
CLOCK
BUS
CONTROLLER
INSTRUCTION
CONTROLLER
EXECUTION
TIME
MOTOROLA
8-8
Instructions
MOVEQ#7, D1
CMP.LD1, D0
BLE.BNEXT
MOVE.LD1, (A0)
3
4
5
6
7
PRE-
2 PRE-
FETCH
FETCH
OFFSET
CMP
TAKEN
CALC
CMP
BLE.B NOT TAKEN
D1,D0
Figure 8-5 Example 2 — Branch Taken
1
2
3
4
5
1 PRE-
2 PRE-
FETCH
FETCH
OFFSET
MOVEQ
CMP
CALC
MOVEQ
CMP
BLE.B NOT TAKEN
#7,D1
D1,D0
Figure 8-6 Example 2 — Branch Not Taken
INSTRUCTION EXECUTION TIMING
8
9
0
1
2
PRE-
PRE-
FETCH
FETCH
TAKEN
TAKEN
6
7
8
9
0
3 PRE-
4 PRE-
FETCH
FETCH
NOT
MOVE TO
(A0)
TAKEN
MOVE.L D1,(AO)
3
4
WRITE
FOR 3
NEXT
INST.
1
2
3
4
WRITE
WRITE
FOR 4
FOR 4
REFERENCE MANUAL
CPU32

Advertisement

Table of Contents
loading

Table of Contents