Nios系统中Avalon从外设(PWM)的设计和研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
Nios处理器是一种在单芯片上的CPU,其外围集成了存储器和外部设备。其特点类似微控制器或单片机。
     但与固定式微控制器不同,Nios处理器是一种可配置的软核处理器,“可配置”意味着其构建的系统,其性能或功能可以根据用户要求进行增减以满足性能或价格的要求。“软核”则意味CPU的核心是以软件设计的形式提供,并可下载到Altera公司的FPGA可编程芯片中,而不是传统的、不可修改的硅芯片形式。换句话说,Altera公司从不出售Nios芯片,Altera公司只出售空的FPGA芯片。由用户对软件形式的Nios处理器代码以及外部设备进行修改和配置,最终符合特定要求,然后再将系统下载到Altera公司的FPGA芯片中。
     Altera公司提供了一套用于Nios处理器的通用外部设备,例如时钟、串行接口、通用I/O口、SDRAM控制器和其他存储器接口。设计人员也可以创建自定义的外部设备并将其集成到Nios处理器系统中。对于一个要求CPU执行某些特定代码的性能要求很高的系统,通常可以创建一个具有类似功能的自定义外部设备的硬件来取代这部分软件。由于硬件的工作速度远远超过软件的工作速度,这将使系统的性能大幅度提高,而且在自定义的外部设备处理数据时,还可以让CPU有更多时间去处理其他任务。
     本文以Nios嵌入式软核为基础平台,以PWM的设计为例,介绍用户自定义的基于Avalon的从外设元件的设计方法和过程。重点论述了Avalon总线的一些基本特性,以及如何设计从外设的底层硬件和软件驱动程序,并提供了外设的API接口函数,在此基础上编写了用户的高层控制程序。该设计在FPGA上完成并得到正确结果。对嵌入式系统开发和基于IP核的设计有一定指导意义。
A Nios system is similar in traditional microcontroller or "computer on chip", because the Nios system contains peripherals device and memory. But the Nios system is different from other traditional microcontroller or "computer on chip" in many places.
     The Nios II processor is a configurable soft-core processor, as opposed to a fixed-microcontroller. In this context, "configurable" means that features can be added or removed on a system-by-system basis to meet performance or price goals. "Soft-core" means the CPU core is offered in "soft" design form (i.e., not fixed in silicon), and can be targeted to any Altera FPGA family. In other words, Altera does not sell "Nios II chips"; Altera sells blank FPGAs. It is the users that configure the Nios II processor and peripherals to meet their specifications, and then program the system into an Altera FPGA.
     Altera provides a set of peripherals commonly used in microcontrollers, such as timers, serial communication interfaces, general-purpose I/O, SDRAM controllers, and other memory interfaces. Designers can also create their own custom peripherals and integrate them into Nios II processor systems. For performance-critical systems that spend most CPU cycles executing a specific section of code, it is a common technique to create a custom peripheral that implements the same function in hardware. This approach offers a double performance benefit: the hardware implementation is faster than software; and the processor is free to perform other functions in parallel while the custom peripheral operates on data.
     This text describes the design flow to develop a custom SOPC Builder component (PWM) based Nios II IP core. Discussed some characteristic of Avalon bus and how to design slave Avalon Interface from hardware to software, at the some time we provided API to transfer by higher custom. Here the foundation is write the customer of high controls procedure. The total design is complete on the FPGA and gets the right result. This text has some guide meaning for embeded system develop and some design based IP core.
引文
[1]嵌入式系统的发展历程V0.85,何立民教授在理工大学信自学院报告
    [2]mn1_nios2_board_stratixⅡ_2s60.pdf,Altera公司网站提供
    [3]n2cpu_nii51001.pdf,Altera公司网站提供
    [4]n2cpu_nii51002.pdf,Altera公司网站提供
    [5]br_NiosⅡ_SC.pdf,Altera公司网站提供
    [6]李驹光,ARM应用系统开发详解,清华大学出版社,2005.1
    [7]Developing SOPC Builder Components.pdf,Altera公司网站提供
    [8]李东生 编著.电子设计自动化与IC设计.高等教育出版社,2004
    [9]彭澄廉 主编.挑战SOC-基于Nios的SOPC设计与实践.清华大学出版社,2004
    [10]李兰英著.Nios嵌入式软核SOPC设计原理及应用,北京航天航空大学出版社,2005
    [11]徐光辉 程东旭 黄如 主编.基于FPGA的嵌入式开发及应用,电子工业出版社,2005
    [12]Altera Corporation.Nios Ⅱ Hardware Development Tutorial Version 6.0 May 2006
    [13]Altera Corporation.Nios Ⅱ Embedded Design Suite Ver 6.0 Release Notes,2006
    [14]Quick Start Guide For Quartus Ⅱ Software,2006
    [15]Quartus Ⅱ Version 6.0 Handbook,2006
    [16]Nios Ⅱ Software Developer's Handbook,2006
    [17]mnl_avalon_spec.pdf,Altera公司网站提供
    [18]www.21ee.com(21电子设计网)

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700