3 timepic \- troff preprocessor for drawing timing diagrams
15 preprocessor for drawing timing diagrams.
17 code is contained between
24 \&.TPS \f2width\fP \f2row-height\fP
29 There are two types of
31 statements: variable definitions and signal definitions.
32 Variables are defined with the syntax
35 \f2var\fP = \f2expr\fP;
40 is an arithmetic expression involving floating-point constants and previously defined variables.
41 Currently only basic arithmetic (\fB+\fR, \fB-\fR, \fB*\fR and \fB/\fR) is supported.
42 Signals are defined with the syntax
45 \f2name\fP \f2events\fP ;
50 is a name that must be quoted unless it's a valid symbol.
51 \f2Events\fR is a list consisting of the following things:
54 The current time can be set using an arithmetic expression, that may be followed by a symbol interpreted as a unit.
55 For instance if you defined
61 are both valid time expressions.
66 which may or may not be intended behaviour.
68 A time expression can be preceded by \fP+\fR to mark it as relative to the previous time.
69 The first time is zero.
71 A time expression can be followed by a symbol name in square brackets.
72 The symbol is then defined with the time.
75 An expression of the form \fP:\fIname\fR creates an `event' at the current time, changing the value of the signal to \fIname\fR.
76 \fIname\fR can be a symbol (which is not evaluated), a numerical constant or a string in single quotes.
83 have special meaning, unless they are quoted.
88 draws a vertical dashed line at the next event.
91 An expression of the form
93 evaluates the expression, rounded to the nearest integer, and then repeats the events the specified number of times.
94 It is illegal if the expression evaluates to a negative number.
95 It is also illegal to use absolute times in the events list.
96 It is however legal to nest this construct.
102 clk +5{:1 +.5c:0 +.5c};
103 data :x 2.3c:DQ 4c|:x;
104 valid :0 2.3c:1 4c:0;
105 ready :0 3.6c:1 4c:0;
109 .B /sys/src/cmd/timepic.c