|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
test代码:
program automatic test;
import uvm_pkg::*;
`include "uvm_macros.svh"
initial begin
run_test("my_test");
end
endprogram
my_test代码:
class my_test extends uvm_test;
`uvm_component_utils(my_test);
my_env m_env;
function new(string name = "my_test", uvm_component parent=null);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_env=my_env::type_id::create("m_env",this);
uvm_config_db#(uvm_object_wrapper)::set(this, "*.m_seqr.run_phase", "default_sequence", my_sequence::get_type());
endfunction: build_phase
endclass
vlog和vsim都成功,但是run后就会出现这样的结果:
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 call to run_test(my_test) not found.
我的my_test不是已经注册到uvm_component_util中了吗,为什么还会报错????求大神解答啊。。。弄了好半天还没解决
|
|