The following website is a course project under
the guidance of Dr T.V Kalyan. It is a web simulator
which converts the Assembly code
written RISCV syntax
to Machine code
and provides a user-friendly environment for its execution. The simulator implements pipelining, branch
prediction and data forwarding, which can be enabled or disabled by the user.
R format:
add, and, or, sll, slt, sra, srl, sub, xor, mul, div, rem
I format:
addi, andi, ori, lb, ld, lh, lw, jalr
S format:
sb, sw, sd, sh
SB format:
beq, bne, bge, blt
U format:
auipc, lui
UJ format:
jal
Assembler Directives:
.text, .data, .byte, .half, .word, .dword, .asciiz
Name | Entry Number |
---|---|
Bharat Ladrecha | 2018CSB1080 |
Subham Sahu | 2018EEB1183 |
src
│ README.md
│ tsconfig.json
│
└───assets
│ index.html
│
└───css
│ style.css
│
└───js
│ main.ts
│
└───encode
│
└───execute
encode contains files required
to convert Assembly Code
written in RISC V
syntax into
Machine Code
execute contains files required to execute the generated Machine Code
main.ts is the entrypoint of the application
Ctrl+S
on
Editor Pane current file will be downloaded.Ctrl+S
on
Simulator Pane Output file will be downloaded if it’s assembled.Ctrl+/
as comment shortcutCtrl+D
on
Simulator Pane stats file will be downloaded provided that execution is complete.RISCV Heritage
clone the repo and checkout GUI
branch. If you do have the
project then go to step 2
git clone URL
git checkout GUI
npm install
npm run start:dev
RISCV Heritage
by visiting http://localhost:1234/npm run build
BreakPoint:- Users can use a breakpoint for debugging. Users can select as many breakpoints as s(he) wants. During the execution of instructions, the program will stop after the execution of selected instructions in the order of program flow.
Run:- To run the complete program in a single go, users can use it. For pipelined version the animation cycle duration can be tuned by the user from the settings menu.
Step:- Run the program instruction wise(one instruction at a time).
Stop:- Stop the execution process using the stop button.
Reset:- Reset the current execution process. It will also reset the memory and registers state.
Dump:- Users can copy the machine code to clipboard using it.
Cancel:- Destroys the current execution and moves one step back.
Settings:- Execution configuration can be changed by clicking this button before assembling the code. If assembled then it shows the configuration in READ ONLY mode.
Memory Segment displays only those
values into which something is explicitly written during program execution or in the data segment
and all other values which are not shown are 0x00
Although code segment data is shown in memory it cannot be retrieved by the user, by accessing that location. This is to ensure that there is no structural hazard.
On any error, the program will alert the user and will not proceed further for execution
Any instruction which uses
Double like sd, ld
are invalid since it is 32-bit system
We have assumed that hazards are those dependencies which causes our pipeline to stall. So, any data dependency which are successfully handled by data forwarding won’t be considered as a data hazard.
Latest Deployed version: RISCV Heritage