Add one-to-many association for registered VHPI callbacks
Is your capability/feature request related to a problem?
Using vhpi_handle(vhpiCurCallback, NULL)
, a VHPI application can get the current callback (if a callback is currently executing), but as far as I can find there is no way to iterate through registered callbacks, whether all callbacks or callbacks associated with an object.
Describe the solution you'd like
Add a new one-to-many association Callbacks
where appropriate that allows iteration through all registered and not removed callbacks, regardless of the state (enabled, disabled, or mature).
Initially I imagined an association from the null
class to see all callbacks that were registered by the VHPI program and not removed. Additionally, callbacks associated with objects and statements could be navigated to via the Callbacks property.
This would add a new value vhpiCallbacks
to the vhpiOneToManyT
enum in vhpi_user.h
Describe alternatives you've considered
None
Additional context
Clause 21.2.4 has a note that reads
NOTE—Releasing a handle that refers to a callback object neither removes the callback nor changes its state. A handle to the callback can subsequently be acquired by navigating the information model.
The only way to get a handle to a callback that I can find is the CurCallback
association, so I don't think that the last sentence is true in general.