Escolar Documentos
Profissional Documentos
Cultura Documentos
0/
Digital Circuits
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.2
Digital Circuits
Clock
The design should be according to the Mealy model so that circuit has the
functionalities shown in the above timing diagram.
Because the output is effected from the input simultaneously (without the
active edge of the clock signal).
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.3
Digital Circuits
0/1
C
0/0 B
2. State transition table
Q1+Q0+,Z
S+,Z
X
State coding: X
0 1 Q1Q0 0 1
S A: 00
(Alternative coding
A B,0 A,0 B: 01 is possible) 00 01,0 00,0
B C,0 A,0 C: 11 01 11,0 00,0
C C,1 A,0 State variables: 11 11,1 00,0
Q1 , Q0 10 , ,
Alternative state coding is possible. For example, A:00, B: 10, C:01 is also possible.
In this case the circuit will be different. However, the functionality of the circuit
will be the same.
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.4
Digital Circuits
Digital Circuits
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.6
Digital Circuits
D1 D0
X X
Q1Q0 0 1 Q1Q0 0 1
00 0 0 00 1 0 To obtain expressions, Karnaugh
01 1 0 01 1 0 diagrams are formed from these
11 1 0 11 1 0 tables.
10 10 Rows and columns are in Gray code.
D1 = X'Q0 D0 = X'
State transition function (F) that determines the next state is obtained.
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.7
Digital Circuits
D1 Q1
D Q
CLK
Clock
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.8
Digital Circuits
The transitions of state variables were determined from the state transition table
in step 3.
Q1+Q0+,Z Q1Q1+ Q0Q0+
X X X
Q1Q0 0 1 Q1Q0 0 1 Q1Q0 0 1
00 01,0 00,0 00 0 0 00 0
01 11,0 00,0 01 0 01 1
11 11,1 00,0 11 1 11 1
10 , , 10 10
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.9
Digital Circuits
The required inputs for the flip-flop are replaced into state transition tables.
J1 K1 J0 K0
X X X X
Q1Q0 0 1 Q1Q0 0 1 Q1Q0 0 1 Q1Q0 0 1
00 0 0 00 00 1 0 00
01 1 0 01 01 01 0 1
11 11 0 1 11 11 0 1
10 10 10 10
J1 = X'Q0 K1 = X J0 = X' K0 = X
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.10
Digital Circuits
5. The output function (G) is determined using output table.
Z
X
Q1Q0 0 1
00 0 0
01 0 0 Z = X'Q1
11 1 0
10
X J0
J Q0
K Q
K0 CLK
Z
J1
J Q1
K1 K Q
CLK
Clock
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.11
Digital Circuits
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.12
Digital Circuits
Problem:
A synchronous sequential circuit with 2 inputs (X,Y) and a single output (Z) will be
designed.
If the number of incoming 1s to the input is 4 or a multiple of 4, the output of
the circuit is 1. Otherwise the output should be 0. If there is no incoming 1, the
output should be 1.
Solution:
The circuit should perform modulo 4 operation, and if the result of the operation
is 0, the output should be 1. This FSM can be implemented with 4 states:
1. Modulo 0: S0 Output is '1' for only this state.
2. Modulo 1: S1
3. Modulo 2: S2
4. Modulo 3: S3
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.13
Digital Circuits
Q1+Q0+ D1 D0
XY XY XY
Q1Q0 00 01 11 10 Z Q1Q0 00 01 11 10 Q1Q0 00 01 11 10
00 00 01 11 01 1 00 0 0 1 0 00 0 1 1 1
01 01 11 10 11 0
01 0 1 1 1 01 1 1 0 1
11 11 10 00 10 0
10 10 00 01 00 0 11 1 1 0 1 11 1 0 0 0
10 1 0 0 0 10 0 0 1 0
Q1 X Y Q0 X Y
Q0 X Y Q0 X Y
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.15
Digital Circuits
XY
I0
I1 4:1Z D0 Q0
D Q
I2MUX
VS Z
I3 s1 s0 CLK
Q0'
Z
I0 s1 s0
I1 4:1 D1 Q1
I2 Z D Q
I3MUX CLK
Q1'
Clock
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.16
Digital Circuits
Counter Design
Counters that count with a certain sequence can be designed as a synchronous
sequential circuit.
Moore model is appropriate for counter design.
Each output value of the counter can be accepted as a different state.
Outputs can be obtained directly from the state variables (Moore Model).
Example:
Design the counter shown below that has a single control input (X).
Counter should count in the natural order of 0-1-2-3.
Counter should go back to 0 after 3.
When X=0 it should count up, if X=1 it should count down.
X Counter clock
up/down
z1 z0 Counter output
Digital Circuits
Logical gates (AND, OR, XOR etc.) or multiplexers can be used to implement
counters.
Below, since D0 input has a very simple expression ( D0 = Q0' ) a logical gate (single
inverter) is preferred instead of a multiplexer.
D1
A multiplexer is used to drive D1 input.
X 0 1 to multiplexer:
Q1Q0
Remember: State variables (Q1Q0) will be connected
00 0 1 X
to the selection inputs of the multiplexer.
01 1 0 X'
11 0 1 X
10 1 0 X'
X X'
D0 Q0
D Q Z0
CLK
I0 s1 s0
I1 4:1 D1 Q1
I2 z D Q Z1
I3MUX CLK
Clock
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.19
Digital Circuits
Example:
Design a counter that counts in 0-1-2-3-4-5 sequence and has a single control
input (X).
If X=0 count up by one, if X=1 count up by 2.
State table:
X=0 Q2+Q1+Q0+
000 001
X=0 X
X=0 Q2Q1Q0 0 1
X=1 X=1 000 001 010
X=1 001 010 011
101 X=1 010
010 011 100
X=1 X=1 011 100 101
X=0 100 101 000
X=0
101 000 001
100 011 110
X=0
111
Q2+Q1+Q0+
QX
Q2Q1 0 00 01 11 10
State table organized as a 00 001 010 011 010
Karnaugh diagram: 01 011 100 101 100
11
10 101 000 001 000
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.20
Digital Circuits
T2 T1 T0
Q0X Q0X QX
Q2Q1 00 01 11 10 Q2Q1 00 01 11 10 Q2Q1 0 00 01 11 10
00 0 0 0 0 00 0 1 1 1 00 1 0 0 1
01 0 1 1 1 01 0 1 1 1 01 1 0 0 1
11 11 11
10 0 1 1 1 10 0 0 0 0 10 1 0 0 1
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.21
Digital Circuits
T2 Q2
T Q Z2
CLK
Q2'
T1 Q1
T Q Z1
CLK
Q1'
T0 Q0
T Q Z0
Q2 CLK
Q0'
Q2'
Q1
Clock
Q0
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.22
Digital Circuits
Implementation of synchronous
circuits using PAL
As combinational circuits, it is
also possible to use PAL units to
implement synchronous circuits.
For this purpose, PAL units that
include flip-flops are used.
At the right, a 16R8 PAL circuit
is shown.
http://www.faculty.itu.edu.tr/buzluca
http://www.buzluca.info
Translated by Dr. Mustafa KAMAAK 2011 Dr. Feza BUZLUCA 8.23