-
Notifications
You must be signed in to change notification settings - Fork 398
Description
I use the following command to compile the Vivado libraries:
$(GHDL_PATH)/lib/ghdl/vendors/compile-xilinx-vivado.sh --unisim --vhdl2008 --source $(VIVADO_PATH)/data/vhdl/src --output $(VENDOR_LIB_RELDIR)/$(SIMULATOR_NAME)
When using the debug flag -d, I noticed that GHDL compiles each component individually, i.e., GHDL is called each time a new file is compiled. I think this creates a big overhead during the compilation of the libraries.
With Questa or Modelsim, we can do the same but performance (the time it takes to compile everything) is severely affected.
A much better approach is to list all the components in a file and provide this file to a single call of the vcom command, e.g.:
vcom (...) -f <file_with_all_lib_components_listed>.cmf
This approach is really really much faster than calling vcom for each file.
I do use a Questa version that is not supported by Vivado so I have to compile the libraries manually (i.e., not using Vivado) and I can see the big different with both approaches.
In our runners setup, we always compile the Vivado libraries before running simulation. As this takes less than 1 minute with Questa, the time cost is very minimal so we do it all the time. But with GHDL, this is taking from 5 to 10 minutes to finish, depending on the machine specs.
-
Does GHDL support such a feature where we can compile all files in one go (or alternatively we could use
xargs)? -
Would that require a lot of effort to refactor
compile-xilinx-vivado.shto call GHDL per library instead of per component?
For your reference, using this approach in NVC, took the compilation time from few minutes to few seconds:
nickg/nvc#1098