How pulp-platform/hwpe-tb works
This repository is an almost-standalone simulation testbench for a PULP Hardware Processing Engine (HWPE), demonstrating fixed-point multiply-accumulate offload from a RISC-V core. The principal workflow is: the C test configures the accelerator through memory-mapped registers, starts a job, waits for completion, and checks output values; the RTL testbench supplies the simulated platform. The README documents the core, dummy memories, and accelerator IPs, but their RTL internals are not included in the excerpts, so those relationships are shown only where documented.
Main entry points: tb_hwpe.c C testbench · sim_hwpe.sv Simulation top · tb_hwpe.sv RTL testbench · hwpe-mac-engine MAC engine
Components 16
Software test
- C testbench
sw/tb_hwpe.c - Register definitions
sw/archi_hwpe.h - HWPE HAL
sw/hal_hwpe.h - Input vectors
sw/inc - Tiny printf
sw/tinyprintf.h - Boot code
sw/crt0.S - Interrupt vectors
sw/vectors.S
Simulation platform
- RISC-V core
- RTL testbench
hw/rtl/tb_hwpe.sv - Simulation top
hw/rtl/sim_hwpe.sv - Dummy memories
hw/rtl/tb_dummy_memory.sv - Verilator driver
hw/sim_main.cpp - Output memory
HWPE IPs
- MAC engine
hw/ips/hwpe-mac-engine - HWPE control
hw/ips/hwpe-ctrl - HWPE streaming
hw/ips/hwpe-stream
Connections 16
- RISC-V core → C testbench: runs
README.md - C testbench → Register definitions: uses offsets
sw/tb_hwpe.c - C testbench → HWPE HAL: configures and starts
sw/tb_hwpe.c - C testbench → Input vectors: loads vectors
sw/tb_hwpe.c - C testbench → Tiny printf: includes
sw/tb_hwpe.c - Boot code → RISC-V core: boots
README.md - Interrupt vectors → RISC-V core: provides vectors
README.md - RTL testbench → RISC-V core: hosts
README.md - RTL testbench → Dummy memories: uses
README.md - RTL testbench → Simulation top: instantiates
- Verilator driver → Simulation top: evaluates
hw/sim_main.cpp - Simulation top → HWPE control: integrates
README.md - Simulation top → HWPE streaming: integrates
README.md - Simulation top → MAC engine: integrates
README.md - MAC engine → Dummy memories: streams data
- C testbench → Output memory: checks values
sw/tb_hwpe.c