gbbrown Posted August 30, 2011 Report Share Posted August 30, 2011 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 Quote Link to comment Share on other sites More sharing options...
jadec Posted August 30, 2011 Report Share Posted August 30, 2011 Perhaps you want uvm_top.set_report_default_file_hier() which sets it on all children, too. Make sure to do it after build when the hierarchy exists. Quote Link to comment Share on other sites More sharing options...
gbbrown Posted August 31, 2011 Author Report Share Posted August 31, 2011 Thanks jadec! This is what I was missing. I didn't see that the *_hier() calls in uvm_component. Using those and also making the calls after build fixed my problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.