Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Dynamic threads in system verilog

Status
Not open for further replies.

giri_lp

Member level 3
Joined
Feb 11, 2006
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,656
Hi All,
I am learning SV and I am coming across the concept called dynamic threads.

Can any one please explain me the concept of dynamic threads?


-Giri
 

dave_59

Advanced Member level 3
Joined
Dec 15, 2011
Messages
812
Helped
361
Reputation
726
Reaction score
354
Trophy points
1,353
Location
Fremont, CA, USA
Activity points
6,353
Re: Dynamic threads in SystemVerilog

In Verilog, all static threads are started at time 0 from initial or always constructs. A thread may be split up by a fork/join constructs. If you count up the number of initial and always constructs , plus the number of statements inside all your fork/join constructs, you can determine exactly the total number of threads there will be in your simulation at compile time. That is what is meant by "static"

The fork/join_none or fork/join_any constructs spawns a number of dynamic threads from a static thread. Because the static thread does not block waiting for dynamic thread to complete, there's no way to determine at compile time the number of threads that will be created. Only be the execution of code, or dynamically will you know how many threads will be created.
 

giri_lp

Member level 3
Joined
Feb 11, 2006
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,656
Re: Dynamic threads in SystemVerilog

Thank you. I will do some exercise staring at a piece of example and will get back if I have any questions
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top