Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In designing an 9-stage instruction-pipelined architecture with forwarding capa-bility, you are asked to consider the effect on CPI from all possible hazards, assuming thatthe ideal

In designing an 9-stage instruction-pipelined architecture with forwarding capa-bility, you are asked to consider the effect on CPI from all possible hazards, assuming thatthe ideal CPI is 1.Structural hazards: NoneData hazards: (without compilers rescheduling)an instruction of typeIAimmediately followed by another instruction of typeIB,and the number of clock cycles stall is 2,an instruction of typeIAimmediately followed by another instruction of typeIC,and the number of clock cycle stall is 1,listed below each is the percentage of occurrence of each combination that will leadto a stall: (an x refers to an instruction of a type other thanIA,IBandICand a represents immediately followed by)(a)IAIB: 10%(b)IA x IB: 5%(c)IAIC: 10%Control hazards: (from branch instructions, disregarding those from jump or subrou-tine call instructions)the target address is calculated (PC + offset) in the 3th stage ,the condition is checked (to determine the next PC) in the 6th stage,an average of 15% of all instructions are branch instructions, among which 70%are taken.(a) (3 pts) What is the increase to CPI from the data hazards?(b) (3 pts) Determine the CPI considering all the hazards, if the pipeline is frozen(stalled) until the next PC is known for sure when executing a branch instruction.(c) (3 pts) Repeat (b), if a assume-taken (CPU assumes all branches are taken) approachis used for branch.(d) (3 pts) Repeat (b), if a assume-not-taken (CPU assumes all branches are not-taken)approach is used for branch.(e) (3 pts) In (b), if, without using the pipeline-freezing hardware, a rescheduling compileris used to find instructions to insert into the branch-delay-slots, how many such slotsdoes a compiler have to try to fill after each branch instruction in order to removeall the branch stalls (like the technique we use to fill the load-delay-slots for datahazards), assuming that a nop will be placed into a slot that can not be filled?(f) (3 pts) Repeat (e), if a assume-taken approach is used for branch.(g) (3 pts) Repeat (e), if a assume-not-taken approach is used for branch.(h) (3 pts) In (e), suppose that 80% of all the data-hazard-delay-slots and 60% of allthe branch-delay-slots can be filled by the compiler. What is the new CPI?(i) (10 pts) If you are forced to use the assume-taken approach, and you are unable tomove the condition-checking operation in the pipeline, determine all the stages thatyou can move the EA calculation operation to so that this approach outperforms theassume-not-taken approach. Show a systematic approach in solving this problem.

image text in transcribed

1. (34 pts) In designing an 9-stage instruction-pipelined architecture with forwarding capa- bility, you are asked to consider the effect on CPI from all possible hazards, assuming that the ideal CPI is 1. Structural hazards: None Data hazards: (without compiler's rescheduling) - an instruction of type I immediately followed by another instruction of type IB, and the number of clock cycles stall is 2, an instruction of type I immediately followed by another instruction of type Ic, and the number of clock cycle stall is 1, listed below each is the percentage of occurrence of each combination that will lead to a stall: (an 'x' refers to an instruction of a type other than IA, IB and Ic and a represents "immediately followed by') (a) IA IB: 10% (b) IB: 5% (c) IA Ic: 10% Control hazards: (from branch instructions, disregarding those from jump or subrou- tine call instructions) the target address is calculated (PC+ offset) in the 3th stage, the condition is checked (to determine the next PC) in the 6th stage, an average of 15% of all instructions are branch instructions, among which 70% are 'taken' (a) (3 pts) What is the increase to CPI from the data hazards? (b) (3 pts) Determine the CPI considering all the hazards, if the pipeline is "frozen" (stalled) until the next PC is known for sure when executing a branch instruction. (c) (3 pts) Repeat (b), if a 'assume-taken' (CPU assumes all branches are taken) approach is used for branch. (a) (3 pts) Repeat (b), if a 'assume-not-taken' (CPU assumes all branches are not-taken) approach is used for branch. (e) (3 pts) In (b), if, without using the pipeline-freezing hardware, a rescheduling compiler is used to find instructions to insert into the 'branch-delay-slots', how many such slots does a compiler have to try to fill after each branch instruction in order to remove all the branch stalls (like the technique we use to fill the 'load-delay-slots' for data hazards), assuming that a nop will be placed into a slot that can not be filled? (f) (3 pts) Repeat (e), if a 'assume-taken' approach is used for branch. (g) (3 pts) Repeat (e), if a 'assume-not-taken' approach is used for branch. (h) (3 pts) In (e), suppose that 80% of all the 'data-hazard-delay-slots' and 60% of all the 'branch-delay-slots' can be filled by the compiler. What is the new CPI? (i) (10 pts) If you are forced to use the "assume-taken' approach, and you are unable to move the condition-checking operation in the pipeline, determine all the stages that you can move the EA calculation operation to so that this approach outperforms the 'assume-not-taken' approach. Show a systematic approach in solving this problem. 1. (34 pts) In designing an 9-stage instruction-pipelined architecture with forwarding capa- bility, you are asked to consider the effect on CPI from all possible hazards, assuming that the ideal CPI is 1. Structural hazards: None Data hazards: (without compiler's rescheduling) - an instruction of type I immediately followed by another instruction of type IB, and the number of clock cycles stall is 2, an instruction of type I immediately followed by another instruction of type Ic, and the number of clock cycle stall is 1, listed below each is the percentage of occurrence of each combination that will lead to a stall: (an 'x' refers to an instruction of a type other than IA, IB and Ic and a represents "immediately followed by') (a) IA IB: 10% (b) IB: 5% (c) IA Ic: 10% Control hazards: (from branch instructions, disregarding those from jump or subrou- tine call instructions) the target address is calculated (PC+ offset) in the 3th stage, the condition is checked (to determine the next PC) in the 6th stage, an average of 15% of all instructions are branch instructions, among which 70% are 'taken' (a) (3 pts) What is the increase to CPI from the data hazards? (b) (3 pts) Determine the CPI considering all the hazards, if the pipeline is "frozen" (stalled) until the next PC is known for sure when executing a branch instruction. (c) (3 pts) Repeat (b), if a 'assume-taken' (CPU assumes all branches are taken) approach is used for branch. (a) (3 pts) Repeat (b), if a 'assume-not-taken' (CPU assumes all branches are not-taken) approach is used for branch. (e) (3 pts) In (b), if, without using the pipeline-freezing hardware, a rescheduling compiler is used to find instructions to insert into the 'branch-delay-slots', how many such slots does a compiler have to try to fill after each branch instruction in order to remove all the branch stalls (like the technique we use to fill the 'load-delay-slots' for data hazards), assuming that a nop will be placed into a slot that can not be filled? (f) (3 pts) Repeat (e), if a 'assume-taken' approach is used for branch. (g) (3 pts) Repeat (e), if a 'assume-not-taken' approach is used for branch. (h) (3 pts) In (e), suppose that 80% of all the 'data-hazard-delay-slots' and 60% of all the 'branch-delay-slots' can be filled by the compiler. What is the new CPI? (i) (10 pts) If you are forced to use the "assume-taken' approach, and you are unable to move the condition-checking operation in the pipeline, determine all the stages that you can move the EA calculation operation to so that this approach outperforms the 'assume-not-taken' approach. Show a systematic approach in solving this

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

Financial Accounting A User Perspective

Authors: Robert E. Hoskin, Maureen R. Fizzell, Donald C. Cherry

4th Canadian Edition

0470834455, 978-0470834459

More Books

Students also viewed these Accounting questions

Question

How do patients across cultures prefer to make medical decisions?

Answered: 1 week ago