AWhooley Posted September 26, 2011 Report Share Posted September 26, 2011 (edited) Hi, Is it possible to control when the print method of an object is called through the message APIs e.g. 'uvm_info? For example I want to print out the contents of the transaction received by the driver but only when debugging my code. Thus I would like to be able to do the following: `uvm_info("",$sformatf("Verbosity is %s", tx.print), UVM_DEBUG); Obviously this does not work. I also tried accessing the enumerated type that UVM_DEBUG belongs to (uvm_verbosity) but it does not look like I can access it. It is possible I trued to access it incorrectly as I did not provide any hierarchical path to it or anything like that. if (uvm_verbosity == UVM_DEBUG) tx.print Anyway what would be the best approach to achieve what I would like to achieve? Should I specify "UVM_NOPRINT" for all the properties in my transaction and then write a do_print function where I print the properties using uvm_info instead? Thanks Alan Edited September 26, 2011 by tzar Formatting Quote Link to comment Share on other sites More sharing options...
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.