Question: Questions 1 4 are based on the pipelined MIPS processor, which is running the following program. For each question the answer must be a comma-separated
Questions 1 4 are based on the pipelined MIPS processor, which is running the following program. For each question the answer must be a comma-separated list of register names. For example if the answer to question 1 is registers $t0 and $t1, then the answer for that question must be written on a single line as
1. $t0, $t1
If there is only register for the answer, just write only the specific register name in the answer. The program / code segment is:
add $s0, $t0, $t1
sub $s1, $t2, $t3
and $s2, $s0, $s1
or $s3, $t4, $t5
slt $s4, $s2, $s3
(1) Which registers are being written on the fifth cycle?
(2) Which registers are being written on the sixth cycle?
(3) Which registers are being read on the fifth cycle?
(4) Which registers are being read on the sixth cycle?
Questions 5 6 are based on the code segment below.
add $t0, $s0, $s1
lw $t1, 60($s2)
sub $t2, $t0, $s3
and $t3, $t1, $t0
(5) How many clock cycles does it take to execute this code segment? Write your answer as a decimal integer.
(6) What is the CPI of this code segment? Write your answer as a real number rounded to the second place of decimal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
