我们使用的是OVM而不是UVM:
我尝试使用:
ovm_root::get().ovm_test_top.sprint();
但我收到此错误:
在类'ovm_root'中找不到成员'ovm_test_top'“ ... / ovm_root.svh”,68。
我看到了:
/* deprecated */ ovm_component ovm_test_top;
任何想法我应该怎么做?
ovm_test_top
是顶级测试的字符串名称。你可以做
ovm_component test;
string testname;
test = ovm_root::get().find("ovm_test_top");
testname = test.get_type_name();