Due date: On or before Monday, April 22, 2024 Absolutely no copying others’ works |
Name: _____Professor Hu_____ |
R-type | I-type (non-lw ) |
Load | Store | Branch | Jump |
---|---|---|---|---|---|
15% | 30% | 25% | 10% | 15% | 5% |
|
|
0001 0000 0010 0011 0000 0000 0000 1100 = 000100 00001 00011 0000000000001100 = opcode rs rt offset = beq rs, rt, label = beq $1, $3, 12Check the Appendix A.10 of the textbook to find out what this instruction is. Assume that data memory is all zeros and that the processor’s registers have the following values at the beginning of the cycle in which the above instruction word is fetched:
$0 |
$1 |
$2 |
$3 |
$4 |
$5 |
$6 |
$8 |
$12 |
$31 |
---|---|---|---|---|---|---|---|---|---|
0 | 10 | -5 | 8 | -1 | 20 | 4 | -4 | 15 | -10 |
PCSrc
) ⇒ PC
(because $1
!= $3
)
$1
== $3
, then there are two paths as follows:
J
) ⇒ Mux (PCSrc
) ⇒ PC
ALUSrc
) ⇒ ALU ⇒ Mux (PCSrc
) ⇒ PC
addr
, is Mem[addr]
.
RegDst
):
ALUSrc
):
MemtoReg
):
J
) (30 bits):
PCSrc
) (30 bits):
|
|