OpenCores
URL https://opencores.org/ocsvn/avalon-wishbone-bridge/avalon-wishbone-bridge/trunk

Subversion Repositories avalon-wishbone-bridge

[/] [avalon-wishbone-bridge/] [trunk/] [UVM/] [wb_slave_agent/] [wb_listener.svh] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sumanta.ch
class item_listener extends uvm_subscriber #( wb_slave_seq_item#(32,64,2) );
2
 
3
  `uvm_component_utils( item_listener );
4
 
5
  int transfers;
6
 
7
  function new( string name , uvm_component parent );
8
    super.new( name , parent );
9
  endfunction
10
 
11
  function void write( input wb_slave_seq_item t );
12
    transfers++;
13
    $display("No. %d\n",transfers);
14
  endfunction
15
 
16
  function void report_phase(uvm_phase phase);
17
    if(transfers == 6) begin
18
      `uvm_info("** UVM TEST PASSED **", "Correct number of transfers occured before timeout", UVM_LOW)
19
    end
20
    else begin
21
      `uvm_error("** UVM TEST FAILED **", "Too few transfers occured before the timeout")
22
    end
23
  endfunction: report_phase
24
 
25
endclass

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.