基于FPGA的多串口通信设计与实现 - 图文 下载本文

龙源期刊网 http://www.qikan.com.cn

基于FPGA的多串口通信设计与实现

作者:李伟

来源:《数字技术与应用》2015年第02期

摘要:串行接口是一种被广泛应用的接口形式,一般采用专用集成电路实现,在串口较多的电路中,将大大增加PCB面积和布线难度,同时,如何处理多串口通信时的中断冲突,也是一个难点。为了解决这些问题,本文结合实际工程需要,基于FPGA平台设计了多串口通信处理模块。该模块不仅包含通用的UART芯片功能,而且还针对多串口工作的情况,设计了中断控制器,解决了多个串口的中断冲突问题。该电路结构简单、工作稳定,可运用于低速率的异步通信。

关键字:串行接口 专用集成电路 FPGA UART 中断控制 VHDL

中图分类号:TN791 文献标识码:A 文章编号:1007-9416(2015)02-0000-00 Abstract: Serial port is a widely used interface form,generally uses the ASIC

implementation,,the circuit has more serial port,will greatly increase the PCB area and routing, as well as,,how to deal with the interrupt conflict problem of multi serial port,is also difficult。In order to solve these problems,for the actual application,a serial port communication processing module is designed in this paper.The designed module not only realize the general function of UART chip,but also solve the interrupt conflict problem of multi serial port by designing the interrupt controller。The circuit has advantage of simple and stable,and can be applied in the asynchronous communication with low baud rate。

Key words: serial port;ASIC;FPGA;UART;interrupt controller;VHDL。

串行通信因为具有传输线少、成本低、配置灵活等特点,得到了广泛应用,通用异步收发传输器(Universal Asynchronous Receiver/Transmitter),是一种比较常用的接口电路,主要用于串行数据和并行数据的转换。一般该接口由专用的UART芯片完成,例如

SC16C554BIB64,该接口芯片具有4路独立的通道,同时提供多种控制功能,但在实际使用中往往只使用一种特定控制方式,这不仅造成电路复杂和浪费,而且会使PCB面积增大,布线复杂。[1]

FPGA(Field-Programmable Gate Array),即现场可编程门阵列,它是作为专用集成电路领域中一种半定制电路出现的,既解决了定制电路的不足,又克服了原有可编程器件门电路数有限的缺点。FPGA中具有丰富的触发器和I/O口,采用描述语言(VHDL和VerilogHDL)进行设计,用户可以根据需要,描述出具有各种功能的电路。[2]