Skip to content
WaveDrom
DonateGitHub

WaveJSON & WaveQL · Human · EDA Tool · LLM

A Visual Language for Hardware Design

WaveJSON and WaveQL capture timing protocols, register maps, logic netlists, and simulation views in compact plain-text representations. Humans author them in Git, EDA tools render deterministic SVGs and live RTL/trace views, and LLMs generate, query, and review them in pull requests—closing the loop from specification to live design.

1

Tutorial · signal

Timing Diagrams

Specify cycle-by-cycle interface behavior without manual vector drawing. Each lane in the signal array maps one character per clock period, keeping multi-signal bus protocols aligned as you insert wait states, pipeline stages, or burst beats.

Group related channels into nested hierarchies, mark discontinuities with | time gaps, and anchor node labels on exact cycle transitions to draw curved causal edge dependencies across clock domains and handshake pairs.

  • Clocks & Polarity: p / n continuous clocks, P / N active-edge markers, period & phase for DDR interfaces.
  • Colored Bus Beats: Digits 2..9 render distinct tinted data envelopes populated sequentially from data.
  • Protocol Annotations: Nested ['Group', ...] brackets, {} spacers, head / foot cycle counters, and a~>b spline arrows.
{signal: [
  {name: 'aclk', wave: 'P.........|...'},
  ['Addr Ch',
    {name: 'arvalid', wave: '01..0.....|...', node: '.a..'},
    {name: 'arready', wave: '0..10.....|...', node: '...b'},
    {name: 'araddr',  wave: 'x5..x.....|...', data: '0x4080'},
    {name: 'arprot',  wave: 'x3..x.....|...', data: 'PRIV'}
  ],
  {},
  ['Data Ch',
    {name: 'rvalid',  wave: '0....1....|1.0',
     node: '.....c....|e..'},
    {name: 'rready',  wave: '1.....01..|1.0', node: '......d'},
    {name: 'rdata',   wave: 'x....46.7.|9.x',
     data: 'D0 D1 D2 ERR'},
    {name: 'rresp',   wave: 'x....2....|8.x',
     data: 'OKAY SLVERR'},
    {name: 'rlast',   wave: '0.........|1.0'}
  ]
],
edge: ['a~>b accept', 'b~>c +2 cyc', 'd~>e stall'],
head: {text: 'AXI4 Burst Read — Wait State & Error Tail', tick: 0}
}
Fig. 1 — AXI4 burst read transaction with address/data channel groups, backpressure stall, color-coded beats, and SLVERR tail.
2

Tutorial · reg

Register & Bitfield Maps

Document ISA instruction words, memory-mapped control/status registers (CSRs), DMA descriptors, and network packet headers from a declarative reg list ordered from least-significant bit (LSB) to most-significant bit (MSB).

Bit indices, MSB/LSB boundaries, and multi-lane word splits calculate automatically from field widths—eliminating off-by-one bit numbering errors when register layouts evolve during architecture review.

  • Multi-Lane Word Split: config: {bits: 32, lanes: 2} stacks wide 32-bit or 64-bit words into readable 16-bit rows.
  • Semantic Color Fills: type: 2..7 color-codes control flags, status bits, mux selectors, and reserved name: 0 spans.
  • Stacked Attributes: attr accepts strings ('RW', 'W1C') or arrays to list decoded enum states beneath each field.
{reg: [
  {bits: 1, name: 'EN',         attr: 'RW', type: 6},
  {bits: 1, name: 'IRQ',        attr: 'RW', type: 5},
  {bits: 2, name: 'MODE',       type: 4,
   attr: ['IDLE', 'STRM', 'SG']},
  {bits: 4, name: 'BURST[3:0]', attr: '1..16 beats', type: 7},
  {bits: 3, name: 'SIZE',       attr: '8..64b', type: 3},
  {bits: 1, name: 'ERR',        attr: 'W1C', type: 2},
  {bits: 4, name: 0,            attr: 'rsvd', type: 1},
  {bits: 8, name: 'STRIDE[7:0]', attr: 'signed step', type: 4},
  {bits: 6, name: 'REQ_ID[5:0]', attr: 'periph mux', type: 7},
  {bits: 2, name: 'PRIV',       attr: ['U', 'S', 'M'], type: 5}
], config: {hspace: 640, vspace: 112, lanes: 2, bits: 32}}
Fig. 2 — 32-bit two-lane DMA channel control register with color-coded field types, access modes, and enumerated attributes.
3

Tutorial · assign

Logic Schematics

Synthesize clean combinational and registered datapath schematics directly from prefix expression trees in the assign array. Powered by logidrom, netlists route automatically onto a fixed grid with zero manual wire dragging.

Combine IEEE/ANSI distinctive-shape logic gates with multi-bit vector buses, 2:1 multiplexers, arithmetic operators, reduction trees, and edge-triggered D flip-flops to illustrate RTL microarchitecture blocks.

  • Gates & Datapath Ops: & | ^ ~ ~& ~^ logic gates, + - * arithmetic nodes, ^1 reduction, and MUX selectors.
  • Sequential Elements: ff / ffe / ffern D flip-flops with clock wedge, enable (E), and active-low reset bubbles.
  • Ports & Vector Widths: {dir: 'in'|'out'} directional port chevrons and {width: 8} thick multi-bit bus routing.
{assign: [
  ['=', {dir: 'out'}, 'alu_q',
    ['ffern', {width: 8},
      ['MUX', {width: 8},
        ['+', {width: 8},
          ['src_a', {dir: 'in', width: 8}],
          ['MUX', {width: 8},
            ['src_b', {dir: 'in', width: 8}],
            ['~', {width: 8},
              ['src_b', {dir: 'in', width: 8}]],
            ['sub_en', {dir: 'in'}]
          ]
        ],
        ['^', {width: 8},
          ['src_a', {dir: 'in', width: 8}],
          ['mask', {dir: 'in', width: 8}]
        ],
        ['op_sel', {dir: 'in'}]
      ],
      ['clk', {dir: 'in'}],
      ['en', {dir: 'in'}],
      ['rst_n', {dir: 'in'}]
    ]
  ],
  ['=', {dir: 'out'}, 'parity_irq',
    ['&', ['irq_en', {dir: 'in'}],
      ['|', ['ovf', {dir: 'in'}],
        ['~^',
          ['^1', ['src_a', {dir: 'in', width: 8}]],
          ['exp_par', {dir: 'in'}]
        ]
      ]
    ]
  ]
]}
Fig. 3 — 8-bit registered add/subtract/XOR datapath slice (alu_q) and parity/overflow interrupt cone (parity_irq).
4

Live Views · WaveQL & RTL

Same Visual Language — Driven by Live RTL & Traces

Static specifications define architectural intent; live design views close the loop against implementation. VCDrom pairs simulation dumps with WaveQL—a plain-text query language that organizes .vcd and .lst traces into handshakes, CPU pipelines, and flame charts—while RTL Viz turns logidrom schematic rendering onto live Verilog and SystemVerilog source.

VCDrom opening VCD traces, editing WaveQL queries, and viewing waveforms live
Free · Browser & VSCodeWaveQL · VCD / LST

VCDrom — Trace Viewer & WaveQL

Navigate hierarchy, format buses, measure @time deltas, and decode valid/ready handshakes, CPU pipelines, and flame charts in plain-text WaveQL (VCD samples →):

tb dut aclk :clock @120ns.g:req @260ns.c:ack
/(?<valid>arvalid)|(?<ready>arready)|araddr/
/(?<pipe>\w\w)_((?<go>go)|(?<pc>pc))/s
RTL Viz in VSCode turning Verilog and SystemVerilog into live interactive RTL schematics
Free · VSCodeVerilog / SystemVerilog

RTL Viz — Live Schematic Viewer

Bundled WebAssembly Verilator extracts live logidrom schematics as you save (or uses native Verilator on large SoCs). Click any net in RTL or graph to cross-probe:

assign alu_y = op_sel ? (src_a ^ mask) : sum_ab;
assign parity_irq = irq_en & (ovf | (~^(^src_a)));
always_ff @(posedge clk) if (en) alu_q <= alu_y;