Draw a pipeline diagram showing the out-of-order execution

Assignment Help Computer Engineering
Reference no: EM131006298

Question 1. Pipeline Stages

Consider a five stage pipelined (fetch, decode, execute, memory, write back) processor.

Pipline Stage

Latency of each stage (ps)

Fetch (F0, F1)

240

Decode (D)

320

Execute (X0, X1, X2)

280

Memory (M)

400

Write Back (W)

200

Processor

Cycle

Time

Max Clock

Frequency

Latency of

Instruction

 

Throughput

a) Baseline

 

 

 

 

b) Faster memory

 

 

 

 

c) Proposed scheme

 

 

 

 

Question 1.A Baseline

Fill out the first row in the table above for the given pipelined processor. Cycle time is the clock period at which this machine can run. Max clock frequency is the maximum frequency clock that can be run given the cycle time (lower frequencies are possible). Latency of instruction is the time it takes to get the first output after it starts. Throughput is the rate at which output is produced.

Question 1.B Faster Memory

Suppose there is an optimization that reduces the Memory stage latency by 100 ps. However, the optimization in memory stage results in 100ps increase in the Write back stage latency. How much would this improve the overall performance of the 8-stage pipeline? Fill out the second row in the table above for this new pipeline.

Question 1.C Proposed Scheme

If you had the option to rearrange the pipeline, how would your arrange the pipeline to achieve maximum frequency?

Question 2. Datapath Bypassing

In this problem we will be investigating the implications of using a two-cycle pipelined integer ALU. Our new pipelined processor will have the following six stages:
• F - instruction fetch
• D - decode and read registers
• X0 - first half of the ALU operation
• X1 - second half of the ALU operation
• M - data memory read/write
• W - write registers

The figure on the next page shows the datapath of the new six-stage datapath. Notice that this datapath currently does not allow any data bypassing. Also notice that conditional branches are resolved by the end of the X1 stage. Assume that this instruction set does not include a branch delay slot.

1 add r3, r1, r2
2 xor r7, r3, r4
3 and r5, r2, r3
4 xor r8, r8, r8
5 add r8, r7, r3
6 sw r5, 400(r3)

Question 2.A Implementing Bypassing

Modify the figure on the next page to implement the di↵erent types of bypassing.

Question 2.B Stalling

For the above assembly code, draw a pipeline diagram using stalls to resolve any data de- pendencies that you find.

Question 2.C Bypassing

For the above assembly code, draw a pipeline diagram using whichever bypass you think is valid for that case. Indicate which type of bypass you have used for each case.

144_Pipeline.jpg

Question 3. Pipelining and Hazzards

Consider the MIPS assembly code given below. We want to run this code on a 5-stage pipelined processor, with some modifications. The processor is a typical 5-stage pipeline (F-D-X-M-W), with the following exceptions:

• The multiplier block used to execute the mul instruction is pipelined into three stages as shown:

2372_Pipeline1.jpg

This means that a multiply instruction runs through the pipeline as follows: F-D-X0- X1-X2-M-W and up to three multiply instructions maybe in-flight at a time. All other instruction types are blocked from the execute stage while any of the multiply stages are being used.

• The divider block used to execute the div instruction is iterative and takes five cycles as shown:

305_Pipeline2.jpg

This means that a divide instruction runs through the pipeline as follows: F-D-X0- X0-X0-X0-X0-M-W. All other instructions are blocked from the execute stage while a division is being done.

1 xor r0, r1, r1
2 addiu r1, r0, 16
3 j L1
4 loop: lw r3, 0(r2)
5 mul r4, r3, r3
6 div r3, r4, r3
7 mul r3, r3, r1
8 mul r3, r3, r0
9 addiu r0, r0, 2
10 sw r3, 0(r2)
11 addiu r2, r2, 4
12 L1: bne r0, r1, -9

Question 3.A Structural Hazards

Draw a pipeline diagram showing the execution of the MIPS code through the first iteration of the loop, without bypassing. Assume data hazards and structural hazards are resolved using only stalling. Assume the processor assumes branches are not taken, until they are resolved. What is the CPI of the entire program?

Question 3.B Data Hazards

Draw a pipeline diagram similar to Part A, but now assume the processor has data bypassing. What is the CPI of the entire program?

Question 3.C Control Hazards

Will the assembly code shown above lead to control hazards? If yes, Where does it occur and how can it be solved?

Question 4. Out-of-Order Execution

This question is based on the same pipeline and code as question 3.

Consider the MIPS assembly code given below. We want to run this code on a 5-stage pipelined processor, with some modifications. The processor is a typical 5-stage pipeline (F-D-X-M-W), with the following exceptions:

• The multiplier block used to execute the mul instruction is pipelined into three stages as shown:

864_Pipeline3.jpg

This means that a multiply instruction runs through the pipeline as follows: F-D-X0- X1-X2-M-W and up to three multiply instructions maybe in-flight at a time. All other instruction types are blocked from the execute stage while any of the multiply stages are being used.

• The divider block used to execute the div instruction is iterative and takes five cycles as shown:

884_Pipeline4.jpg

This means that a divide instruction runs through the pipeline as follows: F-D-X0- X0-X0-X0-X0-M-W. All other instructions are blocked from the execute stage while a division is being done.

• This processor supports out of order execution.
1 xor r0, r1, r1
2 addiu r1, r0, 16
3 j L1
4 loop: lw r3, 0(r2)
5 mul r4, r3, r3
6 div r3, r4, r3
7 mul r3, r3, r1
8 mul r3, r3, r0
9 addiu r0, r0, 2
10 sw r3, 0(r2)
11 addiu r2, r2, 4
12 L1: bne r0, r1, -9

Question 4.A Out-of-Order with no Bypassing

Draw a pipeline diagram showing the out-of-order execution of the MIPS code through the first iteration of the loop, without bypassing. Assume data hazards and structural hazards are resolved using only stalling. Assume the processor assumes branches are not taken, until they are resolved.

Question 4.B Out-of-Order with Bypassing

Draw a pipeline diagram similar to Part A, showing the out-of-order execution, but now assume the processor has data bypassing.

Question 4.C Program Latency

Determine the number of cycles it takes to execute all iterations of the loop for both the scenario in Part A and the scenario in Part B. Justify your answer.

Reference no: EM131006298

Questions Cloud

Decision making and voting methods : Weighting and scoring (see Problem and Exercise 7-29) is only one method for comparing alternative solutions to a problem. Go to the library, find a book or articles on qualitative and quantitative decision making and voting methods
The market yield for bonds of similar risk and maturity : A company issued 6%, 15-year bonds with a face amount of $75 million. The market yield for bonds of similar risk and maturity is 6%. Interest is paid semiannually. At what price did the bonds sell?
Performance with a different date : A performance venue hosts many concert series a year. Performers have a name and perform several times in a concert series (each constituting a performance with a different date).
What makes them suitable for udp : HTTP, FTP, SMTP, IMAP, and POP3 are among the most commonly used application protocols.
Draw a pipeline diagram showing the out-of-order execution : Determine the number of cycles it takes to execute all iterations of the loop for both the scenario - Draw a pipeline diagram showing the out-of-order execution of the MIPS code through the first iteration of the loop, without bypassing.
Minimum and maximum cardinalities on the diagram : In both cases of components being used to make products and components being used to make other components, we need to keep track of how many components go into making something else. Draw an E-R diagram for this situation and place minimum and ma..
How is the price of health insurance measured : How is the price of health insurance measured? What happened to the price of health insurance in the United States from 1950 to 1980? What has happened since 1980? Why?
How would the rn overcome the feeling of hesitation : Discuss the common ethical and legal implications of mandatory reporting for nurses regardless of the state in which a Registered Nurse practices. Do the mandatory reporting laws ensure children will be protected? Explain your response.
The market yield for bonds of similar risk : A company issued 6%, 15-year bonds with a face amount of $75 million. The market yield for bonds of similar risk and maturity is 6%. Interest is paid semiannually. At what price did the bonds sell?

Reviews

Write a Review

Computer Engineering Questions & Answers

  If you were going to seek a job in information technology

1.identify and describe the most important one or two topics you learned in this class.2.has your viewpoint toward

  Write down an assembly language program

Write down an assembly language program The product number from one to five (3 characters wide, right justified)

  Questioncreate the logic for program that performs

questioncreate the logic for program that performs arithmetic functions. design a program to contain two numeric

  Code to declare the four pointer variables

In C++: A pointer variable may consist of a pointer to a valid object, a pointer to a deleted object, NULL, or the random value. Write down the code which generates and sets four pointer variables a, b, c, and d to display each of these possibilit..

  Compare the various types of human memory

As a software engineer, you have been asked to write a paper that describes the use of current technologies with regard to the human-computer interface. Explain haptic feedback, describe its key uses, and explain why it is needed

  Show a method to display instructions to the user and write

one of the many tasks that programmers get asked to do is to convert data from one form to another. frequently data is

  Write a 700 to 1050 word paper on a specific web or mobile

write a 700 to 1050 word paper on a specific web or mobile application.describe a specific web or mobile applications

  Questionassume this loop is taken many times what is

questionassume this loop is taken many times what is steady-state cpi of this loop on the scalar pipeline discussed in

  Discuss the potential effect of the images

Describe the website you choose, and then identify the basic image and typographic principles as applied to the website. Discuss the potential effect of the images and typography on first-time visitors

  Epm/pmo approach to multi-project management

Introducing PMOs within organizations utilizing EPM approaches is sometimes perceived as creating unnecessary additional layers of bureaucracy. What steps would you recommend to be taken to correct this mis-perception and educate employees on the ..

  Prepare functional specifications for the companys use of

you are to select one business thatnbspdoes not alreadynbsphave a websitenbspand develop an internet strategy for it.

  Assume a direct access file consists of sectors

assume a direct access file consists of sectors with 1024 byte capacity. Suppose also that records are 32 bytes long. On which logical sector do the following logical records lie? What is the relative record number in the sector?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd