HO09 Sequential Circuits - ECE212 - S24
HO09 Sequential Circuits - ECE212 - S24
ECE 212
Lecture 9
Sequential Circuits
Mohamed Dessouky
Integrated Circuits Laboratory
Ain Shams University
Cairo, Egypt
[email protected]
In Out
Combinational Combinational
In Logic Out Logic
Circuit Circuit
State
CLK
Combinational Sequential
1
Synchronous Systems
• Digital systems = Datapath + Controller + Memory
• Datapath: Moving data through computation functional units
• Controller: Control the dataflow
• Most digital systems are synchronous systems: Use a clock
– to retime the data/control signals typically once a cycle.
– to define time reference for data movement within synchronous
systems.
Sequential Examples
• Dataflow/Datapath
– Moving data through computation functional units
– Functional units are the optimized combinational logic (CL) blocks
– Registers to demark re-synchronization.
• Controller/Finite-State Machine
– Control the dataflow
– States are stored in the registers.
– CL computes the next state as well as outputs.
• But, Why do we need clocks in digital systems??
in out
CL CL CL
2
Timing Diagrams
D1
D2 Output Stable
time
• Combinational logic is a signal unidirectional system
• Signals (events) propagate from the inputs to the outputs
• There should be no feedback in combinational logic
• In order to obtain the desired output, all inputs must remain
stable till the output is generated.
• In general, multiple CL blocks are placed in series to perform
different operations on the input data.
M. Dessouky Digital Circuits – ECE212 – S24
3
Variable Combinational Logic Delay
Case 1: Only Q3 changes:
Q0 – Minimum Delay (Shortest Path)
D
Q1
Q3
Q2
D Output Stable
Q3
Min.
Delay
CL Delay Definitions
4
Propagation Delay
Wave arrives at t0
Data waves
10
5
Sequential Design – Data Sequencing
Data-in
Data-out
OutA is sampled by F2
InA is sampled by F1 OutA appears at Data-out, 1-cycle delayed
InB is sampled by F1
11
12
6
Latches versus Registers (FF)
+ve latch
+ve edge-triggered
13
• Positive latch
(transparent when CLK=1)
– When CLK=1, the Mux
selects the D input.
– When CLK=0, the Mux
selects the other input which
is a feedback from the output Positive latch
Q. It holds the previous
value.
• Negative latch
(transparent when CLK=0)
– Similar to the above
14
7
Master-Slave (+ve Edge-Triggered) Register
15
• Setup time, tsetup: time before clock edge where data must be stable.
• Hold time, thold: time after clock edge where data must remain stable.
• The hold time can be negative, i.e. the data can change even before
the clock edge.
• Clock to output propagation delay, tpcq (hold phase).
• Clock to output contamination delay, tccq (hold phase).
16
8
Sequencing Timing
17
Given:
• Pre-defined Flip-Flops
• Clock speed (Tc)
• Clock non-idealities: next lecture
Design variables are:
• CL delay: tpd and tcd
18
9
Design Variable: tpd vs. FF Setup Time
clk clk
Q1 D2
F1
F2
Combinational Logic
Tc
tsetup
clk
tpcq
Q1 tpd
D2
CL: tpd
CL is changing
19
CL
F2 at the same clk
edge (race through). clk
• At F2, the fast data D2
F2
20
10
References
21
11