cirosantilli / vcdvcd

Python Verilog value change dump (VCD) parser library + the nifty vcdcat VCD command line pretty printer.
Other
54 stars 21 forks source link

Implemented timescale parsing #7

Closed christian-krieg closed 4 years ago

christian-krieg commented 4 years ago

Hey There,

I was in need to extract the timescale from a VCD file, but didn't find that feature implemented in VCDVCD. So I put in some effort and implemented this feature. I hope you find it useful as well, and it would be cool to see this propagating upstream.

Looking forward to our discussion!

In the following, I listed the changes I made to the VCDVCD class:

Cheers!

cirosantilli commented 4 years ago

Thanks for this Christian! I should stop being lazy and add tests. But hey, lazy! XD

One small thing, at f.readline().strip().rstrip() I think strip() already does an rstrip() so rstrip is not needed?