This page covers the classes that define the UVM report server facility.
UVM Report Server | This page covers the classes that define the UVM report server facility. |
uvm_report_server | uvm_report_server is a global server that processes all of the reports generated by a uvm_report_handler. |
uvm_default_report_server | Default implementation of the UVM report server. |
uvm_report_server is a global server that processes all of the reports generated by a uvm_report_handler.
The uvm_report_server is an abstract class which declares many of its methods as pure virtual. The UVM uses the uvm_default_report_server class as its default report server implementation.
uvm_report_server | |
uvm_report_server is a global server that processes all of the reports generated by a uvm_report_handler. | |
Methods | |
set_max_quit_count | count is the maximum number of UVM_QUIT actions the uvm_report_server will tolerate before invoking client.die(). |
get_max_quit_count | returns the currently configured max quit count |
set_quit_count | sets the current number of UVM_QUIT actions already passed through this uvm_report_server |
get_quit_count | returns the current number of UVM_QUIT actions already passed through this server |
set_severity_count | sets the count of already passed messages with severity severity to count |
get_severity_count | returns the count of already passed messages with severity severity |
set_id_count | sets the count of already passed messages with id to count |
get_id_count | returns the count of already passed messages with id |
get_id_set | returns the set of id’s already used by this uvm_report_server |
get_severity_set | returns the set of severities already used by this uvm_report_server |
set_message_database | sets the uvm_tr_database used for recording messages |
get_message_database | returns the uvm_tr_database used for recording messages |
do_copy | copies all message statistic severity,id counts to the destination uvm_report_server the copy is cummulative (only items from the source are transferred, already existing entries are not deleted, existing entries/counts are overridden when they exist in the source set) |
execute_report_message | Processes the provided message per the actions contained within. |
compose_report_message | Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself. |
report_summarize | Outputs statistical information on the reports issued by this central report server. |
set_server | Sets the global report server to use for reporting. |
get_server | Gets the global report server used for reporting. |
pure virtual function void set_max_quit_count( int count, bit overridable = 1 )
count is the maximum number of UVM_QUIT actions the uvm_report_server will tolerate before invoking client.die(). when overridable = 0 is passed, the set quit count cannot be changed again
pure virtual function int get_max_quit_count()
returns the currently configured max quit count
pure virtual function void set_quit_count( int quit_count )
sets the current number of UVM_QUIT actions already passed through this uvm_report_server
pure virtual function int get_quit_count()
returns the current number of UVM_QUIT actions already passed through this server
pure virtual function void set_severity_count( uvm_severity severity, int count )
sets the count of already passed messages with severity severity to count
pure virtual function int get_severity_count( uvm_severity severity )
returns the count of already passed messages with severity severity
pure virtual function void set_id_count( string id, int count )
sets the count of already passed messages with id to count
pure virtual function int get_id_count( string id )
returns the count of already passed messages with id
pure virtual function void get_id_set( output string q[$] )
returns the set of id’s already used by this uvm_report_server
pure virtual function void get_severity_set( output uvm_severity q[$] )
returns the set of severities already used by this uvm_report_server
pure virtual function void set_message_database( uvm_tr_database database )
sets the uvm_tr_database used for recording messages
pure virtual function uvm_tr_database get_message_database()
returns the uvm_tr_database used for recording messages
function void do_copy ( uvm_object rhs )
copies all message statistic severity,id counts to the destination uvm_report_server the copy is cummulative (only items from the source are transferred, already existing entries are not deleted, existing entries/counts are overridden when they exist in the source set)
pure virtual function void execute_report_message( uvm_report_message report_message, string composed_message )
Processes the provided message per the actions contained within.
Expert users can overload this method to customize action processing.
pure virtual function string compose_report_message( uvm_report_message report_message, string report_object_name = "" )
Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
Expert users can overload this method to customize report formatting.
pure virtual function void report_summarize( UVM_FILE file = 0 )
Outputs statistical information on the reports issued by this central report server. This information will be sent to the command line if file is 0, or to the file descriptor file if it is not 0.
The run_test method in uvm_top calls this method.
static function void set_server( uvm_report_server server )
Sets the global report server to use for reporting.
This method is provided as a convenience wrapper around setting the report server via the uvm_coreservice_t::set_report_server method.
In addition to setting the server this also copies the severity/id counts from the current report_server to the new one
// Using the uvm_coreservice_t: uvm_coreservice_t cs; cs = uvm_coreservice_t::get(); your_server.copy(cs.get_report_server()); cs.set_report_server(your_server); // Not using the uvm_coreservice_t: uvm_report_server::set_server(your_server);
static function uvm_report_server get_server()
Gets the global report server used for reporting.
This method is provided as a convenience wrapper around retrieving the report server via the uvm_coreservice_t::get_report_server method.
// Using the uvm_coreservice_t: uvm_coreservice_t cs; uvm_report_server rs; cs = uvm_coreservice_t::get(); rs = cs.get_report_server(); // Not using the uvm_coreservice_t: uvm_report_server rs; rs = uvm_report_server::get_server();
Default implementation of the UVM report server.
uvm_default_report_server | |||
Default implementation of the UVM report server. | |||
Class Hierarchy | |||
| |||
Class Declaration | |||
| |||
enable_report_id_count_summary | A flag to enable report count summary for each ID | ||
record_all_messages | A flag to force recording of all messages (add UVM_RM_RECORD action) | ||
show_verbosity | A flag to include verbosity in the messages, e.g. | ||
show_terminator | A flag to add a terminator in the messages, e.g. | ||
new | Creates an instance of the class. | ||
The uvm_report_server implements the uvm_object::do_print() such that print method provides UVM printer formatted output of the current configuration. | |||
Quit Count | |||
get_max_quit_count | |||
set_max_quit_count | Get or set the maximum number of COUNT actions that can be tolerated before a UVM_EXIT action is taken. | ||
get_quit_count | |||
set_quit_count | |||
incr_quit_count | |||
reset_quit_count | Set, get, increment, or reset to 0 the quit count, i.e., the number of COUNT actions issued. | ||
is_quit_count_reached | If is_quit_count_reached returns 1, then the quit counter has reached the maximum. | ||
Severity Count | |||
get_severity_count | |||
set_severity_count | |||
incr_severity_count | |||
reset_severity_counts | Set, get, or increment the counter for the given severity, or reset all severity counters to 0. | ||
id Count | |||
get_id_count | |||
set_id_count | |||
incr_id_count | Set, get, or increment the counter for reports with the given id. | ||
message recording | The uvm_default_report_server will record messages into the message database, using one transaction per message, and one stream per report object/handler pair. | ||
set_message_database | sets the uvm_tr_database used for recording messages | ||
get_message_database | returns the uvm_tr_database used for recording messages | ||
Message Processing | |||
execute_report_message | Processes the provided message per the actions contained within. | ||
compose_report_message | Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself. | ||
report_summarize | Outputs statistical information on the reports issued by this central report server. |
bit enable_report_id_count_summary=1
A flag to enable report count summary for each ID
bit record_all_messages = 0
A flag to force recording of all messages (add UVM_RM_RECORD action)
bit show_verbosity = 0
A flag to include verbosity in the messages, e.g.
”UVM_INFO(UVM_MEDIUM) file.v(3) @ 60: reporter [ID0] Message 0”
bit show_terminator = 0
A flag to add a terminator in the messages, e.g.
”UVM_INFO file.v(3) @ 60: reporter [ID0] Message 0 -UVM_INFO”
The uvm_report_server implements the uvm_object::do_print() such that print method provides UVM printer formatted output of the current configuration. A snippet of example output is shown here:
uvm_report_server uvm_report_server - @13 quit_count int 32 'd0 max_quit_count int 32 'd5 max_quit_overridable bit 1 'b1 severity_count severity counts 4 - [UVM_INFO] integral 32 'd4 [UVM_WARNING] integral 32 'd2 [UVM_ERROR] integral 32 'd50 [UVM_FATAL] integral 32 'd10 id_count id counts 4 - [ID1] integral 32 'd1 [ID2] integral 32 'd2 [RNTST] integral 32 'd1 enable_report_id_count_summary bit 1 'b1 record_all_messages bit 1 `b0 show_verbosity bit 1 `b0 show_terminator bit 1 `b0
function int get_max_quit_count()
function void set_max_quit_count( int count, bit overridable = 1 )
Get or set the maximum number of COUNT actions that can be tolerated before a UVM_EXIT action is taken. The default is 0, which specifies no maximum.
function int get_quit_count()
function void set_quit_count( int quit_count )
function void incr_quit_count()
function void reset_quit_count()
Set, get, increment, or reset to 0 the quit count, i.e., the number of COUNT actions issued.
function bit is_quit_count_reached()
If is_quit_count_reached returns 1, then the quit counter has reached the maximum.
function int get_severity_count( uvm_severity severity )
function void set_severity_count( uvm_severity severity, int count )
function void incr_severity_count( uvm_severity severity )
function void reset_severity_counts()
Set, get, or increment the counter for the given severity, or reset all severity counters to 0.
function int get_id_count( string id )
function void set_id_count( string id, int count )
function void incr_id_count( string id )
Set, get, or increment the counter for reports with the given id.
The uvm_default_report_server will record messages into the message database, using one transaction per message, and one stream per report object/handler pair.
virtual function void set_message_database( uvm_tr_database database )
sets the uvm_tr_database used for recording messages
virtual function uvm_tr_database get_message_database()
returns the uvm_tr_database used for recording messages
virtual function void execute_report_message( uvm_report_message report_message, string composed_message )
Processes the provided message per the actions contained within.
Expert users can overload this method to customize action processing.
virtual function string compose_report_message( uvm_report_message report_message, string report_object_name = "" )
Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
Expert users can overload this method to customize report formatting.
virtual function void report_summarize( UVM_FILE file = 0 )
Outputs statistical information on the reports issued by this central report server. This information will be sent to the command line if file is 0, or to the file descriptor file if it is not 0.
The run_test method in uvm_top calls this method.
Default implementation of the UVM report server.
class uvm_default_report_server extends uvm_report_server
count is the maximum number of UVM_QUIT actions the uvm_report_server will tolerate before invoking client.die().
pure virtual function void set_max_quit_count( int count, bit overridable = 1 )
returns the currently configured max quit count
pure virtual function int get_max_quit_count()
sets the current number of UVM_QUIT actions already passed through this uvm_report_server
pure virtual function void set_quit_count( int quit_count )
returns the current number of UVM_QUIT actions already passed through this server
pure virtual function int get_quit_count()
sets the count of already passed messages with severity severity to count
pure virtual function void set_severity_count( uvm_severity severity, int count )
returns the count of already passed messages with severity severity
pure virtual function int get_severity_count( uvm_severity severity )
sets the count of already passed messages with id to count
pure virtual function void set_id_count( string id, int count )
returns the count of already passed messages with id
pure virtual function int get_id_count( string id )
returns the set of id’s already used by this uvm_report_server
pure virtual function void get_id_set( output string q[$] )
returns the set of severities already used by this uvm_report_server
pure virtual function void get_severity_set( output uvm_severity q[$] )
sets the uvm_tr_database used for recording messages
pure virtual function void set_message_database( uvm_tr_database database )
The uvm_tr_database class is intended to hide the underlying database implementation from the end user, as these details are often vendor or tool-specific.
virtual class uvm_tr_database extends uvm_object
returns the uvm_tr_database used for recording messages
pure virtual function uvm_tr_database get_message_database()
copies all message statistic severity,id counts to the destination uvm_report_server the copy is cummulative (only items from the source are transferred, already existing entries are not deleted, existing entries/counts are overridden when they exist in the source set)
function void do_copy ( uvm_object rhs )
Processes the provided message per the actions contained within.
pure virtual function void execute_report_message( uvm_report_message report_message, string composed_message )
Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
pure virtual function string compose_report_message( uvm_report_message report_message, string report_object_name = "" )
Outputs statistical information on the reports issued by this central report server.
pure virtual function void report_summarize( UVM_FILE file = 0 )
Sets the global report server to use for reporting.
static function void set_server( uvm_report_server server )
Gets the global report server used for reporting.
static function uvm_report_server get_server()
Convenience function for uvm_top.run_test().
task run_test ( string test_name = "" )
intended to set the central report server to server
pure virtual function void set_report_server( uvm_report_server server )
intended to return the current global report_server
pure virtual function uvm_report_server get_report_server()
A flag to enable report count summary for each ID
bit enable_report_id_count_summary=1
A flag to force recording of all messages (add UVM_RM_RECORD action)
bit record_all_messages = 0
A flag to include verbosity in the messages, e.g.
bit show_verbosity = 0
A flag to add a terminator in the messages, e.g.
bit show_terminator = 0
Creates an instance of the class.
function new( string name = "uvm_report_server" )
The do_print method is the user-definable hook called by print and sprint that allows users to customize what gets printed or sprinted beyond the field information provided by the `uvm_field_* macros, Utility and Field Macros for Components and Objects.
virtual function void do_print ( uvm_printer printer )
function int get_max_quit_count()
Get or set the maximum number of COUNT actions that can be tolerated before a UVM_EXIT action is taken.
function void set_max_quit_count( int count, bit overridable = 1 )
function int get_quit_count()
function void set_quit_count( int quit_count )
function void incr_quit_count()
Set, get, increment, or reset to 0 the quit count, i.e., the number of COUNT actions issued.
function void reset_quit_count()
If is_quit_count_reached returns 1, then the quit counter has reached the maximum.
function bit is_quit_count_reached()
function int get_severity_count( uvm_severity severity )
function void set_severity_count( uvm_severity severity, int count )
function void incr_severity_count( uvm_severity severity )
Set, get, or increment the counter for the given severity, or reset all severity counters to 0.
function void reset_severity_counts()
function int get_id_count( string id )
function void set_id_count( string id, int count )
Set, get, or increment the counter for reports with the given id.
function void incr_id_count( string id )
sets the uvm_tr_database used for recording messages
virtual function void set_message_database( uvm_tr_database database )
returns the uvm_tr_database used for recording messages
virtual function uvm_tr_database get_message_database()
Processes the provided message per the actions contained within.
virtual function void execute_report_message( uvm_report_message report_message, string composed_message )
Constructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
virtual function string compose_report_message( uvm_report_message report_message, string report_object_name = "" )
Outputs statistical information on the reports issued by this central report server.
virtual function void report_summarize( UVM_FILE file = 0 )