06/08/2022
I've been working on flintRV - a RISC-V CPU from scratch.
There are probably more highlights here, but I find these to be the most compelling reasons.
There's also a great talk on this subject on this Hackaday video here - MicroFPGA.
Just one point to make here before continuing - when starting an embedded project that needs some sort of controller, the wise/simple choice would be to consider microcontrollers first over designing and using one's own (or someone elses) CPU design. Often times off-the-shelf ARM Cortex based micros these days already cover a vast range of projects. There's even the popular Raspberry Pi Pico that features 2 Cortex M0+ CPUs, plenty of peripherals - RAM/ROM - I/O, and even a fancy Programmable IO unit (PIO) to flexibly create a new hardware interface.
RV32I ISA here (32-bit Integer)Fetch/Decode -> Execute -> Memory -> WritebackThe idea for the first-go is to keep things simple, then expand later.
Here's the breakdown of the flow I have set-up (for now):
GNU Make: for the build toolVerilator: for converting synthasizable Verilog to a cycle-accurate simulation modelPython: for scripting and code generatingriscv64-unknown-elf-gcc: C/C++ cross-compilerDocker: for an easy-mode way to contain riscv cross-compiler in a containerGTKWave: Tool to view signals of simulation runs graphicallyWill later explore SymbiYosys, Yosys, and z3 to
perform formal verification on certain critical components.