uvm_report_message_element_base

Base class for report message element.  Defines common interface.

Contents
uvm_report_message_element_baseBase class for report message element.
uvm_report_message_int_elementMessage element class for integral type
uvm_report_message_string_elementMessage element class for string type
uvm_report_message_object_elementMessage element class for object type
uvm_report_message_element_containerA container used by report message to contain the dynamically added elements, with APIs to add and delete the elements.
uvm_report_messageThe uvm_report_message is the basic UVM object message class.

get_name

virtual function string get_name()

set_name

virtual function void set_name(
    string  name
)

Get or set the name of the element

get_action

virtual function uvm_action get_action()

set_action

virtual function void set_action(
    uvm_action  action
)

Get or set the authorized action for the element

uvm_report_message_int_element

Message element class for integral type

Summary
uvm_report_message_int_element
Message element class for integral type
Class Hierarchy
uvm_report_message_int_element
Class Declaration
class uvm_report_message_int_element extends uvm_report_message_element_base
Methods
get_value
set_valueGet or set the value (integral type) of the element, with size and radix

get_value

virtual function uvm_bitstream_t get_value(
    output  int  size,
    output  uvm_radix_enum  radix
)

set_value

virtual function void set_value(
    uvm_bitstream_t  value,
    int  size,
    uvm_radix_enum  radix
)

Get or set the value (integral type) of the element, with size and radix

uvm_report_message_string_element

Message element class for string type

Summary
uvm_report_message_string_element
Message element class for string type
Class Hierarchy
uvm_report_message_string_element
Class Declaration
class uvm_report_message_string_element extends uvm_report_message_element_base
Methods
get_value
set_valueGet or set the value (string type) of the element

get_value

virtual function string get_value()

set_value

virtual function void set_value(
    string  value
)

Get or set the value (string type) of the element

uvm_report_message_object_element

Message element class for object type

Summary
uvm_report_message_object_element
Message element class for object type
Class Hierarchy
uvm_report_message_object_element
Class Declaration
class uvm_report_message_object_element extends uvm_report_message_element_base
Methods
get_valueGet the value (object reference) of the element
set_valueGet or set the value (object reference) of the element

get_value

virtual function uvm_object get_value()

Get the value (object reference) of the element

set_value

virtual function void set_value(
    uvm_object  value
)

Get or set the value (object reference) of the element

uvm_report_message_element_container

A container used by report message to contain the dynamically added elements, with APIs to add and delete the elements.

Summary
uvm_report_message_element_container
A container used by report message to contain the dynamically added elements, with APIs to add and delete the elements.
Class Hierarchy
uvm_report_message_element_container
Class Declaration
class uvm_report_message_element_container extends uvm_object
Methods
newCreate a new uvm_report_message_element_container object
sizeReturns the size of the container, i.e.
deleteDelete the index-th element in the container
delete_elementsDelete all the elements in the container
get_elementsGet all the elements from the container and put them in a queue
add_intThis method adds an integral type of the name name and value value to the container.
add_stringThis method adds a string of the name name and value value to the message.
add_objectThis method adds a uvm_object of the name name and reference obj to the message.

new

function new(
    string  name  =  "element_container"
)

Create a new uvm_report_message_element_container object

size

virtual function int size()

Returns the size of the container, i.e. the number of elements

delete

virtual function void delete(
    int  index
)

Delete the index-th element in the container

delete_elements

virtual function void delete_elements()

Delete all the elements in the container

get_elements

Get all the elements from the container and put them in a queue

add_int

virtual function void add_int(
    string  name,   
    uvm_bitstream_t  value,   
    int  size,   
    uvm_radix_enum  radix,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds an integral type of the name name and value value to the container.  The required size field indicates the size of value.  The required radix field determines how to display and record the field.  The optional print/record bit is to specify whether the element will be printed/recorded.

add_string

virtual function void add_string(
    string  name,   
    string  value,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds a string of the name name and value value to the message.  The optional print/record bit is to specify whether the element will be printed/recorded.

add_object

virtual function void add_object(
    string  name,   
    uvm_object  obj,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds a uvm_object of the name name and reference obj to the message.  The optional print/record bit is to specify whether the element will be printed/recorded.

uvm_report_message

The uvm_report_message is the basic UVM object message class.  It provides the fields that are common to all messages.  It also has a message element container and provides the APIs necessary to add integral types, strings and uvm_objects to the container.  The report message object can be initialized with the common fields, and passes through the whole reporting system (i.e. report object, report handler, report server, report catcher, etc) as an object.  The additional elements can be added/deleted to/from the message object anywhere in the reporting system, and can be printed or recorded along with the common fields.

Summary
uvm_report_message
The uvm_report_message is the basic UVM object message class.
Class Hierarchy
uvm_report_message
Class Declaration
class uvm_report_message extends uvm_object
newCreates a new uvm_report_message object.
new_report_messageCreates a new uvm_report_message object.
printThe uvm_report_message implements uvm_object::do_print() such that print method provides UVM printer formatted output of the message.
Infrastructure References
get_report_object
set_report_objectGet or set the uvm_report_object that originated the message.
get_report_handler
set_report_handlerGet or set the uvm_report_handler that is responsible for checking whether the message is enabled, should be upgraded/downgraded, etc.
get_report_server
set_report_serverGet or set the uvm_report_server that is responsible for servicing the message’s actions.
Message Fields
get_severity
set_severityGet or set the severity (UVM_INFO, UVM_WARNING, UVM_ERROR or UVM_FATAL) of the message.
get_id
set_idGet or set the id of the message.
get_message
set_messageGet or set the user message content string.
get_verbosity
set_verbosityGet or set the message threshold value.
get_filename
set_filenameGet or set the file from which the message originates.
get_line
set_lineGet or set the line in the file from which the message originates.
get_context
set_contextGet or set the optional user-supplied string that is meant to convey the context of the message.
get_action
set_actionGet or set the action(s) that the uvm_report_server should perform for this message.
get_file
set_fileGet or set the file that the message is to be written to when the message’s action is UVM_LOG.
get_element_containerGet the element_container of the message
set_report_messageSet all the common fields of the report message in one shot.
Message Element APIs
add_intThis method adds an integral type of the name name and value value to the message.
add_stringThis method adds a string of the name name and value value to the message.
add_objectThis method adds a uvm_object of the name name and reference obj to the message.

new

function new(
    string  name  =  "uvm_report_message"
)

Creates a new uvm_report_message object.

new_report_message

static function uvm_report_message new_report_message(
    string  name  =  "uvm_report_message"
)

Creates a new uvm_report_message object.  This function is the same as new(), but keeps the random stability.

print

virtual function void do_print(
    uvm_printer  printer
)

The uvm_report_message implements uvm_object::do_print() such that print method provides UVM printer formatted output of the message.  A snippet of example output is shown here:

--------------------------------------------------------
Name                Type               Size  Value
--------------------------------------------------------
uvm_report_message  uvm_report_message  -     @532
  severity          uvm_severity        2     UVM_INFO
  id                string              10    TEST_ID
  message           string              12    A message...
  verbosity         uvm_verbosity       32    UVM_LOW
  filename          string              7     test.sv
  line              integral            32    'd58
  context_name      string              0     ""
  color             string              3     red
  my_int            integral            32    'd5
  my_string         string              3     foo
  my_obj            my_class            -     @531
    foo             integral            32    'd3
    bar             string              8     hi there

get_report_object

virtual function uvm_report_object get_report_object()

set_report_object

virtual function void set_report_object(
    uvm_report_object  ro
)

Get or set the uvm_report_object that originated the message.

get_report_handler

virtual function uvm_report_handler get_report_handler()

set_report_handler

virtual function void set_report_handler(
    uvm_report_handler  rh
)

Get or set the uvm_report_handler that is responsible for checking whether the message is enabled, should be upgraded/downgraded, etc.

get_report_server

virtual function uvm_report_server get_report_server()

set_report_server

virtual function void set_report_server(
    uvm_report_server  rs
)

Get or set the uvm_report_server that is responsible for servicing the message’s actions.

get_severity

virtual function uvm_severity get_severity()

set_severity

virtual function void set_severity(
    uvm_severity  sev
)

Get or set the severity (UVM_INFO, UVM_WARNING, UVM_ERROR or UVM_FATAL) of the message.  The value of this field is determined via the API used (`uvm_info(), `uvm_waring(), etc.) and populated for the user.

get_id

virtual function string get_id()

set_id

virtual function void set_id(
    string  id
)

Get or set the id of the message.  The value of this field is completely under user discretion.  Users are recommended to follow a consistent convention.  Settings in the uvm_report_handler allow various messaging controls based on this field.  See uvm_report_handler.

get_message

virtual function string get_message()

set_message

virtual function void set_message(
    string  msg
)

Get or set the user message content string.

get_verbosity

virtual function int get_verbosity()

set_verbosity

virtual function void set_verbosity(
    int  ver
)

Get or set the message threshold value.  This value is compared against settings in the uvm_report_handler to determine whether this message should be executed.

get_filename

virtual function string get_filename()

set_filename

virtual function void set_filename(
    string  fname
)

Get or set the file from which the message originates.  This value is automatically populated by the messaging macros.

get_line

virtual function int get_line()

set_line

virtual function void set_line(
    int  ln
)

Get or set the line in the file from which the message originates.  This value is automatically populate by the messaging macros.

get_context

virtual function string get_context()

set_context

virtual function void set_context(
    string  cn
)

Get or set the optional user-supplied string that is meant to convey the context of the message.  It can be useful in scopes that are not inherently UVM like modules, interfaces, etc.

get_action

virtual function uvm_action get_action()

set_action

virtual function void set_action(
    uvm_action  act
)

Get or set the action(s) that the uvm_report_server should perform for this message.  This field is populated by the uvm_report_handler during message execution flow.

get_file

virtual function UVM_FILE get_file()

set_file

virtual function void set_file(
    UVM_FILE  fl
)

Get or set the file that the message is to be written to when the message’s action is UVM_LOG.  This field is populated by the uvm_report_handler during message execution flow.

get_element_container

virtual function uvm_report_message_element_container get_element_container()

Get the element_container of the message

set_report_message

virtual function void set_report_message(
    uvm_severity  severity,
    string  id,
    string  message,
    int  verbosity,
    string  filename,
    int  line,
    string  context_name
)

Set all the common fields of the report message in one shot.

add_int

virtual function void add_int(
    string  name,   
    uvm_bitstream_t  value,   
    int  size,   
    uvm_radix_enum  radix,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds an integral type of the name name and value value to the message.  The required size field indicates the size of value.  The required radix field determines how to display and record the field.  The optional print/record bit is to specify whether the element will be printed/recorded.

add_string

virtual function void add_string(
    string  name,   
    string  value,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds a string of the name name and value value to the message.  The optional print/record bit is to specify whether the element will be printed/recorded.

add_object

virtual function void add_object(
    string  name,   
    uvm_object  obj,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)

This method adds a uvm_object of the name name and reference obj to the message.  The optional print/record bit is to specify whether the element will be printed/recorded.

virtual class uvm_report_message_element_base
Base class for report message element.
class uvm_report_message_int_element extends uvm_report_message_element_base
Message element class for integral type
class uvm_report_message_string_element extends uvm_report_message_element_base
Message element class for string type
class uvm_report_message_object_element extends uvm_report_message_element_base
Message element class for object type
class uvm_report_message_element_container extends uvm_object
A container used by report message to contain the dynamically added elements, with APIs to add and delete the elements.
class uvm_report_message extends uvm_object
The uvm_report_message is the basic UVM object message class.
virtual function uvm_bitstream_t get_value(
    output  int  size,
    output  uvm_radix_enum  radix
)
virtual function void set_value(
    uvm_bitstream_t  value,
    int  size,
    uvm_radix_enum  radix
)
Get or set the value (integral type) of the element, with size and radix
virtual function string get_value()
virtual function void set_value(
    string  value
)
Get or set the value (string type) of the element
virtual function uvm_object get_value()
Get the value (object reference) of the element
virtual function void set_value(
    uvm_object  value
)
Get or set the value (object reference) of the element
virtual class uvm_void
The uvm_void class is the base class for all UVM classes.
virtual class uvm_object extends uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
function new(
    string  name  =  "element_container"
)
Create a new uvm_report_message_element_container object
virtual function int size()
Returns the size of the container, i.e.
virtual function void delete(
    int  index
)
Delete the index-th element in the container
virtual function void delete_elements()
Delete all the elements in the container
virtual function void add_int(
    string  name,   
    uvm_bitstream_t  value,   
    int  size,   
    uvm_radix_enum  radix,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds an integral type of the name name and value value to the container.
virtual function void add_string(
    string  name,   
    string  value,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds a string of the name name and value value to the message.
virtual function void add_object(
    string  name,   
    uvm_object  obj,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds a uvm_object of the name name and reference obj to the message.
function new(
    string  name  =  "uvm_report_message"
)
Creates a new uvm_report_message object.
static function uvm_report_message new_report_message(
    string  name  =  "uvm_report_message"
)
Creates a new uvm_report_message object.
virtual function void do_print(
    uvm_printer  printer
)
The uvm_report_message implements uvm_object::do_print() such that print method provides UVM printer formatted output of the message.
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.
virtual function uvm_report_object get_report_object()
virtual function void set_report_object(
    uvm_report_object  ro
)
Get or set the uvm_report_object that originated the message.
virtual function uvm_report_handler get_report_handler()
virtual function void set_report_handler(
    uvm_report_handler  rh
)
Get or set the uvm_report_handler that is responsible for checking whether the message is enabled, should be upgraded/downgraded, etc.
virtual function uvm_report_server get_report_server()
virtual function void set_report_server(
    uvm_report_server  rs
)
Get or set the uvm_report_server that is responsible for servicing the message’s actions.
virtual function uvm_severity get_severity()
virtual function void set_severity(
    uvm_severity  sev
)
Get or set the severity (UVM_INFO, UVM_WARNING, UVM_ERROR or UVM_FATAL) of the message.
virtual function string get_id()
virtual function void set_id(
    string  id
)
Get or set the id of the message.
virtual function string get_message()
virtual function void set_message(
    string  msg
)
Get or set the user message content string.
virtual function int get_verbosity()
virtual function void set_verbosity(
    int  ver
)
Get or set the message threshold value.
virtual function string get_filename()
virtual function void set_filename(
    string  fname
)
Get or set the file from which the message originates.
virtual function int get_line()
virtual function void set_line(
    int  ln
)
Get or set the line in the file from which the message originates.
virtual function string get_context()
virtual function void set_context(
    string  cn
)
Get or set the optional user-supplied string that is meant to convey the context of the message.
virtual function uvm_action get_action()
virtual function void set_action(
    uvm_action  act
)
Get or set the action(s) that the uvm_report_server should perform for this message.
virtual function UVM_FILE get_file()
virtual function void set_file(
    UVM_FILE  fl
)
Get or set the file that the message is to be written to when the message’s action is UVM_LOG.
virtual function uvm_report_message_element_container get_element_container()
Get the element_container of the message
virtual function void set_report_message(
    uvm_severity  severity,
    string  id,
    string  message,
    int  verbosity,
    string  filename,
    int  line,
    string  context_name
)
Set all the common fields of the report message in one shot.
virtual function void add_int(
    string  name,   
    uvm_bitstream_t  value,   
    int  size,   
    uvm_radix_enum  radix,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds an integral type of the name name and value value to the message.
virtual function void add_string(
    string  name,   
    string  value,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds a string of the name name and value value to the message.
virtual function void add_object(
    string  name,   
    uvm_object  obj,   
    uvm_action  action  =  (UVM_LOG|UVM_RM_RECORD)
)
This method adds a uvm_object of the name name and reference obj to the message.
class uvm_report_handler extends uvm_object
The uvm_report_handler is the class to which most methods in uvm_report_object delegate.