Pipelined machine versus the single cycle machine

Assignment Help Basic Computer Science
Reference no: EM1352577

Problem 1

Consider two different machines. The first has a single cycle datapath (i.e., a single stage, non-pipelined machine) with a cycle time of 4ns. The second is a pipelined machine with four pipeline stages and a cycle time of 1ns.

Part (a) What is the speedup of the pipelined machine versus the single cycle machine assuming there are no stalls?

Part (b) What is the speedup of the pipelined machine versus the single cycle machine if the pipeline stalls 1 cycle for 30% of the instructions?

Part (c) [2 points] Now consider a 3 stage pipeline machine with a cycle time of 1.1ns. Again assuming no stalls, is this implementation faster or slower than the original 4 stage pipeline? Explain your answer.

Problem 2

Consider two different 5-stage pipeline machines (IF ID EX MEM WB). The first machine resolves branches in the ID stage, uses one branch delay slot, and can fill 60% of the delay slots with useful instructions. The second machine resolves branches in the EX stage and uses a predict-not-taken scheme. Assume that the cycle times of the machines are identical. Assume that 15% of the instructions are branches, 25% of branches are taken, and that stalls are due to branches alone. Which machine is faster? To get any credit, you must justify your answer. 

Problem 3

Consider a pipeline with the following structure: IF ID EX MEM WB. Assume that the EX stage is 1 cycle long for all ALU operations, loads and stores. Also, the EX stage is 3 cycles long for the FP add, and 6 cycles long for the FP multiply. The pipeline supports full forwarding. All other stages in the pipeline take one cycle each. The branch is resolved in the ID stage. WAW hazards are resolved by stalling the later instruction. Assume that there are different registers for FP and int data types, there are different multipliers for FP multiplication and int multiplication operations and there are different adders for FP Addition and int addition. Also assume that all functional units are pipelined. For the following code, list all the data hazards that cause stalls. State the type of data hazard and give a brief explanation why each hazard occurs.

 

loop:                L.D F0, 0(R1)                  #1

                        L.D F2, 8(R1)                 #2

                        L.D F4, 16(R1)               #3

                        L.D F6, 24(R1)               #4

                         ADD.D F10, F4, F0        #6

                         ADD.D F8, F2, F0          #7

                      S.D 0(R2), F8                  #8

                       DADDI R2, R2, 8            #9

                       S.D 8(R2), F10               #10

                       DSUBI R1, R1, 32            #11

 

                      BNEZ R1, loop                 #12

                        MULT.D F8, F6, F0           #5

 

Problem 4 For this problem, we will explore a pipeline for a register-memory architecture. The architecture has two instruction formats: a register-register format and a register-memory format. In the register-memory format, one of the operands for an ALU instruction could come from memory.

There is a single memory-addressing mode (offset + base register). The only non-branch register-memory instructions available have the format:

Op Rdest, Rsrc1, Rsrc2

or

Op Rdest, Rsrc1, MEM

where Op is one of the following: Add, Subtract, And, Or, Load (in which case Rsrc1 is ignored), or Store. Rsrc1, Rsrc2, and Rdest are registers. MEM is a (base register, offset) pair.

Branches compare two registers and, depending on the outcome of the comparison, move to a target address. The target address can be specified as a PC-relative offset or in a register (with no offset). Assume that the pipeline structure of the machine is as follows:

IF RF ALU1 MEM ALU2 WB

The first ALU stage is used for effective address calculation for memory references and branches. The second ALU stage is used for operations and branch comparison. RF is both decode and register-fetch stage. Assume that when a register read and a register write of the same register occur in the same cycle, the write data is forwarded.

(a) Find the number of adders, counting any adder or incrementor, needed to minimize the number of structural hazards. Justify why you need this number of adders.

(b) Find the number of register read and write ports and memory read and write ports needed to minimize the number of structural hazards. Justify why you need this number of ports for the register file and memory.

 (c) Will data forwarding from the ALU2 stage to any of ALU1, MEM, or ALU2 stages reduce or avoid stalls? Explain your answer for each stage.

 (d) [3 points] Will data forwarding from the MEM stage to any of ALU1, MEM, or ALU2 stages reduce or avoid stalls? Explain your answer for each stage.

Reference no: EM1352577

Questions Cloud

How fast did nicole throw the ball : A 50 hard-boiled egg moves on the end of a spring with force constant . It is released with an amplitude 0.300 . A damping force acts on the egg. After it oscillates for 5.00 , the amplitude of the motion has decreased to 0.100.
What is the yearly demand for coffee by us consumers : The yearly demand for coffee by U.S. consumers is given by the demand curve QD=250-10P, where Q is quantity.
Representing information by predicate-calculus sentences : Represent this information by predicate-calculus sentences in such a way that you can represent the question Is there a member of the alpine club
Determine the magnitude and direction of the resultant : A crate with a mass of 171.5 kg is suspended from the end of a uniform boom with a mass of 80.3 kg. The upper end of the boom is supported by a cable attached to the wall and the lower end by a pivot (marked X) on the same wall. compute the tensio..
Pipelined machine versus the single cycle machine : What is the speedup of the pipelined machine versus the single cycle machine assuming there are no stalls?What is the speedup of the pipelined machine versus the single cycle machine if the pipeline stalls 1 cycle for 30% of the instructions?
Cs433: computer architecture : CS433: Computer Architecture - Spring  2014,  Assume a new execution mode called "enhanced mode" provides a 1.5x speedup to the sections of programs where it applies. What percentage of a program (measured by original execution time) must run in en..
Define and explain the various forces that affect market : Define and explain the various forces that affect in international markets and What are the advantages and disadvantages of trade protectionism?
What would the largest cardholder fee that tuan will pay : what would the largest cardholder fee that Tuan will pay. If the rental store has a constant marginal cost of $2, which strategy is more profitable?
Whether attribution biases can be positive : Explain whether or not attribution biases can be positive and why.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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