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.

Systemverilog fork-join_none and forever block

Status
Not open for further replies.

srish

Newbie level 6
Joined
Dec 13, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,375
My code goes like this:

fork
begin
....
forever
begin
process 1;
if (some condition)
break;
end
.....
end
join_none

My doubt is if that "some condition" is met then will break will help to come out of forever block and fork-join_none block???? ........... fork-join_none has only 1 begin-end block......plz ans???
 

You will come out of the fork/join_none regardless of what is inside it because it dynamically spawns a process without waiting for it to complete. join_none means "wait for no processes to complete before continuing (re-joining) the current process".

The fork block has one statement inside it - a begin/end block - which means it spawns only one process. Lets name that block p1.

One of the statements inside the the p1 begin/end block is a forever looping statement.

The looping statement is another begin/end block.

One of the statements inside the the looping begin/end block is a break statement.

When the break statement executes, the forever looping begin/end block exits, and the next statement in the p1 begin/end block executes.

When the last statement in the p1 block finishes, the p1 process terminates.
 
  • Like
Reactions: srish

    srish

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top