Jump to content

What is the scope of dont_initialize()?


katang

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?

 

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...