How xuantie-rv/openc906 works
Project type and purpose
• This is an open-source hardware RTL project implementing the “C906” RISC-V CPU core plus a small SoC test environment.
• The C906_RTL_FACTORY/gen_rtl/… directory contains all the Verilog RTL modules of the CPU’s functional units and system coprocessors (IFU, IDU, IU, LSU, BIU, MMU, PLIC, CLINT, CP0, PMU, DTU, RTU, DSP/FP units, etc.).
• The smart_run/ directory is the simulation/test-bench environment: bus fabrics (AXI, AHB, APB), on-chip peripherals (UART, GPIO, timer), memory models, SDC for synthesis/timing, and test suites.
File structure
• Top-level split:
• C906_RTL_FACTORY/gen_rtl – CPU core RTL
• C906_RTL_FACTORY/setup – environment setup scripts
• smart_run – simulation “SoC” wrapper and test infrastructure
– impl – timing constraint (SDC) files
– logical – bus interconnects, SoC glue, memory/pseudo-RAM models, peripherals, testbench top
– tests – C and assembly test suites, linker scripts, boot code
– setup – toolchain environment scripts
– work – simulation output (waveforms)
• The CPU modules follow an organized pipeline structure:
IFU → IDU → IU / LSU / BIU with cross-cutting agents for CSR (CP0), debug (DTU/TDMI), traps (RTU), interrupts (PLIC), timer (CLINT).
• Bus fabrics in smart_run/logical:
AXI interconnect → AHB → APB bridge → APB peripherals.
README for additional insights
• The README confirms this is a CPU-centric IP with a “smart” testbench.
• It details usage: environment setup, dependencies on an external RISC-V toolchain, supported simulators (iverilog, vcs, irun).
Elements
– Clear labels for each block (e.g., “aq_ifu_top”, “aq_lsu_top”, “AXI Interconnect”, “UART_APB”)
• Bus fabrics (another)
• Peripherals (distinct)
• Debug/Test harness (distinct)