Docsity

Digital Logic: Multiple-Output Circuits and Multilevel Synthesis - Prof. Susan Lysecky, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
ECE 274 - Digital Logic
Lecture 9
Lecture 9 – Chapter 4.5 to Chapter 4.8
Multiple-Output Circuits
Multilevel Synthesis
Analysis of Multilevel Circuits
Cubical Representation
2
ECE 274 - Digital Logic
Multiple-Output Circuits
Some circuits require multiple
outputs
Seven-segment display
example
Can we create a less
expensive circuit by sharing
overlapping gates?
a
f
b
d
g
e
c
3
ECE 274 - Digital Logic
Multiple-Output Circuit Example – Seven-Segment Display
a = w’x’y’z’ + w’x’yz’ + w’x’yz + w’xy’z + w’xyz’ + w’xyz + wx’y’z’ + wx’y’z
b = w’x’y’z’ + w’x’y’z + w’x’yz’ + w’x’yz + w’xy’z’ + w’xyz + wx’y’z’ + wx’y’z
w’
x’
y’
z’
w’
x’
y
z’
w’
x’
y
z
w’
x
y
z
w
x’
y’
z’
w
x’
y’
z
w’
x
y’
z
w’
x
y
z’
w’
x’
y’
z
w’
x
y’
z’
a
b
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Digital Logic: Multiple-Output Circuits and Multilevel Synthesis - Prof. Susan Lysecky and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Lecture 9

„ Lecture 9 – Chapter 4.5 to Chapter 4.

„ Multiple-Output Circuits

„ Multilevel Synthesis

„ Analysis of Multilevel Circuits

„ Cubical Representation

ECE 274 - Digital Logic

Multiple-Output Circuits

„ Some circuits require multiple outputs

„ Seven-segment display

example

„ Can we create a less expensive circuit by sharing overlapping gates?

a f b

d

g e c

ECE 274 - Digital Logic

Multiple-Output Circuit Example – Seven-Segment Display

a = w’x’y’z’ + w’x’yz’ + w’x’yz + w’xy’z + w’xyz’ + w’xyz + wx’y’z’ + wx’y’z

b = w’x’y’z’ + w’x’y’z + w’x’yz’ + w’x’yz + w’xy’z’ + w’xyz + wx’y’z’ + wx’y’z

w’x’ y’z’ w’x’ yz’ w’x’ yz w’x yz wx’ y’z’ wx’ y’z w’x y’z w’x yz’ w’x’ y’z w’x y’z’

a

b

0 0 1 1

00 01 11 10

0 0

00

01 1 1

1 1 1 0

1 1

11

10 0 0

f2 (^) x3x x1x

Multiple-Output Circuits Example 2

„ We can also use K-maps and share same optimized variables

„ Find low cost implementation of each function

„ Group like variables

0 0 1 1

00 01 11 10

0 1

00

01 1 1

1 1 0 0

1 1

11

10 0 0

f1 (^) x3x x1x x x3’ x x x3’ x1’ x x x x

f

f

f1 = x1x3’ + x1’x3 + x2x3’x

f2 = x1x3’ + x1’x3’ + x2x3x

0 0 0 0

00 01 11 10

1 0

00

01 1 1

1 0 1 1

0 1

11

10 0 0

f4 (^) x3x x1x

ECE 274 - Digital Logic

Multiple-Output Circuits Example 3

„ Let’s try another example, same procedure

„ Find low cost implementation of each function

„ Group like variables

f3 = x1’x4 + x2x4 + x1’x2x

0 0 0 0

00 01 11 10

1 1

00

01 1 0

1 1 1 0

0 1

11

10 0 0

f3 (^) x3x x1x

f4 = x1x4 + x2’x4 + x1’x2x3x4’

x2’ x x1’ x

f

f

x1’ x x x x

x1’ x x x

x x4’

nothing to combine

ECE 274 - Digital Logic

Multiple-Output Circuits Example 3 Alternative Strategy

„ Using same K-maps, let’s try something different

„ Try to find overlapping implicants found in both maps

„ Then try to find minimum cover for each

f3b = x1x2x4 + x1’x2x3x4’ + x1’x

0 0 0 0

00 01 11 10

1 1

00

01 1 0

1 1 1 0

0 1

11

10 0 0

f3 (^) x3x x1x

f4b = x1x2x4 + x1’x2x3x4’ + x2’x

0 0 0 0

00 01 11 10

1 0

00

01 1 1

1 0 1 1

0 1

11

10 0 0

f4 (^) x3x x1x

x2’ x

f

f

x1’ x

x

x1’ x

x x

x x4’

we could also group x2x3’x4’ – but it would increase implementation cost (try it out)

Multi-level Functions as A Solution to the Fan-in Problem

„ Solution : Multilevel logic expression

„ Logic equation in a form with

more than two levels of logic

„ How do we synthesize multilevel circuits?

„ Factoring

„ Functional Decomposition

e f g

a b c d

f3 = (ab + cd) + efg

f

f4 = x1x4 + x2’x4 + x1’x2x

x2’ x x2’ x

x x

x x

f

ECE 274 - Digital Logic

Factoring

„ We can take advantage of distributive property

„ How much factoring should we perform?

„ Assume we can have a maximum fan-in of 2

12a. x · (y + z) = xy + xz 12b. x + y · z = (x+y) · (x+z)

out = af’c + af’de + bgc + bgde

out

af’

af’ c

ed

bg

bg c

ed

f = af’c + af’de + bgc + bgde f = af’(c + de) + bg(c + de) f = (af’ + bg)(c + de)

f = (af’ + bg)(c + de)

c d e

b g

a f’

f

ECE 274 - Digital Logic

Factoring Example 2

„ Implement F = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x

„ Assume we can only have a fan-in of 4

F = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x

F

x4’ x

x1x2’ x

x

x4’ x5’

x1x x3’

x

f = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x

f = x1x4’x6(x2’x3x5 + x2x3’x5’)

f = x1x4’x6(x2’x3x5 + x2x3’x5’)

f

x2’ x x x x3’ x5’ x x4’ x

Factoring Example 3

„ Design a circuit with the following specifications

„ Four inputs x1, x2, x3, x

„ Output f1 must be 1 when „ At least one of the inputs x1 and x2 is equal to 1 and both x3 and x4 are equal to 1 „ x1 and x2 are equal to 0 and either x3 or x4 is equal to 1

„ All other cases f1 is 0

„ Output f2 is 1 in all cases, except „ x1 and x2 are equal to 0, or when both x3 and x4 are equal to 0

f1= (x1+x2)x3x4 + x1’x2’(x3+x4) f2’= x1’x2’ + x3’x4’

f1= x3x4 + x1’x2’(x3+ x4)

f2’’= (x1’x2’ + x3’x4’)’

Simplification f2= (x1 +x2)(x3 + x4)

DeMorgan’s Law

ECE 274 - Digital Logic

Factoring Example 3

f1= x3x4 + x1’x2’(x3+ x4) f2= (x1 +x2)(x3 + x4)

f1= x3x4 + (x1+x2)’(x3+ x4) DeMorgan’s Lawx1’x2’ = (x1 + x2)’

x x

x x f

f

We can share (x3 + x4) We can share (x1 + x2)

ECE 274 - Digital Logic

Functional Decomposition

„ Solution : Multilevel logic expression

„ Logic equation in a form with

more than two levels of logic

„ How do we synthesize multilevel circuits?

„ Factoring

„ Functional Decomposition

e f g

a b c d

f3 = (ab + cd) + efg

f

f4 = x1x4 + x2’x4 + x1’x2x

x2’ x x2’ x

x x

x x

f

replace two-level logic equation with two or more new expressions which are then combined to define multilevel circuit

Functional Decomposition Example 2

„ Example 2 cont’

ab

cd 00 01 11 10 00

01

ab

cd 00 01 11 10 00

01

e = 0 e = 1

What about these 1s?

F 2 = c’d’e’(a’b’ + ab)

F 2 = (e + c + d)’(a’b + ab’)’

c’d’e’ = (e+c+d) DeMorgan’s Law (a’b’ + ab) = (a’b + ab’)’ Shown in example1, step 3

ECE 274 - Digital Logic

Functional Decomposition Example 2

„ Example 2 cont’

ab

cd 00 01 11 10 00

01

ab

cd 00 01 11 10 00

01

e = 0 e = 1

To cover all 1’s combine F 1 and F (^2)

F = F 1 + F 2

F 2 = (e + c + d)(a’b + ab’) + (e + c + d)’(a’b’ + ab)’

Assume g = (e + c + d) k = (a’b + ab’)

F = kg + k’g’

ECE 274 - Digital Logic

Functional Decomposition Example 2

„ How did we do?

„ Minimum sum-of-products form

„ F = x1x3’x4 + x1x3x4’ + x2x3’x4 + x2x3x4’ + x3’x4x5 + x3x4’x5 + x1’x2’x3’x4’x5’ + x1’x2’x3x4x5’

„ Decomposed equation

„ F = kg + k’g’ „ g = e + c + d „ k = a’b + ab’ (^) cost = 9 + 36 = 45

fan-in = 8 delay = 2 gate-delay

cost = 7 + 15 = 22 fan-in = 3 delay = 4 gate-delay

XOR/XNOR Logic Gates

„ Other basic logic gates in addition to AND, OR, NOT, NAND, NOR

„ XOR gate – exclusive OR

„ Similar to OR gate, except outputs 0 when both inputs are 1 „ True whenever an odd number of inputs is true

„ XNOR gate – obtained by complementing XOR gate

„ Inversion bubble on output to represent the complement output signal „ XNOR is the opposite output from XOR, thus true whenever even number of true inputs

a b F 0 1 0 1

XOR

x x

(x1 + x2)’

a b F 0 1 0 1

XNOR

x x

(x1 + x2)’

ECE 274 - Digital Logic

XOR Gate Implementation

„ Let’s build XOR gate using two-level

AND/OR gates

„ We can also implement using only NAND

gates

„ Invert can be implemented by tying both

inputs together ((0·0)’ = 1 and (1·1)’ = 0)

a b F 0 1 0 1

XOR

x x

(x1 + x2)’

F = ab’ + a’b

F

a

b

F = (a’ + b)’ + (a + b’)’

F = ((a’ + b) · (a + b’))’

F = ((a · b’)’ · (a’ · b)’)’

F

a

b

F

a

b

ECE 274 - Digital Logic

Improved XOR Gate Implementation Using Functional Decomposition

„ Can we use functional decomposition to find a better implementation?

F = ((a · b’)’ · (a’ · b)’)’

(a · b’)’ = (a · b’ + 0)’

= (a · b’ + a · a’)’

= (a · (b’ + a’))’

= (a · (a’ + b’))’

= (a · (a · b)’)’

(a’ · b)’ = (a’ · b + 0)’

= (a’ · b + b · b’)’

= (b · (a’ + b’))’

= (b · (a · b)’)’

We found a common term! g = (a · b)’

F = ((a · g)’ · (b · g)’)’

Multilevel NAND Gate Synthesis

„ Convert to NAND-gate circuit

x x x

F

x x

x

x

x x

x

F

x x

x

x

x x

x x

DeMorgan’s Theorem

x x

x x

Truth table def.

ECE 274 - Digital Logic

Multilevel NOR Gate Synthesis

„ Convert same initial circuit to NOR-

gate circuit

x x x

F

x x

x

x

DeMorgan’s Theorem x x

x x

x x x

F

x x

x

x

ECE 274 - Digital Logic

Multilevel NOR Gate Synthesis

„ Convert same initial circuit to NOR-

gate circuit

DeMorgan’s Theorem x x

x x

x x x

F

x x

x

x

x x x

F

x x

x

x

Analysis of Multilevel Circuits

„ We’ve shown how to create various multilevel circuit

„ Given a multilevel circuit, can we determine what function it implements?

F = ((a · b’)’ · (a’ · b)’)’

F

a

b

F = (x1’x2 + x1x2’)gx3 + (x1’x2 + x1x2’)’x

x

x

x x2’

x1’ x f

ECE 274 - Digital Logic

Analysis of Multilevel Circuits – Example 1

„ Determine function implemented by multilevel circuit below

„ Consider internal points

x x x

F

x x

x

x

P

P1 = x2x

P

P2 = x5 + x P3 P3 = x1 + P1 = x1 + x2x

P

P4 = x4P2 = x4(x5 + x6)

P

P5 = P4 + x7 = x4(x5 + x6) + x

F = P3P

= (x1 + x2x3)(x4(x5 + x6) + x7) = (x1 + x2x3)(x4x5 + x4x6 + x7) = x1x4x5 + x1x4x6 + x1x7 + x2x3x4x5 + x2x3x4x6 + x2x3x

ECE 274 - Digital Logic

Analysis of Multilevel Circuits – Example 2

„ Determine function implemented by multilevel circuit

„ Slightly more difficult because each gate

involves an inversion

x5 F

x x

x

x

P

P1 = (x1x2)’

P

P2 = (P1x3)’

P

P3 = (P2x4)’

F = (P3x5)’

x x

x x

DeMorgan’s Theorem

= P3’ + x5’ = (P2x4)’’ + x5’ = P2x4 + x5’ = (P1x3)’x4 + x5’ = (P1’ + x3’)x4 + x5’ = P1’x4 + x3’x4 + x5’ = (x1x2)’’x4 + x3’x4 + x5’ = x1x2x4 + x3’x4 + x5’

Cubical Representation

„ Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1

b

a 00 10

Four corners are vertices , correspond to four rows of truth table

horizontal coordinate corresponds to a variable vertical coordinate corresponds to b variable

Each vertex has two coordinates

a = 0, b = 1

ECE 274 - Digital Logic

Cubical Representation

„ Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1

b

a 00 10

Map function onto cube by indicating with blue circles those vertices for which F = 1

Express function as a set of vertices F = {01, 10, 11}

ECE 274 - Digital Logic

Cubical Representation

„ Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1

b

a 00 10

Notice vertices only differ by one variable

Edge joins two vertices (where F=1) differ in value by one variable

1x

x

x denotes variable can be 1 or 0 single edge denotes combining property (14a) xy’ + xy = x

Cubical Representation

„ Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1

b

a 00 10

1x

x

denotes a

denotes b

Edges x1 and 1x fully define the function f = {1x, x1}

Corresponds to f = a + b

ECE 274 - Digital Logic

Cubical Representation

„ Three-dimensional cube

b

a

Eight corners are vertices , correspond to eight rows of truth table

Each vertex has three coordinates

c 000 100

a b c F 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0

ECE 274 - Digital Logic

Cubical Representation

„ Three-dimensional cube

Map function on cube with blue vertices

a b c F 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0

b

a

c 000 100