ripyl.io package¶
Submodules¶
ripyl.io.vcd module¶
VCD file I/O
-
class
ripyl.io.vcd.
VCDChannel
(name, states, bits=1, vtype='wire')¶ Bases:
object
A VCD channel definition
-
__init__
(name, states, bits=1, vtype='wire')¶ Parameters: - name (string) – The name of this channel
- states (sequence of (float, int)) – The states for the channel. This can be an edge sequence or a similar sequence containing numeric values
- bits (int) – The number of bits in the channel
- vtype (string) – The var_type for the channel
-
-
class
ripyl.io.vcd.
VCDInfo
(channels, timescale=1e-12, date=None, comment=None)¶ Bases:
object
A VCD info object
-
__init__
(channels, timescale=1e-12, date=None, comment=None)¶ Parameters: - channels (sequence of VCDChannel) – A sequence of channel definitions
- timescale (float or string) – Set the VCD timescale as a power of 10. If a float, the value is used to establish the timescale. If a string, it must match a channel name from channels. The symbol rate of the named channel is determined and a raw timescale is derived from 1.0 / (4 * symbol rate). In both cases the raw value will be coerced to a valid power of 10.
- date (datetime or None) – An optional datetime for the VCD header. If absent the current time is used.
- comment (string or None) – An optional comment to include in the header.
Raises: ValueError if the timescale channel cannot be found or the symbol rate cannot be determined.
-
date
¶
-
timescale
¶
-
timescale_si
¶ Convert timescale float to a string with SI units
-
write
(fname, init_with_dumpvars=False)¶ Write a VCD file
Parameters: fname (string) – The name of the file to write to
-
-
ripyl.io.vcd.
coerce_timescale
(ts)¶ Coerce the timescale to a valid value
Module contents¶
IO package