From a3c6f2a997347686418723f4db19a8d2159fe107 Mon Sep 17 00:00:00 2001 From: Daniel Keller Date: Wed, 10 Jun 2026 18:59:14 +0200 Subject: [PATCH] build: Add per-top trimmed vsim compile scripts bender script --top (slang-backed, >= 0.32.0) trims the compile set to files reachable from the given top: 63 instead of 393 sources for the rw_axi backend TB. pipefail makes a failed bender invocation fail the rule instead of leaving a header-only script. --- idma.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/idma.mk b/idma.mk index 0a6d2f53..5376be05 100644 --- a/idma.mk +++ b/idma.mk @@ -247,6 +247,19 @@ IDMA_PICKLE_ALL += $(IDMA_PICKLE_DIR)/idma_rt_midend_synth.sv IDMA_PICKLE_ALL += $(IDMA_PICKLE_DIR)/idma_mp_midend_synth.sv +# --------------- +# Trimmed compile scripts +# --------------- + +# Per-top vsim compile script trimmed via slang (bender >= 0.32.0) +$(IDMA_VSIM_DIR)/compile_%.tcl: $(IDMA_BENDER_FILES) $(IDMA_FULL_TB) $(IDMA_FULL_RTL) $(IDMA_INCLUDE_ALL) $(IDMA_WAVE_ALL) + echo 'set ROOT [file normalize [file dirname [info script]]/../../..]' > $@ + set -o pipefail; $(BENDER) script vsim --vlog-arg="$(IDMA_VLOG_ARGS)" \ + -t sim -t test -t idma_test -t synth -t rtl -t asic -t snitch_cluster -t split_rtl \ + --top $* | grep -v "set ROOT" >> $@ + echo >> $@ + + # -------------- # QuestaSim # --------------