User's Guide Reference Manual LogicAid
User's Guide Reference Manual LogicAid
ogic
TM
*
L
Second Edition
s
Getting Started with
http://archive.org/details/isbn_9780534384746
USER'S GUIDE AND REFERENCE MANUAL FOR
• -g TM
LogicAid
Second Edition
and
SimUaid • t TM
BROOKS/COLE
*
THOMSON LEARNING
For more information about this or any other Brooks/Cole products, contact:
BROOKS/COLE
5 1 1 Forest Lodge Road
Pacific Grove, CA 93950 USA
www.brookscole.com
1-800-423-0563 (Thomson Learning Academic Resource Center)
All rights reserved. No part of this work covered by the copyright hereon may be reproduced or used in any form or by
any means — graphic, electronic, or mechanical, including photocopying, recording, taping, Web distribution, or
information storage and retrieval systems — without the written permission of the publisher.
Printed in Canada
10 987654321
ISBN: 0-534-38474-9
Table of Contents
LogicAid User's Guide 1
1. Introduction 1
2. Built-in Help 1
3. Entering Logic Equations 2
4. Simplifying Logic Equations 3
5. Entering Truth Tables 4
6. Entering PL A Tables 5
7. Entering Minterm and Maxterm Expansions 6
8. Entering Karnaugh Maps 7
9. Tutorial Mode for Karnaugh Maps 9
10. Entering State Tables 11
11. State Table Reduction 12
12. State Assignment 12
13. Derivation of Flip-Flop Input Equations 13
14. Checking State Tables 14
15. Entering State Graphs 15
Using Alphanumeric Inputs 17
Multiple Labels on an Arc 17
16. Checking Partial State Graphs 17
17. Programming a PAL 20
18. Entering SM Charts 21
19. Design Examples 23
Design of a Sequence Detector 23
Dice Game Controller 25
20. Using LogicAid for Asynchronous Design Problems 28
LogicAid Index 87
Preface
As the name implies, LogicAid is a program that serves as an aid to the logic
designer. It relieves the designer of many of the tedious computational tasks associated
with the logic design process. Its functions include simplification of logic functions,
working with state graphs and tables, and derivation of flip-flop input equations. The
software provides a quick way to try different design alternatives.
LogicAid introduces students to the use of the computer in the logic design
process. It enables them to solve larger, more practical design problems than they could
by hand. LogicAid provides tutorial aids for students who are learning to use Karnaugh
maps and state graphs. They can also use the software to verify solutions that they have
worked out by hand.
LogicAid and SimUaid were originally developed for use in logic design classes
at the University of Texas. The software was developed for use with Fundamentals of
Logic Design, 4th ed., by Charles H. Roth (PWS Publishers, 1995). However, it can be
used with almost any logic design textbook.
The Second Edition of LogicAid has an improved user interface and many other
new features. The allowable number of input and output variables has increased and
addition of the Espresso algorithm allows faster simplification of PLA tables and logic
functions. The SM chart input provides an alternative to using state graphs. JEDEC files
for programming 22V 10 PALs can be generated and downloaded to a PAL programmer.
The first section of this manual is a LogicAid User's Guide that provides step-by-
step instructions for using the various program features. The next section is a LogicAid
Reference Manual that explains each command in detail. The last section, Getting
Started with SimUaid, introduces the use of SimUaid. The SimUaid Reference Manual is
on the CD in both Microsoft Word (.doc) format and Adobe Acrobat (.pdf) format. The
latter requires Acrobat Reader 4.0 or higher to read.
Solution Files
The LogicAid folder on the CD includes files that contain encoded solutions to
the problems in Chapters 14, 16, and 17 of Fundamentals of Logic Design, 4th ed. These
files are stored in folders labeled Probs-14, Lab- 16, and Probs-17. Although these files
cannot be read directly, they can be used to check your solutions to state table and state
graph problems as explained in sections 14 and 16 of the LogicAid User's Guide.
VI
Installation
LogicAid, 2nd ed., and SimUaid are compatible with Windows 95, 98, NT 4,
2000, and ME. You must run SETUP to install each of the programs onto your hard
drive. To install LogicAid, insert the CD ROM in the drive, open the LogicAid folder
and click on setup.exe. When finished, open the SimUaid folder on the CD and click on
setup.exe to install SimUaid.
LogicAid User's Guide
1. Introduction
LogicAid is a computer-aided design program that performs many functions
commonly needed in the logic design process. It is capable of simplifying Boolean
functions specified as equations, terms, a truth table, a PL A table, or Karnaugh maps.
Given a state table, LogicAid provides routines to do state reduction, to specify state
assignments, to generate flip-flop input equations, and to compare with another state table
for functional equivalence. In addition, LogicAid accepts state graphs and SM charts as
inputs.
LogicAid has two tutorial modes. The Karnaugh map tutorial mode helps you
learn to solve Karnaugh maps. The partial graph checker helps you to learn to derive
state graphs for sequential networks. LogicAid also allows you to check the answers to
state table problems without revealing the correct answer.
LogicAid uses three types of windows. The input window is used for entering
data, the output window displays results from the logic-design routines, and the graphics
window is used for Karnaugh maps, state graphs, and SM charts. Up to three windows of
each type can be open at the same time. The windows are color-coded so that windows
derived form a given input window have the same color stripe on the left side. For
example, a state table and output equations drived from a state graph would have the
same edge color as the state graph.
This manual assumes that you are familiar with basic Windows operations
including using the mouse, entering and editing text, and working with menus, dialog
boxes, windows, etc. The manual is divided into two main parts. This part is a User's
Guide, which gives step-by-step instructions for carrying out each of the major functions
performed by LogicAid. The second part is a Reference Manual; which provides a
detailed explanation of every command. Throughout this manual, a dash (-) is used to
represent a "don't care" or a missing variable.
The first time you install your copy of LogicAid using the setup program, a dialog
box will appear on the screen so that you can personalize your copy. Type your name in
the space provided and click OK. Then your name will be printed at the top of any output
you print from your copy of LogicAid, and your name will be saved on any files you
create.
2. Built-in Help
LogicAid provides a limited amount of built-in help using the standard Microsoft
help system. To access this help, select LogicAid Help from the Help menu, and then
select an item from the help contents, or you can click on Index and search the help
index. Help provides a brief summary of the required input formats for equations, truth
tables, terms, Karnaugh maps, state tables, state graphs, and SM charts. For more details,
refer to this User's Guide or to the Reference Manual.
Help can also be accessed from any window in LogicAid by pressing the Fl key.
Help for the currently active window is then displayed. For example, if you press Fl
when the state table window is active, help for entering state tables will show up.
2 LogicAid User's Guide
1. Pull down the Input menu and select Equations (or type CTRL+E).
2. When the Input Equations Format dialog box appears, type in the number of input
variables if it is different from the default value of 4. If you want to enter more
than one function, hit Tab and then enter the number of functions. The default
input variable names are XI, X2, X3, . . . , and the default function names are Zl,
Z2, Z3, .... If you wish to change any of these names, select Enter Names . If
you want to enter your equation(s) in product-of-sums form instead of sum-of-
products form, click on the appropriate button. Then click OK.
3. If you have selected Enter Names , the Input Variable Names dialog box will
appear next. Change any names which you want to be different from the default
key.) and then click OK. (You may advance from box to box by using the Tab
values
4. An input window titled "Equations" appears next. Type the equations into the
window. You may use the standard Windows editing functions (Cut, Copy, Paste,
etc.) as required. Each equation must start with a function name followed by "=",
and must end with a period. The input is case sensitive, so that capital and lower
case letters are distinguished. In particular, if default names are used, X and Z
must be capitalized in XI, Zl, etc. Each variable name should be followed by a
space, a complement ('), a plus sign, or another separator. Examples of equations
entered in sum-of-products form are:
Fl = A C'+ A B'D + A'B'C + A'C D' + B'C'D'.
Note: If an equation is too long to fit on a single line, you may type Enter after
any term.
5. Next you may select Check Syntax from the Input menu (or type ALT+I Y or
CTRL+Y). If you have made any syntax errors, a dialog box will appear which
explains the type of error. Click OK, and the cursor in the input window will
indicate the approximate location of the error. Edit the input equations to correct
the error(s).
6. After correcting the errors, you may save the data in the edit window as a
LogicAid file by selecting Save from the File menu. All LogicAid file names
must have an extension .AID .
Logic A id User's Guide 3
1. Select Truth Table from the Input menu (or type CTRL+T).
2. When the Input Truth Table Format dialog box appears, type in the number of
input variables if it is different from the default value of 4. If your table has more
than one output function, hit Tab and then enter the number of functions. The
default input variable names are XI, X2, X3, . . . ; the default function names are
Zl, Z2, Z3, .... If you wish to change any of these, select Enter Names. The
default format for the input combinations in the truth table is Straight Binary
Order. If you prefer to use a different input format, select Decimal, Binary (0, 1,
-), Hexadecimal, or Octal. The default for the output combinations is Binary (0,
1, -), but Decimal, Hexadecimal, or Octal may also be selected. After the table
has been entered, output values for the remaining rows will default to all 0's
unless 1-terms or X-terms is selected. When you have finished selecting
formats, click OK.
3. If you have selected Enter Names, the Input Variable Names dialog box will
appear next. Change any names which you want to be different from the default
key.) and then click OK. (You may advance from box to box by using the Tab
values
4. An input window titled "TruthTable" appears next. The header at the top of the
window lists the input variable names and output function names. Enter the truth
table below this header. If you have selected the default format for input
combinations (straight binary order), the binary input combinations will
automatically be generated for you. For example, for three input variables, 000
will appear on the screen. Type in the corresponding output values and hit Enter.
Then type in the output values corresponding to row 001, etc. When you have
entered the output values for the last row in your table, hit F12 instead of Enter.
NOTE: Once you hit F12, the program switches to manual mode and any further
input combinations must be typed in manually. The following example shows a
truth table with three inputs and three outputs (binary format):
Input Variables: XI X2 X3
Output Functions: Zl Z2 Z3
000 100
001 010
010 00-
011 001
100 011
101 -1-
If you do not use the default format (straight binary order), then for each row of
the truth table, type the input combination followed by a space or Tab, and then
type the output values. The following example shows the input for the same truth
table using decimal format for the input combinations:
Logic A id User's Guide 5
Input Variables: XI X2 X3
Output Functions: Zl Z2 Z3
0 100
1 010
2 00-
3 001
4 Oil
5 -1-
6. Next you may select Check Syntax from the Input menu (or type ALT+I Y). If
you have made any syntax errors, a dialog box will appear which explains the
type of error. Click OK, and the cursor in the input window will indicate the
approximate location of the error. Edit the truth table to correct the error(s). The
header cannot be changed in the edit window. Select Change Parameters from
the Input menu to change the input or output variable names.
1. Select PLA Table from the Input menu (or type CTRL+shift+L).
2. When the Input PLA Table Format dialog box appears, type in the number of
input variables and the number of output functions. The default input variable
names are XI, X2, X3, . . . ; the default function names are Zl, Z2, Z3, .... If
you wish to change any of these, select Enter Names. The format for both inputs
and outputs is Binary (0. 1, -). When finished, click OK.
3. If you have selected Enter Names, the Input Variable Names dialog box will
appear next. Change any names which you want to be different from the default
values and then click OK. (You may advance from box to box by using the Tab
key.)
4. An input window titled "PLATable" appears next. The header at the top of the
\\ indow lists the input variable names and output function names. Enter the PLA
table below this header. For each row, type the input values followed by a space
or tab, followed by the output values. The following example shows a PLA table
with four inputs and three outputs:
Input Variables: XI X2 X3 X4
Output Functions: Zl Z2 Z3
0-11 110 {first row)
001- 001
01-0 101
10 — — 0 {last row}
5. Next you may select Check Syntax from the Input menu (or type ALT+I Y). If
you have made any syntax errors, a dialog box will appear which explains the
type of error. Click OK, and the cursor in the input window will indicate the
approximate location of the error. Edit the PLA table to correct the error(s). The
6 Logic Aid User's Guide
header cannot be changed in the edit window. Select Change Parameters from
the Input menu to change the input or output variable names.
where "1 -terms" represent input combinations for which the function value is 1,
"0-terms" represent input combinations for which the function value is 0, and "X-
terms" represent input combinations for which the function value is a "don't care."
Typically, one or two of the three lists may be omitted.
One of the following formats may be used:
c. Given a minterm expansion with "don't cares," use the following format:
list of 1 -terms,, list of X-terms.
1. If you are learning to use Karnaugh maps, you may want to use the tutorial mode
to help you. If so, select Enter Tutorial Mode from the KMap menu (see
Section 9). Otherwise, select Karnaugh Map from the Input menu.
2. When the Input Karnaugh Map Format dialog box appears, enter the number of
input variables if it is different from the default value. The default variable names
are A, B, C, D, E and the default output function name is F. If you want to
change any of these, select Enter Names. If the number of inputs is 5, you have
to sefect the output form, which could be mirror image form or diagonal form.
3. If you have selected Enter Names, the Input Variable Names dialog box will
appear. For the Karnaugh map input, the max length of the input variable and
output function names is 2 characters. Change any of names which you want to
be different from the default name and click OK.
4. At this point, a graph window will appear. The graph window is divided to 3
parts. The left part is the side menu which shows a menu of 8 items; the right
upper part is the map zone used to enter a map, and the right lower part is the
equation zone used to enter equations .
5. If you want to plot a map, select Plot l's. Plot O's or Plot X's from the. side menu.
If you select Plot l's, click on any square of the map to enter a 1; if you dray the
mouse, the squares covered by the drag area will all be filled with l's. If you
select Plot O's, O's will be entered and if you select Plot X's. X's (don't cares) will
be entered. In each case, selecting a square which has already been plotted will
erase the value in that square.
8 Logic Aid User's Guide
6. When you select Fill O's from the side menu, the blanks of the map will all be
filled with O's; if you select Fill l's, the blanks will all be filled with l's. Every
map must have at least one 1 or one 0, but it is not necessary to fill all of the
squares. If you only enter l's, the blanks will be considered as O's; if you only
enter O's, the blanks will be considered as l's If you enter l's and O's, the blanks
will
map. be X's. But if you enter l's, O's and X's, there should be no blanks in the
7. After you finish entering the data of the map, you can select Loop from the side
menu to loop the terms. The way to enter loops is the same as to enter data. You
can click the selected square or drag the mouse to select several squares. If you
make a mistake, click on the square again to deselect it. After your selection, the
terms will be highlighted and you can hit Enter to ask LogicAid to check the
selected terms. If the selected terms can be combined to an implicant, LogicAid
will erase the highlights and loop these terms on the map; otherwise, it will show
an error message.
8. If you want to enter an equation, select Text from the side menu or click the
mouse in the equation zone to switch the side menu to Text. You can enter
equations in the equation zone only in the Text mode. The equations have the
same syntax rules as the Equation Input (Section 3). Each equation must start
with a function name followed by "=". Each variable name should be followed by
a space, a complement ('), a plus sign, or another separator. Example of sum-of-
products form:
F = A C'+ A B'D + A'B'C + A'C D' + B'C'D'
The following two examples show the input for two Karnaugh maps. The first
one is a map with 4 input variables and the equation form is Sum of Products. The
second one is a map with 5 input variables in Diagonal form and the equation form is
Product of Sums.
Logic A id User's Guide 9
pRl
KM AP Laid
Plot l's
Plot 0's
Plot X's
Loop
Fill 0's
Fill l's
Clear
Text
F= [B ♦ C'+ E ] (B'+ C ♦ E ) (A'+ B + C'+ D ) (B'+ D'+ E'] (A ♦ D'+ E') (A't C ♦ D"l . ±
please study the section on Karnaugh maps in Fundamentals of Logic Design or another
logic design textbook before proceeding.
1. Select Enter Tutorial Mode from the KMap menu (or type ALT+K T) and set
the parameters for the Karnaugh map. Refer to Section 8 (steps 2-4).
2. A dialog box for the tutorial options will appear. Select either the sum of
products or product of sums option for the equations, and then select a terms
input option. If you select the first option (type in each term after looping it),
whenever you loop a correct implicant, you have to type in that implicant as a
term of the equation. If you select the second option (type in all essential prime
implicants at once, and type in all remaining prime implicants at once) you
must finish looping all the essential prime implicants before typing in the
corresponding terms of the equation. Then you must loop all remaining terms for
the minimum solution before you type them in.
3. In the tutorial mode, an instruction will always be displayed at the top of the
Karnaugh map window. If you follow the instructions, you can enter a Karnaugh
map and then derive the minimum equation correctly.
4. The first instruction is Enter a new map! (Hit F12 when finished). When you
see this instruction, plot the map (see Section 8, steps 6 and 7). After you finish
entering the data of the map, hit F12 to tell Logic Aid that you are finished.
Note: The following instructions apply to the first terms input option (type in each term
after looping it). If you selected the second input option, go to step 12.
5. The second instruction is Loop an essential prime implicant! (Hit Enter) (Hit
F12 when finished). When you see this instruction, hit F12 and go to step 7 if
there are no essential prime implicants left to loop. Otherwise, loop an essential
prime implicant; refer to Section 8 (step 7) to enter the loop. After you select the
terms and hit Enter, LogicAid will either tell you the looping is correct or it will
display the reason for the error. When the loop is correct, continue with step 6.
6. In this step, the instruction is Type in the selected term (Hit Enter). Type in the
looped term in the equation zone and then hit Enter. If you type a wrong term,
LogicAid will display the error message and you should edit the term to correct it.
When you type in a correct term, you will go back to step 5.
7. If you have correctly entered all the essential prime implicants when you hit F12,
continue with step 8. Else, you will get an error message and go back to step 5.
8. In this step, the instruction is Loop a remaining term for minimum solution!
(Hit Enter) (Hit F12 when finished). This step is similar to step 5, except loop
one of the remaining prime implicants that will lead to a minimum solution
instead of looping an essential prime implicant. (When there are no terms left to
loop, hit F12 and go to step 10).
9. After looping a term, the instruction is Type in the selected term (Hit Enter).
Type in the looped term in the equation area and then hit Enter. When you type
in a correct term, you will go back to step 8.
10. When you hit F12 to tell LogicAid you have finished all the looping, LogicAid
will show you Correct Solution if you have correctly entered a minimum
equation. Otherwise, go back to step 8.
11. When you have finished a correct solution, LogicAid will not display any
instruction. You can select Exit Tutorial Mode from the Kmap menu to leave
the tutorial mode or you can select Clr from the side menu. If you select Clr , a
dialog box will allow you to select Clear loops, Clear equations, Enter new
map or Read map from file.
LogicAid User's Guide 1 1
Note: The following steps apply if you have selected the second terms input option.
12. The second instruction is Loop an essential prime implicant! (Hit Enter) (Hit
F12 when Finished). When you see this instruction, hit F12 and go to step 13 if
there are no essential prime implicants left to loop. Otherwise, loop an essential
prime implicant; refer to Section 8 (step 7) to enter the loop. After you select the
terms and hit Enter, LogicAid will either tell you the looping is correct or it will
display the reason for the error. When the loop is correct, repeat step 12 until all
essential prime implicants have been looped; then hit F12.
13. In this step, the message is Type in all selected terms. Type in all of the selected
essential prime implicants and then hit F12. If you have any errors, correct them
and then go to step 14.
14. In this step, the instruction is Loop a remaining term for minimum solution!
(Hit Enter) (Hit F12 when finished). This step is similar to step 12, except loop
all of the remaining prime implicants for a minimum solution instead of looping
essential prime implicants. (When there are no terms left to loop, hit F12 and go
to step 1 0).
1. Select State Table from the Input menu (or type Ctrl+B).
2. When the Input State Table Format dialog box appears, enter the number of NS
(next state) columns, number of input variables, number of output variables and
length of state names if they are different from the default values. The default
input variable names are XI, X2, X3, . . . , and the default output variable names
are Zl, Z2, Z3, .... If you wish to change any of these, select Enter Names. If
the output(s) depend only on the present state and not on the input values, select
Moore. The column headings will be in straight binary order unless you select
Enter Heading.
3. If you have selected Enter Names, the Input Variable Names dialog box will
appear. Change any names which you want to be different from the default values
and click OK. (You may advance from box to box by using the Tab key.)
4. If you have selected Enter Heading, the Enter Table Heading dialog box will
appear. Change any column headings which you want to be different from the
default values, then click OK.
5. At this point, an input window will appear. The header at the top of the window
has labels for the different sections of the table: "PS" for Present State. "NS" for
Next State, and "OUTPUTs". The next part of the header contains the binary
column headings followed by the names of the input variables. Note that the
input variable values in each column heading are listed vertically instead of
horizontally. The output variable names are listed in a footer at the bottom of the
table. The header and footer cannot be changed in the edit window.
Type in the table row by row. State names may be a single letter, a single
number, or any combination of two letters and numbers. Start each row with a
present state, followed by the next states for each column heading, followed by
output values for each column heading. Separate state names by one or more
spaces or a tab. If you use a tab as a separator, the columns will line up with the
12 Logic Aid User's Guide
headings; however, this is not necessary. The group of binary output values for
each column must not be separated by spaces, but successive groups of output
values must be separated by spaces or a tab. You may use the standard Windows
editing functions (Cut, Copy, Paste, etc.) as required. The following example
shows the input for a Mealy state table with two input variables, two output
variables, four NS (next state) columns, and four states:
PS NS
INPUT-VAR
0 0 1 1 0 0 1
OUTPUTS* 1 XI
0 1 1 0 Oil 0 X2
SO S3 S2 SO SI 00 10 01 11
51 SO SI S3 S2 10 10 11 11
S2 S3 SO SI SI 00 10 01 11
S3 S2 S2 SO SI 00 00 01 01
* Zl Z2
6. When you have finished typing in the rows of the state table, you may select
Check Syntax from the Input menu (or type ALT+I Y). If you have made any
syntax errors, a dialog box will appear which explains the type of error. Click
OK. and the cursor in the input window will indicate the approximate location of
the error. Edit the rows of the table to correct the error(s). When the table is
correct, it will be reformatted to line up with the column headings.
input formal for the state assignment. (The default is binary, but you may want to
change to binary.) Then click OK.
If you have selected Enter Names, the State Variable Names dialog box will
appear next Change any names which you want to be different from the default
values, then click OK.
If you selected Display or Change Current State Assignment, the default (or
current) value of the state assignment for each row will appear in the edit window
to the left of the state table. Use normal editing procedures to make any changes
in these assigned values. Use the Tab key to step to the next assigned value.
The following example shows the state table of Section 10 with an added state
assignment:
ASSIGN PS NS OUTPUTS* INPUT-VAR
0 0 1 1 0 0 1 1 XI
0 1 1 0 0 1 1 0 X2
00 so S3
S2 SO 00 10 01 11
01 SI SO S3 SI 10 10 11 11
11 S2 S3 SI
SO S2
SI 00 10 01 11
10 S3 so
S2 S2 SI 00 00 01 01
* Zl Z2 SI
5. When you have finished editing the state assignment, you may select Check
Syntax from the Input menu (or type ALT+I Y). If you have made any errors, a
dialog box will appear which explains the type of error. Click OK; the cursor in
the input window will indicate the approximate location of the error. Edit the
state assignments to correct the error(s).
1. Select Flip-Flop Equations from the Routine menu (or type Ctrl+F).
2. When the Flip-Flop Equations Options dialog box appears, select the desired type
of flip-flop. The current state assignment will be used unless you select the
Display Assignment Dialog Box option. (If you select this option, go back to
Section 10, step 2.)
3. When you select a type of flip-flop and click OK, a Simplification Options dialog
box will appear. This is the same dialog box described in Section 4, step 2, of this
manual.
4. When you have selected the desired options and clicked OK. the simplified flip-
flop and output equations will be derived and displayed in the output window. If
you wish to terminate the computation before it is finished, type Control-Period
(Ctrl+.) The computation will be aborted after a short time.
5. You can print both the input and output windows by selecting Print All from the
File menu. Select Print to print only the window on top. The output for the
above state table example, with the Display Input and Gate Costs option
selected, is as follows.
J(Q1) = X1'Q2' + XI 02
Input Cost = 6 Gate Cost = 3
14 Logic Aid User's Guide
K(Q1) = X2 Q2 + XI
Input Cost = 4 Gate Cost = 2
1. It is assumed that state table M2 is already stored as a LogicAid file. Enter the
state table for Ml using the procedure given in Section 10 above.
2. Select State Table Checker from the Routine menu (or type Ctrl+Shift+K).
3. When the standard file dialog box appears, select the file in which the state table
M2 is stored and open it. After the tables have been compared, the output
window either will show the message "Correct State Table", or will show the
shortest input sequence that will distinguish the reset states of Ml and M2. If this
input sequence is applied starting in the first row of Ml and the first row of M2,
the last outputs from Ml and M2 will differ. (For the incompletely specified case,
Ml may have a "don't care" output when M2 has a 0 or 1 output, but not vice
versa.)
You may use LogicAid to check your solutions to state table problems without
revealing the correct answers. Encoded solution files for the state table problems in
Fundamentals of Logic Design, 4th ed., are included on your LogicAid disk. You will
find it helpful to check your answers using LogicAid before you look at the correct
answer. This has two advantages over looking at the answers:
1. Your answer may be correct even if the number of states or the order of the states
is different from the answer in the solution book. If you use LogicAid you will
know for sure whether your answer is correct or not.
2. If your answer is not correct, LogicAid will give you the shortest sequence of
inputs for which your solution fails, without revealing the correct solution. In this
way you can try to find and correct your mistake before looking at the correct
answer.
Logic Aid User's Guide 15
~ Examplel.aid H
State
fire 1 1 Mealy Machine
•M 2
J£0J*. nunber of input variables :
Label \ 1-/11 number ot output variables:
01/ 00/10
Conn
Edit
-*- ll/Hl °° ■* — '
Moue
Del
10/0-
o'
~<l 00
/ 2 — '
r 0-/11
"■] iTa
5 Example2.aid - n\x
State
Moore Machine
T
Ore 01/
, 1 number of input
number of output
variables
variables:
: 2
2 1
Label 10
JS0/11
Conn | ^ •
Edit 00 Sl/06
L
, 1
Moue 11
S3/1-
Del 01
S2/01
1-
I"
±1
For both examples,0- note that each state is represented by a rectangle which
contains a state name. The connecting lines between states are called "arcs". Each arc is
terminated by an arrowhead, and each arc must have a label. In example 1, the arc which
starts at SO and ends at SI has the label "01/-1 ".
The steps required to enter a state graph are as follows :
1. Select State Graph from the Input menu (or type Ctrl+G).
16 Logic Aid User's Guide
2. When the Input State Graph Format dialog box appears, enter the number of input
variables and number of output variables if they are different from the default
values. The default input variable names are XI, X2, X3 ... and the default
output variable names are Zl, Z2, Z3 ... If you wish to change any of these, select
Enter Names. If the outputs depend only on the present state and not on the input
values, select Moore. The default state names are SO, SI, S2 ... If you want to use
them, select Use Default State Names.
3. If you have selected Enter Names, the Input Variable Names dialog box will
appear. Change any name which you want to be different from the default name
and click OK.
4. At this point, a graph window will appear. The graph window has a side menu
with 7 items at the left.
5. Always enter the reset (or starting) state first. To enter a new state, select State
from the side menu and click the input window at the point where you want the
state box. If you have selected to use the default state names, they will appear in
the box; otherwise, you must enter a state name. For the Mealy type, you cannot
enter the output values in the state box, but for the Moore type, you must enter the
output values. Use "/" to separate the state name and output values. When
finished, press the Enter key. If there is any syntax error in the state box, an alert
box will appear and give you an error message. Once you have finished entering a
state box, you must use Del to delete it (see step 11).
6. To connect two state boxes, SI and S2, select Arc from the side menu. Suppose
SI is the present state and S2 is the next state. Move the mouse over the edge of
the SI box until it is highlighted, click once, then move the mouse to the edge of
the S2 box until it is highlighted, then click on the box once. An arc will connect
SI and S2, and an arrowhead, will appear at the edge of the S2 box. Instead of a
straight line, an arc may consist of a broken line with two or more segments. To
enter this type of arc, click at the starting point, then click at each corner point,
and finally click at the end point. (If the end point of an arc is not close enough to
a state, that is if the box is not highlighted, clicking on it will not terminate the
arc. To terminate an arc at an area outside of a state box, you must double click at
the area. If this happens, either use the Move command to move the arrowhead to
the edge of a state box, or delete the arc and try again.)
7. After you enter an arc between two states, you can label it with input values.
Select Label from the side menu and click near the arc to which you want to
attach the label. Place the rectangular box close to the arc you want to label. If
you select the wrong arc, press Esc and place the box near the arc you would like
to label. After you select the correct arc, a cursor will appear at the location you
click. For a Moore graph, enter the input values and press the Enter key. For a
Mealy graph, enter the input values and output values separated by a "/", and then
press the Enter key. If there is a syntax error, an alert box will appear and give
you an error message.
8. If you wish to enter a comment, you can select Comm from the side menu and
click the input window. When the cursor appears, type anything you want and
press F12.
9. If you want to edit a state box, a label box or a comment, select Edit from the side
menu and click at the point you want to edit. After you finish, press Enter.
10. If you want to move a state box, a label box, a comment or an arc, select Move
from the side menu. Select the object which you want to move with the mouse
and hold down the mouse button as you drag the object to its new location. If you
want to move an arc, select the arrowhead at the end of the arc and drag it to its
new location. You can also select a corner point and drag it to a new location.
Logic Aid User's Guide 17
After moving an arc, you will probably have to move its label to an appropriate
location beside the arc.
11. If you want to delete a state box, a label box, a comment or an arc, select Del from
the side menu and click the object which you want to delete. LogicAid will
highlight the object in blue and ask you if want to delete it. Then click OK to
delete the object.
12. To change the reset (or starting) state, select Change Reset State from the Input
menu, and then click on the new reset state.
13. After you finish the state graph, you can select Convert to State Table from the
Input menu to convert the state graph to a state table. If there is a syntax error, an
alert box will appear. Otherwise, a dialog box will allow you to choose the type
of column headings for the state table. For a small number of input variables,
choose Use '0' and '1' and completely specified column headings will be
generated. Else, select Use '0', T and '-' and a column heading will be
generated for each unique input combination on one of the arc labels.
Using Alphanumeric Inputs
14. To use alphanumeric inputs for your state graph, choose State Graph from the
Input menu as usual. Then choose Alphanumeric Format as your Input
Format when the Input State Graph Format dialog box appears. The default input
variable names are XI, X2, X3 ... and the default output variable names are Zl,
Z2, Z3 ... If you wish to change any of these, select Enter Names. Then choose
your options from the dialog box as you would for a regular state graph.
15. Draw the state graph as usual, except when you label the arcs, use the variable
names you selected instead of '1' and '0'. The following is an example of a state
graph with alphanumeric inputs.
Alphanumeric_E xample. aid
K'M'/Sh MB
State
Arc State Graph with
fllphanuneric Inputs
Label
Input Uariables:
St K M
Conn
M/Hd Output Uariables
Edit Sh Ad Load Done
Moue
Del
A
Multiple Labels on an Arc
16. You can place two or more labels on an arc by separating the labels by commas.
Binary example: 00/10,10/11
Alphanumeric Example: X1'X27Z1,X1 X27Z1 Z2
solution saved on the disk to see if they are functionally consistent. The method used to
compare them is similar to the method used for Checking State Tables (see Section 14).
However, when a partial state graph is checked, LogicAid ignores the missing data and
compares the partial input data against the solution table. Isolated states which are not
reachable from the starting state will not be checked.
1. Enter part of a state graph using the procedure given in Section 15. You must
enter the starting (reset) state first.
2. Select Partial Graph Checker from the Routine menu (or type ALT+R G).
3. When the standard file dialog box appears, select the file in which the state table
solution file is stored and open it. After comparison, the output window either
will show the message "Partial state graph is consistent with the correct solution",
or will show the shortest input sequence that will distinguish the reset states of the
partial graph and solution table. If this input sequence is applied starting in the
first state box of the partial graph and the first row of the solution table, the last
outputs will be different.
4. If you want to check the partial graph again, you don't need to select the solution
file any more. LogicAid will use the old solution file directly and won't show you
the standard file dialog box. If you really want to change the solution file, you
have to select Select New Solution File from the Routine menu and a standard
file dialog box will appear. You can then select a new solution file.
The following example illustrates use of the partial graph checker. We will
construct a state graph for the following problem:1
A clocked Mealy sequential network with one input (X) and one output (Z) is to
be designed. The output is to be 0, unless the input is 0 following a sequence of exactly
two 0 inputs followed by a 1 input.
The correct state table has already been stored on your disk in a file named 14-1 in
the PROBS-14 folder. The table is stored in encoded form so you can use it to check
your solution even though you cannot read the file directly.
After choosing Partial Graph Checker on the Routine menu and selecting
solution file 14-1, we get the following message in the output window:
***** Incorrect State Graph *****
The shortest input sequence for failure is:
X= 0 0 1 0 1 0
If we trace this on the above state graph, we get the output sequence Z = 0 0 0 10 1,
which is wrong in the last digit. After correcting the partial state graph, we get
Roth, Charles H., Fundamentals of Logic Design, 4th ed., PWS Publishing, 1995, pp. 375-377.
Logic Aid User's Guide 19
0/1
0/0 1/0
JJ SI to <J9 S3
0/0
Running the Partial Graph Checker again gives the output message:
**Partial state graph is consistent with correct solution.**
After attempting to add a state which corresponds to "3 or more O's received",
suppose that we construct the following graph:
0/1
Running the Partial Graph Checker indicates that the shortest input sequence for
failure is:
X = 0 0 0 0 1 0. Tracing the sequence on the above state graph gives Z = 0 0 0 0 0
1 , which is wrong in the last digit. After correcting the partial graph, we get
0/1
1/0
When the Partial Graph Checker tells us that this graph is consistent with the
correct solution, we can choose Convert Graph to Table on the Input menu and then
verify that the table is correct using the State Table Checker on the Routine menu.
20 LogicAid User's Guide
Use a PAL Programmer with a serial port to program your PAL. To download a Jedec
file to the programmer, proceed as follows:
a. Make sure that all the IC sockets on the PAL Programmer are empty. Then turn
on the programmer.
b. Select the CE 22V10 programmable logic device from the programmer.
c. Set the programmer ready to receive data.
d. Run LogicAid. To retrieve your saved Jedec file, select Open Text on the File
menu. Then select Jedec and hit OK. Select the file in the file dialog and click
Open.
e. Select the Download Jedec File (CTRL+D) option from the Routine menu.
This starts off the communication software between the computer and the
programmer. When the dialog appears select the appropriate communication port,
baud rate, parity and data bits. Click OK.
Logic Aid User's Guide 21
The programmer should receive the data. When the transmission is complete, the
Jedec file has been downloaded to the programmer.
Then insert the PAL in the programmer socket and complete the programming.
g-
18. Entering SM Charts
You can use LogicAid to input a SM chart and convert it to a PLA table. After
you get a PLA table, you may choose Simplification on the Routine menu (see Section
4), which will give you the reduced equations for the PLA table.
The following example shows the input window for a SM Chart with 2 input
variables and 3 output variables.
_ DlX
1 SM_Chart_Example.aid
— »»SC
State
Cond SM Chart
Out a
4 TM. m sz
2 input variables
3 output variables
Arc "
B )/
"
Howe 1 /
L S" '
Del
iL J
Each state is represented by a rectangle that contains —a state name. Each hexagon
indicates a condition input and each rounded rectangle LP indicates an output. The
connecting lines between boxes are called "arcs". Each arc is terminated by an
arrowhead, and each arc leaving a condition must have a label of either a "0" or "1". In
the above example, the arc which starts at input XI and ends at SO has the label "0".
The steps required to enter a SM Chart are as follows :
state names, they will appear in the box; otherwise, you must enter a state name
followed by "/." If no output value is associated with the state, leave the part
after the "/" empty. When finished, press the Enter key. If there is any syntax
error in the state box, an alert box will appear and give you an error message.
Once you have finished entering a state box, you must use Del to delete it (see
step 11). Similarly for entering conditions and outputs, select Cond or Out from
the side menu and click the input window at the point where you want the
condition or output box.
6. To connect two boxes, select Arc from the side menu. Click on the edge of the
first box when it is highlighted, then click on the edge of the second box when it
is highlighted. To enter an arc that has two or more line segments, click on the
starting point, click on each corner point, and then click on the ending point. (If
the end point of an arc is not close enough to a box, that is if the box is not
highlighted, clicking on it will not terminate the arc. To terminate an arc at a
point outside of a state box, you must double click at the point. If this happens,
either use the Move command to move the arrowhead to the edge of a state box,
or delete the arc and try again.)
7. After you enter an arc between a condition box and a state or output box, you can
label it with input values. Select Label from the side menu and click near the arc
to which you want to attach the label. Place the rectangular box close to the arc
you want to label. After you select an arc, the arc will be labeled with either a "0"
or "1". The first arc you click on leaving a condition will be automatically labeled
with a "0". When you click on the other arc leaving that same condition box, it
will be labeled with a'T".
8. To enter a comment, select Comm from the side menu and click the input
window. When the cursor appears, type anything you want and press F12.
9. To edit a state box, a condition box, an output box, or a comment, select Edit
from the side menu and click at the point you want to edit. After you finish, press
Enter. To edit the labels, chose Edit from the side menu and click on the label
you wish to change. The two arcs leaving from that condition will automatically
swap labels.
and vice versa. This means the arc originally labeled "0" will now be labeled "1"
10. To move a state box, a condition box, an output box, a label box, a comment or an
arc, select Move from the side menu. Select the object that you want to move
with the mouse and hold down the mouse button as you drag the object to its new
location. To move an arc, select the arrowhead at the end of the arc and drag it to
its new location. You can also select a corner point and drag it to a new location.
After moving an arc, you will probably have to move its label to an appropriate
location beside the arc.
11. To delete a state box, a condition box, an output box, a label box, a comment or
an arc, select Del from the side menu and click the object that you want to delete.
LogicAid will highlight the object in blue and ask you if want to delete it. Then
click OK to delete the object.
12. After you finish inputting the SM Chart, you can select Convert to PL A Table
from the Input menu to convert the SM chart to a PLA table. If there is a syntax
error, an alert box will appear. Otherwise, a new window opens with the
generated PLA table.
LogicAid User's Guide 23
PS NS OUTPUTS* INPUT-UflRs
0 1 0 1 X
fl B C 0 0
B D E 0 0
C F G 0 0
D H 1 0 0
E J K 0 0
F L N 0 0
G N P 0 0
H fl R 0 0
1 R n 0 0
J R R 0 1
K R fl 0 0
L R fl 0 1
M R fl 0 0
N R fl 0 0
P* z R fl 0 0
Next, wc select State Reduction on the Routine menu (or type Alt-R R) and
choose the Display Reduced Table in Edit Window option. This reduces the table to a
minimum number of rows and replaces the original table with the reduced table:
PS NS OUTPUTS* INPUT-UARs
0 1 0 1 X
fl B C 0 0
B D E 0 0
C ED 0 0
D H H 0 0
E J H 0 0
H fl fl 0 0
J
* Z fl fl 0 1
24 Logic Aid User's Guide
Next we must assign flip-flop states to correspond to each of the states in the
table. The state assignment guidelines given in Fundamentals of Logic Design indicate
that state pairs BC, DE and JH should be given adjacent assignments. Two of the many
assignments which satisfy these adjacencies are:
Q2Q3\
Q2QS\ v Q1
0 1 0 1
00 A 00 A
01 B H 01 B C
11 C J 11 D E
10 D E 10 H J
For the first of these state assignments, A = 000, B = 001,C = 011,D = 010, E =
1 10, H = 101 and J = 111. To input this assignment, we select the State Assignment on
the Routine menu and then choose the Display or Change Current Assignment and
Binary options. When the original straight binary assignment is displayed, we edit this
assignment to correspond to the first assignment map. The resulting table is
0 1 0 1
000 fl B C 0 0
001 B D E 0 0
011 c E 0 0 0
010 D H H 0 0
110 E J H 0 0
101 H fl fl 0 0
* Z 111 J fl fl 0 1
Then we select the Flip-Flop Equations on the Routine menu and choose the J-
K Flip-Flop option. After we choose Petrick in the Simplification Options dialog box,
the following equations are displayed in the output window:
J(QD =
X Q2'Q3 + X'Q2 + Q2 Q3'
K(Q1) =
J(Q2) =
Q1'Q3 +
J(Q2) = Q3
Q1'Q3 +
K(Q2) = X Ql'
Q1'Q3'+ Ql Q3
Q3' + X Q3'
K(Q2) = QlX Q3 + X Ql
J(Q3) = Q1'Q3'+
1
K(Q3) = 1
Z = X Ql Q2
If we use common gates where possible, the "cost" of realizing these equations is
11 gates with a total of 27 Q3
gate inputs. We can try other state assignments to see if we
can find a better solution. Using the second assignment map given on the previous page,
we again select the State Assignment on the Routine menu, edit the state assignment,
LogicAid User's Guide 25
and then select the Flip-Flop Equation on the Routine menu. The resulting equations
are:
J<Q1> 3
K<QO =
X Q2'
J<Q2> = X + Q3'
K<Q2> = Q3
J<Q3> =
K<Q3> =
Q2
= Q3' Q3'
These equations ZrequireX Q1
only 3 gates and a total of 7 gate inputs, which is a substantial
Q2"
improvement over the previous solution.
After choosing Simplification on the Routine menu, and either the PI Chart or
Petrick option, we obtain the following reduced equations for the Dice Game Controller:
D<Q1> = Ql Rb + Ql Q3' • Ql D7'Eq' + Q1'Q2'Q3 Rb' D7' Dll' D2312'
D<Q2> = Q2'Q3 Rb'D7 * Ql Q3 Rb' Eq + Q1'Q2'Q3 Rb' Dll * Q2 Reset' +
Q1'Q2'Q3 Rb'D7'Dll'D2312
D<Q3> = Q2 Q3 Reset' + Q2'Rb + Ql Q3 D7 Eq' + Q1'Q2'Q3 Rb' D7' Dll' D2312
Win = Q2 Q3'
Lose = Q2 Q3
Roll = Q2'Q3 Rb
Sp = Q1'Q2'Q3 Rb'D7'Dll'D2312'
These equations could easily be implemented using a programmable logic device such as
a 22 V 10.
2 Roth. Charles H., Fundamentals of Logic Design. 4th ed., PWS Publishing. 1995. pp.575-579, 581-583.
26 LogicAid User's Guide
S0/
<m>
ipir
SI/
fRolll
<Rb^-^^^<Mr>^<D2312>
0000 0000000
0001 0010000
0010-1 0100000
0010-01 — 0100000
0010-001- 0110000
0010-000- 1000001
0011 0010010
010-0 0101000
010-1 0001000
011-1 0000100
011-0 0110100
1000 1000000
1001 1010000
1011 1010010
1010 1 0100000
1010-1 — 0 0110000
1010-0 — 0 1000000
Fig. 19.1. SM chart and PLA table for dice game controller.
Reset/Win
Reset' /Lose
Reset' /Win
Rb'Eq/0 Rb' Eq' D7/0
Next, we select Convert to State Table on the Input menu and choose the 0,1,-
option. Then we select State Assignment and edit the state assignment. The resulting
state table is
PS NS
RSS 1 GN
1 0 0 0 0 0 0 0 0
1 0
0 0 1 0 0 1 — ~
— 0 0 1
1 0
- - - - 1 0 0 -
000 so S1 so
001 S1 S1 - S3 S4 S2 S2 - - -
100 S4 S5 S4
101 S5 S5 - - - - - S2 S4 S3 -
010 S2 Sp SO S2
011 S3 SO S3
Eq
* Win Lose Rol I
OUTPUTS* I NPUT-URRs
Rb
1 0 0 0 0 0 0 0 0
1 0 Reset
- - 0 0 1 0 - 0 1 - D7
- - D 0 - 1 - - - - D11
- - 1 0 - - - - - - D2
- — — — — - 1 0 0 —
0000 0000
0010 Uuuu Uuu i Uuuu Uuuu
0000 0000 1000
0010 0000 0000
1000
0100
0000
28 Logic Aid User's Guide
Next, we select Simplification and derive the flip-flop and output equations using
PI Chart or Petrick. The resulting equations are the same as obtained by the PLA table
method above.
1. Derive the reduced flow table. Make a state assignment in the usual way and
modify the table as required to eliminate critical races.
4. Select the Flip-Flop Equations routine and choose D - Delay Flip-Flop. Select
the Display All Prime Implicants option. The D flip-flop equations are the next-
state equations.
When S-R flip-flops are used in the asynchronous design, follow the above steps,
except select S-R flip-flop in step 4.
29
y m e£ V
st Window, aid
Light blue
B Second Window aid
Third Window.aid *?
Purple Variable Names: XI
Yellow
Lil
For Help, press F1 NUM
Ctrl+0
t *?
Ctrl+S
Print...
Ctrl+P
Print Preview
Print Setup...
1 ExampleZaid
2Example1.aid
3 MealyDicegame.aid
4SMdicegame.aid
Exit
The File menu is very similar to the File menus of other Windows applications.
Its commands allow the user to create, open, close, save, and print documents.
This command brings up the New dialog box, shown in Figure 2. 1 , for selecting
one of eight input types: terms, equations, truth table, PLA table, state table, state graph,
SM chart and Karnaugh map. A selection from this dialog box is equivalent to selecting
any of the Terms, Equations, Truth Table, PLA Table, State Table, State Graph,
SM Chart and Karnaugh Map commands from the Input menu. After OK has been
clicked in this dialog box, the program calls the selected routine just as though the
equivalent command was selected from the Input menu.
New
OK
Help
Cancel
Equations
Truth Table
PLA Table
State Table
State Graph
SM Chart
KMAP
Another dialog box is displayed in order to specify the new parameters needed to
create a new input document. After OK has been clicked in this second dialog box, the
program creates a new edit or graph window with the input document name at the top. At
this point, the user is allowed to enter data into the new window. For more specific
information on creating a new input document, refer to Sections 4. 1 to 4.6.
This command brings up the Open dialog box which allows the user to select an
existing LogicAid file on a disk and open it for editing or other processing. This dialog
box allows the user to select a regular LogicAid file from any accessible drive.
If a file contains a protected state table, a password dialog box (Figure 2.2) will be
displayed and the user must enter the password to open the file. Note that the password is
case-sensitive. If the user enters an invalid password, an alert box will appear and the
user can either select cancel or reenter a password. If a file is a text file created by a text
editor, the user must select the Open Text command to convert it to a LogicAid file (see
Section 2.3).
E nter Passworc
* 1 !
OK Cancel
1
Figure 2.2. Password dialog box
D3.
| The Edit Menu
1:"
File LogicAid III - PLA_Table2
1 input floutine View Window Help
Undo Ctfl+Z
m m t
Cut Ctrl+X
Copy Ctrl+C
The Input menu is used for creating new input documents, changing input-related
parameters, and checking the current input data's syntax. When three edit windows are
open, the Terms, Equations, Truth Table, State Table, State Graph, SM Chart and
Karnaugh Map commands are deactivated. The Convert to State Table command is
shown only if a state graph window is open. The Convert to PLA Table is shown only
if a state table window is open. Change Parameters is shown only if an input window is
open.
4.1. Terms (Alt+I R or Ctrl+R)
Function: Enters Boolean function(s) as minterm or maxterm expansions.
This command brings up a dialog box for specifying the input parameters. A
blank edit window will be created for input terms after OK is clicked in this dialog box.
This Input Terms Format dialog box is shown in Figure 4. 1 , and its contents are described
in the following subsections. The user may later change the parameters of this dialog box
by selecting the Change Parameters command, which will redisplay the dialog box for
modification.
TEXT BOXES:
There are two text boxes in this dialog box. The Tab key may be used to move
from one text box to the other. The input numbers must consist of valid decimal digits.
The Number of Variables text box specifies the number of variables in the
Boolean functions. Its limitations are listed below:
Default 4
Minimum 1
Maximum 32
LogicAid Reference Manual 35
The Number of Functions text box specifies the number of Boolean functions. Its
limitations are listed:
Default 1
Minimum 1
Maximum
32
INPUT TERMS FORMAT
Number of Variables [4
OK
Input Format
(* Dec <~ Hexadecimal
C Binary (0,1,-1) C Octal
As shown by Figure 4.1, function and variable names may be specified with one
of three options. These are Use Default Names, Enter Names, and Use Current Names.
If the Use Default Names option is selected, the program will initialize the
necessary variable and function names. The default variable names are XI, X2, X3, ....
Similarly the default function names are Zl, Z2, Z3, ....
If the Enter Names option is selected and OK is clicked in the dialog box, the
program will bring up a second dialog box for entering names, as shown in Figure 4.2.
Before this Input Variable Names dialog box is discussed, the Use Current Names
option will be described.
The Use Current Names option may be selected if the same non-default names
are to be used and the user does not wish to have the Input Variable Names dialog box
displayed.
As shown in Figure 4.2, the Input Variable Names dialog box has a text box
available for each variable and function name. In this particular case, there are six text
boxes for the four variable names and the two function names.
36 LogicAid Reference Manual
ball cat
[apple
■Select Range-
r Cancel
OK
When this dialog box is shown for the first time, the text boxes will display the
default names. The user may therefore
rs' edit any or all of the available text boxes. If the
Input Variable Names dialog box is displayed again through the Change Parameters
command, the current names, rather than the default names, are displayed in the text
boxes.
After OK has been clicked in the Input Variable Names dialog box, the changes
to the names are not stored until all of the names are syntactically correct. If there are
duplicate names when the dialog box is displayed, cancellation of the dialog box may
result in using the default names for each name group. For example, if the variable
names are X3 and X2 and the user changes the number of variables from two to four, the
current names are X3, X2, X3, and X4 when the dialog box is displayed. Note that the
first and third names are both X3. If this dialog box is cancelled, the program will alert
the user that cancellation would result in using the default variable names. The user is
then given an opportunity to void the cancellation and re-enter the variable names.
INPUT FORMAT:
Logic Aid Reference Manual 37
The product terms may be specified with one of the following input formats:
Decimal, Binary, Hexadecimal, and Octal. The legal characters for the input formats are
shown in the following listing:
If the input file contains more than one function, all functions must use the same
input format. Separate input files must be used if different input formats are desired.
SYNTAX
The syntax checker for the Terms input routine is rather flexible, but the user
must observe some rules. The following key symbols and hints are necessary to
understand the syntax rules to be discussed later.
Key Definition
1 -terms product terms for which the function is equal to 1
0-terms product terms for which the function is equal to 0
X-terms product terms for which the function is unspecified
termset 1 -terms, 0-terms, or X-terms
comma (,) separate two termsets
period (.) terminate each function
comments delimited by a pair of brackets "{" and "}"
separators combination of one or more Space, Tab, and Enter keys
The 1 -terms, 0-terms, and X-terms are defined as a collection of one or more
product terms. Each function may consist of one or more of these termsets. Since not
every combination of these termsets is allowed as input, the correct combinations of the
termsets in a function are listed below. In addition, since not all the terms of a function
must be in the input file, the program will treat the remaining terms as the termset given
in the parentheses.
Function Format Remainin
1 -terms. (0-terms)
1 -terms,. (0-terms)
1 -terms,,. (0-terms)
, 0-terms. (1 -terms)
,0-terms,. (1 -terms)
1 -terms, 0-terms. (X-terms)
1 -terms, 0-terms,. (X-terms)
1 -terms,, X-terms. (0-terms)
,0-terms, X-terms. (1 -terms)
1 -terms, 0-terms, X-terms. (none)
00 1 0 0 0 00 1 0 0 0
1 1 1 1 01 1 1 X 0
01
11 0 0 1 0 11 0 1 1 1
10 0 0 1 0 10 X 0 X X
fl f2
Figure 4.3. Karnaugh maps for the Terms and Equations examples.
The following example will clarify the syntax rules. For the Karnaugh maps
shown in Figure 4.3, the dialog box parameters and selections, shown in Figures 4.1 and
4.2, are listed as follows:
Number of variables: 4
Number of functions: 2
12}
Variable names: apple ball cat dog
Function names: fl £2
Input format: Decimal
Each function may be written in various ways according to the rules given above
and as shown below:
{fl} 0 159 13 14 15. {0-terms: 2 3 4 6 7 8 10 11
{fl} 0 159 13 14 15,. {same as above}
{fl} 0 159 13 14 15,,. {same as above}
{fl} ,2 3 46 7 8 10 1112. {l-terms:0 1 5 9 13 14 15}
{fl} ,2 3 46 7 8 10 1112,. {same as above}
{f2} 01571115,34689 12. {X-terms:2 10 13 14}
{f2} 0 157 1115,3 46 8 9 12,. {X-terms:2 10 13 14}
{f2} 0 157 11 15„ 2 10 13 14. {0-terms: 3 46 8 9 12}
{£2} ,3 46 8 9 12,2 10 13 14. {l-terms:0 1 5 7 11 15}
{f2} 0 157 1115,3 46 8 9 12,2 10 13 14. {no other term}
Logic Aid Reference Manual 39
Number of Variables [4 OK
- Equation Format
<• Sum-of -Products Form
C Product-of-Sums Form
SYNTAX:
In the following discussion, a separator is a Space, Tab or Enter. A comment is
any text delimited by a pair of brackets. Each equation must be terminated by a period.
Each sum-of-products equation consists of a sum of one or more product terms
and has the following form:
functionname = terml + term2 + . . . + termN.
Comments and separators may be placed before and after the functionname, and before
and after each term. Each variable in a product term must be followed by a separator or a
prime. Separators before and after the prime are optional.
Each product-of-sums equation consists of a product of one or more sum terms
and has the following form:
functionname = (sumterml) (sumterm2) . . . (sumtermN).
As indicated, every sum term must be enclosed in parentheses. Since the literals in each
sum term are separated by + signs, no additional separators are required. However,
extra separators may be placed anywhere in the equation (except, of course, within a
variable name). Comments may be placed anywhere except within a term.
EXAMPLES:
The following examples will clarify the syntax rules. For the Karnaugh maps
shown in Figure 4.3, the Input Equations Format dialog parameters and selections, shown
in Figure 4.4, are listed below:
Number of variables: 4
Number of functions: 2
Function names: fl f2
Variable names: apple ball cat dog
Equation format: See below
If the equation format is sum-of-products, the input file may appear as follows:
{Equation # 1}
fl = apple' ball' cat ' {term#l}
+ cat ' dog {term #2}
+ apple ball cat {term #3}
{period to terminate equation}
{Equation #2}
f2 = apple'ball'cat'+ball dog+apple cat dog.
If the equation format is product-of-sums, the input file may appear as follows:
{Equation #1}
fl = ( ball + cat' ) (apple + cat ') {terms #1 and #2}
( apple'+cat+dog) {term #3}
(ball'+cat+dog) {term #4}
{period to terminate equation}
{Equation #2}
f2=(apple'+cat)(ball'+dog)(apple+ball+caf).
4.3. Truth Table (Alt+I T or Ctrl+T)
Function: Enters Boolean function(s) with a truth table.
Logic Aid Reference Manual 41
This command brings up a dialog box for specifying the truth-table parameters
and selections. A blank edit window will be created for the input truth table after OK has
been clicked in this dialog box. Parts of this dialog box are identical to the Input Terms
Format dialog box. For information on the Variable and Function Names buttons, refer
to Section 4. 1 . The other parts of the dialog box are described in Figure 4.5.
INPUT TRUTH TABLE FORMAT
Number of Variables OK
Key Definition
input term input combination typed with the input format
output termoutput combination typed with the output format
comment s delimited by a pair of brackets "{" and "}"
separators combination of one or more Space, Tab, and Enter keys
Each row of the truth table must have an input term and an output term separated
by separators and/or comments. A more detailed explanation is given below:
For the truth table given in Figure 4.6, the dialog box parameters and selections
are as shown in Figure 4.5 and are listed below:
Number of variables: 3
Number of functions: 3
Variable & function names: Default
Input format: Described below
Output format: Described below
Output value for remaining rows: X-Terms
LogicAid Reference Manual 43
The first example uses the default Straight Binary Order input format and the Binary
output format. The program first displays a header with the input and output variable
names, and then it displays the 000 input term.
Input variables: XI X2 X3
Output functions: Zl Z2 Z3
000 {Displayed by program} 100 {typed and Enter pressed}
001 {Displayed by program} 010 {typed and Enter pressed}
010 {Displayed by program} 001 {typed and Enter pressed}
011 {Displayed by program} 001 {typed and Enter pressed}
100 {Displayed by program} 011 {typed and F12 pressed}
Input variables: XI X2 X3
Output functions: Zl Z2 Z3
000 4
001 2
1 {combined rows 010 and 011}
100 3 {end of input — other rows are X-terms}
01-
The user may select Check Syntax, Change Parameters, or Simplification at any time
during the input.
SYNTAX:
The syntax for entering a PLA table is the same as for entering truth tables. Refer
to Section 4.3 for more information.
EXAMPLE:
For the PLA table given above, the dialog box parameters and selections are listed below:
Number of variables: 4
Number of functions: 3
Variable & function names: Enter Names
- Machine Type: — —
(* Mealy Machine C Moore Machine
- Column Headings: — — ■ — —
<•" Use Default Straight Binary Order
C Enter Heading r Use Current Heading
The Number of Next State Columns text box specifies the number of columns of
next states in the state table. For a Mealy machine, it also specifies the number of output
columns in the state table. Its limitations are listed below:
Default 2
Minimum 1
Maximum the lesser of 32 or (256 * the number of output variables)
The Number of Input Variables text box specifies the number of input variables
for the state table. Its limitations are listed below:
Default 1
Minimum the smallest integer > Log2(Number of Next State
Columns)
Maximum 32
The Number of Output Variables text box specifies the number of output variables
for the state table. Its limitations are:
Default 1
Minimum 0
Maximum the lesser of 32 or (256 ■*■ the number of next state columns)
The Length of State Names text box specifies the maximum number of characters
in each state name for the state table. Its limitations are:
Default 2
Minimum 1
Maximum 5
Although there is no text box for entering the number of rows, LogicAid will
accept a maximum of 255 rows and a minimum of 1 row. If the State Table Checker
command is to be selected later, each state table is limited to 8 columns, 16 input
variables, 16 output variables, and 32 rows. Refer to Section 5.5 for more information on
the checker routine.
characters in the binary (0, 1, -) format. See Section 4.1 for more discussion on the way
the Heading dialog box is set up.
A WORD ABOUT THE AUTO-FORMATTER:
By default, each state table will be automatically formatted when its syntax is
checked. The program will automatically display a header and footer which cannot be
edited by the user. The user must select the Change Parameters command to modify the
state-table parameters and options. Each selection of the Change Parameters command
will cause an automatic update of the header in the window. In addition, the program sets
up tab positions to help the user enter the state table. With this, the user may tab from
column to column without having to insert separators.
SYNTAX:
The state-table input syntax is also straightforward. The following key symbols
and hints are helpful in understanding the syntax rules listed below.
Key Definition
PS present-state name
NS next-state name
output an output value
separators combination of one or more Space, Tab, and Enter keys
comments delimited by a pair of brackets " {" and " }"
Each PS and NS name must have a maximum of 1 to 5 alphanumeric characters,
as specified in the Length of State Names text box. In the case of an unspecified next
state,
PS either "-" or " — " may be used as names. Note that a hyphen is not a valid part of a
name.
Each output value must be specified in the binary (0, 1 , -) format with the length
of the binary string equal to the number of output variables. Also, the number of output
columns per row is dependent upon the machine type selected.
Following is a list of syntax rules for the state-table input:
1. Each row must start with a PS name with optional leading separators.
2. Each PS is followed by separators and pairs of NS's and separators.
3. The number of NS-and-separator pairs must equal the number of next state
columns.
4. Next comes the output columns.
5. A Moore machine has only one output column.
6. A Mealy machine has a number of output columns equal to the number of next
state columns.
7. There must be separators between the output columns.
8. Comments are allowed after the last output column of each row.
9. Each table must have at least 1 row and at most 255 rows.
LogicAid Reference Manual 47
Example:
Next State Outputs
Present (Zl Z2Z3)
State 00 11
X1X2= 00 11
SO
SI S2
-- SI
S2
S2 000 11-
001
110 -00
in
SO --
Figure 4.8. State table example.
For the state table in Figure 4.8, the input parameters of the state table are those
listed below.
Number of columns: 2
Number of input variables: 2
Number of output variables: 3
Length of state names: 2
Variable names: Mealy
Default
Machine type:
Column headings: entered as 00, 1 1
PS NS OUTPUTS* Input-Var
0 1 0 1 XI
0 1 0 1 X2
SO S2 000 {row 1 }
SO —SI 001
SI {row 2}
S2 — 110 111 {row 3}
S2
*Z1 Z2 Z3 11-
48 LogicAid Reference Manual
OK
Number of Input Variables:
Number of Output Variables: Pj ranrej
-Input Format:
(• Binary Format (0,1.-)
f* Alphanumeric Format
-Machine Type:
TEXT BOXES:
There are two text boxes in this dialog box. The Tab key may be used to move
from one text box to another. Each input number must consist of valid decimal digits.
The Number of Input Variables text box specifies the number of input variables
for the state graph. Its limitations are listed below :
Default 1
Minimum 1
Maximum 24
The Number of Output Variables text box specifies the number of output variables
for the state graph. Its limitations are :
Default 1
Minimum 1
Maximum 24
State
To enter states, first click on State. Then move the cursor to the
starting location (upper left-hand corner) of a state box and click. When the state
box is displayed, type in the state text and hit Enter.
Arc
To enter the arcs which connect the states, first click on Arc. Then
click on the edge of a state box at the starting point of an arc. Move the cursor to
a corner point of the arc and click. Repeat for each corner point, and then double
click at the end point of an arc on the edge of a state box.
Label
3. To enter arc labels, first click on Label. Then click near one of the
arcs at the starting point of a label. LogicAid will then highlight an arc near the
click location. If the highlighted arc is the correct arc, type in the label text
followed by Enter. If the highlighted arc is the wrong one, type control-Z to
cancel this arc, and LogicAid will highlight another nearby arc. Continue in this
manner until the correct arc is highlighted.
50 Logic A id Reference Manual
Edit
To edit the text in a state box, label or comment, first click on Edit.
Then click on the text which you want to edit. When the text cursor appears, edit
the text and then hit Enter (F12 for comments).
Move
To move a box, label, or comment in the state graph, first click on
Move. When the cross-cursor is displayed, place it within the object you want to
move then drag the object to its new location. You can also move the end-point
or a corner point of an arc, but you cannot move the starting point.
Del
To delete an object in the state graph window, click on Del. Then
click on the object you want to delete. When the alert box appears, click OK to
confirm deletion or cancel.
EXAMPLES: (1)
1-/11
00/10
01/-
After we select Convert to State Table from the Input Menu, we get the state table
showed in Figure 4. 1 1 :
Logic Aid Reference Manual 5 1
PS NS INPUT-UARs
OUTPUTS*
0 0 1 1 0 0 1 1 X1
0 1 0 1 0 1 0 1 X2
so -
S1
- S2 -- -1 -- 01
S1 S2 S2 S2 -S2 00 00 00 00
—
S2 S3 S3 S1
S3 S3 — SO SO 11 11 o- 11
10 — 11
* Z1
Z2
(2)
ji
01/ 10
)4 JS0/11
00 1 I
S1/0S S3
I i ,
11
01
S2/01 * '1-
After we select Convert to State Table from the Input Menu, a 'conversion
option' dialog box will open. If '0' and T is selected, we get the state table listed on
Figure 4.13:
52 LogicAid Reference Manual
PS NS OUTPUTS* INPUT-UARs
0 0 1 1
0 1 0 1 X1
X2
SO 11
S1 -
S2 SO
S2
S2 - 00
01
S1
- S1 S1
S2 S3 -
S3 S1 - S1 S1
* Z1 Z2
(3) N'/0
1-
M'N/Sh
M N/fld
M'KVSh
Sh
t ? KV
if
M/Ad
- Label Format:
P Binary (0.1)
f Alphanumeric (T,F)
state name or, if there is a Moore output, a state name followed by a 7' and a list
of output variables that are 1 in the state.
Cond
To enter a condition box, first click on Cond. Then click at the starting
location, type in a single input variable or its complement, and hit Enter.
To enter an output box, first click on Out. Then click at the starting
location, type in the output variables that are 1, and hit Enter. All other output
variables are assumed to be 0 for that box. For example, the output expression
Zl Z3 means that Zl = Z3 = 1 and Z2 = 0.
4. To enter the arcs which connect states, condition boxes, and output
boxes, first click on Arc. Then click on the edge of a box at the starting point of
an arc. Move the cursor to a corner point of the arc and click. Repeat for each
corner point, and then click at the end point of an arc on the edge of a box. Each
state or output box can have only one exit arc.
I To enter arc labels, first click on Label. The two arcs that exit a
conditon box can only be labeled 0 or 1 (T or F in alphanumeric mode). First
click near the arc you want to label with a 0 (or F), and then click near to other arc
to label it 1 (or T).
Conm
To enter comments, first click on Comm. Then click at the starting
location of a comment, then type in the comment text followed by F12.
Edit
To edit the text in a box, label or comment, first click on Edit. Then
click on the text which you want to edit. When the text cursor appears, edit the
text and hit Enter (F 12. for comments).
Moue
To move a box, label, or comment in the state graph, first click on
Move. When the cross-cursor is displayed, place it within the object you want to
move; then drag the object to its new location. You can also move the end-point
or a corner point of an arc, but you cannot move the starting point.
Del
To delete an object in the state graph window, click on Del. Then
click on the object you want to delete. When the alert box appears, click OK to
confirm deletion or cancel.
LogicA id Reference Manual 55
EXAMPLE:
For the SM chart example in Figure 4.17, the parameters are listed below:
After we select Convert to PLA Table from the Input Menu, we get the following
PLA table:
Form of 5-VarMap:
(* Diagonal
C Mirror Imaged
NUMBER OF VARIABLES:
The Number of Variables specifies the number of input variables. Its limitations
are listed below:
Default 4
Minimum 3
Maximum 5
1 Plot l's
To enter l's in the map, first click on this button. Then click on each
square in which you want a 1 , or drag the mouse across a group of several squares
in
the which
1. you want l's. Selecting a square which already contains a 1 will erase
2. Plot 0's
To enter 0's in the map, first click on this button. Then click on each
square in which you want a 0, or drag the mouse across a group of several squares
in which you want 0's. Selecting a square which already contains a 0 will erase
theO.
Plot X's
To enter X's (don't cares) in the map, first click on this button. Then click
on each square in which you want an X, or drag the mouse across a group of
several
erase thesquares
X. in which you want X's. Selecting a square with an X in it will
oop I To enter loops in the map, first click on this button. Then select squares
which you want to loop by clicking on the squares or by dragging across a group
of squares. Each selected square will be highlighted. (To deselect a square, click
on it again.) When you have selected a group of 2, 4, 8 or 16 squares which you
want to loop, hit Enter. If the selected squares form a valid implicant, the loop is
drawn; otherwise, an error message is displayed.
5. Fill 0's
To fill all blank squares with 0's, click on this button.
Fill l's
To fill all blank squares with l's, click on this button.
I Click on this button to clear something from the Karnaugh map window.
When the dialog box appears, select Clear Loops, Clear Equations, Enter new
map, or Read map from file. Selecting Clear Loops will erase all loops in the
map. Selecting Clear Equations will clear all the equations in the window.
Selecting Enter new map will erase the whole Karnaugh map and display the
Karnaugh map input dialog so that a new map can be entered. Selecting Read
map from file, will erase the whole window and display the file dialog so that a
file may be selected.
Text
8. To enter equations below the map, first. click on this button Then a text-
cursor will appear in the equation section of the window and you can start typing
in the equation text. The syntax rules for the equation input are the same as in
Section 4.2. If several equations are input, only the syntax of the last equation
will be checked.
For a map input, the user can select "Plot l's", "Plot 0's", or "Plot X's" to fill the
map, but the user does not have to fill the whole map. The rules are as follows:
1. If only 1 -terms are entered in the map, all blanks will be taken as 0-terms.
5 8 LogicAid Reference Manual
2. If only 0-terms are entered in the map, all blanks will be taken as 1 -terms.
3. If there are 1 -terms and 0-terms in the map, all blanks will be taken as X-terms.
4. If there are 1 -terms, 0-terms and X-terms in the map, no blanks are allowed.
5. At least one 1-term or one 0-term must be filled in the map.
5Tx]
EXAMPLES:
(1)
input variables:
equation form: Sum of Products
E5 KMAP1 aid
Plot l's
Plot 0's
PlotLoopX's
Fill 0Js
Fill l's
Clear
Text
F KMAPZaid
f= KMAP3.aid
Plot 1JS
Plot 0's U) o)
F
Plot pX's ABC 0^ <y
Loo
D E 000 001 011 010 110 111 101 100
0's 00 01 Q
Fill
Fill l's 01 0 o D 0
Clear
Text 11
10 <u T) ZQ)
f°
This command redisplays the appropriate input dialog box showing the current
parameters and selections. This allows the user to update or change any appropriate item
in the dialog box. If applicable, the second (Names) or the third (Heading) dialog box
will be displayed for modification.
The Routine menu is used for selecting the routine appropriate for the input type.
The Simplification command is the only routine available if the input type is Terms,
Equations, or Truth Table. Only the Partial Graph Checker command is available for
the State Graph input type, while the State Reduction, State Assignment, Flip-Flop
Equations, and State Table Checker commands are available for the State Table input
type.
5.1. Simplification (Alt+R L or Ctrl+L)
Function: Simplifies the combinational Boolean functions.
This command brings up a dialog box used to specify the simplification options.
Before this is done, this routine checks the syntax of the input data. The input file must
be syntactically correct before the dialog box is displayed.
The Simplification command is activated for Terms, Equations, Truth Table, and
PLA table input types. For the State Table input type, this command is called by the
Flip-Flop Equations command to simplify the flip-flop input equations. The
Simplification dialog box is shown in Figure 5.1, and its contents are described in the
following subsections.
The user may abort the Simplification command during execution (after OK has
been clicked in the dialog box), by simultaneously pressing down the Control-Period
(Ctrl+.) keys. For a large number of variables, the abort process may take more time.
62 Logic Aid Reference Manual
After the command has been aborted, the output window, if one has already been created,
will remain on the screen.
SIMPLIFICATION OPTIONS:
~~
Output Format: —
(* Alphanumeric Form C Binary Form C
Simplification Routine - ~ j
Pi Chart - One It redundant Solution
r All Minimal Solutions
r
Petrick •- Maximum of 5 Minimal Solutions
r Petrick -• II -• multiple-output minimization
r Espressc
Espressc II -• single-output minimization
f?
Options
I- Complemented Functions
I"" Display All Prime Implicants
OK
I- Identify Essential Prime Implicants
Cancel
r
F* Display Input and Gate Costs
1. Complemented Functions:
Complemented functions are to be simplified and displayed.
OK
STATE REDUCTION OPTION:
Cancel
Display Reduced Table in:
<* <New Edit Window
OK
STATE ASSIGNMENT OPTIONS:
binary 000. The user must be aware that LogicAid does not check syntax while updating
the state assignment.
State Assignment
000 so
001 S1
010 S2
011 S3
100 S4
101 S5
110 SB
Cancel OK
Figure 5.4 State assignment box for SM Charts and State Graphs.
FLIP-FLOP EQUATIONS
Flip-Flop Type: OK
(* ;D -Delay Flip-Flop;
Cancel
C T -Trigger Flip-Flop
f SR--Set-Reset Flip-Flop
C J K- J K Flip-Flop
-Assignment Options:
(* Use Current Assignment
C Display Assignment dialog box
ASSIGNMENT OPTIONS:
The default selection is Use Current Assignment. In this case, the current
assignment of the state table is used to generate the flip-flop input equations. If the user
has not specified an assignment, the default binary assignment is used.
If the Display Assignment dialog box button is clicked, all the buttons of the
Flip-Flop Type option are deactivated. If OK is clicked in the dialog box with this
selection, the State Assignment dialog box is displayed for specifying state assignments.
The user must select the Flip-Flop Equation command again if flip-flop equations are to
be generated.
Logic Aid compares the current state table (Ml) with a "solution" state table (M2).
The table Ml is considered to be "correct" if in an actual application, Ml could be
substituted for M2, assuming that both Ml and M2 are started in the reset state which is
the first row of the table.
If Ml and M2 are completely specified, the reset states are assumed to be
equivalent. For the incompletely specified case, "correct" implies that starting in the first
row of both tables and applying the same input sequence, the outputs will be the same
whenever the M2 output is specified. In other words, it is acceptable for Ml to have a 0,
1, or don't care output when M2 has a don't care output, but it is not acceptable for Ml to
have a don't care output when M2 has a 0 or 1 .
This command first checks the syntax of the current input state table (Ml). If the
state table is syntactically correct, the Open dialog box is displayed with the names of
both the protected and unprotected LogicAid files. The user should choose the name of
the solution file.
After the solution-file selection, the program will first make sure that the test file
and the solution file have the same number of columns, input variables, and output
variables. The two tables also must be of the same machine type and headings. If any of
the above parameters is different, an appropriate alert box will be displayed. It is not
necessary for the two state tables to have the headings in the same exact order; the
program will sort the headings if necessary.
Next, the solution file is checked for syntax errors. Since the solution file is not
shown on the screen, the exact error message is not given; instead, a general error
message is displayed. If the solution file is syntactically correct, the two state tables are
compared. If the test state table is correct, a "Correct" message is displayed. If it is not,
an "Incorrect" message is displayed; furthermore, the shortest input sequence that causes
an error will be shown on the screen. The sequence will always start in the first state of
both tables. Note that there may be multiple shortest-input sequences, but only one
sequence is displayed.
As stated above, the user must have a current state table in the edit window and
must have the solution file on a disk in order to use this routine. The routine assumes that
the first state of the current table and the solution table is the starting state of both tables.
As discussed in Section 4.4, each state table may have a maximum of 8 columns, 16 input
variables. 16 output variables, and 32 rows.
The user may abort the State Table Checker command during execution (after
OK has been clicked in the dialog box) by simultaneously pressing down the Control-
Period (CtrK) keys
68 LogicAid Reference Manual
solution file, the user must choose Select New Solution File, or close the graph window
and start over again.
After we select this command, LogicAid will display the standard file dialog box
and the user can select a new solution file and click OK. The next time the user selects
Partial Graph Checker, LogicAid will compare the partial graph with the new solution
file.
1 JEDEC Options
nual
s
C SP active low
C NoSP
Cancel
PAL22V10(SKINNYDIP/S0IC7FLATPACK)
Pinl Pin24
Pin23 r Reg (8) OK
Pin2 NC
Pin21 r Cancel
Pin4 Reg (12)
Pin10
NC Q1
Z1 |NC Pin15 r Reg (10)
NC Pin14 r Reg (8)
Pin11 NC
Pin12 Pin13
In the pin assignment dialog box, note that CLOCK is assigned to pin 1, GND to
pin 12, Vcc to pin 24, and ARLow( Asynchronous Reset, active Low) to pin 13. You
cannot change these assignments. To enter the desired pin assignments, replace NC (no
connection) with the approriate values. Outputs and flip-flops can be entered only on the
right side of the pin diagram. For flip-flops, you must click on the square next to reg. All
unused pins must be assigned NC. When finished, click OK.
The Jedec file (fuse patterns) for the PAL will appear in a new Output window.
This file can be saved on disk by selecting Save As on the File menu. A saved Jedec file
can be retrieved by selecting Open Text from the File menu and then selecting Jedec in
the subsequent dialog box.
1 Communication Configuration
uuiiiiii run
P C0M1 C COM2
C COM3 C COM4
P 9600
baud Mate ~ C 2400
C 1200 C 300
l arity f* Even
r Odd
(* None
Cancel
r 7
Data Rih«
f 8
OK
6. Windows Menu
Help
nTxl
LogicAid III - State_Table3
File Edit input Routine View
& & ffe m
.=^5 Cascade
JOe
Arrange Icons
1 PlA_Table1
• 2State_Table3
3 State_Graph3
This menu lists all the available windows and allows the user to select (activate)
any available window on the screen by selecting the appropriate menu command. The
active window is denoted with a check mark next to its number. It also allows you to
72 Logic A id Reference Manual
display the windows in a cascaded format or tiled format. You can also choose to arrange
the icons of the minimized windows.
□Tx]
Enter Tutorial Mode on the KMap menu may be selected at any time it is legal
to enter a Karnaugh map. The other items on this menu — Derive Min Equation from
Map, Plot Map from Equation, and Check Solution — will be activated only when the
user has selected Karnaugh Map input.
OK
EQUATION OPTIONS:
Output Format:
Cancel
<• iSum-of-Products Forms
<~ Product-of-Sums Form
LogicAid uses Petrick's Method to get all the minimal solutions. Petrick's method
finds all the minimum solutions based on minimizing the gate inputs. The output
equations are listed in the equation zone of the Karnaugh map window, which is used to
enter the equations of the maps.
7.2 Plot Map from Equation (Alt+K M or Ctrl +Shift+M)
Function: Derive the Boolean function 1 -terms or 0-terms from the last
equation in the text area and plot them in the map.
When the user selects the option, an alert box will be displayed, telling the user
this option will erase all the old entries of the map; if the user clicks OK, the function
continues. LogicAid checks the syntax of the last equation; if there is any error,
LogicAid displays the error message and then stops the function. If the last equation is
expressed in the SOP form, the data filled in the map will all be 1 -terms and the loops
Logic Aid Reference Manual 73
will all be 1-term loops corresponding to the terms of the equation; likewise, if the last
equation is expressed in the POS form, the data filled in the map will be 0-terms and the
loops will all be the 0-term loops corresponding to the input terms of the equation.
7.3 Check Solution (Alt+K S or Ctrl+Shift+S)
Function: Compares the Karnaugh map with the last equation to see if they
represent the same Boolean functions, and determines if the
equation is the minimum form or not.
At first. Logic Aid will check the syntax of the input map and the last equation. If
there are 1-term loops in the map, LogicAid will assume the equation form will be SOP:
if it is not, LogicAid will display a syntax error message for the equation. Likewise, if
there are 0-term loops in the map, the equation form should be POS.
Next, LogicAid will compare the Boolean functions of the map and equation. If
they do not match, an error message will be displayed.
The third step is to compare the loops of the map with the terms of the equation.
If some loops of the map do not correspond to any term of the equation, LogicAid gives
the message "The loops don't match the terms of the equation". But if some terms do not
correspond to any loops of the map, no message is given.
The last step is to check if the input equation is minimum or not. If it is.
LogicAid will display "Correct Solution"; otherwise. LogicAid will display "Correct but
not Minimum".
7.4 Enter Tutorial Mode (Alt+K T or Ctrl+Shift+T)
Function: Allows the user to learn how to enter a correct minimum equation
for a Karnaugh map under the guidance of LogicAid.
After the KMap input format is selected, the Tutorial Options dialog box (Figure
7.2) is displayed. Its contents are described in the following subsections.
Tutorial Options
Equation Format OK
**" 5 um-of -Products Form!
C Product-of-Sums Form Cancel
Input Option:
fT Type in each term after looping t
option, after the user loops an implicant in the map, he has to enter the corresponding
term in the equation right away. For the second option, the user must enter the
corresponding terms of the equation after he finishes looping all the essential prime
implicants in the map. Then he must enter the remaining terms of the equation after he
has looped all of them on the map.
In the tutorial mode, before the user finishes entering the equation for a Karnaugh
map, there is always an instruction on the top of the graph window. The user must follow
the instruction to enter the data and if the instruction is not finished, LogicAid will not
display the next instruction. With the different Input Options, the instructions will be
different. When a Karnaugh map window is printed in the tutorial mode, KMT will be
printed at the top of the listing.
INSTRUCTIONS :
For the input option of Type in each term after looping it, the instructions are as
follows:
2. Loop an essential prime implicant! (Hit Enter) (Hit F12 when finished)
LogicAid asks the user to loop an essential prime implicant, and then hit Enter.
When the user hits Enter, LogicAid will check whether the looped squares form
an essential prime implicant; if they do, LogicAid will display the loop and enter
instruction 3; otherwise, it will stay in instruction 2. If the user cannot find any
other essential prime implicants, he should hit F 12. When the user hits F12 here,
LogicAid will check if there are any essential prime implicants not looped yet; if
there are, LogicAid will stay here; otherwise it will enter instruction 4.
4. Loop a remaining term for minimum solution! (Hit Enter) (Hit F12 when
finished)
This instruction is very similar to instruction 2 and the only difference is now the
user should try to loop one of the remaining prime implicants which can make a
minimum equation with the least number of gates. If the user loops an incorrect
prime implicant, an error message will be displayed; otherwise, LogicAid will go
to instruction 5. If the loops have covered all the 1 -terms (or 0-terms), the user
should hit F12 and LogicAid will check if this is a minimum solution.
For the input option of T> pe in all essential prime implicants at once, and type
in all remaining prime implicants at once, the instructions are as follows:
2. Loop an essential prime implicant! (Hit Enter) (Hit F12 when finished)
Same as above, except LogicAid will not go on to instruction 3 until all essential
prime implicants have been looped.
Loop a remaining term for minimum solution! (Hit Enter) (Hit F12 when
finished)
This instruction is very similar to instruction 2 and the only difference is now the
-- should try to loop the remaining prime implicants which can make a
minimum equation with the least number of gates. If the user loops an incorrect
prime implicant. an error me- gc will be displayed; otherwise. LogicAid will
display the loop and the user can loop another prime implicant. If the loops have
covered all the 1 -terms (or 0-terms). the user should hit F12 and LogicAid will
check if all the necessary loops are covered: if so. LogicAid will go to instruction
5. otherwise it will stay here.
After the user enters a correct equation for the Karnaugh map. he can select Exit
Tutorial Mode from the KMap Menu to leave the tutorial mode or select Clr from the
left side menu to clear the map or equations and start again.
You can verify all of your circuit connections by the following procedure:
Move the mouse pointer over a wire near the output or input of a part and click while
holding the Shift key down. All the connections to that wire will be highlighted as a red
dashed line. You can repeat this procedure for each part to ensure that all the wires are
connected to the right places.
Example: In the figure below, Gatel is a part label, Pinl and Pin3 are pin labels.
Gatel (Red)
Pinl Pin3
Pin2
Getting Started with SimUaid 79
Figure 2 illustrates the different values of input and output for a logic circuit. Note
that the connection between the switch and the wire to the top input of the AND gate is
bad because there is no black dot at the intersection. Therefore, the input to the AND gate
is Z, and the output of the AND gate is X.
No black dot
1 A
a. First, place the gates on the circuit diagram. To do this, pull down the parts menu
and select the AND-2 input (2-input AND) gate from the submenu. Use the mouse
to position the first AND gate where you want it and click to place it. Use the
mouse to position the second AND gate and click to place it.
b. Then pull down the parts menu and select the OR-2 input (2-input OR) gate on the
OR submenu. Use the mouse to position the OR gate and click to place it.
c. Next pull down the Parts menu and select Switch. Use the mouse to place four
switches in the desired locations on the screen.
d. To display the logic levels of each pin, select Show I/O Values from the View
menu or click the JU button. The logic levels {/, 0, Z, or X) will appear above the
input and output pins of each component in the network.
e. Next, connect the terminals of the parts with wires. The general procedure for
drawing a wire on the screen is as follows:
i. Click on Wire option from Edit Menu (or the J^ button). The pointer
becomes a cross hair,
ii. Click the left mouse button at the starting point of the wire,
iii. Move the mouse to the ending point, and click there. If you wish to change
the routing of the wire you may click at additional intermediate points as you
draw the wire.
f. If you need to move a gate or device, select the Move option from Edit menu or
the .lid button. Position the mouse to the middle of a gate or device and drag it to
its new location. The connecting wires will follow along.
g. Next we will label the switches. Select Label in the Edit menu or click on the ll!s
button. Note that the cursor becomes a pencil. Move the tip of the pencil to the
middle of the top switch and click. Type in the label A followed by Enter. Now
Getting Started with Sim Uaid 8 1
use the pencil tip to select the next switch, and type in the label B. In a similar
manner, label the next two switches C and D.
h. Your circuit is now complete and should look similar to the one in Figure 3. You
are ready to simulate your network.
The example given below explains the difference between wired and virtual
connections. If you enter all of the connecting wires in a SimUaid circuit diagram, the
diagram may become very cluttered and hard to read. The virtual connection feature in
SimUaid allows you to connect two device pins together without actually drawing the
wire. To make virtual connections, place a label on a device output pin. Then place the
same label on one or more device input pins. The output will be connected to the inputs,
even though the connecting wires are not shown on the screen.
The same circuit is redrawn below, with wired connections for A and A', and
virtual connections for B, B', C, and C. In order to make this work, B, B', C, and C
must be pin labels. To label a pin, first click on the ABC button on the SimUaid menu.
Then use the pencil cursor and click on a device pin (not on the device itself). Type the
label and hit return. The label should appear in black near the pin. Then you may move
the label amvvhere you want it, but do not move it too far away from the pin.
After you have input your circuit, select Show I/O values on the View menu.
Everv device input should be 0 or 1 . If any input or output is X or Z, you have a bad
connection, and you should fix this before continuing. In the above diagram, note that
the switch output pin labeled B has a 0 value, and the gate input pin labeled B has a 0
value, even though no visible wire appears between the two pins. Similarly, the pins
labeled B' both have a 1 value.
82 Getting Started with Sim Uaid
To toggle the switch between logic 0 and 1, click on the AJ icon or press Ctrl+S
to switch to the select mode. Then, click on the switch. This will cause the switch to
toggle. To simulate the network, just toggle the switches and observe the output values
from the probes. The output values will change to reflect the different input signals that
are being fed into your circuit network. (If the output values do not change immediately,
reset the simulator by clicking on the Reset option on the Simulate menu or the j£J
button. If this does not fix the problem, you may have accidentally left the Live Mode.
In the "Simulate" pull-down menu, be sure that the "Change Button" does NOT have a
check mark next to it. The Change Mode allows advanced users to analyze circuit
timing, but we will not discuss it here.)
EXAMPLE:
Following the example in the previous section, click on the AJ button to change to
the Select mode. Then set the switches to A = 0, B = 1 , C = 1 , and D=\. You can do so
by clicking on each switch until the desired input is obtained. Then, observe that the
network output is logic 1, as shown in the Figure 3.
Continuing in this manner, you can observe the outputs of the circuit for the
desired input combinations and see if it works correctly.
changes state on the rising edge of the clock input, Work through this exercise to become
familiar with using a D flip-flop.
Start with a new empty circuit window on the screen. Select the D flip-flop from
the Parts menu and position it in the center. The clock input at the left is labeled
"C". This flip-flop changes state at the rising edge of the clock signal. Also note
that the Preset and Clear inputs are labeled "S" and "R" respectively.
SimUaid requires that a signal be connected to every flip-flop input including
the preset and clear inputs. Connect switches to the flip-flop inputs and
outputs as shown in Figure 5.
Figure 5. D flip-flop
c. Click on the switches as required to set all inputs to 0 and then set the D input to
1. Next, input a rising edge on the CLOCK by changing the switch from 0 to 1.
Why did the flip flop state Q remain at 0? Because having both Preset (S) and
Clear (R) equal to 0 at the same time is an illegal input combination. Also, note
that the Preset and Clear inputs are Asynchronous inputs; they determine the flip-
flop state regardless of the clock. Correct this condition by setting Preset (S) to 1
and then Clear (R) to 1. At this point you should have Q = 0 since the Clear
input was 0 (and so active) briefly before it was set to 1. If you input another
rising edge at the CLOCK input, the flip-flop will now change to Q = 1 in
response to the D input.
d. Verify the operation of Clear (R) by setting it to 0 and then back to 1 . Then
verify Preset (S) in the same way.
e. Starting with Q = 0, D = 0, and CLOCK =1 , change the clock input to 0 and back
to 1. Note that Q will remain 0. Now change D to 1 and change the clock to 0
and back to 1 . Q will change to 1 . (Note that the flip-flop changes state just after
you change the clock from 0 to 1). Then set D = 0 and toggle the clock again.
When does the flip-flop change state?
84 Getting Started with Sim Uaid
-
^
of a sequential logic network using automatic simulation.
as:
O
^L
9
Ql
C>
krqi
Q2
lock. /JT\
TT -L
[TUT
Figure 6. Example for automatic simulation.
Configure the Clock and Input Signal by clicking on the 1^ icon on the tool bar
and then clicking on the Clock or the Input Signal. Clicking on the clock will bring up
the Simulation Options dialog box. Here, you can configure the period of the clock, the
initial value of the Clock output, and the time limit of the simulation. Figure 7 below
shows the simulation options dialog box.
Cancel
OK
The input signal can be set up as shown in Figure 8. The values are for a sequence
1 100 101 1 01. To enter new values, enter the Time in ns and the associated input signal
value. Then click Add/Modify. To delete a value, click on the row of the value and click
Delete. The values can be 1,0, X, Z, or R. For more information, refer to the SimUaid
User's Manual.
"3
f
Input Signal
The simulation can be started by clicking on the Go option in the Simulate menu.
This will make the simulation run until it hits the time limit. The Step command can be
used to run the simulation clock by clock. The Change command will run the simulation
until a value changes. The simulation can be stopped at any time by selecting the Stop
command.
The outputs of the simulation are displayed in a timing waveform chart. Click on
the Open Timing Diagram command on the Window menu to bring up the timing chart.
You will need to place probes on the signals that you want to display on the
timing diagram. The order in which you place the probes will be the order of the timing
waveforms. Label each probe with the appropriate name so that the label will appear next
to the probe's waveform in the timing window. Probes without labels will have "?"
appearing next to their timing waveform.
Figure 9 shows an example of a timing diagram for the circuit shown in Figure 6.
The scale of the waveforms can be adjusted by using the Scale option from the Options
menu.
86 Getting Started with SimUaid
«0
D|£g]a| fir |
X 1 ns (1 ns/div)
Cufsoi Posrtion
25
#*?
S 10 IS 20 25 30 3S 40 45 50 55 60 61
ns v
ogicA
CAD Software for Logic Design and Simulatio
LogicAid Features:
• Logic functions may be input in the following forms: sum-of-
products, product-of-sums, truth table, PLA table, Karnaugh map,
minterm or maxterm expansion
• Choice of logic simplification algorithms provides for finding a fast
solution or all minimum solutions
• Sequential logic may be input as Mealy or Moore state tables,
state graphs (with either binary or alphanumeric input/output),
or SM charts
• Reduces state tables to a minimum number of rows and derives
flip-flop input equations for D, T, J-K, and S-R flip-flops
• Creates JEDEC files for programming 22V10 PALs
• Tutorial aids include Karnaugh map tutor, state table checker, and
partial graph checker
SimUaid Features:
• Friendly user interface allows easy placement and wiring of
components
• Available devices include basic gates, flip-flops, switches, probes,
registers, counters, adders, multiplexers, decoders, 7-segment
indicators, clocks, tri-state buffers
• Four-valued logic simulation (0, 1 , X, Z)
• Displays all device inputs and outputs for ease of signal tracing
and debugging
• Probe placement automatically sets up waveform display
• Live simulation mode allows immediate observation of response
to input switch changes
• Synchronous simulation allows stepping one clock period
at a time
• Asynchronous simulation allows stepping until a signal changes
9 780534N384746