uvm_copier

UVMkit » 1800.2-2020

The uvm_copier class provides a policy object for doing comparisons.  The policies determine how miscompares are treated and counted.  Results of a comparison are stored in the copier object.  The uvm_object::compare and uvm_object::do_compare methods are passed a uvm_copier policy object.

Contents
uvm_copierThe uvm_copier class provides a policy object for doing comparisons.
uvm_copierImplementation of the uvm_copier class, as defined in section 16.6 of 1800.2-2020

uvm_copier

Implementation of the uvm_copier class, as defined in section 16.6 of 1800.2-2020

Summary
uvm_copier
Implementation of the uvm_copier class, as defined in section 16.6 of 1800.2-2020
Class Hierarchy
Class Declaration
class uvm_copier extends uvm_policy
Variables
policyDetermines whether comparison is UVM_DEEP, UVM_REFERENCE, or UVM_SHALLOW.
Methods
get_num_copiesReturns the number of times the rhs has been copied to a unique lhs
get_first_copy
get_next_copy
get_last_copy
get_prev_copy

policy

uvm_recursion_policy_enum policy = UVM_DEFAULT_POLICY

Determines whether comparison is UVM_DEEP, UVM_REFERENCE, or UVM_SHALLOW.

get_num_copies

function int unsigned get_num_copies( uvm_object  rhs )

Returns the number of times the rhs has been copied to a unique lhs

@uvm-contrib This API is being considered for potential contribution to 1800.2

get_first_copy

function int get_first_copy(uvm_object rhs, ref uvm_object lhs)

assigns to the lhs the value of the first (smallest) object that was copied from the rhs.  It returns 0 if the rhs hasn’t been copied; otherwise, it returns 1.

@uvm-contrib This API is being considered for potential contribution to 1800.2

get_next_copy

function int get_next_copy(uvm_object rhs, ref uvm_object lhs)

finds the smallest object that was copied from the rhs whose value is greater than the given lhs object argument.  If there is a next entry, the lhs is assigned the value of the next object, and the function returns 1.  Otherwise, the lhs is unchanged, and the function returns 0.

@uvm-contrib This API is being considered for potential contribution to 1800.2

get_last_copy

function int get_last_copy(uvm_object rhs, ref uvm_object lhs)

assigns to the lhs the value of the last (largest) object that was copied from the rhs.  It returns 0 if the rhs hasn’t been copied; otherwise, it returns 1.

@uvm-contrib This API is being considered for potential contribution to 1800.2

get_prev_copy

function int get_prev_copy(uvm_object rhs, ref uvm_object lhs)

finds the largest object that was copied from the rhs whose value is smaller than the given lhs object argument.  If there is a previous entry, the lhs is assigned the value of the previous object, and the function returns 1.  Otherwise, the lhs is unchanged, and the function returns 0.

@uvm-contrib This API is being considered for potential contribution to 1800.2

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.
virtual class uvm_policy extends uvm_object
The abstract uvm_policy class provides a common base from which all UVM policy classes derive Implementation as per Section 16.1 UVM Policy
class uvm_copier extends uvm_policy
Implementation of the uvm_copier class, as defined in section 16.6 of 1800.2-2020
function bit compare ( uvm_object  rhs,   
uvm_comparer  comparer  =  null )
Deep compares members of this data object with those of the object provided in the rhs (right-hand side) argument, returning 1 on a match, 0 otherwise.
virtual function bit do_compare ( uvm_object  rhs,
uvm_comparer  comparer )
The do_compare method is the user-definable hook called by the compare method.
uvm_recursion_policy_enum policy = UVM_DEFAULT_POLICY
Determines whether comparison is UVM_DEEP, UVM_REFERENCE, or UVM_SHALLOW.
function int unsigned get_num_copies( uvm_object  rhs )
Returns the number of times the rhs has been copied to a unique lhs