Hardware manual

Rev. 3.0, 09/98, page 307 of 361
A.3 Number of States Required for Execution
The tables below can be used to calculate the number of states required for instruction execution.
Table A.3 indicates the number of states required for each cycle (instruction fetch, branch address
read, stack operation, byte data access, word data access, internal operation). Table A.4 indicates
the number of cycles of each type occurring in each instruction. The total number of states
required for execution of an instruction can be calculated from these two tables as follows:
Execution states = I × S
I
+ J × S
J
+ K × S
K
+ L × S
L
+ M × S
M
+ N × S
N
Examples: Mode 1 (on-chip ROM disabled), stack located in external memory, 1 wait state
inserted in external memory access.
1. BSET #0, @FFC7
From table A.4: I = L = 2, J = K = M = N= 0
From table A.3: S
I
= 8, S
L
= 3
Number of states required for execution: 2 × 8 + 2 × 3 =22
2. JSR @@30
From table A.4: I = 2, J = K = 1, L = M = N = 0
From table A.3: S
I
= S
J
= S
K
= 8
Number of states required for execution: 2 × 8 + 1 × 8 + 1 × 8 = 32
Table A.3 Number of States Taken by Each Cycle in Instruction Execution
Access Location
Execution Status
(instruction cycle)
On-chip Memory On-chip Reg. Field External Memory
Instruction fetch S
I
Branch address read S
J
Stack operation S
K
66 + 2m
Byte data access S
L
33 + m
Word data access S
M
2
66 + 2m
Internal operation S
N
1
Notes: m: Number of wait states inserted in access to external device.