Question: If the loop exits after executing only two iterations, draw a pipeline diagram for your MIPS code from 4.28.1 executed on a 2-issue processor shown

If the loop exits after executing only two iterations, draw a pipeline diagram for your MIPS code from 4.28.1 executed on a 2-issue processor shown in Figure 4.69. Assume the processor has perfect branch prediction and can fetch any two instructions (not just consecutive instructions) in the same cycle.80000180 Instruction memory ++ Sign extend Registers Sign- extendi x x ALU ALU Write data Data memory Address

Exercise 4.28.1

Translate this C code into MIPS instructions. Your translation should be direct, without rearranging instructions to achieve better performance.


In this exercise we compare the performance of 1-issue and 2-issue processors, taking into account program transformations that can be made to optimize for 2-issue execution. Problems in this exercise refer to the following loop (written in C):a. for(i=0;i!-j;i+=2) a[i+1]=a[i]; b. for(i=0; i-j;i+=2) b[i]-a[i]-a[i+1]; C Code

When writing MIPS code, assume that variables are kept in registers as follows, and that all registers except those indicated as Free are used to keep various variables, so they cannot be used for anything else.a. b. R2 R5 J R8 R6 a R9 R1 b R10 R2 R11 R3 Free R3, R4, R5 R10,R11,R12

80000180 Instruction memory ++ Sign extend Registers Sign- extendi x x ALU ALU Write data Data memory Address

Step by Step Solution

3.47 Rating (183 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

MIPS code for the g... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Organization Design Questions!