zoukankan      html  css  js  c++  java
  • uvm_subscriber——告诉她我们来过

      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

  • 相关阅读:
    linux之sed用法
    个人记录-虚拟现实
    对于spark以及hadoop的几个疑问(转)
    关于老师的说的技术问题
    为什么我们总是行动不起来?你失败不是因为能力差? 如何才能实现我们的计划?
    Hibernate中一对多和多对一关系
    C# 将PDF文件转换为word格式
    C# 设置word文档页面大小
    C# 将多个office文件转换及合并为一个PDF文件
    C# 给PDF文件添加水印
  • 原文地址:https://www.cnblogs.com/dpc525/p/7921242.html
Copyright © 2011-2022 走看看