mortbopet / Ripes

A graphical processor simulator and assembly editor for the RISC-V ISA
https://ripes.me/
MIT License
2.57k stars 274 forks source link

Premature ECALL execution #275

Open Karazynol opened 1 year ago

Karazynol commented 1 year ago

Using the factorial.s assembly example code, I noticed the ecall (here for printString) being output to the console before the command should have been able to run.

As can be seen in the picture below I was using the Single-Cycle Prozessor and the addi x17 x0 4 command has just finished when there's already a prompt to be seen. One can see the command being executed in the Processor View when continuing another step but apart from that virtually nothing else happens. grafik

I believe sth similar happens for the 5-Stage Processor as well, in this case the prompt can be seen while ecall is still in the Execute stage grafik

The same problem occurs when reverse stepping (undo) but I think this could be related to #57.