Input File Syntax

Basics

The basic command is signal=value. Simultaneous signal changes are separated by semicolons (;). The period (.) indicates the end of a cycle. A comment starts with a #.

Example

:::python
# Initial values
A=0;B=0;C=0.
# First step
A=1.
# 2nd and 3rd steps
A=0;B=1.C=1

Values

Five values are supported:

  • 0 (or false)
  • 1 (or true)
  • Z (floating signal)
  • X (unknown value; this is the initial value by default)
  • Any other alphanumeric token, or text enclosed in quotes is rendered as a state

Example

:::python
# Names with special characters must be double quoted
"X.Enable"=0; STATE=IDLE; BUS[15:0]=Z.
"X.Enable"=true; STATE=STEP1; BUS[15:0]=0x123.
BUS[15:0] = X;
# Values with special characters must be double quoted
STATE="Some value !".
# This signal was not declared, its default value is X
A=1

Clocks

Clocks are supported:

  • pulse: a one-shot clock pulse
  • tick or clock: a clock pulse which repeats

Example

:::python
CLK=0; Enable=0; gCLK=0.
CLK=clock.
Enable=1.
gCLK=pulse; Enable=0.

Slopes

It is possible to display signals with slow transition time (such as power supplies):

  • rise: a rising signal
  • fall: a falling signal

Example

:::python
# Initial values
CLK=tick; EN=0; VOUT=0.
# Rising
EN=1.
VOUT=rise..
EN-Power-up>VOUT=1
# Stable
...
# Falling
EN=0.
VOUT=fall.
EN-Power-down>VOUT=0

Markers

The periods (.) can be replaced by vertical line (|) or a double vertical line (||) to generate a marker.

Example

:::python
CLK=clock;A=0
# First marker
|A=1.A=0
# Double line
||
# Another marker with a text
|(txt="It's possible to add a comment to a marker")
A=1....

Sequences

The assignments enclosed in {...} allow to describe easily different sequences occuring in parallel or overlapping sequences. After the end of the sequence, we go backward in time to the beginning of the sequence.

Example 1

:::python
# First sequence describes activity on A
{A=A1.A=A2.A=A3}
# Second sequence describes activity on B and C
{
 B=B1;C=C1.
 B=B2.
 B=B3;C=CX
}

Example 2

:::python
# Initial values
CLK=tick;CMD=Z;DATA=Z.
# First read sequence
{CMD=RD.CMD=Z.CMD->DATA=D0.DATA=D1.DATA=D2.DATA=D3.DATA=Z}
# Second read sequence starts 5 cycles after the BEGINNING of previous sequence
.....
{CMD=RD.CMD=Z.CMD->DATA=D0.DATA=D1.DATA=D2.DATA=D3.DATA=Z}
# Third read sequence starts 4 cycles after the BEGINNING of previous sequence
....
{CMD=RD.CMD=Z.CMD->DATA=D0.DATA=D1.DATA=D2.DATA=D3.DATA=Z}

Dependencies

A dependency between two transitions can defined using source=>destination. Sources are signal names. Destinations are usually assignments. Multiple sources or destinations can be separated by commas (,).

Example

:::python
C=0;A=0;B=0.
# Dependency from previous A edge to new value of B
A=1.
A=>B=1; 
# Dependency from multiple signals
C=1.A=0;B=0.
C,B=>C=0.
# Dependency to multiple signals
C=1.
C=>A=1,B=1.
# Vertical dependency
A=0;A=>B=0

Delays

A delay between two transitions can be defined using source-name>destination. Sources and destinations works similarly to dependencies above.

Example

:::python
CSn=1;OEn=1;A=X;D=Z.
CSn=0.A=ADDR.OEn=0.
# Delay from OEn to data
OEn-tOE>D=DATA;
# Delay from A and CSn to same data transition
A,CSn-tAC>D

More about relationships

In the previous examples, the dependency or delay starts from the latest transition on the signal. It is possible to start from a former transition.

Example

:::python
CMD=Z;DATA=Z.
CMD=CMD1.
CMD=Z.
CMD=CMD2.
# Source is the last time CMD was assigned to Z.
CMD=Z=>DATA=DATA1;CMD=Z.
DATA=Z;
CMD=CMD1.
# Trick: the value myreference is assigned and immediately overriden.
# It does not appear on diagram, but can be used as source.
CMD=myreference;CMD=Z.
CMD=CMD2.CMD=Z.
# The reference is used here.
CMD=myreference-"Latency">DATA=DATA2

Size

It is possible to control the size of the drawing through the following parameters:

  • fontsize: The font size controls the vertical size of the diagram.
  • cellwidth: The cell width controls the horizontal size of the diagram.
  • maxwidth: The maximum width of the diagram can override cell width.

The easiest way to understand the impact of those parameters is using the resize menu of the GUI. Three units are recognized: points (pt; default), centimeters (cm) and inches (in).

Example

(fontsize=18pt, cellwidth=0.5cm, maxwidth=20in)
A=0;B=0;C=0.
A=1.B=1.C=1

Colors

It is possible to add background colors for signal values.

Example

:::python
X=Z;Y=0.
# Background color can be specified (SVG color name)
X=Hello(bg=yellow).
# Color can also be expressed as RGB (must be quoted, due to '#')
Y=1(bg="#FFC080").
# It is also possible to add some text
Y=0(txt="World", bg=lightgrey).
Y=1


Related

Wiki: Home