Jump to content

Recursive sc_trace for all sc_signal channels


Ness

Recommended Posts

Hi,

I wish to perform a trace for all the signals in my design.
Since I didn't find a reference how to do this, I tried to implement it by myself.
The main concept I used is to run recursively on all child objects of sc_module objects (using the get_child_objects() method).
If a child object is sc_signal, the sc_trace method is performed.


I created a test-case and ran it with Accellera compiler 2.3. However, I'm getting the following warning:

Warning: (W710) object cannot not be traced: system.sig
In file: ..\..\src\sysc\tracing\sc_trace.cpp:145

Could you please help me to fix the code?

Regards,
Ness

case_system.h

case_walker.h

case_system.cpp

case_walker.cpp

sc_main.cpp

Link to comment
Share on other sites

Your trace function calls sc_trace(sc_trace_file *, sc_object*, const char*) which is not overloaded and hence issues the warning.

You would need to test for each single template instance of sc_signal<T> and then call the appropriate sc_trace function. And example you can find in https://git.minres.com/SystemC/SystemC-Components/src/branch/master/src/tracer_base.cpp#L90. Or you may use the SystemC Components Library (SCC) as a whole since it provides already this functionality.

Best regards

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.

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