2011年6月10日 星期五

uvm_config_db的使用(一)

先看看文件所述

With Easier UVM, configuration parameters should be accesed by calling uvm_config_db #(T)::get explicitly from the build_phase method and copying their values to local variables:

這是設定verification 的環境之用的


基本使用方法如下

在設定了

`uvm_component_utils_begin(ahb_env)

`uvm_field_int(num_masters, UVM_ALL_ON)

`uvm_component_utils_end

就可以設定

uvm_config_db#(int)::set(this, "*.my_env", "num_masters", 3, this);


因為

All of the functions in uvm_config_db#(T) are static, so they must be called using the :: operator.

就是說必須加上::來用它

沒有留言: