Principles of Computer Architecture – Spring 2023 Homework 4
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Principles of Computer Architecture – Spring 2023
Homework 4
1. A signal from the control block namely bne is taken and the zero output from the ALU is passed through a not gate is taken as an input to an and gate and the result is passed as an input to an or gate. The other input will be the already exisHng add gate with input as the branch signal and the zero from the ALU . This is passed on as the control signal of the Mux. In summary the branch mux select line has the following logic: mux_sel = (Branch & Zero) | (BranchNotEqual & !Zero).
2.
|
RegDst |
ALUOp |
ALUSrc |
Branch |
MemRead |
MemWrite |
RegWrite |
add $t0, $t1, $t2 |
1 |
10 |
0 |
0 |
0 |
0 |
1 |
lw $t0, 8($s1) |
0 |
00 |
1 |
0 |
1 |
0 |
1 |
sw $t1, 12($s2) |
X |
00 |
1 |
0 |
0 |
1 |
0 |
beq $t0, $t1, LABEL |
X |
01 |
0 |
1 |
0 |
0 |
0 |
3. No new blocks are needed to add to support execuHon of the instrucHon.
4. No new control signals are needed from the control unit to support the instrucHon.
5.
|
RegDst |
ALUOp |
ALUSrc |
Branch |
MemRead |
MemWrite |
RegWrite |
lwr |
1
|
00
|
0
|
0
|
1
|
0
|
1
|
6. Processor P2 has the highest performance expressed in IPS.
P1: 2 * 109
P2: 2.5 * 109
P3: 1.82 * 109
7. Number of cycles : 30*109
Number of Instruc8ons : 20 *109
8. Clock rate : 5.14GHz
2023-04-04