The following set of structures used by WaveDrom rendering engine to describe timing diagrams. The format based on JSON syntax with some reserved keywords and structural limitations.
See WaveDrom Tutorial for examples.
The the main root object
. The value
is the array
of signal values
.
{ "signal" : [
value1,
value2,
...
]}
signal value of array
type represent a signal group. Where the first value
in array is the group label of type string
. Signal groups can be recursive.
{ "signal" : [
[ "Group 1", value1 ],
value2,
...
]}
signal object of object
type represent the signal descriptor.
The empty signal object will causes empty gap between signals.
{ "signal" : [
[ "Group 1", { signal object 1 }, { signal object 2 } ],
...
{}, <-- gap between signal lanes
...
{ signal object 3 },
...
]}
The string
type. This value
will be visible as signal label.
Example:
{ "signal" : [
{ "name" : "My Signal" }
]}
The string
type. The signal lane activity. Each character
represent single cycle.
{ "signal" : [
{ "wave" : "x.01.=.." }
]}
p
- when first in string creates positive edged clock waven
- when first in string creates negative edged clock waveP
- same asp
but with arrowN
- same asn
but with arrow0
- low level1
- high level=
- value (default color 2)2
- value with color 23
- value with color 34
- value with color 45
- value with color 5x
- undefined value.
- extends previous cyclez
- high-impedance stateu
- pull-up (weak 1)d
- pull-down (weak 0)|
- extends previous cycle and draw gap on top of it
Is an array
of signal labels. Each value
slot of signal lane can be labeled using this field.
{ "signal" : [
{ "data" : ["A", "B", "C"] }
]}
signal period of number
type. Expected natural number (1, 2, 3, 4 ...)
signal phase of number
type. Positive number represent shift into the future. Negative number represents shift into past (delay).
is the string
. Each character
represent a single cycle.
{ "signal" : [
{ "name" : "My Signal", "node" : "...a...b..C..." }
]}
.
- no marker[A-Z]
- invisible markerother
- visible marker
Other signal object
strings will be ignored by WaveDrom rendering engine.
The pair
inside the root object. The edge
's value
holds the description of dependency arrows in form of array
of strings
{ "signal" : [ v1, v2, ... ],
"edge" : array
}
Each element of edge array
is a single string
that describes an arrow or line (arrow string).
{ ...
"edge" : ["a->b edge 1", "b-~>c My Second Edge"]
}
Arrow string
may contain multiple words separated by spaces. The first word
defines the from
and to
points, the arrow shape and arrow label position. The rest of the text (after first space gap) will be placed as the label on top of arrow.
Special syntax can be used in the first word
. First character
is the from
label. The last character
is the to
identifier. The character
>
in second from the end position will produce the arrow header. The rest of the symbols will affect the arrow shape.
-
- move arrow horizontally (x+)|
- move arrow vertically (y+)~
- makes the curvy shape (x+, y+)/
- adds diagonal line (x+, y+)#
- indicates the arrow label position
number >= 1 defines horizontal scale of timing diagram.
See WaveDrom Tutorial for more information.