Skip to content

Arker123/RISC-V-Simulator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISC-V-Simulator

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:
  1. Arnav Kharbanda

  2. Shobhit Juglan

  3. Gopal Bansal

  4. Yashasav Prajapati


The simulator is written in C, the GUI is written in ReactJs and NodeJs.


Testing the simulator using command line

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

Testing the simulator using GUI

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.

Running the simulator

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

Key Features

  1. The simulator supports all the instructions mentioned in the project description.
  2. The GUI is fully functional and supports all the features, which include Run, Step, Reset, Previous, Register. [Memory to be added soon]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.4%
  • CSS 29.8%
  • HTML 5.4%
  • C 1.4%
  • JavaScript 1.0%
  • Jupyter Notebook 1.0%