Code Browser Pages:
Files in
uvm_sequence_5.tar



driver.sv
Makefile
README.txt
sequence_item.sv
sequencer.sv
Current file: sequence.sv
testcase.sv



////////////////////////////////////////////////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////s           www.testbench.in           s////
////s                                      s////
////s             UVM Tutorial             s////
////s           gopi@testbenh.in           s////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////////////////////////////////////////////////

class seq_a extends uvm_sequence #(instruction);

  instruction req;

  function new(string name="seq_a");
    super.new(name);
  endfunction

  `uvm_sequence_utils(seq_a, instruction_sequencer)

  virtual task body();
      repeat(4) begin
         `uvm_do_with(req, { inst == PUSH_A; });
      end
  endtask

endclass

class seq_b extends uvm_sequence #(instruction);

  instruction req;

  function new(string name="seq_b");
    super.new(name);
  endfunction

  `uvm_sequence_utils(seq_b, instruction_sequencer)

  virtual task body();
      repeat(4) begin
         `uvm_do_with(req, { inst == PUSH_B; });
      end
  endtask

endclass

class sequential_sequence extends uvm_sequence #(instruction);

  seq_a s_a;
  seq_b s_b;

  function new(string name="sequential_sequence");
    super.new(name);
  endfunction

  `uvm_sequence_utils(sequential_sequence, instruction_sequencer)

  virtual task body();
         `uvm_do(s_a);
         `uvm_do(s_b);
  endtask

endclass