2011年6月12日 星期日

uvm_config_db的使用(五)

uvm_config_db與uvm_resource_db的差異

uvm_config_db是繼承自uvm_resource_db

The uvm_config_db is a type-specific configuration mechanism, offering a robust facility for specifying hierarchical configuration values of desired parameters

uvm_config_db#(virtual ubus_if)::set(this,"ubus_example_tb0.*","vif",vif);



uvm_resource_db provides side-band (non-hierarchical) data sharing for general purpose

uvm_resource_db#(myobject)::set(“anyobject”, “shared_config”, data, this);


所以使用的時機在
當需要確定階程及繼承性時請使用uvm_config_db
當不需要考慮到階程性時就使用uvm_resource_db比較方便

沒有留言: