Skip to content

Releases: TheThirdOne/rars

First full release of RARS

29 Aug 06:41
Compare
Choose a tag to compare

Decsription

RARS, the RISC-V Assembler and Runtime Simulator will assemble and simulate the execution of RISC-V assembly language programs. Its primary goal is to be an effective development environment for people getting started with RISC-V. It is a direct port of MARS, the MIPS Assembler and Runtime Simulator; the code specific to MIPS was switch out with new code to support assembling and running RISC-V assembly.

The included jar can be run without arguments to launch the IDE or it can be run in the terminal with arguments to

Changes from MARS

RARS was built on MARS 4.5 and owes a lot to the development of MARS; its important to note what are new developments and what come straight from MARS. Besides moving from supporting MIPS to RISC-V and the associated small changes, there are several general changes worth noting.

Instructions can now be hot-loaded like Tools. If you want to support an additional extension to the RISC-V instruction set. the .class files just need to be added to the right folder

  • ScreenMagnifier, MARS Bot, Intro to Tools, Scavenger Hunt, and MARS Xray were removed from the included tools. ScreenMagnifier, MARS Bot, Intro to Tools, and Scavenger Hunt were removed because they provide little benefit. And MARS Xray was removed because it is not set up to work with RISC-V, however if someone ports it, it could be merged in.
  • Removed delayed branching
  • Removed the print feature
  • Added a testing framework to verify compatability with the RISC-V specification
  • Significant internal restructuring and refactoring.

For smaller changes refer to all of the commit history

Difficulties I faced while making this

Implementing the RISC-V floating point extension correctly in Java is really hard; it requires pretty much a full implementation of IEEE 754-2008. As far as I know there is not even a complete implementation of IEEE 754. As a result the floating point implementation in RARS is not completely compliant there are a fair number of issue that cannot be easily be fixed.

There aren't any good resources for getting ready to be able to implement the instruction set. Some time in the future, I would like to make a website which explains briefly all of the instructions along with an example program which uses it. If something like that had existed when I started learning, I think I could have gotten up to speed much more quickly.

Potential next steps

I think it may be possible to make a complete implementation of IEEE 754 - 2008 in Java. However, it won't be fast. I think I may take a few weeks to try to make a library that does that. If it works well, I use it to fix up the issues RARS currently has.

I am also going to look into what it would take to get RARS to be able to assemble to ELF binaries and simulate from them. This could enable greater compatibility with existing toolchains and simulators as well as enable programs being debugged in RARS to use existing compiled libraries.

Of course there are also less exciting developments to be made as well. There are several known fixable bugs and polish issues to be fixed.

v0.1

02 Aug 23:37
Compare
Choose a tag to compare
v0.1 Pre-release
Pre-release

Just a quick release for testing