Code Browser Pages:
Files in
uvm_tlm_3.tar



env.sv
Makefile
Current file: monitor.sv
README.txt
sequence_item.sv
subscriber.sv



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

class monitor extends uvm_monitor;
    uvm_analysis_port #(instruction) anls_port;

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

    task run;
       instruction inst;
       inst = new();
       #10ns;
       inst.inst = instruction::MUL;
       anls_port.write(inst);
       #10ns;
       inst.inst = instruction::ADD;
       anls_port.write(inst);
       #10ns;
       inst.inst = instruction::SUB;
       anls_port.write(inst);
    endtask

endclass