Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect VCD header #946

Closed
veripoolbot opened this issue Jul 21, 2015 · 2 comments
Closed

Incorrect VCD header #946

veripoolbot opened this issue Jul 21, 2015 · 2 comments
Labels
area: wrong runtime result Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Frederic Requin
Original Redmine Issue: 946 from https://www.veripool.org
Original Date: 2015-07-21
Original Assignee: Frederic Requin


Hello,
I usually have the following trace initialization in the main.cpp:

#if VM_TRACE
     // Init VCD trace dump
     Verilated::traceEverOn(true);
     VerilatedVcdC* tfp = new VerilatedVcdC;
     top->trace (tfp, 99);
     tfp->spTrace()->set_time_resolution ("1 ps");
     tfp->open ("trace.vcd");
#endif

I would expect to find in the VCD file:

$timescale   1ps $end

But, I do find:

$timescale   0ps $end

This makes the latest version of "Impulse" (http://toem.de/index.php/projects/impulse) to fail.

In the file "verilated_vcd_c.cpp", I have changed the line (method doubleToTimescale() ):

char valuestr[100]; sprintf(valuestr,"%d%s",(int)(value), suffixp);

with:

char valuestr[100]; sprintf(valuestr,"%3.0f%s", value, suffixp);

This has fixed the issue :-)

Regards,

Frederic Requin

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-07-21T17:22:43Z


Right, thanks for the patch. Pushed to git towards 3.875.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-08-13T01:44:35Z


In 3.876.

@veripoolbot veripoolbot added area: wrong runtime result Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: wrong runtime result Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant