Message Reporting

Hi,

I am trying to filter out messages with a particular ID i.e “UVM_DBG” to a seprate log file i.e “debug_lib.log”. I am expecting the messages in log file at the execution time, but messages are written to the file once the simulation end not the the time the uvm_info/uvm_warning is executed.
am I missing something here?

module a
UVM_FILE debug_log;

Initial
begin

debug_log = $fopen(“debug_lib.log”);
uvm_top.set_report_id_action_hier(“UVM_DBG”,UVM_LOG | UVM_DISPLAY );
uvm_top.set_report_id_file_hier(“UVM_DBG”, debug_log);
end

endmodule

In reply to Sayyed:

For performance reasons, messages written to log files aren’t immediately flushed to the file. There are different factors which control this behavior, but it’s possible that you won’t see any messages until the simulation finishes and all open files are flushed.

Why do you want the messages to immediately appear in the log file?

In reply to cgales:

I have a task which dump the memory content for a given address range to the log, based on the data on some address i have to run a TCL command to check some scenario while simulation is in pasue.

In reply to Sayyed:

A better way would be to keep the data and log messages separate. Write the data to a file and close it. This should help with the buffering issue.