Posts

Showing posts from May, 2022

Gray Code for Asynchronous FIFO pointer. Why?

First let us discuss the need for Asynchronous FIFO. We use Gray code for the same reason we need Async FIFO. To transfer a stream of multi bit signal(bus) from one clock domain to a different clock domain, designers cannot use typical Data Synchronizers. Different bus signals from different data synchronizers converge at different period of time, and this typical problem is called the Re-convergence issue in ASIC Design world. To solve the problem, Asynchronous FIFO was designed. Again in Asynchronous FIFO, pointers should be synchronized from native clock domain to the other clock domain. Pointers are multi bit which could lead to re convergence issue all over again. Luckily, we know that pointers are not random unlike data stream. Both Read and Write pointers are incremented by one (+1) w.r.t clock edge on read & write from FIFO. Given that, we should look for a code which changes minimally on increment by one (ideally only one bit change), Gray code was the solution. Employing