Bishnupriya, All,
I am aligned with your first proposal. I too prefer two overloaded sc_report_handler::report methods, with and without the verbosity argument.
Regarding the proposal to make verbosity module-specific, I hate and loath this feature of OVM!
Philipp has already uncovered one of the problems. In a module context,
SC_REPORT_INFO_V( ... );
can pick up the global rather than the local settings, based on a bunch of technicalities well understood to OOP experts but quite beyond the wit of the average user. We may know why this->SC_REPORT_INFO_V( ... ); is only sometimes needed, but most users would think it black magic.
But it gets worse. Resolving the call to pick up the correct function (local vs global) depends on the syntactic scope in which the call is written rather than on the dynamic scope. There are places where the dynamic scope would make more sense. For example, suppose you generate reports within a transaction class and pass those transactions through interface method calls. You then start setting module-specific verbosity levels, but those get totally ignored by the transaction class. Then you start getting mad and try top_level_module.set_verbosity_level_hier(). Of course, that does not work either. Nor would sc_report_handler::set_verbosity_level_hier() given the proposed definition. In order to quieten the reports, you have to change the global settings with sc_report_handler::set_verbosity_level(), at which point you change the setting for all such transaction classes. Whoops!
Even so, just suppose we do add module-specific verbosity. What about all the other controls on reporting, particularly set_action. Would the user not expect those to be module-specific too? An OVM user would.
In my opinion we should not put module-specific verbosity into the standard.
Another point. Why modify the existing SC_REPORT_XXX macros to pass default verbosities for each severity level when the verbosity will anyway get ignored for every severity except SC_INFO. This is just misleading for the user. We have to keep the old sc_report_handler::report anyway, so why not just use that. In fact, I would propose we leave the existing 4 macros entirely unchanged and add just one new macro:
#define SC_REPORT_INFO_VERB(msg_type , msg, verbosity ) \
sc_report_handler::report( SC_INFO , msg_type , msg , verbosity, __FILE__ , __LINE__ )
Cheers,
John A
-----Bishnupriya Bhattacharya <bpriya@cadence.com> wrote: -----
To: "Philipp A. Hartmann" <philipp.hartmann@offis.de>, "john.aynsley@doulos.com" <john.aynsley@doulos.com>
From: Bishnupriya Bhattacharya <bpriya@cadence.com>
Date: 12/03/2010 06:29PM
Cc: "systemc-p1666-technical@eda.org" <systemc-p1666-technical@eda.org>
Subject: RE: Verbosity Control
Philip,
You raise very good points, as always. Please see my comments below.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sun Dec 5 10:04:03 2010
This archive was generated by hypermail 2.1.8 : Sun Dec 05 2010 - 10:04:04 PST