Clarify the problem:
in my test, it is just
task run_phase();
A.start();
endtask
B is a scoreboard, and in the run phase it frees the token.
In B run_phase:
super.run_phase();
Forever begin
if()
freeToken();
end
A is a sequence , and here what going on is:
task body();
…
while() begin
if(getToken())
break;
end
endtask
there is a interlock going on between A and B. in A, there is a loop which wait for B to free a token. However it seems A just wait forever and B never get executed if I code them like this. Am I understanding something wrong? It might be the loop part going wrong but when I remove the loop thing, it seems fine.
Any ideas?
run_phase of all the components created run in parallel like in a fork join statement.
But there is no run_phase in sequences (there is whole set of different way of communication btw sequences/sequences and driver that need to be looked on)and hence your code is not working in way you want it do.