Port to OpenHWgroup RISC-V softcore

In the context of a research project, we were thinking about the port of RIOT OS on a RISC-V softcore given by the OpenHWgroup (https://github.com/openhwgroup). Probably, the cv32e40p.

I’ve seen an old topic trying to get it working on the picorv32: RIOT OS port for the icoBoard FPGA board - icoSoC / picorv32 RISC-V platform - #2 by bergzand

The cv32e40p is quite close to the (already supported) FE310 from SiFive in terms of ISA extensions (only the A extension is missing).

It should be possible as long as we build the architecture around the CPU, right?

I’m not deeply involved in the CPU specific parts, but generally the port should be straightforward.

If it were rv32imac it would be even easier; without atomics there may be some work to do: picking apart what’s riscv and what’s riscv-imac as right now it says “imac” in some of the riscv build files (like, two pages of build system code), and ensuring that it uses the atomic wrappers built around critical sections (which we already have for other atomic-less architectures).

(And then there’s the usual peripheral porting that’s there for every new chip family, but that should be straightforward, and require work proportional to the amount of peripherals you’ll intend to use)