ejessen Posted October 30, 2012 Report Share Posted October 30, 2012 Hi, I have multiple scoreboards. For each, I would like all the output to go to a locally-specified file. For example, scoreboard1 would output to 'scoreboard1.log', scoreboard_fred to 'scoreboard_fred.log'. However, there doesn't seem to be a way to redirect all output within a class and still use the `uvm_info/debug/warn/err macros. Have I missed anything? Quote Link to comment Share on other sites More sharing options...
lisakb1963 Posted October 31, 2012 Report Share Posted October 31, 2012 Are scoreboard1 and scoreboard_fred different classes? You can always extend 1 of the 3 printers (uvm_table_printer, uvm_line_printer, uvm_tree_printer) in any class. That would be their local printer. You have to instantiate in a higher class but you can use it based on the class. The class should be a uvm_object not a component, so you probably want to do something in the object class based on which scoreboard. The uvm_object class allows you to reference data automation with the factory -- and all the Policy Based Classes use this information (Print, Clone, Record ...) You can also extend any default or defined printer with the do_print call back. This allows you to override or change the output. It will always be called, whereas -- if you define a new printer, it needs to be allocated and passed to obj.print or obj.sprint where obj is a data object class. mcd is in the knob class (associated with any defined printer). This allows you to redirect output to a file. The standard output is the simulator output file (like log files, etc). Quote Link to comment Share on other sites More sharing options...
ejessen Posted October 31, 2012 Author Report Share Posted October 31, 2012 scoreboard1 and scoreboard_fred are two different classes. Ideally, I'd have a scoreboard_base class, that each scoreboard would derive from. But I'm not clear how this would really solve my problem. Let's say that the scoreboard creates an instance (or a copy) of an incoming sequence-item, and then wants to print it. I want the print functions in the seq-item to use the locally-defined printer (so that the seq-item output goes to the file defined by the scoreboard). But I don't see a way to do that. 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.