EE 560 - Summer 2024 Digital Systems Design

Week 4

Overview

See subfolder `Labs/Lab04/.

This lab has 5 parts regarding Tomasulo 3. In fact, we release all 8 parts (3 of which you will do next week). But for this week, you need only complete:

  1. FRL
  2. BPB
  3. SB
  4. SAB
  5. CFC

Prelab for all Tasks

Review the lectures slides in the shared folder pertaining to each component that you need to complete.

Overview and Structure of Various Parts

File Structure

All of the parts to the Tomasulo 3 labs are organized in a similar way.

Signal Spy

To verify your design, testbench instantiates our full, golden processor design as well as your implementation of the component being tested. We then use the “signal spy” feature of Questa/Modelsim to feed the same input signals from inside our golden design to both our internal golden implementation as well as your design. We similarly take out the internal outputs from our golden implementation of that component and compare them to the outputs you produce in each cycle, looking for (and logging) mismatches. See the diagram below.

Testbench diagram

If all goes, well your outputs will match our golden results in each cycle and the logs will be empty. Your simulation folder will have two output files: TomasuloCompareTestLog.log and Tomasulo_do_file_log.txt.

empty FRL sim folder

So after you follow the simulation steps described in detail below, you can look at the TomasuloCompareTestLog.log to ensure it is empty.

empty log

And, similarly, look at the Tomasulo_do_file_log.txt to see the results from each instruction stream that we use to test your implementation.

do log

Simulation

So for each part described below, you will complete the various incomplete portions of the design code and then simulate it to ensure it matches our expected, golden design. To perform the simulation of a given part (we will use the free register list, frl, as an example), follow the steps outlined below.

Other Notes

Part 1: FRL

Look in the frl subfolders in src/des/, src/tb, and sim for relevant files.

Procedure

There are 2 subtasks outlined the skeleton code that you need to complete. They involve completing the logic for reading and writing free registers from the FRL as well as updating the head and tail pointers and generating the output signals appropriately

Submission

submit -user ee560 -tag t3-frl frl.vhd names.txt

Part 2: BPB

Look in the bpb subfolders in src/des/, src/tb, and sim for relevant files.

Procedure

There are 2 subtasks outlined the skeleton code that you need to complete. They involve accessing the appropriate 2-bit state for reading a predicition and updating/writing a prediction, and then writing the code to update the predictor’s state given an outcome from the CDB.

Submission

submit -user ee560 -tag t3-bpb bpb.vhd names.txt

Part 3: SB

Look in the sb subfolders in src/des/, src/tb, and sim for relevant files.

Procedure

There are 3 small subtasks outlined the skeleton code as TODO. They involved updating the full and empty signals, how to generate the control signal to the SAB for when to flush a SW, and when to increment the trailing read pointer.

Submission

submit -user ee560 -tag t3-sb sb.vhd names.txt

Part 4: SAB

Look in the sab subfolders in src/des/, src/tb, and sim for relevant files.

Procedure

There are 3 subtasks outlined the skeleton code. The first two are to generate a count of matches and “overall” match signal (is there at least 1 match) for entry 7 by patterning the code for the other entries. In Task 3, you will complete the code to compute the ROB depth of each entry in the SAB which will be used to selectively flush entries when a misprediction occurs. In Task 4, you’ll use the depths you computed to generate flush signals for each entry indicated who should be flushed on a misprediction. Your last task is to write the code to update an SAB entry when a SW graduates from the ROB to the SB and save the necessary information.

Submission

submit -user ee560 -tag t3-sab sab.vhd names.txt

Part 5: CFC

Look in the cfc subfolders in src/des/, src/tb, and sim for relevant files.

Procedure

There are 7 subtasks (numbered 0 to 6) outlined the skeleton code. You will need to:

Submission

submit -user ee560 -tag t3-cfc cfc.vhd names.txt