加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

uvm_object_wrapper/uvm_object_registry/uvm_component_registry

(2011-09-14 16:24:33)
标签:

object

_wrapper

uvm

_object

_registry

_component

it

分类: uvm

conclusion:

1. 这是一个接口类,不能实例化。

2. 该接口类采用了proxy的模式

3. uvm_object create_object (string name="");//create a named uvm_object

4. uvm_component create_component (string name, uvm_component parent);//create a named and hierachy(parent) uvm_component

5. uvm_object_registry:public uvm_object_wrapper

6. uvm_component_registry:public uvm_object_wrapper

7. pure virtual function string get_type_name();//The factory uses this
  // name when matching against the requested type in name-based lookups.

8. uvm_object_registry#(T=uvm_object, Tname="") 是一个模板类

9. uvm_object_registry#(T=uvm_object, Tname="") 采用了singleton模式,每种uvm_object对应一个注册器,该注册器被自动注册到singleton模式的工厂,被注册到工厂后工厂可以识别这种注册器产生的uvm_object对象。

10.注册器可以调用3,4条中的函数产生对象

11. 每个注册器的 string get_type_name();函数可返回注册器的类型名字

12.注册器相当于一个对象生成器,同种对象生成器采用全局singleton模式,全局唯一且在uvm_factory中注册

13.需要对象时由工厂调用函数根据类型调用注册器的对象生成器即可。如:

      obj = f.create_object_by_type(get(),contxt,name);

14.uvm_component_registry与上诉方法相同

15.uvm_component组建需要根据parent生成一个结构化的关系图谱

16.set_type_override()在factory的m_type_overrides[$]数组中通过一个factory_override类记录把一个wrapper用另外一个wrapper替代

17.set_inst_override()在factory的m_inst_override_queues[uvm_object_wrapper]数组中通过一个uvm_factory_queue_class 的成员factory_override记录把一个wrapper用另外一个wrapper替代

file:

C:\Documents and Settings\zhliu\Desktop\uvm-1.0p1\src\base\uvm_registry.svh

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有