The report can be found in Timing analyzer under 'Report Metastability' near the bottom of the 'tasks' box/work panel.
Some of these are indeed false synchronizers and they are disabled with,
set_instance_assignment -name SYNCHRONIZER_IDENTIFICATION OFF -to register_name
The 'register_name' is listed under the 'Synchronization Node' in the 'Report Metastability' output.
My best guess is,
I find the rise/fall time of an input.
I create virtual clock that indicates the frequency of the input toggle.
This confounds slew with MTBF and metastability. The metastability is the time that the register needs to settle to a value. The value maybe 'wrong'. However, it is not changing while the clock is not active. When a register/flip-flop is meta-stable, outputs referencing it may have different values resulting is unintended results due to logic optimizations.
Slew should be handled like a debounce circuit (slightly different than a synchronizer). The slew rate through a forbidden range of the I/O gives a length of the debounce to prevent false transitions.
For example, 3.3-V LVTTL has the following voltage ranges,
- Vil is -0.3 to 0.8V
- Vih is 1.7 to 3.6V
The time to transition from these voltages can be calculated in clocks and a packed register created to debounce this area.
localparam DEBOUNCE_SIZE = 6;
reg [DEBOUNCE_SIZE-1:0] signal_debounce = DEBOUNCE_SIZE{1'b0}};
always @(posedge clock, negedge reset_n)
if(!reset_n) begin
signal_debounce <= {DEBOUNCE_SIZE{1'b0}};
end
else begin
signal_debounce <= {signal, signal_debounce[DEBOUNCE_SIZE-1:1]};
// - `&signal_debounce` - all high
// - `!(|signal_debounce)` - all low
// - |signal_debounce - at least one is high
end
Signal is collected in the verilog packed array for several clocks. The reduction operator can be used to test that all values are high or low. This will filter values from the transitioning region used by a quadrature encoder or other related asynchronous inputs to prevent false triggers due to slew.
The above code is identical to a synchronizer chain, but all bits of the packed register are used, as opposed to just the 'low bit'. Ie, if t0 is now, then signal_debounce[0] refers to t-6. This delay is a waste in normal logic, but is needed for a synchronizer. If all taps (different signal times) are used, then the logic will never be optimized away. So, the tool doesn't care about that case, but a developer should.
Information can be found in Chapter 3 or the 'Quartus Design Recommendations'. Read the PDF and not google results from the web pages. The PDF has an ordering that is not apparent in the web pages.
One mechanism is to specify a SYNCHRONIZER_TOOGLE_RATE to a register/flop-flop.
If I have the following,
set_instance_assignment -name SYNCHRONIZER_IDENTIFICATION FORCED -to register_name
set_instance_assignment -name SYNCHRONIZER_TOGGLE_RATE 32000 -to register_name
The report gives 1 billion years MTBF for a Cyclone V clocked at 100MHz.
The report is the same event Changing
- changing
SYNCHRONIZER_TOGGLE_RATE
- using
FAST_INPUT_REGISTER ON.
- using
INPUT_TRANSITION_TIME.
- using virtual clocks and setting input times.
I think that the metastability is only for clock domain crossing (or synchronous I/O) or the lithography is so small that the Cyclone V has next to no change to go meta-stable when clocked at 100MHz.
The paper Understanding Metastability in FPGAs seems to suggest that some flip-flops have better metastability constants than others and this is controlled by process, etc. It would seem reasonable that the I/O cell flip-flops would have the best properties. However, I don't have documentation on this and can not get the timing tools to indicate any difference. It maybe true with prior Altera/Intel logic elements, but is not true with more modern designs.
Also, the Intel staff said that having a reset value to the register would negate synchronizers, but this was not my experience. Again, this might depend on RTL mapping.