Code Browser Pages:
Files in
vmm_log_2.tar



filelist
Current file: log.sv
README.txt



////////////////////////////////////////////////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////s           www.testbench.in           s////
////s                                      s////
////s             VMM Tutorial             s////
////s                                      s////
////s           gopi@testbench.in          s////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////////////////////////////////////////////////


program test_log();

vmm_log log = new("test_log","log");
vmm_log_msg msg = new(log);

/* This logic is some where in the monitor */
   initial
   repeat (4) begin
   #($urandom()%10)
   `vmm_error(log,"Packet with CRC ERROR is received");
   end


/* In testcase you are counting the error messages */

   initial
   forever begin
   log.wait_for_msg("/./","/./",-1,vmm_log::ALL_TYPS,vmm_log::ERROR_SEV,"Packet with CRC ERROR is received",1'bx,msg);
   // You can count number of crc errored pkts rcvd.
   // or do what ever you want.
   $display(" -- Rcvd CRC ERROR message at 0 --",$time);
   end

endprogram