How lowrisc/ibex-demo-system works
Based on our analysis of the file tree and README, this project is a comprehensive demo system that showcases a RISC-V SoC built around the lowRISC Ibex core. The system is meant to run on several FPGA development boards (such as the Arty-A7, Arty S7, Nexys A7, Sonata, Blackboard, and Boolean boards) and demonstrates various peripherals (UART, GPIO, SPI, PWM, Timer, debug module, etc.). In addition, the project supports multiple software stacks (C and Rust) and includes simulation and build infrastructure using tools like FuseSoC, CMake, and Verilator. There’s also a containerized environment setup that ensures that all dependencies (Vivado, toolchains, etc.) are readily available to kickstart development.
Main Components
• Hardware/RTL: Show the FPGA’s main block with the Ibex processor at the center. Include the memory bus connecting to RAM and peripherals.
• Peripherals: List all peripherals explicitly described in the README and file structure. These include UART, GPIO, SPI (and by extension the LCD interface via SPI), PWM, Timer, and debug (JTAG) module.
• Board Interfaces: Note that external devices (switches, buttons, LEDs, LCD) connect to specific peripherals (GPIO for switches/LEDs, SPI for the LCD, etc.). Also indicate USB/serial access for debugging/programming.
• Software Stacks: Represent the firmware components. Separate out the C-based and Rust-based demo systems along with the support libraries (or Hardware Abstraction Layers) found in sw/c and sw/rust.
Relationships and Data Flow
• How the debug module interfaces with the JTAG port and how UART is used for serial-console communications.
• Link hardware simulation components (in dv) with the RTL design, indicating that the simulation model (Verilator-based, for example) takes software binaries (ELF/vmem) as input to emulate the system.
Architectural Patterns and Elements
• System-on-Chip (SoC) architecture pattern where a processing core is wired to multiple peripherals via a common bus.
Relevant Technologies, Frameworks, and Libraries
• LowRISC Ibex core and the PULP RISC-V Debug Module.
• Xilinx Vivado for synthesis and bitstream generation.
• Simulation tool – Verilator – as shown in the dv/ and simulation instructions.
• Software build tools: CMake for C stack and Cargo for Rust.
• Containerization with Docker/Podman and optionally Nix for environment management.
• OpenOCD for debugging and FPGA programming.