Sequencer seems to generate seq items during startup

Hi,

I’m currently trying to implement a very simple reset agent but for some reasons the implementation seem to generate a couple of sequences at the beginning of the simulation which I can’t explain.

The implementation of the sequencer is as followed:

class reset_sequencer extends ovm_sequencer #(reset_seq_item);
  // OVM automation macro for sequencers
  `ovm_sequencer_utils(reset_sequencer)
  // Constructor
  function new (string name="simple_sequencer", ovm_component parent);
    super.new(name, parent);
    `ovm_update_sequence_lib_and_item(reset_seq)
  endfunction : new
endclass

The Implementation of the driver code is:

class reset_driver extends ovm_driver #(reset_seq_item);
   // Resgister the reset_agent with the factory
   `ovm_component_utils(reset_driver)

   typedef virtual reset_if t_if;
   virtual reset_if virtual_if;
   
   // define local parameter
   parameter HI=1'b1;                                // Shorthand bit high
   parameter LO=1'b0;                                // Shorthand bit low
   
   reg                      useTRST    =   1;       // use TRST for resetting RESET
   
   function new (string name, ovm_component parent);
      super.new(name, parent);
   endfunction // new

   function void build();
      ovm_object tmp;
      vintf #(t_if) v;

      super.build();
      if(!get_config_object("virtual_reset_interface", tmp, 0)) begin
         print_config_settings();
         ovm_report_error("build", "no virtual interface available");
      end
      else begin
         if(!$cast(v, tmp)) begin
            ovm_report_error("build", "virtual interface is incorrect type");
         end
         else begin
            virtual_if = v.m_vif;
         end
      end 
   endfunction

   task run();
      pull_reset();
      forever begin
         seq_item_port.get_next_item(req);
         req.print();
         pull_reset();
         seq_item_port.item_done();
      end
      $display("Reset Driver run task completed.  %m", $time);
      
   endtask // run
   
   //  initialize RESET access
   task pull_reset();
      $display("System reset activated, reseting device.  %m", $time);
      virtual_if.RESET_N = LO;
      #5ns; 
      virtual_if.RESET_N = HI;
      #5ns; 
   endtask // reset_init

endclass

If I start my simulation I do get a random amount of “req” which leads to the following output:

# ----------------------------------------------------------------------
# Name                     Type                Size                Value
# ----------------------------------------------------------------------
# req                      reset_seq_item      -                 req@759
#   reset_active_level     integral            1                     'h0
#   depth                  int                 32                    'd4
#   parent sequence        string              83   ovm_test_top.env.re+
#   sequencer              string              38   ovm_test_top.env.re+
# ----------------------------------------------------------------------
# System reset activated, reseting device.  jtag_pkg.reset_driver.pull_reset               10000
# ----------------------------------------------------------------------
# Name                     Type                Size                Value
# ----------------------------------------------------------------------
# req                      reset_seq_item      -                req@1231
#   reset_active_level     integral            1                     'h0
#   depth                  int                 32                    'd4
#   parent sequence        string              83   ovm_test_top.env.re+
#   sequencer              string              38   ovm_test_top.env.re+
# ----------------------------------------------------------------------
# System reset activated, reseting device.  jtag_pkg.reset_driver.pull_reset               21000
# ----------------------------------------------------------------------
# Name                     Type                Size                Value
# ----------------------------------------------------------------------
# req                      reset_seq_item      -                req@1239
#   reset_active_level     integral            1                     'h0
#   depth                  int                 32                    'd4
#   parent sequence        string              83   ovm_test_top.env.re+
#   sequencer              string              38   ovm_test_top.env.re+
# ----------------------------------------------------------------------
# System reset activated, reseting device.  jtag_pkg.reset_driver.pull_reset               32000
# ----------------------------------------------------------------------
# Name                     Type                Size                Value
# ----------------------------------------------------------------------
# req                      reset_seq_item      -                req@1247
#   reset_active_level     integral            1                     'h0
#   depth                  int                 32                    'd4
#   parent sequence        string              83   ovm_test_top.env.re+
#   sequencer              string              38   ovm_test_top.env.re+
# ----------------------------------------------------------------------
# System reset activated, reseting device.  jtag_pkg.reset_driver.pull_reset               43000
# ----------------------------------------------------------------------
# Name                     Type                Size                Value
# ----------------------------------------------------------------------
# req                      reset_seq_item      -                req@1255
#   reset_active_level     integral            1                     'h0
#   depth                  int                 32                    'd4
#   parent sequence        string              83   ovm_test_top.env.re+
#   sequencer              string              38   ovm_test_top.env.re+
# ----------------------------------------------------------------------
# System reset activated, reseting device.  jtag_pkg.reset_driver.pull_reset               54000
# ----------------------------------------------------------------------

I’m using Questa 6.4c (legacy project) and OVM 2.0.1.

Any hint or tip how to debug this would really be appreciated.

Thanks,

Frodus

Solved please close

In reply to frodus:

Frodus, can you share what the problem was? One of the reasons the sequence library was deprecated in the UVM was that people were not always aware how extra default sequences got started when they were explicitly started them as well. We recommend not using the sequence library at all and just using the ovm_component_utils or ovm_object_utils macros.