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 r1, #65 R1 = 00000000 01000001
18 4 // mov r2, #4 R2 = 00000000 00000100
26 24 // mov r3, #24 R3 = 00000000 00011000
34 2 // mov r4, #2 R4 = 00000000 00000010
42 8 // mov r5, #8 R5 = 00000000 00001000
58 3 // mov r7, #3 R7 = 00000000 00000011
0 0 // nop
0 0 // nop
0 0 // nop
0 0 // nop
0 0 // nop
8 19 // add r1,r2,r3 (R1=R2+R3)
R1 := 00000000 00011100
|