How many cycles does this loop take to execute

Assignment Help Computer Engineering
Reference no: EM132094060

Please answer this five questions:

Use the following code fragment. Write all assumptions you make regarding hardware.

Loop: LD R1,0(R2) ;load R1 from address 0+R2

DADDI R1,R1,#1 ;R1=R1+1

SD R1,0,(R2) ;store R1 at address 0+R2

DADDI R2,R2,#4 ;R2=R2+4

DSUB R4,R3,R2 ;R4=R3-R2

BNEZ R4,Loop ;branch to Loop if R4!=0

Assume that the initial value of R3 is R2 + 396

1. Data hazards are caused by data dependences in the code. Whether a dependency causes a hazard depends on the machine implementa- tion (i.e., number of pipeline stages). List all of the data dependences in the code above.

Record the register, source instruction, and destination instruc- tion; for example, there is a data dependency for register R1 from the LD to the DADDI.

2. Show the timing of this instruction sequence for the 5-stage RISC pipeline without any forwarding or bypassing hardware but assuming that a register read and a write in the same clock cycle "forwards" through the register file, as we used in class. Assume that the branch is handled by flushing the pipeline. If all memory references take 1 cycle, how many cycles does this loop take to execute?

3. Show the timing of this instruction sequence for the 5-stage RISC pipeline with full forwarding and bypassing hardware. Assume that the branch is handled by predicting it as not taken. If all memory references take 1 cycle, how many cycles does this loop take to execute?

4. Show the timing of this instruction sequence for the 5-stage RISC pipeline with full forwarding and bypassing hardware. Assume that the branch is handled by predicting it as taken. If all memory references take 1 cycle, how many cycles does this loop take to execute?

5. High-performance processors have very deep pipelines-more than 15 stages. Imagine that you have a 10-stage pipeline in which every stage of the 5-stage pipeline has been split in two.

The only catch is that, for data forwarding, data are forwarded from the end of a pair of stages to the beginning of the two stages where they are needed.

For example, data are forwarded from the output of the second execute stage to the input of the first execute stage, still causing a 1-cycle delay.

Show the timing of this instruction sequence for the 10-stage RISC pipeline with full forwarding and bypassing hardware. Assume that the branch is handled by predicting it as taken. If all memory references take 1 cycle, how many cycles does this loop take to execute?

Reference no: EM132094060

Questions Cloud

Do you think oracle might discontinue support for mysql : What reasons might Oracle have for maintaining both, especially considering MySQL is a free, open source option? Do they gain any advantages?
What is the main message of the macmillan : What is the main message of the MacMillan et al. article? How does it relate to concepts discussed in the text?
What is the propagation delay of the link : What is the propagation delay of the link? If the image is square, what is the minimum size of this image in pixels for the link to be continuously transmittin
Module six reading and resources section : After reading the article 10 Ways to Attract Top Talent by Improving Your Workplace Culture in the Module Six Reading and Resources section
How many cycles does this loop take to execute : Assume that the branch is handled by flushing the pipeline. If all memory references take 1 cycle, how many cycles does this loop take to execute?
Rate of change happening in the organization : Explain in terms of how you would manage the rate of change happening in the organization. How do you get support?
What is the purpose of the requisition cycle : What is the purpose of the requisition cycle in the contract life cycle and what kinds of documents are produced here?
Rationale for some of weldon changes : Explain the rationale for some of Weldon's changes and suggest one or two actions that Gorsky must take to overcome recent quality issues.
Dilemma facing the owners of caribou coffee : As you look over the vignette, it should have started you thinking about the dilemma facing the owners of Caribou Coffee

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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