4 ms·
Most microcontrollers don't have I-cache, and I don't know of any 8/16 bit CPU cores that are significantly smaller on an FPGA than the SeRV implementation of R
by kragen 4y ago
Most microcontrollers don't have I-cache, and I don't know of any 8/16 bit CPU cores that are significantly smaller on an FPGA than the SeRV implementation of RISC-V, which fits in 200 4-LUTs. Do you?
PicoBlaze in particular is about the same size as SeRV (96 6-LUTs I think) and really limited even compared to other 8-bit cores. It's a lot faster than SeRV, though, and has denser code—it has to, since its maximum program size is 1024 instructions. SeRV's RISC-V support lets you compile your code with GCC or clang.
I do agree with your broader point that the C extension trades off a bit of decode complexity against a tiny amount of program memory size, even if that's mask ROM or something instead of SRAM I$, so there are not many cases where omitting the C extension is a good tradeoff. Just, I'm not sure the architectural data word width really bears on this.
- hajile 4y agoI-cache was just one example that most people find easy to understand. The original paper on compressed instructions claims 25-30% reduction in total instruction size. A typical small M0 microcontroller will have something like 4-32kb of RAM and 32kb to 1MB of flash storage. No matter how you slice it, saving 30% of your instruction space is a HUGE deal. Even with EEPROM (usually used for flash memory) taking just 2 transistors per bit, we're still talking about compressed instructions taking up 200 bits, 40 bytes, or just TEN 32-bit instructions in your flash memory. With that 30% optimistic number, any program with more than 30 instructions will have a net benefit from compressed instructions. Even my very pessimistic 10% number would mean just 100 instructions before you break even.