Top level object to represent a single VCD file. More...
#include <VCDFile.hpp>
Public Member Functions | |
| VCDFile () | |
| Instance a new VCD file container. More... | |
| ~VCDFile () | |
| Destructor. More... | |
| void | add_scope (VCDScope *s) |
| Add a new scope object to the VCD file. More... | |
| void | add_signal (VCDSignal *s) |
| Add a new signal to the VCD file. More... | |
| void | add_timestamp (VCDTime time) |
| Add a new timestamp value to the VCD file. More... | |
| VCDScope * | get_scope (VCDScopeName name) |
| Return the scope object in the VCD file with this name. More... | |
| void | add_signal_value (VCDTimedValue *time_val, VCDSignalHash hash) |
| Add a new signal value to the VCD file, tagged by time. More... | |
| VCDValue * | get_signal_value_at (const VCDSignalHash &hash, VCDTime time, bool erase_prior=false) |
| Get the value of a particular signal at a specified time. More... | |
| VCDSignalValues * | get_signal_values (VCDSignalHash hash) |
| Get a vector of VCD time values. More... | |
| std::vector< VCDTime > * | get_timestamps () |
| Return a pointer to the set of timestamp samples present in the VCD file. More... | |
| std::vector< VCDScope * > * | get_scopes () |
| Get a vector of all scopes present in the file. More... | |
| std::vector< VCDSignal * > * | get_signals () |
| Return a flattened vector of all signals in the file. More... | |
Data Fields | |
| VCDTimeUnit | time_units |
| Timescale of the VCD file. More... | |
| VCDTimeRes | time_resolution |
| Multiplier of the VCD file time units. More... | |
| std::string | date |
| Date string of the VCD file. More... | |
| std::string | version |
| Version string of the simulator which generated the VCD. More... | |
| std::string | comment |
| Version string of the simulator which generated the VCD. More... | |
| VCDScope * | root_scope |
| Root scope node of the VCD signals. More... | |
Protected Attributes | |
| std::vector< VCDSignal * > | signals |
| Flat vector of all signals in the file. More... | |
| std::vector< VCDScope * > | scopes |
| Flat mao of all scope objects in the file, keyed by name. More... | |
| std::vector< VCDTime > | times |
| Vector of time values present in the VCD file - sorted, asc. More... | |
| std::map< VCDSignalHash, VCDSignalValues * > | val_map |
| Map of hashes onto vectors of times and signal values. More... | |
Top level object to represent a single VCD file.
Definition at line 16 of file VCDFile.hpp.
| VCDFile::VCDFile | ( | ) |
Instance a new VCD file container.
Definition at line 8 of file VCDFile.cpp.
| VCDFile::~VCDFile | ( | ) |
Destructor.
Definition at line 13 of file VCDFile.cpp.
| void VCDFile::add_scope | ( | VCDScope * | s | ) |
Add a new scope object to the VCD file.
| s | in - The VCDScope object to add to the VCD file. |
Definition at line 49 of file VCDFile.cpp.
| void VCDFile::add_signal | ( | VCDSignal * | s | ) |
Add a new signal to the VCD file.
Add a new signal object to the VCD file.
| s | in - The VCDSignal object to add to the VCD file. |
Definition at line 59 of file VCDFile.cpp.
| void VCDFile::add_signal_value | ( | VCDTimedValue * | time_val, |
| VCDSignalHash | hash | ||
| ) |
Add a new signal value to the VCD file, tagged by time.
| time_val | in - A signal value, tagged by the time it occurs. |
| hash | in - The VCD hash value representing the signal. |
Definition at line 87 of file VCDFile.cpp.
| void VCDFile::add_timestamp | ( | VCDTime | time | ) |
Add a new timestamp value to the VCD file.
Add a time stamp to the sorted array of existing timestamps in the file.
| time | in - The timestamp value to add to the file. |
Definition at line 118 of file VCDFile.cpp.
| VCDScope * VCDFile::get_scope | ( | VCDScopeName | name | ) |
Return the scope object in the VCD file with this name.
| name | in - The name of the scope to get and return. |
Definition at line 74 of file VCDFile.cpp.
| std::vector< VCDScope * > * VCDFile::get_scopes | ( | ) |
Get a vector of all scopes present in the file.
Definition at line 104 of file VCDFile.cpp.
| VCDValue * VCDFile::get_signal_value_at | ( | const VCDSignalHash & | hash, |
| VCDTime | time, | ||
| bool | erase_prior = false |
||
| ) |
Get the value of a particular signal at a specified time.
| hash | in - The hashcode for the signal to identify it. |
| time | in - The time at which we want the value of the signal. |
| erase_prior | in - Erase signals prior to this time. Avoids O(n^2) searching times when scanning large .vcd files sequentially. |
Definition at line 126 of file VCDFile.cpp.
| VCDSignalValues * VCDFile::get_signal_values | ( | VCDSignalHash | hash | ) |
Get a vector of VCD time values.
| hash | in - The hashcode for the signal to identify it. |
Definition at line 169 of file VCDFile.cpp.
| std::vector< VCDSignal * > * VCDFile::get_signals | ( | ) |
Return a flattened vector of all signals in the file.
Definition at line 111 of file VCDFile.cpp.
| std::vector< VCDTime > * VCDFile::get_timestamps | ( | ) |
Return a pointer to the set of timestamp samples present in the VCD file.
Definition at line 97 of file VCDFile.cpp.
| std::string VCDFile::comment |
Version string of the simulator which generated the VCD.
Definition at line 39 of file VCDFile.hpp.
| std::string VCDFile::date |
Date string of the VCD file.
Definition at line 33 of file VCDFile.hpp.
| VCDScope* VCDFile::root_scope |
Root scope node of the VCD signals.
Definition at line 42 of file VCDFile.hpp.
|
protected |
Flat mao of all scope objects in the file, keyed by name.
Definition at line 139 of file VCDFile.hpp.
|
protected |
Flat vector of all signals in the file.
Definition at line 136 of file VCDFile.hpp.
| VCDTimeRes VCDFile::time_resolution |
Multiplier of the VCD file time units.
Definition at line 30 of file VCDFile.hpp.
| VCDTimeUnit VCDFile::time_units |
Timescale of the VCD file.
Definition at line 27 of file VCDFile.hpp.
|
protected |
Vector of time values present in the VCD file - sorted, asc.
Definition at line 142 of file VCDFile.hpp.
|
protected |
Map of hashes onto vectors of times and signal values.
Definition at line 145 of file VCDFile.hpp.
| std::string VCDFile::version |
Version string of the simulator which generated the VCD.
Definition at line 36 of file VCDFile.hpp.