forked from zylin/Verilog_VCD
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
It seems like VCDVCD struggles a bit with opening very large VCD files. My hunch is that this is due to the entire VCD trace is being loaded into internal datastructures upon loading the file, something which kills performance when loading >100MB files.
An alternative here could be to rework how the VCD file is being parsed:
- Upon construction, index the module hierarchy and all of the signals
- Upon lookup of a cycle value for a given signal:
- binary search the VCD file (Read line at
N trace lines / 2and scan linearly backwards until hitting a timestep, and recurse down or upwards based on that timestep) - Each time a timestep is encountered, maintain a caching
{timestep : file line}which can be used during lookup to quickly narrow in on a range of filelines where we expect the requested timestep to be.
Some additional caching could be added as well. The main goal would just be to amortize the cost of reading the VCD file until we actually need the values, so we don't have to wait multiple minutes (and use up all of our RAM!) with the VCD trace 👍 .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels