![](http://datasheet.mmic.net.cn/180000/V850E1_datasheet_11383765/V850E1_166.png)
166
User’s Manual U14559EJ3V1UM
CHAPTER 8 PIPELINE
The V850E1 CPU is based on RISC architecture and executes almost all instructions in one clock cycle under
control of a 5-stage pipeline. The instruction execution sequence usually consists of five stages from fetch (IF) to
writeback (WB). The execution time of each stage differs depending on the type of the instruction and the type of the
memory to be accessed. As an example of pipeline operation, Figure 8-1 shows the processing of the CPU when 9
standard instructions are executed in succession.
Figure 8-1. Example of Executing Nine Standard Instructions
IF
ID
EX
MEM
WB
<1>
<2>
<3>
<4>
<5>
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
<6>
<7>
<8>
<9>
<10>
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
IF
ID
EX
MEM
WB
<11> <12> <13>
Instruction 1
......................................
............................
......
.................
.................................................
............................................................
......................................................................
.................................................................................
...........................................................................................
Processing CPU performs
simultaneously
Internal system clock
Time flow (state)
Instruction executed every 1 clock cycle
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Instruction 6
Instruction 7
Instruction 8
Instruction 9
End of
instruc-
tion 1
End of
instruc-
tion 9
End of
instruc-
tion 8
End of
instruc-
tion 7
End of
instruc-
tion 6
End of
instruc-
tion 5
End of
instruc-
tion 4
End of
instruc-
tion 3
End of
instruc-
tion 2
IF (instruction fetch):
Instruction is fetched and fetch pointer is incremented.
ID (instruction decode):
Instruction is decoded, immediate data is generated, and register is read.
EX (execution of ALU, multiplier, and barrel shifter):
Decoded instruction is executed.
MEM (memory access):
Memory at specified address is accessed.
WB (writeback):
Result of execution is written to register.
<1> through <13> in the figure above indicate the states of the CPU. In each state, writeback (WB) of instruction n,
memory access (MEM) of instruction n+1, execution (EX) of instruction n+2, decoding (ID) of instruction n+3, and
fetching (IF) of instruction n+4 are simultaneously performed.
It takes five clock cycles to process a standard
instruction, from the IF stage to the WB stage.
Because five instructions can be processed at the same time,
however, a standard instruction can be executed in 1 clock on average.