We now examine in detail how the basic pipeline CPU execute the 3 different types of instructions.
Dest Reg OpCode I Src Reg1 Src Reg2
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
= 8 (= first 8 bits in decimal repr) 19 (= second 8 bits in decimal repr)
|
We also use the Destination register number to fetch a register - will be explained later when we discuss the STORE instruction.
|
The data in the registers are simply passed to the next stage (= WB stage).
|
|
|
Executes the following instructions:
10 65 // mov 65,R1 R1 = 00000000 01000001
18 4 // mov 4,R2 R2 = 00000000 00000100
26 24 // mov 24,R3 R3 = 00000000 00011000
34 2 // mov 2,R4 R4 = 00000000 00000010
42 8 // mov 8,R5 R5 = 00000000 00001000
58 3 // mov 3,R7 R7 = 00000000 00000011
0 0 // nop
0 0 // nop
0 0 // nop
0 0 // nop
0 0 // nop
8 19 // add R2, R3, R1 (R1=R2+R3)
R1 := 00000000 00011100
|