Class uvm_pkg::uvm_printer
Inheritance Diagram of uvm_printer
Collaboration Diagram of uvm_printer
Name |
Type |
Description |
---|---|---|
knobs |
Variable knobs The knob object provides access to the variety of knobs associated with a specific printer instance. |
Functions
- print_field(string name, uvm_bitstream_t value, int size, uvm_radix_enum radix = UVM_NORADIX, byte scope_separator = ".", string type_name = "")
Function
print_field
Prints an integral field (up to 4096 bits).
-
name
-
The name of the field.
-
value
-
The value of the field.
-
size
-
The number of bits of the field (maximum is 4096).
-
radix
-
The radix to use for printing. The printer knob for radix is used if no radix is specified.
-
scope_separator
-
is used to find the leaf name since many printers only print the leaf name of a field. Typical values for the separator are . (dot) or [ (open bracket). Print_field
- Parameters:
name (string)
value (uvm_bitstream_t)
size (int)
radix (uvm_radix_enum)
scope_separator (byte)
type_name (string)
-
- print_int(string name, uvm_bitstream_t value, int size, uvm_radix_enum radix = UVM_NORADIX, byte scope_separator = ".", string type_name = "")
backward compatibility
- Parameters:
name (string)
value (uvm_bitstream_t)
size (int)
radix (uvm_radix_enum)
scope_separator (byte)
type_name (string)
- print_field_int(string name, uvm_integral_t value, int size, uvm_radix_enum radix = UVM_NORADIX, byte scope_separator = ".", string type_name = "")
Function
print_field_int
Prints an integral field (up to 64 bits).
-
name
-
The name of the field.
-
value
-
The value of the field.
-
size
-
The number of bits of the field (maximum is 64).
-
radix
-
The radix to use for printing. The printer knob for radix is used if no radix is specified.
-
scope_separator
-
is used to find the leaf name since many printers only print the leaf name of a field. Typical values for the separator are . (dot) or [ (open bracket). Print_field_int
- Parameters:
name (string)
value (uvm_integral_t)
size (int)
radix (uvm_radix_enum)
scope_separator (byte)
type_name (string)
-
- print_object(string name, uvm_object value, byte scope_separator = ".")
Function
print_object
Prints an object. Whether the object is recursed depends on a variety of knobs, such as the depth knob; if the current depth is at or below the depth setting, then the object is not recursed.
By default, the children of uvm_components are printed. To turn this behavior off, you must set the uvm_component::print_enabled bit to 0 for the specific children you do not want automatically printed. Print_object
- Parameters:
name (string)
value (uvm_object)
scope_separator (byte)
- print_object_header(string name, uvm_object value, byte scope_separator = ".")
Print_object_header
- Parameters:
name (string)
value (uvm_object)
scope_separator (byte)
- print_string(string name, string value, byte scope_separator = ".")
Function
print_string
Prints a string field. Print_string
- Parameters:
name (string)
value (string)
scope_separator (byte)
- print_time(string name, time value, byte scope_separator = ".")
Function
print_time
Prints a time value. name is the name of the field, and value is the value to print.
The print is subject to the $timeformat system task for formatting time values. Print_time
- Parameters:
name (string)
value (time)
scope_separator (byte)
- print_real(string name, real value, byte scope_separator = ".")
Function
print_real
Prints a real field. Print_real
- Parameters:
name (string)
value (real)
scope_separator (byte)
- print_generic(string name, string type_name, int size, string value, byte scope_separator = ".")
Function
print_generic
Prints a field having the given name , type_name , size , and value . Print_generic
- Parameters:
name (string)
type_name (string)
size (int)
value (string)
scope_separator (byte)
- emit()
Function
emit
Emits a string representing the contents of an object in a format defined by an extension of this object. Emit
- format_row(uvm_printer_row_info row)
Function
format_row
Hook for producing custom output of a single field (row). Format_row
- Parameters:
row (uvm_printer_row_info)
- format_header()
Function
format_header
Hook to override base header with a custom header.
- format_footer()
Function
format_footer
Hook to override base footer with a custom footer.
- print_array_header(string name, int size, string arraytype = "array", byte scope_separator = ".")
Function
print_array_header
Prints the header of an array. This function is called before each individual element is printed. print_array_footer is called to mark the completion of array printing. Print_array_header
- Parameters:
name (string)
size (int)
arraytype (string)
scope_separator (byte)
- print_array_range(int min, int max)
Function
print_array_range
Prints a range using ellipses for values. This method is used when honoring the array knobs for partial printing of large arrays, uvm_printer_knobs::begin_elements and uvm_printer_knobs::end_elements.
This function should be called after begin_elements have been printed and before end_elements have been printed. Print_array_range
- Parameters:
min (int)
max (int)
- print_array_footer(int size = 0)
Function
print_array_footer
Prints the header of a footer. This function marks the end of an array print. Generally, there is no output associated with the array footer, but this method let's the printer know that the array printing is complete. Print_array_footer
- Parameters:
size (int)
- istop()
Utility methods. Istop
- index_string(int index, string name = "")
Index_string
- Parameters:
index (int)
name (string)
Class
uvm_printer
The uvm_printer class provides an interface for printing uvm_objects in various formats. Subtypes of uvm_printer implement different print formats, or policies.
A user-defined printer format can be created, or one of the following four built-in printers can be used:
uvm_printer
provides base printer functionality; must be overridden.
uvm_table_printer
prints the object in a tabular form.
uvm_tree_printer
prints the object in a tree form.
-
-
Printers have knobs that you use to control what and how information is printed. These knobs are contained in a separate knob class:uvm_line_printer
prints the information on a single line, but uses the same object separators as the tree printer.
-
-
For convenience, global instances of each printer type are available for direct reference in your testbenches.uvm_printer_knobs
common printer settings
uvm_default_tree_printer
uvm_default_line_printer
uvm_default_table_printer
uvm_default_printer (set to default_table_printer by default)
When uvm_object::print and uvm_object::sprint are called without specifying a printer, the uvm_default_printer is used.