Can you have multiple initial blocks in the top level of testbench?

Status
Not open for further replies.

s_vlsi

Junior Member level 2
Joined
May 16, 2006
Messages
20
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,460
Hi guys,
Plz clarify me if we can have multiple initial blocks in the top level of
testbench.

Thanks:?:
 

Testbench

yes, i usually have one initial block to dump the signals and other initial block to either initialize the signals or to provide the simulation time to finish.
 

Re: Testbench

It is a good idea to have multiple intial blocks. Each for different set of signals (say control signals have one initial block). communication another initial block etc. But it is bad idea if you plan to force any signal value from 2 different inital blocks. SInce they may lead to race condition.
 

Re: Testbench

no problem in having multiple initial blocks....but each should have its own signals
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…