Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

The gray code in transfer of data

Status
Not open for further replies.

sun_ray

Advanced Member level 3
Joined
Oct 3, 2011
Messages
772
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
6,828
What are all the reasons that grey code is used for generating full and empty for async FIFO to transfer data ?
 

morris_mano

Full Member level 2
Joined
Apr 9, 2012
Messages
136
Helped
39
Reputation
78
Reaction score
37
Trophy points
1,308
Location
US
Activity points
2,281
Transfer of multi bit across asynchronous clock domain may be susceptible to data incoherency, if those bits changes close to the clock edge of the capturing clock domain. The classical two stage flip flop synchronizer will not solve the problem of data incoherency.

For example, if 'b0000 - > 'b0110 is transferred from clock domain A to clock domain B ( they are asynchronous), and the bit transition happen to occur close to the clock edge, the output of capturing flops may go metastable. The metastability will cause the bit to be in any one of 'b0000, 'b0100, 'b0010 and 'b0110 states. Here, the data send by clock domain A is incoherent with data capture by clock domain B, even if they are synchronized through two state flip flop synchronizer. Now, what happens if you change only one bit only('b0000 -> 'b0010) while sending mult bit across clock domain, the capture value will be either old value 'b0000 or new value 'b0010. There are no other possible incorrect values like in multi_bit changes. Here, using single bit change( which is what gray coding is) solves the issue of data incoherency in asynchronous fifo.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top