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)
a Data dependences in the code Dependency for register R1 from the LD to the DADDI Depende... 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
-
2 2 points A rigid, sealed vessel contains 5kg of air at 2 bar and 120.2C. Find the volume of the vessel, is it V = 4m V=2.82m3 V = 3m V = 8.22m V = 2.28m
-
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...
-
Within the Mundell-Fleming model assuming perfect capital mobility, analyze the effects of a positive shock to money demand (i.e., an increase in the demand for money for given levels of income and...
-
Du Page Products Company uses a job order cost system. For a number of months there has been an ongoing rift between the sales department and the production department concerning a special-order...
-
King County, Washington, hired Frank Coluccio Construction Co. (FCCC) to act as general contractor for a public works project involving the construction of a small utility tunnel under the Duwamish...
-
TASK 1: Pinang Berhad is a company that carries out a diverse range of activities. It is proud of its reputation as a 'caring' organisation and has adopted various ethical policies towards its...
-
Muldur Corporations comparative balance sheets are presented below. Additional information: 1. Net income was $18,300. Dividends declared and paid were $16,400. 2. Equipment which cost $10,000 and...
-
On January 1, 2021, the Blue Devil Corporation issued $80,000 of five-year bonds. The bonds carried an annual stated interest rate of 5 percent, with interest payable semiannually on June 30 and...
-
When constructed in Word, if a categorical variable has 4 possibilities, the summary table will have ______ rows
-
1. 15. pts. Find F(s) a. f(t)=e" cost+tsin 2t+t+ cosht + 5e" 4 012 b. F(1) = {142 1>2 3 c. f(t)=(t+e+sint)a(t-)
-
1.Create a menu system program in c++ that asking an input based on the choices below. If the input is A then the program will compute the Sensitivity Analysis: Sen = (1 - H-L/H) * 5. If the input is...
-
Some large CPA firms have thousands of staff members, and hundreds of partners, and operate on a national or an international basis. Would the professional corporation form of organization be more...
-
Determine maximal normal stresses, if the force parameter F is equal 16 15F 2F 150 100 cm 3F 10 8.0 KN.
-
Assignment: Chapter 02 Using Financial Statements and Budgets Steve and Jane Ibarra have been married for over two years. They have been trying to save for a down payment on a house, but they feel...
-
Using the information presented in Problem 13.4B, prepare a partial statement of cash flows for the current year, showing the computation of net cash flows from operating activities using the...
-
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 You are required to calculate the overhead variances of Raymond Ltd. The budget is prepared as: (a) Total budgeted variable overhead \( 100,000\). (b) Total budgeted fixed overhead \( 125,000\)....
-
You are required to calculate the overhead variances from the following data. (a) Budgeted for \( 6,000\) variable overhead and 1,000 machine hours. \(\begin{array}{lr}\text { Actual overhead } & ...
-
A You are required to calculate the overhead variances in the following cases: (a) Budgeted for \( 37,000\) fixed overhead. The actual fixed overhead turns out to be \( 36,420\). (b) Budgeted for...
Study smarter with the SolutionInn App