Ripes: a graphical 5-stage RISC-V simulator for teaching purposes

1,816 views
Skip to first unread message

Morten Petersen

unread,
Jun 3, 2018, 11:56:09 AM6/3/18
to RISC-V Teach
Hello all,

I would like to share a project of mine, Ripes - a graphical 5-stage RISC-V simulator for teaching purposes.
The intention of the simulator is to visually illustrate how assembly-level code is executed in a pipelined processor.

The program contains various features such as an integrated assembly code editor (and assembler) as well as a memory-viewer.

I will be refining the program over the summer, in the hope that it will be used for teaching purposes. In this process, pre-built binaries for a couple of platforms will also be made available in the near future.

All requests, comments or suggestions are greatly appreciated.


- Morten Borup Petersen

Bruce Hoult

unread,
Jun 3, 2018, 6:54:38 PM6/3/18
to Morten Petersen, RISC-V Teach
Wow! Looks very very nice! Thank you.


--
You received this message because you are subscribed to the Google Groups "RISC-V Teach" group.
To unsubscribe from this group and stop receiving emails from it, send an email to riscv-teach+unsubscribe@groups.riscv.org.
To post to this group, send email to riscv...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/riscv-teach/e7c70d27-3ccf-48f9-beeb-fd06f435d7f7%40groups.riscv.org.

Marcelo Mandelli

unread,
Jun 3, 2018, 7:45:38 PM6/3/18
to Bruce Hoult, Morten Petersen, RISC-V Teach

alexis.ramos.amo

unread,
Jun 6, 2018, 11:51:13 AM6/6/18
to RISC-V Teach
Great work!
Message has been deleted

Morten Petersen

unread,
Jun 7, 2018, 3:07:59 PM6/7/18
to RISC-V Teach
hank you for the comments.

I have now added a prebuilt version for Windows. I'll hopefully get around to creating some kind of deployment for Linux.

Dee Weikle

unread,
Sep 22, 2018, 8:00:38 AM9/22/18
to RISC-V Teach
Morten,

Did you ever get around to creating a Linux version? I am planning on teaching RISC V in the spring and would need a Linux version.

Dee Weikle

Morten Petersen

unread,
Sep 22, 2018, 8:08:39 AM9/22/18
to RISC-V Teach
Currently, prebuilt binaries are available for Windows as well as Ubuntu, at https://github.com/mortbopet/Ripes/releases.
And thank you for choosing Ripes for the course! If you have any questions, feature requests or notice any bugs, please do not hesitate to contact me.

- Morten Petersen

Taj Muhammad Khan

unread,
Feb 15, 2019, 12:10:50 PM2/15/19
to RISC-V Teach

 Hi Morten,

 I used your simulator in my undergrad Computer Architecture course and it was extremely helpful in visualizing the working of the pipeline, being the only graphical RISC-V simulator I could find that runs on Windows, therefore, a bunch of thanks for building it!

 I wanted to ask you if there's an interface to it that would help run assembly code and visualize the registers without the pipeline i.e. a la single cycle. The reason I ask is that, following the Patterson-Hennessy book, students learn about assembly before they learn about the pipeline. Therefore, it would be helpful if they could play with the assembly programs right from the start.

 Regards,
 Taj.

Morten Petersen

unread,
Feb 15, 2019, 3:05:22 PM2/15/19
to RISC-V Teach
Hello Taj,

I really appreciate the feedback and it is great to hear that the program functions well as a teaching tool. Which university did you teach the course at?

If what you are looking for is something like Ripes, with a graphical view that presents a single cycle (ie. the pipeline registers removed as well as the forwarding logic), then sadly this is not (yet) doable by Ripes.
The internal simulator code as well as graphical view is close to hard-coded, and given this, i do not see a way to provide a clean interface. 

If what you are in need of is a single cycle simulator with a view of the registers, memory as well as nice UI, i highly recommend the Venus simulator: http://www.kvakil.me/venus/ 

The lack of multiple processor views in Ripes is something which has bothered me for a while, given that having graphical views of different processors (such as the following) would likely aid in teaching, using the Patterson-Hennessy book
* Single cycle
* 2/3 stage pipeline
* 5 stage pipeline:
   * Without forwarding/hazard detection
   * With forwarding/hazard detection
   * Branching logic in different stages

Wherein the user would be able to write their code in the assembly editor, switch to the processor tab, select which processor to simulator the code on, and see how these different implementations have different effect on execution.
I am currently working on a project which should make something like this much more feasible, but it will probably take a while before this is integrated into Ripes. However, I will keep this post update whenever improvements to Ripes are made.

Regards,
Morten

Taj Muhammad Khan

unread,
Feb 16, 2019, 12:15:03 AM2/16/19
to RISC-V Teach

 Hi Morten,

  I teach in the Computer Science program of Habib University (https://habib.edu.pk/). It's located in Karachi, Pakistan.

  Thanks for the link to Venus simulator, it looks like it would do the job for the initial stages.

  I agree with you that integrating multiple processor views to Ripes would make your simulator more amenable to use in teaching courses. I'll also try to go through Ripes code to see how it's structured.

  Regards,
  Taj.

Pooja Vashisth

unread,
Sep 21, 2023, 2:11:54 PM9/21/23
to RISC-V Teach

Thanks for this great work.

Can we build simple applications using RIPES. Like glowing LED, or a simple Game , or puzzles.

Thanks,
Pooja
Reply all
Reply to author
Forward
0 new messages