The simulator is written in Java
Prerequisite: Java version of 14 or higher is needed
How to run
-
Compile the simulator by following command in src
javac Main.java
-
Run the simulator by following command with 7 arguments
java Main
Arguments information: : Superscalar pipeline width (min: 1) : Branch prediction mode (Fixed-not-taken: 1, Fixed-taken: 2, Static: 3, 1-bit-dynamic: 4, 2-bit-dynamic: 5) : Number of ALUs (min: 1) : Number of Load units (min: 1) : Number of Store units (min: 1) : Number of BRUs (min: 1) : Size of Reservation station and Reorder buffer (min: 1)
Output The simulator will run 6 benchmarking programs
- Vector addition (size: 10)
- Bubble sort (size: 16)
- Factorial(8)
- Many dependencies
- Independent Math
- 3 x 3 Game of Life (1 iteration)
For each program, terminal will show following infromation 0. Processor configuration
- Number of instructions executed
- Number of cycles spent
- Number of stalled cycles
- Number of waiting cycles
- Number of correct branch predictions
- Number of incorrect branch predictions
- Number of instructions per cycle
- Subset instructions per cycle (instructions per cycle when last halt was issued)
- Stalled cycles per cycle
- Wasted cycles per cycle (wasted cycle = stalled + waiting cycle)
- Branch prediction accuracy
Also, there will be register file and memory dump for each program in following format
- rf_bench#.txt
- memory_bench#.txt