Friday, 5 February 2016

`uvm_info vs uvm_report_info in SystemVerilog

--------------------------------------------------------------------------------------------
`include "uvm.sv"
import uvm_pkg :: *;
class base;
rand int unsigned a;
endclass
program main;
base B;
initial begin
B = new();
B.randomize();
`uvm_info ("UVM_INFO", $sformatf("a=%0d", B.a), UVM_NONE)
uvm_report_info ("UVM_REPORT_INFO", $sformatf("a=%0d", B.a), UVM_NONE);
end
endprogram : main
//Output:
// UVM_INFO top.sv(14) @ 0: reporter [UVM_INFO] a=727460974
// UVM_INFO @ 0: reporter [UVM_REPORT_INFO] a=727460974
//-------------uvm_report_catcher.svh-----------------
// virtual function void uvm_report_info(
// string id,
// string message,
// int verbosity,
// string fname = "", // filename
// int line = 0);
//
// virtual function void uvm_report_warning(
// string id,
// string message,
// int verbosity,
// string fname = "",
// int line = 0);
//
// virtual function void uvm_report_error(
// string id,
// string message,
// int verbosity,
// string fname = "",
// int line = 0);
//
// virtual function void uvm_report_fatal(
// string id,
// string message,
// int verbosity,
// string fname = "",
// int line = 0);
//-------------uvm_message_defines.svh-----------------
// `ifdef UVM_REPORT_DISABLE_FILE
// `define uvm_file ""
// `else
// `define uvm_file `__FILE__
// `endif
//
// `ifdef UVM_REPORT_DISABLE_LINE
// `define uvm_line 0
// `else
// `define uvm_line `__LINE__
// `endif
//
// `define uvm_info(ID,MSG,VERBOSITY) \
// begin \
// if (uvm_report_enabled(VERBOSITY,UVM_INFO,ID)) \
// uvm_report_info (ID, MSG, VERBOSITY, `uvm_file, `uvm_line); \
// end
//
// `define uvm_warning(ID,MSG) \
// begin \
// if (uvm_report_enabled(UVM_NONE,UVM_WARNING,ID)) \
// uvm_report_warning (ID, MSG, UVM_NONE, `uvm_file, `uvm_line); \
// end
//
// `define uvm_error(ID,MSG) \
// begin \
// if (uvm_report_enabled(UVM_NONE,UVM_ERROR,ID)) \
// uvm_report_error (ID, MSG, UVM_NONE, `uvm_file, `uvm_line); \
// end
//
// `define uvm_fatal(ID,MSG) \
// begin \
// if (uvm_report_enabled(UVM_NONE,UVM_FATAL,ID)) \
// uvm_report_fatal (ID, MSG, UVM_NONE, `uvm_file, `uvm_line); \
// end
--------------------------------------------------------------------------------------------


1 comment: