From ef51816a669f76debae1a284df1e52bbcf157d91 Mon Sep 17 00:00:00 2001 From: Ge Song Date: Sat, 26 Sep 2026 13:20:59 +0800 Subject: [PATCH] Makefile: fix paths in the VCS flow Two paths in the VCS flow are resolved against the wrong location: - vcs_build changes into $(vcs-library) before invoking vlogan, but the default flist is relative to the repository root (core/Flist.cva6). vlogan then fails with: Error-[P1ARGS-CANTOPN-F] Cannot open file Unable to open 'core/Flist.cva6' Resolve the flist with $(abspath ...) so it is independent of the current working directory. - the vcs run target passes '$(root-dir)/init_testharness.do' to Verdi, but the file actually lives in util/. The do-file is therefore never loaded and no FSDB is dumped. Point it to '$(root-dir)/util/init_testharness.do'. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index eff5f790801..e8d715bd2df 100644 --- a/Makefile +++ b/Makefile @@ -398,7 +398,7 @@ flist ?= core/Flist.cva6 vcs_build: $(dpi-library)/ariane_dpi.so mkdir -p $(vcs-library) cd $(vcs-library) &&\ - vlogan $(if $(VERDI), -kdb,) -full64 -nc -sverilog +define+$(defines) -assert svaext -f $(flist) $(list_incdir) ../corev_apu/tb/common/mock_uart.sv -timescale=1ns/1ns &&\ + vlogan $(if $(VERDI), -kdb,) -full64 -nc -sverilog +define+$(defines) -assert svaext -f $(abspath $(flist)) $(list_incdir) ../corev_apu/tb/common/mock_uart.sv -timescale=1ns/1ns &&\ vlogan $(if $(VERDI), -kdb,) -full64 -nc -sverilog +define+$(defines) $(filter %.sv,$(ariane_pkg)) +incdir+core/include/+$(VCS_HOME)/etc/uvm-1.2/dpi &&\ vlogan $(if $(VERDI), -kdb,) -full64 -nc -sverilog $(uart_src_sv) &&\ vlogan $(if $(VERDI), -kdb,) -full64 -nc -sverilog -assert svaext +define+$(defines) +incdir+$(VCS_HOME)/etc/uvm/src $(VCS_HOME)/etc/uvm/src/uvm_pkg.sv $(filter %.sv,$(src)) $(list_incdir) &&\ @@ -409,7 +409,7 @@ vcs_build: $(dpi-library)/ariane_dpi.so vcs: vcs_build cd $(vcs-library) && \ - ./simv +permissive $(if $(VERDI), -verdi -do $(root-dir)/init_testharness.do,) \ + ./simv +permissive $(if $(VERDI), -verdi -do $(root-dir)/util/init_testharness.do,) \ +elf_file=$(elf_file) ++$(elf_file) $(if $(spike-tandem), -sv_lib $(SPIKE_INSTALL_DIR)/libyaml-cpp) -sv_lib $(SPIKE_INSTALL_DIR)/libriscv \ -sv_lib ../work-dpi/ariane_dpi | tee vcs.log