home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff229.lzh / Sim / english.docs / Sim.Doc < prev    next >
Text File  |  1989-07-20  |  33KB  |  1,027 lines

  1.  
  2.  
  3.  
  4.  
  5.                   SIM - A simulator for register-transfer-nets
  6.  
  7.  
  8.  
  9.             Contents:
  10.  
  11.  
  12.             1  Introduction
  13.  
  14.             2  Syntax rules for the VLI
  15.  
  16.             3  Usage of the simulator
  17.  
  18.             4  Devices
  19.             4.1  List of the available devices
  20.             4.2  Description of the devices
  21.                4.2.1   AND gate
  22.                4.2.2   NAND gate
  23.                4.2.3   OR gate
  24.                4.2.4   NOR gate
  25.                4.2.5   XOR gate
  26.                4.2.6   Inverter
  27.                4.2.7   Tristate buffer
  28.                4.2.8   Inverting tristate buffer
  29.                4.2.9   Multiplexer
  30.                4.2.10  Demultiplexer
  31.                4.2.11  Register, positive-edge-triggered
  32.                4.2.12  Register, negative-edge-triggered
  33.                4.2.13  J-K-Register, positive-edge-triggered
  34.                4.2.14  J-K-Register, negative-edge-triggered
  35.                4.2.15  Register, positive-level-triggered
  36.                4.2.16  Register, negative-level-triggered
  37.                4.2.17  Lamp board
  38.                4.2.18  Switch board
  39.                4.2.19  Adder
  40.                4.2.20  Counter
  41.                4.2.21  Comparator
  42.                4.2.22  Lead assignment
  43.                4.2.23  Left rotation
  44.                4.2.24  Read/Write memory
  45.                4.2.25  Read-only-memory
  46.                4.2.26  Stop condition
  47.                4.2.27  Pattern generator
  48.                4.2.28  Recorder
  49.                4.2.29  Register set, positive-level-triggered
  50.                4.2.30  Register set, negative-level-triggered
  51.  
  52.             5  Warnings and Error messages
  53.             5.1  Warnings
  54.             5.2  Error messages
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.             1  Introduction
  62.  
  63.  
  64.             Register-transfer-nets are used to descripe hardware systems.
  65.             A register-transfer-net can be compared with a digital circuit.
  66.             Its devices are divided into three classes:
  67.  
  68.                - Registers, with an inner state (sequential logic systems)
  69.  
  70.                - Combinatorial cicuits, without an inner state
  71.  
  72.                - bundles of leads, for the connections between devices
  73.  
  74.  
  75.             For the simulation of a register-transfer-net, a list of all
  76.             devices and connections (called VLI) must exist. This happens
  77.             by a call of the devices which are used. The connections are
  78.             made with the names of the bundles of leads of the in- and out-
  79.             puts of the devices. Every lead-name represents a 16-bit-wide
  80.             bundle.
  81.  
  82.             Because the devices must be sequenzialised by force, which work
  83.             parallel in reality, the resulting model system can be very
  84.             susceptible for hazards and races. So it's better to used only
  85.             hazard- and race-free circuits.
  86.  
  87.  
  88.  
  89.             2  Syntax rules for the VLI
  90.  
  91.  
  92.             Every call of a devices must start with the name of the device.
  93.             The pre-defined device-names must be written in capitals and
  94.             seperated from the list of the lead-names by one space or tab at
  95.             least.
  96.  
  97.             Lead-names are freely eligible. SIM distinguish between lower
  98.             and upper case of a letter. The following characters are allowed
  99.             in lead-names:   'a'...'z', 'A'...'Z', '0'...'9', '_'
  100.             The first character in a lead-name must be no digit.
  101.  
  102.             The lead-names must be seperated by commas. Additional spaces or
  103.             tabs are permitted. If a device needs a list of lead-names of
  104.             the same type with variable length, this list must be seperated
  105.             by brackets ('(' and ')'). Inside the brackets, there must must
  106.             one lead-name at least.
  107.  
  108.             It's also possible to define an input lead as a constant. This
  109.             number is recognized as a hexadecimal if it starts with a '0',
  110.             otherwise as a decimal number.
  111.  
  112.             Parameter in '[' ']' are optional. These are mostly initial
  113.             values for an output lead. Missing initial values are set to 0.
  114.  
  115.             If the value of a lead is relevant as a number, this value is
  116.             interpreted as a unsigned 16-bit-integer.
  117.  
  118.             The first not-space or not-tab character of a comment line must
  119.             be a semicolon, this means that a comment cannot be appended
  120.             behind the call of a device.
  121.  
  122.             Beside the user-defined lead-names exists a pre-defined clock
  123.             lead 'CLOCK'. This lead should be used as the clock for all
  124.             edge-triggered registers. It is realised as the output of a
  125.             counter. So Bit 0 can be used for the clock input of the regi-
  126.             sters.
  127.  
  128.             The CLOCK-lead is an output of the unit SWITCH. This device
  129.             must be the first in the VLI. SWITCH and unit LAMP cannot be
  130.             used more than one time in the VLI.
  131.  
  132.  
  133.  
  134.             3  Usage of the simulator
  135.  
  136.  
  137.             The simulator can be started only from the CLI with the follo-
  138.             wing command:
  139.  
  140.                   sim   <name>
  141.  
  142.             name is the name of a text file, in which the VLI is defined.
  143.  
  144.             After the translation of an error-free VLI, two windows will be
  145.             opened. The upper window is the switch board. It contains four
  146.             16-bit-wide switch panels and two hex-adjusters. At the begin
  147.             of a simulation the outputs of switches and adjusters have low
  148.             level. The levels of switches can be changed by clicking them.
  149.             The digits of hex-adjuster can be incremented and decremented by
  150.             clicking the plus- and minus-gadgets. Normaly every single mani-
  151.             pulation of a switch or an adjuster is recognized and processed.
  152.             For simultaneous change of more than one switch or adjuster, it
  153.             is possible to change the Scan-Mode. When the corresponding gad-
  154.             get is clicked, the Scan-Mode turns to 'all'. In this mode, eve-
  155.             ry manipulation of a switch or adjuster is saved but mot opera-
  156.             ted in the simulator. When the Scan-Mode-gadget is activated
  157.             again, the mode is changed back to single and the current set-
  158.             tings of the switch board are transfered to the simulator.
  159.  
  160.             The lower window is the lamp board. It contains four 16-bit-wide
  161.             level displays and two hex-displays. Until the first values are
  162.             computed irrelevant levels are shown. The Run-Mode-gadgets lie
  163.             above the displays. The one of the following states is possible:
  164.  
  165.                RUN      Continuous simulation of the register-transfer-net
  166.  
  167.                CYCLE    All devices are computed until the next increment of
  168.                         the model time CLOCK. Then the simulation enters the
  169.                         STOP mode.
  170.  
  171.                STEP     Only the next device is computed and the simulation
  172.                         stops.
  173.  
  174.                STOP     The simulation is stopped.
  175.  
  176.             The first three states are shown with borders surrounding the
  177.             specified gadget. In the STOP mode, no gadget is surrounded. The
  178.             change between the different modes can be made by one of the
  179.             gadgets.
  180.  
  181.             When clicking the DEBUG gadget, a requester appears. Inside this
  182.             requester, a lead-name can be typed. After the use of the ENTER
  183.             key or the show gadget, the levels and the hexadecimal value of
  184.             this lead is shown. The use of the DEBUG gadget stops the simu-
  185.             tion.
  186.  
  187.             The manipulation of the RESET-Gadget resets the simulator to the
  188.             state immediate after the program was loaded.
  189.  
  190.             A logical high level of bit 0 of CLOCK is shown with the word
  191.             'CLOCK' in right upper edge of the LAMP window.
  192.  
  193.             The simulator can be leaved with the CLOSE gadget in the SWITCH
  194.             window.
  195.  
  196.             In the STOP mode the simulator waste actively no CPU time.
  197.  
  198.  
  199.  
  200.             4  Devices
  201.             4.1  List of the available devices
  202.  
  203.                AND       (in0,in1,...,inx),out[,init]
  204.                NAND      (in0,in1,...,inx),out[,init]
  205.                OR        (in0,in1,...,inx),out[,init]
  206.                NOR       (in0,in1,...,inx),out[,init]
  207.                XOR       (in0,in1,...,inx),out[,init]
  208.                NOT       in,out[,init]
  209.                BUFFER    in,ctrl,out[,init]
  210.                BUF_INV   in,ctrl,out[,init]
  211.                MUX       (in0,in1,...,inx),slct,out[,init]
  212.                DEMUX     in,slct,(out0,out1,...,outx)[,init_slct,init]
  213.                REG_PE    clk,in,out,not_out[,init]
  214.                REG_NE    clk,in,out,not_out[,init]
  215.                JK_REG_P  clk,j,k,s,r,out,not_out[,init]
  216.                JK_REG_N  clk,j,k,s,r,out,not_out[,init]
  217.                REG_PL    clk,in,out,not_out[,init]
  218.                REG_NL    clk,in,out,not_out[,init]
  219.                LAMP      B0,B1,B2,B3,H0,H1
  220.                SWITCH    B0,B1,B2,B3,H0,H1
  221.                ADD       in0,in1,c_in,out,c_out[,init[,c_init]]
  222.                COUNT     clk,set,delta,reset,load,dir,out[,init]
  223.                COMPARE   llimit,hlimit,in,out[,init]
  224.                ASSIGN    in_maske,out_maske,in,out[,init]
  225.                ROTATE    in,bits,out[,init]
  226.                RAM       ([name]),len,write,cs,addr,data[,init]
  227.                ROM       name,len,cs,addr,data[,init]
  228.                STOP      ((in0,cond,in1),(in2,cond,in3),...,(inx-1,cond,inx))
  229.                PAT_GEN   name,len,repeat,clk,out[,init]
  230.                RECORDER  name,clk,in
  231.                REG_SET_P len,wrclk,wraddr,rdaddr,in,out[,init]
  232.                REG_SET_N len,wrclk,wraddr,rdaddr,in,out[,init]
  233.  
  234.  
  235.  
  236.  
  237.             4.2  Description of the devices
  238.             4.2.1  AND gate
  239.  
  240.  
  241.             AND      (in0,in1,...,inx),out[,init]
  242.  
  243.  
  244.             in0,...,inx       Inputs
  245.             out               Output
  246.             init              Initial value for out (constant)
  247.  
  248.  
  249.             Function:         The inputs are AND-combined bit by bit.
  250.                               The result is transfered to the output.
  251.  
  252.  
  253.  
  254.  
  255.             4.2.2  NAND gate
  256.  
  257.  
  258.             NAND     (in0,in1,...,inx),out[,init]
  259.  
  260.  
  261.             in0,...,inx       Inputs
  262.             out               Output
  263.             init              Initial value for out (constant)
  264.  
  265.  
  266.             Function:         The inputs are NAND-combined bit by bit.
  267.                               The result is transfered to the output.
  268.  
  269.  
  270.  
  271.  
  272.             4.2.3  OR gate
  273.  
  274.  
  275.             OR       (in0,in1,...,inx),out[,init]
  276.  
  277.  
  278.             in0,...,inx       Inputs
  279.             out               Output
  280.             init              Initial value for out (constant)
  281.  
  282.  
  283.             Function:         The inputs are OR-combined bit by bit.
  284.                               The result is transfered to the output.
  285.  
  286.  
  287.  
  288.  
  289.             4.2.4  NOR gate
  290.  
  291.  
  292.             NOR      (in0,in1,...,inx),out[,init]
  293.  
  294.  
  295.             in0,...,inx       Inputs
  296.             out               Output
  297.             init              Initial value for out (constant)
  298.  
  299.  
  300.             Function:         The inputs are NOR-combined bit by bit.
  301.                               The result is transfered to the output.
  302.  
  303.  
  304.  
  305.  
  306.             4.2.5  XOR gate
  307.  
  308.  
  309.             XOR      (in0,in1,...,inx),out[,init]
  310.  
  311.  
  312.             in0,...,inx       Inputs
  313.             out               Output
  314.             init              Initial value for out (constant)
  315.  
  316.  
  317.             Function:         The inputs are XOR-combined bit by bit.
  318.                               The result is transfered to the output.
  319.  
  320.  
  321.  
  322.             4.2.6  Inverter
  323.  
  324.  
  325.             NOT      in,out[,init]
  326.  
  327.  
  328.             in                Input
  329.             out               Output
  330.             init              Initial value for out (constant)
  331.  
  332.  
  333.             Function:         The input is inverted bit by bit. The result
  334.                               is transfered to the output.
  335.  
  336.  
  337.  
  338.             4.2.7  Tri-state-buffer
  339.  
  340.  
  341.             BUFFER   in,ctrl,out[,init]
  342.  
  343.  
  344.             in                Input
  345.             ctrl              Control for output
  346.             out               Output
  347.             init              Initial value for out (constant)
  348.  
  349.  
  350.             Function:         The value of in is transfered to out as
  351.                               long as bit 0 of ctrl has high level. There
  352.                               is no connection between in and out, if bit 0
  353.                               has low level. Then out can be used as an out-
  354.                               put by another device. Until this happens,
  355.                               out keep the last assign value.
  356.  
  357.  
  358.  
  359.             4.2.8  Inverting tri-state-buffer
  360.  
  361.  
  362.             BUF_INV  in,ctrl,out[,init]
  363.  
  364.  
  365.             See BUFFER. Before the value of in is transfered to out, it is
  366.             inverted bit by bit.
  367.  
  368.  
  369.  
  370.             4.2.9  Multiplexer
  371.  
  372.  
  373.             MUX      (in0,in1,...,inx),slct,out[,init]
  374.  
  375.  
  376.             in0,...,inx       Inputs
  377.             slct              Selected input
  378.             out               Output
  379.             init              Initial value for out (constant)
  380.  
  381.  
  382.             Function:         The inputs are numbered in its order in the
  383.                               input list (start with 0).
  384.  
  385.                               The value of that Input, which has the same
  386.                               number as the value of slct, is transfered to
  387.                               the output.
  388.  
  389.                               If the value of slct characterize no present
  390.                               input, the output is set to 0.
  391.  
  392.  
  393.  
  394.             4.2.10  Demultiplexer
  395.  
  396.  
  397.             DEMUX    in,slct,(out0,out1,...,outx)[,init_slct,init]
  398.  
  399.  
  400.             in                Input
  401.             slct              Selected output
  402.             out0,...,outx     Outputs
  403.             init_slct         Number of the output to be initialized (const.)
  404.             init              Initial value for the selected ouput (const.)
  405.  
  406.  
  407.             Function:         The outputs are numbered in its order in the
  408.                               output list (start with 0).
  409.  
  410.                               The value of in is transfered to that output,
  411.                               which has the same number as the value of slct.
  412.                               All other output are set to 0.
  413.  
  414.                               If the value of slct charactize no present
  415.                               output, all output are set to 0.
  416.  
  417.  
  418.  
  419.             4.2.11  Register, positive-edge-triggered
  420.  
  421.  
  422.             REG_PE   clk,in,out,not_out[,init]
  423.  
  424.  
  425.             clk               Clock
  426.             in                Input
  427.             out               Output
  428.             not_out           Inverted output
  429.             init              Initial value for out (constant)
  430.  
  431.  
  432.             Function:         The register consists of 16 D-flip-flops. The
  433.                               value of in is transfered to the output with a
  434.                               0-1-edge on bit 0 of clk and saved until the
  435.                               next 0-1-edge.
  436.  
  437.                               For a correct function, it's necessary to use
  438.                               CLOCK as the clk lead.
  439.  
  440.  
  441.  
  442.             4.2.12  Register, negative-edge-triggered
  443.  
  444.  
  445.             REG_NE   clk,in,out,not_out[,init]
  446.  
  447.  
  448.             See REG_PE. The register is triggered with a 1-0-edge.
  449.  
  450.  
  451.  
  452.             4.2.13  J-K-Register, positive-edge-triggered
  453.  
  454.  
  455.             JK_REG_P   clk,j,k,s,r,out,not_out[,init]
  456.  
  457.  
  458.             clk            Clock
  459.             j              J-input
  460.             k              K-input
  461.             s              Asynchronous set
  462.             r              Asynchronous reset
  463.             out            Output
  464.             not_out        inverted output
  465.             init           Initial for output (constant)
  466.  
  467.  
  468.             Function:
  469.  
  470.  
  471.                            Bit 0  (-----------Bit i-----------)
  472.                             clk   j    k    s    r   out | out+
  473.                            ------------------------------+------
  474.                              x    x    x    0    0    q  |  q
  475.                              x    x    x    0    1    x  |  0
  476.                              x    x    x    1    0    x  |  1
  477.                              x    x    x    1    1    q  |  ?
  478.                              ^    0    0    0    0    q  |  q
  479.                              ^    0    1    0    0    x  |  0
  480.                              ^    1    0    0    0    x  |  1
  481.                              ^    1    1    0    0    q  | -q
  482.  
  483.                            ?: undefined level
  484.                            x: irrelevant level
  485.                            ^: 0-1-edge
  486.  
  487.                            The register consists of 16 J-K-flip-flops. A
  488.                            single flip-flop works indepently from the others
  489.                            except the common clock.
  490.  
  491.  
  492.  
  493.  
  494.       4.2.14  J-K-Register negative-edge-triggered
  495.  
  496.  
  497.       JK_REG_N   clk,j,k,s,r,out,not_out[,init]
  498.  
  499.  
  500.       See JK_REG_N. The register is triggered with a 1-0-edge.
  501.  
  502.  
  503.  
  504.  
  505.             4.2.15  Register, positive-level-triggered
  506.  
  507.  
  508.             REG_PL   clk,in,out,not_out[,init]
  509.  
  510.  
  511.             clk               Clock
  512.             in                Input
  513.             out               Output
  514.             not_out           Inverted output
  515.             init              Initial value for out (constant)
  516.  
  517.  
  518.             Function:         The Register consists of 16 D-flip-flops. The
  519.                               value of in is transfered to the output as long
  520.                               as bit 0 of clk lies on logical high level.
  521.                               After a 1-0-edge the last assigned value is
  522.                               saved.
  523.  
  524.  
  525.  
  526.             4.2.16  Register, negative-level-triggered
  527.  
  528.  
  529.             REG_NL   clk,in,out,not_out[,init]
  530.  
  531.  
  532.             See REG_PL. The transfer from the input to the output happens
  533.             on a logical low level on bit 0 of clk.
  534.  
  535.  
  536.  
  537.             4.2.17  Lamp board
  538.  
  539.  
  540.             LAMP     B0,B1,B2,B3,H0,H1
  541.  
  542.  
  543.             B0,...,B3         Inputs for binary display
  544.             H0,H1             Inputs for hexadecimal display
  545.  
  546.  
  547.             Function:         The values of the inputs ar displayed in the
  548.                               lamp window of the simulator.
  549.  
  550.                               LAMP can be used only one time in a VLI.
  551.  
  552.  
  553.  
  554.             4.2.18  Switch board
  555.  
  556.  
  557.             SWITCH   B0,B1,B2,B3,H0,H1
  558.  
  559.  
  560.             B0,...,B3         Outputs of the binary switch strips
  561.             H0,H1             Outputs of the hex-adjusters
  562.  
  563.  
  564.             Function:         The settings of the switch board is polled on
  565.                               each change of CLOCK and transfered to the
  566.                               outputs.
  567.  
  568.                               SWITCH must be the first device and can be
  569.                               used only one time a VLI.
  570.  
  571.  
  572.  
  573.             4.2.19  Adder
  574.  
  575.  
  576.             ADD      in0,in1,c_in,out,c_out[,init[,c_init]]
  577.  
  578.  
  579.             in0,in1           Inputs
  580.             c_in              Input carry
  581.             out               Output
  582.             c_out             Output carry
  583.             init              Initial value for out (constant)
  584.             c_init            Initial value for c_out (constant)
  585.  
  586.  
  587.             Function:         out := in0 + in1 + (bit 0 of c_in)
  588.                               The carry of the result affects bit 0 of c_out.
  589.  
  590.  
  591.  
  592.             4.2.20  Counter
  593.  
  594.  
  595.             COUNT    clk,set,delta,reset,load,dir,out[,init]
  596.  
  597.  
  598.             clk               Clock
  599.             set               Input for setting
  600.             delta             Input for increment/decrement
  601.             reset             Reset the counter
  602.             load              Load the counter
  603.             dir               Increment/decrement
  604.             out               Output
  605.             init              Initial value for the counter (constant)
  606.  
  607.  
  608.             Function:
  609.  
  610.  
  611.                                 bit 0 of the leads   |
  612.                               reset load   dir   clk |    out
  613.                               -----------------------+----------
  614.                                 x     x     x     0  |    out
  615.                                 x     x     x     1  |    out
  616.                                 1     x     x     ^  |     0
  617.                                 0     1     x     ^  |    set
  618.                                 0     0     1     ^  | out+delta
  619.                                 0     0     0     ^  | out-delta
  620.  
  621.                               x : irrelevant level
  622.                               ^ : 0-1-edge
  623.  
  624.                               For a correct function, it's necessary to use
  625.                               CLOCK as the clk lead.
  626.  
  627.  
  628.  
  629.             4.2.21  Comparator
  630.  
  631.  
  632.             COMPARE  llimit,hlimit,in,out[,init]
  633.  
  634.  
  635.             llimit            Lower limit
  636.             hlimit            Upper limit
  637.             in                Input
  638.             out               Output
  639.             init              Initial value for out (constant)
  640.  
  641.  
  642.             Function:         If the value of in is larger or equal than
  643.                               llimit and smaller or equal than hlimit, all
  644.                               bits of out are set to 1. Otherwise all bits
  645.                               of out are set to 0.
  646.  
  647.  
  648.  
  649.             4.2.22  Lead assignment
  650.  
  651.  
  652.             ASSIGN   in_mask,out_mask,in,out,[,init]
  653.  
  654.  
  655.             in_mask           Input-bit-mask (constant)
  656.             out_mask          Output-bit-mask (constant)
  657.             in                Input
  658.             out               Output
  659.             init              Initial value for out (constant)
  660.  
  661.  
  662.             Function:         With this device it's possible to simulate the
  663.                               assignment of single bits of a lead to another
  664.                               lead. The bits of in, specified by in_mask, are
  665.                               assigned to the bits of out, specified by
  666.                               out_mask. The assignment starts with the least
  667.                               significant bits.
  668.  
  669.  
  670.             Example:          in_mask  = 4a1a (hex) = 0100101000011010 (bin)
  671.                               out_mask = 90c5 (hex) = 1001000011000101 (bin)
  672.  
  673.  
  674.                input lead:                                output lead:
  675.  
  676.                    15                        +---------------> 15
  677.                    14 -----------------------+                 14
  678.                    13                                          13
  679.                    12                              +---------> 12
  680.                    11 -----------------------------+           11
  681.                    10                                          10
  682.                     9 --------------+                           9
  683.                     8               |                           8
  684.                     7               +------------------------>  7
  685.                     6            +--------------------------->  6
  686.                     5            |                              5
  687.                     4 -----------+                              4
  688.                     3 --------------------------+               3
  689.                     2                           +------------>  2
  690.                     1 --------------------+                     1
  691.                     0                     +------------------>  0
  692.  
  693.  
  694.  
  695.             4.2.23  Left rotation
  696.  
  697.  
  698.             ROTATE   in,bits,out[,init]
  699.  
  700.  
  701.             in                Input
  702.             bits              Number of bits to rotate (constant)
  703.             out               Output
  704.             init              Initial value for out (constant)
  705.  
  706.  
  707.             Function:         The value of in is rotated left as long as it
  708.                               is given by bits. The bits, which are shifted
  709.                               out left, are shifted in right. The result of
  710.                               the operation is transfered to out.
  711.  
  712.                               The constant bits must lie in the range 0..15.
  713.  
  714.  
  715.             Example:          in   = 369b (hex)
  716.                               bits = 5
  717.                               out  = d366 (hex)
  718.  
  719.  
  720.  
  721.             4.2.24  Read/Write memory
  722.  
  723.  
  724.             RAM      ([name]),len,write,cs,addr,data[,init]
  725.  
  726.  
  727.             name              Name of the data file
  728.             len               Number of storage cells (16-bit-wide) (const.)
  729.             write             Read/write lead
  730.             cs                Chip select
  731.             addr              Address of a cell
  732.             data              Input or output of the memory
  733.             init              Initial value of data (constant)
  734.  
  735.  
  736.             Function:         The memory is only active, if bit 0 of cs has
  737.                               logical high level.
  738.  
  739.                               If bit 0 of write has high level, on a 0-1-edge
  740.                               of cs the actual value of data is written in
  741.                               that cell that is selected by the value of
  742.                               addr. If bit 0 of write has low level, the va-
  743.                               lue of the selected cell is transfered to the
  744.                               data lead.
  745.  
  746.                               A optional pre-allocation of the memory can be
  747.                               defined in a file with the given name.
  748.  
  749.                               This file contains the pre-allocation as 16-bit
  750.                               numbers. These are interpreted as hexadecimal
  751.                               values and must be seperated at least by a tab,
  752.                               space or carriage return ("whitespace").
  753.  
  754.                               Example:          3f5a 126c d094
  755.                                                 73e1 893a b012
  756.  
  757.                               Not pre-allocated cells are initialized with 0.
  758.                               This happens also if no name of a file is gi-
  759.                               ven.
  760.  
  761.                               If the value of addr leaves the range 0..len-1,
  762.                               the memory becomes inactive.
  763.  
  764.  
  765.  
  766.             4.2.25  Read-only-memory
  767.  
  768.  
  769.             ROM      name,len,cs,addr,data[,init]
  770.  
  771.  
  772.             See RAM. The pre-alloction file must exist and there is no write
  773.             access possible.
  774.  
  775.  
  776.  
  777.             4.2.26  Stop condition
  778.  
  779.  
  780.             STOP     ((in0,cond,in1),(in2,cond,in3),...,(inx-1,cond,inx))
  781.  
  782.  
  783.             in0,...,inx       Inputs
  784.             cond              Conditions
  785.  
  786.  
  787.             Function:         If all listed conditions are fulfilled, the
  788.                               simulation enters the STOP mode.
  789.  
  790.                               The following conditions are possible:
  791.  
  792.                                     ==  : equal
  793.                                     !=  : not equal
  794.                                     >   : larger
  795.                                     >=  : larger or equal
  796.                                     <   : smaller
  797.                                     <=  : smaller or equal
  798.  
  799.                               The stop condition should be used only for
  800.                               troubleshotting, because it slows down the
  801.                               speed of the simulation.
  802.  
  803.  
  804.  
  805.  
  806.             4.2.27  Pattern generator
  807.  
  808.  
  809.             PAT_GEN  name,len,repeat,clk,out[,init]
  810.  
  811.  
  812.             name           Name of the file containing the pattern
  813.             len            Length of the file (constant)
  814.             repeat         Mode on overflow (constant)
  815.             clk            Clock
  816.             out            Output
  817.             init           Initial value of out (constant)
  818.  
  819.  
  820.             Function:      This device allows to generate a pattern on the
  821.                            output lead. The sequence is defined in the file.
  822.                            The contents of this file must correspond to the
  823.                            requirements of RAM/ROM files. With every change
  824.                            of a bit of the clock lead a new pattern is writ-
  825.                            ten to the output. If the end of the file is rea-
  826.                            ched, repeat defines the next pattern. On repeat
  827.                            equal 0, the output holds its last value. On re-
  828.                            peat unequal 0, the next pattern is again the
  829.                            first pattern of the data file.
  830.  
  831.  
  832.  
  833.  
  834.             4.2.28  Recorder
  835.  
  836.  
  837.             RECORDER    name,clk,in
  838.  
  839.  
  840.             name           Name of the file containing the record after the
  841.                            simulation
  842.             clk            Clock
  843.             in             Input
  844.  
  845.  
  846.             Function:      With every change of a bit of the clock lead the
  847.                            value on the input lead is written to the file.
  848.  
  849.  
  850.  
  851.  
  852.             4.2.29  Register set, positive-level-triggered
  853.  
  854.  
  855.             REG_SET_P   len,wrclk,wraddr,rdaddr,in,out[,init]
  856.  
  857.  
  858.             len            Number of registers (constant)
  859.             wrclk          Write clock
  860.             wraddr         Write address
  861.             rdaddr         Read address
  862.             in             Data input
  863.             out            Data output
  864.             init           Initial value of out (constant)
  865.  
  866.  
  867.             Function:      The register set can be read and write at the
  868.                            time. The value of in is transfered to the regi-
  869.                            ster wraddr as long as bit 0 of clk lies on logi-
  870.                            cal high level. After a 1-0-edge the last assigned
  871.                            value is saved.
  872.                            The contents of register rdaddr is transfered to
  873.                            the output.
  874.                            If the value of wraddr or rdaddr leaves the range
  875.                            0..len-1, the register becomes inactive for that
  876.                            function.
  877.  
  878.  
  879.  
  880.  
  881.             4.2.30  Register set negative-level-triggered
  882.  
  883.  
  884.             REG_SET_N   len,wrclk,wraddr,rdaddr,in,out[,init]
  885.  
  886.  
  887.             See REG_SET_P. The transfer from the input to the register hap-
  888.             pens on a logical low level on bit 0 of wrclk.
  889.  
  890.  
  891.  
  892.  
  893.  
  894.             5  Warnings and error messages
  895.             5.1  Warnings
  896.  
  897.  
  898.             -  Warning: Lead <name> is only used as an output
  899.  
  900.                   This can be the succession of misspellings in the VLI.
  901.                   Although the simulation will be started.
  902.  
  903.  
  904.  
  905.  
  906.             5.2  Error messages
  907.  
  908.  
  909.             -  Bad statement
  910.  
  911.                   The call of the simulator doesn't correspond to:
  912.  
  913.                      sim   <name>
  914.  
  915.  
  916.             -  File not found : <name>
  917.  
  918.                   The given file, that contains the VLI, doesn't exist.
  919.  
  920.  
  921.             -  LOW MEMORY
  922.  
  923.                   There's not enough memory available to translate the VLI.
  924.  
  925.  
  926.             -  '(' expected
  927.  
  928.  
  929.             -  ')' expected
  930.  
  931.  
  932.             -  ',' expected
  933.  
  934.                   Lead names must be seperated by commas.
  935.  
  936.  
  937.             -  Lead name expected
  938.  
  939.  
  940.             -  Output lead name expected
  941.  
  942.  
  943.             -  Init value expected
  944.  
  945.  
  946.             -  Constant expected
  947.  
  948.  
  949.             -  Condition expected (==,!=,>,>=,<,<=)
  950.  
  951.  
  952.             -  No constant allowed as output lead
  953.  
  954.  
  955.             -  Too many characters (max. 255)
  956.  
  957.  
  958.             -  Unknown device
  959.  
  960.  
  961.             -  Too many lead names
  962.  
  963.  
  964.             -  Out of range (0..0FFFF)
  965.  
  966.  
  967.             -  Out of range (0..0F)
  968.  
  969.  
  970.             -  Device cannot be used more than one time
  971.  
  972.                   The devices SWITCH or LAMP are used more than one time.
  973.  
  974.  
  975.             -  SWITCH must be used
  976.  
  977.  
  978.             -  SWITCH must be the first device
  979.  
  980.  
  981.             -  No such data file for RAM/ROM/PAT_GEN
  982.  
  983.  
  984.             -  Error in data file for RAM/ROM/PAT_GEN
  985.  
  986.  
  987.             -  Unable to write to recorder file
  988.  
  989.  
  990.             -  Bad statement
  991.  
  992.                   The device definition doesn't correspond to the given
  993.                   syntax. Mostly an illegal character is used.
  994.  
  995.  
  996.             -  Error while opening intuition.library
  997.  
  998.  
  999.             -  Error while opening graphics.library
  1000.  
  1001.  
  1002.             -  Error while opening LAMP-window
  1003.  
  1004.  
  1005.             -  Error while opening SWITCH-window
  1006.  
  1007.  
  1008.             -  Error while creating new task
  1009.  
  1010.  
  1011.             -  Unable to load/create process
  1012.  
  1013.  
  1014.             -  Different version of Sim and external device definition
  1015.  
  1016.  
  1017.             On errors, that occur during the translation of the VLI, the in-
  1018.             correct line is shown (an extract) and the wrong place is marked.
  1019.             The error lies directly at the marked place, at the character
  1020.             ahead or in the name ahead.
  1021.  
  1022.             Only the first error in a line is recognized.
  1023.  
  1024.             After every five errors is asked if the translation should conti-
  1025.             nue. On abortion, the number of the errors, that are detected
  1026.             until this point, is shown.
  1027.