When a trap occurs in mini-rv32ima, always pass to the host rather than allowing running code to handle it. This would be important for a real OS, but the aim of uvm32 is embeddable logic - not full emulation.

As all traps are caught by host, begin testing mini-rv32ima internals by checking PC oob and PC alignment.
This commit is contained in:
Toby Jaffey 2025-12-14 11:00:45 +00:00
parent be5dbbfa44
commit 5dc9acdf3d
8 changed files with 75 additions and 3 deletions

View file

@ -40,6 +40,7 @@ SOFTWARE.
// Setup and hooks for mini-rv32ima emulator core
#define MINIRV32_DECORATE static
#define MINIRV32_RETURN_TRAP
#define MINI_RV32_RAM_SIZE UVM32_MEMORY_SIZE
#define MINIRV32_POSTEXEC(pc, ir, retval) {if (retval > 0) return retval;}
uint32_t _uvm32_extramLoad(void *userdata, uint32_t addr, uint32_t accessTyp);