MAN.9FRONT.ORG RTFM


     TIMEPIC(1)                                             TIMEPIC(1)

     NAME
          timepic - troff preprocessor for drawing timing diagrams

     SYNOPSIS
          timepic [ files ]

     DESCRIPTION
          Timepic is a pic(1) and troff(1) preprocessor for drawing
          timing diagrams.  Timepic code is contained between .TPS and
          .TPE lines:

               .TPS width row-height
               statement-list
               .TPE

          There are two types of timepic statements: variable defini-
          tions and signal definitions.  Variables are defined with
          the syntax

               var = expr;

          where expr is an arithmetic expression involving floating-
          point constants and previously defined variables.  Currently
          only basic arithmetic (+, -, * and /) is supported.  Signals
          are defined with the syntax

               name events ;

          where name is a name that must be quoted unless it's a valid
          symbol.  Events is a list consisting of the following
          things:

              The current time can be set using an arithmetic expres-
               sion, that may be followed by a symbol interpreted as a
               unit.  For instance if you defined μs = 1000; then 1μs
               and (x+2)*3μs are both valid time expressions.  Note
               that x+2μs is interpreted as (x+2)μs which may or may
               not be intended behaviour.

               A time expression can be preceded by + to mark it as
               relative to the previous time.  The first time is zero.

               A time expression can be followed by a symbol name in
               square brackets.  The symbol is then defined with the
               time.

              An expression of the form :name creates an `event' at
               the current time, changing the value of the signal to
               name.  name can be a symbol (which is not evaluated), a
               numerical constant or a string in single quotes.  The

     TIMEPIC(1)                                             TIMEPIC(1)

               values 0, 1, x and z have special meaning, unless they
               are quoted.

              A pipe symbol | draws a vertical dashed line at the
               next event.

              An expression of the form expr{events} evaluates the
               expression, rounded to the nearest integer, and then
               repeats the events the specified number of times.  It
               is illegal if the expression evaluates to a negative
               number.  It is also illegal to use absolute times in
               the events list.  It is however legal to nest this con-
               struct.

     EXAMPLES
               .TPS 6 0.4
               c=5;
               clk +5{:1 +.5c:0 +.5c};
               data :x 2.3c:DQ 4c|:x;
               valid :0 2.3c:1 4c:0;
               ready :0 3.6c:1 4c:0;
               .TPE

     FILES
          /sys/src/cmd/timepic.c

     SEE ALSO
          troff(1), pic(1)

     BUGS
          Yes.