Skip to content

A Value Change Dump (VCD) file parser and analyzer

License

Notifications You must be signed in to change notification settings

umarcor/vcd_parsealyze

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VCD Parser and Analyzer

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 should_notify 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

  • Original code is the toggle count sample code example by Donald 'Paddy' McCarthy.
  • Elaborated by Gordon McGregor in 2013.
  • Improved, made 3.x compatible, and packaged by Joan Touzet in 2018.
  • Support 'b' and 'r' types by Unai Martinez-Corral in 2020.

License

COpyright  2020  Unai Martinez-Corral
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.

About

A Value Change Dump (VCD) file parser and analyzer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%