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:
-
A short description explaining your design process and how you minimized
the circuit's complexity.
-
A printout of the circuits you designed.
-
A floppy disk containing your circuit. (Note: -20% if it contains a virus!!)
Grading Criteria:
-
(85 points) Your circuit is well designed, and operates correctly when
we run it within LogicWorks.
-
(15 points) Clarity and neatness of your report, (i.e. how easily the grader
can see that you did the job, and that it worked), and its overall level
of professionalism.
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
-
Start LogicWorks
-
See the Logicworks, Design, Palette, Parts, and Timing Windows
-
In Parts: click triangle next to 'spice.clf' to pull down menu of parts
libraries, choose primgate.clf;
-
double click on NAND-2, and drag a blinking NAND symbol into the Design
window:
-
click once to place an instance of the NAND, then press space bar;
-
In Parts window pull down menu and select primio.clf library;
-
double-click Binary switch, and place an instance to the left of the
NAND, then another instance below that, then press space bar;
-
In Parts window double click on Binary Probe, and place an instance
to the right of the NAND gate;
-
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;
-
Do the same to connect the other binary switch to the other NAND input,
and the NAND output to the Binary Probe;
-
Use CTRL z at any point to undo the most recent operation;
-
At any point to erase a connection, click on it, and press back space;
-
To move a connection click and drag it;
-
To move a gate, click on it and drag it;
-
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;
-
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.
-
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.
-
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:
-
Delete one of the binary Switches;
-
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;
-
To see timing waveforms of signals, the signals must be named:
-
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;
-
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;
-
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;
-
Fiddle with different setting of the clock speed, simulation speed,
etc.
-
Have fun...try stuff!