Sequences/stopping

Can i have the example of two methodsi.e sequence.kill() and sequencer.stop_sequence.
as i am not able to use it properly!!

First, look at the warning in the Cookbook here.
As long as you’re sure that killing the sequence won’t hang the driver, your test can kill the sequence at any time via:


task run_phase(uvm_phase phase);
  fork
    my_seq.start(env.agent.seqr);
  join_none
  #100;
  my_seq.kill(); // will call my_seq.do_kill() which you define
endtask

Alternatively, you could stop all sequences on a given sequencer by

task run_phase(uvm_phase phase);
  fork
    my_seq.start(env.agent.seqr);
  join_none
  #100;
  env.agent.seqr.stop_sequences(); // will call do_kill() on all running sequences
endtask