Jump to content

Why should instances of sc_module only be created from sc_main or a top level module?


Rahat

Recommended Posts

It states in section 4.2.2 of the SystemC Language Reference Manual that:

Instances of the following classes (or classes derived from these classes) may be created during elaboration
and only during elaboration. Such instances shall not be deleted before the destruction of the module
hierarchy at the end of simulation.
sc_module
(see 5.2)
sc_port
(see 5.12)
sc_export
(see 5.13)
sc_prim_channel (see 5.15)

What is the reason for this?

Why can't I for e.g. create an instance of an sc_module inside a C++ class?

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...