Consider four branch prediction schemes: predict not taken, predict taken, 1-bit and 2-bit dynamic prediction. Assume...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider four branch prediction schemes: predict not taken, predict taken, 1-bit and 2-bit dynamic prediction. Assume that they all have zero penalty when they predict correctly and two cycles when they predict incorrectly. What will be the accuracy of all four types of branch schemes for the following code? Int k = 0; for (i=0; i<100; i++) { for (j=0; j<3; j++) k++; } Equivalent assembly code is main: li St2, 100 #i = 100 li $t3, 0 #k = 0 outer_Loop: li St1,3 #j= 3 inner_Loop: add St3, $t3, 1 #k k+1 subi St1, St1,1 #j= j-1 bne St1,0, inner_Loop subi $t2, $t2,1 #i=i-1 bne $t2,0, outer_Loop ## End of assembly code is Consider four branch prediction schemes: predict not taken, predict taken, 1-bit and 2-bit dynamic prediction. Assume that they all have zero penalty when they predict correctly and two cycles when they predict incorrectly. What will be the accuracy of all four types of branch schemes for the following code? Int k = 0; for (i=0; i<100; i++) { for (j=0; j<3; j++) k++; } Equivalent assembly code is main: li St2, 100 #i = 100 li $t3, 0 #k = 0 outer_Loop: li St1,3 #j= 3 inner_Loop: add St3, $t3, 1 #k k+1 subi St1, St1,1 #j= j-1 bne St1,0, inner_Loop subi $t2, $t2,1 #i=i-1 bne $t2,0, outer_Loop ## End of assembly code is
Expert Answer:
Answer rating: 100% (QA)
The ID stage of clock cycle 3 determines that a branch must be t... View the full answer
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these programming questions
-
What will be the 13C frequency setting of an NMR spectrometer that operates at 100 MHz for protons?
-
What will be the effects (increase, decrease, or no effect) on total assets, total liabilities, and total stockholders equity in each of the following situations? When shareholders equity changes,...
-
What will be the effects (increase, decrease, or no effect) on total assets, total liabilities, and total shareholders equity in each of the following situations? When shareholders equity changes,...
-
Compensation survey data collected in July 2018 shows the average annual salary for Accountant II is $62,300.00 (rounded). With an aging rate of +2.3%, calculate the market value for an Accountant II...
-
The highest and lowest recorded air temperatures in the world are, respectively, 58 oC (Libya, 1922) and 89 oC (Antarctica, 1983). What are these temperatures on the Fahrenheit scale?
-
An air-conditioning system requires airflow at the main supply duct at a rate of 180 m3/min the average velocity of air in the circular duct is not to exceed 10 m/s to avoid excessive vibration and...
-
What is the most widely followed statistic in business? a. Gross profit b. Earnings per share c. Retained earnings d. Dividends
-
The following data elements comprise the conceptual-level schema for a database: Billing address Cost Credit limit Customer name Customer number Description Invoice number Item number Price Quantity...
-
Identify the most appropriate "Investor Behaviour" for the cases below, stating your justifications and solutions for each: (i) An investor visits his financial advisor with the goal of building...
-
Utilizing the financial information below for The Cookie Company, complete a budget performance report combining activity and revenue and spending variances like that in Exhibit Please be sure to...
-
HH Co. purchased equipment at the beginning of 2020 for $46,000 with an estimated residual value of $4,600 that it has depreciated for the past 2 full years using the double-diminishing-balance...
-
1. Where can you find the information required in the table below? Item Location Three (3) examples Information Three (3) examples Workplace procedures related to emission control systems....
-
The measured resistance force of the automobile moving with a speed corresponding to the Mach number of M = 0,075 is R = 511 Newtons. The weight density of the air is = 1,297 kgf/m3 . given. In the...
-
Command and monitoring sensors and switches used by EUI-fuelled engines do not vary much between the various manufacturers. An EUI-fuelled engine requires one of two different types of throttle...
-
What are four [4] functions of powertrain control module (PCM) in electronic compression ignition engine management system?
-
With in-text citations and references, what is a comprehensive aircraft maintenance program? what are the requirements for establishing a comprehensive aircraft maintenance program? What is the...
-
The shareholders' equity accounts of Cullumber Ltd. on April 1, 2023, the beginning of the fiscal year, are as follows: $8 cumulative preferred shares (17,000 issued) $1,190,000 Common shares...
-
Anne is employed by Bradley Contracting Company. Bradley has a $1.3 million contract to build a small group of outbuildings in a national park. Anne alleges that Bradley Contracting has discriminated...
-
Calculate (3.41796875 10 -3 6.34765625 10 -3 ) 1.05625 10 2 by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in...
-
For each MIPS instruction, show the value of the opcode (OP), source register (RS), and target register (RT) fields. For the I-type instructions, show the value of the immediate field, and for the...
-
Translate the following C code to MIPS assembly code. Use a minimum number of instructions. Assume that the values of a, b, i, and j are in registers $s0, $s1, $t0, and $t1, respectively. Also,...
-
Review the discussion of ethical issues and the need theories of motivation. Discuss those issues with the goal of taking a strong position on them.
-
Discuss the international aspects of the need theories.
-
What is the relationship between monetary rewards and different needs? How should managers view money as a motivator for people with different needs?
Study smarter with the SolutionInn App