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

  Program with a function that returns a random integer

Program with a function that returns a random integer

  Program to determine weighted average of test

Write an algorithm for a program which prompts the user to enter the five test scores, determine total of the five tests and determine the weighted average of each test supposing that each test weighs 20%.

  Three different organizations'' e-business models

How do these organizations' business models affect way they market themselves? How does the target market learn about or find this site (e.g., search engines, referral sites, click-and-mortar advertising).

  Assess the importance of a systems development life cycle

write a five to six 5-6 page paper in which youdetermine within the health care setting the main features capabilities

  Provides an introduction to relational databases

Solution gives an introduction to relational databases and Microsoft Access. It defines relational databases and describes some of the basics of creating relational databases.

  Generating the crow’s foot erd

Provided the following business scenario, generate a Crow’s Foot ERD utilizing a specialization hierarchy if suitable. Tiny Hospital keeps the information on patients and the hospital rooms.

  Dma is executed by a dma controller that doesnt capture

write a 200- to 300-word short-answer response to the followingthe idea behind it is to free up the cpu so it can do

  Quantifying the software development

This organization is interested in quantifying its software development. Write down a report proposing suitalbe metrics and propose how these can be collected.

  Write a ruby program that reads a line from the user

In class assignments #12. Design a Ruby class that inherits from the inbuilt String class and adds an additional functionality to check if the string is a palindrome. Email your code by end of day 02/28.

  Developing the secure dmz environment

You will require developing a secure DMZ environment in order to accomplish this task. Generate a drawing of this environment utilizing the Power point, and display the following interconnected elements.

  Explain ram to support a computer screen display

RAM to support a computer screen display, One reason GUIs were initially slow to be adopted was the cost of the hardware needed to support them. How much video RAM is needed to support a 25 line X 80 row character monochrome text screen?

  Explain some of the examples of poor quality in it projects

discuss some of the examples of poor quality in it projects presented in the what went wrong? section. could most of

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