Skip to content

Export waveforms as TXT and VCD from BeWavedDolphin #347

@darktorres

Description

@darktorres

Description

Add export options to BeWavedDolphin for industry-standard waveform formats:

  • TXT: Human-readable tabular format
  • VCD (Value Change Dump): Compatible with GTKWave, ModelSim, and other waveform viewers

Acceptance Criteria

  • Export preserves timing information accurately
  • VCD files open correctly in GTKWave and ModelSim
  • Preview available before export
  • Export accessible from File menu and toolbar

Implementation Guide

1. VCD format

  • VCD is a simple text format defined by IEEE 1364 (Verilog standard)
  • Structure: header (date, version, timescale) → variable definitions → value changes
  • Map each signal row to a VCD variable with a short identifier
  • Write only value changes (not every timestep) for compact output
  • Timescale: map simulation ticks to a configurable time unit (e.g., 1ns)

2. TXT format

  • Header row: signal names tab-separated
  • Data rows: one per timestep, values tab-separated
  • Include a timestamp column
  • Optional: hex/decimal for grouped signals

3. Export UI

  • Add File → "Export as VCD..." and "Export as TXT..." to BeWavedDolphin menu
  • Preview dialog showing the first N lines of output
  • Options: time range selection, signal filtering

4. Implementation

  • Add methods to Serializer class: exportVCD(const QString &path), exportTXT(const QString &path)
  • Read data from SignalModel rows and columns
  • Write using QTextStream for both formats

Key files

  • App/BeWavedDolphin/Serializer.h/.cpp — add export methods
  • App/BeWavedDolphin/SignalModel.h/.cpp — signal data source
  • App/BeWavedDolphin/BeWavedDolphin.cpp — menu actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions