make xsim runs the directed unit suite (tests/*.s) under Vivado xsim — the
simulator the host SoC integrates with — instead of Verilator. It exists because
two integrator-reported defects (the LMB back-to-back stale read and the
continuous-assign forwarding-sensitivity gap) lived in the semantic delta
between Verilator and xsim, and Verilator computed the correct answer regardless
of stimulus, so no Verilator vector could catch them. See
docs/verification.md §4.1.
| File | Role |
|---|---|
run_xsim.ps1 |
runner (PowerShell, Windows-native): WSL builds hex → xvlog/xelab once → xsim replays each hex → score PASS/FAIL |
../../tb/xsim/tb_xsim.sv |
SV testbench driver: the analogue of tb/cpp/sim_main.cpp (clk/reset/irq/timeout/tohost-detect over tb_top) |
pwsh sim/xsim/run_xsim.ps1 # all tests/*.s (WSL assembles hex, then xsim)
pwsh sim/xsim/run_xsim.ps1 -NoBuild # reuse existing sim/build/*.hex
pwsh sim/xsim/run_xsim.ps1 -Tests fwd_matrix,loadbase_fwd,bus_patterns
pwsh sim/xsim/run_xsim.ps1 -VivadoBin 'D:\Xilinx\2025.2.1\Vivado\bin'
Exit 0 = all PASS; nonzero = any FAIL/TIMEOUT. Generated artifacts go to
work/ (git-ignored).
- Vivado (xvlog/xelab/xsim) on Windows — auto-detected, or
-VivadoBin/$XILINX_VIVADO. - WSL distro with the riscv toolchain (default
Ubuntu-24.04,-WslDistroto override) to assemble the tests; or pre-build hex in WSL (make -C sim test) and pass-NoBuild.
- The
xsim.batwrapper splits aname=valuearg on=and chokes on a drive-letter colon, so plusargs are passed through a per-run.batwith the value quoted (--testplusarg "hex=foo.hex") and the hex is referenced by a bare relative name from thework/cwd. --runallmust be a CLI flag (it has no effect from a-fcommand file).- The runtime flags are double-dash (
--runall,--testplusarg,--onfinish).