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

Add source-mapped highlighter support #185

Closed mortbopet closed 2 years ago

mortbopet commented 2 years ago

Currently, in-flight instructions are highlighted in the ProgramViewer, where there is a 1:1 correspondance between the PC in a given stage and the address of a given instruction.

To support things such as #180, source-mapped highlighter support must be implemented. In doing so, we have to implement:

  1. The datastructure responsible for mapping source line <-> instruction address. This is statically determined upon compilation/assembly
  2. Support for, at runtime, using the above map and StageInfo information from the processor to determine instruction highlighting.
  3. Ensure that highlighting is cleared adequately when any change to the source code occurs.