Professional Documents
Culture Documents
Sekrondevreler
Sekrondevreler
Sekrondevreler
Birleşik
Devre Bellek
Elemanı
Ardışıl Devreler
• Saklama elemanları ikili bilgiyi saklama yeteneğine sahiptir.
• Bu elemanlarda saklanan ikili bilgi ardışıl devrenin durumu
olarak adlandırılır.
• Ardışıl devre harici girişlerden ikili bilgiyi alır.
• Bu girişler ve şimdiki durumlar,sonraki durumları ve
çıkışları belirler.
Ardışıl Devreler
• Saklama elemanlarındaki değişimleri de belirlerler.
Synchronous Asynchronous
Sequential Circuit
Ardışıl Devreler
• Asynchronous Asenkron ardışıl devre
Inputs Outputs
Combinational Circuit
Memory Elements
Inputs Outputs
Combinational Circuit
Flip-flops
Clock
ARDIŞIL DEVRE
– Synchronous
ile sağlanır.
• Periyodik saat darbeleri vardır.
• Saklama elemanlarının durumu saat darbelerinin belirli anlarında değişebilir.
(yükselme,alçalma)
• ARDIŞIL DEVRE
Saat kullanan saklama elemanlarına flip-flop yaz-boz denir.
Flip-Floplarda saat girişi vardır. Latchlerde yoktur.
5.1 LATCHES
LATCHES
Yaz-bozlar temel olarak latchlerden üretilmiştir.
LATCHES
• SR Latch
S R Q Q’
1 0 1 0 Set
Reset (R) 1 0
Q
Durumu
0 0 1 0 Durum
u Koru
0 1 0 1 Sıfırlama
1 0 0 0 1 Durum
1 1 0 0
Yasak
LATCHES
• SR Latch
S R Q
R 0 0 Q0 No change
Q
0 1 0 Reset
1 0 1 Set
Q 1 1 Q=Q’=0 Invalid
S
S Q S R Q
0 0 Q=Q’=1 Invalid
0 1 1 Set
Q
R 1 0 0 Reset
1 1 Q0 No change
LATCHES
• Kontrol Girişli SR Latch
R R S S
Q Q
C C
R
S Q
Q R
S
C S R Q
0 X X HOLD
No change
1 0 0 HOLD
No change
1 0 1 Q=0 Reset
1 1 0 Q=1 Set
1 1 1 Q = Q’ Invalid
INT
LATCHES
• D Latch (D = Data)
– SR’deki belirsizlik ortadan kaldırılmıştır.
• C (control)
19
LATCHES
Zamanlama
• D Latch (D = Data)
D S C
Q
C D
R Q
Q
C D Q t
0 X HOLD No change
1 0 Q=0
Çıkış
Reset Değişebilir
1 1 Q=1
Set
20
LATCHES
Timing Diagram
• D Latch (D = Data)
D S C
Q
C D
R Q
Q
C D Q
0 X HOLD No change
Çıkış
1 0 Q=0 Reset
Değişebilir.
1 1 Q=1 Set
LATCHES
• D Latch (D = Data)
FLIP – FLOPS
• Ortak saatleri vardır.
Flip-Flopun tetiklenmesi vardır (trigger)
FLIP – FLOPS
• Kontrollü latchde , level – triggered (seviye tetikleme)
FLIP – FLOPS
• There are two ways that a latch can be modified to form a flip –
flop.
1. Employ two latches in a special configuration that
• isolates the output of the flip – flop from being affected while its input
is changing.
FLIP – FLOPLAR
• Master – Slave D flip – flops
D
D D Latch Q D
Q Q
D Latch
(Master)
C (Slave)
C
FLIP – FLOPS
• Kenar-Tetiklemeli D Flip – Flop •
CLK S
R
Q •
D
28
FLIP – FLOPS
• Edge-Triggered D Flip – Flop I. CLK = 0, S = 1 and R =
1.Output = şimdiki durumu.
S
II. If D = 0, ve cLK 1
R Q 1. R 0
CLK 2. Flip – flop reset durumun geçer
3. Q = 0.
D
29
FLIP – FLOPS
• Edge-Triggered D Flip – Flop III. If D changes when CLK = 1 then
1. R remains at 0.
S 2. Flip – flop is locked out
3. Unresponsive to further changes
R Q in the input.
CLK
IV. When CLK 0,
Q
1. R 1
FLIP – FLOPS
• Edge-Triggered D Flip – Flop V. If D = 1 when CLK = 0 1,
1. S changes to 0.
S
2. Circuit goes to SET Durum
R Q 3. Q = 1.
CLK 4. Any change in D while CLK = 1
Q does not affect the output.
Q
D
Negative Edge
FLIP – FLOPS
• En ekonomik ve etkili ff d ff dur.
– Ayrıca D
– JK flip – flops
– T flip - flops
35
FLIP – FLOP
FF ‘lar üç durum vardır.
– 1 ‘ e setlenir.
– 0’a setlenir
– Tersi alınır
FLIP – FLOPS
• JK Flip – Flop • J = 1, 1 e setlenir.
– üç işlemi yapar.
.
• K = 1, FF 0 resetlenir.
J
DQ
Q
K
CLK Q
Q
D = JQ’ + K’Q
FLIP – FLOPS
• JK Flip – Flop işlem 1
• J = 1 and K = 0,
– D = 1.Q’ + 1.Q (Post2b)
J
DQ Q – D = Q’ + Q (Post5a)
K
CLK Q
Q – D=1
• When J = 0 and K = 1,
– D = 0.Q’ + 0.Q (Theo2b)
J
DQ Q – D=0+0
K
CLK Q
Q – D=0
• J = 1 ve K = 1,
– D = 1.Q’ + 0.Q (Post2b)
J
DQ Q – D = Q’ + 0 .Q (Theo2b)
K
CLK Q
Q – D = Q’ + 0 (Post2a)
– D = Q’
D = JQ’ + – Sonraki clock edge
K’Q complements the output.
FLIP – FLOPS
• JK Flip – Flop • J = 0 and K = 0,
– D = 0.Q’ + 1.Q (Theo2b)
– D = 0 + 1 .Q (Post2b)
J
DQ – D=0+Q (Post2a)
K Q
CLK Q – D=Q
Q
– Sonraki clock edge the
D = JQ’ + output is unchanged.
K’Q
FLIP – FLOPS
• JK Flip – Flop
J Q
J D Q
K Q
CLK Q Q
K Q
D = JQ’ + K’Q
FLIP – FLOPS
• T (toggle) Flip –
Flop
– flip – flop tersleme özelliği.
– JK flip – flop’dan T J Q
türetilebilir. C
– İkili sayıcı tasarımında K Q
kullanılışlıdır.
D = JQ’ + K’Q
D = TQ’ + T’Q = T Q
FLIP – FLOPS
• T (toggle) Flip –
Flop
– When T = 0 (J = K = 0)
D = JQ’ + K’Q
D = TQ’ + T’Q = T Q
44
FLIP – FLOPS
• T (toggle) Flip –
Flop
– D ve exor kapısı ile de
yapılır
D Q
– T = 0 ise D = Q T
• Girişte değişim yok.
CQ
– T = 1 ise D = Q’
• Çıkış terslenir.
D = TQ’ + T’Q = T Q
FLIP – FLOPS
• T (toggle) Flip –
Flop
J Q
D Q T Q
T T
C
K Q CQ CQ
(a) JK Flip – Flop dan D Flip – Flop dan (c) Grafik sembolü
46
FLIP – FLOPS
• Flip – Flop Karakteristlik Tablosu
D Q D Q (t+1)
0 0 Reset
1 1 Set
Q
Q(t+1) = D
FLIP – FLOPS
• Flip – Flop Karakteristlik Tablosu
J K Q (t+1)
Q(t+1) = JQ’ + K’Q
J Q 0 0 Q(t)
0 1 0 No change
1 0 1 Reset
K Q
1 1 Q’(t)
Set
Toggle
48
FLIP – FLOPS
• Flip – Flop Karakteristlik Tablosu
T Q T Q (t+1)
0 Q(t) No change
Q 1 Q’(t) Toggle
Q(t+1) = T Q
FLIP – FLOPS
• Bazı flip – floplarınb asynchronous girişleri vardır.Bağımsız
saat olarak kullanılmaya zorlanabilir.
FLIP – FLOPS
• When power is on in a digital system, the Durum of the flip flop is
unknown.
• The direct inputs are useful for bringing all flip – flops in the
system to a known starting Durum prior to the clocked
operation.
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
51
FLIP – FLOPS
• Asynchronous
Reset
D Q R’ D CLK Q(t+1)
Q 0 x x 0
R
Reset
FLIP – FLOPS
• Asynchronous
Reset
R’ D CLK Q(t+1)
D Q
Q 0 x x 0
1 0 ↑ 0
1 1 ↑ 1
R
Reset
53
FLIP – FLOPS
• Asynchronous Preset and Clear
Preset
PR PR’ CLR’ D CLK Q(t+1)
DQ 1 0 x x 0
Q CLR
Reset
FLIP – FLOPS
• Asynchronous Preset and Clear
Preset
PR PR’ CLR’ D CLK Q(t+1)
DQ 1 0 x x 0
Q CLR 0 1 x x 1
Reset
FLIP – FLOPS
• Asynchronous Preset and Clear
Preset
PR PR’ CLR’ D CLK Q(t+1)
DQ 1 0 x x 0
Q CLR 0 1 x x 1
1 1 0 ↑ 0
Reset 1 1 1 ↑ 1
5.2 SAATLİ ARDIŞIL
DEVRELERİN ANALİZİ
57
– Çıkışlar
– Flip-Flop Durumları
– Şimdiki Durumlar
58
• Çıkışların
• Ve Dahili Durumların
Durum Denklemleri
• Saatli ardışıl devrenin davranışı durum denklemlerinin (geçiş
denkleminin) cebirsel olarak ifadesi ile yapılabilir. Durum
equations (transition equations).
Örnek: • Devrede
– İki D flip – flops A ve B.
x
DQ A
– giriş x.
Q – çıkış y.
DQ B
23 December, 2016
CLK Q B’
y
62
y
63
DQ B
CLK Q B’
y
64
Örnek: • A(t+1) = A . x + B . x
• B(t+1) = A’ . x
x
DQ A
• y = (A + B) x’
Q A’
DQ B
CLK Q B’
y
65
Durum Tablosu:
• Girişler,çıkışlar ve flip-flopların durumları bir tabloda gösterilir.
0 1 0 0 0 1 Q A’
0 1 1 0 1 0
1 0 0 0 0 1 DQ B
1 0 1 1 0 0 CLK Q B’
1 1 0 0 0 1 y
1 1 1 1 0 0
23 December, 2016 N
67
01 00 11 1 0 Q A’
10 00 10 1 0
DQ B
11 00 10 1 0 CLK Q B’
y
68
Durum Diyagramı
• Durum tablosundan elde edilen bilgi durum diyagramı ile gösterilebilir
11 00 10 1 0
01 11
AB input/output
1/0
70
JK ile Analiz • JA = B KA = B . x’
• JB = x’ KB = A x
J Q A
CLK
= B’x’ + ABx + A’Bx’
72
0 0 0 0 1 0 0 1 0
• A(t+1) = JA Q’A + K’A QA 0 0 1 0 0 0 0 0 1
= A’B + AB’ + Ax 0 1 0 1 1 1 1 1 0
0 1 1 1 0 1 0 0 1
• B(t+1) = JB Q’B + K’B QB 1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
= B’x’ + ABx + A’Bx’
1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0
73
T Flip – Flops
Şimdiki Sonr FF
I/P Output
Durum aki Inputs
x=0 Duru
m
x=0
A B x A B TA TB y
x=1 0 0 0 0 0 0 0 0
00/0 01/0 0 0 1 0 1 0 1 0
x= x=1 0 1 0 0 1 0 0 0
1
0 1 1 1 0 1 1 0
1 0 0 1 0 0 0 0
1 0 1 1 1 0 1 0
x=0 1 1 0 x1 = 11 0 0 1
1 1 1 0 0 1 1 1
11/1 10/0
x=0
77
A N A LYS I S OF CLO CK ED S EQ U EN T I
AL CI R CU I T S
Mealy and Moore Models
• The most general model of a sequential circuit has:
– Inputs
– Outputs
– Internal Durums.
• Sequential circuits are divided into two (they differ in the way output is
generated:
– Mealy model
– Moore model
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
78
• Mealy model:
– Çıkış hem şimdikigirişin hem de girişin fonksiyonudur.
• The outputs may have momentary false values unless the inputs are
synchronized with the clocks.
A N A LYS I S OF CLO CK ED S EQ U EN T I
AL CI R CU I T S
Moore Machine
clock
81
0/0 0/0
• Devrenin girişine sonsuz b c
1/0
0/0
uygulanabilir g d e
1/1 1/1
– Her biri farklı çıkış
0/0 1/1
üretilmesine neden olur. f
1/1
• DURUM AZALTMA VE ATAMA
86
0/0
• Aşağıdaki girişler uygulansın
a
– 01010110100 0/0
1/0
– A durumundan başlansın. 0/0
0/0 0/0
b c
– Her 0/1 farklı bir sonraki 1/0
0/0
g d e
1/1 1/1
0/0 1/1
f
1/1
• DURUM AZALTMA VE ATAMA
87
– 01010110100 a
0/0
1/0 0/0
0/0
Duru
a a b c d e f f g f g a 0/0 b c
1/0
m
1/0
input
0 1 0 1 0 1 1 0 1 0 0 0/0
g d e
1/1 1/1
output
0 0 0 0 0 1 1 0 1 0 0 0/0 1/1
f
1/1
88
• Aynı çıkışları ve
– İki durum denkse, biri diğeri gibi kullanılır yani biri atılır.
90
a
– Durum tablosunu çiz: 0/0 0/0
1/0
Sonraki Çıkış
0/0 0/0
Durum b c
Şimdiki Duru x=0 x=1 x=0 x=1 1/0
1/0
a a b 0 0
0/0
b c d 0 0 g d e
c a d 0 0 1/1 1/1
d e f 0 1 0/0 1/1
f
e a f 0 1
1/1
f g f 0 1
g a f 0 1
91
0/0
c and d.
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
98
Sonraki Output
Durum
Şimdiki x=0 x=1 x=0 x=1
Durum
a d b 0 0
b e a 0 0
c g f 0 1
d a d 1 0
e a d 1 0
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
DURUM REDUCTION AND
2
ASSIGNMENT 3
D
e
c
• Implication Table (extra reading) e
m
– On the left side along the vertical are listed all the Durums defined in the b
Durum table except the last, and across the bottom horizontally are listed all e
r
T
R
D
UCTIONTOLOGICDESIGN 100
DURUM REDUCTION AND
ASSIGNMENT
• Implication Table (extra reading)
– Some of the squares have entries of implied Durums that must be 2
further 3
D
ASSIGNMENT 3
D
e
c
• Implication Table (extra reading) e
m
crossed out if it contains at least one implied pair that is not equivalent. ,
2
0
4. Finally, all the squares that have no crosses are recorded with check 1
6
marks. The equivalent Durums are: (a, b), (d, e), (d, g), (e, g). N
T
R
D
UCTIONTOLOGICDESIGN 102
DURUM REDUCTION AND 2
ASSIGNMENT
3
D
e
c
• Implication Table (extra reading) e
m
Durums. The last three pairs can be combined into a set of three e
r
,
equivalent Durums (d, e,g) because each one of the Durums in the 2
0
U
CTIONTOLOGICDESIGN 103
DURUM REDUCTION AND
ASSIGNMENT
• Durum Assignment
– In order to design a sequential circuit with physical components, it
is necessary to assign coded binary values to the Durums.
– For a circuit with m Durums, the codes must contain n bits where
2n =
≥ m.
• Durum Assignment
e
c
e
m
Şimdiki Assignment 1 Assignment 2 Assignment 3
Durum Binary Gray Code One-hot b
e
a 000 000 00001 r
,
b 001 001 00010 2
0
c 010 011 00100 1
6
d 011 010 01000
N
e 100 110 10000
T
R
D
UCTIONTOLOGICDESIGN 106
10
ASSIGNMENT
• Durum Assignment
Şimdiki Sonraki Output
– Any binary number Durum
Durum
assignment is satisfactory x=0 x=1 x=0 x=1
000 000 001 0 0
as long as each Durum is
001 010 011 0 0
assigned a unique number. 010 000 011 0 0
– Use binary assignment 1. 011 100 011 0 1
100 000 011 0 1
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
5.3 DESIGN
PROCEDURE
DESIGN PROCEDURE
109
S0 / 0 S1 / 0
0
0 1
0
S3 / 1 S2 / 0
1
1
TASARIM İŞLEMİ
• Moore modeli
0 1
.
S0 / 0 S1 / 0 1
0 Duru A B
m
0
0 S0 0 0
S1 0 1
S2 / 0
S2 1 0
S3 / 1
1 S3 1 1
1
112
113
0 1
Durum Durum
A B x A+ B+ y
S0 / 0 S1 / 0 0 0 0 0 0 0
0 0 (so) 1 0 1 (s1) 0
0
0 1 0 0 0 0
0 1
0 0 1 1 1 0 0
1 0 0 0 0 0
S3 / 1 S2 / 0 1 0 1 1 1 1
1
1 1 1 0 0 0 0
1 1 1 1 1 1
TASARIM
114
– Giriş x.
– Çıkış y.
Tasarım
5
• , Şimdiki Sonr
I/P O/P
Durum aki
– A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)
Duru
– B(t+1) = DB(A,B,x) = ∑ (1, 5, 7) m
A B x A+ B+ y
– y(A,B,x) = ∑ (5, 7)
0 0 0 0 0 0
0 0 1 0 1 0
INTRODUCTIONTO LOGICDESIGN
0 1 0 0 0 0
0 1 1 1 0 0
1 0 0 0 0 0
1 0 1 1 1 1
1 1 0 0 0 0
1 1 1 1 1 1
11
TASARIM
6
–y(A,B,x) = ∑ (5, 7)
Bx B
A 00 01 11 10
m0 m1 m3 M2
0
1
m4 m5 m7 M6
A 1 1 1
DA = Ax + Bx
11
TASARIM
7
• DB için K - Map
–A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)
DA = Ax + B’x
11
TASARIM
8
–y(A,B,x) = ∑ (5, 7)
Bx B
A 00 01 11 10
m0 m1 m3 M2
0
m4 m5 m7 M6
A 1
1 1
y = Ax
11
TASARIM
9
Q
y
D Q B
CLK Q
TASARIM
120
T
R
C
TIONTOLOGICDESIGN 121
TASARIM
122
1 1 1
TASARIM
123
0 1
S0 / 0 S1 / 0
0
0 1
0
S3 / 1 S2 / 0
1
1
DESIGN PROCEDURE
126
TASARIM
7
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0 m0 m1 m3 m2
1
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 m6
A 1
X X X X
JA = Bx
12
TASARIM
8
Bx B
A 00 01 11 10
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0 m0 m1 m3 m2
X X X X
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6)
m4 m5 m7 M6
A 1
1 1
KA = x’
12
TASARIM
9
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) • JB
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
Bx B
A 00 01 11 10
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0 m0 m1 m3 m2
1 X X
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6)
m4 m5 m7 M6
A 1
1 X X
JB = x
13
TASARIM
0
• JK Flip – Flops: • KB
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) Bx B
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6) A 00 01 11 10
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0 m0 m1 m3 m2
X X 1 1
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 m6
A 1
X X 1
KB = A’ + x’
13
TASARIM
1
J Q B
K Q
CLK
TASARIM
132
• T Flip – Flop ile 3 bit sayısı: n bitlik sayısı 0’dan 2^n-1 e kadar
sayar
000
111 001
110 010
101 011
100
T Flip-Flop ile Sayıcı Tasarımı
133
•
Şimdiki Durum Sonraki Flip-Flop
Durum Girişler
A2 A1 A0 A2 A1 A0 TA2 TA1 TA0
0 0 0 0 0 1 0 0 1 TA2 (A2, A1, A0) = ∑ (3, 7)
0 0 1 0 1 0 0 1 1 T (A , A , A ) = ∑ (1, 3, 5, 7)
A1 2 1 0
0 1 0 0 1 1 0 0 1
TA0 (A2, A1, A0) = ∑ (0, 1, 2, 3, 4, 5, 6, 7)
0 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 0 1 1
1 1 0 1 1 1 0 0 1
1 1 1 0 0 0 1 1 1
13
Sayıcı Tasarımı
4
.
• TA2 için K-Map
– TA2 (A2, A1, A0) = ∑ (3, 7)
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7) A1
A1A0
A2 00 01 11 10
– TA0 (A , A , A ) = ∑ (0, 1, 2, 3, 4, 5, 0
m0 m1 m3 m2
2 1 0
1
6, 7) m4 m5 m7 m6
A 1 1
A0
TA2 = A1A0
13
TASARIM
5
A1A0 A1
A2 00 01 11 10
– TA0 (A , A , A ) = ∑ (0, 1, 2, 3, 4, 5, 0
m0 m1 m3 m2
2 1 0
1 1
6, 7) m4 m5 m7 m6
A 1 1 1
A0
TA1 = A0
13
TASARIM
6
.
• TA0 İÇİN K-Map
– TA2 (A2, A1, A0) = ∑ (3, 7)
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7) A1
A1A0
A2 00 01 11 10
– TA0 (A , A , A ) = ∑ (0, 1, 2, 3, 4, 5, 0
m0 m1 m3 m2
2 1 0
1 1 1 1
6, 7) m4 m5 m7 m6
A 1 1 1 1 1
A0
TA0 = 1
13
TASARIM
7
– TA0 = 1 Q
TQ A1
1 TQ A0
CLK