Step by Step Instructions to simulate a full-adder.
Open up Schematics:
In Win95/98/NT, go to Start, Programs, Xilink Foundation Series, open up Xilink Foundation Project Manager.
Create a new project and name it.
Under Tools Menu, select Design Entry/Schematic Editor.
Create a half-adder:
In the Schematic Editor window, open the Symbol Toolbox by pressing () button on the schematic toolbar on the left.
Select AND2(The 2 represents two inputs), click on the Schematic Workspace to place the gate.
Select XOR2 and place it next to the AND2 gate.
Click on the draw wire button in the schematic toolbar ( ).
Click once at a terminal of the XOR2 gate, move mouse to an open space and right click to bring up a menu. Select Add Terminal, enter terminal name A1, select terminal type INPUT, click OK.
Repeat the above procedure for the other XOR2 terminal, but enter terminal name B1 instead. You should have the following:
Select the draw wire button (If it
’s not already selected). Click once at the terminals of the AND2 gates and connect to the two wires of the XOR2 gates by clicking on them.
Create two output pins the same way you create input pins in step D and E above. For terminal type, select OUTPUT instead of INPUT and name them SUM and CARRY. You should have the following:
Create full-adder
We create full-adder by using two half-adders. To make use of the half-adder design what we
’ve just created, we can put the half-adder into our device library so it can be re-used twice.
In Schematic Editor window menus, select Hierarchy, Create Macro Symbol From Current Sheet. Note, in order to create Macro properly, always use input/output pins. So if you are going to crerate a macro for the full-adder, you'll need to add pins to them (not just wires like what's shown below). On the dialog box that pops up, enter Symbol name
“HALFADD”, then click OK.
When it asks if you want to edit, click No.
Open a new schematic by Ctrl-N. Bring up the Symbol Toolbox by clicking in the Schematic toolbar.
Select HALFADD in the toolbox and place it in the schematic workspace, notice that this is the half-adder we created earlier.
Click the half-adder in the schematic workspace to duplicate the half-adder and place it in the schematic workspace. You can control the direction of the component before placement by pressing Ctrl-R, Ctrl-L or Ctrl-M(mirror image).
Create the following full-adder:
To end the wire terminal(so called hanging wires) without connecting to any component, double-click.
Label the wires by pressing the button on the schematic toolbar.
Always always save the schematic before simulation, then add it to the current project. Go to the File menu, select Save As, and give your schematic a name. Then select the Hierarchy menu, and select Add Current Sheet to Projec.
To print out your schematic, go to the File menu, choose Page Setup and choose 8 ½ x 11 page size, as this will make your schematic print out bigger and nicer. Then select the File menu again and choose Print.
Simulation
Press the simulation button on the main toolbar(top) to bring up the Logic Simulator Window.
In the menu, select Signal, Add Signals to bring up the Waveform Viewer.
Under signal selection box, you should see P, Q, R, C, S if you labeled the input and output wires in the schematics correctly. Highlight all five signals (by clicking the 1st signal and the last signal with a mouse while holding a shift key). Click Add to monitor all signals in the simulator. Then click close.
Right click in the stimulator area, select Add Stimulators. Stimulus selection pops up. Go back to the Logic Simulator highlight the Signal P, Q, R in the signal name area, then click any letter in the stimulus selection keyboard. This indicates P, Q, and R to be inputs that can be controlled by pressing the particular letter on the real keyboard. Click the state area (or press the letter on the keyboard)to assign 0 or 1 to signal P, Q, R.
Run simulation by clicking the step button in the simulator toolbar.
Check output of signal S and C with different combination of inputs P, Q, R. Change state by clicking the state area.