Clock Domain Crossing Issues &
Clock Domain Crossing Issues &
Clock Domain Crossing Issues &
Domain1 Domain2
Website: https://www.sites.google.com/view/learnvlsi
LinkedIn: https://www.linkedin.com/company/learnvlsi
Disclaimer
⚫ The intention of this presentation is information sharing. So
consider this material as information purpose only.
⚫ We explicitly disclaim any liability for mistakes and omissions in the
material presented.
⚫ We have done our best to ensure the correctness of the material and
have no obligation or duty to any person or organization for any loss or
damages stemming from the contents.
⚫ We make no claim, promises, or guarantees regarding the correctness,
completeness, patent infringement, copyright violation or sufficiency of
the same.
⚫ Some of materials were copied from the sources freely available on
the internet. When possible, these sources have been cited;
however, some references may have been cited incorrectly or
overlooked. If you feel that a picture, graph, or code example has
been copied from you and either needs to be cited or removed,
please feel free to email: [email protected] and we will address
this as soon as possible.
⚫ Take prior approval for Commercial usage of this information.
⚫ Views expressed here are personal views and not endorsed by
present or past employer.
Outline
⚫ What is Clock Domain Crossing (CDC)
The Problem
Leads to Chip Failure, No software fix!!
⚫ CDC Issues & Solutions
Control Crossing
Synchronizer
Reconvergence
Divergence
Slow to Fast Crossing
Passing a Pulse
Data Path Crossings
Design Flow impact on CDC Paths
Synthesis
Low Power
Physical Implementation
-ve
+ve
Phase
⚫ Conversely, domains
with clocks of variable
phase and frequency
are different clock
domains.
Also known as
Asynchronous.
Domain 27Mhz
Synchronous clocks
but considered Async.
To reduce Clocktree
Balancing
complexities.
Slides will be shared. No video recording or certificate.
Clock
⚫ Use one edge of the clock in the whole design.
⚫ Avoid combination logic on the clock path.
⚫ Avoid convergence and divergence in the clock path clock
must be last element if there are convergence.
⚫ Only use specially designed module in the clock path. e.g. Mux
in the clock path must be glitch free mux.
⚫ Keep clock generation or reset generation in one module in
whole design.
SETUP/
SETUP/ HOLD
HOLD
C1 C2
⚫ Within each domain, setup & hold time checks ensure proper
functioning of the design.
⚫ No timing check exists on CDC Paths.
⚫ Then, the output of flip-flop may take much longer time to reach a valid logic
level. This is called metastability.
Very
close
Duration of
Techno dependent metastable output
(1/Tau)
data changing
Synchronizing frequency
clock frequency
Clk
Synchronized signal
Clk
AW
AS
Assignment:
How to calculate number of Synchronizer flop for given frequency.
NEED TO FOLLOW MORE RULES
synchronizer
AW
C1
C2
DA1
DA2
CLK C CLK B
CLK B
Actual
Chip Killer
!!
IP1
C1
C2
IP2
C2
To avoid CDC issues, Hold the data till a time-out (using Pulse extenders).
Q1 D1
Clk1
Clk1
Counter ==N clk2
C1
C1
C2
Assignment:
How to successfully pass a signal from faster clock frequency to
slower clock frequency.
Data Path: Multi bit transfer
⚫ Enable Based Synchronizer
EN
C1
C1
C2
C1
C1
C2
Data Path: Asynchronous FIFO
Assignment:
Design a non power of 2 depth FIFO, having even depth with
use of gray encoding pointer. E.g. FIFO with depth 12.
Data Path: Recommendations
Have glitch free mux in the data path from special cell library.
C1
C1
C2
C1
C1
C2
RTL NETLIST
⚫ Clock gating
NETLIST
C1 C1
C2 C2
RTL NETLIST
Synthesis Impact on CDC Path
⚫ Register Replication
C1 C2
C2
C1
RTL
C2
⚫ Logic Restructuring
NETLIST
C1
C1
C2
C2
C1
RTL NETLIST
Low Power Design Example
PD1: 1.0V, Always On PD2: 0.8 V, Always On
Level Shifter
RAM
Core
Processor
PMB
Isolation Isolation
Isolation_enable
Synchronizer Synchronizer
Isolation Cell
C1 C1
C2 C2
iso_enable
RTL NETLIST
C1
Solution
⚫ Have better control during synthesis on CDC Path.
⚫ One way is to have a CDC Design Library
Instantiate the RTL in the Design
Having equivalent functionality in netlist cell.
⚫ Based upon CDC paths understanding, generate constraints
for better design optimization/Physical implementation.
Physical Implementation Impact
⚫ Huge delay in between Sync flops Delay between Sync Flops
C1 C1
C2 C2
C1
C2
Logical View
Reference: https://www.slideshare.net/rameraja/4-u-5-slides-with-notes-8425918
Skewed data path
⚫ Data path is severely skewed due to No
constraints & also due to Physical constraints
Huge delay
imbalance
100 ns
Capture Period : 5 ns
Fabrication
Conclusion
⚫ Clock Domain Crossing require special handling both at
logical and implementation time.
⚫ The cells in the CDC path must be chosen from special cell
library.
⚫ Use constraints for CDC friendly design optimization.
Link for other presentations
⚫ HDL Design using Verilog:
https://www.linkedin.com/feed/update/urn:li:activity:690110117
3491798016
⚫ HDL Design Guidelines:
https://www.linkedin.com/feed/update/urn:li:activity:6903289386
536968192
⚫ VLSI Design Flows and Open source tools:
https://www.linkedin.com/feed/update/urn:li:activity:6886886690
405924864
⚫ https://www.sites.google.com/view/learnvlsi/webinar
Thank you
Telegram Channel: https://t.me/elearnvlsi
Next webinars:
For more updates, follow Learn VLSI LinkedIn Page :
https://www.linkedin.com/company/learnvlsi