I figured out what is wrong now. It turns out that
when you register a callback of type cbAfterDelay then
that callback will only be invoked once unlinke a cbValueChange
callbacks which will always be invoked at every signal change.
I have mistakenly added a vpi_remove_cb to remove cbAfterDelay
callbacks when there is no need to do so.
As for vcs, if you attempt to remove a callback that was already removed
then nothing happens. But for GPL Cver that isn't the case.
Out of curiosity, what version of ncverilog are you using? I am still
having segmentation fault issues.
Calvin
Suraj N. Kurapati wrote:
Calvin Wong wrote:
This test program introduces another scheme to handle multiple
atPosEdge/atNegEdge/wait routines in multiple threads using
cbValueChange callbacks for edge triggering and cbAfterDelay for
fixed wait times.
IMHO this example is reinventing the wheel by diving too deeply into
the project internals.
I know the current Handle#posedge? and Handle#negedge? methods
aren't very precise (they check the current value when invoked) but
that can be fixed.
So I am wondering, is there any particular reason, other than
increased accuracy of value change / edge detection, for
reimplementing the entire threading model in this example?