22
Chapter 8. Combinational Circuit Design and Simulation Using Gates

Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

Chapter 8. Combinational Circuit Design and Simulation Using Gates

Page 2: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 2

Design of Circuits with Limited Gate Fan-in

◈ In practical logic design problems, the maximum number of inputson each gate is limited

◈ Example: Realize using 3-input NOR gate

8.2 Design of Circuits with Limited Gate Fan-in

f a b c d m( , , , ) ( , , , , , , , , )=∑ 0 34 58 9101415

Page 3: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 3

Resulting NOR-Gate Circuit

f b d a c a c b d abcf b d a c a c a c b d a b c' ' ( ' ' ) ' ( ' ) '

[ ' ( )( ' ' )][ ' ' ][ ' ' ' ]= + + += + + + + + + + +

8.2 Design of Circuits with Limited Gate Fan-in

Page 4: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 4

Minimizing Each Function

◈Even if the two-level expressions had common terms, most of these common terms would be lost when the expressions were factored.

◈Therefore, when designing multiple-output circuits with more than two levels, it is usually best to minimize each function separately.

8.2 Design of Circuits with Limited Gate Fan-in

Page 5: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 5

Minimizing Each Function

◈Example: Realize the functions given in Figure 8-2,

using only 2-input NAND gates and inverters.

If we minimize each function separately, the result is

Figure 8-2

f b c ab a bf b c bc a bf a b c ab bc

1

2

3

= + += + += + +

' ' ' '' ' '' ' '

8.2 Design of Circuits with Limited Gate Fan-in

Page 6: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 6

Realization of Example

Figure 8-3: Realization of Figure 8-2

a b c a b c a b c' ' ' ( ' ) ' ( ' )'= = +

f b c b c a b2 = + + + +( ' ) ( ' ) 'f b a c a bf b a c b cf a b c b a c

1

2

3

= + += + += + +

' ( ' ') '( ' ) ' '' ' ( ')

OR

8.2 Design of Circuits with Limited Gate Fan-in

Page 7: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 7

Gate Delays

◈When the input to a logic gate is changed, the output will not change instantaneously

◈The transistors or other switching elements within the gate take a finite time to react to a change in input, so that the change in the gate output is delayed with respect to the input change

8.3 Gate Delays and Timing Diagrams

Page 8: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 8

Propagation Delay in an Inverter

◈ Propagation Delay in an Inverter

8.3 Gate Delays and Timing Diagrams

Page 9: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 9

Timing Diagram

◈Timing Diagrams are frequently used in the analysis of sequential circuits

◈These diagrams show various signals in the circuit as a function of time

◈Timing Diagram for AND-NOR Circuit

8.3 Gate Delays and Timing Diagrams

Page 10: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 10

Timing Diagram for Circuit with Delay

◈Timing Diagram for Circuit with Delay

8.3 Gate Delays and Timing Diagrams

Page 11: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 11

Hazards in Combinational Logic

◈Hazards

When the input to a combinational circuit changes, unwanted switching transients may appear in the output. These transients occur when different paths from input to output have different propagation delays.

◈ Types of Hazards

8.4 Hazards in Combinational Logic

Page 12: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 12

Detecting Hazards

◈ The procedure of detecting hazards in a two-level AND-OR circuit

1. Write down the SOP expression for the circuit

2. Plot each term on the map and loop it

3. If any two adjacent 1’s are not covered by the same loop, a 1-hazard exists for the transition between the two 1’s. For an n-variable map, this transition occurs when one variable changes and the other n-1 variables are held constant

8.4 Hazards in Combinational Logic

Page 13: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 13

Detection of a 1-Hazard

◈ Detection of a 1-Hazard

8.4 Hazards in Combinational Logic

Page 14: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 14

Circuit with Hazard Removed

◈Circuit with Hazard Removed

8.4 Hazards in Combinational Logic

Page 15: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 15

Detection of a Static 0-Hazard

◈ Detection of a Static 0-Hazard

F A C A D B C D= + + + +( )( ' ' )( ' ' )

8.4 Hazards in Combinational Logic

Page 16: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 16

Karnaugh Map Removing Hazards

◈ Karnaugh Map Removing Hazards

F A C A D B C D C D A B D A B C= + + + + + + + + +( )( ' ' )( ' ' )( ' )( ' )( ' ' ' )

8.4 Hazards in Combinational Logic

Page 17: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 17

Simulation and Testing of Logic Circuit

◈An important part of the logic design process is verifying that the final design is correct and debugging the design if necessary.

◈Logic circuits may be tested either by actually building them or by simulating them on a computer

◈SimulationVerification that the design is logically correct

Verification that the timing of the logic signals is correct

Simulation of faulty components in the circuit as an aid to finding tests for the circuit

8.5 Simulation and Testing of Logic Circuits

Page 18: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 18

Simple Simulator

◈ Simple simulator for combinational logic

1. The circuit inputs are applied to the first set of gates in the circuit, and the outputs of those gates are calculated.

2. The outputs of the gates which changed in the previous step are fed into the next level of gate inputs. If the input to any gate has changed, then the output of that gate is calculated.

3. Step 2 is repeated until no more changes in gate inputs occur. The circuit is then in a steady-state condition, and the outputs may be read.

4. Step 1 through 3 are repeated every time a circuit input changes

8.5 Simulation and Testing of Logic Circuits

Page 19: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 19

Typical Simulation Screen

8.5 Simulation and Testing of Logic Circuits

Page 20: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 20

Four-Valued Simulation

◈X (Unknown Value)

At times, the value of a gate input or output may be unknown

◈Z (High Impedance)

No logic signal at an input

◈ And and OR Functions for Four-Valued Simulation

0 0 0 0

0 1 X X

0 X X X

0 X X X

0

1

X

Z

0 1 X Zx

0 1 1 1

1 1 1 1

X 1 X X

X 1 X X

0

1

X

Z

0 1 X Z+

8.5 Simulation and Testing of Logic Circuits

Page 21: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 21

Testing of Logic Circuits

◈ A combinational logic circuit with a small number of inputs may easily be tested with a simulator or in lab by checking the circuit outputs for all possible combinations of the input values

◈ When the number of inputs is large, it is usually possible to find a relatively small set of input test patterns which will test for all possible for all possible faulty gates in the circuit

◈ Several causes of the faulty circuit

Incorrect design

Gates connected wrong

Wrong input signals to the circuit

Defective gates

Defective connecting wires

8.5 Simulation and Testing of Logic Circuits

Page 22: Chapter 8. Combinational Circuit Design and Simulation Using Gatessoc.yonsei.ac.kr/class/material/logic/CH8.pdf · 2017-03-06 · 8 -18 Simple Simulator Simple simulator for combinational

8 - 22

Logic Circuit with Incorrect Output

◈Example

F AB CD CD A B C D= + + +( ' ' ) ' ' ( )

8.5 Simulation and Testing of Logic Circuits