测试用例挂在start_item

时间:2015-06-01 05:12:37

标签: system-verilog uvm

我一直面临着start_item的问题。每次到start_item时,我的整个测试都会挂起,我无法找出问题所在。任何指针都将非常感激。

这是代码的样子:

task good_bad_seq_0_task ();
  RX_eth10g req;
  RX_eth10g rsp;
  RX_eth10g_knobs t;
  int good_bad_seq_count;
  //'Vy_good_bad_long_seq' is a loop Variable
  int Vy_good_bad_long_seq;
  int tmp_rand_status;
  tmp_rand_status = std::randomize (good_bad_seq_count) with { 
    good_bad_seq_count inside {100};
  };
  if(!tmp_rand_status) begin
    `uvm_error(get_full_name(), "Randomization failed!");
  end
  `uvm_info(get_full_name(), $sformatf(": Driving good_bad_long_seq %0d times ...",good_bad_seq_count), UVM_HIGH)
  for(Vy_good_bad_long_seq = 0; Vy_good_bad_long_seq < good_bad_seq_count; Vy_good_bad_long_seq++) begin
    req = new();
    start_item (req);     // Nothing after this is executed
    t = good_bad_seq_knob;
    req.set_seqitem_type (t);
    if(!req.randomize ()) begin
      `uvm_error("RAND_FAILED", $psprintf("Randomization failed : %s",req.get_full_name()));
    end
    finish_item (req);
    get_response (rsp);
  end
  `uvm_info(get_full_name(), $sformatf(": Completed %0d times ...",good_bad_seq_count), UVM_HIGH)
endtask: good_bad_seq_0_task

非常感谢。

2 个答案:

答案 0 :(得分:0)

一旦连接到项目的父序列发生器的驱动程序调用{​​{1}},start_item(...)任务将解锁。您需要检查您的驱动程序实现。

答案 1 :(得分:0)

req尚未获得父序列发生器。请参阅create_item(...)uvm_sequence_base的文档。正如都铎提到的那样get_next_item(...)也需要在父序列发生器的seq_item_export上调用。