CSE140L: Components and Design Techniques For Digital Systems Lab Timing, Mux, Demux, Adders
CSE140L: Components and Design Techniques For Digital Systems Lab Timing, Mux, Demux, Adders
Outline
Review of CMOS Non-ideal gate behavior (3.5)
Rise/fall time Delay Pulse width
Pass gates (Appendix B) Muxes & Demuxes (chap 4.2 pp. 171-183) Adders (chap 5.6)
D remains high for three gate delays after A changes from low to high
Oscillatory behavior
Another pulse shaping circuit
+ A open switch close switch initially undefined open switch C D B resistor
CSE140: Components and Design Techniques for Digital Systems Muxes and demuxes
Tajana Simunic Rosing
8
Fig source: Prof. Subhashish Mitra
Multiplexor (Mux)
Mux routes one of its N data inputs to its one output, based on binary value of select inputs
4 input mux needs 2 select inputs to indicate which input to route through 8 input mux 3 select inputs N inputs log2(N) selects
A B
i0 i1 s0
A Y B
i0 i1 s0 0
A B
i0 i1 s0 1
2x1 mux
10
Fig source: Prof. Subhashish Mitra
Multiplexers/selectors
2:1 mux: 4:1 mux: 8:1 mux: Z = A'I0 + AI1 Z = A'B'I0 + A'BI1 + AB'I2 + ABI3 Z = A'B'C'I0 + A'B'CI1 + A'BC'I2 + A'BCI3 + AB'C'I4 + AB'CI5 + ABC'I6 + ABCI7
2 n -1 (m k=0
In general: Z =
kIk)
I0 I1
2:1 mux A
I0 I1 I2 I3 I4 I5 I6 I7
8:1 mux
A B C
11
0 1 2 3 8:1 MUX 4 5 6 7 S2 S1 S0 C0 C1 C2
13
14
Demultiplexers/decoders
Decoders/demultiplexers: general concept
single data input, n control inputs, 2n outputs control inputs (called selects (S)) represent binary index of output to which the input is connected data input usually called enable (G)
1:2 Decoder: O0 = G S O1 = G S 2:4 Decoder: O0 = G S1 O1 = G S1 O2 = G S1 O3 = G S1
S0 S0 S0 S0
O0 O1 O2 O3 O4 O5 O6 O7
3:8 Decoder: = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0 = G S2 S1 S0
15
Enable
CSE140: Components and Design Techniques for Digital Systems Arithmetic circuits
Tajana Simunic Rosing
17
S Cout
18
S0 @2 C1 @2
4 stage adder
S1 @3 C2 @4 S2 @5 C3 @6 A3 B3 S3 @7 Cout @8
S0, C1 Valid
S1, C2 Valid
S2, C3 Valid
19
T0 T2 T4 T6 T8
Carry-lookahead
Evaluate Sum and Ci+1
Sum = Ai xor Bi xor Ci Ci+1 = Ai Bi + Ai Ci + Bi Ci = Ai Bi + Ci (Ai xor Bi)
20
Carry-lookahead implementation
Adder with propagate and generate outputs
Ai Bi Ci Pi @ 1 gate delay Si @ 2 gate delays Gi @ 1 gate delay
C0 P0 G0 C0 P0 P1 G0 P1 G1
C1 @ 3
C0 P0 P1 P2 G0 P1 P2 G1 P2 G2 C3 @ 3
C2 @ 3
C4 @ 3
21
A0 B0
A1 B1
A2 B2 A3 B3
4 four-bit adders with internal carry lookahead second level carry lookahead unit extends lookahead to 16 bits
4 C12
4 A[11-8] P 4 S[11-8] @8 @5 C3
4 B[11-8] G C8
4 A[7-4] P 4 S[7-4] @7 @5 C2
4 B[7-4] G C4
4 A[3-0] P 4 S[3-0] @4 @4 C1
4 B[3-0] G C0 @0
4-bit Adder
4-bit Adder
4-bit Adder
@3 G3
@2 P2
@3 G2
@2 P1
@3 G1
@2 P0
@3 G0 C0 C0 @0
C1 = G0 + P0 C0
23
Carry-select adder
Redundant hardware to make carry calculation go faster
compute two high-order sums in parallel while waiting for carry-in one assuming carry-in is 0 and another assuming carry-in is 1 select correct result once carry-in is finally computed
C8
adder high
C8
adder low
1 0 1 0
10
1 0 1 0
C4
C0
C8
S7
S6
S5
S4
24
25