Hjldioyitsi
Member level 1
- Joined
- Mar 7, 2012
- Messages
- 32
- Helped
- 0
- Reputation
- 0
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Brazil
- Activity points
- 1,473
The most used technique to perform such synchronization is using a 2-FF synchronizer, right?
I thought 2-FF was still the most common. 3-FF to 5-FF are used for very high frequencies?Just a little correction, one should use a minimum of 2-FF synchronizer. 3 or 5 FF stages are very common in use!
First, X_1 may become metastable if the setup/hold timing is violated. It can also settle nicely. This is about statistics and probability. You can't predict the settled X_1 value after metastability, it is a random function. If X_1 hasn't settled before the setup time of the next stage, you can't predict the X_2 output value, but the probability for metastability is reduced in each synchronizer stage. An unknown value is not the same as metastability. An unknown (stable) value is not a problem, metastability is a problem.The question is: when X violates the first FF setup or hold timings, X_1 will become metastable for a while (lets say it is just for a little while). What does determine X_1 logic state when it goes back to be stable? Is it the value of X? Is it arbitrary?
"You can't predict the settled X_1 value after metastability, it is a random function." - okay, this is different from the previous replies I got so far. But that was my suspicious. Thanks!First, X_1 may become metastable if the setup/hold timing is violated. It can also settle nicely. This is about statistics and probability. You can't predict the settled X_1 value after metastability, it is a random function. If X_1 hasn't settled before the setup time of the next stage, you can't predict the X_2 output value, but the probability for metastability is reduced in each synchronizer stage. An unknown value is not the same as metastability. An unknown (stable) value is not a problem, metastability is a problem.
But there is randomness in the output of the first flop, do you agree? IF X_1 goes metastable, it will settle to either 1 or 0, unpredictable, before the next clock edge.I would answer the question slightly different. Consider a single transition, 0->1 or 1->0 in the signal send from first clock domain. It will cause a single transition after the synchronizer, in so far there's no randomness. The only point is that you can't exactly predict in which clock cycle the transition will be received. Therefore you can't use the synchronizer for multibit signals (except for gray coded signals that are guaranteed to have only one transition at a time), because you may receive inconsistent codes. E.g. "01" transiting to "10" may be received as "00" or "11" for one clock cycle.
This is not a problem!But there is randomness in the output of the first flop, do you agree? IF X_1 goes metastable, it will settle to either 1 or 0, unpredictable, before the next clock edge.
But X can be 010101010...This is not a problem!
X = 000111
If the transition violates setup/hold X_1 will be 000X11
If X_1 settles before the next clock edge, X_2 will be 000111 or 000011 and both are OK!
The goal is to have a clean transition, and it doesn't matter if it happens in a specific clock cycle or in the next.
The synchronizer transfers transitions between clock domains. The separation between transitions must be greater than the destination clock cycle. If you want to transfer single clock cycle pulses between domains, you need a different circuit. I normally do that by converting each pulse to a single transition (just a simple toggle FF), transfer to the other clock domain with a normal synchronizer, and then converting back to a pulse in the destination clock domain (an edge detector). However, the separation between pulses must be long enough.
As far as I see it, the data value should be passed correctly so "both 000111 or 000011 being correct" is not right. Imagine both clocks are at same speed but unrelated. We could get errors regularly if we believe the literature that models metastability as a ball rolling on a hill that could settle either way. I know in practice the synchroniser works so my guess is that the "hill model" needs be revised.This is not a problem!
X = 000111
If the transition violates setup/hold X_1 will be 000X11
If X_1 settles before the next clock edge, X_2 will be 000111 or 000011 and both are OK!
The goal is to have a clean transition, and it doesn't matter if it happens in a specific clock cycle or in the next.
The synchronizer doesn't transfer "bits". The goal is to transfer a clean transition between clock domains. If the setup/hold times of the first stage is violated, you can't predict in which of the two possible clock edges in the destination domain the transition will happen.As far as I see it, the data value should be passed correctly so "both 000111 or 000011 being correct" is not right. Imagine both clocks are at same speed but unrelated. We could get errors regularly if we believe the literature that models metastability as a ball rolling on a hill that could settle either way. I know in practice the synchroniser works so my guess is that the "hill model" needs be revised.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?