Starting from:

$30

CS224-Lab 5 Pipeline Hazards Evaluation Solved

The list of all hazards that can occur in this pipeline.  For each hazard, give its type (data or control), its specific name (“compute-use” “load-use”, “load-store” “J-type jump”, “branch” etc.), the pipeline stages that are affected.

c)  For each hazard, give the solution (forwarding, stalling, flushing, combination of these), and explanation of what, when, how.

d)  The logic equations for each signal output by the hazard unit, as a function of the input signals that come to the hazard unit.  This hazard unit should handle all the data and control hazards that can occur in your pipeline (listed in b) so that your pipelined processor computes correctly.

e) Write small test programs, in MIPS assembly, that will show whether the pipelined processor is working or not.  Each of your test programs should be designed to catch problems, if there are any, in the execution of MIPS instructions in your pipelined machine. Write:

A test program with no hazards (to verify that there are no problems with the connections in your pipeline etc.)
A test program that has one type of hazard, and another, and another...
In the end, have at least 4 test programs (testing at least 3 hazards) with their machine code (in hex).

You can use the student-written assembler tool available online to help you quickly implement your test programs[1].  Remember that the goal of testing is to verify that all the instructions are fully working, and that all the instructions are working even in the presence of hazards.

 

 

Part 2:  Implementation and Simulation

 

a) You are given a skeleton System Verilog code for your pipelined MIPS processor in the file PipelinedMIPSProcessorToFill.txt. The places in the code that needs to be modified are shown with comment blocks above them. Fill them to implement Pipelined Processor. You don’t need to follow the skeleton code point by point. If you think your design is better, you are welcome to try it in your code, as long as your version of the code works, too.

b) Now make a System Verilog testbench file and using Xilinx Vivado, simulate your Pipeline Processor by executing the test programs you wrote at Prelim e). Implement a new top module in order to see memwrite, regwrite, writedata, pc, instruction and resultw signals. Study the results given in the simulation window.  Find each instruction, and understand its values. Do this step for each of the test programs you wrote. 



[1] https://github.com/bilkentCraps/mips      

More products