CVA6 testharness on VCS: three TB fixes, plus checkpoint-vs-FSDB-dump timings on a real core
Running CVA6's corev_apu testharness (cv64a6_imafdc_sv39, make vcs_build) on VCS W-2024.09:
1. make vcs_build fails with 'Cannot open core/Flist.cva6': vlogan runs inside work-vcs, so pass flist=$CVA6_REPO_DIR/core/Flist.cva6. If a site module puts GNU make 3.80 first on PATH, the Makefile fails with 'only one else per conditional'; use make 4.x. The verif/sim UVM Makefile sets CVA6_TB_DIR/CORE_V_VERIF only when CVA6_REPO_DIR is unset, so pass them on the make line.
2. SimDTM (fesvr dtm_t) aborted with a double free in context_t::switch_to. Elaborate with -pvalue+ariane_tb.dut.InclSimDTM=0. The ELF is preloaded by ariane_tb and the run ends through rvfi_tracer tohost: pass +tohost_addr=<nm tohost>, because the tracer's read_symbol is broken (a local symbols map shadows the global in elfloader.cc).
3. The stock ariane_dpi.so links both CVA6's elfloader (read_elf/get_section) and libfesvr's (read_elf/read_section_sv), and the mix gives a double/invalid free at exit even after PASS. Relink the DPI from msim_helper.o, remote_bitbang.o and SimJTAG.o with -lfesvr only.
Also: the TB writes per-cycle trace text files (trace_rvfi_hart_00.dasm, trace_hart_0*.log, iti.traces); symlink them to /dev/null for long runs. Spike's vendored build needs dtc, svdpi.h on the include path, and YAMLDIR=<absolute path> when the build dir is outside the source tree. With cmake 4, set CMAKE_POLICY_VERSION_MINIMUM=3.5.
Timings, CoreMark 1 iteration (1.05M cycles), single runs, about ±2% noise: opt 206 s; -debug_access+r+cbk 277 s; -debug_access+all 598 s; plus a full +all FSDB 670 s (330 MB, 103M VCs); plus UCLI checkpoint -add every 1/5/10% keeping 3: 598-617 s. A checkpoint add takes about 7 ms, about 30 MB PSS each. Checkpoints need runtime -ucli -ucli2Proc. Joining a checkpoint deletes all later ones, so replay newest-first. A 3rd join after two FSDB-dumping replays crashed in the FSDB PLI's join hook. Replays from 3 checkpoints were bit-identical to the full dump (fsdbreport -csv of 20 signals). File save: 3.1 s and 107 MB (LZ4) each, but a zstd --patch-from delta between consecutive saves was only 271 KB.