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. 17.for循环语句

    for循环: 语法: for(表达式1;表达式2;表达式3){ java语句; } 表达式1是最初始化表达式:最先执行,只执行一次 表达式2必须是boolean 类型的表达式.结果为ture或者fal ...

  2. C++STL 求和:accumulate 【转】

    该算法在numeric头文件中定义. accumulate()的原型为(文件取自DEV-C++编译器): template<typename _InputIterator, typename _ ...

  3. 利用python数据分析panda学习笔记之基本功能

    1 重新生成索引 如果某个索引值不存在就引入缺失值 from pandas import Series,DataFrame import pandas as pd import numpy as np ...

  4. classpath 和 classpath*的 区别:

    classpath 和 classpath*的 区别: classpath:只会到你指定的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件中(class路径 ...

  5. Linux下配置 禅道 (项目管理系统)

    1.官网下载源码 2.解析一个新的子域名,然后到linux服务器上新建一个站点 3.将下载的文件上传至linux服务器(新建站点的时候已经在 /home/wwwroot/ 里建好了域名对应的文件夹,将 ...

  6. 优化jQuery选择器

    优化jQuery选择器 选择优化比以前更加重要,因为越来越多的浏览器实现了queryselectorall()并承担了将jQuery选择器转移到浏览器的责任.记住这些小技巧可以让你轻松突破学习选择器时 ...

  7. 51nod 1416【DFS】

    思路: 暴力整个图,以这个为起点,然后看一下有没有找到一条路是会指向自己且元素个数>=4: #include <bits/stdc++.h> using namespace std; ...

  8. Codevs 1961 躲避大龙

    1961 躲避大龙  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond 题解       题目描述 Description 你早上起来,慢悠悠地来到学校门口, ...

  9. 2014-7-17 NOIP模拟赛

    czy的后宫3(莫队) [题目描述] 上次czy在机房妥善安排了他的后宫之后,他发现可以将他的妹子分为c种,他经常会考虑这样一个问题:在[l,r]的妹子中间,能挑选出多少不同类型的妹子呢? 注意:由于 ...

  10. P5175 数列(矩阵加速)

    //minamoto #include<bits/stdc++.h> #define R register #define ll long long #define fp(i,a,b) f ...