Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a pipelining problem from computer architecture class. Question 3 Pipelining a. (5 marks) Assume you have N items to process. If you can

This is a pipelining problem from computer architecture class.image text in transcribed

Question 3 Pipelining a. (5 marks) Assume you have N items to process. If you can pipeline the processing into P steps (perfectly balancing the pipeline), what speedup is achieved? Explain all the steps used to arrive at your answer. b. (5 marks) Consider the following RISCV code add x5,x2,x1 lw x3,4(x5) lw x2,0(x2) or x3,x5,x3 sw x3,0(x5) Rewrite this instruction sequence, inserting nop instructions, so it is free from hazards You should assume standard 5-stage pipeline (instruction fetch, instruction decode / register fetch, execute, memory, write-back) with no forwarding or hazard detection. If registers are read in the same cycle in which they are written, the new value is returned. Draw a pipeline diagram to illustrate the correctness of your answer. c. (5 marks) Using a figure, explain how the_hazard between the "or" and "sw" instructions could be resolved by forwarding, d. (5 marks) Explain in detail, the problem solved by the "speculate and kill" scheme in a pipelined processor. (5 marks) Explain the concept of a write-after-read hazard. How can they be resolved without affecting performance in an out-of-order processor? e. Question 3 Pipelining a. (5 marks) Assume you have N items to process. If you can pipeline the processing into P steps (perfectly balancing the pipeline), what speedup is achieved? Explain all the steps used to arrive at your answer. b. (5 marks) Consider the following RISCV code add x5,x2,x1 lw x3,4(x5) lw x2,0(x2) or x3,x5,x3 sw x3,0(x5) Rewrite this instruction sequence, inserting nop instructions, so it is free from hazards You should assume standard 5-stage pipeline (instruction fetch, instruction decode / register fetch, execute, memory, write-back) with no forwarding or hazard detection. If registers are read in the same cycle in which they are written, the new value is returned. Draw a pipeline diagram to illustrate the correctness of your answer. c. (5 marks) Using a figure, explain how the_hazard between the "or" and "sw" instructions could be resolved by forwarding, d. (5 marks) Explain in detail, the problem solved by the "speculate and kill" scheme in a pipelined processor. (5 marks) Explain the concept of a write-after-read hazard. How can they be resolved without affecting performance in an out-of-order processor? e

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

Recommended Textbook for

Students also viewed these Databases questions

Question

Is anything missing? Ideas, data, evidence, detail, and so on?

Answered: 1 week ago

Question

Discuss the states of accounting

Answered: 1 week ago

Question

1. Which position would you take?

Answered: 1 week ago