跳转至

输入查询内容

    本页内容

    新增 phase 图查询 API:get_predecessors / get_successors / get_sync_relationships / get_objection_total

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

    具体差异

    phase 图结构(前驱/后继/同步关系)与 objection 总数首次提供只读公开访问器,便于调试与结构化检查(如迁移期校验自定义 domain 的挂接)。

    修改方案

    无。

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

    补充查阅

    扫描定位与记录结果

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

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

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

    源码与标准依据

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

    VCS 内置 UVM-1.2:不存在(内部为 protected bit m_predecessors[uvm_phase] 等,src/vcs-uvm-1.2/base/uvm_phase.svh 无公开访问器)

    VCS 内置 uvm-ieee-2020-2.0uvm_phase.svh:1383/uvm_phase.svh:1388/uvm_phase.svh:1393(图查询,配合 typedef bit edges_t[uvm_phase] uvm_phase.svh:433)、uvm_phase.svh:1562get_objection_total(uvm_object obj=null)

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

    src/vcs-uvm-ieee-2020-2.0/base/uvm_phase.svh
      // Internal - Implementation
      //--------------------------
    
      typedef bit edges_t[uvm_phase]; // Associative array type for storing predecessor/successor lists
    
      // Implementation - Construction
      //------------------------------
      protected uvm_phase_type m_phase_type;
      protected uvm_phase      m_parent;     // our 'schedule' node [or points 'up' one level]
      uvm_phase                m_imp;        // phase imp to call when we execute this node
    
      // Implementation - State
      //-----------------------
      // Could move this to hopper
      // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
      local uvm_phase_state    m_state;
      local int                m_run_count; // num times this phase has executed
      // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      protected uvm_phase_state_change m_state_chg;
    

    src/vcs-uvm-ieee-2020-2.0/base/uvm_phase.svh
       end
    endfunction : get_adjacent_successor_nodes
    
    function void uvm_phase::get_predecessors(ref edges_t predecessors);
      foreach (m_predecessors[p])
        predecessors[p] = 1;
    endfunction : get_predecessors
    
    function void uvm_phase::get_successors(ref edges_t successors);
      foreach (m_successors[p])
        successors[p] = 1;
    endfunction : get_successors
    
    function void uvm_phase::get_sync_relationships(ref edges_t relationships);
      foreach (m_sync[i])
        relationships[m_sync[i]] = 1;
    endfunction : get_sync_relationships
    
    // Internal implementation, more efficient than calling get_predessor_nodes on all
    // of the successors returned by get_adjacent_successor_nodes
    function void uvm_phase::get_predecessors_for_successors(output edges_t pred_of_succ);
        bit done;
        uvm_phase successors[];
    
        get_adjacent_successor_nodes(successors);
    
        // get all predecessors to these successors
        foreach (successors[s])
          foreach (successors[s].m_predecessors[pred])
    

    src/vcs-uvm-ieee-2020-2.0/base/uvm_phase.svh
    // get_objection_total
    // -------------------
    
    function int uvm_phase::get_objection_total (uvm_object obj=null);
      uvm_objection phase_done;
      phase_done = get_objection();
      if (phase_done != null)
        return phase_done.get_objection_total(obj);
      else begin
         m_report_null_objection(obj, "" , 0, "get_objection_total");
         return 0;
      end
    endfunction : get_objection_total
    
    // sync
    // ----
    
    function void uvm_phase::sync(uvm_domain target,
                                  uvm_phase phase=null,
    

    完整源码 · SHA256:a788b22ff02a9ff8e6eab4a18c55794dcae9777ddfa19695bffa88bf14b83181

    术语解释 · 兼容配置

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

    版本适用范围