04. (18 points) a. For each MIPS instruction below, please show what type each i
ID: 3595983 • Letter: 0
Question
04. (18 points) a. For each MIPS instruction below, please show what type each instruction is (R-type, or I-type, or J-type), the value of the opcode (OP), source register (RS), and target register (RT) fields. For the I-type instructions, please show the value of the immediate field, and for the R-type instructions, please show the value of the destination register (RD) field. Please use reference materials at the very end if needed. (12 points) Instruction Type Opcode rs rd immediate rt addi $to, $s6, 4 add $t1, $s6, $0 sw $tl, 0 ( Sto) b. Please pick any one instruction above, and show the encoded binary representation of the instruction (eiven the table above, you can just show the binary instruction directly.) (6 points) Q5. Assume we have two processors, Pl and P2. P1 has a clock rate of 4 GHz, and P2 has a clock rate of 3 GHz. P1 takes 4.0E9 instructions and an average CPI of 0.8 for executing a program. P2 takes 2.4E9 instructions and an average CPI of 0.9 for executing the same program. Which processor is faster for executing this program? (6 points) 06. (12 points) Assume a program requires the execution of 50E6 instructions of class A, 110E6 instructions of class B, 80E6 instructions of class C, and 16E6 instructions of class D. The CPI for class A, B, C, and D is 1, 1, 4, and 2, respectively. Assume that the processor has a 1GHz clock rate. a. Is it possible to improve the CPI of class A instructions so that we can run the program two times faster? If possible, by how much must we improve the CPI of class A instructions? b. Is it possible to improve the CPI of class C instructions so that we can run the program two times faster? If possible, by how much must we improve the CPI of class C instructions?Explanation / Answer
Solution:
Multiple questions ask, please ask them as separate.
Q 5.)
We will calculate the Average execution time and then compare both P1 and P2,
for P1
Execution time= Instruction count * CPI /clock rate
= (4 * 10^9) * 08 / (4 * 10^9)= 0.8 seconds
for P2
Execution time= (3 * 10^9) * 0.9 / (2.4 * 10^9)
= 1.125 seconds
We can see that processor P1 is faster here.
Please, please upvote and ask your doubts in the comments.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.