uvm_report_server

uvm.base.uvm_report_server.ename(sever) str[source]

Converts given severity level into string.

Parameters

sever (int) – Severity level.

Returns

Severity as string.

Return type

str

Raises

Exception

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

str

classmethod set_server(server)[source]
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

int

set_max_quit_count(count, overridable=True)[source]
get_quit_count()[source]

Function: get_quit_count

Returns

Quit count set for this report server.

Return type

int

set_quit_count(quit_count)[source]
Parameters

quit_count (int) – Desired quit count for this server.

incr_quit_count()[source]

Increment quit count by one.

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

bool

get_severity_count(severity)[source]

Returns number of messages reported for given severity.

Parameters

severity (int) – Severity level

Returns

Number of messages reported for given severity.

Return type

int

set_severity_count(severity, count)[source]
incr_severity_count(severity)[source]
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.

get_id_count(id)[source]
set_id_count(id, count)[source]
incr_id_count(id)[source]
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

UVMTrDatabase

get_severity_set(q: List[Any]) None[source]
get_id_set(q: List[Any]) None[source]
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

process_report_message(report_message) None[source]
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
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
Returns

Composed message as string.

Return type

str

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 in UVMRoot calls this method.

get_summary_string() str[source]

Returns the statistical information on the reports issued by this central report server as multi-line string.

Returns

End of simulation summary.

Return type

str

uvm.base.uvm_report_server.get_cs()[source]