Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang [email protected]...

23
Unit 8 Unit 8 Combinational Combinational Circuit Design and Circuit Design and Simulation Using Simulation Using Gates Gates Ku-Yaw Chang Ku-Yaw Chang [email protected] [email protected] Assistant Professor, Department of Assistant Professor, Department of Computer Science and Information Engineering Computer Science and Information Engineering Da-Yeh University Da-Yeh University

Transcript of Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang [email protected]...

Page 1: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

Unit 8Unit 8Combinational Circuit Combinational Circuit Design and Simulation Design and Simulation

Using GatesUsing Gates

Ku-Yaw ChangKu-Yaw [email protected]@mail.dyu.edu.tw

Assistant Professor, Department of Assistant Professor, Department of Computer Science and Information EngineeringComputer Science and Information Engineering

Da-Yeh UniversityDa-Yeh University

Page 2: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

222004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

ContentsContents

8.18.1 Review of Combinational Circuit DesignReview of Combinational Circuit Design

8.28.2 Design Circuits with Limited Gate Fan-InDesign Circuits with Limited Gate Fan-In

8.38.3 Gate Delays and Timing DiagramsGate Delays and Timing Diagrams

8.48.4 Hazards in Combinational LogicHazards in Combinational Logic

8.58.5 Simulation and Testing of Logic CircuitsSimulation and Testing of Logic Circuits

Page 3: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

332004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Propagation DelayPropagation Delay

In nanoseconds

Page 4: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

442004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Timing DiagramTiming Diagram

Frequently used in the analysis of sequential Frequently used in the analysis of sequential circuitscircuits

Page 5: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

552004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Timing Diagram With DelayTiming Diagram With Delay

Page 6: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

662004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

ContentsContents

8.18.1 Review of Combinational Circuit DesignReview of Combinational Circuit Design

8.28.2 Design Circuits with Limited Gate Fan-InDesign Circuits with Limited Gate Fan-In

8.38.3 Gate Delays and Timing DiagramsGate Delays and Timing Diagrams

8.48.4 Hazards in Combinational LogicHazards in Combinational Logic

8.58.5 Simulation and Testing of Logic CircuitsSimulation and Testing of Logic Circuits

Page 7: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

772004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

HazardsHazards

When the input to a combinational circuit When the input to a combinational circuit changes, unwanted switching transients changes, unwanted switching transients may appear in the output.may appear in the output. Different pathsDifferent paths Different propagation delaysDifferent propagation delays

Page 8: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

882004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Types of HazardsTypes of Hazards

Page 9: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

992004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

A Static 1-hazardA Static 1-hazard

A = C = 1A = C = 1 F = AB’ + BC = B + B’ = 1F = AB’ + BC = B + B’ = 1 F should remain a constant 1 when B changes F should remain a constant 1 when B changes

from 1 to 0.from 1 to 0.

AssumptionAssumption A propagation delayA propagation delay

of 10 nsof 10 ns

Page 10: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

10102004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

A Static 1-hazardA Static 1-hazard

Page 11: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

11112004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Hazard DetectionHazard Detection

Write down the sum-of-products expression for Write down the sum-of-products expression for the circuit.the circuit.

Plot each term on the map and loop it.Plot each term on the map and loop it.

If any two adjacent 1’s are not covered by the If any two adjacent 1’s are not covered by the same loop, a 1-hazard exists for the transition same loop, a 1-hazard exists for the transition between the two 1’s.between the two 1’s.

Page 12: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

12122004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Hazard RemovalHazard Removal

Add a loop on the Karnaugh mapAdd a loop on the Karnaugh map Corresponding gateCorresponding gate

Page 13: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

13132004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

0-hazards0-hazards

Product of sumsProduct of sums F = (A+C)(A’+D’)(B’+C’+D)F = (A+C)(A’+D’)(B’+C’+D)

Four pairs of adjacent 0’s Four pairs of adjacent 0’s that are not covered by a that are not covered by a common loopcommon loop Each corresponds to a 0-Each corresponds to a 0-

hazardhazard

Page 14: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

14142004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

0-hazards0-hazards

=0

=0 =1

Page 15: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

15152004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Removing HazardsRemoving Hazards

Eliminate the 0-hazardsEliminate the 0-hazards F=(A+C)(A’+D’)(B’+C’+D)F=(A+C)(A’+D’)(B’+C’+D)(C+D’)(A+B’+D)(C+D’)(A+B’+D)

(A’+B’+C’)(A’+B’+C’)

Page 16: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

16162004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

ContentsContents

8.18.1 Review of Combinational Circuit DesignReview of Combinational Circuit Design

8.28.2 Design Circuits with Limited Gate Fan-InDesign Circuits with Limited Gate Fan-In

8.38.3 Gate Delays and Timing DiagramsGate Delays and Timing Diagrams

8.48.4 Hazards in Combinational LogicHazards in Combinational Logic

8.58.5 Simulation and Testing of Logic CircuitsSimulation and Testing of Logic Circuits

Page 17: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

17172004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

VerificationVerification

Building a circuitBuilding a circuit

Simulating a circuit on a computerSimulating a circuit on a computer EasierEasier FasterFaster More economicalMore economical

Page 18: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

18182004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Simulation StepsSimulation Steps

First, specify the circuit component and First, specify the circuit component and connectionsconnections

Second, specify the circuit inputsSecond, specify the circuit inputs

Finally, observe the circuit outputsFinally, observe the circuit outputs

Page 19: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

19192004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

SimulationSimulation

Two logic values, 0 and 1, are not Two logic values, 0 and 1, are not sufficientsufficient A gate input or output maybe unknownA gate input or output maybe unknown

Represented by XRepresented by X An open circuit, or high impedance (hi-Z)An open circuit, or high impedance (hi-Z)

Represented by ZRepresented by Z

Four-value logic simulatorFour-value logic simulator 0, 1, X, Z0, 1, X, Z

Page 20: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

20202004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

SimulationSimulation

Page 21: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

21212004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Possible CausesPossible Causes

SimulationSimulation Incorrect designIncorrect design Gates connected wrongGates connected wrong Wrong input signals to the circuitWrong input signals to the circuit

Built in labBuilt in lab Defective gatesDefective gates Defective connecting wiresDefective connecting wires

Page 22: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

22222004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Incorrect OutputIncorrect Output

F = AB(C’D+CD’) + A’B’(C+D)F = AB(C’D+CD’) + A’B’(C+D) A=B=C=D=1A=B=C=D=1

The output F has the wrong valueThe output F has the wrong value

Page 23: Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science.

23232004/03/112004/03/11 Fundamentals of Logic DesignFundamentals of Logic Design

Homework #2Homework #2

1.1. 8.18.1

2.2. 8.28.2

3.3. 8.38.3

4.4. 8.48.4

5.5. 8.58.5

Paper Submission, due on April 1, 2004.Late submission will not be accepted.