OVM:如何在环境中声明的类中获取测试名称?

问题描述 投票:0回答:1

我们使用的是OVM而不是UVM:

我尝试使用:

ovm_root::get().ovm_test_top.sprint();

但我收到此错误:

在类'ovm_root'中找不到成员'ovm_test_top'“ ... / ovm_root.svh”,68。

我看到了:

/* deprecated */ ovm_component ovm_test_top;

任何想法我应该怎么做?

system-verilog uvm
1个回答
0
投票

ovm_test_top是顶级测试的字符串名称。你可以做

ovm_component test;
string testname;
test = ovm_root::get().find("ovm_test_top");   
testname = test.get_type_name();
© www.soinside.com 2019 - 2024. All rights reserved.