The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Question 2. Pipelining
Given the following code:
xor r0, r0, r0
addiu r1, r0, 10
j L1
loop: lw r3, 0(r2)
mul r4, r3, r3
mul r3, r3, r1
addiu r0, r0, 1
div r3, r4, r3
sw r3, 0(r2)
addiu r2, r2, 4
L1: bne r0, r1, -8
Calculate the number of cycles it takes to execute one iteration of the loop (including the
bne instruction) on the following models:
2.1 A non-pipelined machine
2.2 A pipelined machine with scoreboarding and five adders and five multipliers without
data forwarding
2.3 A pipelined machine with scoreboarding and five adders and five multipliers with
data forwarding.
2.4 A pipelined machine with scoreboarding and one adder and one multiplier without
data forwarding
2.5 A pipelined machine with scoreboarding and one adder and one multiplier with data
forwarding
Note: For all machine models, use the basic instruction cycle as follows:
● Fetch (one clock cycle)
● Decode (one clock cycle)
● Execute (MUL takes 6, ADD takes 4 clock cycles, other instructions 1 clock
cycle). The multiplier and the adder are NOT pipelined.
● Memory access (one clock cycle)
● Write-back (one clock cycle)
Do not forget to list any assumptions you make about the pipeline structure (e.g., how is
data forwarding done between pipeline stages).
CMPE 110 Computer ArchitectureFall 2016, Homework #2Computer EngineeringUC Santa CruzOctober 18, 2016Name: ____________________________________Email: ____________________________________Submission Guidelines:●This homework is due onWednesday, November 2nd, 2016 11:59 pm.●The homework must be submitted to eCommons by 11:59pm.○Anything later is a late submission●Please write yournameand your UCSCemail address●Provide details on how to reach a solution. An answer without explanation gets nocredit. Clearly state all assumptions.●The homework should be “readable” without too much effort○The homework must be typed and submitted as a single file in PDF format○Please name your homework file cmpe110-hw2-yourcruzid.pdf○Please keep your responses coherent and organized or you may losepoints.●Points: 64 = 16 + 16 + 16 +16Questionpart 1part 2part 3part 4part 51---23-4--Total
Attachments:
-----------