[BUG] Questasim build broken due to compile order
Created by: christian-lanius
Is there an existing CVA6 bug for this?
-
I have searched the existing bug issues
Bug Description
Since commit b5b3abd7, building the simulation model for Questasim is broken. It complains about packages not being defined. This is due to the Flist.$(target)
being compiled last instead of first, which contains the files for the necessary package definitions.
Additionally, the path for the Flist has been copy/pasted from the VCS simulation setup, but that one starts in a different folder.
Below is a patch to fix this as I do not have a simple way to open a pull request.
diff --git a/Makefile b/Makefile
index 9536db0..f110775 100644
--- a/Makefile
+++ b/Makefile
@@ -308,11 +308,11 @@ build: $(library) $(library)/.build-srcs $(library)/.build-tb $(dpi-library)/ari
# src files
$(library)/.build-srcs: $(util) $(library)
+ $(VLOG) $(compile_flag) -timescale "1ns / 1ns" -work $(library) -pedanticerrors -f core/Flist.$(target) $(list_incdir) -suppress 2583
$(VLOG) $(compile_flag) -work $(library) $(filter %.sv,$(ariane_pkg)) $(list_incdir) -suppress 2583
# Suppress message that always_latch may not be checked thoroughly by QuestaSim.
$(VCOM) $(compile_flag_vhd) -work $(library) -pedanticerrors $(filter %.vhd,$(uart_src))
$(VLOG) $(compile_flag) -timescale "1ns / 1ns" -work $(library) -pedanticerrors $(filter %.sv,$(src)) $(list_incdir) -suppress 2583
- $(VLOG) $(compile_flag) -timescale "1ns / 1ns" -work $(library) -pedanticerrors -f ../core/Flist.$(target) $(list_incdir) -suppress 2583
touch $(library)/.build-srcs
# build TBs