mini-rv32ima icon indicating copy to clipboard operation
mini-rv32ima copied to clipboard

Customizing allowed instruction set?

Open GlaireDaggers opened this issue 1 year ago • 1 comments

Hello!

I am looking into this project in the context of making an arguably somewhat esoteric "fantasy console" that tries as hard as possible to be a realistic PSX-style game console and would run on an emulated RISC-V core w/ memory mapped peripherals, etc, and wanted to avoid having to write the core emulator myself.

Ideally, I would like to opt for a very minimal rv32em instruction set, which is what I have built my GCC toolchain to target. Of course a full rv32ima core would run such instructions just fine, but I'd like to restrict the allowed registers & instruction set for added challenge. Is there a good way for me to accomplish this, should I just fork and trim out what I don't need, etc.?

GlaireDaggers avatar Aug 18 '23 22:08 GlaireDaggers

Actually, reading through the source, maybe it would be enough for me to just define my own MINIRV32_CUSTOM_INTERNALS? So that perhaps I could write a replacement REG/REGSET that just masks the register number to fit the x0-x15 range? That still leaves atomics but honestly I'm not sure how much I care about restricting those.

GlaireDaggers avatar Aug 19 '23 03:08 GlaireDaggers