Download presentation
Presentation is loading. Please wait.
1
CS 140 Lecture 13 Combinational Standard Modules Professor CK Cheng CSE Dept. UC San Diego 1
2
Part III. Standard Modules Interconnect Modules: 1. Decoder, 2. Encoder 3. Multiplexer, 4. Demultiplexer 2
3
Multiplexer Definition Logic Diagram Application 3
4
3. Mux (Multiplexer): Definition Description If En = 1 y = D i where i = (S n-1,.., S 0 ) Else y = 0 En y D 2 n -1 -D 0 (Data input) S n-1,0 (Control input) 4
5
Multiplexer (Mux): Definition Selects between one of N inputs to connect to the output. log 2 N-bit select input – control input Example: 2:1 Mux 5
6
Multiplexer Definition: Example En y S1S1 S0S0 D0D0 D1D1 D2D2 D3D3 0 1 2 3 If D 0 = 0 and S 1 S 0 = 00 => y = 0 If D 0 = 1 and S 1 S 0 = 00 => y = 1 6
7
Multiplexer: Logic Diagram Logic gates –Sum-of-products form Tristates –For an N-input mux, use N tristates –Turn on exactly one to select the appropriate input 7
8
Multiplexer Application Mux for a Boolean function with truth table as input 8
9
Multiplexer: Application 9
10
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 0 0 0 0 0 1 a b c S2S2 S1S1 S0S0 0123456701234567 10
11
a0011a0011 b0101b0101 c = 0 1 - 0 c = 1 1 0 1 D (c) D 0 (c) =1 D 1 (c) =0 D 2 (c) =0 D 3 (c) =c En y 1 0 c a b S1S1 S0S0 0 0 1 2 3 Multiplexer Application Example 2: Given f (a,b,c) = m (0,1,7) + d(2), implement with 4-input Muxes. 11
12
a01a01 00 01 10 11 1 1 - 0 0 0 0 1 D (b,c) D 0 (b,c) D 1 (b,c) b01b01 c = 0 0 c = 1 0 1 l 1 (0) = 0 l 1 (c) = c En b’ 0 1 a b y 0 1 0 c D 0 (b,c) = b’D 1 (b,c) = bc 1- 1 0 c b 0 0 1 c b Multiplexer Application Example 3: Given f (a,b,c) = m (0,1,7) + d(2), implement with 2-input Muxes. 12
13
4. Demultiplexers En x y 2 n -1 -y 0 S(n-1,0) Control Input y i = x if i = (S n-1,.., S 0 ) & En = 1 y i = 0 otherwise 13
14
Shifter Can be implemented with a mux s d yiyi En 1 0 3 2 1 0 x i+1 x i-1 xixi s d xnxn x0x0 x -1 x n-1 y n -1 y0y0 En s / n l / r y i = x i-1 if En = 1, s = 1, and d = L = x i+1 if En = 1, s = 1, and d = R = x i if En = 1, s = 0 = 0 if En = 0 14
15
Barrel Shifter O or 1 shift O or 2 shift O or 4 shift x s0s0 s1s1 s2s2 y 0 1 shift 15
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.