我有一个用例如下
例如,这里我只写了base_test类,但是我传递的命令是
eg1: make run +UVM_TESTNAME=test_mode1 +arg=mode1
eg2: make run +UVM_TESTNAME=test_mode2 +arg=mode2
现在测试平台应该使用名为“test_mode1”或“test_mode2”的新测试创建/覆盖基本测试
我们怎样才能让它发挥作用?
我尝试了以下方法:
case1: make run +UVM_TESTNAME=test_mode1 +arg=mode1 +testname=base_test // for this case there is no class "test_mode1" .
case2: make run +UVM_TESTNAME=test_mode2 //For this case I have a class written with the name "test_mode2 "
initial begin
if($value$plusargs("testname=%s",test_arg)) begin
// I would like to create a test with the name UVM_TESTNAME and run it
run_test(test_arg); // this should run the newly created test
end
else run_test(); // case2 should run as normal uvm-flow
end
问题是 uvm 对 UVM_TESTNAME 的优先级高于 test_arg
您需要解释为什么不使用 +UVM_TESTNAME=base_test 并传递其他参数。如果这是由于回归系统命名测试的方式造成的,那么应该有办法解决这个问题。查看 makefile 或运行脚本的特定设置