cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yynotebook
Visitor
Visitor
2,075 Views
Registered: ‎11-12-2017

How to decide when to use 2FF or 3FF synchronizers?

Jump to solution

Hi,

I am confusing about this question. How to decide if I need a 2FF or 3FF synchronizer?

I know  we have to calculate MTBF. But how to tell after I got the MTBF result?

Somebody told me I could just decide based on the design frequency. Could anybody explain that?Thanks.

 

 

0 Kudos
1 Solution

Accepted Solutions
avrumw
Expert
Expert
2,539 Views
Registered: ‎01-23-2009

So I will answer the simplest part of your question first...

But how to tell after I got the MTBF result?

The calculation of MTBF is based on a whole bunch of factors, including how many flip-flops you use. In UltraScale and UltraScale+ devices, you can use the report_synchronizer_mtbf command to report the MTBF of each synchronizer in your system (assuming you have constructed them correctly so that the tool can successfully identify them - you can check with the report_cdc command).

The number you get from this command is measured in years. It says, on average, how long will the system run without a failure due to the synchronizer. Then you simply ask yourself "is that good enough for my application". For example, if you get the number 10 years, you might say that is good enough if the device in question is a printer or a cell phone or some other consumer equipment - having to reboot your system after it crashes once every 10 years is not that big a deal. If your equipment is a piece of life saving medical equipment or in a satellite in orbit, once every 10 years is probably nowhere near good enough, so use more flip-flops... Its pretty much that simple.

Now some of the factors that determine the MTBF of a synchronizer are:

  • how many FFs are used
  • the frequency of the FFs
  • the frequency of events (changes) going through the synchronizer
  • a number of physical things (gain of transistors, critical window size, etc...)

It is actually very hard to calculate MTBF - particularly since the physical factors are not easily available. If you are using UltraScale or UltraScale+ then use the results from report_synchronizer_mtbf. If not then (unfortunately) you pretty much have to guess. In the olden days, at lower frequencies 2 FFs were enough. As frequencies rise, this is increasingly insufficient - at 200MHz or for sure 300MHz, you should probably use 3, and at higher frequencies than that even 4. If latency is not an issue, then there is no harm in using more FFs in the synchronizers (flip-flops in the FPGA are plentiful) - so if you are unsure, just use more!

Avrum

View solution in original post

Tags (1)
2 Replies
avrumw
Expert
Expert
2,540 Views
Registered: ‎01-23-2009

So I will answer the simplest part of your question first...

But how to tell after I got the MTBF result?

The calculation of MTBF is based on a whole bunch of factors, including how many flip-flops you use. In UltraScale and UltraScale+ devices, you can use the report_synchronizer_mtbf command to report the MTBF of each synchronizer in your system (assuming you have constructed them correctly so that the tool can successfully identify them - you can check with the report_cdc command).

The number you get from this command is measured in years. It says, on average, how long will the system run without a failure due to the synchronizer. Then you simply ask yourself "is that good enough for my application". For example, if you get the number 10 years, you might say that is good enough if the device in question is a printer or a cell phone or some other consumer equipment - having to reboot your system after it crashes once every 10 years is not that big a deal. If your equipment is a piece of life saving medical equipment or in a satellite in orbit, once every 10 years is probably nowhere near good enough, so use more flip-flops... Its pretty much that simple.

Now some of the factors that determine the MTBF of a synchronizer are:

  • how many FFs are used
  • the frequency of the FFs
  • the frequency of events (changes) going through the synchronizer
  • a number of physical things (gain of transistors, critical window size, etc...)

It is actually very hard to calculate MTBF - particularly since the physical factors are not easily available. If you are using UltraScale or UltraScale+ then use the results from report_synchronizer_mtbf. If not then (unfortunately) you pretty much have to guess. In the olden days, at lower frequencies 2 FFs were enough. As frequencies rise, this is increasingly insufficient - at 200MHz or for sure 300MHz, you should probably use 3, and at higher frequencies than that even 4. If latency is not an issue, then there is no harm in using more FFs in the synchronizers (flip-flops in the FPGA are plentiful) - so if you are unsure, just use more!

Avrum

View solution in original post

Tags (1)
yynotebook
Visitor
Visitor
2,057 Views
Registered: ‎11-12-2017

Hi Avrum,

Thanks for your explaination. That's really very helpful.

0 Kudos