uvm_config_db#(virtual my_if)::set(null,"uvm_test_top.env.o_agt.mon","vif",output_if);end//方式2:initialbeginuvm_config_db#(virtual my_if)::set(null,"uvm_test_top.env.i_agt*","vif", input_if); uvm_config_db#(virtual my_if)::set(null,"uvm_test_top.env.o_agt*","vif...
top_tb顶层与uvm树形结构的交互为什么要用这种看起来很怪的uvm_config_db方式获得top_tb的interface,不能直接调用得到吗? 按道理来讲,是可以的,uvm本来就是基于sv的函数库,其底层肯定也是有sv去实现的,既然uvm将其封装为uvm_config_db,建议统一使用此方法,使用uvm提供的函数也是最好的避免出错的办法。 top_tb顶...
typedef uvm_config_db #(uvm_bitstream_t) uvm_config_int; typedef uvm_config_db #(string) uvm_config_string; typedef uvm_config_db #(uvm_object) uvm_config_object; typedef uvm_config_db #(uvm_object_wrappet) uvm_config_wrapper;
uvm_config_db#(uvm_object_wrapper)::set(this,"i_agt.sqr.main_phase","default_sequence",my_sequence::type_id::get()); 提起和撤销objection:在sequence中使用starting_phase进行提起和撤销objection if(starting_phase != null) starting_phase.raise_objection(this); if(starting_phase != null) start...
uvm_config_db#(uvm_object_wrapper)::set(this, "env.i_agt.sqr.main_phase", "default_sequence", case0_sequence::type_id::get()); endfunction `endif 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. ...
6)第三个和第四个参数,以及uvm_config_db#(uvm_object_wrapper)是怎么来的,纯粹是UVM规定,照做即可。 2 除了在my_env 的build_phase中设置default_sequence外,还可以在其他地方设置,比如top_tb: 3.config_db通常是成对出现的。设置virtual interface 要get。但sequencer 不需要get,UVM早已安排好。
对于uvm_config_db来说,在调用get()函数检索数据库的时候,get()函数传递的{cntxt,”.”, inst_name}会作为uvm_re_match()的str的实参,set()函数设置的{cntxt,”.”, inst_name}在经过uvm_glob_to_re()处理后作为uvm_re_match()的实参,这也就是为什么set()参数的inst_name支持正则格式,而get()参数...
uvm_config_db#(uvm_object_wrapper)::set(this, "*.m_seqr.run_phase","default_sequence",my_sequence::get_type()); //使用该机制配置sequencer的default_sequence,第一个参数是调用set的位置,第二个为被配置对象的相对路径,第三个为目标变量的标识符,第四个为启动的sequence类型 ...
uvm_config_db#(virtual my_if)::set(null, "uvm_test_top", "vif", input); end endmodule "my_driver.sv" virtual function void build_phase(uvm_phase phase); ... if(!uvm_config_db#(virtual my_if)::get(this, " ", "vif", vif) ......
答案在于uvm_config_db内部的m_rsc数组。这是一个由string作为键,uvm_resource#(T)作为值的静态键值对数组,以uvm_component为索引。这意味着,m_rsc数组实际上是一个以uvm_component为键,联合数组为值的结构,其中联合数组内部包含了key(string类型)和value(uvm_resource#(T)类型)。接下来,我们...