uvm_printer¶
- class uvm.base.uvm_printer.UVMPrinter(name='')[source]¶
Bases:
object
Class: UVMPrinter
The UVMPrinter class provides an interface for printing <uvm_objects> in various formats. Subtypes of UVMPrinter 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:
UVMPrinter
- provides base printer functionality; must be overridden.UVMTablePrinter
- prints the object in a tabular form.UVMTreePrinter
- prints the object in a tree form.UVMLinePrinter
- 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.
- adjust_name(id, scope_separator='.')[source]¶
#self.adjust_name¶
- param id
- param scope_separator
Returns:
- class uvm.base.uvm_printer.UVMTablePrinter[source]¶
Bases:
UVMPrinter
Class: UVMTablePrinter
The table printer prints output in a tabular format.
The following shows sample output from the table printer:
--------------------------------------------------- Name Type Size Value --------------------------------------------------- c1 container - @1013 d1 mydata - @1022 v1 integral 32 'hcb8f1c97 e1 enum 32 THREE str string 2 hi value integral 12 'h2d ---------------------------------------------------
- class uvm.base.uvm_printer.UVMTreePrinter[source]¶
Bases:
UVMPrinter
Class: uvm_tree_printer
By overriding various methods of the <UVMPrinter> super class, the tree printer prints output in a tree format.
The following shows sample output from the tree printer:
c1: (container@1013) { d1: (mydata@1022) { v1: 'hcb8f1c97 e1: THREE str: hi } value: 'h2d }
- class uvm.base.uvm_printer.UVMLinePrinter[source]¶
Bases:
UVMTreePrinter
Class: UVMLinePrinter
The line printer prints output in a line format.
- The following shows sample output from the line printer::
c1: (container@1013) { d1: (mydata@1022) { v1: ‘hcb8f1c97 e1: THREE str: hi } value: ‘h2d }
- class uvm.base.uvm_printer.UVMJSONPrinter(name='')[source]¶
Bases:
UVMPrinter