Hello,
I have a code in this form:
forever begin
@(case1, case2)
fork
begin // first block
<wait 3 clocks>
<some code>
end
begin // second block
@(case1)
end
join_any
disable fork;
end
We have case1 that triggers our code to be executed after 3 clocks.
But, if we have another case1 to trigger our code, we want to count again 3 clocks from that trigger and executed some code.
So we tried having a second block to wait on case1 and then when it finishes, with join_any, it will disable the first count.
Problem is, this second block is the one catching case1, and not the main forever one, so we aren’t not able to restart our count properly.
We also tried it with disable fork name and couldn’t get it correctly.
So the main question is how can I stop the first clock, and restart it when case1 happens? Kind of “jump to”
Thanks