Jump to content
Ness

Recursive sc_trace for all sc_signal channels

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

Share this post


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

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

×