Download presentation
Presentation is loading. Please wait.
Published byEvan Reynolds Modified over 8 years ago
1
C HAPTER F IVE S YNCHRONOUS S EQUENTIAL L OGIC 1
2
2 S EQUENTIAL C IRCUITS Combinational Circuit Memory Elements Inputs Outputs Asynchronous Synchronous Combinational Circuit Flip-flops Inputs Outputs Clock
3
3 L ATCHES SR Latch (cross coupled NOR) S R Q 0 QQ’ 0 0 0 0 1 0 0 01 Q = Q 0 Initial Value
4
4 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 1 1 0 0 0 10 Q = Q 0
5
5 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 00 0 1 1 0 1 Q = 0 Q = Q 0
6
6 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 001 0 1 1 1 0 1 0 01 Q = 0 Q = Q 0 Q = 0
7
7 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 001 0 1 101 1 0 0 0 1 0 1 10 Q = 0 Q = Q 0 Q = 1
8
8 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 001 0 1 101 1 0 010 1 0 1 1 0 0 1 10 Q = 0 Q = Q 0 Q = 1
9
9 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 001 0 1 101 1 0 010 1 0 110 1 1 0 0 1 1 1 00 Q = 0 Q = Q 0 Q = 1 Q = Q’ 0
10
10 L ATCHES SR Latch S R Q 0 Q Q’ 0 0 001 0 0 110 0 1 001 0 1 101 1 0 010 1 0 110 1 1 000 1 1 1 1 0 1 1 00 Q = 0 Q = Q 0 Q = 1 Q = Q’ 0
11
11 L ATCHES SR Latch S RQ 0 Q0Q0 0 10 1 01 1 Q=Q’=0 No change Reset Set Invalid S R Q 0 Q=Q’=1 0 11 1 00 1 Q0Q0 Invalid Set Reset No change
12
12
13
13 C ONTROLLED L ATCHES SR Latch with Control Input (operates with signal level) C S RQ 0 x x Q0Q0 1 0 0 Q0Q0 1 0 10 1 1 01 1 1 1Q=Q’Q=Q’ No change Reset Set Invalid
14
14 C ONTROLLED L ATCHES D Latch (Transparent Latch) C D (data)Q 0 x Q0Q0 1 00 1 11 No change Reset Set C Timing Diagram D Q t Output may change
15
15 C ONTROLLED L ATCHES D Latch ( D = Data ) C DQ 0 x Q0Q0 1 00 1 1 No change Reset Set C Timing Diagram D Q Output may change
16
16 F LIP -F LOPS Controlled latches are level-triggered Flip-Flops are edge-triggered It operates with signal transitions C CLKPositive Edge CLKNegative Edge
17
17 F LIP -F LOPS Master-Slave D Flip-Flop D Latch (Master) DCDC Q D Latch (Slave) DCDC QQD CLK D Q Master Q Slave Looks like it is negative edge-triggered MasterSlave
18
18 F LIP -F LOPS Edge-Triggered D Flip-Flop DQ Q DQ Q Positive Edge Negative Edge S R
19
19 F LIP -F LOP C HARACTERISTIC E QUATIONS Analysis / Derivation JQ QK JKQ(t)Q(t)Q(t+1) 0000 0011 010 011 100 101 110 111 No change Reset Set Toggle
20
20 F LIP -F LOP C HARACTERISTIC E QUATIONS Analysis / Derivation JQ QK JKQ(t)Q(t)Q(t+1) 0000 0011 0100 0110 100 101 110 111 No change Reset Set Toggle
21
21 F LIP -F LOP C HARACTERISTIC E QUATIONS Analysis / Derivation JQ QK JKQ(t)Q(t)Q(t+1) 0000 0011 0100 0110 1001 1011 110 111 No change Reset Set Toggle
22
22 F LIP -F LOP C HARACTERISTIC E QUATIONS Analysis / Derivation JQ QK JKQ(t)Q(t)Q(t+1) 0000 0011 0100 0110 1001 1011 1101 1110 No change Reset Set Toggle
23
23 F LIP -F LOP C HARACTERISTIC E QUATIONS Analysis / Derivation JQ QK JKQ(t)Q(t)Q(t+1) 0000 0011 0100 0110 1001 1011 1101 1110 K 0100 J1101 Q Q(t+1) = JQ’ + K’Q
24
24 F LIP -F LOPS JK Flip-Flop JQ QK D = JQ’ + K’Q
25
25 F LIP -F LOPS T Flip-Flop D = TQ’ + T’Q = T Q JQ QK T DQ Q T D = JQ’ + K’Q TQ Q
26
26 F LIP -F LOP C HARACTERISTIC T ABLES DQ Q DQ(t+1) 00 11 Reset Set JKQ(t+1) 00Q(t)Q(t) 010 101 11Q’(t) No change Reset Set Toggle JQ QK TQ Q TQ(t+1) 0Q(t)Q(t) 1Q’(t) No change Toggle
27
27 F LIP -F LOPS WITH D IRECT I NPUTS Asynchronous Reset DQ Q R Reset RDCLKQ(t+1) 0xx0
28
28 F LIP -F LOPS WITH D IRECT I NPUTS Asynchronous Reset DQ Q R Reset RDCLKQ(t+1) 0xx0 10 ↑ 0 11 ↑ 1
29
29
30
30 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS The State State = Values of all Flip-Flops Example A B = 0 0
31
31 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS Flip-Flop input equations D A = A(t) x(t)+B(t) x(t) = A x + B x D B = A’(t) x(t) = A’ x State equations A(t+1) = D A B(t+1) = D B Output equation y(t) = [A(t)+ B(t)] x’(t) = (A + B) x’
32
32 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS State Table (Transition Table) A(t+1) = A x + B x B(t+1) = A’ x y(t) = (A + B) x’ Present State Input Next State Output ABxABy 000 001 010 011 100 101 110 111 t+1 t t 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 1 1 0 0
33
33 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS State Table (Transition Table) A(t+1) = A x + B x B(t+1) = A’ x y(t) = (A + B) x’ Present State Next StateOutput x = 0x = 1x = 0x = 1 ABABAB yy 00000100 01001110 10001010 11001010 t+1 t t
34
34 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS State Diagram 0 1 0 0 11 0/00/0 0/10/1 1/01/0 1/01/0 1/01/0 1/01/00/10/1 0/10/1 AB input/output Present State Next StateOutput x = 0x = 1x = 0x = 1 ABABAB yy 00000100 01001110 10001010 11001010
35
35 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS D Flip-Flops Example : DQ Q x CLK y A Present State Input Next State A xy A 000 001 010 011 100 101 110 111 0 1 1 0 1 0 0 1 01 00,11 01,10 A(t+1) = D A = A x y
36
36 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS JK Flip-Flops Example : J A = BK A = B x’ J B = x’K B = A x A(t+1) = J A Q’ A + K’ A Q A = A’B + AB’ + Ax B(t+1) = J B Q’ B + K’ B Q B = B’x’ + ABx + A’Bx’ Present State I/P Next State Flip-Flop Inputs ABxABJAJA KAKA JBJB KBKB 000 001 010 011 100 101 110 111 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1
37
37 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS JK Flip-Flops Example : Present State I/P Next State Flip-Flop Inputs ABxABJAJA KAKA JBJB KBKB 000 001 010 011 100 101 110 111 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1 0 1 0 11 0 101 0 1 0 0 1
38
38 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS T Flip-Flops Example : T A = B xT B = x y = A B A(t+1) = T A Q’ A + T’ A Q A = AB’ + Ax’ + A’Bx B(t+1) = T B Q’ B + T’ B Q B = x B Present State I/P Next State F.F Inputs O/P ABxABTATA TBTB y 000 001 010 011 100 101 110 111 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1
39
39 A NALYSIS OF C LOCKED S EQUENTIAL C IRCUITS T Flip-Flops Example : Present State I/P Next State F.F Inputs O/P ABxABTATA TBTB y 000 001 010 011 100 101 110 111 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0000001100000011 0 1 1 1 0 0/00/0 1/01/0 0/00/0 1/01/0 1/01/0 1/11/1 0/00/0 0/10/1
40
T HE P ROBLEMS : 5.3, 5.4, 5.6 5.7, 5.9, 5.10, 5.11 40
41
41 S TATE R EDUCTION AND A SSIGNMENT State Reduction Reductions on the number of flip-flops and the number of gates. A reduction in the number of states result in a reduction in the number of flip-flops. The external inputs and outputs requirements do not change. Start with state diagram shown in Fig. 5.25. Fig. 5.25State diagram
42
42 S TATE R EDUCTION Only the input-output sequences are important. Two circuits are equivalent Have identical outputs for all input sequences; The number of states is not important. Fig. 5.25State diagram State:aabcdeffgfga Input:01010110100 Output:00000110100
43
43 Equivalent states Two states are said to be equivalent For each member of the set of inputs, they give exactly the same output and send the circuit to the same state or to an equivalent state. One of them can be removed.
44
44 Reducing the state table e = g (remove g ); d = f (remove f );
45
45 The reduced finite state problem State:aabcdeddedea Input:01010110100 Output:00000110100
46
46
47
47 S TATE A SSIGNMENT To design a sequential circuit, it is necessary to assign unique coded binary values to the states. Three possible binary state assignments. ( m states need n - bits, where 2 n >= m ). Unused states are treated as don’t-care conditions during the design.
48
48 Any binary number assignment is satisfactory as long as each state is assigned a unique number.
49
49 D ESIGN P ROCEDURE Design Procedure for sequential circuit The word description of the circuit behavior to get a state diagram; State reduction if necessary; Assign binary values to the states; Obtain the binary-coded state table; Choose the type of flip-flops; Derive the simplified flip-flop input equations and output equations; Draw the logic diagram;
50
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS Example : (Sequence Detector) Detect 3 or more consecutive 1’s in a string of bits coming through an input line S 0 / 0S 1 / 0 S 3 / 1S 2 / 0 0 1 1 0 0 1 0 1 StateA B S0S0 0 S1S1 0 1 S2S2 1 0 S3S3 1
51
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS Example : Detect 3 or more consecutive 1’s Present State Input Next State Output ABxABy 000 001 010 011 100 101 110 111 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 S0S0 S1S1 S3S3 S2S2 0 / 0 1 / 0 0 / 1 0 / 0 1 / 1 0 / 0 1 / 0
52
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS Example : Detect 3 or more consecutive 1’s Present State Input Next State Output ABxABy 000 001 010 011 100 101 110 111 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 A(t+1) = D A (A, B, x) = ∑ (3, 5, 7) B(t+1) = D B (A, B, x) = ∑ (1, 5, 7) y (A, B, x) = ∑ (6, 7) D Synthesis using D Flip-Flops
53
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH D F.F. Example : Detect 3 or more consecutive 1’s D A (A, B, x) = ∑ (3, 5, 7) = A x + B x D B (A, B, x) = ∑ (1, 5, 7) = A x + B’ x y (A, B, x) = ∑ (6, 7) = A B D Synthesis using D Flip-Flops B 0010 A0110 x B 0100 A0110 x B 0000 A0011 x
54
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH D F.F. Example : Detect 3 or more consecutive 1’s D A = A x + B x D B = A x + B’ x y = A B D Synthesis using D Flip-Flops
55
F LIP -F LOP E XCITATION T ABLES Present State Next State F.F. Input Q(t)Q(t)Q(t+1)D 00 01 10 11 Present State Next State F.F. Input Q(t)Q(t)Q(t+1)JK 00 01 10 11 0 0 (No change) 0 1 (Reset) 0 x 1 x x 1 x 0 0 1 0 1 1 0 (Set) 1 1 (Toggle) 0 1 (Reset) 1 1 (Toggle) 0 0 (No change) 1 0 (Set) Q(t)Q(t)Q(t+1)T 00 01 10 11 0 1 1 0
56
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH JK F.F. Example : Detect 3 or more consecutive 1’s Present State Input Next State Flip-Flop Inputs ABxAB JAJA KAKA JBJB KBKB 00000 00101 01000 01110 10000 10111 11000 11111 0 x 1 x x 1 x 0 x 1 x 0 J A (A, B, x) = ∑ (3) K A (A, B, x) = ∑ (4, 6) J B (A, B, x) = ∑ (1, 5) K B (A, B, x) = ∑ (2, 3, 6) JK Synthesis using JK F.F. 0 x 1 x x 1 0 x 1 x x 1 x 0
57
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH JK F.F. Example : Detect 3 or more consecutive 1’s J A = B xK A = x’ J B = xK B = A’ + x’ JK Synthesis using JK Flip-Flops B 0010 Axxxx x B xxxx A1001 x B 01xx A01xx x B xx11 Axx01 x
58
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH T F.F. Example : Detect 3 or more consecutive 1’s Present State Input Next State F.F. Input ABxABT A T B 00000 00101 01000 01110 10000 10111 11000 11111 0 0 0 1 1 0 1 0 T Synthesis using T Flip-Flops 0 1 1 1 0 1 1 0 T A (A, B, x) = ∑ (3, 4, 6) T B (A, B, x) = ∑ (1, 2, 3, 5, 6)
59
D ESIGN OF C LOCKED S EQUENTIAL C IRCUITS WITH T F.F. Example : Detect 3 or more consecutive 1’s T A = A x’ + A’ B x T B = A’ B + B x T Synthesis using T Flip-Flops B 0010 A1001 x B 0111 A0101 x
60
The problems are: 5.12, 5.13, 5.14, 5.15, 5.16, 5.18, 60
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.