Ben1152000 / sootty

A command-line tool for displaying vcd waveforms.
BSD 3-Clause "New" or "Revised" License
46 stars 12 forks source link

Add Extended VCD (EVCD) support #55

Closed yihuajack closed 2 years ago

yihuajack commented 2 years ago

Extended VCD is standardized by 1800-2017 IEEE Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language. The EVCD2VCD converter referred to gtkwave's implementation. However, gtkwave's implementation has some defects. For example, it cannot properly handle line feeds between one declaration. This issue has been resolved in this implementation. Besides, vcd_ids are stored in a dict in a simple and pythonic way rather than Jim Plank's Red Black tree (JRB). Currently, vcdid_hash and vcdid_unhash are adopted from gtkwave's implementation, but they may not be necessary, because they are originally designed to fit in Jval data structure for more than 8-bit char or unsigned char array. Note that the function only provides basic syntax checking for EVCD file. A full and complete syntax checking is beyond Sootty's work.

yihuajack commented 2 years ago

Some other detailed discussions see https://github.com/gtkwave/gtkwave/issues/148

yihuajack commented 2 years ago

This PR partially resolves #13

yihuajack commented 2 years ago

It seems that there is still a small bug when I use another example evcd file to test. Reviewing it.

yihuajack commented 2 years ago

Function comments reformatted A new evcd example generated by ModelSim added bugfix: evcd2vcd allows multiple nested scopes/upscopes Ready to be merged