SyoSil ApS UVM Scoreboard  1.0.3.0
Static Public Member Functions | List of all members
cl_syoscb_printer_config Class Reference

Utility class used to perform manipulations of uvm_printer objects. More...

Inherits uvm_object, and uvm_object.

Static Public Member Functions

static void set_file_descriptor (uvm_printer printer, int fd=0)
 Sets the file descriptor to be used for a given printer. More...
 
static int get_file_descriptor (uvm_printer printer)
 Gets the file descriptor used for a given printer. More...
 
static void copy_printer (uvm_printer from, uvm_printer to)
 Copies all config information from one printer to another printer. More...
 
static void set_printer_begin_elements (uvm_printer printer, int elements)
 Sets the number of elements to print at the head of a list whenever the printer is used to print a tx item. More...
 
static void set_printer_end_elements (uvm_printer printer, int elements)
 Sets the number of elements to print at the tail of a list whenever the printer is used to print a tx item. More...
 
static void do_help_pack (uvm_printer printer, uvm_packer packer)
 Packs all configuration data for the given uvm_printer using the given uvm_packer. More...
 
static uvm_printer do_help_unpack (uvm_packer packer)
 Unpacks printer configuration data and returns a printer with that configuration. More...
 
static t_printer_type get_printer_type (uvm_printer printer)
 Gets the type of printer that a given uvm_printer represents. More...
 
static uvm_printer get_printer_of_type (t_printer_type ptype)
 Generates a new printer of the correct type. More...
 

Detailed Description

Utility class used to perform manipulations of uvm_printer objects.

Contains a number of functions that simplify uvm_printer related code, as the printer API differs based on the UVM version used. These functions encapsulate those differences, providing a unified API regardless of UVM version.

Definition at line 5 of file cl_syoscb_printer_config.svh.

Member Function Documentation

◆ copy_printer()

void cl_syoscb_printer_config::copy_printer ( uvm_printer  from,
uvm_printer  to 
)
static

Copies all config information from one printer to another printer.

Parameters
fromPrinter containing the data to be copied
toPrinter to inherit configuration data in from

Definition at line 160 of file cl_syoscb_printer_config.svh.

◆ do_help_pack()

void cl_syoscb_printer_config::do_help_pack ( uvm_printer  printer,
uvm_packer  packer 
)
static

Packs all configuration data for the given uvm_printer using the given uvm_packer.

Since uvm_printer does not natively support pack/unpack operations, these helper methods can be used to pack/unpack a printer

Note
The uvm_packer used must have the flag use_metadata set to 0b1 for this to work correctly
Parameters
printerThe uvm_printer for which all configuration values should be packed
packerThe uvm_packer to use when packing the item

Definition at line 213 of file cl_syoscb_printer_config.svh.

References get_printer_type().

◆ do_help_unpack()

uvm_printer cl_syoscb_printer_config::do_help_unpack ( uvm_packer  packer)
static

Unpacks printer configuration data and returns a printer with that configuration.

Since uvm_printer does not natively support pack/unpack operations, these helper methods can be used to pack/unpack a printer.

Note
The uvm_packer used must have the use_metadata flag set to 0b1 for this to work correctly
Parameters
packerThe uvm_packer that was previously used to pack a uvm_printer
Returns
A uvm_printer with the packed configuration

Definition at line 314 of file cl_syoscb_printer_config.svh.

References get_printer_of_type().

◆ get_file_descriptor()

int cl_syoscb_printer_config::get_file_descriptor ( uvm_printer  printer)
static

Gets the file descriptor used for a given printer.

Parameters
printerThe printer for which to get the file descriptor
Returns
The file descriptor used by this printer

Definition at line 56 of file cl_syoscb_printer_config.svh.

◆ get_printer_of_type()

uvm_printer cl_syoscb_printer_config::get_printer_of_type ( t_printer_type  ptype)
static

Generates a new printer of the correct type.

The type is one of the enum values defined in pk_syoscb::t_printer_type (TABLE, LINE, TREE or XML) If the given enum does not match one of the 4 valid options, an error is thrown

Parameters
ptypeThe type of printer which should be generated
Returns
A printer of the indicated type, null if the printer type was not recognized

Definition at line 107 of file cl_syoscb_printer_config.svh.

Referenced by do_help_unpack().

◆ get_printer_type()

t_printer_type cl_syoscb_printer_config::get_printer_type ( uvm_printer  printer)
static

Gets the type of printer that a given uvm_printer represents.

The valid printer types are limited to uvm_table_printer, uvm_line_printer, uvm_tree_printer and uvm_xml_printer. If the given printer does not match one of these 4 types, an error is thrown

Parameters
printerThe printer for which the type should be found
Returns
A SYOSCB_PRINTER_TYPE enum indicating which type of printer was passed

Definition at line 71 of file cl_syoscb_printer_config.svh.

Referenced by do_help_pack().

◆ set_file_descriptor()

void cl_syoscb_printer_config::set_file_descriptor ( uvm_printer  printer,
int  fd = 0 
)
static

Sets the file descriptor to be used for a given printer.

Parameters
printerThe printer on which to set the file descriptor
fdThe file descriptor

Definition at line 44 of file cl_syoscb_printer_config.svh.

Referenced by cl_syoscb_queue_base::dump(), and cl_syoscb_queue_base::dump_orphans_to_file().

◆ set_printer_begin_elements()

void cl_syoscb_printer_config::set_printer_begin_elements ( uvm_printer  printer,
int  elements 
)
static

Sets the number of elements to print at the head of a list whenever the printer is used to print a tx item.

Parameters
printerThe printer to set the number of elements for
elementsThe number of elements to print

Definition at line 441 of file cl_syoscb_printer_config.svh.

◆ set_printer_end_elements()

void cl_syoscb_printer_config::set_printer_end_elements ( uvm_printer  printer,
int  elements 
)
static

Sets the number of elements to print at the tail of a list whenever the printer is used to print a tx item.

Parameters
printerThe printer to set the number of elements for
elementsThe number of elements to print

Definition at line 454 of file cl_syoscb_printer_config.svh.


The documentation for this class was generated from the following files:

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
All Rights Reserved Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:41:06
Find a documentation bug? Report bugs to: scoreboard@syosil.com