You are on page 1of 23

Digital Design

(Sekuensial)
Fajar Budiman
Analisa Rangkaian Sekuensial
Analisa Rangkaian Digital
Desain Rangkaian Digital
Memory
Analisa Rangkaian Sekuensial
Analisa Rangkaian Sekuensial
Dinyatakan dengan state equation (secara boolean algebra)
State equation disebut juga transition equation
Menentukan next state sebagai sebuah fungsi present state
dan input
Analisa Rangkaian Sekuensial
Analisa Rangkaian Sekuensial
State table (transition table)
Pada umumnya: m flip-flop dan n input membutuhkan
sebanyak 2m+n baris, dan sebanyak m kolom untuk next state
(1 untuk 1 flip-flop)
Analisa Rangkaian Sekuensial
State diagram
Analisa Rangkaian

Circuit State State


Equation
Diagram table diagram
Contoh
A(t+1) = (X xor Y) xor A
Tabel Kebenaran dan Diagram State
Desain Rangkain
Counter Modulo - 4

Requires four states, encoded in binary, with at least


two bits for them to be encoded uniquely.
A = 00
B = 01
C = 10
D = 11
The input requires only a single bit.
0|1
Desain Rangkain
Counter Modulo - 4
Desain Rangkain
Counter Modulo - 4
Desain Rangkain
Counter Modulo 4
State Assignment for the Mod-4 Counter
Desain Rangkain
Counter Modulo 4
Tabel Kebenaran
Clock D Qnext
Rising
0 0
edge
Rising
1 1
edge
Non-
X Q
Rising
Desain Rangkain
Counter Modulo 4
Rangkaian
Contoh:
A Vending Machine Controller
Design a vending machine controller using D-flip flops and a
Programmable Logic Array (PLA).
The vending machine accepts three types of inputs: a nickel (5),
a dime (10), or a quarter (25).
When the value of the total inserted coins equals or exceeds 20,
the machine dispenses the merchandise, returns any excess
change, and waits for the next transaction.
The Vending Machine Controller
For simplicity, we will assume that if the machine
currently has 15 and the user inserts a quarter, the
merchandise will be dispensed, 15 will be returned,
and the machine will keep 5 and await for more
money.
This way, we can use 4 states to represent all
possible states:
A (00) = 0 C (10) = 10
B (01) = 5 D (11) = 15
We will need two bits each to uniquely encode all
possible states as well as inputs.
State Transition Diagram for
the Vending Machine

Input / Output2Output1Output0

Input = Nickel | Dime | Quarter


Output2 = 1|0 = Dispense / Do not dispense merchandise
Output1 = 1|0 = Return / Do not return a nickel in change
Output0= 1|0 = Return / Do not return a dime in change
State Table and State Assignment
for the Vending Machine

Present State = sn
Input = xn
Output = zn
Truth Table for the s1 s0 x1 x0 s1 s0 z2 z1 z0
0 0 0 0 0 0 1 0 0 0
Vending Machine 1 0 0 0 1 1 0 0 0 0
2 0 0 1 0 0 0 1 1 0
3 0 0 1 1 d d d d d
4 0 1 0 0 1 0 0 0 0
5 0 1 0 1 1 1 0 0 0
For the FSM circuit, we will need: 6 0 1 1 0 0 0 1 0 1
7 0 1 1 1 d d d d d
Two D flip-flops to represent the two
state bits. 8 1 0 0 0 1 1 0 0 0
9 1 0 0 1 0 0 1 0 0
PLA that takes four inputs (two for the 10 1 0 1 0 0 0 1 0 0
present state bits and two for the coin
11 1 0 1 1 d d d d d
bits) and has five outputs (two for the
next state bits and three for the dispense 12 1 1 0 0 0 0 1 1 1
and return bits). 13 1 1 0 1 0 0 1 1 0
14 1 1 1 0 0 1 1 1 1
15 1 1 1 1 d d d d d
Logic Design for the Vending
Machine
x1 z2
x0 z1
5x5 z0
PLA
Assumes the clock input is asserted only
on an event such as the user inserting a
coin into the machine.
Q D
s0
CLK

Q D
s1

You might also like