[DV common] Fixes in sim.mk for Verilator
This commit fixes two of the pre-build steps - copying tool sources and
SV filelist generation. Verilator build is invoked from within FuseSoC,
so the filelist generation is skipped. Also, Verilator does not have
additional tool sources that need to be copied over. This fixes the
sim.mk in preparation of adding Verilator support to DVSim.
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/hw/dv/tools/dvsim/sim.mk b/hw/dv/tools/dvsim/sim.mk
index adceb0b..f64748f 100644
--- a/hw/dv/tools/dvsim/sim.mk
+++ b/hw/dv/tools/dvsim/sim.mk
@@ -17,7 +17,9 @@
prep_tool_srcs:
@echo "[make]: prep_tool_srcs"
mkdir -p ${tool_srcs_dir}
+ifneq (${tool_srcs},)
${LOCK_TOOL_SRCS_DIR} "cp -Ru ${tool_srcs} ${tool_srcs_dir}/."
+endif
pre_build: prep_tool_srcs
@echo "[make]: pre_build"
@@ -28,7 +30,9 @@
gen_sv_flist: pre_build
@echo "[make]: gen_sv_flist"
+ifneq (${sv_flist_gen_cmd},)
cd ${build_dir} && ${sv_flist_gen_cmd} ${sv_flist_gen_opts}
+endif
build_tb: gen_sv_flist
@echo "[make]: build the testbench"