This is the repository for the RISC-V simulator code. This is the final project for the course CS-204 - Computer Architecture.
The team members are:
-
Arnav Kharbanda
-
Shobhit Juglan
-
Gopal Bansal
-
Yashasav Prajapati
The simulator is written in C
, the GUI is written in ReactJs
and NodeJs
.
To test the simulator, add a .mem
file containing addresses of each instruction followed by the machine code of each instruction in the test
directory and run the program as described below. Example below
0X0 0X00A00093
0X4 0X00900113
0X8 0X002081B3
0XC 0X004000EF
0X10 0X00000263
0X14 0X0202423
0X18 0X00802283
To test the simulator using the GUI, go to the gui
directory and follow the commands in the README.md file in the gui
directory.
Nothing major here. Just clone the repository and run the following command in the src
directory of the project. (Also make sure you have some C compiler installed.)
make
This will create the executable file myRISCVSim
in the bin
directory.
Move to the bin
directory and run the following command to run the simulator.
./myRISCVSim <path_to_input_file>[../test/simple_add.mem]
This will run the simulator on the input file and generate the output file output.mem
in the bin
directory.
To delete the executable file, run the following command in the `src` directory
make clean
- The simulator supports all the instructions mentioned in the project description.
- The GUI is fully functional and supports all the features, which include Run, Step, Reset, Previous, Register. [Memory to be added soon]