1 lecture 12 more about combinational analysis and design procedures

Post on 21-Jan-2016

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Lecture 12More about Combinational Analysis and

Design Procedures

2

Logic Circuit Analysis

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.

3

Logic Circuit Analysiso 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.

4

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.

5

Logic Circuit Analysis

x 1

x 2

x 5

x 4

f x 3

P 1

P 4

P 5

P 6 P 8

P 2

P 3

P 9

P 10

P 7

6

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

7

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

8

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 2n 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 2n rows

x y z f0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

9

Literal Analysis

° You can simulate the circuit by hand to find the output for each possible combination of inputs

x y z f

0 0 00 0 10 1 00 1 11 0 01 0 1 11 1 01 1 1

10

Literal Analysis

° Doing the same thing for all the other input combinations yields the complete truth table

° This is simple, but tedious

x y z f

0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 01 0 1 11 1 0 01 1 1 1

11

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:

x y z xz y’z x’yz’ f

0 0 0 0 0 0 00 0 1 0 1 0 10 1 0 0 0 1 10 1 1 0 0 0 01 0 0 0 0 0 01 0 1 1 1 0 11 1 0 0 0 0 01 1 1 1 0 0 1

12

Circuit Analysis

x y z f

0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 01 0 1 11 1 0 01 1 1 1

° 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 expressionfor 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

= m1 + m2 + m5 + m7

13

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 F1.

Did you analyze the circuit BEFORE you turned the

power on?

14

Truth Table → Equation

a) Add test-points at the output of every gate.TP1

TP2

TP3

TP4TP5The 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.

Steps (a)

15

Truth Table → Equation

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.

Steps (b) & (c)

X Y Z F1 TP1 TP2 TP3 TP4 TP5

0 0 0 0 1 0 0 1 0

0 0 1 0 1 0 0 1 0

0 1 0 0 1 1 0 0 0

0 1 1 1 1 1 1 0 0

1 0 0 1 0 0 0 1 1

1 0 1 1 0 0 0 1 1

1 1 0 0 0 0 0 0 0

1 1 1 0 0 0 0 0 0

The Processa) 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.

16

Truth Table → Equation

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.

Steps (d) & (e)

Z Y X

Z Y X

Z Y X

Z Y XZ Y X Z Y XF 1

X Y Z F1 TP1 TP2 TP3 TP4 TP5

0 0 0 0 1 0 0 1 0

0 0 1 0 1 0 0 1 0

0 1 0 0 1 1 0 0 0

0 1 1 1 1 1 1 0 0

1 0 0 1 0 0 0 1 1

1 0 1 1 0 0 0 1 1

1 1 0 0 0 0 0 0 0

1 1 1 0 0 0 0 0 0

17

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 F2.

18

Example #1: Circuit Analysis

Z Y X

Z Y XZ Y X Z Y XF2

Solutiona)

b) & c)

TP1TP2 TP3

TP4

TP5

e)A B C F2 TP1 TP2 TP3 TP4 TP5

0 0 0 0 1 0 0 1 0

0 0 1 0 1 0 0 0 0

0 1 0 1 1 1 0 1 1

0 1 1 1 1 1 1 0 0

1 0 0 0 0 0 0 1 0

1 0 1 0 0 0 0 0 0

1 1 0 1 0 0 0 1 1

1 1 1 0 0 0 0 0 0

Z Y X

Z Y X

d)

e)

19

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.

Equation → Truth Table Technique

20

Equation → Truth Table Technique

Analyze the logic circuit shown below to determine the logic expression for the output F1. Using the logic expression, derive the circuit’s truth table.

21

Equation → Truth Table Technique

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.

Step (a)

X

Y

Y X

YX

Z Y X

Y X Z Y X

The Processa) 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.

22

Equation → Truth Table Technique

b) Using the circuit’s output logic expression, derive the circuit’s truth table.

Step (b)

X Y Z F1

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 0

Z Y X

Y X

Y X Z Y XF 1 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.

23

Example #2: Circuit Analysis

Example

Analyze the logic circuit shown below to determine the logic expression for the output F2. Using the logic expression, derive the circuit’s truth table.

24

Example #2: Circuit Analysis

A B C F2

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

A

C

C B

B AC B A C B C B A

C B C B AF 2

Solution

a)

b)

C B A C B

25

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’sinputs and outputs

Find a Booleanexpression

for the circuit

Find a truth tablefor the circuit

26

27

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:

A set of Boolean functions orA truth table, together with a possible

explanation of the operation of the circuit.We can perform the analysis by manually

finding the Boolean equations or truth table.

oThe 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).

28

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

29

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 correctnessA00001111

B00110011

C01010101

R00000001

S01111111

S = A + B + CR = ABC

30

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.

31

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

a

b

c

g

e

d

f

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

32

BCD to seven segment display

0 a,b,c,d,e,f1 b,c2 a,b,d,e,g3 a,b,c,d,g4 b,c,f,g5 a,c,d,f,g6 a,c,d,e,f,g7 a,b,c8 a,b,c,d,e,f,g9 a,b,c,d,f,g

a

b

c

g

e

d

f

° List the segments that should be illuminated for each digit. 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

33

BCD to seven segment display

.0111110019

.1111100018

.0011111107

.

.1101101002

.0011010001

.1111100000

.edcbazyxwDec

° 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

3. Obtain simplified Boolean functions

4. Draw logic diagram and verify correctness

34

BCD to seven segment display

1 0

10

1 1

1 1

11

yz

wx

10

11

01

00

10110100

For segment “a” :

Note: Have only filled in ten squares, corresponding to the ten numerical digits we wish to represent.

° Find minimal sum-of-products representation for each output

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

35

Don’t care conditions (BCD display) ...

1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

For segment “a” :

Put in “X” (don’t care), and interpret as either 1 or 0 as desired ….

° Fill in don’t cares for undefined outputs.• Note that these combinations of inputs should never happen.

° Leads to a reduced implementationDesign 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

36

Don’t care conditions (BCD display) ...

For segment “a” :

yFa1 1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

° Circle biggest group of 1’s and Don’t Cares.

° Leads to a reduced implementation

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

37

Don’t care conditions (BCD display)

For segment “a” :

wFa2 1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

° Circle biggest group of 1’s and Don’t Cares.

° Leads to a reduced implementationDesign 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

38

Don’t care conditions (BCD display) ...

For segment “a” :

zxFa3

1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

xzFa4

1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

° Circle biggest group of 1’s and Don’t Cares.

° All 1’s should be covered by at least one implicant

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

39

Don’t care conditions (BCD display) ...

For segment “a” :

xzzxwyF 1 0

10

1 1 X X

X X X X

1 1

11

yz

wx

10

11

01

00

10110100

° Put all the terms together

° Generate the circuit

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

40

BCD to seven segment display

.0111110019

.1111100018

.0011111107

.

.1101101002

.0011010001

.1111100000

.edcbazyxwDec

° Derive the truth table for the circuit.

° Each output column in one circuit.

Inputs Outputs

41

BCD to seven segment display

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

° Find minimal sum-of-products representation for each output

42

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

X X X X

X X

43

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

X X X X

X X

44

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

X X X X

X X

45

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

X X X X

X X

46

1 1

01

1 1

1 0

11

yz

wx

10

11

01

00

10110100

For segment “b” :

X X X X

X X

47

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:

A set of Boolean functions orA truth table, together with a possible

explanation of the operation of the circuit.We can perform the analysis by manually

finding the Boolean equations or truth table.

oThe 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).

48

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)

49

Multilevel Logic Circuits

Example:

Realize the following Boolean expression using only 2-input AND gates and 2-input OR gates.

F(A,B,C) = m(0, 5, 6)

50

Multilevel Logic Circuits

Often requires fewer logic gates than the logically equivalent two-level logic circuit.

Reduced (silicon) area Decreased cost

Requires less complex wiring between logic gates 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

51

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.

52

Multilevel Logic Circuits

Two techniques that can be used to realize multilevel logic circuits:

1. Factoring

2. Functional Decomposition

53

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

54

Factoring

Example:

Design the minimum-cost logic circuit that implements the following Boolean expressions.

F1(A,B,C,D) = m(1,2,3,7,11,15)

F2(A,B,C,D) = M(0,1,2,3,4,8,12)

55

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

56

NAND and NOR Circuits

As with two-level circuits, multilevel circuits can be realized using NAND or NOR gates only.

57

NAND and NOR Circuits

Example:

Realizing a NAND Circuit

58

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5

x 6 x 7

f

59

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5 x 6

x 7

f

60

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5

x 6

x 7

f

61

NAND and NOR Circuits

Example:

Realizing a NOR Circuit

62

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5

x 6 x 7

f

63

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5

x 6

x 7

f

64

NAND and NOR Circuits

x 2

x 1

x 3

x 4

x 5

x 6 x 7

f

65

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 gate-based circuit

For each output, create a circuit corresponding to the output’s equation. (Sharing gates among multiple outputs is OK optionally.)

66

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 descriptions1.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 designo Solve each output separately

top related