1. Describe what happens with the following instruction executes: a. J Loop b. L
ID: 3872927 • Letter: 1
Question
1. Describe what happens with the following instruction executes:
a. J Loop
b. LUI $t0, 0xffff
2. Diagram the “stair step” instruction execution for the following instructions. Assume no forwarding:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LW $t0, 0($s1)
IF
ID
EX
MEM
WB
ADDI $t3, $t0, 1
SUB $t2, $t4, $t5
SW $t3, 0($s1)
3. Diagram the “stair step” instruction execution for the same instructions, but this time, assume forwarding
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LW $t0, 0($s1)
IF
ID
EX
MEM
WB
ADDI $t3, $t0, 1
SUB $t2, $t4, $t5
SW $t3, 0($s1)
4. What is the percent speedup of the execution in problem 3 compared with problem 2?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LW $t0, 0($s1)
IF
ID
EX
MEM
WB
ADDI $t3, $t0, 1
SUB $t2, $t4, $t5
SW $t3, 0($s1)
Explanation / Answer
1.
a) J Loop
j is used to Jump to an address in our case address to label named "Loop"
The new address = upper 4 bits of the PC+26 bit immediate value+ 00
b)
LUI $t0, 0xffff
lui( "load upper immediate".)
$t0's lower 16 bits with 0's and upper 16 bits with the 16 bit immediate.
so $t0=0xffff0000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.