跳转至

输入查询内容

    本页内容

    TEST_DONE 消息移除

    影响范围

    回归脚本依赖 TEST_DONE 消息判定完成、时间戳或裁剪日志。

    具体差异

    两条 TEST_DONE 消息由 1.2 uvm_test_done_objection::all_dropped 路径发出,stop 机制删除后随之消失。第二条为 UVM_LOW,但仍取决于是否进入该路径及报告配置,不能作为每次仿真必有的结束标记。

    修改方案

    回归成功条件改为业务完成标志、预期事务数、检查器排空和错误结果同时满足。需要阶段时间戳时可观察 uvm_phase_cb::phase_state_changeUVM_PHASE_ENDED 状态;READY_TO_END 可能多次发生,report 总结也可能出现在异常终止路径,均不能单独代替成功判定。同步移除 TEST_DONE 日志匹配依赖。

    兼容措施与范围:兼容措施不恢复 TEST_DONE 消息;测试成功须由业务完成与检查结果共同判定。

    迁移后验证

    用一条成功测试和一条故意失败的测试检验脚本;成功需要业务完成及检查器结果,不能只靠出现 report 总结判定。

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

    补充查阅

    扫描定位与记录结果

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

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

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

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

    源码与标准依据

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

    VCS 内置 UVM-1.2uvm_objection.svh:1252uvm_info_context("TEST_DONE", "All end-of-test objections have been dropped. Calling stop tasks", UVM_FULL, ...))、uvm_objection.svh:1276uvm_info_context("TEST_DONE", {"'run' phase is ready to proceed to the 'extract' phase"}, UVM_LOW, ...)

    VCS 内置 uvm-ieee-2020-2.0:两条消息均不存在;仅剩 TEST_DONE_NOHIER 错误(uvm_objection.svh:1207,由保留的 qualify() 发出)

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

    src/vcs-uvm-1.2/base/uvm_objection.svh
        // so 'disable fork' can be used.
    
        if(m_cleared == 0) begin
          `uvm_info_context("TEST_DONE",
              "All end-of-test objections have been dropped. Calling stop tasks",
              UVM_FULL,m_top);
          fork begin // guard
            fork
              begin
                m_executing_stop_processes = 1;
                m_do_stop_all(m_top);
                wait (m_n_stop_threads == 0);
                m_executing_stop_processes = 0;
              end
              begin
                if (stop_timeout == 0)
                  wait(stop_timeout != 0);
                `uvm_delay(stop_timeout)
                `uvm_error("STOP_TIMEOUT",
    

    src/vcs-uvm-1.2/base/uvm_objection.svh
          end
          join // guard
    
          `uvm_info_context("TEST_DONE", {"'run' phase is ready ",
                            "to proceed to the 'extract' phase"}, UVM_LOW,m_top)
    
        end
    
        if (m_events.exists(obj))
          ->m_events[obj].all_dropped;
        m_top_all_dropped = 1;
    
      endtask
    
    
      // Function- raise_objection DEPRECATED
      //
      // Calls <uvm_objection::raise_objection> after calling <qualify>. 
      // If the ~object~ is not provided or is ~null~, then the implicit top-level
    

    完整源码 · SHA256:c80371feb8fa0c455538bb8b274463a0daac8dbb8cca67259e370ad041b4a6f3

    src/vcs-uvm-ieee-2020-2.0/base/uvm_objection.svh
        string nm = is_raise ? "raise_objection" : "drop_objection";
        string desc = description == "" ? "" : {" (\"", description, "\")"};
        if(! ($cast(c,obj) || $cast(s,obj))) begin
          uvm_report_error("TEST_DONE_NOHIER", {"A non-hierarchical object, '",
            obj.get_full_name(), "' (", obj.get_type_name(),") was used in a call ",
            "to uvm_test_done.", nm,"(). For this objection, a sequence ",
            "or component is required.", desc });
        end
      endfunction
    
      // Below are basic data operations needed for all uvm_objects
      // for factory registration, printing, comparing, etc.
    
      typedef uvm_object_registry#(uvm_test_done_objection,"uvm_test_done") type_id;
      //@uvm-compat for compatibility with 1.2
      static function type_id get_type();
        return type_id::get();
      endfunction
    

    完整源码 · SHA256:4f431c3f91aafce1a407ee0d169f4b7c4a0a5c4885e25c8a4b5cb039f64a7e22

    术语解释 · 兼容配置

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

    版本适用范围