Docsity

Standard Combinational Modules - Design Techniques for Digital Systems - Lecture Slides, Slides of Digital Systems Design

Partial preview of the text

Download Standard Combinational Modules - Design Techniques for Digital Systems - Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!

1

Standard Combinational Modules

2

Part III - Standard Combinational

Modules

  • Decoder: Decode address
  • Encoder: Encode address
  • Multiplexer (Mux): Select data by address
  • Demultiplexier (DeMux): Direct data by address
  • Shifter: Shift bit location
  • Adder: Add two binary numbers
  • Multiplier: Multiply two binary numbers

4

1. Decoder

• Definition

• Logic Diagram

• Application (Universal Set)

• Tree of Decoders

5

1. Decoder: Definition

0

y 0 y 1

y 7

I 0 I 1 I 2

1 2

0 1 2 3 4 5 6 7

EN (enable)
n inputs
n= 3
2 n^ outputs

yi = 1 if En= 1 & (I2, I1, I 0 ) = i

yi= 0 otherwise

n to 2n^ decoder

function:

. .

7

Decoder: Logic Diagram

y 0 I 2 ’

I 1 ’

I 0 ’

y 1 I 2

I 1 ’

I 0 ’

En

y 7 I 2

I 1

I 0

. .

yi = mi En

y 0 = 1 if (I2, I1, I 0 ) = (0,0,0) & En = 1
y 7 = I 0 I 1 I 2 En

8

Decoder Application: universal set {Decoder, OR}

Example: Implement functions f 1 (a,b,c) =^ Sm(1,2,4)
f 2 (a,b,c) = Sm(2,3), and f 3 (a,b,c) = Sm(0,5,6)
with a 3-input decoder and OR gates.

I 0

y 0 y 1 . . y 7

c b a

I 1 I 2

0 1 2 3 4 5 6 7

En

y 1 y 2 y 4 f 1

y 2

y 3 f 2

y 0

y 6 f 3

y 5

10

Tree of Decoders

Implement a 4-2^4 decoder with 3-2^3 decoders.

I 0

y 0 y 1

y 7

I 1 I 2

0 1 2 3 4 5 6 7

I 0

y 8 y 9

y 15

I 1 I 2

0 1 2 3 4 5 6 7 a
d
c
b

11

Implement a 6-2^6 decoder with 3-2^3 decoders.

En

I2, I1, I (^0) D 0

D 1

y 0
y 7
y 8
y 15

D 7

y 56
y 63

En

I2, I1, I 0

I2, I1, I 0

I5, I4, I 3

Tree of Decoders

13

2. Encoder: Definition

yn-1 …y 0
En
A
I 2 n-1…I 0
8 inputs 3 outputs

y 0 y 1 y 2

0 1 2 3 4 5 6 7

En
At most one Ii = 1.
(yn-1,.., y 0 ) = i if Ii = 1 & En = 1
(yn-1,.., y 0 ) = 0 otherwise.
A = 1 if En = 1 and one i s.t. Ii = 1
A = 0 otherwise.

Encoder Description:

A

I 0

I 7

0 1 2

14

Encoder: Logic Diagram

En

I 1 I 3 I 5 I 7

y 0

En

I 2 I 3 I 6 I 7

y 1

16

Priority Encoder: Definition

Description: Input (I 2 n-1,…, I 0 ), Output (yn-1 ,…,,y 0 )
(yn-1 ,…,,y 0 ) = i if Ii = 1 & En = 1 & Ik = 0 for all k > i.
Eo = 1 if En = 1 & Ii = 0 for all i,
Gs = 1 if En = 1 & i s.t. Ii = 1.

E

(Gs is like A, and Eo tells us if enable is true or not).

0 1 2 3 4 5 6 7

En

Eo Gs

I 0

I 7

y 0 y 1 y 2

0 1 2

17

Priority Encoder: Implement a 32-input priority

encoder w/ 8 input priority encoders (high bit priority).

I31-24 y32, y31, y 30

Eo Gs

I25-16 y22, y21, y 20

Eo Gs

I15-8 y12, y11, y 10

Eo Gs

I7-0 y02, y01, y 00

Eo Gs

En