2011年6月11日 星期六

uvm_config_db的使用(二)

基本使用時機

由於是用來設定verification 的環境變數
基本上我們會放在build_phase()

例子

virtual function void build();
super.build_phase(phase); // Configure before creating the
// subcomponents.
uvm_config_db#(int)::set(this,"ubus0",
"num_masters", 1);
uvm_config_db#(int)::set(this,".ubus0",
"num_slaves", 1);

...



其它的例子如下

— Set the masters[0] agent to be active:
uvm_config_db#(int)::set(this,"ubus0.masters[0]", “is_active",
UVM_ACTIVE);

— Do not collect coverage for masters[0] agent:
uvm_config_db#(int)::set(this, "ubus0.masters[0].monitor",
“coverage_enable", 0);

— Set all slaves (using a wildcard) to be passive:
uvm_config_db#(int)::set(this,"ubus0.slaves*", “is_active", UVM_PASSIVE);

沒有留言: