Subscribers are basically listeners of an analysis port. They subscribe to a broadcaster and receive objects whenever an item is broadcasted via the connected analysis port. A uvm_component class does not have an in-built analysis port, while a uvm_subscriber is an extended version with an analysis port named analysis_export。uvm_subsriber的功能就是收集整个平台的function coverage, 它的派生类必须重写write 函数。

//------------------------------------------------------------------------------
//
// CLASS: uvm_subscriber
//
// This class provides an analysis export for receiving transactions from a
// connected analysis export. Making such a connection "subscribes" this
// component to any transactions emitted by the connected analysis port.
//
// Subtypes of this class must define the write method to process the incoming
// transactions. This class is particularly useful when designing a coverage
// collector that attaches to a monitor.
//------------------------------------------------------------------------------ virtual class uvm_subscriber #(type T=int) extends uvm_component; typedef uvm_subscriber #(T) this_type; // Port: analysis_export
//
// This export provides access to the write method, which derived subscribers
// must implement. uvm_analysis_imp #(T, this_type) analysis_export; // Function: new
//
// Creates and initializes an instance of this class using the normal
// constructor arguments for <uvm_component>: ~name~ is the name of the
// instance, and ~parent~ is the handle to the hierarchical parent, if any. function new (string name, uvm_component parent);
super.new(name, parent);
analysis_export = new("analysis_imp", this);
endfunction // Function: write
//
// A pure virtual method that must be defined in each subclass. Access
// to this method by outside components should be done via the
// analysis_export. pure virtual function void write(T t); endclass

参考文献:

1 uvm_subscriber. http://www.chipverify.com/uvm/uvm-subscriber

最新文章

  1. Git 简介
  2. 对客户推荐产品模型+python代码
  3. ruby 2.2
  4. 利用LruCache为GridView加载大量本地图片完整示例
  5. Node.js学习笔记 01 搭建静态服务器
  6. Cogs 1672. [SPOJ375 QTREE]难存的情缘 LCT,树链剖分,填坑计划
  7. android实现边框圆角
  8. voijs1883 月光的魔法
  9. js中的json对象
  10. 万年历java
  11. 切换用户,显示用户名, 调用Windows系统命令
  12. C++ qsort
  13. IT女孩特不烦恼---九月实习总结
  14. (网页)jquery-qrcode.js生成二维码
  15. cf860E Arkady and A Nobody-men (树剖)
  16. [UE4]复制引起的重复对象
  17. 往SD卡中写文件的方法。
  18. POJ--3279(开关问题2个不同时间写的代码)
  19. Spring boot官方文档学习(一)
  20. 原生态在Hadoop上运行Java程序

热门文章

  1. spellchecker inspection helps locate typeos and misspelling in your code, comments and literals, and fix them in one click
  2. 利用Dockerfile文件创建带有sshd服务的centos镜像
  3. SSAS GUID 添加 行计数,非重复计数 等 遇到的莫名其妙的问题
  4. Qt .pro文件配置大全!
  5. 2.8-2.10 HBase集成MapReduce
  6. python使用xlrd操作Excel文件
  7. c++中虚函数与纯虚函数的区别(转)
  8. [CVE-2017-5487] WordPress &lt;=4.7.1 REST API 内容注入漏洞分析与复现
  9. PHP中正则表达式学习及应用(一)
  10. lombok常用注解