Jump to content
Sign in to follow this  
dakupoto

How to create a tabular trace file in SystemC ?

Recommended Posts

Could some SyetmC guru please help with some hints

on the following issue ? I wish to create a trace file in

a tabular format. I have used "sc_create_vcd_trace_file"

a lot, but I want to now output the same signal data in

a tabular format, preferably for plotting with e.g.,

OpenOffice Calc. Unlike SystemC-AMS, it appears

that SystemC does not support something like

"sc_create_tabular_trace_file". Any hints, suggestions

would be of immense help. Thanks in advance.

Share this post


Link to post
Share on other sites

VCD is not a challenging format. You could write your own replacement. Source code is available for current version. Model after existing utility and publish it for instant fame. Two approaches. Translate VCD file after the fact or replace sc_create_vcd_file with your own. Former approach would be more interesting and of general use. Plus it could've implemented in any programming language.

Share this post


Link to post
Share on other sites

Hello,

if you can link your model to SystemC-AMS, you may also try to use its tracing facility to which you're already accustomed. SystemC-AMS allows the tracing of pure SystemC signals and ports (cf. LRM clause 6.1.1.9) via sca_util::sca_trace() to tabular trace files opened via sca_util::sca_create_tabular_trace_file(). You may set the sampling time by passing sca_util::sca_sampling(tstep) to member function set_mode() of your pointer to an instance of sca_util::sca_trace_file.

However, I have to admit that I never tested using sca_trace() in an otherwise pure SystemC model. In the worst case, you'll have to create a dummy TDF module to which you assign the sampling time step as module time step.

Regards,

Torsten Maehne

Share this post


Link to post
Share on other sites

Hello,

Thanks for the hint about tabular trace files in SystemC-AMS,

I have used them, and they work just fine. I have also used

pure SystemC's VCD file creation feature, and it works fine

as well. Unfortunately, for this current case, the module can

only be in pure SystemC. .

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
Sign in to follow this  

×