Lecture 12 More about Combinational Analysis and Design
Lecture 12 More about Combinational Analysis and Design Procedures 1
Logic Circuit Analysis: Determining the behavior of a system given its description. The description of the system is often provided in the form of a circuit diagram. 2
o Logic Circuit Analysis For two-level circuits, the analysis process is simple. o The Boolean expression representing the circuit can often be written by inspection. For multilevel circuits, the analysis process is much more complicated. Cannot write a Boolean expression by inspection. Must follow a procedure to implement the analysis. 3
Logic Circuit Analysis 1. Identify inputs and outputs 2. Track circuit behavior from input to output 3. Determine Boolean expression for output(s) 4. Determine Truth Table 5. Examine circuit timing, power dissipation, etc. 4
Logic Circuit Analysis x 1 P 1 x 2 P 9 x 5 x 3 P 4 f P 7 P 2 P 3 x 4 P 6 P 8 P 10 P 5 5
Verification - Circuit Analysis ° Circuit analysis involves figuring out what some circuit does • Every circuit computes some function, which can be described with Boolean expressions or truth tables • So, the goal is to find an expression or truth table for the circuit ° The first thing to do is to figure out what the inputs and outputs of the overall circuit are Inputs: x, y, z Output: f 6
Symbolic Analysis ° We start with the circuit diagram • We determine gate output expressions • Intermediate expressions are combined in following gates to form complex expressions - It might help to do some algebraic simplification along the way • We repeat until we have the output function and expression ° Symbolic analysis gives both the truth table and logic expression 7
Literal Analysis ° Literal analysis is process of manually assigning a set of values to the inputs, tracing the results, and recording the output values • For ‘n’ inputs there are 2 n possible input combinations • From input values, gate outputs are evaluated to form next set of gate inputs • Evaluation continues until gate outputs are circuit outputs ° Literal analysis only gives us the truth table ° Once you know the number of inputs and outputs, list all the possible input combinations in your truth table • A circuit with n inputs should have a truth table with 2 n rows x 0 0 1 1 y 0 0 1 1 z 0 1 0 1 f 8
Literal Analysis ° You can simulate the circuit by hand to find the output for each possible combination of inputs 9
Literal Analysis ° Doing the same thing for all the other input combinations yields the complete truth table ° This is simple, but tedious 10
Circuit Analysis ° Remember that if you already have a Boolean expression, you can use that to easily make a truth table ° For example, since we already found that the circuit computes the function f(x, y, z) = xz + y’z + x’yz’, we can use that to fill in a table: 11
Circuit Analysis ° The opposite is also true: it’s easy to come up with an expression if you already have a truth table ° Convert a truth table into a sum of minterms expression for example ° You can then simplify this sum of minterms if desired using a K-map, f(x, y, z) = x’y’z + x’yz’ + xy’z + xyz = m 1 + m 2 + m 5 + m 7 12
Truth Table → Equation ° Analyze the logic circuit shown below to determine the circuit’s truth-table. Using the truth table, derive the logic expression for the output F 1. Did you analyze the circuit BEFORE you turned the power on? 13
Truth Table → Equation a) Add test-points at the output of every gate. Steps (a) TP 1 TP 2 TP 3 The Process TP 4 a) Add test-points at the output of every gate. b) Add a column to the truth table for every test-point. c) Working from the inputs to the output, complete the truth table for each testpoint, ultimately ending at the circuit’s output. d) From the completed truth table, identify the Minterms from the truth table anywhere the output is one. e) Using the extracted Minterms, write the Sum-Of-Products logic expression. TP 5 14
Truth Table → Equation Steps (b) & (c) b) Add a column to the truth table for every test-point. c) Working from the inputs to the output, complete the truth table for each test-point, ultimately ending at the circuit’s output. The Process a) Add test-points at the output of every gate. b) Add a column to the truth table for every test-point. c) Working from the inputs to the output, complete the truth table for each test-point, ultimately ending at the circuit’s output. d) From the completed truth table, identify the Minterms from the truth table anywhere the output is one. e) Using the extracted Minterms, write the Sum-Of-Products logic expression. X Y Z F 1 TP 2 TP 3 TP 4 TP 5 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 15
Truth Table → Equation Steps (d) & (e) d) From the completed truth table, identify the Minterms from the truth table anywhere the output is one. X Y Z F 1 TP 2 TP 3 TP 4 TP 5 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 e) Using the extracted Minterms, write the Sum-Of. Products logic expression. 16
Example #1: Circuit Analysis Example Analyze the logic circuit shown below to determine the circuit’s truth table. Using the truth table, derive the logic expression for the output F 2. 17
Example #1: Circuit Analysis Solution TP 1 a) TP 2 TP 3 TP 4 TP 5 b) & c) d) e) e) TP 4 A B C F 2 TP 1 TP 2 TP 3 TP 5 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 1 0 0 0 18
Equation → Truth Table Technique The Process a) Working from the inputs to the output, write the cumulating logic expression at the output of each gate concluding with the expression for the circuit’s output. b) Using the circuit’s output logic expression, derive the circuit’s truth table. 19
Equation → Truth Table Technique Analyze the logic circuit shown below to determine the logic expression for the output F 1. Using the logic expression, derive the circuit’s truth table. 20
Equation → Truth Table Technique a) Working from the inputs to the output, write the Step (a) cumulating logic expression at the output of each gate concluding with the expression for the circuit’s output. The Process a) Add test-points at the output of every gate. b) Add a column to the truth table for every testpoint. c) Working from the inputs to the output, complete the truth table for each test-point, ultimately ending at the circuit’s output. d) From the completed truth table, identify the Minterms from the truth table anywhere the output is one. e) Using the extracted Minterms, write the Sum. Of-Products logic expression. 21
Equation → Truth Table Technique b) Using the circuit’s output logic expression, derive the circuit’s truth table. X Y Z F 1 0 0 0 1 1 1 1 0 0 1 1 1 0 Step (b) The Process a) Add test-points at the output of every gate. b) Add a column to the truth table for every testpoint. c) Working from the inputs to the output, complete the truth table for each test-point, ultimately ending at the circuit’s output. d) From the completed truth table, identify the Minterms from the truth table anywhere the output is one. e) Using the extracted Minterms, write the Sum. Of-Products logic expression. 22
Example #2: Circuit Analysis Example Analyze the logic circuit shown below to determine the logic expression for the output F 2. Using the logic expression, derive the circuit’s truth table. 23
Example #2: Circuit Analysis Solution a) b) A B C F 2 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 24
Circuit Analysis Summary ° After finding the circuit inputs and outputs, you can come up with either an expression or a truth table to describe what the circuit does ° You can easily convert between expressions and truth tables ° The analysis and synthesis tools presented are sometimes based on the fundamental concepts of Boolean algebra Find the circuit’s inputs and outputs Find a Boolean expression for the circuit Find a truth table for the circuit 25
26
Analysis versus Design ° Design of a circuit starts with specification and ends up with a logic diagram. ° Analysis for a combinational circuit consists of determining the function that the circuit implements with: v. A set of Boolean functions or v. A truth table, together with a possible explanation of the operation of the circuit. v. We can perform the analysis by manually finding the Boolean equations or truth table. o The first step in the analysis is to make sure that the given circuit is combinational and not sequential (i. e. no feedback or storage elements). 27
Digital Design Overview ° Design digital circuit from specification ° Digital inputs and outputs known • Need to determine logic that can transform data ° Start in truth table form ° Create K-map for each output based on function of inputs ° Determine minimized sum-of-product representation ° Draw circuit diagram 28
Design Procedure (Mano) Design a circuit from a specification. 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness A B C RS 0 0 0 0 1 0 1 0 0 1 S=A+B+C R = ABC 0 1 1 0 0 0 1 1 1 0 0 1 1 1 29
Combinational logic design ° Use multiple representations of logic functions ° Use graphical representation to assist in simplification of function. ° Use concept of “don’t care” conditions. ° Example - encoding BCD to seven segment display. ° Similar to approach used by designers in the field. 30
BCD to Seven Segment Display ° Used to display binary coded decimal (BCD) numbers using seven illuminated segments. ° BCD uses 0’s and 1’s to represent decimal digits 0 9. Need four bits to represent required 10 digits. ° Binary coded decimal (BCD) represents each decimal digit with four bits Design a circuit from a specification. a f g e b c 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness d 31
BCD to seven segment display ° List the segments that should be illuminated for each digit. Design a circuit from a specification. 0 1 2 3 4 5 6 7 8 9 a, b, c, d, e, f b, c a, b, d, e, g a, b, c, d, g b, c, f, g a, c, d, e, f, g a, b, c, d, f, g a f g e 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness b c d 32
BCD to seven segment display ° Derive the truth table for the circuit. ° Each output column in one circuit. Inputs Outputs Design a circuit from a specification. 1. Determine number of required inputs and outputs. 2. Derive truth table Dec w x y z a b c d e. 3. Obtain simplified Boolean functions 0 0 0 1 1 1. 4. Draw logic diagram and verify correctness 1 0 0 0 1 1 0 0. 2 × 0 0 1 0 × × 1 1 0 1 1. × × ×. 7 0 1 1 1 0 0. 8 1 0 0 0 1 1 1. 9 1 0 0 1 1 1 0. 33
BCD to seven segment display ° Find minimal sum-of-products representation for each output For segment “a” : yz 00 01 11 10 wx Design a circuit from a specification. 00 1 1 01 0 1 1. Determine number of required inputs and outputs. 11 2. Derive truth table 10 1 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness 1 Note: Have only filled in ten squares, corresponding to the ten numerical digits we wish to represent. 34
Don’t care conditions (BCD display). . . ° Fill in don’t cares for undefined outputs. ° • Note that these combinations of inputs should never happen. Design a circuit from a specification. Leads to a reduced implementation For segment “a” : yz 00 01 11 10 wx 00 1 1 01 0 1 11 X X 10 1 1 X X 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness Put in “X” (don’t care), and interpret as either 1 or 0 as desired …. 35
Don’t care conditions (BCD display). . . ° Circle biggest group of 1’s and Don’t Cares. ° Leads to a reduced implementation Design a circuit from a specification. For segment “a” : yz 00 01 11 10 wx 00 1 1 01 0 1 1 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness 1 11 X X 10 1 1 X X 36
Don’t care conditions (BCD display) ° Circle biggest group of 1’s and Don’t Cares. ° Leads to a reduced implementation Design a circuit from a specification. For segment “a” : yz wx 00 01 11 10 00 1 1 01 0 1 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness 11 X X 10 1 1 X X 37
Don’t care conditions (BCD display). . . Design a circuit from a specification. ° Circle biggest group of 1’s and Don’t Cares. ° All 1’s should be covered by at least one implicant For segment “a” : yz 00 01 11 10 wx 00 1 1 01 0 1 1 1 yz wx 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness 00 01 11 10 00 1 1 01 0 1 11 X X X X 10 1 1 X X 38
Don’t care conditions (BCD display). . . ° Put all the terms together ° Generate the circuit For segment “a” : yz 00 01 11 10 wx 00 1 1 01 0 1 1 Design a circuit from a specification. 1. Determine number of required inputs and outputs. 2. Derive truth table 3. Obtain simplified Boolean functions 4. Draw logic diagram and verify correctness 1 11 X X 10 1 1 X X 39
BCD to seven segment display ° Derive the truth table for the circuit. ° Each output column in one circuit. Inputs Outputs Dec w x y z a b c d e. 0 0 0 1 1 1. 1 0 0 0 1 1 0 0. 2 × 0 0 1 0 × × 1 1 0 1 1. × × ×. 7 0 1 1 1 0 0. 8 1 0 0 0 1 1 1. 9 1 0 0 1 1 1 0. 40
BCD to seven segment display ° Find minimal sum-of-products representation for each output For segment “b” : yz 00 01 11 10 wx 00 1 1 01 1 0 11 10 1 1 41
For segment “b” : yz wx 00 01 11 10 00 1 1 01 1 0 11 X X 10 1 42
For segment “b” : yz wx 00 01 11 10 00 1 1 01 1 0 11 X X 10 1 43
For segment “b” : yz wx 00 01 11 10 00 1 1 01 1 0 11 X X 10 1 44
For segment “b” : yz wx 00 01 11 10 00 1 1 01 1 0 11 X X 10 1 45
For segment “b” : yz wx 00 01 11 10 00 1 1 01 1 0 11 X X 10 1 46
Analysis versus Design ° Design of a circuit starts with specification and ends up with a logic diagram. ° Analysis for a combinational circuit consists of determining the function that the circuit implements with: v. A set of Boolean functions or v. A truth table, together with a possible explanation of the operation of the circuit. v. We can perform the analysis by manually finding the Boolean equations or truth table. o The first step in the analysis is to make sure that the given circuit is combinational and not sequential (i. e. no feedback or storage elements). 47
Multilevel Logic Circuits A two-level logic circuit is usually efficient for Boolean expressions of a few variables. However, as the number of inputs increases, a two -level logic circuit may result in fan-in problems. Fan-in refers to the number of inputs to a logic gate Whether fan-in is an issue is dependent upon the technology used to implement the logic circuit. Standard TTL and CMOS chips Field Programmable Gate Array (FPGA) Complex Programmable Logic Device (CPLD) 48
Multilevel Logic Circuits Example: Realize the following Boolean expression using only 2 input AND gates and 2 -input OR gates. F(A, B, C) = S m(0, 5, 6) 49
Multilevel Logic Circuits Often requires fewer logic gates than the logically equivalent two-level logic circuit. Requires less complex wiring between logic gates Reduced (silicon) area Decreased cost Fewer literals results in fewer interconnecting wires Has a greater propagation delay than the logically equivalent two-level logic circuit. Each additional level adds to the propagation delay Decreased speed 50
Multilevel Logic Circuits Objectives: 1. Design logic circuits that meet the fan-in requirements of the chosen technology. 2. Design a minimum-cost logic circuit. 51
Multilevel Logic Circuits Two techniques that can be used to realize multilevel logic circuits: 1. Factoring 2. Functional Decomposition 52
Factoring Example: Realize a logic circuit that has a maximum fan-in of two for the following Boolean expression. F(A. . G) = ACF' + ADEF' + BCG + BDEG 53
Factoring Example: Design the minimum-cost logic circuit that implements the following Boolean expressions. F 1(A, B, C, D) = S m(1, 2, 3, 7, 11, 15) F 2(A, B, C, D) = P M(0, 1, 2, 3, 4, 8, 12) 54
Functional Decomposition Example: Design a minimum-cost logic circuit to implement the following Boolean expression. F(A, B, C, D) = A'BC + AB'C + ABD + A'B'D 55
NAND and NOR Circuits As with two-level circuits, multilevel circuits can be realized using NAND or NOR gates only. 56
NAND and NOR Circuits Example: Realizing a NAND Circuit 57
NAND and NOR Circuits x 1 x 2 x 3 f x 4 x 5 x 6 x 7 58
NAND and NOR Circuits x 1 x 2 x 3 x 4 x 5 x 6 f x 7 59
NAND and NOR Circuits x 1 x 2 x 3 x 4 f x 5 x 6 x 7 60
NAND and NOR Circuits Example: Realizing a NOR Circuit 61
NAND and NOR Circuits x 1 x 2 x 3 f x 4 x 5 x 6 x 7 62
NAND and NOR Circuits x 1 x 2 x 3 f x 4 x 5 x 6 x 7 63
NAND and NOR Circuits x 1 x 2 x 3 f x 4 x 5 x 6 x 7 64
Combinational Logic Design Process Step Description Step 1 Capture the function Create a truth table or equations, whichever is most natural for the given problem, to describe the desired behavior of the combinational logic. Step 2 Convert to equations This step is only necessary if you captured the function using a truth table instead of equations. Create an equation for each output by ORing all the miniterms for that output. Simplify the equations if desired. Step 3 Implement as a gatebased circuit For each output, create a circuit corresponding to the output’s equation. (Sharing gates among multiple outputs is OK optionally. ) 65
Summary ° Analysis and Design Procedures (Combinational) ° Important concept – analyze digital circuits • Given a circuit - Create a truth table - Create a minimized circuit ° Approaches • Boolean expression approach • Truth table approach ° Both results can then be minimized using K-maps. (Leads to minimized hardware)-----------------° Need to formulate circuits from problem descriptions 1. Determine number of inputs and outputs 2. Determine truth table format 3. Determine K-map 4. Determine minimal SOP o There may be multiple outputs per design o Solve each output separately 66
- Slides: 66