???-210: ??????? S?ed?as - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

???-210: ??????? S?ed?as

Description:

-210: 2005 7 ii: – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 41
Provided by: maria26
Category:
Tags: clock | gating

less

Transcript and Presenter's Notes

Title: ???-210: ??????? S?ed?as


1
???-210 ??????? S?ed?asµ?? ?a???? ???µ??? 2005
  • ?ef??a?? 7ii ?et??t??

?a?ep?st?µ?? ??p??? ?µ?µa ??e?t??????? ???a?????
?a? ???a????? ?p?????st??
2
?e??????
  • ?et??t?? ??p??
  • S???????? ??ad???? ?et??t??
  • S?ed?asµ?? µe D Flip-Flops
  • S?ed?asµ?? µe J-K Flip-Flops
  • Se???a??? ?a? ?a???????? ?et??t??
  • ??ad???? ?et??t?? ????-??t? (Up-down)
  • ??ad???? ?et??t?? µe ?a??????? F??t?s?
  • ?et??t?? BCD, ?et??t?? t??a??? a?????????
  • ?et??t?? se VHDL

3
?et??t?? (Counters)
  • ??a? µet??t?? e??a? ??a? ?ata????t?? p?? µet??
    µ?a p???a????sµ??? a???????a ?atast?se??, ß?s?
    t?? efa?µ???? pa?µ?? t?? ????????.
  • ?? µet??t?? ?at??????p?????ta? se
  • ?et??t?? ??p??
  • ?? ????? t?? s?st?µat?? e???eta? st?? e?s?d?
    ???????? t?? LSB FF.
  • G?a ta ?p????pa FFs, ? ???d?? e??? FF e???eta?
    st?? e?s?d? ???????? t?? ep?µe??? s?µa?t???? FF.
  • ?e? ?p???e? ????? ?????.
  • ?aµ??? ?ata????s? ?s????
  • S????????? ?et??t??
  • ??a ta FFs ????? ????? ?????
  • ???s? ??????? ??a ???p???s? t?? ep?µe???
    ?at?stas??.

4
?et??t?? ??p?? (Ripple Counter)
  • ??? d???e?e?
  • St?? ?et??? a?µ? st?? e?s?d? t?? ???????? t?? ?,
    t? ? s?µp?????eta?
  • ? e?s?d?? ???????? ??a t? B e??a? t? s?µp????µa
    t?? e??d?? t?? A
  • ?ta? ??a FF a????e? ap? 1 se 0 (a???t??? a?µ?),
    ?p???e? ?et??? a?µ? (0 se 1) st?? e?s?d? ????????
    t?? ?, p???a???ta? t? ? ?a s?µp?????e?
  • ? ????-ta-p??? (upward counting). G?at?

C
A
B
0
1
0
1
2
3
5
?et??t?? ??p?? (s??.)
  • ?a ß??? de?????? t?? s??s? a?t?a?-ap?te??sµat??
    ap? t?? p??????µe??d?af??e?a ?
  • ? a?t?st???? a???????a?atast?se?? e??a?(B,A)
    (0,0),
  • ???e ep?p??s?et? bit, C, D, s?µpe??f??eta? ?p??
    t? bit B, a??????ta? 50 ????te?? s???? ap? t?
    p??????µe?? bit.
  • G?a 3 bits (C,B,A) (0,0,0), (0,0,1), (0,1,0),
    (0,1,1),(1,0,0), (1,0,1), (1,1,0), (1,1,1),
    (0,0,0),

CP
A
B
0
1
0
1
2
3
6
?et??t?? ??p?? (s??.)
Clock-to-output ?a??st???s?. ??s? e??a?, ??a
n-FFs ? ripple
effect
  • ?a ß??? de?????? t?? s??s? a?t?a?-ap?te??sµat??
    ap? t?? p??????µe??d?af??e?a ?
  • ? a?t?st???? a???????a?atast?se?? e??a?(B,A)
    (0,0),
  • ???e ep?p??s?et? bit, C, D, s?µpe??f??eta? ?p??
    t? bit B, a??????ta? 50 ????te?? s???? ap? t?
    p??????µe?? bit.
  • G?a 3 bits (C,B,A) (0,0,0), (0,0,1), (0,1,0),
    (0,1,1),(1,0,0), (1,0,1), (1,1,0), (1,1,1),
    (0,0,0),

CP
A
B
0
1
0
1
2
3
7
???? pa??de??µa ?et??t?? ??p?? p???-ta-p???
4??-bit, µe JK FFs
  • JK1 ? Qi(t1) Qi(t)
  • FFs e??a? a???t???
  • a?µ?p???d?t??µe?a

T?µ??e?te...
8
?a??de??µa (s??.)
  • ?e?t?????a
  • ?? ????te?? s?µa?t??? bit (Q0) s?µp?????eta? se
    ???e a???t??? a?µ? t?? ???????? t?? s?st?µat??.
  • ???e f??? t?? t? Q0 a????e? ap? 1 se 0, t? Q1
    s?µp?????eta?.
  • ???e f??? t?? t? Q1 a????e? ap? 1 se 0, t? Q2
    s?µp?????eta?.
  • ???e f??? t?? t? Q2 a????e? ap? 1 se 0, t? Q3
    s?µp?????eta?,

9
?et??t?? ??p?? p???-ta-??t? 4??-bit µe JK-FFs
  • ???s?µ?p???ste as??????? Set (? Preset) (S) ??a
    ?a ?e????se? ap? 1111.
  • ??a??a?t???? s?ed?asµ??
  • ???a?? t?? a?µ?p???d?t?s?? se ?et???
  • ???s? t?? s?µp????µ???? e??d?? t?? ???e FF st??
    e?s?d? ???????? C t?? ep?µe??? s?µa?t???? FF st?
    se???

10
?et??t?? ??p?? p???-ta-??t? 4??-bit µe JK-FFs --
VHDL
Tet??? a?µ?-p???d?t??µe?a JK FFs µe as???????
reset
Q(t) Q(t1) J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
11
?et??t?? ??p?? p???-ta-??t? 4??-bit µe JK-FFs -
VHDL (s??.)
12
???s?µ???s?
13
S???????? ??ad???? ?et??t??Synchronous Binary
Counters)
  • G?a e???det???s? t?? p??ß??µat?? t?? ripple
    effect ???s?µ?p??e?ta? ????? ????? ??a ??a
    ta FFs ?a? ??a s??d?ast??? µ???? t?? ?????µat??
    ??a pa?a???? t?? ep?µe??? ?at?stas??
  • G?a ??a µet??t? p??? ta p??? ? ???s?
    s??d?ast???? Incrementer

Incre-menter
D3
Q3
A3
S3
D2
Q2
A2
S2
D1
Q1
S1
A1
D0
Q0
A0
S0
Clock
14
S???????? ??ad???? ?et??t??Serial Gating
  • ?s?te???? ??????
  • XOR s?µp?????e? ???at? t? ???e bit a?????a
  • ???s?da ap? AND s?µp?????e? ??a bit e?? ??a ta
    bits ap?t? LSB µ???? t? t?????e??a? 1
  • Count Enable
  • T?te? ??e? t?? e??d???t?? AND se 0 ??a
    ?a??at?se? t?? pa???sa ?at?stas?
  • Carry Out
  • ??µµ?t? t?? Incrementer
  • ????eta? st? Count Enable t?? ep?µe??? µet??t?
    4-bit ??a d?µ??????a µe?a??te???µet??t??

Incrementer
15
S???????? ??ad???? ?et??t??Serial Gating (s??.)
  • ?s?te???? ??????
  • XOR s?µp?????e? ???at? t? ???e bit a?????a
  • ???s?da ap? AND s?µp?????e? ??a bit e?? ??a ta
    bits ap?t? LSB µ???? t? t?????e??a? 1
  • Count Enable
  • T?te? ??e? t?? e??d???t?? AND se 0 ??a
    ?a??at?se? t?? pa???sa ?at?stas?
  • Carry Out
  • ??µµ?t? t?? Incrementer
  • ????eta? st? Count Enable t?? ep?µe??? µet??t?
    4-bit ??a d?µ??????a µe?a??te???µet??t??

Incrementer
Q0(t1)Q0(t)?EN
Q1(t1)Q1(t)?(EN Q0(t))
Q2(t1)Q2(t)?(ENQ0(t)Q1(t))
Q3(t1)Q3(t)?(ENQ0(t)Q1(t)Q2(t))
16
S???????? ??ad???? ?et??t??Parallel Gating
  • ???s?da t?? Carry (??af??e?e? 14-15)
  • Se??? ap? p??e? AND µ?sa ap? t???p??a pe??? t?
    carry (ripples)
  • ???e? µe???e? ?a??ste??se??
  • ???µ??eta? serial gating
  • ??t??at?stas? t?? AND a??s?da? t?? carry µe
    p??e? AND pa??????a gt
  • ?e???e? t?? ?a??ste??se?? µ???pat???
  • ???µ??eta? parallel gating
  • ?a??µ??? µe carry lookahead
  • ?? lookahead ???s?µ?p??e?ta? staCOs ?a? ENs ??a
    ap?t??p? d?µ??????a? µe????? µ???pat???se
    µe?a??te???? µet??t??
  • ??e????t?µa ??a parallel gating p?? ??????? se
    ??p??e? pe??pt?se?? (1111 ? 0000)

17
S???????? ??ad???? ?et??t?? (s??.)
  • ? d?ad??as?a s?ed?asµ?? ??a ??a d?ad??? µet??t?
    e??a? ? ?d?a µe a?t? ??a ??a t??a?? s???????
    a???????a?? ?????µa.
  • ?? e?s?d?? t?? ?????µat?? e??a? t? ????? (CLK)
    ?a? ???a apa?a?t?ta s?µata e?????? (EN, Load,
    ?t?).
  • ?? ???d?? t?? ?????µat?? e??a? ?? ???d?? t?? FF
    (pa???sa ?at?stas?).
  • S??????, ?? p?? ap?te?esµat???? ???p???se??
    ???s?µ?p????? T-FFs ? JK-FFs.

18
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit
19
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit
(s??.)
20
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit
(s??.)
21
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit
(s??.)
22
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit
(s??.)
1
S??????ete µe t?? µet??t? t?? d?af. 14!
Q0
JQ0 1 KQ0 1 JQ1 Q0 KQ1 Q0 JQ2 Q0
Q1 KQ2 Q0 Q1 JQ3 Q0 Q1 Q2 KQ3 Q0 Q1 Q2
J
C
K
Q1
J
C
K
Q2
J
C
K
Q3
J
C
K
CLK
23
S???????? ??ad???? ?et??t??
S?ed?asµ?? µe J-K FFs ??a Up Counter 4??-bit µe
EN ?a? CO
EN s?µa e?e???p???s??, ?ta? e??a? 0 ? µet??t??
d?at??e? t?? pa???sa ?at?stas?, ?ta? e??a? 1
µet?? CO s?µa e??d?? carry, ???s?µ?p??e?ta?
??a t?? ?atas?e?? µe?a??te??? µet??t?? JQ0 1
EN KQ0 1 EN JQ1 Q0 EN KQ1 Q0 EN JQ2
Q0 Q1 EN KQ2 Q0 Q1 EN JQ3 Q0 Q1 Q2
EN KQ3 Q0 Q1 Q2 EN C0 Q0 Q1 Q2 Q3 EN
1
24
S???????? ??ad???? ?et??t?? p???-ta-p??? 4??-bit
se VHDL
RESET
25
S???????? ??ad???? ?et??t?? p???-ta-p??? 4??-bit
se VHDL -- ???s?µ???s?
26
??ad???? ?et??t?? ????-??t?
n-bit Up-Down Counter
clock
Q0 Q1 Qn-1

UD


UD 0 µet?? p??? ta p??? UD 1 µet?? p??? ta
??t?
27
??ad???? ?et??t?? ????-??t? (s??.)
UD Q2 Q1 Q0 Q2.D Q1.D Q0.D
UD Q2 Q1 Q0 Q2.D Q1.D Q0.D
1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1
0 0 0 1 1 0 1 1 0 1 0 1 1 0 0 0
1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1
1 1 1 1 1 0
0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1
0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1
0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0
1 1 1 0 0 0
Up-Counter
Down-Counter
28
??ad???? ?et??t?? ????-??t? (s??.)
Q1 Q0
00
01
11
10
UD Q2
00
01
11
10
S?µp????ste t?? ?-???t? ??a Q2.D, Q1.D, ?a?
Q0.D, ap??p??e?ste, ?a? ß?e?te t? ??????
d????aµµa µe (a) D-FFs ?a? (b) T-FFs
29
??ad???? ?et??t?? ?a???????? F??t?s??
  • ???s?es? µ???pat??? ??aded?µ??a e?s?d??
  • ??e???p??e?ta? ??a Load 1
  • ???s?es? ??????? ??a
  • ?a?s? µ?t??s?? ??a Load 1
  • ?a?s? ???t?s?? pa???sa??at?stas?? ??a Load 1
  • ??e???p???s? µ?t??s?? ??aLoad 0 ?a? Count 1
  • ? p??a?a? ?e?t?????a?

Load Count ?e?t?????a
0 0 ???t?s? pa???sa? ?at.
0 1 ??t??s? p??? ta p???
1 X ?a??????? F??t?s?
30
?et??t?? BCD
  • ??a? d?ad???? µet??t?? µe pa??????? f??t?s?
    µp??e? ?a µetat?ape? se ??a s??????? µet??t? BCD
    µe µ?a µ??? ep?p??s?et? p??? AND.
  • ????e?ste p?? ?e?t????e? a?t? t? ?????µa

31
?et??t?? BCD (s??.)
  • ? µet??t?? ?e???? µe ???d? 0000.
  • ??? ? ???d?? t?? AND e??a? 0, se ???e ?et???
    pa?µ? t?? ???????? ? t?µ? t?? µet??t? a????eta?
    ?at? 1.
  • ?ta? ? ???d?? ???e? 1001, Q0 ?a? Q3 ?????ta? 1,
    ?????ta? t?? ???d? t?? AND ?s? µe 1. ??t? ?
    ?at?stas? e?e???p??e? t? Load, ?ts? st?? ep?µe??
    pa?µ? µet??t?? de? µet??, a??? f??t??e? ap? t??
    t?sse??? e?s?d??? ded?µ????.
  • ? t?µ? p?? f??t??eta? e??a? 0000.

32
??a??a?t???? S?ed?asµ?? ??a ?et??t? BCD
  • ???s? a???????a??? ??????? µ??t???? ??a t?
    s?ed?asµ? s???????? µet??t? BCD µe D flip-flops
  • ???a?a? ?atast?se?? gt
  • S??d?asµ?? e?s?d??1010 µ???? 1111e??a?
    s??d?asµ??ad?af???a? (dont cares)

33
??a??a?t???? S?ed?asµ?? ??a ?et??t? BCD (s??.)
  • ???s? K-?a?t?? ??a d?ep?ped? e?a??st?p???s? ??a
    ße?t?st?p???s? t?? e??s?se?? t?? ep?µe???
    ?at?stas?? D1 Q1 D2 Q2 ? Q1Q8 D4 Q4 ?
    Q1Q2 D8 Q8 ? (Q1Q8 Q1Q2Q4)
  • ?? ?????? d????aµµa µp??e? ?a pa?a??e? ap? t??
    p?? p??? e??s?se??.
  • ???s?es? as???????? ? s???????? reset apa?a?t?t?
  • ?? ?a s?µße? a? ??a ?p???d?p?te ???? (p.?.
    d?ata?a?? ?s????) t? ?????µa p??e? ?at?stas? ????
    ap? 00001001?

34
??a??a?t???? S?ed?asµ?? ??a ?et??t? BCD (s??.)
  • ??e?te t?? t?µ?? t?? 6 ep?µe??? ?atast?se?? ??a
    t??? s??d?asµ??? ad?af???a? ap? t?? e??s?se?? t??
    p??????µe??? d?af??e?a?
  • ??e?te t? ????????µ??? d????aµµa ?atast?se?? ??a
    ?a e?t?µ?sete t?? s?µpe??f??? t?? ?????µat?? ??a
    t?? s?????e? ad?af???a?

?a???sa ?at. ?p?µe?? ?at.
Q8 Q4 Q2 Q1 Q8 Q4 Q2 Q1
1 0 1 0 1 0 1 1
1 0 1 1 0 1 1 0
1 1 0 0 1 1 0 1
1 1 0 1 0 1 0 0
1 1 1 0 1 1 1 1
1 1 1 1 0 0 1 0
35
??a??a?t???? S?ed?asµ?? ??a ?et??t? BCD (s??.)
  • G?a t?? p??????µe?? s?ed?asµ?, se pe??pt?s? p??
    t? ?????µa ???e? se µ?a ????? ?at?stas? (invalid
    state) ?a epa????e? se µ?a ?????? ?at?stas? µ?sa
    se 2 pe???d??? t?? ???????? (clock cycles)
  • ???a? a?t? ??a??p???t??? ?? ???
  • ??e???eta? ??p??? s?µa p?? ?a ?p?de????e? ?t? t?
    ?????µa e?s???e se ????? ?at?stas? ???a ?
    e??s?s? t?t???? s?µat??
  • ??e???eta? t??p?p???s? t?? ?????µat?? ??a ?a
    µp??e? ?a ep?st???e? se ?????? ?at?stas? µ?sa se
    1 pe???d? t?? ????????
  • ??e???eta? t??p?p???s? t?? ?????µat?? ??a ?a
    µp??e? ?a ep?st???e? se s???e???µ??? ??????
    ?at?stas? (?p?? 0)
  • ????? e????e?e? e?a?t??ta? ap?
  • t?? efa?µ??? p?? ?a ???s?µ?p???se? t? ?????µa
  • p???t??? t?? ?µ?da? s?ed?asµ??
  • ?e?te se??de? 278 - 279 st? ß?ß??? sa?.

36
?et??t?? ???a??? A????????? (Arbitrary Sequence
Counter)
  • ?ed?µ???? µ?a? t??a?a? a???????a?, s?ed??ste ??a
    µet??t? p?? ?a a?apa???e? t?? a???????a.
  • ??ad??as?a
  • ?a?a???? p??a?a/d????aµµa ?atast?se?? ß?s? t??
    ded?µ???? a???????a?
  • ??a??st?p???s? (µe K-???te?, ?t?)
  • S?ed?asµ?? ??????? d?a???µµat??
  • ?a??de??µa S?ed??ste t? ?????? d????aµµa ??a t??
    µet??t? µe t?? e??? a???????a 0 ? 7 ? 6 ? 1 ? 0
    (000 ? 111 ? 110 ? 001 ? 000). ???s?µ?p??e?ste D
    FFs.

37
?et???ta? Modulo N
  • ?et??t?? ??a??es??-d?a-n (Modulo n)
  • ?et?? t? ?p????p? t?? d?a??es?? d?a n, ?p?? t? n
    µp??e? ?a µ?? e??a? d??aµ? t?? 2 ?
  • ?et?? t??a?a a???????a ap? n ?atast?se??, e?d???
    s?ed?asµ???? ß?s? ???e ?at?stas??
  • ?e???aµß??e? modulo 10 p?? e??a? ? µet??t?? BCD

38
?et???ta? Modulo 7 ?????e?e? 7 ?a? epa????eta?
as??????a
  • ???s? e??? s???????? d?ad???? µet??t? 4??-bit µe
    as???????Clear ??a ?atas?e?? µet??t?Modulo 7.
  • ?ta? a????e?eta? t? 7, t??????µa epa????eta? st?
    0 (Clear) as??????a. ??a, d??e?0?1?2?3?4?5?6?7
    (??a p??? ????) 0?1?2?3?4?5?6?7(??a p??? ????) ,
    ?t?.
  • ??t? ??? ?????? ?? G??????!? ?af??eta? ??
    µet??t?? a?t??t???a?!(t? 7 s??t??eta?,
    a??? µa?? t?? ?a? ? d???e?? t?? s?ed?ast?!)

Q3
D3
D2
Q2
Q1
D1
D0
Q0
Clock
CP
0
LOAD
CLEAR
39
?et???ta? Modulo 7 S??????? ?a??????? F??t?s? 0
?ta? a????e?eta? t? 6
  • ???s? e??? s???????? d?ad???? µet??t? 4??-bit µe
    s???????f??t?s? (load) ?a? as???????clear ??a
    ?atas?e?? µet??t?Modulo 7.
  • ?ta? a????e?eta? t? 6, t??????µa epa????eta? st?
    0 s??????a, af?? f??t??e? t? 0 ap? t??
    e?s?d???. ??a, d??e?0?1?2?3?4?5?6?0?1?2?3?4?5?6
    ?
  • G?a ?atast?se?? µe?a??te?e? (se d?ad??? t?µ?) t??
    0110, ???s?µ?p?????ta? s?????e? ad?af???a?, ?a?
    ?ts? Load Q4 Q2

40
???? pa??de??µa ?s??????? a?????p???s? se 9 ?a?
S??????? F??t?s? t?? 9 ?ta? ft?se? st? 14
  • ???s? e??? s???????? d?ad???? µet??t? 4??-bit µe
    s???????f??t?s? (load) ??a ?atas?e?? µet??t?
    Modulo 6.
  • ?? Load ???s?µ?p??e?ta???a ?a ??se? t??
    ?at?stas?st? d?ad??? 9 e?te st?Reset e?te ?ta?
    a????e?eta? t? 14.
  • ??t? d??e? 9?10?11?12?13?14?9?10?11?1?13?14?9?

1
D3
Q3
0
D2
Q2
0
D1
Q1
1
D0
Q0
Clock
CP
Reset
LOAD
CLEAR
1
Write a Comment
User Comments (0)
About PowerShow.com