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

uvm_subscriber——告诉她我们来过的更多相关文章

  1. 【极品代码】一般人我不告诉他,手机端h5播放时不自动全屏代码

    已测适用于ios,某些安卓手机微信下播放视频会出现播放器控件(这个实在是无力吐槽噢,因为之前还遇到过微信播放完视频后竟然无法退出全屏出现广告的情况,只有播放完后刷新页面并且要放到框架页里才能屏蔽微信视 ...

  2. 一张图告诉你,只会HTML还不够!

    会了HTML和HTML5语法,你就真的会了HTML吗,来看这张图!是这本<超实用的HTML代码段>入门实例书的导览!熊孩子们,赶紧学习去吧! 如果一半以上的你都不会,必须看这本书,阿里一线 ...

  3. 万能的林萧说:我来告诉你,一个草根程序员如何进入BAT。

    引言 首先声明,不要再问LZ谁是林萧,林萧就是某著名程序员小说的主角名字. 写这篇文章的目的其实很简单,算是对之前LZ一篇文章的补充和完善. 之前LZ写过一篇<回答阿里社招面试如何准备,顺便谈谈 ...

  4. #CSDN刷票门# 有没有人在恶意刷票?CSDN请告诉我!用24小时监控数据说话!

    特别声明: 此次并非针对其他参与2013中国十大优秀开源项目的同行,体系有漏洞要谴责的是制定规则并从中获益但不作为的权贵,草根们制定不了规则但可发现和利用漏洞,这是程序员应有反叛精神没错.但被作为道具 ...

  5. [猜数字]把两个数和告诉A,积告诉B,求这两个数是什么

    1-20的两个数把和告诉A,积告诉B,A说不知道是多少,B也说不知道,这时A说我知道了,B接着说我也知道了,问这两个数是多少? 分析: 设和为S,积为M. 首先,A:我不知道. 说明:S可以分解成多个 ...

  6. 很少有人会告诉你的Android开发基本常识

    原文:很少有人会告诉你的Android开发基本常识. 文章介绍了一些关于开发.测试.版本管理.工具使用等方面的知识.

  7. 程序最多能new多少内存(2G内存里要放程序的5大区,HeapAlloc比new要快多了,而且超过2G的时候会告诉你)

    根据<Windows核心编程>得知:X86操作系统提供每个程序最多只有4G的虚拟内存,其中2G虚拟内存提供给系统用(具体用来干什么还待考察),还有2G的内存留给用户使用.那这2G内存能拿来 ...

  8. 告诉你吧,一套皮肤在winform与wpf开发模式下实现的界面效果同样精彩,winform界面和wpf界面。

    一.同一资源: 二.先上软件界面: (1)wpf界面: 在wpf中实现这样类似web风格的软件界面就不用我多说了,在wpf实现这样的风格是很简单的,完全像网页设计一样的. (2)winform界面 在 ...

  9. 一篇文章告诉你为何GitHub估值能达20亿美元

    软件开发平台GitHub今日宣布,已获得硅谷多家知名风投2.5亿美元融资,这也让其融资总额达到了3.5亿美元,此轮融资对GitHub的估值约为20亿美元. GitHub有何特别之处? GitHub创立 ...

随机推荐

  1. TX1 Gsteramer 环境配置

    安装命令: sudo add-apt-repository universe sudo add-apt-repository multiverse sudo apt-get update -tools ...

  2. 使用IIS Express调试网站的方法

    如果不想安装IIS,可以直接使用IIS Express来运行网站. vs2012: 新建个文档,拷贝下面代码 taskkill /F /IM "WebDev.WebServer40.EXE& ...

  3. 【转】Cache Buffer Chain 第二篇

    文章转自:http://m.bianceng.cn/database/Oracle/201407/42884.htm 测试环境:版本11gR2 SQL> select * from v$vers ...

  4. Firebug 的脚本页面不能用

    1.遇到这种情况,一般重置firebug,然后开启“脚本“功能,刷新页面,就能显示正常 2.要不就是 版本问题,50.0不行,下载回49版本就可以了

  5. dubbo框架介绍

    1.背景 (#) 随着互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,亟需一个治理系统确保架构有条不紊的演进. 单一应用架构 当网站流量很小 ...

  6. wannafly test D

    题意: 给定n,m求满足: 1.a[i][j]互不相同,且有$1<=a[i][j]<=n*m$ 2.对于$a[i1][j1],a[i2][j2]$,如果有 $i1 \oplus j1 &g ...

  7. 2.11 Hive中数据导入导出Import和Export使用

    https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ImportExport 一.Export.Import Export ...

  8. 【HBase】HBase笔记:HBase的Region机制

    HBase 的机制里包含了许多优秀的算法,如 Region 定位.Region 分配.Region Server的上线和下线.Master 的上线和下线.在谈到这些之前,先把 HBase 的基本架构里 ...

  9. 【原创】Gitbook使用

    [常用命令] 1.gitbook install 安装依赖模块 2.gitbook build 编译,结果输出在_book文件夹下 3.gitbook serve 本机预览,默认端口为4000 [注意 ...

  10. JavaScript代码风格和分号使用问题

    1.推荐代码风格 JavaScript Standard Style  规定相对松散更多人使用此规范 Airbnb JavaScript Style  规定更严格但也没毛病 2.JavaScript代 ...