Skip to content

jiweixing/bit-rars

Repository files navigation

README

BIT-RARS : RISC-V Simulator in Java

1. Introduction

BIT-RARS is a RISC-V simulator for teaching designed by Yueyan Zhao based on MARS, a MIPS simulator in Java.

2. Supported Instructions

The basic instructions set RV32I.
Directives and macro are supported.
A few pseudo-instructions are supportet. we noticed that it's not enough and will be enriched in the future version.

3. Installing and Running

Java JRE 1.6 or above is required. Download jar file in directory .\bin and Run it from console

$ java -jar Rars.jar 

1
There are mainly four sections in the main UI.
The first and second section are menu and tool bar.
The third section is "Edit/Excute" section, in which you can edit your code or watch the simulation result.
The fourth section is a console to display the output and reports of assembling and simulation.

Here is an exmaple to show you how to use the simulator:
Click File→Open, and follow the instructions in section 4→(2) to find the examples. Copy and paste the example in the edit page.
2 3

Go to Run→Assemble to assemble the asm code. You will see the execute page, in which there are source code, basic format of each code, binary code, code address(section 1), the memory(section 2) of and registers(section 3).
4
5
Then all the work have been done. Just use run, step and other command in the tool bar(next to the assemble button) to run the code and watch the outcomes.

About the source code:

The main class is in Rars.java and other source codes are in help, images and rars, in case anyone want to compile or read the code

4. Examples

(1. Open Rars.jar, find Help→Rars→Examples, where two example are presented.
(2. Open directory .\asm_examples. More examples will be found to implement Bubblesort and calculate fibonacci.

5. Future Work

More pseudo-instrucions to be added.
Syscall will be adjusted to follow the general use of register in Risc-V

Please feel free to contact us([email protected]), if you have any questions about this project.

About

BIT-RARS : a RISC-V Simulator in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published