Professional Documents
Culture Documents
ECE 545-Digital System Design With VHDL: Digital Logic Refresher Part B - Sequential Logic Building Blocks
ECE 545-Digital System Design With VHDL: Digital Logic Refresher Part B - Sequential Logic Building Blocks
Lecture 1
1
Lecture Roadmap – Sequential Logic
2
Textbook References
3
Sequential Logic Building Blocks
4
Introduction to Sequential Logic
5
Introduction (cont’d)
Main components of a typical synchronous sequential circuit
(synchronous = uses a clock to keep circuits in lock step)
INPUT OUTPUT
COMBINATIONAL
LOGIC
S(t) S(t+1)
STATE-HOLDING
STORAGE
ELEMENTS
(i.e. FLIP-FLOPS)
CLOCK
6
State-Holding Memory Elements
• Latch versus Flip Flop
• Latches are level-sensitive: whenever clock is high, latch
is transparent
• Flip-flops are edge-sensitive: data passes through (i.e.
data is sampled) only on a rising (or falling) edge of the
clock
• Latches cheaper to implement than flip-flops
• Flip-flops are easier to design with than latches
• In this course, primarily use D flip-flops
7
D Latch vs. D Flip-Flop
D Q D
CLK
CLK
D Q CLK
CLK
Q
8
D latch
Graphical symbol Truth table
Clock D Q(t+1)
D Q
0 – Q(t)
Clock 1 0 0
1 1 1
Timing diagram
t1 t2 t3 t4
Clock
D
Q
Time
9
D flip-flop
Graphical symbol Truth table
Clk D Q(t+1)
D Q
↑ 0 0
Clock ↑ 1 1
0 – Q(t)
1 – Q(t)
Timing diagram
t1 t2 t3 t4
Clock
D
Q
Time
10
D Flip-Flop with Asynchronous Set and Reset
Clock Q Q CLK
Reset
Q
(asynchronous Reset)
Q
(synchronous Reset)
D(2) D Q Q(2) 4 4
CLK D Q
D(1) D Q Q(1)
CLK
D(0) D Q Q(0)
CLK
Clock
Sin Q3 Q2 Q1 Q0
D Q D Q D Q D Q Q
Clk
(a) Circuit
Clk
SHIFT Sin Q3 Q2 Q1 Q0 = Q
Sin REGISTER Q t0 1 0 0 0 0
t1 0 1 0 0 0
t2 1 0 1 0 0
t3 1 1 0 1 0
t4 1 1 1 0 1
t5 0 1 1 1 0
t6 0 0 1 1 1
t7 0 0 0 1 1
14
4-bit Shift Registers: symbols
4 Enable 4 4 Enable 4
D Q D Q
Load
Sin Sin
Clock Clock
15
Shift Register with Enable: internal structure
Sin
D Q D Q D Q D Q
Clock
Enable
16
Shift Register with Parallel Load: internal structure
Load
D(3)
D(2) D(1) D(0)
Sin
D Q D Q D Q D Q
Clock
Enable
17
Synchronous Up Counter
enable
load carry
D0 Q0
D1 Q1
D2 Q2
D3 Q3
clock
20