Your branch target buffer (and branch history buffer) each have 8 slots. Your CPU executes the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Your branch target buffer (and branch history buffer) each have 8 slots. Your CPU executes the following code fragment. Assume that prediction takes place in the Fetch cycle, and that the result of a branch is actually known after the execute cycle. Assume full forwarding (MX, WX, WM). addi x12, x0, 5 add x11, x0, xo // x11 = 0 add x19, x0, x0 // x19 = 0 L1: L2: L3: Exit: addi x20, x0, 150 bge x11, x12, Exit slli x13, x11, 3 add x14, x16, x13 ld x15, 0(x14) blt x15, x20, L2 sd x0, 0(x14) add x19, x15, x19 beq x0, x0. L3 addi x15, x15, 1 sd x15, 0(x14) addi x11, x11, 1 jal x0, L1 // i8 //x16 address of array[0] // i++ (a) Draw a pipeline diagram for the execution of the program, assuming a static predict-not-taken policy (yes, this means that the BTB and BHT aren't used... yet). Circle the stages in which the outcome of a branch is known. Make sure to include stalls due to branch misprediction. How many cycles are lost due to stalls? (b) Assume that you are using a 1-bit branch predictor, and redraw the pipeline diagram. How many cycles are lost due to stalls? Make sure that you incorporate the cycle in which the outcome of a branch is known, if necessary. (c) Show the values read and written from the BTB and BHT (from 2b, and the cycles in which the read/write occurs. You need not show reads due to fetches of non-branch instructions. (d) Assume that you are using a 2-bit branch predictor, and redraw the pipeline diagram. How many cycles are lost due to stalls? Make sure that you incorporate the cycle in which the outcome of a branch is known, if necessary. (e) Show the values read and written from the BTB and BHT (from 2d, and the cycles in which the read/write occurs. You need not show reads due to fetches of non-branch instructions. Your branch target buffer (and branch history buffer) each have 8 slots. Your CPU executes the following code fragment. Assume that prediction takes place in the Fetch cycle, and that the result of a branch is actually known after the execute cycle. Assume full forwarding (MX, WX, WM). addi x12, x0, 5 add x11, x0, xo // x11 = 0 add x19, x0, x0 // x19 = 0 L1: L2: L3: Exit: addi x20, x0, 150 bge x11, x12, Exit slli x13, x11, 3 add x14, x16, x13 ld x15, 0(x14) blt x15, x20, L2 sd x0, 0(x14) add x19, x15, x19 beq x0, x0. L3 addi x15, x15, 1 sd x15, 0(x14) addi x11, x11, 1 jal x0, L1 // i8 //x16 address of array[0] // i++ (a) Draw a pipeline diagram for the execution of the program, assuming a static predict-not-taken policy (yes, this means that the BTB and BHT aren't used... yet). Circle the stages in which the outcome of a branch is known. Make sure to include stalls due to branch misprediction. How many cycles are lost due to stalls? (b) Assume that you are using a 1-bit branch predictor, and redraw the pipeline diagram. How many cycles are lost due to stalls? Make sure that you incorporate the cycle in which the outcome of a branch is known, if necessary. (c) Show the values read and written from the BTB and BHT (from 2b, and the cycles in which the read/write occurs. You need not show reads due to fetches of non-branch instructions. (d) Assume that you are using a 2-bit branch predictor, and redraw the pipeline diagram. How many cycles are lost due to stalls? Make sure that you incorporate the cycle in which the outcome of a branch is known, if necessary. (e) Show the values read and written from the BTB and BHT (from 2d, and the cycles in which the read/write occurs. You need not show reads due to fetches of non-branch instructions.
Expert Answer:
Answer rating: 100% (QA)
a Pipeline diagram with static predictnottaken policy Fetch Decode Execute Memory Writeback addi 1 a... 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
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
On July 7, Splish Ltd. purchased 1,100 common shares in a privately-owned company named TWR Ltd. As the TWR shares were not traded on any stock exchange, Splish elected to account for the investment...
-
Starkuchen GmbH has been in the food-processing business for three years. For its first two years (2013 and 2014), its sole product was raisin cake. All cakes were manufactured and packaged in 1 kg...
-
Chocolate type in Exercise 13-4. Use = 0.05. (a) Apply Fishers LSD method with = 0.05 and determine which levels of the factor differ. (b) Use the graphical method to compare means described in...
-
XCBob, Inc. is an online motorcycle and ATV parts business from the owners home. XCBob entered into oral agreements with the defendant, Ed Tucker Distributers, for purchases of various materials to...
-
Having rejected a tariff on textiles (a tax on imports), the president of Isoland is now considering the same-sized tax on textile consumption (including both imported and domestically produced...
-
You are contemplating whether you should start your own business. You expect that the first year this new business will receive $100,000 in revenue, and incur a cost of $80,000. You will have to...
-
The reaction of a-pinene oxide with aqueous acid includes a complex rearrangement. What would the reaction look like if a simpler molecule-cyclohexene oxide - reacted with aqueous acid and no...
-
You have a $10 million dollar budget allocated to you by the city manager and can get up to 100% matching federal funds if you meet the federal standards. You have been asked by the mayor to...
-
Henson Company began the year with retained earnings of $380,000. During the year, the company issued stock for $800,000, purchased a building for $650,000, recorded revenues of $500,000, disclosed...
-
Arrange the following human conditions in order from the most biologically fit to the least biologically fit. Explain why you put each in this spot. Sickle Cell Anemia: under stressful conditions,...
-
The firm "Eternum" has $100,000 of perpetual debt "D" at the rate kD=rF=4% and plans to receive cash flows in accordance with the following Income Statement: The tax rate is tC = 20% and there is no...
-
The simplest account structure is shaped like the letter T . The account title and account number appear above the T. Debits (abbreviated Dr.) always go on the left side of the T, and credits...
-
Can you explain about 3 bit comparator with active input LOW, Active output HIGH, Active Enabel HIGH what is the meaning witch active input, active output and active enable ?
-
Is it ethical to provide safety training in English to immigrant workers who speak little English, in order to reduce costs?
-
This exercise is intended to help you understand the cost/complexity/ performance trade-off s of forwarding in a pipelined processor. Problems in this exercise refer to pipelined datapaths from...
-
Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires...
-
A systolic array is an example of an MISD machine. A systolic array is a pipeline network or wavefront of data processing elements. Each of these elements does not need a program counter since...
-
A 17 g audio compact disk has a diameter of 12 cm. The disk spins under a laser that reads encoded data. The first track to be read is 2.3 cm from the axis; as the disk plays, the laser scans tracks...
-
A spin bike is an indoor bike that is designed to duplicate the feeling of regular road cycling. A typical spin bike has a very heavy flywheel. A friction pad or other brake provides damping that...
-
A trap-jaw ant has mandibles that can snap shut with some force, as you might expect from its name. The formidable snap is good for more than capturing prey. When an ant snaps its jaws against the...
Study smarter with the SolutionInn App