1DRAWTIMING(1) BSD General Commands Manual DRAWTIMING(1)
2
4 drawtiming — generate timing diagram from signal description
5
7 drawtiming [--verbose] [--scale factor] [--pagesize WxH] [--aspect]
8 [--cell-height H] [--cell-width W] [--font-size pts]
9 [--line-width W] --output target file ...
10
12 This application provides a command line tool for documenting hardware
13 and software designs through ideal timing diagrams. It reads signal
14 descriptions from a text file with an intuitive syntax, and outputs an
15 ideal timing diagram to an image file. Notation typical of timing dia‐
16 grams found in the Electrical Engineering discipline is used, including
17 arrows indicating causal relationships between signal transitions.
18
19 The options are as follows:
20
21 --help Show usage reminder.
22
23 --verbose Increase diagnostic output.
24
25 --scale factor
26 Scale the diagram by the given factor. The default scaling
27 factor is 1.0.
28
29 --pagesize WidthxHeight
30 Scale the diagram to fit given image size.
31
32 --aspect Maintain fixed aspect ratio if --pagesize given.
33
34 --cell-height H
35 Height of the each signal in pixels. Default is 32.
36
37 --cell-width W
38 Width for the time unit in pixels. Defaults is 64.
39
40 --font-size pts
41 Font size in pts. Default is 18.
42
43 --line-width W
44 Line width for drawings in pixels. Default is 1.
45
46 --output target
47 The name and format of the output image is determined by
48 target.
49
50 file ... The input files describe the signals to be diagrammed. See
51 the FILES and EXAMPLES sections for a description of their
52 format.
53
55 The following is a technical description of the input file syntax and
56 semantics. If you are reading this for the first time, you may want to
57 skip ahead to the EXAMPLES section.
58
59 The input file consists of a series of statements describing the signal
60 transitions during each clock period of the timing diagram. Whitespace
61 and comments following a ‘#’ are ignored.
62
63 SIGNAL=VALUE This statement changes the value of a signal at the begin‐
64 ning of the current clock, and adds it to the list of sig‐
65 nal dependencies. The signal name may consist of one or
66 more words consisting of alphanumerics and underscores
67 joined by periods, ‘signal.name’, for example. The signal
68 value format is described further on.
69
70 SIGNAL This statement adds a signal to the list of dependencies
71 without changing its value.
72
73 Statements are seperated by the following symbols:
74
75 , The comma seperator is used to seperate statements without affect‐
76 ing the dependency list or clock (ie: the next statement will add
77 to the dependency list).
78
79 ; The semicolon seperator resets the list of dependencies without
80 incrementing the clock
81
82 . The period seperator resets the list of dependencies and increments
83 the clock.
84
85 => The "causes" seperator renders dependency arrows based on the cur‐
86 rent list of dependencies and then resets the dependency list.
87
88 -tD> The "delay" seperator renders a delay arrow from the last depen‐
89 dency with the annotation tD.
90
91 Signal values are rendered according to the following rules:
92
93 0, 1, true, false A binary high/low signal.
94
95 tick A clock pulse which repeats.
96
97 pulse A one-shot clock pulse.
98
99 X A don't care value.
100
101 Z A tristate value.
102
103 "ABC" Any other alphanumeric token, or text enclosed in
104 quotes is rendered as a state. For example, ‘"1"’, is
105 rendered as a state, whereas, ‘1’, is rendered as a
106 high signal.
107
109 Let's look at an example input file, and parse its meaning.
110
111 POWER=0, FIRE=0, ARMED=0, LED=OFF, COUNT=N.
112 POWER=1 => LED=GREEN.
113 FIRE=1.
114 FIRE => ARMED=1.
115 FIRE=0.
116 FIRE=1.
117 FIRE, ARMED => LED=RED;
118 FIRE => COUNT="N+1".
119
120 This input file descibes the changes in five signals over a period of
121 seven clock cycles. The end of each clock cycle is indicated with a
122 period. For example, the following line indicates a single signal, named
123 ‘FIRE’ became true during a clock cycle:
124
125 FIRE=1.
126
127 The first clock period of the input file provides the initial value for
128 all signals to be diagrammed. The signals will appear on the timing dia‐
129 gram in the order they first appear in the input file. Signals are
130 assumed to have the "don't care" value if their initial value is not
131 given.
132
133 Independent signal transitions which occur simultaneously are normally
134 seperated by commas. Since signals aren't normally expected to change
135 simultaneously, the initial state is a good example of this:
136
137 POWER=0, FIRE=0, ARMED=0, LED=OFF, COUNT=N.
138
139 Dependencies can also be indicated for a signal transition. Dependencies
140 are rendered as arrows on the timing diagram from the last change in each
141 dependency to the dependent signal transition. Here, the previous change
142 in the state of ‘FIRE’ causes a change in the ‘ARMED’ signal.
143
144 FIRE => ARMED=1.
145
146 To indicate that a change in one signal causes an immediate change in
147 another signal, list both signal changes in the same clock period:
148
149 POWER=1 => LED=GREEN.
150
151 For signal state changes with multiple dependencies, seperate the depen‐
152 dencies with commas:
153
154 FIRE, ARMED => LED=RED.
155
156 Sometimes, a single dependency causes multiple independent signals to
157 change. Use a semicolon to start a new list of dependencies. Modifying
158 the previous line to indicate that ‘FIRE’ also causes ‘COUNT’ to incre‐
159 ment yields:
160
161 FIRE, ARMED => LED=RED;
162 FIRE => COUNT="N+1".
163
164 You can find this example and others along with their generated timing
165 diagrams on the homepage for drawtiming at
166 ‘http://drawtiming.sourceforge.net’.
167
169 Exit status is 0 on success, and 2 if the command fails.
170
172 The drawtiming command has been tested on FreeBSD, Linux, and Cygwin.
173
175 This software package was written by Edward Counce
176 <ecounce@users.sourceforge.net> Additional modifications by
177 Salvador E. Tropea <set@users.sourceforge.net>
178 Daniel Beer
179
181 None reported.
182
183BSD April 13, 2005 BSD