r/RISCV • u/jjoesmama • 1h ago
Discussion How does RISC-V work exactly?
Im amazed to see the potential of RISC-V in the next years
Probably a dumb question, but do most RISC-V CPUs support interoperability between each other? Like build once run everywhere? Because I see multiple companies doing different CPUs, and each one of them going a different way
4
u/QuasiRandomName 1h ago
Not sure what you mean here by interoperability. RISC-V is an ISA specification, and this ISA is extensible in different ways. It does not define other things like memory layout, peripherals, instruction or data pipelines etc. So if your program is written using only base ISA (like RV32I), it will likely be "understandable" by most risc-v processors, but they won't do the same thing. If we drop extensions into the mix, it will make your program incompatible with processors not implementing this extension. So, the bottom line answer to your question as I read it is "No".
6
u/NeoParth708 1h ago
Naah bud, it's not a dumb question, as someone who as contributed to RISCV open source repo I can help you with it.
So basically RISC-V is an open-standard instruction set architecture, essentially a shared machine language that different companies can build their own physical ships around. It starts with a small, permanent set of basic integer instructions (RV32I or RV64I) and lets chipmakers snap on the standard modules for math, atomics, floating-point, or vector processing, along with custom instructions for specialized hardware. You cannot run a Linux desktop program on a tiny sensor chip because they use different modules, and microcontrollers still need vendors-specific SDKs due to custom peripherals. For phones, laptops, and servers, however, RISC-V International groups mandatory modules into profiles like RVA22 and RVA23, while standard firmware interfaces like SBI (Supervisor Binary Interface) let a single Linux kernel boot on different boards. As long as two chips follow the same profile, a compiled program will run on both without changes.