• 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

  • 相关阅读:
    【上班摸鱼】聊天机器人定时发送微博热搜
    【上班摸鱼】企业微信、钉钉、飞书自动提醒基金预估加减仓
    python HTMLTestRunner单元测试报告
    python自动发送邮件
    python unittest模块使用
    python logging模块使用
    python编码安全规范
    python EXCEL处理
    【转】bootstrap, boosting, bagging 几种方法的联系
    【转】GBDT(MART) 迭代决策树入门教程 | 简介
  • 原文地址:https://www.cnblogs.com/dpc525/p/7921242.html
Copyright © 2020-2023  润新知