Jump to content
Roman Popov

Why sc_signal<T>::trace() is deprecated ?

Recommended Posts

Hi all,
For debugging purposes it may be useful to add all signals in design to trace file. However, sc_signal::trace() which may allow to do it automatically is deprecated.
Why is that?
 
In general I think it will be useful to add trace method to sc_interface, so that all channels that support tracing can implement it. And then it will be possible to implement something like:
sc_trace_all(sc_trace_file *tf) // add all objects that support tracing to trace file.

Share this post


Link to post
Share on other sites

Hi Roman,

This would be something to discuss in the Accellera SystemC LWG (or the IEEE P1666 WG).  In practice, most/all commercial simulators provide much more advanced tracing mechanisms already, beyond what the current sc_trace() API allows to support. My guess would be, that this part of the standard is something where it is difficult to reach consensus, as it touches the core distinguishing features of commercial SystemC offerings.

Moreover, the sc_trace()-based API is a costly "pull" interface, which effectively loops over all variables at each time step and does a value comparison.  This is also pretty inefficient for e.g. signals, which already "know" if they changed.  So I think, a plain sc_interface::trace() addition is not sufficient to bring real additional value here.

Last, but not least, this function would have to have a default (empty) implementation to not break existing models and would require some extension mechanism to add support for custom types.

Greetings from Duisburg,
  Philipp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×