How guztech/misato works
Project type and purpose
• This is a hardware‐design project: a single‐cycle RISC-V RV32I CPU core (“Misato”), written in Amaranth HDL (Python) and formally verified with SymbiYosys.
• It comes with a SoC wrapper for FPGA (ULX3S), separate instruction/data memories, and (in a branch) a Wishbone Classic bus interconnect to peripherals (GPIO).
File structure
Top‐level source files (Amaranth modules):
– cpu.py : top‐level CPU core
– decoder.py : instruction decode logic
– isa.py : instruction definitions, encodings
– alu.py, adder.py : arithmetic/logic units
– forwarding.py : pipeline‐hazard forwarding logic
– branch.py : branch target generation
– ram.py, rom.py : single‐cycle instruction/data memories
– interconnect.py : Wishbone Classic bus master interface
– gpio.py : simple memory‐mapped peripheral
– soc.py : system‐on‐chip wrapper (connects core, memories, bus, GPIO)
– ulx3s.py : FPGA‐specific pinout constraints & build script
– misatogen.py : automatic generation of core instances/parameters
Verification & build:
– *.sby : SymbiYosys formal verification scripts (cpu.sby, decoder.sby)
– *.gtkw : GTKWave waveform setups
– .github/workflows/openlane.yml : ASIC flow via OpenLANE (Sky130 & 65 nm PDKs)
Tests & docs:
– programs/ : small assembly tests (branch.s, count.s, etc.)
– riscv-filter.py : post‐processing of simulation traces
– README.md, PDFs for RISC-V spec & Wishbone spec
README for additional insights
• All RV32I instructions except FENCE, ECALL, EBREAK are implemented.
• Formal verification covers functional correctness of each instruction.
• Current design uses separate instruction/data memories; a Wishbone interconnect is under development.
• Target flows: formal (SymbiYosys + GTKWave), FPGA (ULX3S), ASIC (OpenLANE).