Skip to content

Suggestion: Dynamic lookup mode #30

@mortbopet

Description

@mortbopet

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:

  1. Upon construction, index the module hierarchy and all of the signals
  2. Upon lookup of a cycle value for a given signal:
  • binary search the VCD file (Read line at N trace lines / 2 and 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 👍 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions