Sekrondevreler

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 177

O

ARDIŞIL (SIRALI) SEQUENTIAL DEVRELER


• Her sayısal devrede birleşik devre mevcuttur.

Çoğu sistemde pratikte bellek elemanı vardır.Birleşik devre +


bellek elemanları ardışıl sequential devre denir.

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.

• Ardışıl devre girişler,çıkışlar ve dahili durumlarla tanımlanır


Ardışıl Devreler
• İki ana tip ardışıl devre vardır.

Synchronous Asynchronous

Sequential Circuit
Ardışıl Devreler
• Asynchronous Asenkron ardışıl devre

Inputs Outputs
Combinational Circuit
Memory Elements

– Devrenin davranışı giriş sinyallerine bağlıdır.


ARDIŞIL DEVRE
• Asynchronous Ardışıl devre
– Asenkron ardışıl devre geri beslemeli kombinasyonel devre
olarak da adlandırılabilir.
• ARDIŞIL DEVRE
• Synchronous Senkron (eşzamanlı) ardışıl devre

Inputs Outputs
Combinational Circuit

Flip-flops
Clock
ARDIŞIL DEVRE
– Synchronous

• Synchronisation Senkranizasyon eşzamanlama saat üreteci

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.

• Asenkron devreler için uygundur ve 1 bit bilgiyi saklayabilir.

• They are not practical for use in synchronous sequential circuits.


15

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

Set (S) 0 Q Hold

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.

– D latch has two inputs


• D (data) – S ye D’ ise R’ye bağlanı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)

– D latch içinde bilgi tutma yeteneği vardır.

– Bilgiyi geçici tutmak amacıyla kullanılabilir.

– Bu devreye transparent latch de denir.


23

FLIP – FLOPS
• Ortak saatleri vardır.
Flip-Flopun tetiklenmesi vardır (trigger)
FLIP – FLOPS
• Kontrollü latchde , level – triggered (seviye tetikleme)

• Flip-Flops edge – triggered (kenar tetikleme)

CLK Positive Edge

CLK Negative Edge


25

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.

2. Produce a flip – flop that triggers only during a signal transition.


• From 0 to 1 or from 1 to 0 only.

• Disabled during the rest of the clock pulse duration.


26

FLIP – FLOPLAR
• Master – Slave D flip – flops
D
D D Latch Q D
Q Q
D Latch
(Master)
C (Slave)
C

CLK Master Slave


CLK
Looks like it is
negative edge- D QSlave
triggered
QMaster
27

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

2. Placing the output latch in


the quiescent condition.
D
3. No change in the output.

23 December, 2016 INTRODUCTIONTO LOGICDESIGN


30

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.

23 December, 2016 INTRODUCTIONTO LOGICDESIGN


31
FLIP – FLOPS
• Edge-Triggered D Flip – Flop
D Q
Positive Edge
Q
Q
CLK Dynamic
Q input
D Q

Q
D
Negative Edge

23 December, 2016 INTRODUCTIONTO LOGICDESIGN


34

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

– Sonraki clock edge sets the


D = JQ’ + output to 1.
K’Q
6
FLIP – FLOPS
• JK Flip – Flop işlem 2

• When J = 0 and K = 1,
– D = 0.Q’ + 0.Q (Theo2b)
J
DQ Q – D=0+0
K
CLK Q
Q – D=0

– Sonraki clock edge sets the


D = JQ’ + output to 0.
K’Q
FLIP – FLOPS
• JK Flip – Flop işlem 3

• 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)

– Saat kenarı durumu T J Q


değiştirmez. C
– T = 1 (J = K = 1) K Q
Saat kenarı Q yu tersler.

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.

• FF’ları 1 yapan girişse preset denir.


• FF’ları 0 yadan girişe clear or direct reset.
• Bir sayısal sistemde güç verildiğinde ff durumları bilinmez.
50

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

Saatli Ardışıl Devrelerin Analizi:

• Saatli ardışıl devrenin analizi aşağıdakilerle gerçekleştirilir:


– Girişler

– Çıkışlar

– Flip-Flop Durumları

• Çıkışlar ve sonraki durumla aşağıdakilere bağlıdır;


– Girişler

– Şimdiki Durumlar
58

Saatli Ardışıl Devrelerin Analizi:

• Ardışıl devre analizi aşağıdaki gibi yapılır:


• Girişlerin

• Çıkışların

• Ve Dahili Durumların

Tablosu veya diyagramı elde edilir.

– Devrenin davranışını veren mantıksal bir fonksiyon da elde


edilebilir.
59

Saatli Ardışıl Devrelerin Analizi:

Durum Denklemleri
• Saatli ardışıl devrenin davranışı durum denklemlerinin (geçiş
denkleminin) cebirsel olarak ifadesi ile yapılabilir. Durum
equations (transition equations).

• Durum denklemi ile sonraki durumları şimdiki durum ve girişler cinsinden


ifadesi ile yapılır.
60

Saatli Ardışıl Devrelerin Analizi:

Örnek: • Devrede
– İki D flip – flops A ve B.
x
DQ A
– giriş x.
Q – çıkış y.

– devre için bir çok denklem yazılabilir.


DQ
y
CLK Q
61

Saatli Ardışıl Devrelerin Analizi:

Örnek: • A(t+1) = A(t) . x(t) + B(t) . x(t)


• B(t+1) = A’(t) . x(t)
x
DQ A
– (t+1)  Sonraki Durum of the flip flop
Q A’ – (sonraki durum)

DQ B
23 December, 2016

CLK Q B’

y
62

Saatli Ardışıl Devrelerin Analizi:

Örnek: • A(t+1) = A(t) . x(t) + B(t) . x(t)


• B(t+1) = A’(t) . x(t)
x
DQ A
– t yi ihmal edersek;
Q A’
• A(t+1) = A . x + B . x
DQ B • B(t+1) = A’ . x
CLK Q B’

y
63

Saatli Ardışıl Devrelerin Analizi:

Örnek: • Benzer şekilde,


• y(t) = [A(t) + B(t)] x’(t)
x
DQ A
• y = (A + B) x’
Q A’

DQ B

CLK Q B’

y
64

Saatli Ardışıl Devrelerin Analizi:

Ö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

Saatli Ardışıl Devrelerin Analizi:

Durum Tablosu:
• Girişler,çıkışlar ve flip-flopların durumları bir tabloda gösterilir.

• In general, m flip – flop ve n giriş için 2 m+n satır olmalıdır.


66

Saatli Ardışıl Devrelerin Analizi:

Durum Tablosu • A(t+1) = A . x + B . x


Şİmdiki Giriş(t) Sonraki
Durum Durum
Çıkış • B(t+1) = A’ . x
(t) (t+1)
A B x A B y • y = (A + B) x’
0 0 0 0 0 0
0 0 1 0 1 0 x
DQ A

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

Saatli Ardışıl Devrelerin Analizi:

Durum Tablosu 2 • A(t+1) = A . x + B . x


Şimdiki Sonraki
Durum Durum
Output • B(t+1) = A’ . x
(t) (t+1)
x=0 x=1 x=0 x=1 • y = (A + B) x’
AB AB AB y y
00 00 01 0 0 x
DQ A

01 00 11 1 0 Q A’

10 00 10 1 0
DQ B

11 00 10 1 0 CLK Q B’

y
68

Saatli Ardışıl Devrelerin Analizi:

Durum Diyagramı
• Durum tablosundan elde edilen bilgi durum diyagramı ile gösterilebilir

• Durum daire ile gösterilir.


• Durumlar arası geçişler ise oklarla gösterilir.
69

Saatli Ardışıl Devrelerin Analizi:


Geçiş Diyagramı
0/0 1/0
Şimdiki Sonraki
Output
Durum Durum 0/1
(t) (t+1)
x=0 x=1 x=0 x=1 00 10
AB AB AB y y
00 00 01 0 0 0/1
01 00 11 1 0 1/0 0/1 1/0
10 00 10 1 0

11 00 10 1 0
01 11
AB input/output
1/0
70

Saatli Ardışıl Devrelerin Analizi:


D FF ile analiz
Şimdiki Sonr
Inputs
Durum aki
x DQ Duru
y A
Q m
CLK A x y A
0 0 0 0
0 0 1 1
• A(t+1) = DA = A  x  y
0 1 0 1
01,10
0 1 1 0
1 0 0 1
00,11 0 1 00,11 1 0 1 0
1 1 0 0
01,10
23December,2016
INTRODUCTIONTOLOGICDESIGN
71

Saatli Ardışıl Devrelerin Analizi:

JK ile Analiz • JA = B KA = B . x’
• JB = x’ KB = A  x
J Q A

x K Q • A(t+1) = JA Q’A + K’A QA


= A’B + AB’ + Ax
J Q B

K Q • B(t+1) = JB Q’B + K’B QB

CLK
= B’x’ + ABx + A’Bx’
72

Saatli Ardışıl Devrelerin Analizi:


JK FF ile Analiz
Şimdiki Sonr Flip – Flop
• JA = B KA = B x’ Durum
I/P
aki Inputs
Duru
• JB m
= x’ KB = A  x
A B x A B JA KA JB KB

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

Saatli Ardışıl Devrelerin Analizi:

JK Flip – Flop ile Analiz


Şimdiki Sonr Flip – Flop
I/P
Durum aki Inputs
x=1 x=0 x=1 Duru
m
A B x A B JA KA JB KB
00 11
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
x=0
x =0 x=0 0 1 0 1 1 1 1 1 0
0 1 1 1 0 1 0 0 1
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
01 10
1 1 0 0 0 1 1 1 1
x=1 x=1 1 1 1 1 1 1 0 0 0
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
74

Saatli Ardışıl Devrelerin Analizi:

T Flip – Flop ile Analiz • TA = B.x TB = x


x Q A
T • y=A.B
RQ
y • Q(t+1) = T Q = T’Q + TQ’
• A(t+1) = TA A = TA’ A + TA A’
= (Bx)’ A + BxA’
= (B’ + x’)A + A’Bx
T Q = AB’ + Ax’ + A’Bx
B
• B(t+1) = TB B = TB’ B + TB B’
RQ
= x’B + xB’
=x B
CLK Reset
75

Saatli Ardışıl Devrelerin Analizi:

Analysis with T Flip – Flops


Şimdiki Sonr FF
• TA = B.x TB = x Duru I aki Inputs Outp
m Duru
• y=A.B A B x A
m B TA TB y

• Q(t+1) = T Q = T’Q + TQ’ 0 0 0 0 0 0 0 0


• A(t+1) = TA A = TA’ A + TA A’ 0 0 1 0 1 0 1 0
= (Bx)’ A + BxA’ 0 1 0 0 1 0 0 0
= (B’ + x’)A + A’Bx 0 1 1 1 0 1 1 0
= AB’ + Ax’ + A’Bx 1 0 0 1 0 0 0 0
• B(t+1) = TB B = TB’ B + TB B’ 1 0 1 1 1 0 1 0
= x’B + xB’ 1 1 0 1 0 0 1
1
=x B 1 1 1 0 0 11 1
76

Saatli Ardışıl Devrelerin Analizi:

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

Saatli Ardışıl Devrelerin Analizi:

Mealy ve Moore Modeli

• Mealy model:
– Çıkış hem şimdikigirişin hem de girişin fonksiyonudur.

• Çıkışlar eğer girişler saat darbesi boyunca değişirse değişebilir.

• The outputs may have momentary false values unless the inputs are
synchronized with the clocks.

– Example of Sequential Circuit


79

Saatli Ardışıl Devrelerin Analizi:

Mealyve Moore Modelleri


• Moore model:
– Çıkış sadece durumların fonksiyonudur.

– Çıkışlar saatle senktronizedir.



80

A N A LYS I S OF CLO CK ED S EQ U EN T I
AL CI R CU I T S

Mealy ve Moore Modelleri:


Mealy Machine

InputsSonraki Durum Combinational Logic


Durum Register Output Combinational Logic
Outputs
(Mealy – type)
clock

Moore Machine

InputsSonraki Durum Combinational Logic


Durum Register Output Combinational Logic
Outputs
(Moore – type)

clock
81

Saatli Ardışıl Devrelerin Analizi:


Mealy Moore
Şimdiki Sonr
I/ O/P
Duru aki
m B
A x Duru
A B y Şimdiki Sonra
m I/P O/P
0 0 0 0 0 0 Durum ki
Duru
m
0 0 1 0 1 0 A B x A B y
0 1 0 0 0 1 0 0 0 0 0 0
0 1 1 1 1 0 0 0 1 0 1 0
1 0 0 0 0 1 0 1 0 0 1 0
1 0 1 1 0 0 0 1 1 1 0 0
1 1 0 0 0 1 1 0 0 1 0 0
1 1 1 1 0 0 1 0 1 1 1 0
For the same Durum, For the same Durum,
the output changes with the input the output does not change with the input
DURUM AZALTMA VE ATAMA
83

DURUM AZALTMA VE ATAMA


• Ardışıl devrelerin analizi
– Devre çiziminden başlar

– Durum diyagramı veya durum şeması ile biter.

• Ardışıl devrelerin(Sıralı) tasarımında


– Bir takım özelliklerin belirlenmesi ile başlar ve

– Lojik diyagramla son bulur


84

DURUM AZALTMA VE ATAMA


• Devrenin giriş çıkışlarına dokunmadan, durum tablosunda
durumların azaltılması ile ilgilenir.
durum üretir.
• m flip – flop 2m
– Durum azaltma ile ff sayısı azalabilir veya azalmaz. Ama artmaz.

– Ancak bazı durumlarda daha karmaşık kombinasyonal kapılara gerek


duyabilir.
• DURUM AZALTMA VE ATAMA
85

• Durum diyagramı yandaki


0/0
şekildeki gibi olan ardışıl
a
devre düşünelim. 0/0 0/0
1/0

0/0 0/0
• Devrenin girişine sonsuz b c
1/0

kombinasyonda 1-0 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

duruma yönlendirir. 1/0

0/0
g d e
1/1 1/1
0/0 1/1
f
1/1
• DURUM AZALTMA VE ATAMA
87

• Aşağıdaki giriş için; 0/0

– 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

• DURUM AZALTMA VE ATAMA


• İki devre denktir;
– Tüm girişler için aynı çıkışları üretiyorsa;

– Durumların sayısı önemli değildir.

• Durum azaltma problemi


G/Ç arasındaki bağıntıyı değiştirmeden durum azaltmaya bakar
89

• DURUM AZALTMA VE ATAMA


• Denk durumlar;
– İki durum denktir eğer;
• Aynı girişler için,

• Aynı çıkışları ve

• Aynı duruma veya denk duruma yönlendiriyorsa

– İki durum denkse, biri diğeri gibi kullanılır yani biri atılır.
90

DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma 0/0

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

• DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma Şimdiki Sonraki Output
Durum Durum
– e = g (g yi yok et) x=0 x=1 x=0 x=1
a a b 0 0
– g satırı yok edilir.
b c d 0 0
– tabloda g görülen yere e c a d 0 0
yazılır. d e f 0 1
e a f 0 1
f g f 0 1
g a f 0 1
INTRODUCTIONTO LOGICDESIGN
92

• DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma
Şimdiki Sonraki Output
– Simdiki durum f sonraki Durum Durum
durum e ve f olur. x=0 x=1 x=0 x=1
a a b 0 0
– d = f (f yi sil) b c d 0 0

– f satırı yok edilir. c a d 0 0


d e d 0 1
– f durumu d ile e a d 0 1
değiştirilir.
93

• DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma
– Son tablo

Şimdiki Sonraki Output


Durum Durum
INTRODUCTIONTO LOGICDESIGN
x=0 x=1 x=0 x=1
a a b 0 0
b c d 0 0
c a d 0 0
d e d 0 1
e a d 0 1
94

• DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma

0/0

Şimdiki Sonraki Output a


Durum Durum
0/0 1/0 0/0
x=0 x=1 x=0 x=1
0/0
a a b 0 0 e b c
b c d 0 0 1/1 1/0
c a d 0 0 0/0 1/0
d e d 0 1 d
e a d 0 1 1/1
95

• DURUM AZALTMA VE ATAMA


• Durumların sayısını azaltma;
– Kullanılmayan durumlar don’t care (x) olarak davranılır..
96

DURUM REDUCTION AND


ASSIGNMENT
• Implication Table (extra reading)
– The Durum-reduction procedure for completely specified Durum tables is
based on the algorithm that two Durums in a Durum table can be
combined into one if they can be shown to be equivalent. There are
occasions when a pair of Durums do not have the same Sonraki Durums,
but, nonetheless, go to equivalent Sonraki Durums. Consider the following
Durum table:
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
97

DURUM REDUCTION AND


ASSIGNMENT
• Implication Table (extra reading)
– Consider the following Şimdiki Sonraki Output
Durum Durum
Durum table:
x=0 x=1 x=0 x=1
– (a, b) imply (c, d) and (c, d) a c b 0 1
imply (a, b). Both pairs of b d a 0 1
Durums are equivalent; i.e., a c a d 1 0

and b are equivalent as well as d b d 1 0

c and d.
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
98

DURUM REDUCTION AND


ASSIGNMENT
• Implication Table (extra reading)
– The checking of each pair of Durums for possible equivalence in a table
with a large number of Durums can be done systematically by means of an
implication table. This a chart that consists of squares, one for every
possible pair of Durums, that provide spaces for listing any possible
implied Durums. Consider the following Durum table:
23 December, 2016 INTRODUCTIONTO LOGICDESIGN
99

DURUM REDUCTION AND


ASSIGNMENT
• Implication Table (extra reading)
– Consider the following Durum table: Implication table:

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

the Durums except the last. ,


2
0
– The Durums that are not equivalent are marked with a ‘x’ in the 1
6

corresponding square, whereas their equivalence is recorded with a ‘√’. N

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

investigated to determine whether they are equivalent or not. e


c
– The step-by-step procedure of filling in the squares is as follows: e
m
1. Place a cross in any square corresponding to a pair of Durums whose outputs are not
b
equal for every input. e
r
2. Enter in the remaining squares the pairs of Durums that are implied by the pair of ,
2
Durums reŞimdikiing the squares. We do that by starting from the top square in the 0
1
left column and going down and then proceeding with the Sonraki column to the 6
NTRODUCTIONTOLOGICDESIGN 101
DURUM REDUCTION AND
2

ASSIGNMENT 3
D

e
c
• Implication Table (extra reading) e
m

3. Make successive passes through the table to determine whether any b

additional squares should be marked with a ‘x’. A square in the table is e


r

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

– We now combine pairs of Durums into larger groups of equivalent b

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

group is equivalent to the other two. The final partition of these 1


6

Durums consists of the equivalent Durums found from the N

implication table, together with all the remaining Durums in the T


R

Durum table that are not equivalent to any other Durum: O

– (a, b) (c) (d, e, g) (f) D

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.

– To minimize the cost of the combinational circuits.

– For a circuit with m Durums, the codes must contain n bits where
2n =
≥ m.

– Ex: with 3 bits it is possible to assign codes to 8 Durums denoted


ers 000 trough 111. 104

23 December, 2016 INTRODUCTIONTOLOGICDESIGN


DURUM REDUCTION AND
ASSIGNMENT
• Durum Assignment
– If the Durum table1 is used, we must assign binary values to 7
Durums.
• Remaining Durum is unused.

– If the Durum table2 is used, only five Durums need binary


assignment.
• Remaining 3 Durum is unused.
• Unused Durums treated as don’t care conditions.
• Since don’t care conditions usually help in obtaining a simpler circuit, it
combinational gates than the one with seven Durums. 105

23 December, 2016 INTRODUCTIONTOLOGICDESIGN


DURUM REDUCTION AND
ASSIGNMENT 2
3
D

• 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

DURUM REDUCTION AND


7

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

• The design of a clocked sequential circuit starts from


– a set of specifications and

– culminates in a logic diagram or

– a list of Boolean functions from which the logic diagram can


be obtained.

23 December, 2016 INTRODUCTIONTOLOGICDESIGN


TASARIM İŞLEMİ
110

1. Söylenenlerden durum diyagramı çizilir.

2. Gerekli ise durum azaltma yap.

3. Durumlara ikili değerler atanır.

4. Ikili kodlanmış durum tablosu elde edilir.

5. Flip-Flop türü seçilir.

6. FF’ların girişleri ve çıkışlar için indirgenmiş devre elde edilir.

7. Lojik diyagram çizilir.


TASARIM İŞLEMİ
111

• Örnek: Girişten üç veya daha fazla ardışıl bir gelmesini


algılayan devre tasarlanmak isteniyor.
.
0
• Durum diyagramı: 1

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

Şimdiki Giriş Sonraki Çıkış

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

• Devreyi gerçekleştirmek için;


– İki adet D tipi flip-flop seçilir. A ve B olsun.

– Giriş x.

– Çıkış y.

– D flip-flop karakteristlik fonksiyonu


• Q(t+1) = D.
11

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

–A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)


• DA için K - Map
–B(t+1) = DB(A,B,x) = ∑ (1, 5, 7)

–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)

–B(t+1) = DB(A,B,x) = ∑ (1, 5, 7)


Bx B
–y(A,B,x) = ∑ (5, 7) A 00 01 11 10
m0 m1 m3 M2
0
1
m4 m5 m7 M6
A 1 1 1

DA = Ax + B’x
11

TASARIM
8

–A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)


• Y için K - Map
–B(t+1) = DB(A,B,x) = ∑ (1, 5, 7)

–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

– DA = Ax + Bx • Lojik diyagram 3 bitlikardışık 1 algılayıcı


– DB = Ax + B’x Detector
x
– y = Ax
D Q A

Q
y

D Q B

CLK Q
TASARIM
120

D tipi olduğu için basit bulundu.

• JK ve T ile tasarım biraz daha karışık.


DESIGN PROCEDURE
2
3
D

• During the design process we usually know the transition from c


e
m
Şimdiki Durum to the Sonraki Durum and wish to find the flip – flop b

input conditions that will cause the required transition. e


r
,
• For this reason, we need a table that lists the required inputs for a 2
0
given 1
6

change of Durum. Such table is called an excitation table. N

T
R

C
TIONTOLOGICDESIGN 121
TASARIM
122

• D Flip – Flop yükseltme çizelgesi

D Flip – Flop Characteristic Table Şimdiki Sonra F.F.


Durum ki Input
D Q (t+1) Durum
Q(t) Q(t+1) D
0 0
0 0 0
1 1
0 1 1
Q(t+1) = D 1 0 0

1 1 1
TASARIM
123

• JK Flip – Flop ile Tasarım

JK Flip – Flop Characteristic Table Şimdiki Sonra F.F.


Durum ki Input
J K Q (t+1) Durum 0 0 (No change)
0 0 Q(t) Q(t) Q(t+1) J K 1 (Reset)
0 (Set)
0 1 0 0 0 0 X 1 1 (Toggle)
1 (Reset)
0 1 1 X
1 0 1 1 (Toggle)
1 0 X 1 0 (No change)
1 1 Q’(t) 0 (Set)
1 1 X 0
Q(t+1) = JQ’ + K’Q
TASARIM
124

• T Flip – Flop ile Tasarım

T Flip – Flop Characteristic Table Şimdiki Sonra F.F.


Durum ki Input
T Q (t+1) Durum
Q(t) Q(t+1) T
0 Q(t)
0 0 0
1 Q’(t)
0 1 1
1 0 1
Q(t+1) = T Q
1 1 0
DESIGN PROCEDURE
125

• JK Flip – Flop ile tasarım:

0 1

S0 / 0 S1 / 0
0

0 1
0

S3 / 1 S2 / 0
1
1
DESIGN PROCEDURE
126

Şimdiki Sonr Flip-Flop


Input
Durum aki Inputs JA (A, B, x) = ∑ (3, 4, 5, 6, 7)
Duru
m
A B x A B A KA JB KB
0 0 0 0 0 0 X 0 X
0 0 1 0 1 0 X 1 X
0 1 0 0 0 0 X X 1
0 1 1 1 0 1 X X 1
1 0 0 0 0 X 1 0 X
1 0 1 1 1 X 0 1 X
1 1 0 0 0 X 1 X 1
KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7)
KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6)
12

TASARIM
7

• JK Flip – Flop ile JA için K-Map


– JA (A, B, x) = ∑ (3, 4, 5, 6, 7)
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6) B
Bx
A 00 01 11 10

– 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

– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) • KA için


– 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

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

• JK ile tasarım: • Lojik diyagram algılayıcı


3 veyadaha fazla 1 algılar
– JA = Bx
– KA = x’ J Q A
– JB = x
x K Q y
– KB = A’ + x’

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

– TA2 (A2, A1, A0) = ∑ (3, 7)


• TA1 İÇİN K-Map
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7)

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

– TA2 = A1A0 • 3 bitlik sayıcı Logic Diagramı


– TA1 = A0 TQ A2

– TA0 = 1 Q

TQ A1

1 TQ A0

CLK

You might also like