uvm_report_server¶
- class uvm.base.uvm_report_server.UVMReportServer(name='base')[source]¶
Bases:
UVMObject
UVMReportServer is a global server that processes all of the reports generated by a uvm_report_handler.
The
UVMReportServer
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.- get_type_name() str [source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- classmethod get_server() UVMReportServer [source]¶
- set_logger(logger: Callable)[source]¶
Sets the logger function used to print the messages. Default is python built-in print.
logger (func): Logging function to use.
- do_print(printer)[source]¶
Print to show report server state
- Parameters
printer (UVMPrinter) –
- get_max_quit_count()[source]¶
Get 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.
- Returns
Max quit count allowed for the server.
- Return type
- get_quit_count()[source]¶
Function: get_quit_count
- Returns
Quit count set for this report server.
- Return type
- set_quit_count(quit_count)[source]¶
- Parameters
quit_count (int) – Desired quit count for this server.
- reset_quit_count()[source]¶
Set, get, increment, or reset to 0 the quit count, i.e., the number of
UVM_COUNT
actions issued.
- is_quit_count_reached()[source]¶
If is_quit_count_reached returns 1, then the quit counter has reached the maximum.
- Returns
True is maximum quit count reached, False otherwise.
- Return type
- reset_severity_counts()[source]¶
Function: reset_severity_counts
Set, get, or increment the counter for the given severity, or reset all severity counters to 0.
- set_message_database(database: UVMTrDatabase)[source]¶
Function: set_message_database sets the
UVMTrDatabase
used for recording messages- Parameters
database (UVMTrDatabase) –
- get_message_database() UVMTrDatabase [source]¶
Function: get_message_database returns the uvm_tr_database used for recording messages
- Returns
Message database.
- Return type
- f_display(file, _str) None [source]¶
This method sends string severity to the command line if file is 0 and to the file(s) specified by file if it is not 0.
- Parameters
file –
_str –
- execute_report_message(report_message, composed_message) None [source]¶
Processes the provided message per the actions contained within.
Expert users can overload this method to customize action processing.
- Parameters
report_message (UVMReportMessage) –
composed_message (str) – Formatted message string
- compose_report_message(report_message, report_object_name='') str [source]¶
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.
- Parameters
report_message (UVMReportMessage) –
report_object_name (UVMReportObject) –
- Returns
Composed message as string.
- Return type
- report_summarize(file=0) None [source]¶
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
UVMRoot.run_test
method inUVMRoot
calls this method.