Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw...

Post on 22-Dec-2015

230 views 3 download

Tags:

Transcript of Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang canseco@mail.dyu.edu.tw...

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

Using GatesUsing Gates

Ku-Yaw ChangKu-Yaw Changcanseco@mail.dyu.edu.twcanseco@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

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

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

Propagation DelayPropagation Delay

In nanoseconds

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

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

Timing Diagram With DelayTiming Diagram With Delay

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

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

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

Types of HazardsTypes of Hazards

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

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

A Static 1-hazardA Static 1-hazard

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.

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

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

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

0-hazards0-hazards

=0

=0 =1

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’)

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

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

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

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

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

SimulationSimulation

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

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

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.