Re: [Gtkwave-users] lxt2vcd doesn't seem to work correctly
Brought to you by:
gtkwave,
joel1234567
From: <by...@nc...> - 2018-10-15 21:06:20
|
Thanks for reporting this and providing waves and screen shots so I can duplicate this. It's been since around 2009 since I've developed LXT2 (as I started working on FST then) so I've forgotten one interesting aspect of LXT2. I tried this and it works ok: ./vcd2lxt2 ~/Downloads/zzz_lxt2/vcd_from_vvp.vcd zx.lxt2 ; lxt2vcd zx.lxt2 > zx.vcd ; gtkwave zx.vcd ~/Downloads/zzz_lxt2/qqqv.gtkw Try this and we get the problems you see (same for -p 1): ./vcd2lxt2 -p 0 ~/Downloads/zzz_lxt2/vcd_from_vvp.vcd zx.lxt2 A long time ago I added a "partial mode" write/read to LXT2 in order to speed up read operations where a whole LXT2 block doesn't need to be processed at a time and we could pick and choose chunks of signals that were actually read. This was designed ONLY for wave viewers, but NOT for converting back into VCD as backtracking in time causes all kinds of issues with the VCD loader in gtkwave. From lxt2vcd(1): "Note that "regular" LXT2 files will convert to VCD files with monotonically increasing time values. LXT2 files which are dumped with the "partial" option (to speed up access in wave viewers) will dump with monotonically increasing time values per 2k block of nets. This may be fixed in later versions of lxt2vcd." Try this and you'll see the time rewinding over and over: ./lxt2vcd ~/Downloads/zzz_lxt2/lxt2_from_vvp.lxt2 | grep '^#' | more Don't use partial mode in your LXT2 emission in vvp. In sys_lxt2.c, this line needs to be commented out: lxt2_wr_set_partial_on(dump_file, 1); I would say that you suggest that to upstream Icarus as most people use FST these days anyway. Regardless if you inform Steve or not, use the FST dump option instead as it is considerably faster/better. This isn't worth fixing in gtkwave, but I might add a warning message in lxt2vcd that the file might not load properly in various tools. Possibly I'll add a warning in gtkwave as well. Thanks, -Tony ---- Ron Burkey <rbu...@ea...> wrote: > I'm having a problem with lxt2vcd. I apologize if this is the wrong > place to post about it. I've experienced this problem both with gtkwave > v3.66 from the Linux Mint repositories, and with 3.95 built from source. > > The problem is that while lxt2vcd produces a usable vcd file, and most > of the waveforms in it look okay, there are nevertheless some distorted > waveforms in it. You can access the files needed to see and reproduce > the problem at this google drive link: > https://drive.google.com/open?id=1RUjadnRVZh-j5qUeCRSArFUmvUjiwXi_ > > Specifically, I am running a simulation using Icarus Verilog's vvp > program (that's the file named "lxt2vcdbug.vvp" in the folder linked > above), from which I produce an lxt2 file ("lxt2_from_vvp.lxt2"), which > I would then like to convert to vcd using lxt2vcd. The vcd file I get > from doing so is "vcd_from_lxt2vcd.vcd". The specific signals I'm > interested in within the lxt2 or vcd file are called "main.AGC.T01_n" > through "main.AGC.T12_n". There's a screenshot ("lxt2vcdbug.png") that > shows both of these in gtkwave. The lxt2 trace is at the top, and the > vcd produced by lxt2vcd is at the bottom. (In the middle, just for > thoroughness, is a native vcd file produced directly by vvp.) > > Help! > > --Ron > > > > _______________________________________________ > Gtkwave-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtkwave-users |