跳转至

输入查询内容

    本页内容

    uvm_sequencer 的仲裁状态位 public → protected

    内部实现:文件组织、内部数据结构与实现钩子的变化。直接依赖内部接口时查阅,普通 API 的使用不需要重审这些源码。

    影响范围

    driver 或外部组件直接写 sequencer 的仲裁状态位。

    具体差异

    slave/被动 agent 驱动中常见的技巧——直接改写 sequence_item_requested/get_next_item_called 绕过 get_next_item/item_done 配对检查——在 2.0 编译失败(protected 访问)。

    修改方案

    扫描驱动中对这两个字段的直接赋值;改用正规 pull 流程或派生类内操作。

    兼容措施与范围:兼容措施不恢复外部访问仲裁状态位的权限;改用合法 pull 流程或派生类内操作。

    迁移后验证

    编译改为合法 pull 流程后的代码;连续两笔请求核对 get_next_item/item_done 配对和 FIFO 消费。

    记录核销:在无规则及补充检查中记录实际依赖与证据。

    补充查阅

    扫描定位与记录结果

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

    • D17 · 启发式:直接依赖 UVM 内部表、执行入口或状态字段。
    uv run tools/uvm_migration_scan.py <SoC代码目录> --rules D17
    

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

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

    源码与标准依据

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

    VCS 内置 UVM-1.2uvm_sequencer.svh:35–36bit sequence_item_requested; bit get_next_item_called; public 成员)

    VCS 内置 uvm-ieee-2020-2.0uvm_sequencer_param_base.svh:47–48protected bit,上移到 param_base)

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

    src/vcs-uvm-1.2/seq/uvm_sequencer.svh
      typedef uvm_sequencer #( REQ , RSP) this_type;
    
      bit sequence_item_requested;
      bit get_next_item_called;
    
      `uvm_component_param_utils(this_type)
    
    
    
      // Function: new
      //
      // Standard component constructor that creates an instance of this class
      // using the given ~name~ and ~parent~, if any.
      //
      extern function new (string name, uvm_component parent=null);
    
    
      // Function: stop_sequences
    

    完整源码 · SHA256:6d2daeebf191b44e352885f8dba22a841298a245ea6facb5f7e56e1775d5ce17

    src/vcs-uvm-ieee-2020-2.0/seq/uvm_sequencer_param_base.svh
      REQ m_last_req_buffer[$];
      RSP m_last_rsp_buffer[$];
    
      protected bit sequence_item_requested;
      protected bit get_next_item_called;
    
      protected int m_num_last_reqs = 1;
      protected int num_last_items = m_num_last_reqs;
      protected int m_num_last_rsps = 1;
      protected int m_num_reqs_sent;
      protected int m_num_rsps_received;
      uvm_sequencer_analysis_fifo #(RSP) sqr_rsp_analysis_fifo;
    
    
      // Function -- NODOCS -- new
      //
      // Creates and initializes an instance of this class using the normal 
      // constructor arguments for uvm_component: name is the name of the instance,
      // and parent is the handle to the hierarchical parent, if any.
    

    完整源码 · SHA256:99707a7f2e520940931db3c21cd4809bb8dfa57b324007b95501a62fbd4e1d31

    术语解释 · 兼容配置

    返回Sequence / Sequencer · 迁移清单

    版本适用范围