|DRAWTIMING(1)||General Commands Manual||DRAWTIMING(1)|
generate timing diagram from signal description
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:
- Show usage reminder.
- Increase diagnostic output.
- Scale the diagram by the given factor. The default scaling factor is 1.0.
- Scale the diagram to fit given image size.
- Maintain fixed aspect ratio if --pagesize given.
- Height of the each signal in pixels. Default is 32.
- Width for the time unit in pixels. Defaults is 64.
- Font size in pts. Default is 18.
- Line width for drawings in pixels. Default is 1.
- The name and format of the output image is determined by target.
- file ...
- The input files describe the signals to be diagrammed. See the FILES and EXAMPLES sections for a description of their format.
The 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.
- This statement changes the value of a signal at the beginning of the
current clock, and adds it to the list of signal dependencies. The signal
name may consist of one or more words consisting of alphanumerics and
underscores joined by periods,
signal.name’, for example. The signal value format is described further on.
- This statement adds a signal to the list of dependencies without changing its value.
Statements are separated by the following symbols:
- The comma separator is used to separate statements without affecting the dependency list or clock (ie: the next statement will add to the dependency list).
- The semicolon separator resets the list of dependencies without incrementing the clock
- The period separator resets the list of dependencies and increments the clock.
- The "causes" separator renders dependency arrows based on the current list of dependencies and then resets the dependency list.
- The "delay" separator renders a delay arrow from the last dependency with the annotation tD.
Signal values are rendered according to the following rules:
- 0, 1, true, false
- A binary high/low signal.
- A clock pulse which repeats.
- A one-shot clock pulse.
- A don't care value.
- A tristate value.
- Any other alphanumeric token, or text enclosed in quotes is rendered as a
state. For example, ‘
"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 descibes 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
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 ‘
causes a change in the ‘
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
Exit status is 0 on success, and 2 if the command fails.
drawtiming command has been tested on
FreeBSD, Linux, and Cygwin.
This software package was written by Edward
Counce ⟨firstname.lastname@example.org⟩ Additional
Salvador E. Tropea ⟨email@example.com⟩
|April 13, 2005||Debian|