DRAWTIMING(1) | General Commands Manual | DRAWTIMING(1) |
drawtiming
—
generate timing diagram from signal description
drawtiming |
[--verbose ] [--scale
factor] [--pagesize
WxH] [--aspect ]
[--cell-height H]
[--cell-width W]
[--font-size pts]
[--line-width W]
--output target
file ... |
This application provides a command line tool for documenting hardware and software designs through ideal timing diagrams. It reads signal descriptions from a text file with an intuitive syntax, and outputs an ideal timing diagram to an image file. Notation typical of timing diagrams found in the Electrical Engineering discipline is used, including arrows indicating causal relationships between signal transitions.
The options are as follows:
--help
--verbose
--scale
factor--pagesize
WidthxHeight--aspect
--cell-height
H--cell-width
W--font-size
pts--line-width
W--output
targetThe following is a technical description of the input file syntax and semantics. If you are reading this for the first time, you may want to skip ahead to the EXAMPLES section.
The input file consists of a series of statements describing the
signal transitions during each clock period of the timing diagram.
Whitespace and comments following a
‘#
’ are ignored.
signal.name
’, for example. The
signal value format is described further on.Statements are separated by the following symbols:
Signal values are rendered according to the following rules:
"1"
’,
is rendered as a state, whereas,
‘1
’, is rendered as a high
signal.Let's look at an example input file, and parse its meaning.
POWER=0, FIRE=0, ARMED=0, LED=OFF, COUNT=N. POWER=1 => LED=GREEN. FIRE=1. FIRE => ARMED=1. FIRE=0. FIRE=1. FIRE, ARMED => LED=RED; FIRE => COUNT="N+1".
This input file describes the changes in five signals over a
period of seven clock cycles. The end of each clock cycle is indicated with
a period. For example, the following line indicates a single signal, named
‘FIRE
’ became true during a clock
cycle:
FIRE=1.
The first clock period of the input file provides the initial value for all signals to be diagrammed. The signals will appear on the timing diagram in the order they first appear in the input file. Signals are assumed to have the "don't care" value if their initial value is not given.
Independent signal transitions which occur simultaneously are normally separated by commas. Since signals aren't normally expected to change simultaneously, the initial state is a good example of this:
POWER=0, FIRE=0, ARMED=0, LED=OFF,
COUNT=N.
Dependencies can also be indicated for a signal transition.
Dependencies are rendered as arrows on the timing diagram from the last
change in each dependency to the dependent signal transition. Here, the
previous change in the state of ‘FIRE
’
causes a change in the ‘ARMED
’
signal.
FIRE => ARMED=1.
To indicate that a change in one signal causes an immediate change in another signal, list both signal changes in the same clock period:
POWER=1 => LED=GREEN.
For signal state changes with multiple dependencies, separate the dependencies with commas:
FIRE, ARMED =>
LED=RED.
Sometimes, a single dependency causes multiple independent signals
to change. Use a semicolon to start a new list of dependencies. Modifying
the previous line to indicate that
‘FIRE
’ also causes
‘COUNT
’ to increment yields:
FIRE, ARMED =>
LED=RED;
FIRE =>
COUNT="N+1".
You can find this example and others along with their generated
timing diagrams on the homepage for drawtiming
at
‘http://drawtiming.sourceforge.net
’.
Exit status is 0 on success, and 2 if the command fails.
The drawtiming
command has been tested on
FreeBSD, Linux, and Cygwin.
This software package was written by Edward
Counce ⟨ecounce@users.sourceforge.net⟩ Additional
modifications by
Salvador E. Tropea
⟨set@users.sourceforge.net⟩
Daniel Beer
None reported.
April 13, 2005 | Debian |