Jump to content

set_report_default_file


Recommended Posts

I'm trying to redirect all `uvm_info/warning/error/fatal messages to a log file. I can't seem to get it to work and I'm sure the way I'm calling the report functions is probably incorrect.

From my uvm_test, in the build() function, I'm doing the following...

set_report_severity_action(UVM_INFO, UVM_DISPLAY | UVM_LOG);
set_report_severity_action(UVM_WARNING, UVM_DISPLAY | UVM_LOG);
set_report_severity_action(UVM_ERROR, UVM_DISPLAY | UVM_LOG | UVM_COUNT);
set_report_severity_action(UVM_FATAL, UVM_DISPLAY | UVM_LOG | UVM_STOP);

default_report_file = "test.log";

// Open report files
default_report = $fopen(default_report_file, "w");

// Set report file handling
set_report_default_file(default_report);

default_report is a UVM_FILE and default_report_file is a string. This doesn't seem to have any effect at all and the report file is empty at the end of the run.

I also tried the code above, but called uvm_top.set_report_severity_action(...) and uvm_top.set_report_default_file(default_report) instead. That caused any messages that went to "reporter" (such as the everything with the ID [TEST_DONE]) to be written to the log file, but none of the messages from my user instantiated components were written to the log file.

Any help would be greatly appreciated!

Greg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...