跳转至

输入查询内容

    本页内容

    objection trace(+UVM_OBJECTION_TRACE)消息格式变化

    影响范围

    解析 UVM_OBJECTION_TRACE 的固定列数或位置。

    具体差异

    trace 消息多输出一个字段(objection 实例全名),列位与列数变化;解析 OBJECTION_TRACE 输出的脚本需同步。

    修改方案

    保留以 report ID 为入口的 trace 解析;旧依赖列位置的正则需加入位于操作数量之后、objection(s) 之前的 objection 名称字段,并避免将其当作对象路径。使用条目中的两版 trace 样本更新期望格式,核对 raise/drop 的对象、计数和 phase;统计不能依赖固定空格数。

    兼容措施与范围:兼容措施不恢复旧 trace 列布局;更新解析并核对对象、objection 名称和计数。

    迁移后验证

    对一次 raise/drop 输出运行日志解析,核对对象、objection 名称和计数;新列不得被误识别为数量。

    记录本条结果M03-014 · 状态与证据

    补充查阅

    扫描定位与记录结果

    有扫描规则,覆盖部分可识别写法。脚本检查名称、参数和部分 FLAG 表达式,并对少数直接声明关联使用点;未做完整类型解析或预处理,行为结果仍需验证。

    uv run tools/uvm_migration_scan.py <SoC代码目录> --rules S36
    

    核对命中对象及生效分支后,在条目清单记录修改与验证证据;扫描规则记录用于整理命中位置。

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

    源码与标准依据

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

    VCS 内置 UVM-1.2uvm_objection.svh:178/uvm_objection.svh:195"Object %0s %0s %0d objection(s)..."

    VCS 内置 uvm-ieee-2020-2.0uvm_objection.svh:184/uvm_objection.svh:201(插入 objection 名字段:"Object %0s %0s %0d %0s objection(s)..."

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

    src/vcs-uvm-1.2/base/uvm_objection.svh
        if (source_obj == obj)
    
          uvm_report_info("OBJTN_TRC", 
            $sformatf("Object %0s %0s %0d objection(s)%s: count=%0d  total=%0d",
               obj.get_full_name()==""?"uvm_top":obj.get_full_name(), action,
               count, description != ""? {" (",description,")"}:"", _count, _total), UVM_NONE);
        else begin
          int cpath = 0, last_dot=0;
          string sname = source_obj.get_full_name(), nm = obj.get_full_name();
          int max = sname.len() > nm.len() ? nm.len() : sname.len();
    
          // For readability, only print the part of the source obj hierarchy underneath
          // the current object.
          while((sname[cpath] == nm[cpath]) && (cpath < max)) begin
            if(sname[cpath] == ".") last_dot = cpath;
            cpath++;
          end 
    
          if(last_dot) sname = sname.substr(last_dot+1, sname.len());
          uvm_report_info("OBJTN_TRC",
            $sformatf("Object %0s %0s %0d objection(s) %0s its total (%s from source object %s%s): count=%0d  total=%0d",
               obj.get_full_name()==""?"uvm_top":obj.get_full_name(), action=="raised"?"added":"subtracted",
                count, action=="raised"?"to":"from", action, sname, 
                description != ""?{", ",description}:"", _count, _total), UVM_NONE);
        end
      endfunction
    
    
      // Function- m_get_parent
      //
      // Internal method for getting the parent of the given ~object~.
      // The ultimate parent is uvm_top, UVM's implicit top-level component. 
    
      function uvm_object m_get_parent(uvm_object obj);
        uvm_component comp;
        uvm_sequence_base seq;
    

    完整源码 · SHA256:c80371feb8fa0c455538bb8b274463a0daac8dbb8cca67259e370ad041b4a6f3

    src/vcs-uvm-ieee-2020-2.0/base/uvm_objection.svh
        if (source_obj == obj)
    
          uvm_report_info("OBJTN_TRC", 
            $sformatf("Object %0s %0s %0d %0s objection(s)%s: count=%0d  total=%0d",
               obj.get_full_name()==""?"uvm_top":obj.get_full_name(), action,
               count, get_full_name(), description != ""? {" (",description,")"}:"", _count, _total), UVM_NONE);
        else begin
          int cpath = 0, last_dot=0;
          string sname = source_obj.get_full_name(), nm = obj.get_full_name();
          int max = sname.len() > nm.len() ? nm.len() : sname.len();
    
          // For readability, only print the part of the source obj hierarchy underneath
          // the current object.
          while((sname[cpath] == nm[cpath]) && (cpath < max)) begin
            if(sname[cpath] == ".") last_dot = cpath;
            cpath++;
          end 
    
          if(last_dot) sname = sname.substr(last_dot+1, sname.len());
          uvm_report_info("OBJTN_TRC",
            $sformatf("Object %0s %0s %0d %0s objection(s) %0s its total (%s from source object %s%s): count=%0d  total=%0d",
               obj.get_full_name()==""?"uvm_top":obj.get_full_name(), action=="raised"?"added":"subtracted",
                count, get_full_name(), action=="raised"?"to":"from", action, sname, 
                description != ""?{", ",description}:"", _count, _total), UVM_NONE);
        end
      endfunction
    
    
      // Function- m_get_parent
      //
      // Internal method for getting the parent of the given ~object~.
      // The ultimate parent is uvm_top, UVM's implicit top-level component. 
    
      function uvm_object m_get_parent(uvm_object obj);
        uvm_component comp;
        uvm_sequence_base seq;
    

    完整源码 · SHA256:4f431c3f91aafce1a407ee0d169f4b7c4a0a5c4885e25c8a4b5cb039f64a7e22

    术语解释 · 兼容配置

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

    版本适用范围