katang Posted July 21, 2017 Report Share Posted July 21, 2017 I want to test the basic functionality of my design with gtest. It does not have yet the SystemC functionality, but heavily uses SystemC modules and data structures. I create a fresh copy of my top-level module for the individual gtests, and receive tons of warnings that I already defined an module with that name. It is harmless, but annoying. Any idea, how can I suppress it? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted July 21, 2017 Report Share Posted July 21, 2017 Do you create a separate executable for individual test? More related discussions here: https://stackoverflow.com/questions/43145530/does-systemc-unit-testing-need-forking https://stackoverflow.com/questions/4923292/using-existing-unit-test-frameworks-with-systemc Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted July 21, 2017 Report Share Posted July 21, 2017 In general google test was not designed for hardware verification, probably you should better look on UVM-SystemC when it will be released. Quote Link to comment Share on other sites More sharing options...
maehne Posted July 25, 2017 Report Share Posted July 25, 2017 I agree with Roman that UVM-SystemC is the way to go in the long run. In the meantime, you should be able to avoid the observed warnings by passing globally unique module names to the modules and sc_objects you are creating across all tests. This should satisfy the hierarchical name registry of SystemC. To my knowledge, the latter does not keep track of deallocation of sc_objects and thus that its corresponding hierarchical name is not anymore used. Be aware though that you may run into other surprises as the SystemC kernel is currently not able to fully restart from scratch elaboration and simulation. 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.