HDL Signal Polling | |
Methods | |
uvm_get_poll | simple get function that returns the poll instance for a given path If no instance exists, it creates one and returns it. |
set_poll | simple set function that returns the poll instance for a given path @uvm-accellera The details of this API are specific to the Accellera implementation |
uvm_hdl_polling | Base class for HDL Polling functionality when using the uvm_hdl_polling class. |
uvm_hdl_polling_cbs | A base class for defining polling action callbacks to execute upon HDL path RTL signal value change |
uvm_polling_backdoor | Backdoor base class for HDL Polling Extend this class and implement the methods in it to obtain backdoor functionality when using the uvm_hdl_polling class. |
function uvm_hdl_polling uvm_get_poll( string pathname )
simple get function that returns the poll instance for a given path If no instance exists, it creates one and returns it. @uvm-accellera The details of this API are specific to the Accellera implementation
function bit uvm_set_poll( uvm_hdl_polling poll_inst, string pathname )
simple set function that returns the poll instance for a given path @uvm-accellera The details of this API are specific to the Accellera implementation
Base class for HDL Polling functionality when using the uvm_hdl_polling class. An instance of this class should be created for each monitored signal This class implements active monitoring of RTL value change for signals.
See the README.md for information on how to use this mechanism
An instance of this class should be created for each monitored register/field.
Assumptions. The largest signal that is being polled will fit inside a register of width uvm_poll_data_t. Users can redefine the MAX_WIDTH of the signal @uvm-accellera The details of this API are specific to the Accellera implementation
uvm_hdl_polling | |||
Base class for HDL Polling functionality when using the uvm_hdl_polling class. | |||
Class Hierarchy | |||
| |||
Class Declaration | |||
| |||
Methods | |||
get_backdoor | simple setter and getter functions for the backdoor mechanism @uvm-accellera The details of this API are specific to the Accellera implementation | ||
set_backdoor | This method registers a backdoor class with the uvm_hdl_polling object. | ||
set_hdl_poll_cb_registered | This method basically sets an internal variable if a callback has been registered to this polling object. | ||
get_hdl_poll_cb_registered | Accessor method to determine if a callback was registered for this object. | ||
new | Constructor. | ||
create_probe | This method creates a probe. | ||
register_hdl_path | This function registers a VPI value change callback for each RTL path Returns immediately if API callback was already registered Returns 1 if registration succeeded, 0 otherwise | ||
wait_for_hdl_change | if you’re using the default VPI implementation Register a value change VPI callback if not already registered Wait for a value change and then Return the new value if you’re using the backdoor, it will return when the backdoor changes. | ||
polling_wait_for_value | Perform register/field polling. | ||
set_hdl_path | This method returns a summary statistic for the polling classes. | ||
get_number_callbacks | This method returns the number of callback paths registered. | ||
get_value_change_count | This method tells you how many times the value of the signal changed. |
function uvm_polling_backdoor get_backdoor()
simple setter and getter functions for the backdoor mechanism @uvm-accellera The details of this API are specific to the Accellera implementation
function void set_backdoor( uvm_polling_backdoor backdoor )
This method registers a backdoor class with the uvm_hdl_polling object. Note that you must implement several methods in the backdoor instead of the built-in methods @uvm-accellera The details of this API are specific to the Accellera implementation
function void set_hdl_poll_cb_registered( bit value )
This method basically sets an internal variable if a callback has been registered to this polling object. @uvm-accellera The details of this API are specific to the Accellera implementation
function bit get_hdl_poll_cb_registered
Accessor method to determine if a callback was registered for this object. @uvm-accellera The details of this API are specific to the Accellera implementation
function new( string name = "uvm_hdl_polling" )
Constructor. The callback iterator for the callbacks is also created in this constructor. @uvm-accellera The details of this API are specific to the Accellera implementation
function bit create_probe( uvm_hdl_polling p, string fullname, bit enable = 1 )
This method creates a probe. You can choose to disable the probe when you create it. @uvm-accellera The details of this API are specific to the Accellera implementation
function bit register_hdl_path( string hdl_path_name )
This function registers a VPI value change callback for each RTL path Returns immediately if API callback was already registered Returns 1 if registration succeeded, 0 otherwise
@uvm-accellera The details of this API are specific to the Accellera implementation
virtual task wait_for_hdl_change( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
if you’re using the default VPI implementation Register a value change VPI callback if not already registered Wait for a value change and then Return the new value if you’re using the backdoor, it will return when the backdoor changes. @uvm-accellera The details of this API are specific to the Accellera implementation
virtual task polling_wait_for_value( ref uvm_poll_status_e status, input uvm_poll_data_t exp_val )
Perform register/field polling. Continue waiting for a value change until the expected value exp_val is identified @uvm-accellera The details of this API are specific to the Accellera implementation
This method returns a summary statistic for the polling classes.
This method returns the number of callback paths registered. Should always be 1.
This method tells you how many times the value of the signal changed.
A base class for defining polling action callbacks to execute upon HDL path RTL signal value change
@uvm-accellera The details of this API are specific to the Accellera implementation
uvm_hdl_polling_cbs | |||
A base class for defining polling action callbacks to execute upon HDL path RTL signal value change | |||
Class Hierarchy | |||
| |||
Class Declaration | |||
| |||
Methods | |||
new | Class Constructor | ||
do_on_hdl_change | To be implemented by extended classes to perform an action upon a value change of a register or a field | ||
do_on_path_change | To be implemented by extended classes to perform an action upon a value change of a path hdl_path is the path that its value has changed val is the actual value of the path after it was changed size is the size in bits of the path’s value |
To be implemented by extended classes to perform an action upon a value change of a register or a field
To be implemented by extended classes to perform an action upon a value change of a path hdl_path is the path that its value has changed val is the actual value of the path after it was changed size is the size in bits of the path’s value
Backdoor base class for HDL Polling Extend this class and implement the methods in it to obtain backdoor functionality when using the uvm_hdl_polling class. An instance of this class should be created for each monitored signal
uvm_polling_backdoor | |
Backdoor base class for HDL Polling Extend this class and implement the methods in it to obtain backdoor functionality when using the uvm_hdl_polling class. | |
Methods | |
new | Class constructor |
create_backdoor_probe | This function registers a backdoor probe on the signal. |
poll_bkdr_wait_for_hdl_change | This task is a hdl monitoring task that returns any time the monitored hdl signal changes its value. |
hdl_read | This function will read the HDL value and return its value. |
get_signal_size | You must implement this function in the backdoor class to give you back the size of the signal @uvm-accellera The details of this API are specific to the Accellera implementation |
set_hdl_path | You may use this function to cache the full path to the signal. |
virtual function bit create_backdoor_probe( int key, string fullname, bit enable = 1 )
This function registers a backdoor probe on the signal. You must return a 1 in case you’re able to access the signal. One approach is to obtain a virtual interface handle and return 1 in case you are able to get the handle. You may return 1 if you wish to access the signal by any other method like a direct cross module reference. @uvm-accellera The details of this API are specific to the Accellera implementation
virtual task poll_bkdr_wait_for_hdl_change( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
This task is a hdl monitoring task that returns any time the monitored hdl signal changes its value. This task will read the HDL value and return its value. If it cannot return the value, status must be set to UVM_HDL_POLL_NOT_OK. If the backdoor can read the value, it must be set to UVM_HDL_POLL_OK @uvm-accellera The details of this API are specific to the Accellera implementation
virtual function void hdl_read( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
This function will read the HDL value and return its value. If it cannot return the value The status must be set to UVM_HDL_POLL_NOT_OK. if the backdoor can read the value, it must be set to UVM_HDL_POLL_OK @uvm-accellera The details of this API are specific to the Accellera implementation
virtual function int get_signal_size()
You must implement this function in the backdoor class to give you back the size of the signal @uvm-accellera The details of this API are specific to the Accellera implementation
You may use this function to cache the full path to the signal. It may be useful in debug but is not functionally necessary.
simple get function that returns the poll instance for a given path If no instance exists, it creates one and returns it.
function uvm_hdl_polling uvm_get_poll( string pathname )
simple set function that returns the poll instance for a given path @uvm-accellera The details of this API are specific to the Accellera implementation
function bit uvm_set_poll( uvm_hdl_polling poll_inst, string pathname )
Base class for HDL Polling functionality when using the uvm_hdl_polling class.
class uvm_hdl_polling extends uvm_object
A base class for defining polling action callbacks to execute upon HDL path RTL signal value change
virtual class uvm_hdl_polling_cbs extends uvm_callback
simple setter and getter functions for the backdoor mechanism @uvm-accellera The details of this API are specific to the Accellera implementation
function uvm_polling_backdoor get_backdoor()
This method registers a backdoor class with the uvm_hdl_polling object.
function void set_backdoor( uvm_polling_backdoor backdoor )
This method basically sets an internal variable if a callback has been registered to this polling object.
function void set_hdl_poll_cb_registered( bit value )
Accessor method to determine if a callback was registered for this object.
function bit get_hdl_poll_cb_registered
Constructor.
function new( string name = "uvm_hdl_polling" )
This method creates a probe.
function bit create_probe( uvm_hdl_polling p, string fullname, bit enable = 1 )
This function registers a VPI value change callback for each RTL path Returns immediately if API callback was already registered Returns 1 if registration succeeded, 0 otherwise
function bit register_hdl_path( string hdl_path_name )
if you’re using the default VPI implementation Register a value change VPI callback if not already registered Wait for a value change and then Return the new value if you’re using the backdoor, it will return when the backdoor changes.
virtual task wait_for_hdl_change( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
Perform register/field polling.
virtual task polling_wait_for_value( ref uvm_poll_status_e status, input uvm_poll_data_t exp_val )
Class Constructor
function new( string name = "" )
Class constructor
function new( string name = "" )
This function registers a backdoor probe on the signal.
virtual function bit create_backdoor_probe( int key, string fullname, bit enable = 1 )
This task is a hdl monitoring task that returns any time the monitored hdl signal changes its value.
virtual task poll_bkdr_wait_for_hdl_change( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
This function will read the HDL value and return its value.
virtual function void hdl_read( ref uvm_poll_status_e status, ref uvm_poll_data_t val )
You must implement this function in the backdoor class to give you back the size of the signal @uvm-accellera The details of this API are specific to the Accellera implementation
virtual function int get_signal_size()