ECE221 Digital Logic Design, Fall, 1999


Project #0: Getting started with a Logic Simulator

Due: Friday, October 22, 1999; Off-campus: 1.5 week after receipt

Design and test a 2 bit magnitude comparator. It has four bits of input: the pair of bits x1x0 representing X (where x1 is the most significant bit), and y1y0 representing Y. It has three outputs: G, E, and L:

G is high if and only if X > Y;

E is high if and only if X = Y;

L is high if and only if X < Y.

Design the circuit, using K-maps to minimize circuitry where possible. Also try to "share" circuits where possible between the G, E, and L sub circuits, as discussed in class. Implement the circuit out of primitive gates NAND,NOR,NOT,XOR,and XNOR gates only, and test it using LogicWorks or a circuit simulator of your choice (such as Electronics Workbench) to insure that it outputs the correct values for every possible combination of input values.

Then, in the same circuit file as your 2-bit comparator above, wire up and test the 4-bit magnitude comparator chip: the 74HC85, built into Logicworks as the "85" chip. Use a hex keypads to enter 4-bit values into the A and B inputs.

Turn in:

Grading Criteria:

Important note: Always make a copy of your report, in case it gets lost. Bind it neatly and professionally. Its appearance does matter! 

Some Notes on Using LogicWorks 3, for Windows

  1. Start LogicWorks
  2. See the Logicworks, Design, Palette, Parts, and Timing Windows
  3. In Parts: click triangle next to 'spice.clf' to pull down menu of parts libraries, choose primgate.clf;
  4. double click on NAND-2, and drag a blinking NAND symbol into the Design window:
  5. click once to place an instance of the NAND, then press space bar;
  6. In Parts window pull down menu and select primio.clf library;
  7. double-click Binary switch, and place an instance to the left of the NAND, then another instance below that, then press space bar;
  8. In Parts window double click on Binary Probe, and place an instance to the right of the NAND gate;
  9. Make connections: click on the very end of the binary switch output lead, and drag the connection to one of the NAND inputs, and release mouse button;
  10. Do the same to connect the other binary switch to the other NAND input, and the NAND output to the Binary Probe;
  11. Use CTRL z at any point to undo the most recent operation;
  12. At any point to erase a connection, click on it, and press back space;
  13. To move a connection click and drag it;
  14. To move a gate, click on it and drag it;
  15. To erase a circuit gate sweep across it with the mouse button down, then release button to see a dashed rectangle about the gate; press backspace to delete it;
  16. To test the behavior of the NAND, click on each Binary Switch to change its value, and watch the Binary Probe show the NAND's output value.
  17. Save your design: in Design window pull down File Menu, click on 'Save as', type a name of your choice in File Name, and click on OK.
  18. Print your schematic: click on Print in the File menu of the Main LogicWorks menu. It may take some fussing to actually get a printout, since it depends on how you are attached to a printer.
Now add dynamic action:
  1. Delete one of the binary Switches;
  2. From the primio.clf library select Clock, and place an instance to the left of the NAND gate; connect the clock output to the NAND input;
  3. To see timing waveforms of signals, the signals must be named:
  4. To name a signal, click on the 'T' in the Palette, and see mouse cursor turn into a pencil. Click on any signal lead, and type in your choice of name in the little box that appears, pressing return to end the setting of the name; Note that this name immediately appears in the Timing window; click in the arrow symbol in the Palette to return your cursor to the arrow shape;
  5. Expose the Simulator window by clicking on 'simulator' in the Tools menu of the main LogicWorks menu; Click in Reset to start the simulation back to the beginning, and click in run to watch the clock and NAND waveforms;
  6. Notice that in one setting of the binary switch the NAND is disabled: in the other setting it makes the NAND into an inverter: the clock and NAND output are out of phase;
  7. Fiddle with different setting of the clock speed, simulation speed, etc.
  8. Have fun...try stuff!