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.

Why use fork...join_none in SystemVerilog?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
fork join_none

Hi all,

I found in most SystemVerilog example, people like to use fork...join_none pair (not the traditional fork...join pair). Is there some advantage to fork...join_none pair? Thanks!

Best regards,
Davy
 

system verilog fork

davyzhu said:
Hi all,

I found in most SystemVerilog example, people like to use fork...join_none pair (not the traditional fork...join pair). Is there some advantage to fork...join_none pair? Thanks!

Best regards,
Davy

Classic fork..join is a "join all" construct. That's if you fork 2 threads, then both of them need to finish for the join to end. With join_none, one can spawn threads and continue, this is useful in launching multple input data streams for example.


Regards
Ajeetha, CVC
www.noveldv.com
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
systemverilog join_none

Hi Ajeetha,

Thanks a lot!

Do you mean I can do below, thanks!
Code:
initial begin
    fork
        launch input data stream 1;
        ... ...
        launch input data stream N;
    join_none
    
    do something related to data stream;
end

Best regards,
Davy
 

fork systemverilog

Hi Ajeetha,

Thanks a lot!

And I am curious about the fork...join_any(join the thread when thread that used least time is finished). I cannot image when "fork...join_any" is used?

Best regards,
Davy
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top