Professional Documents
Culture Documents
Erik Seligman
CS 510, Lecture 17, March 2009
Agenda
Introduction to Clock Domain Crossing
(CDC)
Basic Synchronizers
Datapaths and Reconvergence
Handshake Synchronization
Checking CDCs With Conformal
Agenda
Introduction to Clock Domain Crossing
(CDC)
Basic Synchronizers
Datapaths and Reconvergence
Handshake Synchronization
Checking CDCs With Conformal
What Is A Clock Domain
Crossing (CDC)?
Different clocks within a single design
Many possible reasons, here are a few:
• Complying with multiple protocols
• SoC Integration: IP from many sources
• Saving area/power, limiting fast clock use
Dangers when signals cross domains
• Incorrect functionality if not synced
• Not properly covered by validation
Review: Setup & Hold Time
Each flop has a setup and hold time
• Setup time: Time before clk edge
• Hold time: Time after clk edge
Data expected ready by setup time, and
stable during hold time
Problems At Asynchronous
Clock Domain Crossings
When does new value arrive?
• Source clk not coordinated with dest clk
Chance of arriving in setup/hold window
• What does this mean?
• Possibility of ‘metastable’ (halfway) state
• Value may settle either way
• Multiple fanouts may detect different values
Why Discuss in FV Class?
CDC is low hanging fruit for FV vendor
• Needs deeper analysis than typical linting
• But light checks compared to hardcore FV
CDC often done with FV tools
• Mentor 0in, Cadence Conformal, RealIntent
– In other direction, Lint vendors expanding to
CDC: Synopsys LEDA, Atrenta Spyglass
Some CDC checks may add assertions
• For checking in simulation or FV
CDC Checks in Simulation
Simulation: inject random metastability
Useful, but hard to get right
• Sometimes delay a value change
• Allow 1-cycle value to be missed
• Depends on # of random tests
Technique beyond scope of this class
• Class is on formal methods!
Agenda
Introduction to Clock Domain Crossing
(CDC)
Basic Synchronizers
Datapaths and Reconvergence
Handshake Synchronization
Checking CDCs With Conformal
How To Safely Cross
Domains?
Require synchronizer: structure to
reduce risk of metastability
Simplest synchronizer: two flops
• Metastability very unlikely: second flop will
choose a value if first is metastable
• One-cycle uncertainty in transition
– Account for in the logic!
Basic CDC Checks
Structural: Identify asynchronous CDCs
• Note: synchronous signals are OK, little metastability
risk if properly timed
• But same-frequency != synchronous
• If no synchronizer, report error
Functional: Assert signal held long enough
• Due to uncertainty of capture time
• Hold for 2+ receiver cycles: create assert
• May need longer depending on relative freq
– More detailed discussion in TOV lecture
Another Check: Combo Logic