[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ethmac] =?gb2312?B?tPC4tDogW2V0aG1hY10gZ3JheSBjb2Rl?=



Hi,

Do you have something more about synchronization between different clock domains?

 

Best Regards,

 

XiaYun

-----邮件原件-----
发件人: owner-ethmac@opencores.org [mailto:owner-ethmac@opencores.org] 代表 Illan Glasner
发送时间: 2002年11月1日 4点37
收件人: 'ethmac@opencores.org'
主题: RE: [ethmac] gray code

 

 

   Hi,

 

      Gray format mean that there is only one bit change at a time this mean that you can do a comparision without the need to do complex synconization of moving the pointer from one domain to another.

 

you can do for example something like :

 

always @(posedge rclk)

   wadd_gray_s <= #1 wadd_gray;

 

always @(posedge rclk or negedge rstn)
if (~rstn)

   ordy <= #1 0;
else

   ordy <= #1 ~((wadd_gray_s==radd_gray)  ||  (re  && (wadd_gray_s==radd_gray_next)) );

 

where wadd_gray come from wclk domain.

 

as compare to much more complicated such as store and hold you will need to do in binary.

 

but even when using Gray it is usualy used only for the flags while there is another set of counter used as the index for the read/write and those are binary, therefore also you will see many time gray is used only for small fifo's as the "overhead" logic for "full syncroniztion" become smaller when you need to have large counter for binary as well as for gray.

 

Another "advantage" for gray as compare to the full syncornization is that syncronization methode always use pesemstic approch which mean let say you have fifo with 8 word it might show full even few clocks after the full level is no more full or it might show empty for few clocks before it show not empty. however in Gray the delay is not exsisting or can be 1 clock delay.

 

have a nice day

 

   Illan

-----Original Message-----
From: Madhu rao [mailto:madhu_ether@yahoo.com]
Sent: Tuesday, October 29, 2002 11:13 PM
To: ethmac@opencores.org
Subject: [ethmac] gray code

Hai,

    why people prefer to store data in fifo as gray format instead of binary format. Is it for speed improvent or any specific reasons.

 

Thanks in advance.

Regards

Madhu

 

 

        

 


Do you Yahoo!?
HotJobs - Search new jobs daily now