FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5988 Discussions

A question about rd_usedw and wr_usedw for a DCFIFO

Altera_Forum
Honored Contributor II
801 Views

Hello all, 

 

Recently I used a dcfifo mega core to buffer datas,  

I found there're 2 signals for usedwidth : rd_usedw and wr_usedw 

 

I don't understand the difference between these two signals. 

 

Why we need two signals to both read and write side? 

 

Do the read and write side share one fifo or do they cut the fifo into two parts, 

 

For example, we have a dcfifo with a depth of 1024 words,  

 

does it mean 512 words for read and 512 words for write? 

 

thx to advance
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
72 Views

Are you looking at the usedwd value in the read clock domain or write clock domain? You want to choose the right one so that you can safely capture it. (If you took wr_usedw and analyzed it in the read domain, you will read the wrong data because the clocks aren't synchronous).

Altera_Forum
Honored Contributor II
72 Views

 

--- Quote Start ---  

 

I found there're 2 signals for usedwidth : rd_usedw and wr_usedw 

 

I don't understand the difference between these two signals. 

 

--- Quote End ---  

 

 

A dual-clock FIFO has two clock domains, the write clock domain (which uses wr_usedw) and the read clock domain (which uses rd_usedw). 

 

This is much clearer if you use Modelsim to simulate your components. 

 

Please see this thread for a zip file containing simulations of both scfifo and dcfifo components: 

 

http://www.alteraforum.com/forum/showthread.php?t=38988 

 

Cheers, 

Dave
Altera_Forum
Honored Contributor II
71 Views

i understand better now , thx very much!

Reply