Lecture 13: Standard Modules CSE 140: Components and Design - - PowerPoint PPT Presentation

lecture 13 standard modules
SMART_READER_LITE
LIVE PREVIEW

Lecture 13: Standard Modules CSE 140: Components and Design - - PowerPoint PPT Presentation

Lecture 13: Standard Modules CSE 140: Components and Design Techniques for Digital Systems Diba Mirza Dept. of Computer Science and Engineering University of California, San Diego 1 Decoder Application: universal set {Decoder, OR} Example:


slide-1
SLIDE 1

Lecture 13: Standard Modules

CSE 140: Components and Design Techniques for Digital Systems

Diba Mirza

  • Dept. of Computer Science and Engineering

University of California, San Diego

1

slide-2
SLIDE 2

2

Decoder Application: universal set {Decoder, OR}

Example: Implement the following functions with a 3-input decoder and OR gates. i) f1(a,b,c) = Σm(1,2,4) ii) f2(a,b,c) = Σm(2,3), iii) f3(a,b,c) = Σm(0,5,6)

slide-3
SLIDE 3

3

Decoder Application: universal set {Decoder, OR}

Example: Implement the following functions with a 2:4 decoder and OR gates. i) f1(a,b,c) = Σm(1,2,4)

How many 2:4 decoders are required to implement the above function? A. One B. Two C. Three D. Four

slide-4
SLIDE 4

4

Decoder Application: universal set {Decoder, OR}

Example: Implement the following functions with a 1:2 decoder and OR gates. i) f1(a,b,c) = Σm(1,2,4)

How many 1:2 decoders are required to implement the above function? A. Three B. Four C. Six D. Seven

slide-5
SLIDE 5

5

Tree of Decoders

Implement a 4-24 decoder with 3-23 decoders.

I0

y0 y1 y7

I1 I2

1 2 3 4 5 6 7

I0

y8 y9 y15

I1 I2

1 2 3 4 5 6 7

a d c b

slide-6
SLIDE 6

6

Implement a 6-26 decoder with 3-23 decoders.

En

D0

I2, I1, I0

D1 y0 y7 y8 y15 D7 y56 y63

En I2, I1, I0 I2, I1, I0 I5, I4, I3

Tree of Decoders

… …

slide-7
SLIDE 7

PI Q: A four variable switching function f(a,b,c,d) can be implemented using which of the following?

  • A. 1:2 decoders and OR gates
  • B. 2:4 decoders and OR gates
  • C. 3:8 decoders and OR gates
  • D. None of the above
  • E. All of the above

7

slide-8
SLIDE 8

8

Interconnect: Decoder, Encoder, Mux, DeMux

Processors Decoder: Decode the address to assert the addressed device Mux: Select the inputs according to the index addressed by the control signals

P1

Memory Bank

Mux

P2 Pk

Demux

Decoder

Mux

Data Address

Address k Address 2 Address 1 Data 1 Data k

Arbiter

n n-m m 2m

slide-9
SLIDE 9

9

  • 2. Encoder
  • Definition (What is it?)
  • Logic Diagram (How is it realized?)
slide-10
SLIDE 10

10

  • 2. Encoder: Definition

At most one Ii = 1. (yn-1,.., y0 ) = i if Ii = 1 & En = 1 (yn-1,.., y0 ) = 0 otherwise. A = 1 if En = 1 and one i s.t. Ii = 1 A = 0 otherwise. 8 inputs 3 outputs

y0 y1 y2

1 2 3 4 5 6 7

En A

I0 I7

1 2

slide-11
SLIDE 11

11

Encoder: Logic Diagram

En I1 I3 I5 I7 y0 En I2 I3 I6 I7 y1 En I4 I5 I6 I7 y2 En I0 I1 I6 I7 A . .

slide-12
SLIDE 12

Multiplexer

  • Definition
  • Logic Diagram
  • Application

12

slide-13
SLIDE 13

13

Interconnect: Decoder, Encoder, Mux, DeMux

Processors Decoder: Decode the address to assert the addressed device Mux: Select the inputs according to the index addressed by the control signals

P1

Memory Bank

Mux

P2 Pk

Demux

Decoder

Mux

Data Address

Address k Address 2 Address 1 Data 1 Data k

Arbiter

n n-m m 2m

slide-14
SLIDE 14

Multiplexer Definition: Example

En y S1 S0

D0 D1 D2 D3

1 2 3

14

S1 S0 y

Selects between one of N inputs to connect to the output. log2N-bit select input – control input

slide-15
SLIDE 15

15

PI Q: What is the output of the following MUX for the given inputs and En=1, S=1?

  • A. 0
  • B. 1
  • C. Can’t say

En =1 y S=1

1

1

slide-16
SLIDE 16

Multiplexer (Mux): Example

2:1 Mux

Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 S D0 Y D1 D1 D0 S Y 1 D1 D0 S

16

slide-17
SLIDE 17

Multiplexer Application

A B Y 1 1 1 1 1 Y = AB

00

Y

01 10 11

A B

  • Mux for a Boolean function with truth table as input

17

slide-18
SLIDE 18

Multiplexer: Application

A B Y 1 1 1 1 1 Y = AB A Y 1 1 A B Y B

18

slide-19
SLIDE 19

Multiplexer Application: universal set {Mux}

Example 1: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with an 8-input Mux.

Id a b c f 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 1

19

slide-20
SLIDE 20

Multiplexer Application: universal set {Mux}

Example 1: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with an 8-input Mux.

Id a b c f 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 1 En

y

1 1 1

a b c

S2 S1 S0

1 2 3 4 5 6 7 20

slide-21
SLIDE 21

En y a b

S1 S0

1 2 3 Example 2: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with 4-input Muxes.

21

Id a b c f 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 1

D0 (c) =1 D1 (c) =0 D2 (c) =0 D3 (c) =c

slide-22
SLIDE 22

a 1 1 b 1 1 c = 0 1

  • c = 1

1 1 D (c)

D0 (c) =1 D1 (c) =0 D2 (c) =0 D3 (c) =c

En y 1 c a b

S1 S0

1 2 3 Example 2: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with 4-input Muxes.

22

slide-23
SLIDE 23

En 1

a

y Example 3: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with 2- input Muxes.

23

Id a b c f 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 1

slide-24
SLIDE 24

D1 (b,c)

b 1 c = 0 c = 1 1 l1(0) = 0 l1(c) = c

En b’ 1

a

y Example 3: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with 2- input Muxes.

24

D0 (b,c) = b’ D1 (b,c) = bc

1

  • 1 0

c b 0 0 0 1 c b

slide-25
SLIDE 25

D1 (b,c)

b 1 c = 0 c = 1 1 l1(0) = 0 l1(c) = c

En En b’ 1

a b

y 1 c Example 3: Given f (a,b,c) = Σm (0,1,7) + Σd(2), implement with 2- input Muxes.

25

slide-26
SLIDE 26
  • 4. Demultiplexers

En x Control Input

26

slide-27
SLIDE 27
  • 4. Demultiplexers

En x y2n-1 -y0 S(n-1,0) Control Input yi = x if i = (Sn-1, .. , S0) & En = 1 yi = 0 otherwise

27