高速异步FIFO的设计与仿真毕业设计

  • 格式:doc
  • 大小:1.56 MB
  • 文档页数:45

华中科技大学文华学院毕业设计(论文)题目:高速异步FIFO的设计与仿真学生姓名:孙光源学号: 080110011111 学部(系):信息学部电子科学与技术系专业年级:电子科学与技术2008级指导教师:雷鑑铭职称或学位:副教授2012 年5 月13日摘要 (4)ABSTRACT (5)第一章绪论 (6)1.1 FIFO的研究背景与意义 (6)1.2本文的设计任务 (7)1.3本文的主要工作和论文安排 (7)第二章主要问题分析以及解决方案 (8)2.1如何避免亚稳态产生 (9)2.1.1 同步器 (9)2.1.2 格雷码计数器 (9)2.2空满标志如何正确的产生 (11)2.3小结 (11)第三章EDA开发环境介绍 (12)3.1硬件描述语言 (12)3.2M ODELSIM +S YNPLIFY +DC开发环境 (13)3.2.1 Modelsim (13)3.2.2 逻辑综合和综合工具Synplify (14)3.2.3 Design complier简介 (15)3.3设计方法 (16)3.4本章小节 (17)第四章高速异步FIFO的设计 (18)4.1写指针控制模块 (18)4.1.1 重要部分代码: (18)4.1.2 结构图: (19)4.1.3 仿真结果 (19)4.2读指针控制模块 (19)4.2.1 其中重要部分代码: (19)4.2.2 结构图 (20)4.2.3 仿真结果 (20)4.3双端口SRAM模块 (21)4.3.1.结构图 (21)4.3.2 仿真图 (22)4.4空满信号生成电路 (22)4.4.1 重要部分代码 (23)4.4.2.结构图 (24)4.4.3.仿真图 (24)4.5结束语 (25)第五章系统的仿真和测试 (26)5.1FIFO的顶层模块仿真波形 (26)5.2FPGA综合分析 (27)5.3 DC综合结果分析 (28)结束语 (31)致谢 (32)参考文献 (33)附录 (34)摘要在现代的集成电路芯片中,随着设计规模的逐步扩大,一个系统中往往含有数个时钟。

多时钟域带来的一个问题就是,如何设计异步时钟之间的接口电路。

异步FIFO(First In First Out)是解决这个问题一种简便、快捷的解决方案。

使用异步FIFO可以在两个不同时钟系统之间快速而方便地传输实时数据。

新一代FIFO芯片容量越来越大,体积越来越小,价格越来越便宜。

作为一种新型大规模集成电路,FIFO芯片以其灵活、方便、高效的特性,逐渐在高速数据采集、高速数据处理、高速数据传输以及多机处理系统中得到越来越广泛的应用。

异步FIFO是一种先进先出的电路,使用在需要数据接口的地方,用来存储、缓冲在两个异步时钟之间的数据传输。

在异步电路中,由于时钟之间周期和相位完全独立,因而数据的丢失概率不为零。

如何设计一个高可靠性、高速的异步FIFO电路便成为一个难点。

本文介绍解决这一问题的一种方法。

整个系统的的主要难点是:一是如何同步异步信号,使触发器不产生亚稳态;二是如何正确地设计空、满等信号的控制电路。

设计方案围绕这两个难点展开,阐述了异步FIFO的主要组成电路(读控制电路,写控制电路,双端口SRAM电路和空满信号产生电路)。

文章介绍说明了异步FIFO电路的背景,设计思路,实现方法等。

对传统FIFO电路进行了一些优化,最终确立出了一种通用异步FIFO电路。

本论文所设计的FIFO采用Verilog VHDL 语言进行描述, 并在Modelsim环境下进行了仿真,结果表明了该设计的正确性和可靠性,然后通过synplify pro软件综合出门级网表,最后进行了DC综合,完成了设计的性能报告。

设计中主要运用了同步电路和格雷码转换避免亚稳态产生,并且采用精确的空满判断。

通过对设计进行简单的修改,即可用于各种不同的系统的设计,经过充分测试和优化,该异步FIFO运行稳定,可以很好的应用于异步信号之间的数据传输中。

关键词:异步时钟域,FIFO,格雷码,空满信号AbstractIn the modern IC chip, with the design scale enlarged, one system often contains a number of clock domains. Multi-clock domains brought one problem, which is how to design the interface circuit between the asynchronous clock domains. Asynchronous FIFO (First In First Out) is a simple, fast solution. Asynchronous FIFO can be used to transmission the real-time data between two different clock domains quickly and easily. A new generation of the FIFO chips becomes larger and larger, the size is getting smaller and smaller, more and cheaper prices. As a new type of large-scale integrated circuits, FIFO chip is flexible, convenient and efficient, with these advantages, it gradually widely used in the high-speed data acquisition, high-speed data processing, high-speed data transmission, and the multi-processing system.Asynchronous FIFO is a FIFO circuit. It uses for the place where needs data interface. Used for writing, buffering the data transfers between two asynchronous clock domains. In asynchronous circuits, as it is independent completely between cycle and phase, the probability of loss the data is not zero. How to design a high-reliability, high-speed asynchronous FIFO circuit has become a nodus. In this paper, there is a method to solve this problem.The main difficulties of the whole system is: first, how to synchronize asynchronous signals, so that no metastable in the flip-flop; the second is how to design the signal of the control circuit like empty, full.This article described the background of asynchronous FIFO circuit, design ideas, and implementation. The whole system’s major difficulty is: How to obtain accurate and stablefull/empty signal ,use reasonable code. All functions were described by Verilog, and it was simulated under the Moderlsim , then we synthesized the netlist by the software called Synplify pro, and finally we had DC synthesis , finished the function report of the design.The results show the accuracy and reliability of design .In the design, it use gray code to avoid Metastable ,and it also use careful empty/full judgment. The fifo has simple structure , brief flow , clear procedure arrangement , easy synthesis , high dependability and so many advantages. It must be good used in asynchronous signal transmission.Key words: asynchronous Clock domain,FIFO, gray code, full/empty signal第一章绪论1.1 FIFO的研究背景与意义FIFO是英文First In First Out 的缩写,是一种先进先出的数据缓存器,他与普通存储器的区别是没有外部读写地址线,这样使用起来非常简单,但缺点就是只能顺序写入数据,顺序的读出数据,其数据地址由内部读写指针自动加1完成,不能像普通存储器那样可以由地址线决定读取或写入某个指定的地址。

FIFO一般用于不同时钟域之间的数据传输,比如FIFO的一端时AD数据采集,另一端时计算机的PCI总线,假设其AD采集的速率为16位 100K SPS,那么每秒的数据量为100K ×16bit=1.6Mbps,而PCI总线的速度为33MHz,总线宽度32bit,其最大传输速率为1056Mbps,在两个不同的时钟域间就可以采用FIFO来作为数据缓冲。

另外对于不同宽度的数据接口也可以用FIFO,例如单片机位8位数据输出,而DSP可能是16位数据输入,在单片机与DSP 连接时就可以使用FIFO来达到数据匹配的目的。