Anda di halaman 1dari 46

Rangkaian Digital

Synchronous Sequential
Logic

Adapted from : C. Gerousis, © Digital Design 3rd Ed.,


Mano,Prentice Hall

swj/08 1
Sequential Logic
Sebuah sistem digital dapat merupakan combinational logic atau sequential
logic. Jenis yang kedua memiliki elemen penyimpanan.

feedback path

 Informasi yang disimpan dalam elemen memory pada suatu saat menentukan
keadaan dari rangkaian sequential pada saat itu.
 Rangkaian sequential menerima informasi dari input eksternal. Input-input ini
bersama dengan keadaan saat ini dari elemen penyimpan, menentukan nilai dari
output.
swj/08 2
Synchronous Sequential Logic

 Rangkaian synchronous sequential adalah sistem yang


perilakunya dapat ditentukan dari pengetahuan tentang
sinyalnya pada waktu diskret.

 Sinkronisasi dilakukan oleh clock generator yang memberikan


serangkaian pulsa clock secara periodik.

 Elemen penyimpan yang digunakan dalam rangkaian


sequential yang menggunakan clock disebut flip-flops.

 Sebuah flip flop adalah peralatan penyimpan yang mampu


menyimpan satu bit informasi.

swj/08 3
Synchronous Clocked Sequential Logic

Output diperoleh dari rangkaian kombinasional atau dari flip-flops atau


keduanya. Flip-flops menerima input dari rangkaian kombinasional dan sinyal
clock. Keadaan flip-flops hanya dapat berubah selama transisi pulsa clock.
swj/08 4
LATCHES
Tipe paling dasar dari flip-flop adalah latch yang bekerja dengan sinyal level.
Latch adalah building blocks dari flip-flops.

undefined state

Dalam kondisi normal, kedua input latch tetap 0 kecuali keadaan berubah.
Jika S = 1 latch dalam keadaan ‘set’ : Q = 1, Q’ = 0.
Sebelum R reset ke 1, S harus kembali ke 0 untuk menghindari
kemunculan dari keadaan tak tentu dimana kedua output = 0
swj/08 5
SR LATCH with NAND ( S ' R' )

undefined state

• SR latch dengan gerbang NAND memerlukan sinyal 0 untuk


berubah keadaan.
• Sinyal input untuk NAND-latch adalah komplemen dari nilai
yang digunakan untuk NOR latch.
swj/08 6
SR LATCH with Control Input

• Input kontrol C menentukan kapan keadaan dari latch boleh berubah


• Jika C = 0, output dari gerbang NAND tetap 1  State tidak berubah
• Jika S = 1, R = 0, C = 1  ‘set’
• Jika S = 0, R = 0, C = 1  State tidak berubah
• Jika S = 0, R = 1, C = 1  ‘reset’
swj/08 7
D LATCH

D latch mengurangi kondisi tak diharapkan dari keadaan tak tentu


yang muncul dalam SR latch (Q = Q’ = 1).

Jika D = 1, Q = 1  ‘set’
Jika D = 0, Q = 0  ‘reset’
swj/08 8
Symbols for Latches

swj/08 9
Flip-Flops

• State pada latch dan flip-flop berubah karena perubahan sinyal


kontrol (trigger)

•D-latch di-trigger setiap kali pulsa menjadi high atau level logic
“1”.

• Selama pulsa input tetap pada level ini, setiap perubahan pada
input data akan mengakibatkan perubahan output dan state dari
latch.

• Flip-flop di-trigger pada saat transisi sinyal pada input kontrol,


dari 0 ke 1 (positive-edge trigger) atau dari 1 ke 0 (negative-
edge trigger).

swj/08 10
Positive level

Positive-edge triggered

Negative-edge triggered
swj/08 11
Edge-Triggered Flip-Flop

Rangkaian mempunyai input D dan merubah outputnya pada saat negative side
dari clock, CLK.
Jika CLK“0”, output inverter “1”. Latch slave enabled dan output Q sama
dengan output master, Y. Latch master disabled (CLK = 0).
Jika CLK berubah ke high, input D ditransfer ke latch master. Slave tetap
disabled selama C low. Setiap perubahan input merubah Y, tetapi tidak Q.
∴ Output flip-flop dapat berubah jika CLK mengalami transition 1 0
swj/08 12
Edge-Triggered Flip-Flop: Graphic Symbols

Flip-flop yang paling ekonomis dan efisien adalah edge-triggered


D flip-flop karena membutuhkan jumlah gerbang paling sedikit.
swj/08 13
JK Flip-Flop

JK flip-flop mampu menampilkan : set ke 1, reset ke 0, atau


mengkomplemen output:
1. Input J men-set flip-flop ke 1.
2. Input K me-reset flip-flop ke 0.
3. Jika J dan K enabled, output dikomplemen.
swj/08 14
JK Flip-Flop

D = JQ'+ K ' Q

Jika J = 1 dan K = 0, D = 1 next clock edge sets output to 1.


Jika J = 0 dan K = 1, D = 0 next clock edge resets output to 0.
Jika J = 1 dan K = 1, D = Q’ next clock edge complements output.
Jika J = 0 dan K = 0, D = Q next clock edge leaves output unchanged.
swj/08 15
T Flip-Flop
T (toggle) flip-flop adalah flip-flop komplemen dan dapat
diperoleh dari JK flip-flop bila kedua inputnya disatukan.
Jika T = 0 D = T ⊕ Q = Q
D = Q dan tidak ada perubahan output
Jika T = 1 D = T ⊕ Q = Q '
D = Q’ dan output adalah komplemennya

swj/08 16
Characteristic Tables and Equations
Q(t) = present state
J K Q(t+1) Q(t+1) = next state after one clock period
0 0 Q(t) No change
0 1 0 Reset
1 0 1 Set
1 1 Q’(t) Complement T Q(t+1)
0 Q(t) No change
Q (t + 1) = JQ'+ K ' Q 1 Q’(t) Complement

Q (t + 1) = T ⊕ Q = TQ '+T ' Q
D Q(t+1)
0 0 Reset
1 1 Set

Q (t + 1) = D
swj/08 17
Analysis of Clocked Sequential Circuits

Kelakuan dari rangkaian sequential dengan clock ditentukan oleh


input, output, dan state flip-flop.

 State Equation
State equation (transition equation) menentukan next state sebagai
fungsi dari present state and input.

 State Table
State table (transition table) terdiri dari: present state, input
next state dan output.

 State Diagram
Informasi dalam state table dapat direpresentasikan secara grafis dengan
state diagram. State dinyatakan dengan lingkaran dan transisi antar
state dinyatakan dengan garis berarah yang menghubungkan kedua lingkaran.
swj/08 18
Analysis of Clocked Sequential Circuits

Analysis Procedure

1. Tentukan persamaan input flip-Flop dalam present state dan


variabel input.

2. Substitusikan persamaan input kedalam persamaan karakteristik


flip-flop untuk memperoleh persamaan state.

3. Gunakan persamaan state yang sesuai untuk menentukan nilai


next state dalam state table.

swj/08 19
Example of a Sequential Circuit
State Equations
A(t + 1) = A(t ) x(t ) + B(t ) x(t )
B(t + 1) = A' (t ) x(t )
y = [ A(t ) + B (t )]x' (t )
(t+1) next state of the flip-flop
one clock edge later.
A(t + 1) = Ax + Bx
B(t + 1) = A' x
y = ( A + B ) x'
Flip-flop input equations
(excitation equations)
DA = Ax + Bx
DB = A' x
note
swj/08 mistake in Fig. 5-15 p. 181 20
Example of a Sequential Circuit (continued)
A(t + 1) = Ax + Bx
B(t + 1) = A' x
y = ( A + B ) x'

Present Next
State Input State Output
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 1 1 0
1 0 0 0 0 1
1 0 1 1 0 0
1 1 0 0 0 1
1 1 1 1 0 1

swj/08 21
Example of a Sequential Circuit (continued)
c
Present Next
State Input State Output
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0 a
0 1 0 0 0 1
0 1 1 1 1 0 b a
1 0 0 0 0 1
1 0 1 1 0 0 c
1 1 0 0 0 1
Mealy model
1 1 1 1 0 1

a: Saat rangkaian sequential dalam present state 00 dan input 1, output 0.


Setelah siklus next clock, rangkaian menuju next state 01.
b: saat rangkaian sequential dalam present state 01 dan input 1, output 0.
Setelah siklus next clock, rangkaian menuju next state 11.
c: Tidak ada perubahan state
swj/08 22
Sequential Circuit Analysis with D Flip-Flops

DA = A ⊕ x ⊕ y
A(t + 1) = A ⊕ x ⊕ y

swj/08 23
Example of Sequential Circuit with JK Flip-Flops
1. Persamaan input Flip-Flop :

JA = B KA = Bx'
JB = x' KB = A⊕x

swj/08 24
Example of Sequential Circuit with JK FF (2)

2. Substitusikan persamaan input kedalam persamaan karakteristik


flip-flop untuk memperoleh persamaan state.

Persamaan karakteristik JK Flip-Flop Persamaan input Flip-Flop

A(t + 1) = J A A'+ K A ' A JA = B K A = Bx'


B(t + 1) = J B B'+ K B ' B J B = x' KB = A ⊕ x
Persamaan state rangkaian sequential
A(t + 1) = BA' + ( Bx' )' A = A' B + AB'+ Ax
B(t + 1) = x' B' + ( A ⊕ x)' B = B' x'+ ABx + A' Bx'

3. Gunakan persamaan state yang sesuai untuk menentukan nilai


next state dalam state table.
swj/08 25
Example of Sequential Circuit with JK FF (3)

Present Next Flip-Flop


State Input State Inputs
A B x A B J A K A J B KB
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
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
1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0

A(t + 1) = BA' + ( Bx' )' A = A' B + AB'+ Ax


B(t + 1) = x' B' + ( A ⊕ x)' B = B' x'+ ABx + A' Bx'
swj/08 26
Example of Sequential Circuit with T Flip-Flops

1. Flip-Flop input equations:


TA = Bx
TB = x
y = AB

swj/08 27
Example: T Flip-Flops circuit (2)
2. Substitusikan persamaan input equations kedalam persamaan
karakteristik flip-flop untuk memperoleh persamaan state.

Q(t + 1) = T ⊕ Q = T ' Q + Q' T Persamaan karakteristik T Flip-Flop


TA = Bx
TB = x Persamaan input Flip-Flop
y = AB
A(t + 1) = ( Bx)' A + Bx( A' ) = AB' + Ax' + A' Bx Persamaan state
rangkaian
B(t + 1) = x ⊕ B
sequential

swj/08 28
Example: T Flip-Flops circuit (3)
Present Next
State Input State Output
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 1 0
0 1 1 1 0 0
1 0 0 1 0 0
1 0 1 1 1 0
1 1 0 1 1 1
1 1 1 0 0 1

A(t + 1) = ( Bx)' A + Bx( A' ) = AB' + Ax' + A' Bx


B (t + 1) = x ⊕ B

swj/08 29
State Reduction
Goal: reduce the number of states while keeping the external
input-output requirements unchanged.

State reduction example:


a: input 0  output 0, circuit stays in same state a
a: input 1  output 0, circuit goes to state b

b: input 0  output 0, circuit goes to state c

c: input 1  output 0, circuit goes to state d

swj/08 30
State Reduction

Present State Next State Output


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 f 0 1
e a f 0 1
f g f 0 1
g a f 0 1

swj/08 31
State Reduction
State Reduction Algorithm: Two states are equivalent if,
for each member of the set inputs, they give the same output
and send the circuit to the same state or equivalent state.
Present State Next State Output
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 f 0 1
e a f 0 1
f e g f 0 1 equivalent states
g a f 0 1

row with present state g is removed, and state g is replaced by state e each time it
occurs.

swj/08 32
State Reduction
State Reduction Algorithm: Two states are equivalent if,
for each member of the set inputs, they give the same output
and send the circuit to the same state or equivalent state.
Present State Next State Output
x=0 x=1 x=0 x=1
a a b 0 0
b c d 0 0
c a d d 0 0
d e f d 0 1
equivalent e a f 0 1
states f e f 0 1

row with present state f is removed, and state f is replaced by state d each time it
occurs.

swj/08 33
State Reduction

Present State Next State Output


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

swj/08 34
State Coded Binary Assignment

Present State Next State Output


x=0 x=1 x=0 x=1
a 000 a 000 b 001 0 0
b 001 c 010 d 011 0 0
c 010 a 000 d 011 0 0
d 011 e 100 d 011 0 1
e 100 a 000 d 011 0 1

Reduced State Table with Binary Assignment

swj/08 35
Sequential Circuits: Design Procedure
Recommended Design Steps

• Tentukan diagram state berdasarkan deskripsi sistem yang diberikan


untuk memenuhi spesifikasi dari operasi yang diharapkan.

• Lakukan penyederhanaan state jika diperlukan.

• Tentukan nilai biner dari tiap-tiap state.

• Susunlah tabel state yang sesuai.

• Tentukan tipe flip-flop yang akan digunakan.

• Tentukan persamaan input-ouput flip-flop.

• Gambar diagram logic rancangan.


swj/08 36
Example : Sequence Detector Sequential Circuit

Design a circuit that detects three or more consecutive 1’s in


a string of bits using D Flip-Flops.
• Start with state S0
• If the input is 0  circuit stays in the same state
• If the next input is 1  circuit goes to S1 to indicate that 1 was detected
• If the next input is 1  circuit goes to S2 to indicate that the arrival of two
consecutive 1’s.
• But if the input were 0  circuit goes back to S0.
• The third consecutive 1 sends the circuit to S3.
• If more 1 are detected  circuit stays in S3.

swj/08 37
State Diagram

swj/08 38
Sequence Detector Sequential Circuit
• State table is derived directly from the state diagram.
• We choose 2 D Flip-Flops (outputs A, B)
• There is one input x and one output y
D flip-flop state Equations:
A(t + 1) = D A ( A, B, x) = Σ(3,5,7)
Present Next A(t + 1) = DB ( A, B, x) = Σ(1,5,7)
State Input State Output
y ( A, B, x) = Σ(6,7)
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0 This state table is the result
0 1 0 0 0 0 of Moore implementation:
0 1 1 1 0 0 output depends on the
present state only.
1 0 0 0 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 1 1 1

swj/08 39
Sequence Detector Sequential Circuit

• Obtain the simplified functions from the K-Maps:


A(t + 1) = D A ( A, B, x) = Σ(3,5,7)
A(t + 1) = DB ( A, B, x) = Σ(1,5,7)
y ( A, B, x) = Σ(6,7)

swj/08 40
Sequential Circuit Logic Diagram

swj/08 41
Excitation table

swj/08 42
Synthesis using JK Flip-Flops
In order to determine the input equations for the JK flip-flops, it is necessary
to derive a functional relationship between the state table and the input equations.

Present Next
Input Flip-Flop inputs
State State

A B x A B JA KA JB KB
0 0 0 0 0 0 X 0 X
0 0 1 0 1 0 X 1 X
0 1 0 1 0 1 X X 1
0 1 1 0 1 0 X X 0
1 0 0 1 0 X 0 0 X
1 0 1 1 1 X 0 1 X
1 1 0 1 1 X 0 X 0
1 1 1 0 0 X 1 X 1

swj/08 43
Synthesis using JK Flip-Flops

swj/08 44
Synthesis using JK Flip-Flops

swj/08 45
Synthesis using T Flip-Flops

K-Map ?

swj/08 46

Anda mungkin juga menyukai