home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / demo / simlog.cpt / PAL_OUP SimLog Demo / Using SimLog < prev   
Encoding:
Text File  |  1992-08-21  |  21.5 KB  |  225 lines

  1.  
  2. Using SimLog¬
  3.  
  4. The program's start-up procedure is initiated by double-clicking on either the SimLog¬ application or a Circuit Document.  The program may take some time to load.  During the loading process the startup picture will appear on the screen accompanied by a small stop-watch cursor.
  5. In due course the application menu bar will appear.  If the program was launched directly a new window will be opened.  A quick glance at some of the menu contents, excluding those items that are 'greyed' out, will immediately reveal the level of system that has been made available. 
  6. If the program has been launched from a Circuit Document it will open the selected circuit into its own window automatically.
  7. It should be noted that there is a maximum size for the underlying document that is governed by the printing requirements and as such the window in which it is displayed cannot exceed this size. 
  8.  
  9. The user interactions in SimLog¬ are predominantly mouse oriented.  The user need virtually never use the keyboard except for naming files upon saving or, where required, naming logic modules and input or output functions.  However, as in many other application programs, some of the menu functions are available by the use of command keys and some of the mouse actions may be modified through the simultaneous use of the Command or Option keys.
  10.  
  11. Logic and Input/Output modules are selected from the menus and placed in the circuit window.  These modules are treated as discrete objects and may be moved into position by dragging them around with the mouse whilst selected.  These ideas of selection and dragging are common to most drawing applications.  They must be moved to a new position before further actions are allowed.  During the course of a move, made by clicking on the selected item(s) and dragging the mouse, only outline rectangles of the selected modules are displayed to indicate their new potential position.  Although newly created modules may overlay other circuit entities, this will not be allowed to occur in subsequent moves.  If the potential end position for the moved module(s) overlays any other modules the outline rectangles will be filled with grey.  If the mouse is released at this point then the modules are not moved but restored to their original position and condition.  Relocated modules are allowed to displace existing interconnections, however, if a new route for the interconnection cannot be found the modules will again be restored to their original position.  If you are unable to place the newly created modules in the circuit, or at any time wishes to remove selected modules, then they can be deleted using the Clear function in the Edit menu or by using the backspace/delete key.
  12.  
  13. Interconnections are made and removed using the mouse to drag between input and output boxes of various modules.  The Simulator is constantly active and, as such, the circuit will immediately reflect the state brought about by the connection.
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. It is useful to reflect at this time that endless loops can be created in Logic in much the same way as in programs and therefore special attention has had to be paid to such a situation.  
  27.  
  28. Various tools are built into SimLog¬ to help with the design and construction of circuits.  You can re-orient some of the basic gates, attach oscilloscope probes to individual outputs and have the program automatically wire up a whole data bus.                                        
  29.  
  30. The simulation of the way signals propagate through a circuit can, at times, be just a little too fast to comprehend the finer details.  It is therefore possible to alter the execution parameters to slow down the propagation.
  31.  
  32. The built in oscilloscope affords a different picture of the way in which the signals travel through the circuit and significantly aids the determination of cause and effect from the student's viewpoint.
  33.  
  34. Finally the program allows you to save and print copies of the circuit and SimLog¬ supports most types of Macintosh printer (dot matrix or laser) and additional disc drives.
  35.  
  36. Each of these windows constitutes a separate Circuit and may be loaded, saved and operated upon independently of the others.  Each of these windows gives access to a circuit work area of 800 x 600 pixels.  This circuit is too large for a single screen on the Macintosh Plus range.  On creation of a New circuit, the circuit is placed so as to view and manipulate the central area.  The scroll bars can of course be used to move around the document,.  In line with other Macintosh applications, dragging a module with the mouse button depressed, from within the visible window into and beyond any of the four boundaries, will cause automatic scrolling out to the limits of the document.  You cannot place any module of the circuit outside of the document area or over an existing module.
  37.  
  38. Selected modules are represented in inverse video within a box which represents the body of the module.  Connections will not be drawn through this box, nor will other modules be allowed to overlap it.  All commands concerning module manipulation refer only to the selected modules.
  39.  
  40. Input and Output boxes.
  41.  
  42.  
  43.  
  44.  
  45. All Devices and Output modules are portrayed with small square input and output boxes.  Connections can only be made to the module via these boxes and in order to assist in the positioning of the connections you may observe that the modules can only be placed in discrete positions.  In fact, a 5 pixel square grid is in force which helps to simplify the job of alignment of modules for a neat picture and greatly eases the placement of connections.  At any given time an input box may be portrayed as being in one of three distinct states:
  46.     a logical One;
  47.     a logical Zero;
  48.     or Unconnected;
  49.  as shown in the diagrams below.
  50.  
  51. It should be noted that as with TTL systems unconnected logic inputs will none-the-less behave as logical Ones (unconnected inputs on Output elements may behave differently according to the device type and whether an engineering view is being portrayed).  In the real world it is always considered inadvisable to leave an input unconnected even if it is required to be at a constant logic state.  For interference immunity reasons it is always permanently connected to a "firm" logic One or Zero.  This is often described as a tie (tying up or tying down).  Both types of ties are incorporated as they are so often required.  A "Well of Ones" and a "Well of Zeros" has been provided just for this purpose:
  52.  
  53.  
  54. To all intents and purposes output boxes, seen in the diagrams above and below, look much the same as input boxes.  Outputs, however, can take four distinct states:
  55.     a logical One;
  56.     a logical Zero;
  57. plus the additional states of
  58.     Tri-State; (High Impedance)
  59.  and     Destroyed;
  60.  
  61.  
  62.  
  63.  
  64.  
  65. Outputs can be connected together in much the same way as inputs. However, if at any time two or more outputs on a connection or network should possess opposite values of One and Zero then these outputs will be destroyed and the module will need to be replaced.
  66.  
  67. Connections, Routes and Networks.
  68.  
  69. Input and output boxes are joined together by connections.  The routing algorithm will always endeavour to produce the simplest and tidiest route for the connection, avoiding existing modules and not allowing connections to be co-linear.  Where more than two I/O boxes need to be connected together a network is formed.  
  70.  ╩
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. Routes for connections or networks of connections will be automatically re-evaluated and redrawn under the following conditions:
  78. If any device on the connection or network is moved or reoriented.
  79. If any module is moved and placed such as to overlap an existing connection or network.
  80. Removing an input or output from a network leaves the remainder intact.
  81.  
  82.  
  83. The use of the mouse on the active circuit is essential to the construction of circuits.  In effect it allows:
  84.  
  85. the selection of modules.
  86. the movement of modules.
  87. the interconnection and disconnection of modules.
  88. changing of states for Input modules.
  89. changing the names of modules, their inputs or outputs.
  90. attaching oscilloscope probes.
  91. switching windows.
  92. resizing and scrolling windows.
  93. running the propagation of signals in Single Step mode.
  94. viewing of Truth Tables.
  95. modification of Memory contents or Oscillator parameters.
  96. interacting with menus and dialogs.
  97.  
  98. Many of these functions are common to other Macintosh applications and as such will not be covered here.  There are some aspects of the use of the mouse that are peculiar to SimLog¬ and need a little explanation.  The areas within and around each module have certain special functions and thus the following diagram is helpful in forming a common description of these areas (shown in grey).  Only a few of the more important modules are shown but these suffice to illustrate the point.  You will rapidly become familiar with these zones through practice. 
  99.  
  100. Every module lives inside an enclosing rectangle called its body  (rotatable modules live inside square bodies).
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. Input devices do not have input boxes to which connections can be attached.  They do possess actuation zones, areas which allow you to change the state of the module.
  122.  
  123. Output devices do not have output boxes.  Their picture normally reflects their output state.
  124.  
  125. All devices have both input and output boxes to or from which connections can be made.
  126.  
  127. All modules can be moved by clicking and dragging in the drag zones, which, as can be seen, represent those parts of the module's body that are neither I/O boxes nor actuation zones. 
  128.  
  129. Selecting Modules. 
  130.  
  131. To select a module, it is only necessary to click the mouse button within the body of the module.  The module or modules previously selected will revert to normal and the newly selected module will appear in inverse video.  If the mouse button is clicked whilst not over a module, previously selected modules will revert to normal and no modules will be selected.  Two mechanisms are available to select more than one module at a time:
  132. a.) if while selecting a module the 'shift' key is pressed, the new module is added to those selected as opposed to replacing them.
  133. b.) by pressing the mouse button somewhere in the active circuit window and then dragging the mouse without releasing the button, a rectangle will appear to follow the mouse movement.  The moment the mouse button is released, all the modules enclosed by the rectangle will be selected.
  134. It is possible to combine both these actions.
  135.  
  136. Moving Modules.
  137.  
  138. Individual or groups of modules can be moved around the circuit using the mouse.  For a group move, first select the group.  Depress the mouse button in the drag zone of a single module (an unselected module will become selected) and keep the button depressed until the selected module or modules appear in outline.  This will take the form of a grey frame around the body of the module.  The mouse can now be moved and the outline will follow the movement of the mouse.  When the button is released, the module will be redrawn wherever the outline version is positioned and the image of the module in its original position will be erased.  If while moving the module, the outline image is moved such that it would overlap the body of another module, the outline image will start to blink rapidly.  If the button is released at this point the module will be left in its original position.  However, the movement may be continued until the overlap is avoided and the blinking stops.  If the module being moved is connected to other modules the drawn interconnections will not follow the movement but will be redrawn after the module has been placed.  If multiple modules are selected they will all be moved as a whole and their respective positions will be maintained.  If during the movement one or more modules the outline moves beyond the bounds of the window the whole drawn circuit is moved in order to follow the movement.  During movement the selected modules are not allowed off the edge of the document.
  139.  
  140. Connections.
  141.  
  142. The interconnections between modules can take the form of a single point to point connection or a network.  The routing algorithm within SimLog¬ automatically takes care of the actual placement of the interconnections.  You need only specify the start and end boxes between which a connection should be made.  The router has built in stylistic rules according to the following:
  143. All lines must be either vertical or horizontal.
  144. A Line may cross another at right angles but may not overlay another line running in the same direction.
  145. Connection lines between two different modules may not enter the zone of an other module.
  146. Junctions of three or more lines are denoted by a small blob.
  147. All lines must be at multiples of 5 pixels apart.
  148.  
  149. The routing algorithm is complex and will try many different approaches in order to make a connection.  If you pay heed to the rules by which it is operating the routing will be fast and clear.  If the router cannot make the connection the attempt is abandoned and you will be instructed to relocate certain elements of the circuit before trying again.  To make an interconnection, the mouse button must be depressed over an input or output box and the mouse moved without releasing the button.  A 'rubber band' line will appear between the selected box and the cursor.  The mouse button must be released over another output or input box for an interconnection to be made.  Although you may normally only make connections between an individual input box and an output box, there are of course instances when an output may be connected to many inputs or in some cases vice-versa.  SimLog¬ supports the use of Tri-State devices which allow such connections to be made.  However, there is no provision for the trick of connecting Wire-Ors through the use of Open Collector devices.  To make such a multiple connection the user must start by connecting two of the boxes together.  Further connections are added in exactly the same way, adding the new box to any of the already connected boxes.  The router will decide where the most convenient point for the junction is and draw the new connection accordingly.  After drawing the new interconnection, the simulator will automatically update the input and output values, so as to put the circuit in a self-consistent state.  Disconnections are effected by clicking in the required box and dragging the mouse into the circuit (open space) before releasing.  This action allows individual boxes to be disconnected from a network.  In the case of a single point to point connection this action will result in the total removal of the connection.  Again, the simulator will automatically update the input and output values, so as to put the circuit in a self-consistent state.  Both the connection and disconnection procedures can be abandoned by depressing the 'command' key before releasing the mouse.
  150.  
  151. Changing the States of Input Modules.
  152.  
  153. It is not possible to change the state of an input box or an output box directly.  Thus it is impossible to alter the state of unconnected modules.  The only modules which are subject to change are the Switches, Oscillator, Keypad and Random Number Generator modules.  To modify the state of these modules, it is simply necessary to click the mouse button in the actuator zones.  In the case of the Keypad the output will take the binary hexadecimal value of the specific key to be hit.  In all cases the module will be redrawn to reflect the changed state..
  154.  
  155. Changing Names.
  156.  
  157. It is possible to change the name of a module, input box or output box.  To do this, double click in the module's drag zone, input box or output box respectively.  A dialog box will appear within which will be written the previous name for module, input or output. After the modification, the circuit will automatically be updated.
  158.  
  159. Truth Tables.
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182. The Truth Table for logic devices can be viewed from the definition dialog immediately after selecting a device from the menu.  At any time subsequently the Truth table can be obtained by double clicking in the module's body whilst holding the Option key down.  A typical Truth Table takes the following form: 
  183.  
  184. The truth tables given within SimLog¬ represent the behaviour of the devices used within the simulation.  These may differ in some cases from equivalent truth tables for real devices in the TTL or CMOS logic families and are intended to be compatible with the educational principles that are being taught.
  185.  
  186. Single Stepping.
  187.  
  188. In cases where the propagation of signals around a circuit occurs too fast to be observed and understood, the simulator can be made to operate in Single Step mode.  The mode is entered by selecting the option in the Tools menu.  For obvious reasons this mode is not available if any oscillators are running in real time.  As soon as you instigate a change in the circuit the propagation is halted.  Due to the artificial nature of Single Step mode, the modules behave logically correct whilst the connections may be left inconsistent.  At this point the cursor is changed to a starting pistol and when fired the signals are allowed to propagate through the next gate along the connection before halting again.  When propagation is complete (a stable state reached) the cursor returns to normal.  However, Single Step mode remains in effect until you re-select Free Run from the Menu.  The effect of the Single Step mode can clearly be seen when observing reset pulses on ripple counters.
  189.  
  190.  
  191. Selecting Ties.
  192.  
  193. Ties allow inputs to be firmly connected to logical Ones or Zeros without having to connect to a switch.  Tie-ups and tie-downs can only be drawn from the Wells.  A single click in the centre of either well will produce the desired module in the top left of the circuit window.  These mini-modules cannot be named.
  194.  
  195. Points to Remember.
  196.  
  197. Connections;
  198. The routing algorithm is based upon the need to produce clear and unambiguous connections between devices.  To this end the algorithm is based on the following principles : 
  199. All connection lines are either vertical or horizontal.
  200. All parallel connection lines are multiples of 5 pixels apart.
  201. A connection line may cross another at right angles but may not overlay another line running in the same direction.
  202. Connection lines between two different modules are not allowed to enter the zone of another module.
  203. A network will not support more than 10 connections to devices.
  204. Junctions of three or more lines are denoted by a small dot.
  205. The maximum number of lines allowed in a route connecting one IO box to another, or connecting an IO box to an existing network, is five.
  206. The routing algorithm is complex and will try many different approaches in order to make a connection.  However, as designs grow in complexity, the router may not be able to make a particular connection and the attempts will be abandoned.  The routing algorithm is not exhaustive.  It does not keep searching for a route however complex.  It takes a pragmatic approach to testing potential routes and gives up, for example, if the route involves turning too many corners thereby using too many lines.  Although this can sometimes be frustrating for the user, a clear understanding of the above principles will help with the placement of devices prior to attempting to make a connection.  
  207.  
  208. Circuit Behaviour
  209.  
  210. The Simulation is based upon the idealised behaviour of logic devices.  A logic simulator used to model circuits from which physical replicas could be constructed would require a sophisticated data set for each of the many thousands of devices in a number of technology families.  Parameters and tolerances would have to be given for the operational criteria, eg. Temperature, Noise and Propagation times etc.  The devices in SimLog¬ have been based upon the following performance characteristics:
  211. All devices are drawn from an idealised unified family that closely resembles the TTL logic family.
  212. Pin connections are ignored and the logical/physical position of inputs and outputs are optimised for a left to right cartesian system.
  213. Devices have no dependency upon temperature, voltage, noise, etc.
  214. The Set-up times (the time required for an input to be stable after change before affecting the device) is considered to be zero.
  215. All devices possess a propagation delay time (the time taken to effect a change in an output from a change in any input) of 1 unit.  This is not a 'real' time delay but signifies one cycle of the simulation event loop.  The 'real' time delay is therefore dependant upon the number of devices to be updated following input changes.
  216.  
  217. The result of such simplification provides a fundamental base for teaching logic design.  However, these idealised device specifications allow certain pitfalls that do not (cannot) occur in real circuits.  A prime example of this behaviour can be witnessed by forcing a NOR Gate Ring into continuous and unnatural oscillation by actuating the inputs with a pulse that is shorter than the propagation time around the loop.                                             In the above diagram the presence of the invertor in the pulse generator causes a one propagation cycle discrepancy in the signal from the switch reaching the XOR gate (this can more clearly be seen in Single Step Mode).  The resulting, one propagation cycle unit, pulse is the fed to a loop consisting of two NOR gates and can be seen to cycle around the loop forever as the propagation time around the loop is two units.  In reality, not only would the two NOR gates have differing propagation times, but the set-up times would exceed the propagation times thus preventing the permanent oscillation witnessed in the simulation.  A real physical circuit constructed with a very careful selection of devices from the slow CMOS family can just be seen to exhibit this oscillatory tendency, thus illustrating that the simulator is only accentuating a potential hazard in real logic design.
  218.  
  219.