luyuan_0922的个人空间 https://blog.eetop.cn/106870 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

uvm_resource_db

已有 3169 次阅读| 2017-5-23 14:57 |个人分类:uvm|系统分类:芯片设计

继续转一篇文章


uvm_resource_db

 (2011-10-17 11:27:04)
标签: 

uvm

 

base

 

resource_db

 

it

分类: uvm

preface

  uvm_resource_db提供了一个访问resource_pool的方便的接口,使得许多使用resource_base需要多行代码完成的访问操作,现在只需要简短的一行代码。uvm_resource_db#(T)是一个独立的类,里边调用了resource_pool,根据不同的资源类型有不同的uvm_resource_db#(T),所以在资源池中可以根据类型把他们区分开来。相当于把uvm_resource #(T)通过uvm_resource_db#(T)这个独立的类型进行封装一次,然后注册到pool中

  1.typedef uvm_resource #(T) rsrc_t;定义了t型资源,本资源是一个resource_base type

  2.static function rsrc_t get_by_type(string scope);调用resource_base的rsrc_t::get_by_type(scope, rsrc_t::get_type());函数实现从resource_pool中取出scope, uvm_resource #(T)type的资源

  3.  static function rsrc_t get_by_name(string scope,
                                     string name,
                                     bit rpterr=1);//根据名字,scope取出资源

  4.static function rsrc_t set_default(string scope, string name);//生成一个uvm_resource #(T) r = new(name, scope)然后调用set注册进pool

  5.   static function void set(input string scope, input string name,
                           T val, input uvm_object accessor = null);//创建一个资源,然后把val写入,然后注册进pool,用scope和name来做为查找的参数,用accessor来做一个监听

  6.   static function void set_anonymous(input string scope,
                                     T val, input uvm_object accessor = null);//和5一样,只是名字是空的

  7.  function void set_override(input string scope, input string name,
                             T val, uvm_object accessor = null);//创建一个资源,把val计入其中,将该资源注册进pool,并用name和scope来检索该资源,用accessor来监听该资源,同时该资源在pool的两个散列中都是位于队列的开始处。

  8.  function void set_override_type(input string scope, input string name,
                                  T val, uvm_object accessor = null);//和7类似只在type散列中位于队列头

  9.  function void set_override_name(input string scope, input string name,
                                  T val, uvm_object accessor = null);//和7类似只在name散列中位于队列头

  10.  static function bit read_by_name(input string scope,
                                   input string name,
                                   ref T val, input uvm_object accessor = null);//根据scope and name读出资源中的val,并用accessor做监听

  11.  static function bit read_by_type(input string scope,
                                   ref T val,
                                   input uvm_object accessor = null);//和10类似

  12.  static function bit write_by_name(input string scope, input string name,
                                     T val, input uvm_object accessor = null);//和10类似

  13.   static function bit write_by_type(input string scope,
                                    input T val, input uvm_object accessor = null);和10类似

  14. static function void dump();//对resource_pool中的所有资源进行打印显示

location:

 F:\zhenyu_liu\my_work\matierals\systemverilog\uvm-1.0p1\uvm-1.0p1\src\base\uvm_resource_db.svh


点赞

全部作者的其他最新日志

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 4

    粉丝
  • 1

    好友
  • 1

    获赞
  • 11

    评论
  • 1002

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-19 11:58 , Processed in 0.014437 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部