Jump to content

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

Link to post
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.

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