基于amba总线的uartip设计与实现

上传人:E**** 文档编号:113836623 上传时间:2019-11-09 格式:PDF 页数:84 大小:4.84MB
返回 下载 相关 举报
基于amba总线的uartip设计与实现_第1页
第1页 / 共84页
基于amba总线的uartip设计与实现_第2页
第2页 / 共84页
基于amba总线的uartip设计与实现_第3页
第3页 / 共84页
基于amba总线的uartip设计与实现_第4页
第4页 / 共84页
基于amba总线的uartip设计与实现_第5页
第5页 / 共84页
点击查看更多>>
资源描述

《基于amba总线的uartip设计与实现》由会员分享,可在线阅读,更多相关《基于amba总线的uartip设计与实现(84页珍藏版)》请在金锄头文库上搜索。

1、国防科学技术大学 硕士学位论文 基于AMBA总线的UARTIP设计与实现 姓名:徐云云 申请学位级别:硕士 专业:软件工程 指导教师:李勇 2011-03 国防科学技术大学研究生院工程硕士学位论文 第 i 页 摘 要 随着半导体技术的发展,集成电路复杂度的不断增加,基于 IP 核的 SoC 设计 正逐渐成为集成电路设计的主流技术。IP 软核是 IP 核形式之一,它的灵活性高, 在复杂 IC 设计中有很大优势。SoC 系统的最大亮点是 IP 核的复用,如何提高 IP 核的质量和建立一套完整的 IP 核评测、 认证体系是现在业内比较热点的研究方向。 本文立足于自主研制的可重构媒体 SoC 芯片的系

2、统功能需求,在详细研究了 AMBA 总线接口协议与 UART 接口协议的基础上,构建出可重构媒体 SoC-UART 控制器和 APB 桥功能结构。设计出的 UART 接口功能丰富多样,控制灵活,包括 7 种操作方式、4 种数据格式、2 种数据传输控制方式和 3 种传输结束控制方式等。 详细设计实现了 RTL 级逻辑结构,包括波特率时钟产生、Modem 接口、APB 总 线接口、数据收发、中断和 DMA 事件处理模块等。采用两级时钟分频算法实现了 波特率时钟的产生;深入研究了接口时序约束对逻辑和电路设计的影响,设计出 了 Modem 接口和 APB 总线接口;通过优化发送和接收状态机,达到了使用

3、较少 的逻辑资源实现了 UART 的数据收发功能。设计的 APB 桥完成了 AHB 传输协议 向 APB 传输协议的转换, 实现了低速外设与高速 CPU 之间的数据传输。 在完成逻 辑和电路设计后,本文深入研究了复杂芯片的模拟验证方法,完成了系统级和 FPGA 验证平台的搭建,基于此平台,完成了 UART 和 APB 桥功能和时序验证。 针对 UART 设计, 在 FPGA 平台上进行了多种板级测试。 测试结果表明: UART 控制器满足 UART 协议各项时序约束并留有余量,在典型情况下传输速率达到 9600bps 以上,能与多款 UART 接口芯片进行正确通信,可完成可重构媒体 SoC 应

4、用中承担的软件升级等功能,达到了预期设计目标。 主题词:UART;APB 桥;SoC;IP 核;AMBA;FPGA 国防科学技术大学研究生院工程硕士学位论文 第 ii 页 Abstract With the development of technology, complexity of Integrated Circuit is becoming raise. IP-based SoC design is becoming a predominant methodology of IC design. IP soft core is a kind of IP core. It had a b

5、ig advantage in complicated Integrated Cireuit design because of its flexibility. The significant strongpoint of SoC is the reusing of IP core. How to improve the quality of IP core and built a complete system about IP core evaluating and attestation has been the hot spot in the research recently. B

6、ased on the system level requirement specification of the independent reconfigurable media SoC, we have thoroughly studied UART interface specification and AMBA bus specification, extended its function to accomplish the overall function architecture specification. UART specification has flexible met

7、hods of control, which include nine ways of operation, four data formats, two methods of data transmission control, several ways to stop transmission and so on. RTL-level logic architecture of UART has been designed and implemented in detail, including baud clock generation, Modem interface, APB bus

8、 interface, serial data transmitter and receiver, interrupt/ DMA events, etc. Meanwhile, to match the slow UART serial clock with the high rate system clock, the algorithm of two steps to divide system clock down is achieved. Upon researching the interface timing constraints have great influence on

9、the logic and circuit implementation.Modem interface and APB bus interface has been organized. We optimized the control state machines to make best use of chip resources to implement an UART controller with flexible methods of data receive and transmit functions. Upon researching verification of com

10、plicated chip, an system-verification and FPGA-verification platform has been organized, which the function and timing simulation of UART have been fulfilled based on. Moreover, a comprehensive test on FPGA has been schemed for UART design.The results have shown that each timing parameter of UART co

11、uld meet the constraints of extended specification, and there still remains room.The transmission rate be up to more than 9600bps.It is successful for UART controller to flexibly communicate with the several UART peripherals.The designed UART controller achieves the functions of soft upgrade in reco

12、nfigurable media SoC application, has been reached the design goal. Key Words:UART, APB bridge,SoC, IP core, AMBA, FPGA 国防科学技术大学研究生院工程硕士学位论文 第 IV 页 表 目 录 表 2.1 RS232-C 连接器引脚功能定义 15 表 2.2 常用的 RS232-C 接口信号. 16 表 2.3 RS232-C 的电气参数 16 表 3.1 APB 桥和 AHB 总线的接口信号. 24 表 3.2 APB 桥和 APB 桥总线接口信号 24 表 3.3 地址分配表

13、30 表 3.4 APB 主机接口模块接口说明 . 32 表 4.1 UART 和 AMBA 总线的接口信号 35 表 4.2 UART 和 DMA,中断控制器接口信号. 35 表 4.3 UART 和 PAD 的接口信号表 36 表 4.4 二级译码 模式寄存器定义 38 表 4.5 奇偶校验真值表 44 表 4.6 基本 UART 中断请求的描述. 50 表 5.1 主要模块的代码覆盖率分析 68 表 5.2 UART 和 APB 桥综合结果 70 国防科学技术大学研究生院工程硕士学位论文 第 V 页 图 目 录 图 1.1 软硬件协同设计方法 4 图 1.2 可重构媒体 SoC 体现结构

14、. 7 图 2.1 AMBA 总线的基本结构示意图. 10 图 2.2 AHB 总线结构. 12 图 2.3 APB 传输状态机 . 13 图 2.4 DB-25 连接器机械图 14 图 2.5 DB-9 连接器机械图 14 图 2.6 采用 MC1488 和 1489 电平转换芯片时 RS-232C 与 UART 的连接 17 图 2.7 采用 MC1488 和 1489 电平转换芯片时 RS-232C 与 UART 的连接 17 图 2.8 使用串口与 PC 机通信. 18 图 2.9 使用串口与 PC 机通信 PCB 图 18 图 2.10 采用 MODEM 和专用电话线通讯时 UART

15、 与 RS-232C 接口连接信号. 18 图 2.11 UART 传输数据格式 19 图 2.12 UART 数据采样方式 20 图 2.13 UART 数据采样基准 20 图 3.1 APB 桥功能划分 . 23 图 3.2 APB 桥功能结构图 . 23 图 3.3 APB 桥接口信号 . 24 图 3.4 APB 桥工作流程图 . 25 图 3.5 简单算法的状态机 26 图 4.1 UART 功能模块划分 33 图 4.2 UART 控制器功能结构图 34 图 4.3 UART 数据收发工作过程 36 图 4.4 APB 总线的基本读操作 . 39 图 4.5 APB 总线基本写操作

16、 . 39 图 4.6 波特率时钟实现原理 40 图 4.7 UART 的两级时钟分频 40 图 4.8 Modem 核心结构. 41 图 4.9 发送器的数据通路 42 图 4.10 发送状态转换图 43 图 4.11 发送端控制通路 44 图 4.12 发送端数据 BC=0 45 国防科学技术大学研究生院工程硕士学位论文 第 VI 页 图 4.13 发送端数据 BC!=0 46 图 4.14 接收端数据通路 46 图 4.15 接收状态转换图 48 图 4.16 接收状态转换图 48 图 4.17 接收移位器数据移位过程 49 图 4.18 滤波单元结构示意图 49 图 4.19 UARTTXDREQ、UARTRXDREQ 信号产生电路. 51 图 4.20 简单停时钟电路 52 图 4.21 简单停时钟电路 53 图 4.22 使用锁存器停时钟 53 图 4.23 带锁存器的停时钟单元工作波形图 53 图 4.24 亚稳态的产生 54 图 4.25 时钟域同步慢时钟域的控制信号 54 图 4.26 慢时钟域到快速时钟域信号的握手机

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号