基于Nios II的家庭网关设计与研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着数字家庭网络技术的发展,人们对于住宅的舒适、方便和效率的要求越来越高。家庭网关是家庭内网和外网这两个网络的连接点,作为数字家庭网络的核心部件,将直接影响到家庭网络的性能。
     本文从家庭网关的实际需求出发,结合家庭网关的技术现状,运用SOPC技术、互联网技术和蓝牙技术等,对家庭网关的实现方案和相关技术开展研究。
     首先,本文阐述了家庭网关相关技术和研究现状,分析和研究了数字家庭网络的基本需求和功能,在此基础上,应用基于NiosⅡ的SOPC技术,提出了一种基于家庭网关的远程监控模型,并给出了家庭网关的总体设计方案。该方案以基于NiosⅡ的SOPC技术为核心,构建家庭网关的软硬件系统,充分发挥了FPGA的可编程特性和IP核的易移植等特点,有效弥补了传统嵌入式网关的兼容性差、不易移植的缺陷,对家庭网关的设计与开发作了有益的探讨。
     然后,在对Altera,公司提供的NiosⅡ软核以及开发工具的学习和研究的基础上,开展了家庭网关相关IP核的设计与整合,实现了NiosⅡ处理器系统的设计和各类接口电路的设计,建立了家庭网关的微处理器平台;以ROK101007蓝牙模块和RTL8019AS以太网模块作为网关的内网和外网接口,应用QuartusⅡ和SOPC Builder设计工具完成了家庭网关硬件平台的构建,同时给出了各模块在Modelsim中的仿真测试结果,并在实验开发平台上得到了验证。
     接着,基于硬件抽象层系统库(HAL)规范,探讨了基于NiosⅡ的软件平台的构建技术和方法,并详细阐述了网关软件平台中的启动程序设计、设备驱动程序设计、μC/OS-Ⅱ内核的移植和配置以及LwIP协议栈的配置等,实现了家庭网关的软件平台构建。
     最后,基于上述软硬件平台,应用HTTP协议、CGI技术,编程实现了HTTP服务器与客户端的动态交互,从而实现家庭网关的远程控制功能;针对蓝牙模块,本文提出了静态映射表+动态更新的机制,在蓝牙模块通信任务内部设计了蓝牙家电映射表,实现家庭网关与各家电设备的通信;应用μC/OS-Ⅱ操作系统的软件开发技术,完成了应用软件的设计。设计的网关在康草科技有限公司的FPGA/SOPC开发平台上得到了验证,实验结果表明,本文设计的网关基本达到了预期目标,对家庭远程控制系统的开发有一定的参考价值。
     综上所述,本文主要研究了FPGA嵌入NiosⅡ软核的家庭网关实现技术,对于SOPC技术用于数字家庭网络的建设具有一定的指导意义和参考价值。
With the development of intelligent home techniques, the comfort, convenience and efficiency of the house plays a more and more important role in people's daily life. The home gateway is the joint of the home internal and external network and as the core of intelligent home, the home gateway influences directly the capability of digital home network.
     Considering the practical requirements and the actual technique situation of home gateway, this paper worked on the implementation of home gateway and its related techniques by the application of SOPC, network and Bluetooth techniques.
     Firstly, this paper expatiated the related techniques and its researching situation of home gateway, analyzed and researched on the requirements and functions of home gateway, and then brought forward a remote control model based on home gateway by the application of SOPC technique based on Nios II, and futhermore gave the whole design scheme of home gateway. The key technique of this design scheme was to use SOPC technique based on Nios II to construct the hardware and software system of home gateway. Considering the programmable feature of FPGA and the portable feature of IP core, the design scheme solved effectively the incompatibility and importable disadvantage of conventional embedded home gateway.
     Secondly, by studying and researching on Nios II and its related development tools, this paper worked on the designing and assembling home gateway related IP cores and implemented the design of Nios II processing system and its interface circuits design, finally, built up the embedded processing platform of home gateway. This paper used ROK101007 Bluetooth Module and RTL8019AS as the home internal and external network interface, and implemented the hardware platform construction by using Quartus II and SOPC Builder tools. Then it proved the feasibility of the hardware design by verifying both in Modelsim simulation tool and in SOPC development board.
     Thirdly, based on the HAL (Hardware Abstraction Layer) of Altera Corporation, this paper expatiated the construction technique and method of the software platform based on Nios II processor and detailed the design of the Bootloader, the device driver of each module, the migration ofμC/OS-II operating system and LwIP stack, and implemented the software platform construction.
     Finally, based on the above work, this paper implemented the remote control application of home gateway with the function of dynamin interaction between the client and the server by the application of HTTP protocol and CGI(Common Gateway Interface) technique. As for the Bluetooth module, this paper brought forward a static mapped table plus dynamic updating mechanisim and implemented the internal communication of home network. This paper also implemented the application development based on the software development technique ofμC/OS-II operating system. The whole design scheme of home gateway was verified on the CT2C5 FPGA/SOPC development platform. The experiment results showed that most of the designs have accomplished its scheduled aim and could afford some reference to the development of home remote control system.
     As a summary, this paper mainly researched the implementation technique of home gateway based on the technique of FPGA embedded Nios II and could afford some instruction and reference to the construction of digital home network based on SOPC technique.
引文
[1]余永权.智能家居的网络架构、功能及发展.电子世界,2002,5
    [2]苗在良.数字家庭网络现状和发展趋势.信息技术与信息化,2005,3
    [3]Theodore B.Zahariadis,“Home Networking Technologies and Standards”,Artech House,Hardcover,Published October 2003
    [4]吴瑜,韩江洪,张建军等.智能家居设计系统中几个关键技术的探讨.电子产品世界,2002,12
    [5]孙政,韩江洪,张建军等.蓝牙技术与智能系统.机械制造与自动化,2003,6
    [6]薛骏,齐赛.HomeRF无线家庭网络技术.电子技术,2001,5
    [7]何袆.基于中间件技术的家庭网络框架研究与实践:[学位论文].合肥工业大学,2002
    [8]刘伟,涂时亮,陈章龙等.基于OSGi和动态QoS管理的家庭网关设计.小型微型计算机系统,2005,26(7)
    [9]李琳,李冶柱.Jini在智能家居网络中的应用研究.微型电脑应用,2004,9
    [10]彭海清,冯涛,童登金.家庭网络的关键技术、业务及标准化.电信科学,2004,11
    [11]ITU-T J.190.Architecture of Media Home Net that supports cable-based services,2002
    [12]“数字电视接收设备与家庭网络平台接口标准”工作组.SJ/T 11316-2005.家庭网络系统体系结构及参考模型,2005
    [13]周立功.SOPC嵌入式系统基础教程.北京:北京航空航天大学出版社,2006
    [14]Altera Corporation.Quartus ⅡⅤ7.2 Handbook,Volume 4:SOPC Builder,2007
    [15]Altera Corporation.Nios Ⅱ Processor Reference Handbook,2006
    [16]陈秀玲,周欣,陈黎平.新的片上可编程系统(SOPC)解决方案Nios. 今日电子,2003,7
    [17]李兰英等.Nios Ⅱ嵌入式软核SOPC设计原理及应用.北京:北京航空航天大学出版社,2006
    [18]Altera Corporation.Nios Ⅱ Software Developer's Handbook,2006
    [19]廖惜春.蓝牙技术在智能家居系统中的应用.电测与仪表,2004,11
    [20]朱刚,谈振辉,周贤伟.蓝牙技术原理与协议.北京:北方交通大学出版社,清华大学出版社,2002
    [21](美)Michael Miller,李纯等.蓝牙技术起跳.电子工业出版社,2002
    [22]喻宗泉.蓝牙技术基础.机械工业出版社,2006
    [23]Rob Flickenger,“Building Wireless Community Networks”,2~(nd)Edition,O'Reilly & Associates,Published 2003
    [24]张健.蓝牙协议栈的研究及其C语言实现:[学位论文].大连海事大学,2003
    [25]余群,王群生.蓝牙协议体系和蓝牙协议的实现方法.陕西工学院学报,2004,20,(1)
    [26]Walter Y.Chen,“Home Network Basis:Transmission with Environments and Wired/Wireless Protocols”,Prentice Hall PTR,July 11,2003
    [27]薛洋.蓝牙HCI协议的研究与实现:[学位论文].东北大学,2003
    [28]赵楠.基于RS232传输层的HCI Driver设计研究.微计算机信息,2002,18,(2)
    [29]马涛.数字社区中家庭网络通信协议的研究:[学位论文].北京工业大学计算机应用,2002
    [30]孙政,韩江洪,张建军等.蓝牙技术与智能系统.机械制造与自动化,2003,(6)
    [31]郭世满,马蕴颖,郭苏宁.宽带接入技术及应用.北京邮电学院出版社,2006
    [32]宋延昭.嵌入式操作系统介绍及选型原则.工业控制计算机,2005
    [33]几种开放源码的TCPIP协议栈概述.http://embedfans.bokee.com/viewdiary.14237163.html
    [34]Adam Dunkels.Design and implementation of LwIP TCP/IP stack,2001
    [35]朱晓蕾,余达太,孙昌国等.基于客户/服务器模式的远程控制系统.计算机工程与设计,2004,25,(5)
    [36]姚洪智,郑雪峰,曹磊.基于CGI接口实现嵌入式系统远程控制.微机发展,2004,14(9)
    [37]Saito,T.,Tomoda,I.,Takabatake,Y,Teramoto,K.,Fujimoto,K.,“Gateway technologies for home network and their implementations”,Distributed Computing Systems Workshop,2001 International Conference on,16-19 April 2001
    [38]Valtchev.D and Frankov.I,“Service gateway architecture for a smart home”,IEEE Communication Magazine,April 2002
    [39]David Clark,“Network Nirvana and the Intelligent Device”,IEEE Concurrency April-June,1999
    [40]潘松,黄继业,曾毓编著.SOPC技术实用教程.北京:清华大学出版社,2005
    [41]Altera Corporation.Simulating Nios Ⅱ Embedded Processor designs Application Note,2004
    [42]Hynix Corporation.HY57V641620 Datasheet
    [43]AMD Corporation.AM29LV160 Ddatasheet
    [44]Ericssion Microelectronics.ROK101007 Datasheet
    [45]Reltek Corporation.RTL8019AS Reltek Full-Duplex Ethernet Controller with Plug and Play Function(RealPNP)Datasheet
    [46]Altera Corporation.Developing HAL Device Drivers,2007
    [47]柳一村.基于Nios的SOPC系统设计以及程序引导.电子技术,2005
    [48]彭澄廉,周博,邱卫东等.挑战SOC——基于Nios的SOPC设计与实践.北京:清华大学出版社,2004
    [49]金鹏电子有限公司.OCM12864系列图形点阵液晶显示模块使用说明书,2005
    [50]Jean J.Labrosse著,邵贝贝等译.嵌入式实时操作系统μC/OS-Ⅱ.北京:北京航空航天大学出版社,2003
    [51]李正军.基于Nios软核CPU 的μC/OS-Ⅱ和LwIP移植.遥测遥控,2006,27,(2)
    [52]Adam Dunkel,“Minimal TCP/IP implementation with proxy support”,Technical Report T2001:20,SICS-Swedish Institute of Computer Science,February 2001
    [53]吴婷,王敏,周等.基于SOPC技术的核信息远程采集系统.电子技术应用,2006,3
    [54]Joong-Han Kim,Sung-Su Yae,R.S.Ramakrishna,“Context-Aware Application Framework based on Open Service Gateway”,International Conferences 2001
    [55]Networking Group.RFC2616-Hyper Text Transfer Protocol-HTTP/11,1999
    [56]欧阳喜.如何实现WWW上的CGI编程.计算机与通信,1998,6