You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of the SpTraceVCD functions does not appear to set the trace precision correctly.
When creating an instance of @SpTraceVcdCFile@, the time resolution is held in the associated @SpTraceVcd@ object (private variable @m_timeRes@, which can be set by the @set_time_precision()@ function). This defaults to 10e-9 (1ns), which is inconsistent with SystemC's default of 10e-12 (1ps). It can be overridden by explicitly, e.g:
SpTraceVcdCFile *tfp = new SpTraceVcdCFile ();
tfp->spTrace()->set_time_resolution ("1 ps");
Really this should be set automatically in a SystemC environment by calling the underlying @sc_get_time_precision()@ function from the constructor of @SpTraceVcdCFile@. The code to do this exists in the class @SpTraceVcdFile@, but I cannot see that this class is currently used.
The text was updated successfully, but these errors were encountered:
Original Redmine Comment
Author Name: Jeremy Bennett (@jeremybennett)
Original Date: 2009-01-27T18:25:21Z
Ah thanks - my misunderstanding from reading the example in the distribution.
I've tried, but can't see how to use @SpTraceFile@ to assist in SystemC tracing (the class I referred to as @SpTraceVcdFile@ is in fact @SpTraceFile@). This is a subclass of the abstract class @sc_trace@ used to do SystemC tracing. However I can't see how to use it. There should be an alternative to @sc_create_vcd_trace_file@ to create instances, which I can't find. I also ran into issues when I tried including the header @"SpTraceVcd.h"@, it got upset if I included it after any of the @"Vxxxx.h"@ headers.
Really I don't really want to do SystemC tracing - it's the underlying Verilog signals I'm after, so my approach was correct, but since I'm in the C world, I need to set the precision.
From my past experience, this is the usual scenario - it's the underlying signals that need to be traced. An option to allow Verilator to do this and automatically pick up the SystemC time precision would be a nice enhancement for the future.
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-05-08T18:56:33Z
I looked at doing this again, and it makes a bit as a mess as the C tracing isn't at all systemc aware, and making it so breaks compiles when there's no systemc. So until a major tracing rewrite comes I'll need to punt. Sorry.
Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 62 from https://www.veripool.org
Original Date: 2009-01-27
Use of the SpTraceVCD functions does not appear to set the trace precision correctly.
When creating an instance of @SpTraceVcdCFile@, the time resolution is held in the associated @SpTraceVcd@ object (private variable @m_timeRes@, which can be set by the @set_time_precision()@ function). This defaults to 10e-9 (1ns), which is inconsistent with SystemC's default of 10e-12 (1ps). It can be overridden by explicitly, e.g:
Really this should be set automatically in a SystemC environment by calling the underlying @sc_get_time_precision()@ function from the constructor of @SpTraceVcdCFile@. The code to do this exists in the class @SpTraceVcdFile@, but I cannot see that this class is currently used.
The text was updated successfully, but these errors were encountered: