katang Posted June 7, 2017 Report Share Posted June 7, 2017 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) Quote Link to comment Share on other sites More sharing options...
maehne Posted June 7, 2017 Report Share Posted June 7, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.