我想知道是否有可能通过+UVM_TESTNAME通过+uvm_set_type_override覆盖命令行中指定的测试。
I have tried it and this is what i see in prints in log.
UVM_INFO @ 0: reporter [RNTST] Running test Test1...
UVM_INFO @ 0: reporter [UVM_CMDLINE_PROC] Applying type override from the command line: +uvm_set_type_override=Test1,Test2所以,在我看来,首先创建测试组件,然后应用工厂重写?
我在uvm_root.svh中看到了下面的代码
// if test now defined, create it using common factory
if (test_name != "") begin
if(m_children.exists("uvm_test_top")) begin
uvm_report_fatal("TTINST",
"An uvm_test_top already exists via a previous call to run_test", UVM_NONE);
#0; // forces shutdown because $finish is forked
end
$cast(uvm_test_top, factory.create_component_by_name(test_name,
"", "uvm_test_top", null));它正在使用那家工厂,但我不知道是否真的有越野车。我还看到了下面的代码。
begin
if(test_name=="")
uvm_report_info("RNTST", "Running test ...", UVM_LOW);
else if (test_name == uvm_test_top.get_type_name())
uvm_report_info("RNTST", {"Running test ",test_name,"..."}, UVM_LOW);
else
uvm_report_info("RNTST", {"Running test ",uvm_test_top.get_type_name()," (via factory override for test \"",test_name,"\")..."}, UVM_LOW);
end我想知道上面的“其他”部分是否曾经被执行过?或者是在什么条件下执行的?
发布于 2019-02-11 18:02:07
似乎在UVM_TESTNAME在所有其他选项之前单独处理命令行处理顺序存在问题。
可以在初始块中调用run_test()之前设置覆盖。
但是,设置测试名称,然后在相同的命令行中重写它有什么意义呢?为什么不使用重写的测试名称作为测试?
发布于 2021-09-18 07:31:07
通常,在UVM中注册的任何内容都可以通过运行时命令行开关在运行时被覆盖。
在测试名称的情况下,有一个名为+UVM_TESTNAME=selected_test_name_here的命令行开关。
典型的,
run(your_base_test_name)中,我们可以将基本测试名作为默认值,+UVM_TESTNAME=selected_test_at_runtime通常会遍历测试名称。https://stackoverflow.com/questions/54635238
复制相似问题