-
Notifications
You must be signed in to change notification settings - Fork 127
Issues with dump files containing integer types #431
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 < 8000 a class="Link--inTextBlock" href="https://docs.github.com/terms" target="_blank">terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'll have to experiment with these. To get arrays of integers, I need to bounce through FSDB first because VCS skips dumping them. From fsdbdebug, the FSDB file doesn't leave anything to chance in the signal name for arrays of integers (k) and fully specifies everything.
It indirectly sidestepped shortint though by making it a reg: From a practical point of view, we should see well-behaved signal declarations. For the name clashes with your example using I'll mess with these. I've never deliberately tried to break the loaders because in the past, it's often been the case where a simulator developer would have gone back and forth with me interatively on how the $var declarations should be named--especially when the Verilog spec turned out not to define something at all. |
|
For the integers that aren't declared as 32b, I think the reason that non-32b sizes are accepted by the VCD loader is staring me in the face from that old set of VCD waves. These aren't integers, but parameters effectively are constant integers. I don't know if simulators still do this leftmost 1 bit optimization for length when writing out VCD. I don't recall seeing anything like this in recent memory but I haven't paid attention, either. I didn't expect there would be the unearthing of a time capsule this year. :-)
|
Sorry, I thought that I checked this in the latest LTS revision, but apparently I only checked it with the latest release in my distro, which is 3.3.121. I can confirm that it works in the latest LTS commit.
|
Thanks for digging that out, that's really interesting. Based on this info I think I'll handle integer types in GTKWave 4 like this:
|
I added SV datatypes to FST as I expected simulators would eventually add them, so I wanted to get ahead of any spec updates. They were added to VCD mainly so vcd2fst/fst2vcd were somewhat symmetrical in capabilities. That said, I added them speculatively to the VCD loaders in case the VCD section of the 1800 spec was updated, but it doesn't look like it ever was (looking at the 2017 version) or ever will be. I doubt they'll ever be a part of the spec if they aren't already. Ironically, there are pretty much useless net types in a modern production context such as tri0, etc. in the list of supported types in the spec.
That sounds very good to me. |
I've found another rabbit hole, this time it's integer types. Here are some issues I've noticed so far:
shortint
, like vectors and not like the regularinteger
, which the FST loader does. This means that it adds[15:0]
to the name. The FST loader works correctly.[31:0]
, from integer variables, which makes sense because tools like iverilog add them, which the probably shouldn't according to an example in the VCD specs. But any index range is removed without further checks, which means that technically invalid declarations like$var integer 64 ! int $end
or$var integer 64 ! int[63:0] $end
work as 64 bit integers, but there is no indication in the UI that this isn't a regular 32 bit integer. I think it would be a reasonable approach to only strip valid index ranges, e.g.[31:0]
forinteger
or[15:0]
forshortint
, and add or preserve the index ranges for all other integer variables.$var integer 32 a int[0] $end
and$var integer 32 b int[1] $end
are both shortened toint
and only the first variable is visible in the SST without any warnings or errors. The FST loader does seem to handle this correctly and treats the indices as part of the name.The text was updated successfully, but these errors were encountered: