decoding gray binary
Good Question. Well, to explain it on this board is bit of a challenge, but I will give it a shot:
ok, do you know something called metastability?
If D input of a FF changes very close to the clock edge of the FF, there are chances that the FF can go into a metastable state. i.e its o/p will be undefined for a short period of time, and this undefined state will propogate furthur down your circuit, and may cause it to fail completely.
Now in our example Block A runs at 100MHz and block B runs at 133MHz. Now if a single bit of data comes from Block A which is an o/p of a FF which uses A clock @ 100MHz, and it goes into a block B to a D input of a FF, which uses B clock @ 133MHz, very frequently, the change in D input of the FF in block B@133MHz can come very close to the Clock edge of this FF in block B, and it may cause it to become metastable.
Now to avoid it, ppl use metastable hardened FFs on the bounday of the receving blocks, in our case in block B.
And ppl use 2 such FFs connected in series. So the signal comes from Block A, goes into D input of a MSH(MetaStableHardned) FF, which is using clk B(133 MHz), then it comes out of its Q o/p, then it agains enters the D input of another MSH FF, and the Q of this second FF using clock B @ 133MHz is then a reliable signal, which can be used further in block B running at 133MHz.
So all that trouble for a 1 bit signal to cross clock domains.
Now the question is what if we have a data bus?(no dont think that connecting 2 MSH FFs in series as above to each of the bit of the data bus would work).
Think wot might be the problem if you do that.
Once you have gone through it, I wll further write to you to explain why we need fifos.
But remember you will have to get me an answer to it or going furhter would not help you. So take a paper/pencil draw waveforms, consult google, and try to realize wot is the prob here. Try to draw wavefomrs of a 4 or 8 bit bus coming from A going to B, under worst case scenearios.
Whenever the time distance between the change in D and Q at an receving FF in B block @ 133Mhz is less than its Tsetup, you wont know what is the o/p.