A C++ program which can convert a RISC – V assembly code to its corresponding Machine Code along with Data Memory. Here is the link for RISC – V simulator https://venus.cs61c.org/ . All conversion is based on formats present in RISC – V Reference Sheet available in Project.
Test Cases for several Programs such as Sorting, Factorial is provided in the project for better understanding.
The Project currently supports all instructions available in format.txt file. Pseudo instructions such as Load Address and Load Word (due to data part) is also handled.
• C ++
• RISC – V (32-Bit Architecture)
• Type following
-> Place the code to translate in test.asm File
-> Compile A-to-M.cpp
-> Output will be produced in MCode.mc File
-> MCode.mc has Machine Code in Hexadecimal Form with Program Counter followed by Data Memory Part.
Kritagya Agarwal