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
Execution Status
(instruction cycle)
Instruction fetch
Branch address read S
J
Stack operation
Byte data access
Word data access
Internal operation
Access Location
On-Chip Memory On-Chip Reg. Field External Memory
S
I
6
6 + 2m
S
K
S
L
S
M
S
N
2
3
6
2
3 + m
6 + 2m
Notes: 1. m: Number of wait states inserted in access to external device.
2. The byte data access cycle to an external device by the MOVFPE and MOVTPE
instructions requires 9 to 16 states since it is synchronized with the E clock. See
section 15, "E-Clock Interface" for timing details.
298