Guest
I have doubts about vpi_remove_cb() routine and callbacks in general:
should "one-time" (non-repetitive) callbacks (like cbReadWriteSynch)
be removed automatically by simulator when executed or left for
removal by user with vpi_remove_cb()?
Can I iterate for them with vpiCallback one-to-many relationship? (as
far as I know NC-SIM and MTI does not support callback iteration at
all while Aldec's Rivera does - see Verilog 2005 LRM, p. 26.6.39).
Example:
Value change callback registers new synchronization callback every
time monitored object changes its state.
Note that frequent synch (and the like) callback registration and
execution without removal increases memory consumption (assuming that
every callback should be a unique object available by callback
iteration).
On the other hand VHPI has a capability of maturity that applies to
every callback and this implies that none of callbacks should be
removed automatically. As I understand, VPI idea is to left as many as
possible to the user so it seems that tracing execution and callback
removal is left to the user (user can define his/her own data
structure for keeping information about callback passed as a user
data).
Maybe I am missing something?
should "one-time" (non-repetitive) callbacks (like cbReadWriteSynch)
be removed automatically by simulator when executed or left for
removal by user with vpi_remove_cb()?
Can I iterate for them with vpiCallback one-to-many relationship? (as
far as I know NC-SIM and MTI does not support callback iteration at
all while Aldec's Rivera does - see Verilog 2005 LRM, p. 26.6.39).
Example:
Value change callback registers new synchronization callback every
time monitored object changes its state.
Note that frequent synch (and the like) callback registration and
execution without removal increases memory consumption (assuming that
every callback should be a unique object available by callback
iteration).
On the other hand VHPI has a capability of maturity that applies to
every callback and this implies that none of callbacks should be
removed automatically. As I understand, VPI idea is to left as many as
possible to the user so it seems that tracing execution and callback
removal is left to the user (user can define his/her own data
structure for keeping information about callback passed as a user
data).
Maybe I am missing something?