Hello again! I am trying to follow yours hints.
First of all why I think I saw metastability. I connect to IIC clock line the 0.01uf capacitor and receive this oscillogram. It is clearaly seen (on the pic 1), that when the voltage reach the Vcritical value (1.275V) a number of false clock edges occur. It looks like the input trigger have no “band gap“ between logic 0 and logic 1 voltages. I think that without this capacitor the same processes occurs. But the quantity of “false edges” strongly decreases especially with decreasing the pull-up resistors value.
What about the second register in synchronizer? I can’t understand it’s function in the scheme. Nothing changes except increased delay time between input clock edge and synchronized signal edge when I add it in design. (pic 2)
I would like to use the schmidt trigger on inputs. Unfortunately they are not included to this FPGA. Can you explain the other ways to suppress the debounce in the lines?
What about the clock signals? I think that after synchronizing it is permissible to use IIC_clock signal to start shift process in bit counter. Ok. May be I was wrong. I am trying to make shifting from CClk signal. My next realization is also wrong. It still works with the same mistake shown on the pic 3. But the last realization work’s correctly! It is shown on pic 4.
I am still confused by this. I can’t understand what happens in the previous designs that leads to “stealth reset” signal for my counter. I am just learn by rote that all registers in the one clock region must have the same clock signal without any combinational logics on its way. If you can explain it to me I would be pleasant to know it.
thank’s for fvm and cris72 for their help. In addition I lay out more informative graphics of my digital and analog signals (pic 4)
The explanations for the pictures:
1. In IIC_Slave net is added additional capacitor, that makes fronts more smooth. Yellow line – IIC_data signal, Green line – IIC_Clock signal
1.1 – Here is shown one of the posedges with a number of the false count acts (in the red squared area).
1.2 – The same region with the counter states
2. RTL view and oscillogram. It is shown that the second register adding in the synchronizer causes no effect.
2.1 Wrong attempt to clock bit counter by the CClk.
3. Correctly works scheme. All registers are clocked by CClk. IIC_Click is used as data signal.
4. Oscillogram of the input IIC signals
4.1 The part of the same signal in detail. Here is seen the moment of start signal receiving and bit counting