mortbopet / Ripes

A graphical processor simulator and assembly editor for the RISC-V ISA

Home Page:https://ripes.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Towards migrating Ripes on Qt6

magiwanders opened this issue · comments

On my local copy of the Ripes repository (updated to latest commit on main) I have migrated the project to Qt 6.5 (beta-1) with no compile time error. There are however a few runtime issues left:

  1. From simple manual testing it is clear that although the UI works, but the simulation engine broke as no instruction is processed, no visualization value changes et cetera. This was not really expected after migrating VSRTL to Qt6 (see mortbopet/VSRTL#55) the simulation engine worked. Now, I am not familiar with Ripes testing routine nor QtCreator automated testing. Where can I find more information on how to test Ripes?
  2. The Applicatoin Output shows the following errors that I am not sure how to test for:

qt.dbus.integration: Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
QVariant::load: unknown user type with name QListRipes::CachePreset.

This issue is part of the bigger overarching goal of porting Ripes to WebAssembly as described in #188 . In particular, this is the second step (migrating Ripes to Qt6).

Now, I am not familiar with Ripes testing routine nor QtCreator automated testing. Where can I find more information on how to test Ripes?

The ripes tests (as defined here: https://github.com/mortbopet/Ripes/tree/master/test) are, in CI, run through this script https://github.com/mortbopet/Ripes/blob/master/.github/workflows/scripts/run_tests.sh. You can thus run these tests automatically, or run them through the QtCreator UI.]

Testing has been notoriously lackluster for both VSRTL and Ripes (although it used to be much, much worse). These tests are akin to integration tests and thus include dependencies on VSRTL, the Ripes assembler, some UI stuff, ...
Seeing as migrating Ripes to Qt6+WASM is a framework question, I'm not expecting that there will be that much change needed to the core logic of Ripes itself. Runtime issues like you're describing sounds to me like some small pesky bugs either in the Ripes code (likely) or Qt code (unlike).

Since you've verified that the Ripes UI work, i'd suggest proceeding with debugging in the following order:

  1. Ensure that the assembler is working
  2. Ensure that the assembled program is view-able in the memory tab
  3. Ensure that the memory structure provided to the processor contains the just assembled program (https://github.com/mortbopet/Ripes/blob/master/src/processorhandler.cpp#L117)
  4. Ensure that, when 'reset' is triggered in the Ripes UI, that this memory is actually being written (https://github.com/mortbopet/VSRTL/blob/c4ad8811947b6955b6e7b5720ab33df42f1f151c/core/vsrtl_addressspace.h#L80)
  5. Likewise, when clocking the processor, making sure that things are being loaded from memory.

Sure, I'd be interested! Although I don't know how "interesting" this work is from a RISC-V standpoint (this is mostly Qt and general C++ dev work, and not so much RISC-V specific... but we can always find something that is once this is done ;)).
Feel free to reach out to me at mpetersen@microsoft.com