I have a very small module level UVM environment. I add "-uvmhome CDNS-1.1d" option with xrun, but it report some compile error. It seems that xrun does not compile UVM library automatically. I use some UVM macros, xrun does not recognize those macros. I think it's because xrun does not pre-compile UVM library. When I use VCS with same file, it can pass. It seems that VCS will pre-compile UVM lib before compile user code, so it does not report error.
Below is my xrun log which report compile error:
xrun(64): 20.09-s007: (c) Copyright 1995-2020 Cadence Design Systems, Inc.
TOOL: xrun(64) 20.09-s007: Started on Apr 23, 2023 at 10:10:41 CST
xrun
-64bit
+notimingchecks
-licqueue
-seed random
+tcl+dump.tcl
-access +rw
-sv
+libext+.v+.sv
-uvm
-uvmhome CDNS-1.1d
-svrnc fatal
-f file.f
+incdir+../include+../src+../env+../tests+../hdl
/home/scripts/python_study/uvmgen/templates/bds_env/tests/bds_env_tb_mod.sv
/home/scripts/python_study/uvmgen/templates/bds_env/hdl/bds_env_top.sv
+UVM_TESTNAME=bds_env_test
Compiling UVM packages (uvm_pkg.sv cdns_uvm_pkg.sv) using uvmhome location /tools/cadence/XCELIUM2009/tools/methodology/UVM/CDNS-1.1d
file: /home/scripts/python_study/uvmgen/templates/bds_env/tests/bds_env_tb_mod.sv
interface worklib.mbus_intf:sv
errors: 0, warnings: 0
interface worklib.mbus_slave_intf:sv
errors: 0, warnings: 0
`uvm_register_cb(mbus_master_monitor,mbus_master_monitor_callbacks);
|
xmvlog: *E,NOTDIR (../src/mbus_master_agent_mbus_master_monitor.sv,52|18): `uvm_register_cb: not a recognized directive or macro [2.7.3][16.3.1][16(IEEE)].
(`include file: ../src/mbus_master_agent_mbus_master_monitor.sv line 52, `include file: ../include/mstr_slv_src.incl line 2, `include file: ../include/bds_env.sv line 11, `include file: ../env/bds_env_ral_env.sv line 7, file: /home/scripts/python_study/uvmgen/templates/bds_env/tests/bds_env_tb_mod.sv line 12)