Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following MIPS program: ADDI R1, R0, #1 SW R1, 2000 (R0) LOOP: LW R1, 2000 (R0) MULT R2, R1, #4 ADDI R3, R2,

image text in transcribed

Consider the following MIPS program: ADDI R1, R0, #1 SW R1, 2000 (R0) LOOP: LW R1, 2000 (R0) MULT R2, R1, #4 ADDI R3, R2, #5000 LW R4, 0 (R3) LW R5, 1500 (R0) ADD R6, R4, R5 LW R1, 2000 (R0) MULT R2, R1, #4 ADDI R1, R1, #1 SW R6, 0(R7) SW R1, 2000 (R0) ADDI R1, R1, #1 SW R1, 2000 (R0) ADDI R1, R1, #1 LW R1, 2000 (R0) ADDI R8, R1, #-101 BNEZ R8, LOOP a) What is the value of IC for this program? b) What is the fraction of ALU instructions? c) What is the fraction of Loads/Store instructions? d) What is the fraction of Branch instructions? e) Assume ALU, Loads/Stores, and Branch instructions require one, two, and three clock cycles respectively. Find CPI. f Assuming the previous parts and 2 ns clock cycles, what is the execution time of this program? Write a MIPS code that would switch the values of registers R1 and R2. Your code SHOULD NOT use Loads/Stores. Your code SHOULD use the MIPS syntax explained in class. Consider the following MIPS program: ADDI R1, R0, #1 SW R1, 2000 (R0) LOOP: LW R1, 2000 (R0) MULT R2, R1, #4 ADDI R3, R2, #5000 LW R4, 0 (R3) LW R5, 1500 (R0) ADD R6, R4, R5 LW R1, 2000 (R0) MULT R2, R1, #4 ADDI R1, R1, #1 SW R6, 0(R7) SW R1, 2000 (R0) ADDI R1, R1, #1 SW R1, 2000 (R0) ADDI R1, R1, #1 LW R1, 2000 (R0) ADDI R8, R1, #-101 BNEZ R8, LOOP a) What is the value of IC for this program? b) What is the fraction of ALU instructions? c) What is the fraction of Loads/Store instructions? d) What is the fraction of Branch instructions? e) Assume ALU, Loads/Stores, and Branch instructions require one, two, and three clock cycles respectively. Find CPI. f Assuming the previous parts and 2 ns clock cycles, what is the execution time of this program? Write a MIPS code that would switch the values of registers R1 and R2. Your code SHOULD NOT use Loads/Stores. Your code SHOULD use the MIPS syntax explained in class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

List the benefits of the application of HR analytics.

Answered: 1 week ago

Question

6. Testing equipment that will be used in instruction.

Answered: 1 week ago