Hi,
A large number of tasks inside my testbench wait for events. I would like to create a macro wrapper so that if the task does not complete within a timeout time then i would like to disable the task. Is that possible?
My first attempt at creating a macro gives syntax error. Not sure how to do it or whether it is even possible?
`define timed_task(taskname, timeout) \
do begin \
fork begin \
fork: my_block \
taskname(); \
#(timeout) $fatal("[%0t]:Timeout taskname %s", $stime, taskname); \
join_any \
disable fork; \
end join \
end while(0)
-sanjeev