vcd.common

class vcd.common.ScopeType(*values)[source]

Valid VCD scope types.

IEEE 1800-2023 specifies the begin, fork, function, module, and task scope types. The remaining scope types are nonstandard, but are emitted by SystemVerilog and VHDL simulation tools and accepted by common VCD consumers such as GTKWave.

begin = 'begin'
fork = 'fork'
function = 'function'
module = 'module'
task = 'task'
class_ = 'class'
clocking = 'clocking'
generate = 'generate'
interface = 'interface'
package = 'package'
program = 'program'
struct = 'struct'
sv_array = 'sv_array'
union = 'union'
unknown = 'unknown'
vhdl_architecture = 'vhdl_architecture'
vhdl_block = 'vhdl_block'
vhdl_for_generate = 'vhdl_for_generate'
vhdl_function = 'vhdl_function'
vhdl_generate = 'vhdl_generate'
vhdl_if_generate = 'vhdl_if_generate'
vhdl_package = 'vhdl_package'
vhdl_procedure = 'vhdl_procedure'
vhdl_process = 'vhdl_process'
vhdl_record = 'vhdl_record'
class vcd.common.VarType(*values)[source]

Valid VCD variable types.

IEEE 1800-2023 specifies the variable types event through wor. The remaining variable types are nonstandard, but are emitted by various simulation tools and accepted by common VCD consumers such as GTKWave.

event = 'event'
integer = 'integer'
parameter = 'parameter'
real = 'real'
realtime = 'realtime'
reg = 'reg'
supply0 = 'supply0'
supply1 = 'supply1'
time = 'time'
tri = 'tri'
triand = 'triand'
trior = 'trior'
trireg = 'trireg'
tri0 = 'tri0'
tri1 = 'tri1'
wand = 'wand'
wire = 'wire'
wor = 'wor'
bit = 'bit'
byte = 'byte'
enum = 'enum'
int = 'int'
logic = 'logic'
longint = 'longint'
port = 'port'
real_parameter = 'real_parameter'
shortint = 'shortint'
shortreal = 'shortreal'
sparray = 'sparray'
string = 'string'
class vcd.common.TimescaleMagnitude(*values)[source]

Timescale magnitudes specified by IEEE 1800-2023.

Retained for backwards compatibility and convenience: Timescale.magnitude is a plain int, and these members compare equal to their integer values.

one = 1
ten = 10
hundred = 100
class vcd.common.TimescaleUnit(*values)[source]

Valid timescale units.

IEEE 1800-2023 specifies the units s through fs. The as and zs units are nonstandard extensions supported by FST-based tools such as GTKWave.

second = 's'
millisecond = 'ms'
microsecond = 'us'
nanosecond = 'ns'
picosecond = 'ps'
femtosecond = 'fs'
attosecond = 'as'
zeptosecond = 'zs'
class vcd.common.Timescale(magnitude: int, unit: TimescaleUnit)[source]

Timescale magnitude and unit.

IEEE 1800-2023 allows only the magnitudes 1, 10, and 100, but nonstandard magnitudes appear in the wild and are accepted by both the reader and the writer. Beware that some tools mishandle nonstandard magnitudes; notably, VCD to FST conversion silently treats them as 1.

magnitude: int

Alias for field number 0

unit: TimescaleUnit

Alias for field number 1

classmethod from_str(s: str) → Timescale[source]