LogicWorks 4 Tutorial

Author: Len Payne, U of Q - Updated - 26 June 2006

Tutorial Manual Format

In the following tutorial sections, text with a dot:

  • like this

provides step-by-step instructions for achieving a specific goal. Other text provides background and explanation of the actions being taken.  

The Five-Minute Schematic and Simulation

In this section, we're going to show how quickly you can create and test a circuit using LogicWorks.

Starting LogicWorks

  • Start the LogicWorks program by clicking on:
     

    Start->Programs->LogicWorks 4->LogicWorks 4
     

Once the program has started, you will be looking at a screen like this.

 

The "Design" window is your viewport onto the circuit diagram, which you will manipulate using various drawing tools. The smaller "Timing" window will be used by the program to display a timing diagram of the signals in your circuit. Either of these windows can be moved or resized by the usual methods, to suit your needs.

Placing a Device

The parts palette shows a merged list of all parts in all open libraries. Libraries can be opened and closed manually using the Parts popup menu's Open and Close commands, or any collection of libraries can be opened automatically at startup by placing them in the "Libs" directory.

fig1.jpg
  • Locate the 74_164 part in the parts list and double-click on it.
  • Move the cursor back into the circuit window. The cursor on the screen will now be replaced by a moving image of the selected symbol, in this case an 8-bit shift register.

The numbered devices in this library are generic 7400-series types. The labeling and simulation characteristics can be adjusted to match the various 7400 families on the market.

  • Position the image somewhere near the centre of the circuit window and click the mouse button. A permanent image of the device will now stay behind in that location and the image will continue to follow your movements.
fig2.gif

More devices of the same type could be created at this point, but in this example we wish to select another symbol.

  • Press the spacebar to return to Point mode. Notice that you can click and drag the device that you placed to any desired new position.
  • Move again to the Parts Palette, open the DemoLib.clf library and double-click on the XNOR-2 type. Once you move outside of the Parts Palette, the cursor will immediately change to match the new symbol.
fig3.jpg

The XNOR-2, and the devices in the Simulation Gates.clf, Simulation IO.clf, and Simulation Logic.clf libraries, are called "primitive" types because they have built-in simulation models in LogicWorks. Other devices, such as those in the 7400devs.clf library are called "subcircuit" types because their simulation models are made up of primitives. If LogicWorks is being used only for schematic entry, it is also possible to make symbols with no simulation function.

  • Place one of these Exclusive-NOR gates adjacent to the 164 device so that the pins just touch, and click once to anchor the device.
fig4.gif
  • Press the spacebar to return to Point mode.

Whenever you place devices or signal lines so that they touch, you will notice that the signal lines flash briefly. This indicates that a logical connection has been made. You do not need to explicitly request a connection.

 

Moving a Device

  • Point at the Exclusive NOR gate and click and drag to the right. While you hold the mouse button you can drag the device to any desired new position. Note that any signal lines attached to the device are adjusted continuously to maintain connection.
fig5.gif
  • Position the gate as shown to the right of the 164 device.

 

Drawing Signal Connections

  • Attach a connection to the output of the gate by positioning the pointer near the endpoint of the pin and dragging away to the upper left.
fig6.jpg
  • Notice that two lines at right angles will follow your mouse movements to connect the starting and ending points.

While moving the mouse, try pressing the [CTRL] and/or [TAB] keys and note the different line-routing methods available. Click mouse once to anchor the signal line.

  • Leave a right-angle line attached to the gate, as shown.
fig7.gif
  • Extend this line to connect to the B input of the 164 by clicking at the line endpoint where you left off, dragging the line to the B input, and releasing the mouse button.
fig8.gif
  • Add a connection to pin A by clicking at the end of the pin, dragging the line down until it touches the signal line, then releasing the mouse button.
fig9.gif

Notice that an intersection dot appears automatically whenever three or more lines intersect.

  • Try repositioning a line segment by clicking and dragging anywhere along the length of the segment except at a corner or intersection.

 

Binary Switch Input Device

  • Return to the Parts Palette and select a Binary Switch device from the demolib.clf library.
  • Place it as shown on the diagram.
fig10.gif
  • Press the spacebar to return to Point mode.
  • Try clicking on the switch. Notice that it changes between the 0 and 1 states.

In order to move a switch, you must first select it by holding the [SHIFT] key while clicking on it. This is necessary because the switch has a special response to a normal mouse click.

The devices in the Simulation IO library can be used to actively control and observe the simulation right on the schematic. Each of these devices responds immediately to changes in the simulation in progress. The Hex Keyboard device is similar to the switch except that it operates on four lines at once.

Clock Generator Device

  • Select a Clock device from the demolib.clf library and place it on the diagram just below the switch.
  • Press the spacebar to return to Point mode.
  • Route wires from the switch and clock to the 164, as shown. Remember to try using the [CTRL] and [TAB] keys to route the wires.
fig11.gif

While you have been working on the diagram, the LogicWorks simulator has been running continuously, simulating the effects of the new connections that are being made. So far, though, we have not asked it to display any results. This is done either by placing probes on the diagram or by displaying signals in the Timing window.

Naming a Signal

  • Click on the text icon in the Tool Palette. The cursor will then change to a pencil shape, which will be used to select the item we want to name.
fig12.jpg

The text cursor is used to name devices and signals, to apply pin numbers to device pins, and to add free text notations to the diagram.

  • Position the tip of the pencil anywhere along the length of the line running from the clock device, and press and hold the mouse button. The cursor will change to an I-beam shape.
fig13.gif
  • Still holding the mouse button pressed, move the cursor down somewhere below the signal line.
  • Release the mouse button. A blinking insertion marker will appear.
fig14.gif
  • Type the name "CLK" on the keyboard, then press the [ENTER] key or click the mouse button once.
fig15.gif
  • Return to Point mode by clicking the arrow icon in the Tool Palette. Note that the name can be dragged to any desired position.
  • Click once on the Binary Switch to change it to the logical 1 state.

 

The Timing Window

You will immediately see the Timing window come to life with the displayed values on the CLK line. By default, any named signal is shown automatically in the Timing window.

fig16.jpg

You can disable this feature, if desired:

Pull down the Simulation menu and deselect the Add Automatically command.

  • Again using the text cursor, name the two data lines from the shift register and the output line from the gate, as shown. The simulated output from these lines will immediately appear in the Timing window.
fig17.gif

 

Simulation Controls

Click on the <> and >< buttons and observe that they affect the time scale of the Timing window.

fig18.jpg

Display resolution can be adjusted from 4 pixels/time unit to 100 time units/pixel. The interpretation of a "time unit" is arbitrary, but it is convenient to think of it as a nanosecond.

  • Select the Timing Window item in the View menu. You will notice that the Timing window disappears and the current time indicator in the Simulator palette advances much more quickly.
  • Select the Timing Window item again to re-enable the display.
  • Click on the Reset (fig19.jpg) button and notice that the simulation restarts at time 0.

Adjust the speed slider control in the Simulator toolbar and notice that simulation slows.

  • Click repeatedly on the Step (fig20.jpg) button and observe that the simulation proceeds one step at a time.
  • Click the Run button in the Simulator toolbar.

NOTE: The Step button advances the simulation to the next time at which there is some circuit activity, not necessarily just one time unit. The size of the step will depend upon the circuit.

Probe Device

  • Select the Binary Probe type from the Parts Palette.
  • Place a probe so that its pin contacts a signal line to view the simulation value on that line.
fig21.gif

As the simulation progresses, the values on all probes are updated immediately. A similar device, the Hex Display, is also available to show groups of lines in hexadecimal. These simulation devices can be flagged to indicate that they are not a real part of the finished product and should not be included in any netlists or bills of materials.

Setting Device Parameters

  • Click in the window, but away from any circuit objects. This deselects everything.
  • Click on the XNOR gate to select it.
fig22.gif
  • Select the Simulation Params command in the Simulation menu.
  • Click on the "+" button a couple of times to increase the propagation delay in this device.
fig23.jpg

The Simulation Params command is used to view and set delays associated with devices and pins. Pin delays normally default to zero but can be used to fine-tune the delays for different paths through a device.

  • Click on the OK button.

 

Device Delay on the Timing Window

Notice that the altered device delay immediately affects the simulation. You will see an increased delay between the clock reference lines and the changes in the FEEDBK signal.

fig24.jpg

 

Interacting with the Simulation

  • Try clicking on the switch hooked to the CLR input. Notice that it changes state and immediately affects the displayed simulation results.
fig25.gif

 

Saving the Design

  • Click the Save button (fig26.jpg), and save your circuit so you can continue with it later.

This ends the Five-Minute Schematic and Simulation tutorial section.