vhdl_lab_luebs - ECE201 VHDL Lab Synthesis and Simulation...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE201 VHDL Lab: Synthesis and Simulation of Branch Predictors John K. Luebs December 20, 2007 1 Introduction In this lab various branch predictors, correlating and non-corellating have been designed in VHDL and then synthesized and simulated with test input. Based on the simulation output we can make some observations about the relative effectivness of these branch predictors. 2 Predictors Implemented Four different branch predictors were implemented. Actually only two fundamentally distinct designs were implemented: Non-correlating and correlating. However, 3 correlating predictors with different design pa- rameters were implemented. All predictors used lookup tables indexed with 3 address bits. The address bits used were bits 2 through 4. The predictors implemented were: 1. A 2-bit branch predictor 2. A 2-bit correlating branch predictor with 2 bits global history or (2 , 2) predictor 3. A 1-bit correlating branch predictor with 1 bit global history or (1 , 1) predictor 4. A 1-bit correlating branch predictor with 3 bits global history or (3 , 1) predictor. 3 Test Vectors Two sets of test vectors were used for simulation. The first set was that given in the assignment. The second set was one that was generated to simulate a typical scenario with a contrived example of correlated branches. 3.1 Correlating Test Vectors The Corellating test vectors were generated with a simple python script containing a list of addresses and directions. The script simply output a vector file with the appropriate transitions of Addr and Dir signals. The test vectors are intended to simulate a loop based on the example presented on page 202 of the text book. It starts out with 2 taken initial branches and then goes into a “loop.” The loop consists of two branches that alternate in direction on each iteration of the loop, together. The first branch is taken if and only if the second branch is taken. The branch after that is repeatedly taken and is used to simulate a loop condition. On the last part of the vectors, that loop condition branch is not taken and then an additional branch that was taken in the beginning is also not taken. 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 VHDL Design The branch predictor design in VHDL is fairly straightforward. The branch history table is simply an array of bit vectors of n -bits each, where n is the number of “bits” of the predictor. The state machine is clocked and synchronized by the rising edge of the Cmd line, which acts as a clock. The user must setup the address and direction and then can clock them in with a rising edge on Cmd . In order to read data correctly the user must simply setup the requested address. The only constraint is that the address be setup given the timing constraints before bringing Cmd low, if Cmd is being used as an “input” strobe for the reader.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern