Verification Workflow¶
Complete pipeline for verifying the pccx-FPGA RTL via pccx-lab: from testbench compilation through Vivado synthesis report ingestion.
Architecture overview¶
The verification pipeline is split across two repositories:
Repo |
Role |
|---|---|
|
RTL + testbenches + |
|
|
A shell bridge (run_verification.sh) compiles each testbench under
xsim, captures the canonical PASS: <N> cycles / FAIL: … line, and
hands it to the from_xsim_log binary which emits a .pccx trace
file the UI can load.
End-to-end flow¶
┌──────────────────────┐ xvlog+xelab+xsim ┌──────────────────┐
│ hw/tb/*.sv │ ───────────────────▶ │ xsim.log │
└──────────────────────┘ └──────────────────┘
│
│ from_xsim_log
▼
┌──────────────────────┐
│ hw/sim/work/<tb>/ │
│ <tb>.pccx │
└──────────────────────┘
│
run_verification / │ load_pccx
load_pccx IPC ▼
┌──────────────────────┐
│ pccx-lab native app │
│ Timeline / Synth │
└──────────────────────┘
Running the suite¶
From the pccx-FPGA-NPU-LLM-kv260 root:
hw/sim/run_verification.sh
The script:
Compiles each tb’s RTL deps listed in
TB_DEPS(associative array).Elaborates + runs under
xsim(xvlog / xelab / xsim in sequence).Parses the PASS/FAIL footer and invokes
pccx-lab’sfrom_xsim_logconverter to emithw/sim/work/<tb>/<tb>.pccx.Prints the per-testbench verdict table plus the current synth timing status from
hw/build/reports/timing_summary_post_synth.rpt.
Adding a new testbench¶
Only two lines in run_verification.sh need changing:
TB_DEPS[tb_new_module]="SUB_DIR/new_module.sv"
TB_CORE[tb_new_module]=N # distinct core-id for the emitted trace
Place tb_new_module.sv under hw/tb/. Emit the canonical line:
$display("PASS: %0d cycles, both channels match golden.", N_CYCLES);
// or on failure:
$display("FAIL: %0d mismatches over %0d cycles.", errors, N_CYCLES);
Those are the exact strings the from_xsim_log parser matches.
pccx-lab integration¶
Once the .pccx files exist, open the pccx-lab native app and navigate
to Verification → Synth Status. Three widgets appear:
Run Verification Suite — invokes
run_verificationIPC which shells out torun_verification.shand returns a structured summary (per-tb PASS/FAIL + timing-met verdict + generated.pccxpaths).Per-row
Openbuttons — callload_pccxon each tb’s.pccx. The Tauri backend caches the trace and emits atrace-loadedevent that the Timeline component subscribes to, so the canvas refreshes automatically.Synth Status card — parses
hw/build/reports/{utilization,timing_summary}_post_synth.rptand surfaces LUT / FF / RAMB / URAM / DSP counts plus WNS / failing endpoints / timing-met verdict on the worst clock.
Available IPC commands¶
Command |
Input |
Output |
|---|---|---|
|
|
|
|
— |
flat binary buffer (24 B/event) |
|
— |
per-core utilisation % + totals |
|
|
per-tb results + synth status |
|
|
list of generated |
|
|
|
|
|
SV stub text |
|
— |
enterprise-mode PDF summary |
|
— |
LLM-prompt-sized summary string |
End-to-end testing¶
The src/ui/e2e/ pytest suite covers every step of the pipeline:
Test |
What it proves |
|---|---|
|
UI shell renders, menu + Synth Status tab reachable |
|
|
|
Vivado report parser extracts the right NPU_top counts + WNS |
|
Full suite runs end-to-end + |
Run with:
cd src/ui/e2e && .venv/bin/pytest -v
Failure modes and debugging¶
Symptom |
Likely cause |
Fix |
|---|---|---|
|
Selenium caps missing |
Already wired in |
|
Running via Vite browser preview, not native window |
Expected — open via |
xvlog |
Missing |
Add |
|
Scoreboard underrun — golden queue empty when |
Adjust stimulus / reset timing in the testbench |