agump Posted August 18, 2011 Report Share Posted August 18, 2011 If I use uvm_report_xxx function , I can use set_report_verbosity_level to control what I want to print. But when I call print function to print the variable with field automation, I can't find any way to disable the print except to comment the function . Please give some recommend for this . Thanks. Quote Link to comment Share on other sites More sharing options...
jeff.schroeder Posted August 18, 2011 Report Share Posted August 18, 2011 Use sprint() instead of print(), which will return a string with the formatted printout, and then use uvm_report_info() to print that string. Actually, you should use the `uvm_info macro, and embed the sprint() call within the macro arguments. The macro will avoid the overhead of evaluating the message expression (your sprint() call) if the message isn't going to print because of the verbosity level. I've never used print(), for precisely the reason that you can't control the verbosity of what gets printed. Quote Link to comment Share on other sites More sharing options...
agump Posted August 19, 2011 Author Report Share Posted August 19, 2011 Thanks. This have solved my problems. 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.