• uvm1.1从test设置uvm_config_db sequence到main_phase default_sequence时报告错误


    现象1描述:

    UVM_INFO @ 0: reporter [UVMTOP] UVM testbench topology:

    Name                   Type                    Size  Value
    uvm_test_top           sw_case0                -     @463 
    sw_env                 switch_env              -     @471   
    agt_i                  sw_agent                -     @479 
      drv                  sw_driver               -     @622 
        rsp_port           uvm_analysis_port       -     @639 
        seq_item_port      uvm_seq_item_pull_port  -     @630 
      mon                  sw_monitor              -     @648 
        mon_ap             uvm_analysis_port       -     @658 
      sqr                  sw_sequencer            -     @499 
        rsp_export         uvm_analysis_export     -     @507 
        seq_item_export    uvm_seq_item_pull_imp   -     @613 
        arbitration_queue  array                   0     -    
        lock_queue         array                   0     -    
        num_last_reqs      integral                32    'd1  
        num_last_rsps      integral                32    'd1  
    agt_o                  sw_agent                -     @487 
      mon                  sw_monitor              -     @799 
        mon_ap             uvm_analysis_port       -     @808 
      sqr                  sw_sequencer            -     @676 
        rsp_export         uvm_analysis_export     -     @684 
        seq_item_export    uvm_seq_item_pull_imp   -     @790 
        arbitration_queue  array                   0     -    
        lock_queue         array                   0     -    
        num_last_reqs      integral                32    'd1  
        num_last_rsps      integral                32    'd1  
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26

    UVM_ERROR …/tc/sw_sequence0.sv(15) @ 0: uvm_test_top.sw_env.agt_i.sqr@@seq0 [SW_SEQ0] starting phase is null
    Total errors:1

    问题1分析:

    sw_agent原始代码

    function void sw_agent::connect_phase(uvm_phase phase);
    super.connect_phase(phase);
    mon_ap = mon.mon_ap;
    endfunction
    
    
    • 1
    • 2
    • 3
    • 4
    • 5

    修改后代码

    function void sw_agent::connect_phase(uvm_phase phase);
    super.connect_phase(phase);
    if (is_active==UVM_ACTIVE) begin
        drv.seq_item_port.connect(sqr.seq_item_export);
    end
    mon_ap = mon.mon_ap;
    endfunction
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    原因

    driver和 squencer虽然内置了seq_item_port和seq_item_export,但不会自动连接,影响到了sqr下面的seq0.

    现象2描述:

    UVM_INFO @ 0: uvm_test_top.sw_env [CFGNRD] ::: The following resources have at least one write and no reads :::
    default_sequence [/^uvm_test_top.sw_env.agt_i.sqr.main_phase$/] : (class uvm_pkg::uvm_object_wrapper) ?
    但是 seq里面的transaction还是传到了drv。

    问题2分析:

    这个时候default_sequence还没有启动,所以写了一次,还没被读,如果加上了延时,或者在run_phase之后调用,那么就不会产生任何信息。
    跟在start_of_simulation_phase中进行检查有关,如下

    function void switch_env::start_of_simulation_phase(uvm_phase phase);
    super.start_of_simulation_phase(phase);
    uvm_top.print_topology();
    check_config_usage();
    endfunction
    
    • 1
    • 2
    • 3
    • 4
    • 5

    放在 base_test的main_phase/report_phase中进行检查,则没有 CFGNRD。

  • 相关阅读:
    mysql安装_改密码_找回密码
    计算机毕业设计之java+ssm的图书借阅系统
    linuxnfs服务安装与配置实践
    SAP/PP-40策略下SO不消耗PIR问题
    leetcode 剑指 Offer 10- I. 斐波那契数列
    Python内置函数(55)——round
    cpu设计和实现(总结篇)
    @Transactional 注解 同一个类下的两个方法
    CTreeCtrl动态创建从字符串创建多个根节点
    SpringCloud(十)——ElasticSearch简单了解(二)DSL查询语句及RestClient查询文档
  • 原文地址:https://blog.csdn.net/zt5169/article/details/126447105