Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Spawning of threads fork-join in System Verilog

Status
Not open for further replies.

sam33r

Member level 2
Member level 2
Joined
Jan 24, 2011
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
NC
Activity points
1,576
program test(busif.TB bus);
task check_trans(Transaction tr);
fork
begin
wait (bus.cb.addr != tr.addr);
end
join_none
endtask


Transaction tr;
initial begin
check_trans(tr0);
fork
begin
check_trans(tr1);
fork
check_trans(tr2);
join
#(TIME_OUT) disable fork;
end
join
end
endprogram




Can some one please explain me the spawning of threads here. I am confused?
 

fork join: the parent thread will terminate when all sub thread is over!
fork join_none: the parent thread will continue to run when all sub thread is over!
fork join_any : the parent thread will terminate when any sub thread is over!
 
Thanks. I am confused with the behavior of the above code which has nested for joins and a disable fork also. Also a begin end statement inside the fork join.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top