CDC
CDC
CDC
Presented by Abramov B.
Transfer
R E G I S T E R R E G I S T E R
Logic
Presented by Abramov B.
RTL (cont)
An RTL circuit is a digital circuit composed of:
Presented by Abramov B.
RTL (cont)
A logic path in RTL circuit is a set of transfer and logic elements connected to each other. A logic path starts at the registers Q output and ends at the registers D input.
Presented by Abramov B.
RTL (cont)
Clock Domain in a RTL circuit such that: Registers =>R The clock signal is the same clock signal as for all other Registers.
Transfers =>T is part of a Logic path that starts and ends at Registers.
Logics => L is agate in a Logic path that starts and ends at RRs.
Presented by Abramov B.
RTL (cont)
Clock Speed is limited by the flip-flop delay (clock to output), combinational delay, and setup time.
Presented by Abramov B.
Bridge path
Bridge path : A bridge path in an RTL circuit is a logic path that starts at registers Q outputs of one clock domain and ends at registers D inputs of the second clock domain. Bridge Path rule: Bridge path must be sampled with a register clocked by the target domains clock.
Presented by Abramov B.
Clock Skew
Clock Skew : is the difference measured in time between the clock edge (rising or falling edge) of two FFs. Data Delay : is a difference measured in time between the beginning and end of a logic path. Clock domain Rule :
Presented by Abramov B.
Chip X X X X X X X X
9
Meta-Stability
What are the cases in which meta-stability occurs? When the input signal is an asynchronous signal. When the clock skew/slew is too much (rise and fall time are more than the tolerable values). When interfacing two domains operating at two different frequencies or at the same frequency but with different phase. When the combinational delay is such that flip-flop data input changes in the critical window (setup + hold window) Digital components recover from meta-stable states quickly but the end value is indeterminate
Presented by Abramov B. 10
Meta-Stability
Presented by Abramov B.
11
Meta-Stability
No other connection to these points
Asynchronous Input
SET
Q Q
SET
Q Q
Edge detection can be placed at this point
Clock
CLR
CLR
Presented by Abramov B.
12
Meta-Stability
Presented by Abramov B.
13
Meta-Stability
MTBF Mean Time Between Failures
fclk = Clock frequency fdat =The average frequency of asynchronous data changes tMET = Time allowed for the FF to settle in a stable state C1 = probability of meta-stability catching setup/hold time window C2 =Technology dependent. Describes the speed with which the meta-stable condition is being resolved
Presented by Abramov B. 14
CDC failure
Difficulties causes when interfacing two or more asynchronous clock domains
Synchronization failure nUn-reliable data transfers NTransaction never happen NTransaction Happen too many times NTransaction delivered wrong data
n
Presented by Abramov B.
15
CDC Feedback
Although synchronizing a feedback signal is a very safe technique to acknowledge that the first control signal was recognized and sampled into the new clock domain, there is considerable delay associated with synchronizing control signals in both directions before releasing the control signal.
Presented by Abramov B.
16
Clk Sig_in Sig_in events changes for a long time period. Our aim is to detect moment of change (either rise-detect or fail-detect) and to create one-clock length signal that will advice about sig_in changes. Use this one-cycle edge detection output to control data capture and other necessary functions avoids multiple samples or counts per clock/data input pair
Presented by Abramov B.
17
0
Signal from other clock domain
SET
Q Q
SET
Q Q
SET
Q Q
CLR
CLR
CLR
Clock
Presented by Abramov B.
18
Presented by Abramov B.
19
Presented by Abramov B.
20
Fast 2 Slow
One potential solution to this problem is to assert control signals for a period of time that exceeds the cycle time of the sampling clock. The assumption is that the control signal will be sampled at least once and possibly twice by the receiver clock.
Presented by Abramov B.
21
Fast 2 Slow
D Comb Logic en srst D D
Fast 2 Slow
A second possible solution to this problem is pulse extracting (stretch)
Presented by Abramov B.
23
Fast 2 Slow
Lengthened pulse to guarantee that the control signal will be sampled
Presented by Abramov B.
24
Fast 2 Slow
Using acknowledge feedback flag
Clock domain A Clock domain B Parallel data bus Flag
SET
SET
en
CLR
CLR
en
Presented by Abramov B.
25
Fast 2 Slow
Better than previous solution, but still asynchronous
Presented by Abramov B.
26
Fast 2 Slow
The synchronous decision of a transfers of single pulses between two clock domains problem applicable as well as in FPGA and in ASIC is below resulted completely:
Presented by Abramov B.
27
Presented by Abramov B.
28
Presented by Abramov B.
29
Presented by Abramov B.
30
Presented by Abramov B.
31
Presented by Abramov B.
32
Presented by Abramov B.
33
Presented by Abramov B.
34
Presented by Abramov B.
35
One-Hot Checker
Q: How to check the one-hot code ? A: Use dual-rail code! The dual-rail code for 4 bit example:
r0 = y1 + y 2 + y 3 y 4
The result of checking XOR between outputs of these symmetric functions. The dual-rail checker should be simply cascaded for any width of checked word.
Presented by Abramov B.
36
One-Hot Checker
8 bit One-hot code checker architecture
Presented by Abramov B.
37
EC
2n
XOR REG
2n
REG REG
2n
XOR
DC
REG
REG
Presented by Abramov B.
38