Inspiration

Am currently enrolled in a computer architecture course which focuses on RISC-V assembly and I wanted to try to implement a subset of the instruction set in Java.

What it does

Runs and interprets all R and I type RISC-V 32 bit instructions. You can also get the binary and hex representations for each instruction just like how an assembler would assemble it.

How we built it

Heavily used OOP to promote code re-usability and RISC-V documentation to faithfully recreate the instruction set functions in Java.

Challenges we ran into

Determining how to represent memory in Java was a issue as instructions, the stack, and data are all in memory addresses in the program which meant I had to develop a system to assign memory addresses to these elements.

Accomplishments that we're proud of

Full-Functionality for R and I type instructions was a big accomplishment as it showed proof of concept for expanding it to S,B.U,J type instructions

What we learned

A deeper understanding of RISC-V architecture and Java based interpreters.

What's next for RISC-V 32 bit Program Emulator

Extending the functionality to support loading and storing data (already W.I.P) and supporting branching instructions. After this is implemented, I hope to design a lightweight IDE to accompany this emulator to make developing RISC-V applications easier.

Built With

Share this project:

Updates