How sergeykhbr/riscv_vhdl works
This repository combines a RISC-V SoC design with a C++ debugger and simulation ecosystem. The principal workflow is firmware execution on the River processor and SoC peripherals, with the debugger providing command, inspection, and visualization facilities against simulated or FPGA targets. The graph preserves documented CPU models, debugging and bus capabilities, and major peripheral areas. Some subsystem connections are documented only at a high level; unsampled source is not treated as inspected, and unverified links are omitted.
Main entry points: asic_gencpu64_top.cpp SoC top · main.cpp Debugger application · socsim_plugin SoC simulator · core River CPU
Components 19
SoC implementation
- River CPU
sc/rtl/internal/riverlib/core - River cache
sc/rtl/internal/riverlib/cache/dcache_lru.cpp - River CSR
sc/rtl/internal/riverlib/core/csr.cpp - SoC top
sc/prj/impl/asic_gencpu64/asic_gencpu64_top.cpp - AMBA fabric
sc/rtl/internal/ambalib
SoC peripherals
- UART peripheral
sc/rtl/internal/misclib/apb_uart.h - SD controller
sc/rtl/internal/sdctrl/sdctrl.cpp
Debugger runtime
- Debugger application
debugger/src/appdbg64g/main.cpp - Debugger services
debugger/src/libdbg64g/services - Service API
debugger/src/common/iservice.h - DPI client
debugger/src/libdbg64g/services/remote/dpiclient.cpp
Debugger UI
- Debugger GUI
debugger/src/gui_plugin/gui_plugin.cpp - Coverage view
debugger/src/gui_plugin/CpuWidgets/CodeCoverage/CodeCoverageWidget.cpp
Simulation models
- SoC simulator
debugger/src/socsim_plugin - SystemC CPU
debugger/src/cpu_sysc_plugin - Functional CPU
debugger/src/cpu_fnc_plugin
Other components
- Firmware engineer
- FPGA target
- Ethernet EDCL
Connections 20
- Firmware engineer → Debugger application: starts debugger
- Debugger application → Service API: configures services
debugger/src/appdbg64g/main.cpp - Service API → Debugger services: registers services
- Debugger GUI → Coverage view: hosts view
- Debugger services → DPI client: includes remote access
debugger/src/libdbg64g/services/remote/dpiclient.cpp - DPI client → FPGA target: exchanges DPI requests
- Firmware engineer → SoC top: runs firmware
- SoC top → AMBA fabric: instantiates SoC
- SoC top → River CPU: runs processor
- SoC top → UART peripheral: integrates peripheral
- SoC top → SD controller: integrates peripheral
- River CPU → River cache: uses cache
- River CPU → River CSR: uses control registers
sc/rtl/internal/riverlib/core/csr.cpp - Firmware engineer → SoC simulator: runs simulation
- SoC simulator → Functional CPU: supports functional model
- SoC simulator → SystemC CPU: supports precise model
- Debugger application → SoC simulator: loads simulator plugin
- Debugger application → FPGA target: debugs target
- Debugger application → Ethernet EDCL: uses EDCL transport
- Ethernet EDCL → FPGA target: connects to target