uvm_policy

UVMkit » 1800.2-2017

The abstract uvm_policy class provides a common base from which all UVM policy classes derive Implementation as per Section 16.1 UVM Policy

Summary
uvm_policy
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 Hierarchy
uvm_policy
Class Declaration
virtual class uvm_policy extends uvm_object
Methods
newCreates a policy with the specified instance name.
flushThe flush method resets the internal state of the policy, such that it can be reused.
extension_existsFunction extension_exists Returns 1 if an extension exists within the policy with type matching ext_type; otherwise, returns 0.
set_extensionSets the given extension inside of the policy, indexed using return value from extension’s get_object_type? 
get_extensionReturns the extension value stored within the policy with type matching ext_type.
clear_extensionRemoves the extension value stored within the policy matching type ext_type.
clear_extensionsRemoves all extensions currently stored within the policy.
push_active_objectPushes obj on to the internal object stack for this policy, making it the current active object, as retrieved by get_active_object (see 16.1.3.3).
pop_active_objectPops the current active object off of the internal object stack for this policy and returns the popped off value.
get_active_objectReturns the head of the internal object stack for this policy.
get_active_object_depthReturns the current depth of the internal object stack for this policy.

new

function new ( string  name  =  "" )

Creates a policy with the specified instance name.  If name is not provided, then the policy instance is unnamed.

flush

virtual function void flush()

The flush method resets the internal state of the policy, such that it can be reused.  Policy extensions are Not cleared in below method as per 16.1.2.3

extension_exists

virtual function bit extension_exists( uvm_object_wrapper  ext_type )

Function extension_exists Returns 1 if an extension exists within the policy with type matching ext_type; otherwise, returns 0.

set_extension

virtual function uvm_object set_extension( uvm_object  extension )

Sets the given extension inside of the policy, indexed using return value from extension’s get_object_type? method (see 5.3.4.6).  Only a single instance of an extension is stored per type.  If there is an existing extension instance matching extension’s type, extension replaces the instance and the replaced instance handle is returned; otherwise, null is returned.

get_extension

virtual function uvm_object get_extension( uvm_object_wrapper  ext_type )

Returns the extension value stored within the policy with type matching ext_type.  Returns null if no extension exists matching that type.

clear_extension

virtual function void clear_extension( uvm_object_wrapper  ext_type )

Removes the extension value stored within the policy matching type ext_type.  If no extension exists matching type ext_type, the request is silently ignored.

clear_extensions

virtual function void clear_extensions()

Removes all extensions currently stored within the policy.

push_active_object

virtual function void push_active_object( uvm_object  obj )

Pushes obj on to the internal object stack for this policy, making it the current active object, as retrieved by get_active_object (see 16.1.3.3).  An implementation shall generate an error message if obj is null and the request will be ignored.  Additionally, the policy shall push itself onto the active policy stack for obj using push_active_policy (see 5.3.14.1) when push_active_object is called.

pop_active_object

virtual function uvm_object pop_active_object()

Pops the current active object off of the internal object stack for this policy and returns the popped off value.  For additional behaviour descriptions (see 5.3.14.2) when pop_active_object is called.

get_active_object

virtual function uvm_object get_active_object()

Returns the head of the internal object stack for this policy. empty, null is returned.

get_active_object_depth

virtual function int unsigned get_active_object_depth()

Returns the current depth of the internal object stack for this policy.

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
function new ( string  name  =  "" )
Creates a policy with the specified instance name.
virtual function void flush()
The flush method resets the internal state of the policy, such that it can be reused.
virtual function bit extension_exists( uvm_object_wrapper  ext_type )
Function extension_exists Returns 1 if an extension exists within the policy with type matching ext_type; otherwise, returns 0.
virtual function uvm_object set_extension( uvm_object  extension )
Sets the given extension inside of the policy, indexed using return value from extension’s get_object_type? 
virtual function uvm_object get_extension( uvm_object_wrapper  ext_type )
Returns the extension value stored within the policy with type matching ext_type.
virtual function void clear_extension( uvm_object_wrapper  ext_type )
Removes the extension value stored within the policy matching type ext_type.
virtual function void clear_extensions()
Removes all extensions currently stored within the policy.
virtual function void push_active_object( uvm_object  obj )
Pushes obj on to the internal object stack for this policy, making it the current active object, as retrieved by get_active_object (see 16.1.3.3).
virtual function uvm_object pop_active_object()
Pops the current active object off of the internal object stack for this policy and returns the popped off value.
virtual function uvm_object get_active_object()
Returns the head of the internal object stack for this policy.
virtual function int unsigned get_active_object_depth()
Returns the current depth of the internal object stack for this policy.