Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1303

VCD Filter Files

Added by Stefan Wallentowitz over 1 year ago. Updated 12 months ago.

Status:
NoFixNeeded
Priority:
Low
Category:
Invoking/Options
% Done:

0%


Description

Hi,

what recently bothered me a lot was debugging my own state machines. Some of those grew incredibly large (~90 states) but I don't want to split them (simple protocol processing, each state is like a few simple statements).

I read a bit into gtkwave's capabilities and it seems to me that a solution in the vcd file is not really workable: The only good one I can see is using wider fields and code the state as ASCII into them. But the changes in Verilator would be massive it seems (starting in the parser, ending in the runtime). Also the size of vcd files would not benefit from that..

So what I found a workable solution is to write filter files and assign them to signals in gtkwave. Those filter files contain a mapping from the integer value to a string to be displayed.

What I have started working on is a function that emits "filter files" for all enums as some extra output emitted by Verilator on demand.

Is that something you would accept?

Cheers, Stefan

History

#1 Updated by Wilson Snyder over 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Stefan Wallentowitz

I'm open to such a patch, however it maybe more useful to write a new trace writer that uses the gtkwave format.

Also see verilog-mode's AUTOASCIIENUM for a different approach.

#2 Updated by Stefan Wallentowitz over 1 year ago

Hi Wilson,

thanks a lot. I will have a look at LXT2 trace writers too. My first implementation prototype works well on the Verilator side, but the automation of feeding filter/alias files into gtkwave is very limited.

A better out-of-box solution that integrates perfectly with gtkwave seems more promising.

Cheers, Stefan

#3 Updated by Wilson Snyder over 1 year ago

Great. BTW I would suggest a hand written writer rather than the gtkwave-sources one for generic simulators, as VPI is way too slow. Dedicated code would then be closer to the existing vcd writing code. Also there's work towards multithreaded, so having Verilator's own writer will avoid setting back that direction.

#4 Updated by Stefan Wallentowitz over 1 year ago

Thanks, I assume you mean this vpi stuff under contrib. By the way I think I meant FST, just double checking with you. There is a bunch of stuff in fstapi.{c,h}, that I will have a look at. A lot of stuff seems a bit specific in there, but its at least a good start to understand the format.

#5 Updated by Stefan Wallentowitz over 1 year ago

Linking to my "hotfix" that implements the filter files as described above: https://github.com/wallento/verilator/commit/9ae27094470bfe0a5e13713548198284e1ce652c

It is pretty much tailored to my own use case, so no robustness guarantees. But maybe someone just lands here, looking for exactly that.

I will instead focus on creating a different writer.

#6 Updated by Wilson Snyder over 1 year ago

Note I'm currently sitting on the above mentioned patch, since it seems fairly one-user specific and something better (FST) might be coming. If there's other organizations that want it in the mainline, we can work towards merging it.

#7 Updated by Wilson Snyder 12 months ago

  • Status changed from Assigned to NoFixNeeded

LXT2 format added in bug1333, so think this isn't needed?

Also available in: Atom