资源描述:
《基于fpga嵌入系统设计—接口设计 毕业设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、摘要随着专用集成电路(ASIC)设计技术的进步以及超大规模集成电路(VLSI)工艺技术的飞速发展,以及其价格的日益降低,采用嵌入式FPGA(Field-ProgrammableGateArray)编程的硬件电路来实现诸如SPI(SerialPeripheralInterface)接口也日益切实可行,相对软件实现具有更好的优点。SPI接口是一种常用的标准接口,由于其使用简单方便且节省系统资源,很多芯片都支持该接口,SPI接口主要应用在EEPROM,FLASH,实时时钟,AD转换器,还有数字信号处理器和数字信号解码器之间等等。由于S
2、PI接口是一种事实标准,并没有标准协议,大部分厂家都是参照Motorola的SPI接口定义来设计的,但正因为没有确切的版本协议,不同厂家产品的SPI接口在技术上存在一定的差别,容易引起歧义,有的甚至无法互联(需要用软件进行必要的修改)。本文基于一种使用较为普遍的协议来进行设计,用C语言进行编写设计,并在QuartusII和NiosII软件上进行设计仿真,本文基于GX-SOC/SOPC-Dev-LabPlatform开发试验平台,采用Altera公司的Cyclone系列的FPGA为核心设计完成。关键词:FPGASPI接口Quart
3、usIIAbstractWiththeadvancesindesigntechnologyofASICandVLSI’srapiddevelopment,anditspriceislower,thehardwarecircuitbasedonFPGAprogramminginterfacetoachievesuchasSPIisfeasible,anditrealizesbetterthansoftware.SPIinterfaceisacommonstandardinterface,duetoitssimpleandconve
4、nientuseandsavesystemresource,alotofchipssupportthisinterface.SPIinterfaceisextensivelyappliedinEEPROM,FLASH,real-timeclock,ADconverter,anddigitalsignalprocessoranddigitalsignalsdecoder,etc.DuetotheinterfaceisafactSPIstandard,andithasnostandardprotocol,mostmanufactur
5、ersdesigntheSPIrefertotheinterfacedefinitionofMotorola'sreference.Becauseofnodefiniteagreement,thereisalotofdifferentversionsoftheproductsinthetechnologyexistsonSPIinterface,easycauseofambiguity,someevencannotinterconnect(needtodosomemodification).basedontheuseofmore
6、widespreadagreementtoundertakedesigningwithCprogramminglanguage,writteninQuartusdesigned,andNiosIIandthedesignsimulationsoftwareII,basedontheGX-SOC/DevSOPC-LabPlatformdevelopmentandexperimentPlatform-Alteracompany,theCycloneseriesofFPGAasthecoredesigncompleted.Keywor
7、ds:FPGASPIinterfaceQuartusII目录摘要IAbstractII1绪论11.1课题研究背景11.2SPI研究目的及意义21.3本章小结22SPI原理分析32.1SPI介绍32.2SPI工作模式52.3SPI传输模式52.4SPI协议62.5本章小结73方案论证93.1基于FPGA的RS232通信接口系统93.2基于FPGA的SPI通信接口系统103.3本章小结114SPI方案设计124.1开发试验平台简介124.1.1硬件开发平台124.1.2软件开发平台134.2SPI各部分具体实现144.2.1嵌入式系
8、统设计原理144.2.2SPI系统中所用的寄存器164.2.3SPI速率控制174.2.4SPI程序设计流程图184.3SPI仿真及开发板上调试验证分析194.3.1仿真结果194.3.2开发板上调试214.4本章小结22结论23致谢24参考文献25附录261绪