Code Browser Pages:
Files in
uvm_tlm_2.tar



Current file: consumer.sv
env.sv
Makefile
producer.sv
README.txt
sequence_item.sv



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

  class consumer extends uvm_component;

    uvm_blocking_get_port#(instruction) get_port;

    function new(string name, uvm_component p = null);
      super.new(name,p);
      get_port = new("get_port", this);
    endfunction

    task run();
       for(int i = 0 ; i < 10; i++ )begin
          instruction inst;
          get_port.get(inst);
          `uvm_info("consumer", $sformatf("receiving ",inst.inst.name()), UVM_MEDIUM)
          //push the transaction into queue or array
          //or drive the transaction to next levelt
          //or drive to interface
       end
    endtask


  endclass : consumer