UVM::config

1,uvm_config_db

用于local的配置

Summary
uvm_config_db
All of the functions in uvm_config_db#(T) are static, so they must be called using the :: operator.
Class Hierarchy
uvm_resource_db#(T)
uvm_config_db
Class Declaration
class uvm_config_db#(
 type  T  =  int
) extends uvm_resource_db#(T)
Methods  
getGet the value for field_name in inst_name, using component cntxt as the starting search point.
setCreate a new or update an existing configuration setting for field_name in inst_name from cntxt.
existsCheck if a value for field_name is available in inst_name, using component cntxt as the starting search point.
wait_modifiedWait for a configuration setting to be set for field_namein cntxt and inst_name.

set

static function void set(uvm_component  cntxt,
 string  inst_name,
 string  field_name,
  value )

get

static function bit get(  uvm_component  cntxt,
   string  inst_name,
   string  field_name,
  inout  value )

exists

static function bit exists(uvm_component  cntxt,  
 string  inst_name,  
 string  field_name,  
 bit  spell_chk  =  )

2, uvm_resource_db

用于全局的配置

Summary
uvm_resource_db
All of the functions in uvm_resource_db#(T) are static, so they must be called using the :: operator.
Class Declaration
class uvm_resource_db #(type  T  =  uvm_object )
Methods  
get_by_typeGet a resource by type.
get_by_nameImports a resource by name.
set_defaultadd a new item into the resources database.
setCreate a new resource, write a val to it, and set it into the database using name and scope as the lookup parameters.
set_anonymousCreate a new resource, write a val to it, and set it into the database.
read_by_namelocate a resource by name and scope and read its value.
read_by_typeRead a value by type.
write_by_namewrite a val into the resources database.
write_by_typewrite a val into the resources database.
dumpDump all the resources in the resource pool.


get_by_type

static function rsrc_t get_by_type(string  scope )
static function rsrc_t get_by_name(string  scope,    
 string  name,    
 bit  rpterr  =  1 )
static function rsrc_t set_default(string  scope,
 string  name )

set

static function void set( input string  scope,    
  input string  name,    
    val,    
  input uvm_object  accessor  =  null )
static function void set_anonymous( input string  scope,    
    val,    
  input uvm_object  accessor  =  null )
static function bit read_by_name( input string  scope,    
  input string  name,    
  inout  val,    
  input uvm_object  accessor  =  null )
static function bit read_by_type( input string  scope,    
  inout  val,    
  input uvm_object  accessor  =  null )
static function bit write_by_name( input string  scope,    
  input string  name,    
    val,    
  input uvm_object  accessor  =  null )

write_by_type

static function bit write_by_type( input string  scope,    
  input  val,    
  input uvm_object  accessor  =  null )

dump

static function void dump()


参考:

http://www.vmmcentral.org/uvm_vmm_ik/files3/base/uvm_config_db-svh.html

http://www.vmmcentral.org/uvm_vmm_ik/files3/base/uvm_resource_db-svh.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值