Loop: LD DADDI SD DADDI DSUB BNEZ Use the following code fragment: R1,0 (R2) R1, R1,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Loop: LD DADDI SD DADDI DSUB BNEZ Use the following code fragment: R1,0 (R2) R1, R1, #1 R1,0, (R2) ;load R1 from address 0+R2 ;RI=R1+1 store R1 at address 0+R2 R2-R2+4 ;R4-R3-R2 ;branch to Loop if R4!=0 R2, R2,#4 R4, R3, R2 R4, Loop Assume that the initial value of R3 is R2 +396. a. [15] 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 RI from the LD to the DADDI. b. [15] 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 reg- ister file, as shown in Figure C.6. Use a pipeline timing chart like that in Fig- ure C.5. 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 exe- cute? c. [15] Show the timing of this instruction sequence for the 5-stage RISC pipeline with full forwarding and bypassing hardware. Use a pipeline timing chart like that shown in Figure C.5. Assume that the branch is handled predicting it as not taken. If all memory references take 1 cycle, how many cycles does this loop take to execute? Loop: LD DADDI SD DADDI DSUB BNEZ Use the following code fragment: R1,0 (R2) R1, R1, #1 R1,0, (R2) ;load R1 from address 0+R2 ;RI=R1+1 store R1 at address 0+R2 R2-R2+4 ;R4-R3-R2 ;branch to Loop if R4!=0 R2, R2,#4 R4, R3, R2 R4, Loop Assume that the initial value of R3 is R2 +396. a. [15] 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 RI from the LD to the DADDI. b. [15] 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 reg- ister file, as shown in Figure C.6. Use a pipeline timing chart like that in Fig- ure C.5. 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 exe- cute? c. [15] Show the timing of this instruction sequence for the 5-stage RISC pipeline with full forwarding and bypassing hardware. Use a pipeline timing chart like that shown in Figure C.5. Assume that the branch is handled predicting it as not taken. If all memory references take 1 cycle, how many cycles does this loop take to execute?
Expert Answer:
Answer rating: 100% (QA)
The image contains a code fragment and questions about data hazards and pipeline timing related to the execution of the code on a 5stage RISC Reduced Instruction Set Computer processor The code fragme... View the full answer
Related Book For
Computer Architecture A Quantitative Approach
ISBN: 9780128119051
6th Edition
Authors: John L. Hennessy, David A. Patterson
Posted Date:
Students also viewed these programming questions
-
Use the following code fragment: Assume that the initial value of x3 is x2+396. a. Data hazards are caused by data dependences in the code. Whether a dependency causes a hazard depends on the machine...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
A mortgage loan officer uses math on a continual basis during the mortgage lending process. When a prospective borrower applies for a loan, many calculations are made: debt-to-income- ratio,...
-
For calendar year 2012, Stuart and Pamela Gibson file a joint return reflecting AGI of $264,000. Their itemized deductions are as follows: Medical expenses $25,300 Casualty loss after $100 floor (not...
-
What is the excess charge on a conducting sphere of radius r = 0.15 m if the potential of the sphere is 1500 V and V = 0 at infinity?
-
Wilderness Windfarms is a government organisation which directly controls another entity Steam Energy Ltd. Through this investment it indirectly controls Blades Construction Ltd and Zepher Farms...
-
Tech is playing State in the last conference game of the season. Tech is trailing State 21 to 14, with 7 seconds left in the game, when Tech scores a touchdown. Still trailing 21 to 20, Tech can...
-
1. Define ADT (Abstract Data Type)? 2. Mention the features of ADT.? 3. Define List ADT? 4. What are the ways of implementing linked list? 5. What are the types of linked lists?
-
Two spheres A and B of radius 4 and 6cms are given charges of 80 and 40 micro coulombs respectively. If they are connected by a fine wire, the amount of charge flowing from one to the other is?
-
Using real-world examples, discuss the possible limitations of the theory of comparative advantage.
-
Evaluate \(x\left(0^{+} ight)\)by using the IVT. \(X(s)=\frac{3 s^{2}+1}{(s+1)\left(\frac{2}{3} s+2 ight)^{2}}\)
-
Auto Parts, Inc. ('the Company) manufactures automobile subassemblies marketed primarily to the big three U.S. automakers. The publicly held Companys unaudited financial statements for the year ended...
-
Find the Laplace transform of each periodic function whose definition in one period is given. \(h(t)=\left\{\begin{array}{ccc}1 & \text { if } & 0
-
Equal end-of-period semiannual payments of $500 are made to a fund paying a nominal 10 percent per year compounded continuously. a. What will the fund amount to after 7 years? b. What is the present...
-
if Serum glucose concentration is 200 mg/dl, glucose will appear in urine. Select one: True False
-
The senior management at Davis Watercraft would like to determine if it is possible to improve firm profitability by changing their existing product mix. Currently, the product mix is determined by...
-
Optimizing your RAID 10 or RAID 01 array only for reliability (but keeping within your capacity and monetary constraints), what is your RAID configuration? a. What is the overall MTTF of the...
-
If you ever get confused about what a register renamer has to do, go back to the assembly code you're executing, and ask yourself what has to happen for the right result to be obtained. For example,...
-
Some recent studies have defined a metric called TPUE, which stands for true PUE or total PUE. TPUE is defined as PUE * SPUE. PUE, the power utilization effectiveness, is defined in Section 6.4 as...
-
A driver holds his hands on opposite sides of the 35-cm-diameter steering wheel in a modern sports car. A torque of 4.5 N m is required to turn the wheel. If the driver applies an equal force on...
-
U.S. nickels have a mass of 5.00 g and are 1.95 mm thick. If you stack 3 nickels on a table, how far above the table is their center of gravity?
-
A gymnast on the uneven parallel bars is at rest, tipped at a 45 angle from the vertical. The distance from her hands to her feet is 1.8 m. If we model her body as having a uniform cross section and...
Study smarter with the SolutionInn App