The project report is available for more details.
compiling and running the program in “run” mode:
- Download the project and unzip the files, if necessary.
- Traverse into the project directory from the terminal/command window.
- Run the following commands:
make all
make run
compiling and running the program in “debug” mode:
- Download the project and unzip the files, if necessary.
- Traverse into the project directory from the terminal/command window.
- Run the following commands:
make all
make debug
re-compiling the program:
- Traverse into the project directory from the terminal/command window.
- Run the following commands:
make clear
make all
make run // or debug
modify command-line input parameters:
Makefile
line 3:
...
# input parameters - taken from project.pdf
INP_FILE_NAME="prog.dat"
NF=4 # number of instructions fetched per cycle by the fetch unit
NI=16 # instruction queue max capacity of instructions held in the decode unit
NW=4 # number of instructions issued per cycle to reservation stations
NB=4 # number of common data buses
NR=8 # number of entries available in the circular reorder buffer (ROB)
...
fine-tune the debug console output for the program:
Simulator::cyclePipeline (simulator.cpp
line 259):
...
if (debugMode) {
cout << "\nPOST CYCLE RESULTS\n";
// debug per cycle
// printSimulatorMemories();
printSimulatorDecodeInstructionQueue();
// printSimulatorBranchLabelsTable();
// printSimulatorBtbMap();
// printSimulatorPhysicalRegs();
// printSimulatorMappingTable();
// printSimulatorFreeList();
// printSimulatorMappingTableHistory();
// printSimulatorFreeListHistory();
printSimulatorReservationStations();
printSimulatorROB();
// printSimulatorStallCounts();
}
...
Simulator::execute (simulator.cpp
line 308):
...
// post execution
printSimulatorMemories();
// printSimulatorDecodeInstructionQueue();
// printSimulatorBranchLabelsTable();
// printSimulatorBtbMap();
printSimulatorPhysicalRegs();
printSimulatorMappingTable();
// printSimulatorFreeList();
// printSimulatorMappingTableHistory();
// printSimulatorFreeListHistory();
// printSimulatorReservationStations();
// printSimulatorROB();
printSimulatorStallCounts();
...
- Implement pipelined FPAdd and FPMul ALU execution.
- Refactor the branch predictor functionality to store in the branch target buffer using bits 7-4 of the hashed branch address being stored.
- Parameterize many variables across the program:
common.h
: REGISTER_COUNTdecode.h
: BTB_ENTRIES_COUNTissue.h
: RS_COUNT_INT, RS_COUNT_LOAD, RS_COUNT_STORE, RS_COUNT_FPADD, RS_COUNT_FPMULT, RS_COUNT_FPDIV, RS_COUNT_BUexecute.h
: INT_LATENCY, LOAD_LATENCY, STORE_LATENCY, FPADD_LATENCY, FPMULT_LATENCY, FPDIV_LATENCY, BU_LATENCY, FPADD_IS_PIPELINED, FPMULT_IS_PIPELINED, FPDIV_IS_PIPELINED
- Develop a GUI using Qt framework.