S
SB
Guest
All,
I have a task in a Verilog testbench that waits for the assertion of a
"ready" signal from the DUT.
@(posedge ready_signal) ; //continue with the task flow
In the testbench's present form, if the ready signal should never
assert for a given input condition (which is possible), the testbench
will hang, forever polling the ready signal.
I have tried to develop a timeout scheme that will limit the number of
operating clock cycles that the testbench will wait for the ready
signal, before it abandons the wait and moves on with the stimulus. I
have not been succesful.
I have tried a down-counter scheme in parallel with the line of code
above in a fork-join statement. However, the fork-join will only
finish when both forks are complete, so this will not help me. I can
develop a count-down scheme fine, but in the event that the "end of
the count" is reached, I am unsure how to "skip" the @(posedge) line
above.
Can anybody suggest a scheme that will do this?
Regards
SB
I have a task in a Verilog testbench that waits for the assertion of a
"ready" signal from the DUT.
@(posedge ready_signal) ; //continue with the task flow
In the testbench's present form, if the ready signal should never
assert for a given input condition (which is possible), the testbench
will hang, forever polling the ready signal.
I have tried to develop a timeout scheme that will limit the number of
operating clock cycles that the testbench will wait for the ready
signal, before it abandons the wait and moves on with the stimulus. I
have not been succesful.
I have tried a down-counter scheme in parallel with the line of code
above in a fork-join statement. However, the fork-join will only
finish when both forks are complete, so this will not help me. I can
develop a count-down scheme fine, but in the event that the "end of
the count" is reached, I am unsure how to "skip" the @(posedge) line
above.
Can anybody suggest a scheme that will do this?
Regards
SB