Signal timing (WaveDrom)

WaveDrom draws waveforms from a wave string, one character per time unit. Once you know the alphabet, timing diagrams take a minute.


#What this example shows

  • p for a clock, 0 and 1 for levels, . to hold.

  • Numbered data periods with a labels array.

  • x for don't-care, which is not the same as low.


#A worked example

Open it, edit it, or copy the source below.

Signal timing (WaveDrom)

The source, which you can paste into a new diagram and edit:

{ "signal": [
  { "name": "sclk",  "wave": "p........." },
  { "name": "cs_n",  "wave": "10.......1" },
  { "name": "mosi",  "wave": "x.2345x...", "data": ["cmd", "addr hi", "addr lo", "len"] },
  { "name": "miso",  "wave": "x.....678.", "data": ["d0", "d1", "d2"] },
  { "name": "busy",  "wave": "0.1......0" },
  {},
  { "name": "irq",   "wave": "0........1" }
],
  "head": { "text": "SPI burst read" },
  "foot": { "text": "One character per SCLK period" }
}

#Making it your own

  • Every wave string must be the same length, or the signals will not line up.

  • An empty object inserts a gap between groups of signals.

  • Use x for don't-care; a flat 0 claims the line is genuinely low.



Specialists. Borrow one when you need it.