跳转至

输入查询内容

    本页内容

    UVM_SEQ_ARB_TYPE typedef 默认不可用

    影响范围

    使用 UVM_SEQ_ARB_TYPE 类型名。

    具体差异

    set_arbitration/get_arbitration 形参类型在两版都是 uvm_sequencer_arb_mode(1.2 用别名写法),行为无差;但用户代码若声明了 UVM_SEQ_ARB_TYPE 类型的变量,2.0 默认编译失败。

    修改方案

    改用 uvm_sequencer_arb_mode,或加 +define+UVM_ENABLE_DEPRECATED_API

    兼容措施与范围

    UVM_ENABLE_DEPRECATED_API 开放 UVM_SEQ_ARB_TYPE 旧 typedef;改用 uvm_sequencer_arb_mode 后可移除此项依赖,仲裁行为另行验证。

    迁移后验证

    编译改为 uvm_sequencer_arb_mode 的声明,读回设定模式;若暂用 deprecated,再在关闭开关后复编译。

    记录本条结果M06-009 · 状态与证据

    已有实测与复现

    补充查阅

    扫描定位与记录结果

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

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

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

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

    源码与标准依据

    核查方式:源码与实测核对。实测仅覆盖本条所列场景。

    VCS 内置 UVM-1.2uvm_object_globals.svh:370(无条件 typedef)

    VCS 内置 uvm-ieee-2020-2.0uvm_object_globals.svh:382`ifdef UVM_ENABLE_DEPRECATED_API 内)

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

    src/vcs-uvm-1.2/base/uvm_object_globals.svh
    } uvm_sequencer_arb_mode;
    
    
    typedef uvm_sequencer_arb_mode UVM_SEQ_ARB_TYPE; // backward compat
    
    
    // Enum: uvm_sequence_state_enum
    //
    // Defines current sequence state
    //
    // UVM_CREATED            - The sequence has been allocated.
    // UVM_PRE_START          - The sequence is started and the
    //                          <uvm_sequence_base::pre_start()> task is
    //                          being executed.
    // UVM_PRE_BODY           - The sequence is started and the
    //                          <uvm_sequence_base::pre_body()> task is
    //                           being executed.
    // UVM_BODY               - The sequence is started and the
    //                          <uvm_sequence_base::body()> task is
    

    完整源码 · SHA256:c2462f17fbd338c1f0d6b5e5faf54821195e02cdf5c0b8c94dd2be152284cd2c

    src/vcs-uvm-ieee-2020-2.0/base/uvm_object_globals.svh
    } uvm_sequencer_arb_mode;
    
    `ifdef UVM_ENABLE_DEPRECATED_API
    typedef uvm_sequencer_arb_mode UVM_SEQ_ARB_TYPE; // backward compat
    `endif // UVM_ENABLE_DEPRECATED_API
    
    
    // Enum --NODOCS-- uvm_sequence_state_enum
    //
    // Defines current sequence state
    //
    // UVM_CREATED            - The sequence has been allocated.
    // UVM_PRE_START          - The sequence is started and the
    //                          <uvm_sequence_base::pre_start()> task is
    //                          being executed.
    // UVM_PRE_BODY           - The sequence is started and the
    //                          <uvm_sequence_base::pre_body()> task is
    //                           being executed.
    // UVM_BODY               - The sequence is started and the
    

    完整源码 · SHA256:0901c91b4736870c6b7bc6408ab2f60ce30cb1c64c5017f71164bc6ccfd7a78f

    术语解释 · 兼容配置

    返回Sequence / Sequencer · 迁移清单

    版本适用范围