跳转至

输入查询内容

    本页内容

    uvm_queue::wait_until_not_empty() 新增;uvm_pool/uvm_queue/uvm_barrier 加入工厂注册

    新增功能:目标库新增的 API 和可选替代接口;已有用法的迁移要求列在用户接口与行为中。

    具体差异

    三者获得 factory 注册(type_id::create 可用),API 面其余不变;uvm_queue 新增 wait_until_not_empty() 阻塞任务。uvm_barrier_pool/uvm_event_pool typedef 保留(uvm_pool.svh 尾部,标注 §10.4.2.1/§10.4.1.1)。

    修改方案

    无。

    兼容措施与范围:本条是新增能力或实现说明,无需恢复旧接口;按使用条件核对行为。

    补充查阅

    扫描定位与记录结果

    无对应规则。当前脚本没有针对本条的直接检测规则。

    本条处理级别为“可选采用”,按修改方案评估;缺少扫描规则本身不增加迁移改造要求。

    扫描器下载、输入范围与报告说明

    源码与标准依据

    核查方式:源码核对。未单独进行 VCS 行为实测。

    VCS 内置 UVM-1.2uvm_queue.svh:36(无该方法,亦无工厂注册);uvm_barrier.svh:170(手写 type_name,无注册)

    VCS 内置 uvm-ieee-2020-2.0uvm_queue.svh:195wait_until_not_empty)、uvm_queue.svh:44`uvm_object_param_utils(uvm_queue#(T)));src/vcs-uvm-ieee-2020-2.0/base/uvm_pool.svh:46/:256uvm_pool/uvm_object_string_pool 注册);src/vcs-uvm-ieee-2020-2.0/base/uvm_barrier.svh:43`uvm_object_utils(uvm_barrier)

    标准依据:IEEE 1800.2-2020 §11.3.2.12(wait_until_not_empty,源码标注)

    标为“源码标注”或未注明原文核对的条款仅作定位;具体库行为以源码和实测为准。

    引用代码(高亮为引用行);上方行号链接可直接定位。

    src/vcs-uvm-1.2/base/uvm_queue.svh
    // demand, and passed and stored by reference.
    //------------------------------------------------------------------------------
    
    class uvm_queue #(type T=int) extends uvm_object;
    
      const static string type_name = "uvm_queue";
    
      typedef uvm_queue #(T) this_type;
    
      static local this_type m_global_queue;
      protected T queue[$];
    
      // Function: new
      //
      // Creates a new queue with the given ~name~.
    
      function new (string name="");
        super.new(name);
      endfunction
    

    完整源码 · SHA256:7b83e0ccc93b8b663f342aa90bf2e1cd2dec32c67f7fd868d151f0560938bfbb

    src/vcs-uvm-1.2/base/uvm_barrier.svh
      endfunction
    
    
      const static string type_name = "uvm_barrier";
    
    `ifndef UVM_CREATE_OPT
      virtual  function uvm_object create(string name=""); 
        uvm_barrier v;
        v=new(name);
        return v;
      endfunction
    `endif
    
      virtual  function string get_type_name();
        return type_name;
      endfunction
    
      local task m_trigger();
        m_event.trigger();
    

    完整源码 · SHA256:988999acaf2f60eeeed12a96c2ef98bbfccd2d225f84542d12a603fceff59edd

    src/vcs-uvm-ieee-2020-2.0/base/uvm_queue.svh
      typedef uvm_queue #(T) this_type;
    
      `uvm_object_param_utils(uvm_queue#(T))
      `uvm_type_name_decl("uvm_queue")
    
      static local this_type m_global_queue;
      protected T queue[$];
    
      // Function -- NODOCS -- new
      //
      // Creates a new queue with the given ~name~.
    
      // @uvm-ieee 1800.2-2020 auto 11.3.2.1
      function new (string name="");
        super.new(name);
      endfunction
    

    src/vcs-uvm-ieee-2020-2.0/base/uvm_queue.svh
      // Blocks until not empty
    
      // @uvm-ieee 1800.2-2020 auto 11.3.2.12
      virtual task wait_until_not_empty();
          wait(queue.size() > 0);
      endtask
    
      virtual function void do_copy (uvm_object rhs);
        this_type p;
        super.do_copy(rhs);
        if (rhs == null || !$cast(p, rhs))
          return;
        queue = p.queue;
      endfunction
    
      virtual function string convert2string();
          return $sformatf("%p",queue);
      endfunction
    

    完整源码 · SHA256:876b744cf65bbf32bc4610d7a0d120959130b2036d3dff57333aaa05bf5a8591

    术语解释 · 兼容配置

    返回Phase / Objection / Event · 迁移清单

    版本适用范围