Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

1. Branch history tables: execute a program that contains the following high-level code segment:

A[8] = {5,3,4,9,2,1,8,4}

for (i = 0; i<8; i++) {

if (A[i] < 6) {

//fall - through code goes here

}

else {

//branch taken code goes here

}

}

When compiled, this code contains two branches, as shown below. The BNE is part of the IF statement above - if the condition is true,the branch is not taken; if the condition is false, the branch is taken. The BEQ controls the loop.

Branch Address

Dec Hex

20 0*14 Loop: ...

....

40 0*28 BNE R3, RO, ELSE #if (false) jump to Else, i.e. A[I]>=6 

....

52 0*34 BEQ R6, R7, Loop #if (i<8) jump to loop

.... 

The processor contains an eight-entry, 2-bit branch history table (BHT), its state when the processor reaches this code segment is as follows:

Entry # Value

0 10

1 11

2 01

3 00

4 01

5 00

6 11

7 10

Determine the overall misprediction rae (#mispred / #total-branches ) of the branch predictor for this code.


2.Correlating branch predictors: now suppose you have a 4-line (2,2) correlating branch predictor, with all entries initially set to 11, and the initial global history is 11. Determine the overall accuracy (#good-preds) / #total-branches ) of this predictor using the same code as in problem 1

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9640923

Have any Question?


Related Questions in Computer Engineering

Given the following table keynbspand fds repair

Given the following table, key and FDs, REPAIR (RepairInvoiceNumber, RepairDate, RepairCost, RepairEmployeeName, RepairEmployeePhone, SerialNumber, Type, TankCapacity) Candidate Keys: RepairInvoiceNumber, and (RepairDate ...

Question suppose you had to design a wired ethernet network

Question : Suppose you had to design a wired Ethernet network for a 4-story office building containing 20 users per floor. Each floor is 90 meters in length and 5 meters in height. Draw a network topology of your propose ...

Question suppose host a has 10 packets with sequence

Question : Suppose host A has 10 packets with sequence numbers 1 to 10 to be transmitted to host B. Now imagine that the packets numbered 2 and 7 are lost when they were sent the first time. Assume that ACKs are never lo ...

Consider a valleyed array a1 2 middot middot middot n with

Consider a valleyed array A[1, 2, · · · , n] with the property that the subarray A[1..i] has the property that A[j] > A[j + 1] for 1 ≤ j (a) What is a recursive algorithm that takes asymptotically sub-linear time to find ...

An article in the wall street journal noted that an

An article in The Wall Street Journal noted that an" increase in the price of crude oil quickly reduces demand for oil". Do you agree with this statement? Briefly explain.

Please explain to me the concept of policing with emphasis

Please explain to me the concept of policing with emphasis on the "leaky bucket" mechanism.

Suppose that you are given a sorted list of n elements

Suppose that you are given a sorted list of n elements followed by f(n) randomly ordered elements. How would you sort the entire list if a. f(n) = 2? b. f(n) = vn? c. How large can f(n) be for the entire list to be sorte ...

The sunshine health corporation has requested you evaluate

The Sunshine Health Corporation has requested you evaluate their Scottsdale, Arizona facility. The original structure was built in 1965. The facility has undergone several remodels aesthetically, with no real infrastruct ...

Case studyjulian lim purchased a put option at the cost of

Case study: Julian Lim purchased a put option at the cost of $0.30 each. The put option has a strike price of S$3.00 and the underlying stock is currently trading at S$3.50. Julian Lim bought 100 shares. Question: Determ ...

Suppose a countrys real gdp is 18 trillion andnbspthat

Suppose a country's real GDP is $18 trillion and that population is 300 million. Instructions:  Enter your answers as whole numbers. a. What is this country's real GDP per capita? $  Suppose that during the next 10 years ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As