跳转至

输入查询内容

    本页内容

    uvm_text_tr_database / uvm_text_tr_stream 拆分为独立文件

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

    影响范围

    直接 include 旧 recorder 文件,或解析 text database 的注册和句柄输出。

    具体差异

    text database/stream 拆为独立文件,set_file_name 等入口与 UVM_CHANGE_DEFAULT_TR_DB_NAME 定制保留;注册与句柄类型也随新框架更新,不能称类体逐字不变。正常通过 uvm_pkg 获得类型;自行 include 宿主文件并依赖 text 类型的用法需同步文件依赖。

    修改方案

    通过 uvm_pkg 使用类型时无需修改;直接 include 旧宿主文件且依赖 text 类型时,同步目标文件依赖。

    兼容措施与范围:本条是新增能力或实现说明,无需恢复旧接口;按使用条件核对行为。

    迁移后验证

    使用目标文件组织重新编译;生成一条 stream/transaction 并对照解析结果,不能仅凭文件拆分就认定格式完全相同。

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

    补充查阅

    扫描定位与记录结果

    无对应规则。当前脚本没有针对本条的直接检测规则。

    按“影响范围”检视实际代码与配置,再执行本条验证方法;扫描零命中不能排除此项。

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

    源码与标准依据

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

    VCS 内置 UVM-1.2uvm_tr_database.svh:355(uvm_text_tr_database)、uvm_tr_stream.svh:524(uvm_text_tr_stream)

    VCS 内置 uvm-ieee-2020-2.0uvm_text_tr_database.svh:54uvm_text_tr_stream.svh:35

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

    src/vcs-uvm-1.2/base/uvm_tr_database.svh
    //
    //
    
    class uvm_text_tr_database extends uvm_tr_database;
    
       // Variable- m_filename_dap
       // Data Access Protected Filename
       `ifndef UVM_DISABLE_DEFAULT_TR_DB
       local uvm_simple_lock_dap#(string) m_filename_dap;
       `endif
    
       // Variable- m_file
       UVM_FILE m_file;
    
       `uvm_object_utils_begin(uvm_text_tr_database)
       `uvm_object_utils_end
    
       // Function: new
       // Constructor
    

    完整源码 · SHA256:cb9ff1f3a3cc018c80015b8394d0223370811c17f835f7c98b8e36345db2f393

    src/vcs-uvm-1.2/base/uvm_tr_stream.svh
    //
    //                     
    
    class uvm_text_tr_stream extends uvm_tr_stream;
    
       // Variable- m_text_db
       // Internal reference to the text-based backend
       local uvm_text_tr_database m_text_db;
    
       `uvm_object_utils_begin(uvm_text_tr_stream)
       `uvm_object_utils_end
    
       // Function: new
       // Constructor
       //
       // Parameters:
       // name - Instance name
       function new(string name="unnamed-uvm_text_tr_stream");
          super.new(name);
    

    完整源码 · SHA256:4e373501ca2bc9af44d4f168043d2ce07725ff3115a3966455b51529e48839d5

    src/vcs-uvm-ieee-2020-2.0/base/uvm_text_tr_database.svh
    //
    // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2
    
    class uvm_text_tr_database extends uvm_tr_database;
    
       // Variable- m_filename_dap
       // Data Access Protected Filename
    `ifndef UVM_DISABLE_DEFAULT_TR_DB
       local uvm_simple_lock_dap#(string) m_filename_dap;
    `endif
    
       // Variable- m_file
       UVM_FILE m_file;
    
       `uvm_object_utils(uvm_text_tr_database)
    
       // Function: new
       // Constructor
       //
    

    完整源码 · SHA256:8a7c24727d8d590cdf073598b31023c1990a968e74c9f0c907276fd70c1f7f9c

    src/vcs-uvm-ieee-2020-2.0/base/uvm_text_tr_stream.svh
    //                     
    // @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2
    
    class uvm_text_tr_stream extends uvm_tr_stream;
    
       // Variable- m_text_db
       // Internal reference to the text-based backend
       local uvm_text_tr_database m_text_db;
    
       `uvm_object_utils_begin(uvm_text_tr_stream)
       `uvm_object_utils_end
    
       // Function: new
       // Constructor
       //
       // Parameters:
       // name - Instance name
       function new(string name="unnamed-uvm_text_tr_stream");
          super.new(name);
    

    完整源码 · SHA256:60841ab0cecbe108489d417d8b90eff42d8b2d1c19b4b9132268c5310c3cd799

    术语解释 · 兼容配置

    返回Comparer / Printer / Packer / Recorder · 迁移清单

    版本适用范围