Jump to content

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.

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

Link to comment
Share on other sites


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


Torsten Maehne

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.

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