Class uvm_printer
Name |
Type |
Description |
---|---|---|
knobs |
The knob object provides access to the variety of knobs associated with a specific printer instance. |
Functions
- virtual function void print_field ( string name, uvm_bitstream_t value, int size, uvm_radix_enum radix, byte scope_separator, string type_name ) [source]
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
- virtual function void print_int ( string name, uvm_bitstream_t value, int size, uvm_radix_enum radix, byte scope_separator, string type_name ) [source]
backward compatibility
- virtual function void print_field_int ( string name, uvm_integral_t value, int size, uvm_radix_enum radix, byte scope_separator, string type_name ) [source]
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
- virtual function void print_object ( string name, uvm_object value, byte scope_separator ) [source]
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
- virtual function void print_object_header ( string name, uvm_object value, byte scope_separator ) [source]
Print_object_header
- virtual function string format_row ( uvm_printer_row_info row ) [source]
Hook for producing custom output of a single field (row). Format_row
Hook to override base footer with a custom footer.
- virtual function void print_array_header ( string name, int size, string arraytype, byte scope_separator ) [source]
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
- virtual function void print_array_range ( int min, int max ) [source]
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
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
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.
uvm_line_printer
prints the information on a single line, but uses the same object separators as the tree printer.
Printers have knobs that you use to control what and how information is printed. These knobs are contained in a separate knob class:
uvm_printer_knobs
common printer settings
For convenience, global instances of each printer type are available for direct reference in your testbenches.
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.