How does UVM's run_test search testcase ?
It depends on the simulator:
- QuestaSim, Xcelium: You have to
import
pkg or `include
file in top testbench - VCS: VCS automatically search testcase in other Compilation Units
1 | // test_pkg.sv |
1 | // tb_top.sv |
simulator | cmd | result |
---|---|---|
VCS | vcs -sverilog -ntb_opts uvm-1.2 test_pkg.sv tb_top.sv ./simv +UVM_TESTNAME=my_test |
✓ |
Xcelium | xrun -64 -uvmhome CDNS-1.2 test_pkg.sv tb_top.sv +UVM_TESTNAME=my_test |
✗ |
QuestaSim | vlog test_pkg.sv tb_top.sv -L $QUESTA_HOME/uvm-1.2 vsim -c -do "run -all;exit" +UVM_TESTNAME=my_test work.tb_top -L $QUESTA_HOME/uvm-1.2 |
✗ |
Xcelium log:
UVM_WARNING @ 0: reporter [BDTYP] Cannot create a component of type 'my_test' because it is not registered with the factory. UVM_FATAL @ 0: reporter [INVTST] Requested test from command line +UVM_TESTNAME=my_test not found. UVM_INFO /home/EDA/Cadence/XCELIUM2109/tools/methodology/UVM/CDNS-1.2/sv/src/base/uvm_report_catcher.svh(705) @ 0: reporter [UVM/REPORT/CATCHER]
QuestaSim log:
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(277) @ 0: reporter [Questa UVM] QUESTA_UVM-1.2.3
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(278) @ 0: reporter [Questa UVM] questa_uvm::init(+struct)
# UVM_WARNING @ 0: reporter [BDTYP] Cannot create a component of type 'my_test' because it is not registered with the factory.
# UVM_FATAL @ 0: reporter [INVTST] Requested test from command line +UVM_TESTNAME=my_test not found.
# UVM_INFO verilog_src/uvm-1.2/src/base/uvm_report_server.svh(847) @ 0: reporter [UVM/REPORT/SERVER]
solution:
uncomment //import sim_pkg::*;
in tb_top.sv