vcd_parsealyze

A Value Change Dump (VCD) file parser and analyzer

View on GitHub

VCD Parser and Analyzer

Build Status

The vcd module contains three useful classes:

  1. VCDParser - a parser for .vcd files that supports streaming the vcd file for analysis purposes. Can accept one or more VCDWatchers. The parser was built referring to the IEEE SystemVerilog standard 1800-2009, Section 21.7 (Value Change Dump (VCD) files). It supports the following vcd file features:
    • Declarations such as:
      • the $date and $time of the vcd file
      • the $timescale of the vcd file
      • $var variables with scoped and hierarchical (XMR) paths
    • Simulation / capture data with timestamps The parser currently ignores:
    • $comment lines
    • $dumpall, $dumpon, $dumpoff, and $dumpvars in the data
  2. VCDWatcher - a signal watcher to be passed to VCDParser. It defines both a sensitivity list and a watched signal list. The watcher’s update method will be called whenever a sensitivity list signal changes. It will be provided the current values of all signals on its watched signal list.
  3. VCDTracker - One or more trackers can be added to a VCDWatcher. They will be called on every watcher update by default, and are intended to be used to analyse one or more higher level transactions occuring in the watched data. Trackers can mark themselves as finished, after which they will no longer be called. To implement a tracker, VCDTracker must be subclassed, and the start and update methods must be implemented.

Credits

License

   Copyright  2018  Joan Touzet
   Copyright  2013  Gordon McGregor

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.