This is the implementation of the pipeline simulator for a 5 stage and a 7-9 stage pipeline in the c++ language.
5stage.hpp
: This file contains the implementation of the 5 stage pipeline.5stagebypass.hpp
: This file contains the implementation of the 5 stage pipeline with bypassing.79stage.hpp
: This file contains the implementation of the 7-9 stage pipeline.79stagebypass.hpp
: This file contains the implementation of the 7-9 stage pipeline with bypassing.BranchPredictor.hpp
: This file contains the struct branch predictor.5stage.cpp
: This file contains the main function for the 5 stage pipeline.5stagebypass.cpp
: This file contains the main function for the 5 stage pipeline with bypassing.79stage.cpp
: This file contains the main function for the 7-9 stage pipeline.79stagebypass.cpp
: This file contains the main function for the 7-9 stage pipeline with bypassing.input.asm
: This file contains the assembly code for the input.report.pdf
: This file contains the report for the assignment with clock cycles, comparison plots and graphs.test.cpp
: This file contains the running mechanism for the branch predictor.
The makefile contains the following commands:
compile
: This command compiles the code and generates the executable files.run_5stage
: This command runs the 5 stage pipeline.run_5stage_bypass
: This command runs the 5 stage pipeline with bypassing.run_79stage
: This command runs the 7-9 stage pipeline.run_79stage_bypass
: This command runs the 7-9 stage pipeline with bypassing.test
: This command runs the branch predictor. You need to give input from 0/1/2/3 to run.clean
: This command removes the executable files. To run the code, use the following commands:
make compile
make run_5stage
make run_5stage_bypass
make run_79stage
make run_79stage_bypass
make test
make clean