基于Kintex?7 FPGA 的DDR3 SDRAM接口应用研究
2018-01-02吴长瑞徐建清蒋景红
吴长瑞+徐建清+蒋景红
摘 要: 针对FPGA中使用DDR3进行大容量数据的缓存应用背景,采用模块化设计方法,提出基于Xilinx Kintex?7 FPGA的DDR3 SDRAM FIFO接口设计方案。在分析DDR3用户接口特点和用户接口时序的基础上,对不同读/写模式进行效率测试。借鉴标准FIFO的设计思想,结合DDR3 SDRAM控制器的特点,设计遍历状态机对该FIFO接口进行读/写测试。最后,原型机平台验证了该接口不仅具有标准FIFO简单易用的功能,而且具有存储空间大等优势。
关键词: DDR3 SDRAM; FIFO; FPGA; 遍历状态机
中图分类号: TN43?34; TP332.3 文献标识码: A 文章编号: 1004?373X(2017)24?0021?04
Abstract: Aiming at the application background of using DDR3 for large?capacity data caching in FPGA, a design scheme of DDR3 SDRAM FIFO interface based on Xilinx Kintex?7 FPGA is presented according to the modularized design method. Based on the analysis of DDR3 user interface characteristics and user interface time sequence, the efficiency of different read?write modes was tested. In combination with the design thought of standard FIFO and characteristics of DDR3 SDRAM controller, the traversal state machine is designed to perform the read?write test of the FIFO interface. The interface was verified with the prototype platform. The result demonstrates that the interface has the simple and easy?to?use functions of standard FIFO, and large storage space.
Keywords: DDR3 SDRAM; first?in first?out; field programmable gate array; traversal state machine
0 引 言
在高速实时数据信号处理领域,缓存是不可缺少的部分,利用FPGA外接DDR3 SDRAM(Synchronous Dynamic Random Access Memory) 进行大容量数据缓存是近期研究的热点。异步FIFO以其接口时序简单、易于操作、读写速度高等优点广泛应用于数据实时采集和跨时钟域数据传输的系统中。由于工艺的限制,常见的FIFO芯片或者FPGA内部的FIFO IP核容量非常有限,很难满足数据吞吐量较大的系统。DDR3 SDRAM具有集成度高、读写速度快、价格便宜等优点成为目前数据缓存的主流;但其操作复杂,增加了系统的开发周期和开发成本[1?2]。
本文提出基于FPGA的DDR3 SDRAM FIFO接口方案,该方案既具有DDR3 SDRAM容量大、成本低等优点又具有异步FIFO接口简单、易于操作的优点。从用户接口信号入手分析接口速度、接口效率和接口时序,在此基础上设计基于DDR3的FIFO接口,并编写测试程序对该设计进行遍历测试。目前,该方案已经在某项目的高速数据缓存中得到了应用。
1 DDR3 SDRAM
DDR3 SDRAM即同步动态随机存取存储器,同步是指Memory工作需要同步时钟,内部命令的发送与数据的传输都以它為基准;……
