Jump to content

Is there any way to reset SystemC registration?


Recommended Posts

I want to make some static testing (like complex submodule names are properly assembled or some utility modules work as expected), SystemC unrelated, using gtest. In the SetUp() and TearDown() methods I define individual environments for the individual tests. I receive tons of messages that the object already defined. What is true, but I want exactly test different instances. Can I reset SystemC somehow or switch off registering the objects when unit testing? (I say again, it is not SystemC related functionality, but embedded in mainly SystemC source files)




Link to comment
Share on other sites

The current SystemC proof-of-concept implementation does not support complete reinitialization of its simulation kernel, which would be needed for the use case outlined by you. Elaboration is done only a single time at which point the design hierarchy gets fixed. I would suggest that you have a look at the object traversal API offered by sc_core::sc_object (see clause 5.16) and all classes deriving from it. This should allow you to easily check your instance names for different test cases.

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.

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