%Conf specifies timing diagram global configuration parameters, such as width of waveforms, number of cycles, slew rates, and delay from clock edge. @Waves specifies signal characteristics such as signal type, name, and value changes. It also can override configuration parameters specified in %Conf for each signal. The value change array in each signal can override these parameters further for individual cycles.

All global parameters except left_x and right_x can be overridden by @Waves.

1. %Conf

%Conf takes the format as below:

  %Conf = ( <parameter> => <value>,
            <parameter> => <value>,
            ...
          );

1.1. parameter

Available <parameter>s are:

parameter default value description

arrow_adj

1

if 1, (response) arrow starts in the center of the cycle.

if 0, the arrow start at the beginning of the cycle.

bottom

bottom signal

it specifies the bottom of bar with a signal name

clock_delay

0

delay from 1st clock signal to other clock signals. 1 means 1 cycle of the 1st clock

clock_slew

0

clock slew rate (in 24/1200 inch)

color

0 (black)

color of waveform

cycles

10

# of cycles of the waveform

depth

100

visibility depth (higher the value, the more behind)

duty

0.5 (50%)

clock duty cycle in cycle.

fill_color

7 (white)

bus signal fill color

fill_d

41(diagonal)

dontcare pattern

fill_pattern

20(solid)

fill pattern for bus signal

fill_u

43 (cross)

undef signal pattern

font

14 (courier bold)

font for signal name and text

font_size

10

font size for non-name text

id

(null)

alias for a point, which is a signal name and cycle #

init

1

clock initial state

justify

1 (center)

text justification

left_x

800

x coordinate of the left end of the waveform (in 1/1200 inch)

line_style

0 (solid)

line style for waveform, bar, trigger, and arrow.

measure_point

0

if 0, measure bar is on the mid point of signal state change.

if -1, the bar is on the beginning of the state change. if 1, the bar is on the end of the state change.

name_color

0 (black)

signal name color

name_font

14 (cour Bold)

signal name font

name_font_size

10

signal name font size

name_justify

2 (right)

signal name justification

text_x

0

x-offset for non-signal text in clock cycle. 1 means 1 cycle off to the right

text_y

0

y-offset for non-signal text in signal height. 1 means 1 signal lower.

top

top signal

it specifies the bottom of bar with a signal name

right_x

8000

x coordinate of the right end of the waveform (in 1/1200 inch)

slew

0

signal slew rate (in 24/1200 inch)

slew_offset

0

if 1, compensate slew rate to cross period line at middle (Z) value.

start_y

‘state’

starting point of repsonse arrow [state, middle]

text_color

0 (black)

text color,

value_y

0

signal value text y-offset in signal height. 1 means 1 signal lower.

thickness

1

line thickness (in 1/160 inch)

width

1

tear width (in 200/1200 inch)

There are a few default values unique to particular types.

type parameter default value

bar

line_style

2 (dotted line)

bar

color

40 (gray)

arrow

color

1 (blue)

measure

color

4 (red)

1.2. color

The following colors are available for fill_color, text_color, name_color, and color.

value color

0

Black

1

Blue

2

Green

3

Cyan

4

Red

5

Magenta

6

Yellow

7

White

8-11

four shades of blue (dark to lighter)

12-14

three shades of green (dark to lighter)

15-17

three shades of cyan (dark to lighter)

18-20

three shades of red (dark to lighter)

21-23

three shades of magenta (dark to lighter)

24-26

three shades of brown (dark to lighter)

27-30

four shades of pink (dark to lighter)

31

Gold

32-47

16 shades of gray (black to white)

1.3. fill_pattern

The following patterns are available for fill_pattern, fill_u, and fill_d.

value pattern

20

solid color

41

30 degree left diagonal pattern

42

30 degree right diagonal pattern

43

30 degree crosshatch

44

45 degree left diagonal pattern

45

45 degree right diagonal pattern

46

45 degree crosshatch

47

horizontal bricks

48

vertical bricks

49

horizontal lines

50

vertical lines

51

crosshatch

52

horizontal "shingles" skewed to the right

53

horizontal "shingles" skewed to the left

54

vertical "shingles" skewed one way

55

vertical "shingles"skewed the other way

56

fish scales

57

small fish scales

58

circles

59

hexagons

60

octagons

61

horizontal "tire treads"

62

vertical "tire treads"

1.4. justify

The following choices are available for justify and name_justify.

value justification

0

left

1

center

2

right

1.5. line_style

The following styles are available.

value style

0

Solid

1

Dashed

2

Dotted

3

Dash-dotted

4

Dash-double-dotted

5

Dash-triple-dotted

2. @Waves

@Waves takes the format as below:

  @Waves = (
             <drawing item>,
             <drawing item>,
             ...
           );

@Waves contains arbitrary number of <drawing item>s,

2.1. drawing item

<drawing item> contains information of each item such as a signal. <drawing item> is defined with one or more key and value pairs. If <drawing item> is a signal, it is placed in the sequence of

   {
    <key> => <k_value>,
    <key> => <k_value>,
    ...
   }

2.2. key

There are 2 types of <key>s, common and unique. Common <key>s are (may be) specified in every <drawing item>. Unique <key>s are (may be) specified in particular type of <drawing item>s.

Common <key>s are the followings.

key description

type

Defines the type of <drawing item>. Every <drawing item> must have this key.

name

ID of <drawing item>.

conf

configuration for this <drawing item> only.

The followings are unique <key>s.

key description applicable types

point

one or more point coordinates

text, arrow, bar

text

text string

text

change

array of signal value changes.

bit, bus

list

list of parameter measurements.

measure

2.2.1. type key

Each <drawing item> must define its type. Possible type s are the followings.

type description

clock

clock signal, which toggles once every cycle.

counter

counter of clock cycles.

bit

single bit signal

bus

multi bit signal

blank

blank line (or text line).

arrow

arrow between events (response arrow) or arrow for pointing (straight arrow).

bar

vertical bars at the beginning of cycle.

legend

legends of patterned values

measure

time parameter measurement (between 2 points).

tear

tear mark to indicate time gap.

text

text string (a row is not reserved)

The types from clock to blank in the above table will reserve 1 row height in the timing diagram.

Each type has its default depth (visibility), which is assigned as below.

type depth

bar

110

clock

100

counter

100

bit

100

bus

100, 99 for (meta indicators)

measure

100

legend

100

tear

80, 79 for (wigglies)

blank

70

arrow

60

text

60

The above table shows that any signals (clock, bit, and bus) will be hidden where tear is. (Therefore it looks like torn paper.) But arrows and texts will still be printed over the tear.

2.2.2. conf key

Signal local conf key takes a configuration <k_value> in the following form.

   conf => { <parameter> => <value>, <parameter> => <value>, ... },

Note that it is {, not ( as in %Conf specification.

2.2.3. point key

point key takes a <k_value> in different forms depending on the <type>.

type k_value

arrow

[ [ <start signal> , <start cycle> ], [ <end signal> , <end cycle> ] ]

The arrow starts at <start cycle> of <start signal> and ends at <end cycle> of <end signal>.

bar

[ <cycle> , <cycle> , … ]

vertical bars are drawn at the beginning of <cycle>s.

text

[ <signal> , <cycle> ]

The text is placed at <cycle> of <signal>.

The notation [ <signal> , <cycle> ] can be replace with [ <id> ]. <id> is a quoted name defined in a cycle configuration in a signal (clock, bit, bus) definition.

2.2.4. change key

change key specifies cycle and value changes of the signal. Its format is:

  change => [ [ <cycle> , <value> ] , [ <cycle> , <value> ] , ... ]

The signal changes to <value> at <cycle> for each pair of <cycle> and <value>. <cycle> is a number between 0 and cycles-1. It is normally an integer but a real number can be used to specify a point any where in a cycle.

If <type> is bit, <value> is either 0, 1, ‘Z’ (tri-state), ‘U’ (undefined), ‘-’ (don’t care), or ‘X’ (unknown) same as undefined.

If <type> is bus, <value> is either a quoted string, ‘Z’ (tri-state), ‘U’ (undefined), ‘-’ (don’t care), or ‘X’ (unknown) same as undefined.

Note that clock type does not require change key. Timing-gen automatically toggles the signal to the end.

2.2.5. list key

list is used in measure type. It defines arbitrary number of parameter measurement. in the row defined in @Waqves. Its format is:

  list => { <m_name> => [ [ <start signal> , <start cycle> ], [ <end signal> , <end cycle> ] ] }

<m_name> is a quoted string that placed as an ID of the time parameter measurement, which starts at <start cycle> of <start signal> and ends at <end cycle> of <end signal>.

2.2.6. text key

text defines a string to be placed.

  text => <quoted string>

<quoted string> is either a single quoted string or a double quoted string.

3. The last line

Every input file must end with a line containing the following line:

  1;