Menu

6question 6 Use Following Architecture Questions 6 9 Given 3 Wide Order Processor Draw Opt Q43803376

6.Question 6

Use the following architecture for questions6-9:

Given a 3-wide in-order processor, draw theoptimal pipeline diagram and answer question 6-9, showing for eachinstruction, what stage of the pipeline it is in for each cycle forthe execution of the code sequence below. Assume full bypassing ofvalues from the respective instruction completion stage to theDecode stage. Assume that pipeline X can execute branches and ALUoperations, pipeline Y can excute loads, stores, and ALUoperations, and pipeline Z can execute loads, stores, and ALUoperations. Loads have a latency of two cycles and ALU operationshave a latency of one cycle. Branches are resolved in X0 and themachine has no branch delay slots and always predicts thefallthrough path. The machine can fetch three instructions percycle, decode three instructions per cycle, execute threeinstructions per cycle, and writeback three instructions per cyclebut maintains data dependencies. The operand steering logic cansteer any operand to any ALU to enable any instruction to reach anypipeline, but the pipelines have restrictions on what instructionseach can execute as described above. Assume that there areno alignment restrictions on instructions whichcan be simultaneously fetched from the instruction memory. Also,assume that instructions stall in the decode stage if there arestructural or data hazards and stalling one pipeline does notinhibit the fetching of future instructions. The figure below showsthe pipeline with pipeline stage names underlined.

F Branch Cond. 31 RO PC addr rdata Instr. Cache RF Operand LA Steering LALU addr rdata Read RF Write Lz0ache z1 Data Cache ad

Code sequence for questions 6-9:

e: ADDIU R6, R7, 1 1: SUBIU R9, R10, 2 2: LW R11, 0(R12) 3: LW R13, (R14) 4: ADD R14, R11, R15 5: SUB R16, R17, R18 6: ANDR19

Which instructions stall due to data hazard?Check all that apply

a) 4: ADD R14, R11, R15

b) 7: LW R22, 4(R19)

c) 8: LW R24, 8(R19)

d) 10: LW R26, 16(R19)

e) 11: OR R11, R26, R18

f) 13: ADDIU R16, R17, 3

7.Question 7

Which instructions stall due to structuralhazard? Select all that apply

a) 4: ADD R14, R11, R15

b) 7: LW R22, 4(R19)

c) 9: LW R25, 12(R19)

d) 11: OR R11, R26, R18

e) 12: AND R13, R17, R29

Q8

Which instructions stall in the fetch stage?Select all that apply

a) 6: AND R19, R20, R21

b) 7: LW R22, 4(R19

c) 11: OR R11, R26, R18

d) 12: AND R13, R17, R29

e) 13: ADDIU R16, R17, 3

Q9

Which instructions stall in the decode stage?Select all that apply

a) 4: ADD R14, R11, R15

b) 6: AND R19, R20, R21

c) 7: LW R22, 4(R19)

d) 9: LW R25, 12(R19)

e) 10: LW R26, 16(R19)

f) 11: OR R11, R26, R18

F Branch Cond. 31 RO PC addr rdata Instr. Cache RF Operand LA Steering LALU addr rdata Read RF Write Lz0ache z1 Data Cache addr rdata + Data Cache e: ADDIU R6, R7, 1 1: SUBIU R9, R10, 2 2: LW R11, 0(R12) 3: LW R13, (R14) 4: ADD R14, R11, R15 5: SUB R16, R17, R18 6: ANDR19, R20, R21 7: LW R22, 4(R19) 8: LW R24, 8(R19) 9: LW R25, 12(R19) 10: LW R26, 16(R19) 11: ORR11, R26, R18 12: AND R13, R17, R29 13: ADDIU R16, R17, 3 Show transcribed image text F Branch Cond. 31 RO PC addr rdata Instr. Cache RF Operand LA Steering LALU addr rdata Read RF Write Lz0ache z1 Data Cache addr rdata + Data Cache
e: ADDIU R6, R7, 1 1: SUBIU R9, R10, 2 2: LW R11, 0(R12) 3: LW R13, (R14) 4: ADD R14, R11, R15 5: SUB R16, R17, R18 6: ANDR19, R20, R21 7: LW R22, 4(R19) 8: LW R24, 8(R19) 9: LW R25, 12(R19) 10: LW R26, 16(R19) 11: ORR11, R26, R18 12: AND R13, R17, R29 13: ADDIU R16, R17, 3

Expert Answer


Answer to 6.Question 6 Use the following architecture for questions 6-9: Given a 3-wide in-order processor, draw the optimal pipel…

OR