跳转至

输入查询内容

    本页内容

    关闭录制集成的初始化对照

    环境:VCS W-2024.09-SP2-8。1.2 使用 uvm-1.2,2.0 使用 uvm-ieee-2020-2.0

    实验检查观察值是否符合预期;成功复现问题不代表问题已修复。

    结果对比

    本组配置:UVM_NO_VERDI_RECORD

    观察内容 UVM 2.0
    自定义核心服务已安装(1=是) custom_service_installed 1
    核心服务已初始化(1=是) core_initialized 1
    初始化后工厂创建结果 deferred_factory_create 1
    默认打印对象可用(1=是) default_printer_ready 1
    自动配置已禁用(1=是) automatic_config_disabled 1

    运行命令

    目录与环境准备;从解包根目录执行:

    uv run tools/run_uvm_review.py --case initialization_probe --variants 20 --define UVM_NO_VERDI_RECORD --check tests/uvm_review/initialization_no_verdi.expected.json
    

    最小源码

    initialization_probe.sv

    initialization_probe.sv
    `timescale 1ns/1ps
    `include "uvm_macros.svh"
    import uvm_pkg::*;
    
    class initialization_object extends uvm_object;
      `uvm_object_utils(initialization_object)
      function new(string name="object"); super.new(name); endfunction
    endclass
    
    class initialization_component extends uvm_component;
      int value = 7;
      `uvm_component_utils_begin(initialization_component)
        `uvm_field_int(value, UVM_ALL_ON)
      `uvm_component_utils_end
      function new(string name, uvm_component parent); super.new(name, parent); endfunction
    `ifdef REVIEW_UVM20
      virtual function bit use_automatic_config(); return 0; endfunction
    `endif
    endclass
    
    class initialization_service extends uvm_default_coreservice_t;
    endclass
    
    module initialization_probe;
      initial begin
        initialization_service service;
        initialization_component component_value;
        uvm_coreservice_t actual;
        uvm_factory factory_value;
        uvm_object created;
        uvm_root root_value;
    `ifdef REVIEW_UVM20
        service = new();
        uvm_init(service);
        actual = uvm_coreservice_t::get();
        $display("REVIEW|custom_service_installed|%0d", actual == service);
        $display("REVIEW|core_initialized|%0d", get_core_state() == UVM_CORE_INITIALIZED);
    `else
        actual = uvm_coreservice_t::get();
    `endif
        factory_value = actual.get_factory();
        created = factory_value.create_object_by_name("initialization_object", "", "created");
        $display("REVIEW|deferred_factory_create|%0d", created != null);
        $display("REVIEW|default_printer_ready|%0d", uvm_default_printer != null);
        component_value = new("component_value", null);
        uvm_config_db#(int)::set(null, "component_value", "value", 42);
    `ifndef REVIEW_UVM20
        root_value = uvm_root::get();
        root_value.disable_apply_cfg_settings = 1;
    `endif
        component_value.build_phase(null);
        $display("REVIEW|automatic_config_disabled|%0d", component_value.value == 7);
        $display("REVIEW|done|1");
        $finish;
      end
    endmodule
    

    全部用例 · 证据摘要

    版本适用范围