Next: , Previous: Translation, Up: Top


10 Simulation Output

— Function: synch:info arg1 ...

synch:info prints a one-line message of all arg1 ....

If arg1 is a printf format string, then printf is applied to arg1 ...; otherwise arg1 ... are printed, numbers in hexadecimal.

— Function: synch:error arg1 ...

synch:error prints an error message of all arg1 ... and (up to) 50 lines of the most recent timing/state for the block calling synch:error, and then stops the simulation.

If arg1 is a printf format string, then printf is applied to arg1 ...; otherwise arg1 ... are printed, numbers in hexadecimal.

The simulation can be unstopped by a call to (synch:reset) or (bk).

— Function: synch:warn arg1 ...

synch:warn prints a warning message of all arg1 ... and (up to) 50 lines of the most recent timing/state for the block calling synch:warn. print-timing is then enabled for at least the next 50 states.

If arg1 is a printf format string, then printf is applied to arg1 ...; otherwise arg1 ... are printed, numbers in hexadecimal.

— Function: check= name j k

Will print a synch:warn message each cycle when j and k are not equal. check= returns k.

— Variable: print-chat

While set to #t, all chat messages will be printed. When set to #f, chat messages are not printed.

— Function: synch:chat msg

Queues the string msg for printing when print-chat is true or when timimg/state output is generated.

— Variable: synch:count

Within the body of define-syncronous-system, the identifier synch:count is bound to the number of cycles which that block has completed.

This variable can be used to turn timing output on and off at specified times.

          (cond ((eqv? synch:count trigger-start)
                 (set! print-timing #t))
                ((eqv? synch:count trigger-stop)
                 (set! print-timing #f)))
— Variable: print-timing

While set to #t, each simulation block will generate state/timing diagrams as specified by its synch:print command, as well as chat messages.

While print-timing is asserted, a line is output along with all the chat messages since the last line was printed. A line is printed only when if it is different from the last line printed.

Warning and Error messages are always printed, along with one line of state/timing diagrams.

— Macro: synch:print signals ...

Defines the format of the mixed state and timing diagrams (such as produced by logic analyzers) from the define-syncronous-system in whose body it appears.

Each of the signals can a literal string or character, or a scheme expression. Literal characters appear on each line of the timing diagram and are used as visual separators. A literal string is used to give name to the expression which immediately follows it in signals. If a string does not preceed an expression (such as a symbol), then the printed representation of the (unevaluated) expression serves as its name. Every 50 cycles of printed output, a header composed of the expression names is printed with the names rotated 90 degrees. Long expressions without preceeding strings can make for awkward looking output.

While print-timing is asserted, each scheme expression is evaluated every cycle, and its value printed in the order of signals.

There are a couple of things to notice in this example of the use of synch:print. The character ‘#\-’ provides a boundary. State information can be printed as two-character strings or symbols. The use of untranslatable scheme code is not a problem because synch:print forms are not translated into logic-compiler languages.

     (define-synchronous-system Foo
       (synch:print
        "STATE" named-state
        "TL-X" (booleans-to-number
                #f tl-x6 tl-x5 tl-x4 tl-x3 tl-x2 tl-x1 tl-x0)
        "AMREN" pci-amren
        "RDFIFO#" pci-rdfifo-
        "RDMT" pci-rdempty
        "RDFL" pci-rdfull
        "DLOE#" dloe-
        "DLRE#" dlre-
        "DLWE#" dlwe-
        "DL-FULL" dly:-fullness
        "look-saf" look-safe
        dqoe
        hungry
        "TPSZ/s" (string
                  (if dloe-
                      (char-upcase (tpsz-char stpsz[2..0]))
                      (tpsz-char stpsz[2..0]))
                  (cond (avl4 #\4)
                        (avl3 #\3)
                        (avl2 #\2)
                        (avl1 #\1)
                        (xping #\0)
                        (else #\space)))
        #\-
        "lucy-st" lucy-state))

Here is some output like Foo generates. The text to the right of the ‘lucy-st’ column is produced by calls to synch:chat. In the first chat line, one call had the argument ‘f601f601’, while the second called with ‘runcd 1’; both appear in the same cycle. The line starting with ‘WARN’ is produced by a call to synch:warn.

     96475
      S  T  A  R  R  R  D  D  D  D  L  D  H  T    L
      T  L  M  D  D  D  L  L  L  L  O  Q  U  P    U
      A  -  R  F  M  F  O  R  W  -  O  O  N  S    C
      T  X  E  I  T  L  E  E  E  F  K  E  G  Z    Y
      E     N  F        #  #  #  U  -     R  /    -
               O                 L  S     Y  S    S
               #                 L  A             T
                                    F
     
      e0 79 |   |  | |  |   |  | 2a  | |   | 42 - po
      e0 79 |   |  | |  |  |   | 2a  | |   | 41 - pd f601f601 runcd 1
      e0 7a |   |  | |  |   |  | 29  | |   | 44 - po
      e0 7a |   |  | |  |   |  | 29  | |   | 43 - pd runcd 2
      e0 7b |   |  | |  |   |  | 29  | |  |  42 - rn
      e0 7c |   |  | |  |   |  | 29  | |   | 42 - po
      e0 7c |   |  | |  |  |   | 29  | |   | 41 - pd fdfdfbf8 runcd 2
      e0 7d |   |  | |  |   |  | 28  | |  |  44 - rn
      e0 7e |   |  | |  |   |  | 28  | |   | 44 - po
      e0 7e |   |  | |  |   |  | 28  | |   | 43 - pd 4bit*
      e0 7f |   |  | |  |   |  | 28  | |  |  42 - bt
      sd 40 |   |  | |  |   |  | 28  | |  |  42 - po
      sd 40 |   |  | |   |  |  | 28  | |  |  22 - po
      sd 40 |   |  | |   |  |  | 28  |  | |  22 - po dqoe
      td 40 |   |  | |   |  |  | 28  |  | |  22 - po dqoe
      td 40 |   |  | |   |  |  | 28  | |  |  2  - po
      td 00 |   |  | |  |   |  | 28  | |  |  -  - po
      td 00 |   |  | |  |  |   | 28  | |  |  4  - po
      td 00 |   |  | |  |  |   | 27  | |  |  ?  - po
      td 00 |   |  | |  |  |   | 26 |  |  |  a  - po
      tg 00 |   |  | |   |  |  | 25 |  |  |  A  - po
      tg 00 |   |  | |  |   |  | 25 |  |  |  -  - po
      tg 00 |   |  | |  |   |  | 25 |  |  |  t  - po
      tg 00 |   |  | |  |  |   | 25 |  |  |  t  - po *      Z 3Y Tile
      e1 00 |   |  | |  |   |  | 24 |  |  |  10 - po
      e1 00 |   |  | |  |   |  | 24 |  |   | 10 - po
      e1 00 |   |  | |  |  |   | 24 |  |   | 10 - po ffffff9e
      e1 00 |   |  | |  |  |   | 23 |  |   | 41 - po f0f6fff0
      e1 00 |   |  | |  |   |  | 22  | |   | 44 - pd 2xlit 31
      e1 01 |   |  | |  |   |  | 22  | |  |  43 - x1
     WARN: >>>> First Underrun Occured Here <<<<
      e1 02 |   |  | |  |   |  | 22  | |   | 43 - x2
      e1 03 |   |  | |  |   |  | 22  | |  |  42 - x1
      e1 04 |   |  | |  |   |  | 22  | |   | 42 - x2
      e1 05 |   |  | |  |   |  | 22  | |  |  41 - x1
      e1 06 |   |  | |  |   |  | 22  | |   | 41 - x2
      e1 07 |   |  | |  |  |   | 22  | |  |  40 - x1 fff0f6ff
      e1 08 |   |  | |  |   |  | 21  | |   | 44 - x2
      e1 09 |   |  | |  |   |  | 21  | |  |  43 - x1
      e1 0a |   |  | |  |   |  | 21  | |   | 43 - x2
      e1 0b |   |  | |  |   |  | 21  | |  |  42 - x1
      e1 0c |   |  | |  |   |  | 21  | |   | 42 - x2
      e1 0d |   |  | |  |   |  | 21  | |  |  41 - x1
      e1 0e |   |  | |  |   |  | 21  | |   | 41 - x2
      e1 0f |   |  | |  |  |   | 21  | |  |  40 - x1 f6fff0f6
      e1 10 |   |  | |  |   |  | 20  | |   | 44 - x2
      e1 11 |   |  | |  |   |  | 20  | |  |  43 - x1
      e1 12 |   |  | |  |   |  | 20  | |   | 43 - x2
      e1 13 |   |  | |  |   |  | 20  | |  |  42 - x1
      e1 14 |   |  | |  |   |  | 20  | |   | 42 - x2
      e1 15 |   |  | |  |   |  | 20  | |  |  41 - x1