摘 要
USB ( universal serial bus)是近年發(fā)展起來(lái)的一種快速、靈活的總線接口。它最大的特點(diǎn)是易于使用、可熱插拔、接口連接靈活,并且能夠提供外設(shè)電源,在嵌入式系統(tǒng)及智能儀表中得到廣泛的應(yīng)用。本文討論了一種基于USB2.0的數(shù)據(jù)傳輸設(shè)計(jì)和實(shí)現(xiàn)方法。
本數(shù)據(jù)傳輸系統(tǒng)采用FPGA作為主控制器,通過(guò)SLAVE FIFO方式將數(shù)據(jù)送入U(xiǎn)SB控制板,最后經(jīng)USB將數(shù)據(jù)讀入計(jì)算機(jī)。論文首先簡(jiǎn)述了USB協(xié)議,包括體系結(jié)構(gòu)、數(shù)據(jù)流模型、傳輸類型等。在硬件設(shè)計(jì)部分先討論了USB2.0接口芯片CY7C68013,然后給出了FPGA的硬件設(shè)計(jì)方案及FPGA程序設(shè)計(jì);在軟件部分,介紹了FX2的固件框架,使用了USB從屬FIFO接口模式。最后將系統(tǒng)的軟硬件設(shè)計(jì)相結(jié)合,實(shí)現(xiàn)了對(duì)系統(tǒng)調(diào)試。
關(guān)鍵詞:USB,CY7C68013,固件,F(xiàn)PGA
Abstract
USB (universal serial bus) is one kind which the recent years developed fast, the nimble bus interface. It most major characteristic is easy to use, may to insert hotly pulls out, the connection to be flexible, and can provide the peripheral device power source, obtains the widespread application in the embedded system and the intelligent measuring appliance. But 51 series monolithic integrated circuits by its superior performance, the mature technology, the high performance-to-price ratio are widely applied in observe and control automated domains and so on instrument. This paper discusses a design scheme and implementation of data-transmission system based on USB2.0.
The data transmission system used FPGA as a host controller, and send data to the USB board through SLAVE FIFO, and finally, it will be written into computer. This paper, firstly, introduces knowledge about USB protocol, including architectural overview, data flow model, data flow types and so on. In the part of hardware, the hardware design of USB communication system based on USB2.0 chip CY7C68013 is discussed and then the hardware design scheme of FPGA; In the part of software, the FX2 firmware flow is shown, and the firmware design of USB Slave FIFO is discussed in detail. Finally, combining hardware design and software design, we give the debug strategy in this system.