Directions: Let’s look at how pipelined execute can be affected by resource hazards, control hazards and instruction...

80.2K

Verified Solution

Question

Electrical Engineering

Directions: Let’s look at how pipelined executecan be affected by resource hazards, control hazards andinstruction set architecture. Looking at the following fragment ofcode:
ADD X5, X2, x1
LDUR X3, [X5, #4]
LDUR X2, [X2, #0]
ORR X3, X5, X3
STUR X3 [X5, #0]

Assume that all of the branches are perfectly predicted as thiseliminates all potential control hazards and that no delay slotswill be needed. If we only have one memory for both theinstructions and data, there is a structural hazard every time thatwe need to fetch an instruction in the same cycle which anotherinstruction accesses data. To guarantee that we have forwardprogress, this structural hazard has to be resolved by giving thefavor to the instruction that accesses data.

What would be the total execution time of the sequence in the5-stage pipeline that only has one memory? Explain your answer.

Assume now that all the branches are perfectly predicted as thiseliminates all potential control hazards and that no delay slotswill be needed. If we change the load/store instructions to use aregister without an offset as the addresses, the instructions wouldno longer need to use the ALU. As a result, the MEM and EX stagescan be overlapped and the pipeline would only now have 4stages.

Change the code to accommodate the changed ISA. What is thespeedup achieved in this instruction sequence? Explain youranswer.

Show a pipeline execution diagram for these series ofinstructions (both initial and end) result.

Please answer the questions accordingly there are three ofthem.

Please make copy paste available

Answer & Explanation Solved by verified expert
4.0 Ratings (685 Votes)
    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students