Documentation

Sparkle.Backend.VCD

VCD File Format #

VCD files contain:

  1. Header (date, version, timescale)
  2. Scope and variable declarations
  3. Initial values
  4. Timestamped value changes

Example:

$date Thu Jan 30 2026 $end
$version Sparkle HDL $end
$timescale 1ns $end
$scope module top $end
$var wire 16 ! signal_name $end
$upscope $end
$enddefinitions $end
$dumpvars
b0000000000000000 !
$end
#0
#1
b0000000000001010 !

Signal identifier in VCD (!, ", #, $, etc.)

Equations
Instances For

    Convert BitVec to binary string for VCD

    Equations
    Instances For

      Convert Bool to VCD bit

      Equations
      Instances For

        VCD variable declaration

        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            VCD value at a specific time

            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                VCD Writer State #

                Tracks variables and their values over time for VCD generation.

                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Create a new VCD writer

                    Equations
                    Instances For

                      Add a variable to the VCD writer

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        VCD Header Generation #

                        Generate VCD header

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Generate variable declarations

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            VCD Trace Generation #

                            Generate timestamped value changes from Signal simulations.

                            Record of a signal value at a specific time

                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Sample a BitVec signal over time

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  Sample a Bool signal over time

                                  Equations
                                  Instances For

                                    Generate initial value dump

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      Group trace entries by time

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        Generate timestamped value changes

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          High-Level VCD Generation API #

                                          Generate complete VCD file from trace entries

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            Write VCD file to disk

                                            Equations
                                            Instances For