The vcd
module contains three useful classes:
VCDParser
- a parser for.vcd
files that supports streaming the vcd file for analysis purposes. Can accept one or moreVCDWatchers
. 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
- the
- Simulation / capture data with timestamps The parser currently ignores:
$comment
lines$dumpall
,$dumpon
,$dumpoff
, and$dumpvars
in the data
- Declarations such as:
VCDWatcher
- a signal watcher to be passed toVCDParser
. It defines both a sensitivity list and a watched signal list. The watcher'sshould_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.VCDTracker
- One or more trackers can be added to aVCDWatcher
. They will be called on every watcherupdate
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 asfinished
, after which they will no longer be called. To implement a tracker,VCDTracker
must be subclassed, and thestart
andupdate
methods must be implemented.
- 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.
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.