opentitanlib::util

Module vcd

Source

Structs§

  • A VCD file header, containing timescale info & additional metadata
  • The output of parsing a VCD to a list of edges as a MonitoringReadResponse, which will include any parsed pin variables.
  • A signal in a VCD file, of some known type & width along with a reference name e.g. “wire 1 … rx_en”
  • An iterator over a VCD file, which returns uniform samples of values of VCD signals at every VCD time step. Depending on the delay between value changes, this could result in very long iteration counts.
  • The value change section of a VCD file, which contains a sequence of value change item entries.
  • A variable definition section of a VCD file, which features a list of top-level scopes that encapsulate all signal variable definitions (vardefs).
  • A full VCD file definition, containing at least a header (with a timescale), some variable definition(s) and any recorded value change section.
  • Struct implementing methods for parsing VCD data from some io::BufRead.
  • Struct implementing methods for writing VCD data to some io::Write

Enums§

  • Four-valued scalar logic values
  • A member item of some VCD scope, which is either another nested scope or a variable definition.
  • An item in the value change section of a VCD file, which can be a timestamp entry, a change in the value of a signal (at the last seen timestamp), or some other command (not currently supported).
  • Errors relating to VCD encoding/dumping
  • Errors related to VCD decoding/parsing

Functions§

  • A helper function using a VcdWriter to directly dump a given Vcd to a string containing equivalent VCD file contents.
  • Generate a vardefs section resulting from dumping a list of scalar (1 width) write signals into a single named scope, as a helper for easily exporting basic VCD files.
  • A helper function using a VcdParser to directly load given VCD file contents (as a &str) to an equivalent Vcd.
  • Construct a VCD of a waveform represented by a chronological sequence of rising / falling edges (i.e. value changes) as is returned by the GpioMonitoring interface. This includes an initial & final timestamp, some initial values, and a list of edge events.
  • Construct a VCD from a uniformly (discretely) sampled waveform, represented by a list of samples (pin values over time) and a timescale (sampling period). Each sample is defined by a slice of bytes, where each bit index in a slice refers to a single pin over each sample. Variables are defined in order, corresponding to LSB-first sample order.
  • Parses a VCD (given its contents) to a Vec of edges (value changes), with timestamps relative to the clock_resolution and initial_timestamp.