I downloaded Modelsim from Intel, the free version (Modelsim-Intel FPGA editition). The free verison is the 32-bit version of Modelsim on Ubuntu 64-bit LTS. I implemented the workaround for this by installing the apt pkg's for i386 arch.
I want to create a testbench in SV using UVM.
This modelsim seems to only have compiled libraries for device support primitives. So I then downloaded UVM 2017-1.1 (IEEE 1800.2) from Accellera.
The documentation only instructs on how to unzip the tar.gz. Once unzipped, I see the source files with uvm.sv & uvm_pkg.sv and the many svh files for the class files (reg, tlm, macros, drivers, monitors, env, etc.).
I do not see any additional makefile or instructions on how to compile for Modelsim.
I then created my own compile script:
vlog -64 -lint -modelsimini $(MSI_FILE) -quiet -sv17compat -work $(LIB_UVM) ~/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv
vlog -64 -lint -modelsimini $(MSI_FILE) -quiet -sv17compat -work $(LIB_UVM) ~/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm.sv
I also set up UVM_HOME environment variable to point to the directory that contains the src folder in it.
The error I get on my compile script is this:
Error: ** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv(26)
** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_macros.svh(82)
** at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/macros/uvm_tlm_defines.svh(642): Cannot open `include file "tlm1/uvm_tlm_imps.svh".
** Error: ** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv(30)
** at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/dpi/uvm_dpi.svh(40): Cannot open `include file "dpi/uvm_hdl.svh".
** Error: ** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv(30)
** at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/dpi/uvm_dpi.svh(41): Cannot open `include file "dpi/uvm_svcmd_dpi.svh".
I can see the svh files within the src folder, they are nested within the folders indicated. I can only assume the vlog compiler is looking at my local project folder and not the folder where uvm_pkg.sv is located in.
I then tried to use the +incdir+$(UVM_HOME) flag which points to the src file. I still get the same errors.
** Error: ** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv(35)
** at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/seq/uvm_seq.svh(32): Cannot open `include file "/home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1//seq/uvm_sequence.svh".
** Error: ** while parsing file included at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/uvm_pkg.sv(35)
** at /home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1/src/seq/uvm_seq.svh(33): Cannot open `include file "/home/deadsupra/rtl_lib/UVM-18002-2017-11tar/1800.2-2017-1.1//seq/uvm_sequence_library.svh".
Any help would be appreciated. I have searched for any proper method to compile UVM, a lot of it seems to point to +incdir. But a lot of examples are for older versions of modelsim and older UVM 1.1 or 1.2.
I found the issue. In my compile script I gave it the right path to the .sv
files. However, my earlier version of the path in the environment variable UVM_HOME
did not set the directory including the src folder. Once I reran my source.sh script and updated the environment variable, the .svh
files were able to locate the dependency files appropriately.
It was in front of me the whole time as well with the error message showing no src
folder in the path it was looking in: ..../1800.2-2017-1.1//seq/uvm_sequence.svh