chapter3.1

advertisement

Logic and Computer Design Fundamentals

Chapter 3 – Combinational

Logic Design

Part 1- Implementation Technology and Logic

Design

Overview

 Part 1-Implementation Technology and Logic

Design

• Design Concepts

 Fundamental concepts of design Design Procedure

 The major design steps: specification, formulation, optimization, technology mapping, and verification

• Technology Mapping

 From AND, OR, and NOT to other gate types

• Verification

 Does the designed circuit meet the specifications?

Chapter 3 - Part 1 CAP223 2

Overview

 Part 2 – Combinational Logic

• Rudimentary logic functions

• Decoding

• Encoding

• Selecting

Chapter 3 - Part 1 CAP223 3

Combinational Circuit

 A combinational logic circuit has:

• A set of n Boolean inputs,

• A set of m Boolean outputs, and

• Logic gates and interconnections

Chapter 3 - Part 1

Block Diagram of Combinational Circuit

CAP223 4

Combinational Circuit

 The combinational circuit can be described by:

• Truth table that lists the output values for each of combination of the input variables m Boolean functions, one for each output variable. Each functioned is expressed as a function of n input variables

Chapter 3 - Part 1 CAP223 5

Analysing Logic Circuit

 When a logic circuit is provided, we can analyse the circuit to obtain the logic expression.

 Example: What is the Boolean expression of

F4?

A'

A'B'

B'

A'B'+C (A'B'+C)'

F4

C

F4 = (A'B'+C)' = (A+B).C'

Chapter 3 - Part 1 CAP223 6

Designing circuits

 The goal in circuit design is to build hardware that solves some problem.

 The basic approach is to express the solution as a Boolean function, which can then be converted to a circuit.

Chapter 3 - Part 1 CAP223 7

Design Procedure

1.

Specification

• make sure you completely understand all the design requirements

2.

Formulation

• Figure out how many inputs and outputs you need.

• Assign letter symbols to the input and output variables

• Derive a truth table or initial Boolean equations that define the required relationships between the inputs and outputs.

Chapter 3 - Part 1 CAP223 8

Design Procedure-continued

3.

Optimization

• Find a simplified Boolean expression for the function.

• Draw a logic diagram using ANDs, ORs, and inverters

Chapter 3 - Part 1 CAP223 9

Design Procedure-continued

4.

Technology Mapping

• Map the logic diagram to the implementation technology selected

5.

Verification

• Verify the correctness of the final design

Chapter 3 - Part 1 CAP223 10

EXAMPLE

 PROBLEM : Design a combinational circuit with 3 inputs (A, B, C) and 1 output, f such that

• f is 1 when all 3 inputs are 1, or

• f is 1 when a is 1 and either b or c is 1, or

• f is 1 when all three inputs are 0

Chapter 3 - Part 1 CAP223 11

Create a Truth Table

 List all possible inputs and outputs:

A B C F

0 0 0 1

F is one when: all three inputs are 1

A is 1 and either B or C is 1 all three inputs are 0

F is zero for all other inputs

Chapter 3 - Part 1 CAP223

1 1 0 1

1 1 1 1

12

SOP Equation

Chapter 3 - Part 1

 Use a Kmap to find the reduced SOP expression

A B C F

A

B

C

00 01 11 10

0 1

1 1 1 1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1 1

CAP223 13

Circuit

 The final circuit:

A

B

C

Chapter 3 - Part 1 CAP223

ABC

AB

AC

14

Example: comparing 2-bit numbers

 Design a circuit that compares two 2-bit numbers, A and B. There are three possible results: A > B, A = B or A < B.

Chapter 3 - Part 1 CAP223 15

Step 1: How many inputs and outputs?

 How many inputs and outputs will this circuit have?

• Two 2-bit numbers means a total of four inputs.

Let’s say the first number consists of bits called

A1and A0(from left to right), while second number has bits B1and B0.

• Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal).

Chapter 3 - Part 1 CAP223 16

Step 1: How many inputs and outputs? (continued )

 We will represent the results using three separate outputs.

• G (“Greater”) should be 1 only when A > B.

• E (“Equal”) should be 1 only when A = B.

• L (“Lesser”) should be 1 only when A < B.

• For any inputs A and B, exactly one of the three outputs will be1.

Chapter 3 - Part 1 CAP223 17

Step 1: How many inputs and outputs? (continued )

 Here is a block diagram that shows the inputs and outputs explicitly.

 Now the hard part is to design the circuitry that goes inside the box.

Chapter 3 - Part 1 CAP223 18

Step 2: Functional specification

Chapter 3 - Part 1 CAP223 19

Step 3: Simplified Boolean expressions

 use K-maps to simplify the circuit. There are three functions (each with the same inputs A1 A0 B1 B0), so we need three Kmaps.

Chapter 3 - Part 1 CAP223 20

Step 3: Simplified Boolean expressions (continued)

Chapter 3 - Part 1 CAP223 21

Step 4: Drawing the circuits

Chapter 3 - Part 1 CAP223 22

Mapping to NAND gates

 The mapping is accomplished by:

• Replacing AND and OR symbols,

• Pushing inverters through circuit fan-out points, and

• Canceling inverter pairs

Chapter 3 - Part 1 CAP223 23

NAND Mapping Algorithm

1.

Replace ANDs and ORs:

.

.

.

.

.

.

.

.

.

.

.

.

a+b= a . b

2.

Repeat the following pair of actions until there is at most one inverter between : a.

A circuit input or driving NAND gate output, and b.

The attached NAND gate inputs.

.

.

.

.

.

.

Chapter 3 - Part 1 CAP223 24

NAND Mapping Example

Chapter 3 - Part 1 CAP223 25

Mapping to NOR gates

 The mapping is accomplished by:

• Replacing AND and OR symbols,

• Pushing inverters through circuit fan-out points, and

• Canceling inverter pairs

Chapter 3 - Part 1 CAP223 26

NOR Mapping Algorithm

1.

Replace ANDs and ORs:

.

.

.

.

.

.

ab= a + b

.

.

.

.

.

.

2.

Repeat the following pair of actions until there is at most one inverter between : a.

A circuit input or driving NOR gate output, and b.

The attached NOR gate inputs.

.

.

.

.

.

.

Chapter 3 - Part 1 CAP223 27

NOR Mapping Example

A

B

C

D

E

Chapter 3 - Part 1

(a)

C

D

E

A

B

F

C

D

E

A

B

(c)

1

X

3

2

(b)

CAP223

F

28

F

Download