phillbush / vcd2svg

Draw waveform from a vcd file into a svg image
6 stars 1 forks source link

where is the "sim.vcd" file? #1

Open lenniea opened 3 years ago

lenniea commented 3 years ago

can you check in the "sim.vcd" file you used to create the .svg file in the README.md? I am trying to recreate it (running on Ubuntu 18.04 & 20.04 but seem to get garbage in the .svg file). Also what were the command line parameters used to generate it? Also noticed that the generated file doesn't have an XML header (so won't display at all in Google Chrome, etc) only displays in Inkscape for me.

phillbush commented 3 years ago

Here's the file.
The command I used to convert to svg was:

$ ./vcd2svg clk:b data:u out:h <sim.vcd >sim.svg
lenniea commented 3 years ago

Thanks for the quick reply. I created a branch with your test file & a simpler one that I created by hand:

$timescale 1 ns $end $scope module top $end $var wire 1 ! clk $end $var reg 1 " in $end $var wire 1 # out $end $upscope $end $enddefinitions $end

0 0! x" z

50 1!

100 0! 0"

150 1!

200 0! 1

250 1!

300 0!

350 1!

400 0! 1"

450 1!

500 0!

550 1!

600 0!

650 1!

700 0! 1"

750 1!

800 0! 0

850

This file displays fine in gtkwave (see below) but doesn't work in vcd2svg? [image: image.png]

On Sat, Aug 14, 2021 at 4:17 PM phillbush @.***> wrote:

Here's the file https://0x0.st/-JFW.vcd. The command I used to convert to svg was:

$ ./vcd2svg clk:b data:u out:h sim.svg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phillbush/vcd2svg/issues/1#issuecomment-898969834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCMHODFIMREDN4Y6LPDRLT432RVANCNFSM5CFOMRLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

phillbush commented 3 years ago

Hi! Try the next commit, it should work.

vcd2svg didn't support multiple commands in a single line. The following line:

#700 0! 1"

Had to be written as

#700
0!
1"

Now it can parse multiple commands in a single line