How 0bab1/holy_core_course works
Project Type & Purpose
• This is an educational, open-source 32-bit RISC-V core project (“HOLY CORE”) organized into multiple learning “editions”:
• Single-cycle edition (fully combinational fetch–decode–execute in one cycle)
• FPGA edition (adds cache, AXI, I/O and targets a Zybo Z720 board)
• The goal is to teach digital-design fundamentals in SystemVerilog with a cocotb-based test workflow, then show how to synthesize and run on FPGA.
Directory Structure Analysis
a. Top-level artifacts
– setup.md, readme.md, LICENSE, CI workflow, .gitignore
– ref_tables.pdf, images/ (docs & banners)
b. Edition folders
– single_cycle_edition/
· src/ (alu.sv, control.sv, cpu.sv, load_store_decoder.sv, memory.sv, reader.sv, regfile.sv, signext.sv)
· packages/ (holy_core_pkg.sv)
· tb/ (cocotb tests in Python + Makefiles + small SV harnesses)
– fpga_edition/
· src/ (same CPU building blocks + holy_cache.sv + external_req_arbitrer.sv)
· packages/ (AXI interface pkg, core pkg)
· fpga/ (holy_wrapper.v, AXI details, Vivado .tcl & constraints)
· test_programs/ (assembly test scripts for on-board runs)
· tb/ (extended cocotb testbenches + SV translators)
c. Tooling & configs
– Makefiles per module for simulation
– Python/cocotb test runners
– Vivado/TCL scripts for FPGA build
– CI pipeline triggers simulation tests
Key Components
• Core datapath blocks: ALU, Control Unit, Register File, Sign-Extender, Load/Store Decoder, Memory Interface
• Packaging: holy_core.sv as top-level CPU instantiation
• FPGA wrapper: holy_wrapper.v exposes AXI bus, connects to holy_cache.sv and external_req_arbitrer.sv
• External interfaces:
• On-chip memory (BRAM) + Cache + AXI4 master
• GPIO / LEDs on Zybo Z720
• Host-side cocotb harness (Python + Makefile) for simulation
• Tools & workflows:
• Simulation flow (cocotb + Python)
• Synthesis/Implementation flow (Vivado via TCL)
Relationships & Data Flow
• In simulation: Python testbenches drive SV test harness → instantiate core modules → connect to model memory or AXI translators → observe outputs via cocotb.
• In FPGA: holy_wrapper.v sits at top, instantiates holy_core + holy_cache + external_req_arbitrer → AXI master drives external DDR → I/O pins map to constraints.xdc → Vivado bitstream → Zybo board.
• Within the core: Instruction fetch → Reader → Sign-Extender → Control → ALU → Memory interface → Register writeback.
Architectural Patterns & Principles
• Modular RTL blocks in SystemVerilog, packaged by functionality
• Clear separation of concerns: datapath vs control vs bus interfacing
• Test-driven design: cocotb harnesses wrap each block under test
• Two distinct build flows (simulation vs FPGA) with separate toolchains