摘要
在基于FPGA芯片的工程实践中,经常需要FPGA与上位机或其他处理器进行通信,为此设计了用于短距离通信的UART接口模块。该模块的程序采用VHDL语言编写,模块的核心发送和接收子模块均采用有限状态机设计,详述了各子模块的设计思路和方法,给出了它们的仿真时序图。综合实现后,将程序下载到FPGA芯片中,运行正确无误。又经长时间发送和接收测试,运行稳定可靠。相对参数固定的设计,该UART的波特率、数据位宽、停止位宽、校验位使能及校验模式选择均可以在线设置,为FPGA与其他设备的通信提供了一种可靠途径,具备较强的实用价值。
When develop projects based on FP(;-A chip, FPGA often need to communicate with computer or microprocessor. So this paper designs and implements UART module for short range conmmnication. The program of the module is written in VHDI. language. Both sending and receiving sub-module are the core of UART and they are designed by the finite state machine. The article details the design ideas and methods of the various sub-modules, and gives their simulation timing diagrams. After program is downloaded to the chip,it runs correctly. Then take a test of sen;ting and receiving for a long time,it runs reliable. Compared with the design which parameters are fixed, this UART 's baud rate, data bits wide, stop bits wide, parity check enable and check mode can be set dynamically. This design provides a reliable way for FPGA to communicate with other devices, with a strong practical value.
出处
《电子测量技术》
2012年第11期76-79,123,共5页
Electronic Measurement Technology