UVM Report Server

This page covers the classes that define the UVM report server facility.

Contents
UVM Report ServerThis page covers the classes that define the UVM report server facility.
uvm_report_serveruvm_report_server is a global server that processes all of the reports generated by a uvm_report_handler.
uvm_default_report_serverDefault implementation of the UVM report server.

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.

Summary
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_countcount is the maximum number of UVM_QUIT actions the uvm_report_server will tolerate before invoking client.die().
get_max_quit_countreturns the currently configured max quit count
set_quit_countsets the current number of UVM_QUIT actions already passed through this uvm_report_server
get_quit_countreturns the current number of UVM_QUIT actions already passed through this server
set_severity_countsets the count of already passed messages with severity severity to count
get_severity_countreturns the count of already passed messages with severity severity
set_id_countsets the count of already passed messages with id to count
get_id_countreturns the count of already passed messages with id
get_id_setreturns the set of id’s already used by this uvm_report_server
get_severity_setreturns the set of severities already used by this uvm_report_server
set_message_databasesets the uvm_tr_database used for recording messages
get_message_databasereturns the uvm_tr_database used for recording messages
do_copycopies 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_messageProcesses the provided message per the actions contained within.
compose_report_messageConstructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
report_summarizeOutputs statistical information on the reports issued by this central report server.
set_serverSets the global report server to use for reporting.
get_serverGets the global report server used for reporting.

set_max_quit_count

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

get_max_quit_count

pure virtual function int get_max_quit_count()

returns the currently configured max quit count

set_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

get_quit_count

pure virtual function int get_quit_count()

returns the current number of UVM_QUIT actions already passed through this server

set_severity_count

pure virtual function void set_severity_count(
    uvm_severity  severity,
    int  count
)

sets the count of already passed messages with severity severity to count

get_severity_count

pure virtual function int get_severity_count(
    uvm_severity  severity
)

returns the count of already passed messages with severity severity

set_id_count

pure virtual function void set_id_count(
    string  id,
    int  count
)

sets the count of already passed messages with id to count

get_id_count

pure virtual function int get_id_count(
    string  id
)

returns the count of already passed messages with id

get_id_set

pure virtual function void get_id_set(
    output  string  q[$]
)

returns the set of id’s already used by this uvm_report_server

get_severity_set

pure virtual function void get_severity_set(
    output  uvm_severity  q[$]
)

returns the set of severities already used by this uvm_report_server

set_message_database

pure virtual function void set_message_database(
    uvm_tr_database  database
)

sets the uvm_tr_database used for recording messages

get_message_database

pure virtual function uvm_tr_database get_message_database()

returns the uvm_tr_database used for recording messages

do_copy

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)

execute_report_message

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.

compose_report_message

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.

report_summarize

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.

set_server

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);

get_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();

uvm_default_report_server

Default implementation of the UVM report server.

Summary
uvm_default_report_server
Default implementation of the UVM report server.
Class Hierarchy
uvm_default_report_server
Class Declaration
class uvm_default_report_server extends uvm_report_server
enable_report_id_count_summaryA flag to enable report count summary for each ID
record_all_messagesA flag to force recording of all messages (add UVM_RM_RECORD action)
show_verbosityA flag to include verbosity in the messages, e.g.
show_terminatorA flag to add a terminator in the messages, e.g.
newCreates an instance of the class.
printThe 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_countGet 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_countSet, get, increment, or reset to 0 the quit count, i.e., the number of COUNT actions issued.
is_quit_count_reachedIf 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_countsSet, 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_countSet, get, or increment the counter for reports with the given id.
message recordingThe 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_databasesets the uvm_tr_database used for recording messages
get_message_databasereturns the uvm_tr_database used for recording messages
Message Processing
execute_report_messageProcesses the provided message per the actions contained within.
compose_report_messageConstructs the actual string sent to the file or command line from the severity, component name, report id, and the message itself.
report_summarizeOutputs statistical information on the reports issued by this central report server.

enable_report_id_count_summary

bit enable_report_id_count_summary=1

A flag to enable report count summary for each ID

record_all_messages

bit record_all_messages = 0

A flag to force recording of all messages (add UVM_RM_RECORD action)

show_verbosity

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”

show_terminator

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”

new

function new(
    string  name  =  "uvm_report_server"
)

Creates an instance of the class.

print

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

get_max_quit_count

function int get_max_quit_count()

set_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.

get_quit_count

function int get_quit_count()

set_quit_count

function void set_quit_count(
    int  quit_count
)

incr_quit_count

function void incr_quit_count()

reset_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.

is_quit_count_reached

function bit is_quit_count_reached()

If is_quit_count_reached returns 1, then the quit counter has reached the maximum.

get_severity_count

function int get_severity_count(
    uvm_severity  severity
)

set_severity_count

function void set_severity_count(
    uvm_severity  severity,
    int  count
)

incr_severity_count

function void incr_severity_count(
    uvm_severity  severity
)

reset_severity_counts

function void reset_severity_counts()

Set, get, or increment the counter for the given severity, or reset all severity counters to 0.

get_id_count

function int get_id_count(
    string  id
)

set_id_count

function void set_id_count(
    string  id,
    int  count
)

incr_id_count

function void incr_id_count(
    string  id
)

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

virtual function void set_message_database(
    uvm_tr_database  database
)

sets the uvm_tr_database used for recording messages

get_message_database

virtual function uvm_tr_database get_message_database()

returns the uvm_tr_database used for recording messages

execute_report_message

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.

compose_report_message

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.

report_summarize

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.

class uvm_default_report_server extends uvm_report_server
Default implementation of the UVM report server.
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().
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
virtual class uvm_tr_database extends uvm_object
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.
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.
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.
pure virtual function void report_summarize(
    UVM_FILE  file  =  0
)
Outputs statistical information on the reports issued by this central report server.
static function void set_server(
    uvm_report_server  server
)
Sets the global report server to use for reporting.
static function uvm_report_server get_server()
Gets the global report server used for reporting.
task run_test (
    string  test_name  =  ""
)
Convenience function for uvm_top.run_test().
pure virtual function void set_report_server(
    uvm_report_server  server
)
intended to set the central report server to server
pure virtual function uvm_report_server get_report_server()
intended to return the current global report_server
uvm_report_server is a global server that processes all of the reports generated by a uvm_report_handler.
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.
bit show_terminator = 0
A flag to add a terminator in the messages, e.g.
function new(
    string  name  =  "uvm_report_server"
)
Creates an instance of the class.
virtual function void do_print (
    uvm_printer  printer
)
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.
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.
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.
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.
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.
virtual function void report_summarize(
    UVM_FILE  file  =  0
)
Outputs statistical information on the reports issued by this central report server.