
30
CHAPTER 3 CPU
Figure 3.2-2 Instruction Pipeline
Instructions are executed sequentially. For example, if instruction A enters the pipeline before
instruction B, instruction A reaches the write back stage before instruction B.
As a rule, instructions are executed at a speed of one instruction per cycle. However, load and
store instructions that involve memory wait, branch instructions that do not have delay slots, and
multiple cycle instructions will require several cycles to execute. In addition, if the supply of
instructions is delayed, the execution speed of the instructions will be reduced.
See Section
3.9 "Overview of Instructions" for details on instructions.
r Instruction cache
The on-chip instruction cache can be used to create a high-performance system without having
high-speed external memory and without incurring high costs for control logic.
Even if the
external bus is slow, instructions can be issued to the CPU at high speed.
See Section
3.3 "Instruction Cache" for details on the instruction cache.
r 32-bit <-- --> 16-bit bus converter
This converter acts as interface between the D-BUS for high-speed 32-bit access and the R-
BUS for 16-bit access and enables the accesses from the CPU to the built-in circuits for
peripherals.
The converter converts 32-bit accesses from the CPU into two 16-bit accesses and performs
the access over the R-BUS. Some of the built-in circuits for peripherals are limited with respect
to their access width.
r Harvard <-- --> Princeton bus converter
The Harvard <-- --> Princeton bus converter adjusts CPU instruction access and data access to
ensure efficient interfacing with the external bus.
The CPU employs Harvard architecture, in which the instruction and data buses are
independent. The bus controller that controls the external bus employs Princeton architecture,
in which opnly a single bus is used. The Harvard <-- --> Princeton bus converter assigns an
access priority for instruction access and data access to control access to the bus controller,
thereby optimizing the order of external access.
Moreover, the bus converter has a two-word write buffer to eliminate the CPU bus wait time and
a one-word prefetch buffer to prefetch instructions.
Instruction 1
WB
MA
WB
EX
MA
WB
ID
EX
MA
WB
IF
ID
EX
MA
WB
IF
ID
EX
MA
WB
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Instruction 6
CLK