Asynchronous FIFO in FPGA.pdf_第1页
Asynchronous FIFO in FPGA.pdf_第2页
Asynchronous FIFO in FPGA.pdf_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

techxclusives asynchronous fifo in virtex ii fpgas 1 of 310 28 2006 14 13 techxclusives asynchronous fifo in virtex ii fpgas back to asynchronous fifo in virtex ii fpgas author peter alfkepublication date 08 20 2001 a fifo is a popular memory structure that solves data rate differences in many systems most fifos have independent write and read clocks to move data across clock boundaries this requires some attention to asynchronous design details as described below given a dual ported ram like the block rams available in fpga devices the core fifo design is trivial one port is configured as write port addressed by a write address counter the other port is the read port addressed by the read address counter both counters must count by the same algorithm but they need not be binary counters linear feedback shift register lfsr counters used to be popular but gray counters are best for the general case of asynchronous fifos as described below the only difficult design detail is the proper and reliable handling of the two exceptional cases fifo full and fifo empty full means that the next write if allowed would overwrite the oldest not yet read entry empty means that the next read if allowed would read stale data a second time either of these conditions must raise its own flag telling the system to cope with the potential overflow or underflow designers can cheat on the full flag and raise it early thus sacrificing some fifo depth but there is no alternative to the proper timing of the empty flag since the system needs to read even the very last word stored in the fifo there are two problems with full and empty first both conditions are indicated by the identity of read and write addresses therefore something else has to distinguish between full and empty a simple solution divides the address space into four quadrants and decodes the two msbs of the two counters works in binary or gray but the equations are different together in two 4 input look up tables if the write counter is one quadrant behind the read counter this indicates a possibly going full situation and sets a direction latch if the write counter is one quadrant ahead of the read counter this indicates a possibly going empty situation and resets the direction latch the direction latch eliminates the ambiguity of the address identity decoder techxclusives asynchronous fifo in virtex ii fpgas 2 of 310 28 2006 14 13 the second and more difficult problem stems from the asynchronous nature of the write and read clocks comparing two counters that are clocked asynchronously can lead to unreliable decoding spikes when either or both counters change multiple bits simultaneously the preferred solution is to make both counters count in a gray sequence where only one bit changes from one count to the next any decoder or comparator will then switch only from one valid output to the next one with no danger of spurious decoding glitches virtex logic makes it very easy to design high speed synchronous gray counters taking advantage of the built in binary carry structure a binary counter is implemented by cascading a string of vertical slices using the carry chain the flip flops in the adjacent slice form the gray counter clocked by the same clock and clock enable as the binary counter but its d inputs driven by the xor of the two binary counter d signals one of the same rank and one of the next higher significance dgi dbi xor db i 1 dgmax dbmax where i designates the binary significance and dg and db denote the gray and binary counter s d input respectively the gray counters thus operate in parallel with the binary counters are not pipelined and do not suffer from any decoding glitches there is never a false equal output but there can be an arbitrarily short output glitch when counter a matches b but b increments very soon after the resulting spike either creates a full or empty signal or it does not either case is acceptable generating full and empty these two signals are generated by gating counter equality with the two flavors of direction but some important timing issues exist full is of interest only to the write logic where it must stop further writes full goes active as a result of the last write operation which makes the rising edge of full a synchronous signal although the read clock is asynchronous therefore we only need to synchronize the falling edge of full generated by a read operation to the next rising edge of the write clock a flip flop clocked by the free running write clock and using the decoded full signal as its asynchronous preset as well as its synchronous d input creates a fully synchronous full output the fully synchronous empty signal is generated in the symmetrically equivalent way the most efficient fifos use block rams for data storage virtex or spartan ii devices can implement a 4kx1 2kx2 1kx4 512x8 or 256x16 bit fifo in one block ram virtex ii devices can implement a 16kx1 8kx2 4kx4 2kx9 1kx18 or 512x36 bit fifo in one block ram the overhead for the binary gray counters is two flip flops per counter bit e g from 32 flip flops for a 256 deep fifo to 56 flip flops for a 16k deep fifo the overhead for generating full and empty is 8 to 12 luts for very small fifos up to 32 deep and 16 wide using the distributed ram in clbs xc4000 spartan and virtex devices is more efficient and faster four and five bit gray techxclusives asynchronous fifo in virtex ii fpgas 3 of 310 28 2006 14 13 counters can be implemented directly without the binary assist described above a 16 x 16 fifo uses 256 flip flops for data storage 8 flip flops as address counters plus 6 luts for full empty control as described above remember there are four luts and flip flops in each virtex or spartan ii clb while there are eight luts and flip flops in each virtex ii clb that s why we prefer to

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论