Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ramuneeb opened this issue Oct 29, 2024 · 0 comments

Comments

@ramuneeb
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant