Jump to content
katang

What is the scope of dont_initialize()?

Recommended Posts

From the docs, it is not quite clear if the scope of dont_initialize() is ALL unspawned processes, or just the ones already created when invoking dont_initialize().

"dont_initialize shall only be called in the body of the constructor ... only after having created an unspawned process instance within that same constructor or callback" From this sentence I guess that processes created *before* invoking  dont_initialize() will not be executed in the constructor, but the ones *after* invoking will be executed. Am I right?

 

Share this post


Link to post
Share on other sites

Hello @katang,

I have read somewhere that the dont_initialize() will be acknowledged with the last registered process is the SystemC kernel.(I will try to update once I find the reference for it.)

In the mean-time you can see these resources for various discussion about processes in SystemC kernel which might provide you with some information you are looking for:

https://sclive.wordpress.com/2008/01/10/systemc-tutorial-threads-methods-and-sc_spawn/

or here for some discussion:

Quote

 

Regards,

Ameya Vikram Singh

Share this post


Link to post
Share on other sites

Hi.

Ameya is right.

See SystemC LRM (ieee1666) Section 5.2.15: 

[...] it is associated with the most recently created process instance [...]

I.e.: ONE process created most recently before calling dont_initialize is not execute.

BTW: No process is executed in the constructor. But all processes, that are not marked as dont_initialize, are evaluated once at simulation start.

 

Greetings

Ralph

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×