用户名: 密码: 验证码:
WINDOWS CE.NET嵌入式系统硬盘数据传输的实现和优化
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着手持嵌入式产品功能的多样化,系统所需要的存储空间不断增大。与此同时,硬盘技术的发展日新月异,新型微硬盘容量不断增大,而体积和价格却逐渐下降。在各种手持嵌入式产品如掌上电脑、个人媒体播放器、手持GPS导航等设备中,微硬盘的使用越来越广泛,硬盘将是闪存和其它存储器的有力竞争者。
     本文在以PXA255处理器为核心,通过总线方式和I/0方式连接众多外围电路模块的掌上电脑平台上,实现了基于嵌入式Windows CE.net 4.2系统的硬盘数据传输功能。PXA255处理器存储控制器可以提供多种硬盘接入的方式,一是通过PCMCIA/CF接口,另一种是通过VLIO(variable latency input/output)存储器接口。本文根据PXA255处理器存储器特性、硬盘控制器接口特性及ATA(Advanced Technology Attachment)传输协议,设计了采用CPLD(Complex Programmable Logic Device)实现硬盘驱动器到PXA255处理器的VLIO存储器接口的硬件连接方案,CPLD根据处理器输出的控制信号和地址信号,产生硬盘控制器所需要的片选和其它传输控制信号。该方案电路设计简单,功耗低,并且同时支持PIO(Programmed I/O)和DMA(Direct Memory Access)的数据传输方式。基于此硬件连接设计方案,本文根据嵌入式Windows CE.net 4.2系统中块设备驱动的特点,采用流接口形式实现了硬盘软件驱动。本文实现了硬盘读写操作和其它输入输出控制接口函数,在同一接口中实现了PIO和DMA数据传输模式,并对这两种传输模式进行了比较和分析。为了降低在数据传输过程中对处理器的占用率,驱动实现了以中断方式控制硬盘数据的传输。由于嵌入式系统中电池电量是有限的,而硬盘功耗比较大,驱动提供了硬盘电源管理的接口,用以降低系统的整体功耗。最后,本文对硬盘驱动软件作了优化,以提高数据传输速率,并且进行了测试和分析。
     目前,本文描述的各项工作已全部完成。经过测试,硬盘在PIO方式下的数据传输速度为2.2~2.3MB/s,DMA方式下的传输速度为2.4~2.5MB/s。硬盘数据传输稳定,整个系统运行良好。
As embedded devices increase in functionality, greater in-system storage capacity is needed. At the same time, hard-disk drives, subsequently referred to as HDDs, are increasing in capacity while decreasing in price and size. Small HDDs have become competitive to flash storage for some designs. Potential uses of these small HDDs include MP3 players, portable media player, portable gaming systems, PDAs, GPS navigation devices and etc.
     The implementation and optimization of Hard-disk data transfer described in this paper is based on a PDA’s platform, which uses PXA255 processor as its core processor. The Intel PXA255 Processor offers an integrated system-on-a-chip design based on the Intel XScale microarchitecture. The PXA255 processor memory controller provides several possible solutions to implement an HDD interface. These interfaces include the PCMCIA/ Compact Flash interface and the variable latency input/output (VLIO) interface.The CPLD is used to connect the HDD to the VLIO interface of Intel processor in the design. Configurations using programmed IO (PIO) and flow-through DMA are presented. The VLIO interface solution only requires a small number of additional components and produces low-cost and efficient DMA performance. The design discussed is designed to work under PIO mode 4 and DMA mode 2, but not Ultra DMA or any other working mode.
     The HDD driver, which is registered to the OS as a block device driver for Microsoft Windows CE.net, is designed using stream interface. The read/write and IOCTL operations are implemented in the driver. Both PIO mode and DMA mode are supported in the driver with the same read/write interface to upper layer applications. In order to reduce the occupation rate of the cpu, interrupt mode is used to control the data transfer of the hard disk. Besides, as the battery in the embedded system is limited and the power consumption of hard disk is high, a simple power management strategy is presented to reduce the system power consumption. At last, the driver is optimized to improve the data transfer rate and the driver is tested.
     Till now, all the work described in this paper is completed. The HDD driver has been tested by CETK and runs well in the PDA system. Test results reveal that data transfer rate is about 2.2~2.3MB/s in PIO mode and 2.4~2.5MB/s in DMA mode.
引文
1.吕京建,肖海桥.面向二十一世纪的嵌入式系统综述[EB/OL].中国单片机公共实验室(BOL) 北京诺浩数字基因研究所. http://www.bol-system.com,2005
    2.黄继宽.从嵌入式设计的观点看微型硬盘发展趋势[J].电子与电脑,2005-03
    3.Frank Vahid,Tony Givargis.嵌入式系统设计[M].骆丽 译,北京:北京航空航天大学出版社
    4.硬盘 FAT 文件系统原理的详细分析[EB/OL]. http://www.dostor.com/hdd/diy/2004-04-02/0002410253.shtml,2004-04-02
    5.Patrick Schmid.IDE 教学课程:概念与技术深入剖析[EB/OL]. http://www.gb.tomshardware.com/article_000071602.html .2002-8-16
    6.FRIEDHELM SCHMIDT.SCSI 总线和 IDE 接口:协议、应用和编程[M].第二版.精英科技译.中国电力出版社
    7.IDE全攻略--从认识到搞定IDE[N].中国电脑教育报,2001-10-09
    8.陈向群,王雷等.Windows CE.NET系统分析及实验教程[M].北京:机械工业出版社
    9.Intel Corporation.Intel? PXA255 Processor Developer’s Manual.March 2003
    10.陈章龙,唐志强,涂时亮.嵌入式技术与系统-Intel Xscale结构与开发[M].北京航空航天大学出版社
    11.Lattice Semiconductor.ispMACH 4000V/B/C/Z Family Data Sheet[G].April 2004
    12.高盛涛,王平.Lattice公司的系统内可编程PLD[EB/OL].电子产品世界.2005
    13.周毓林,宁杨,陆贵强,付林林.Windows CE.net内核定制及应用开发[M].北京:电子工业出版社.2005-3
    14.微软公司.Microsoft Windodws CE设备驱动程序开发指南[M].北京:北京希望电子出版社,1999
    15.潘可贤,孔爱民,胡晨.便携式多媒体中心的IDE硬盘驱动设计和实现[J].电子器件.第28卷.第
    4期.2005
    16.胡秉亮.在基于Windows Mobile的PDA手机中微硬盘的实现[D]:[硕士学位论文].吉林:吉林大学信息学院,2005
    17.张彦敏.基于IDE硬盘的数据采集存储系统研究[D]:[硕士学位论文]. 哈尔滨:哈尔滨工程大学水声工程系,2005
    18.李鸿强,苗长云.基于IDE硬盘的大容量语音记录仪[J].电子技术应用,2003,29(4)
    19.Ritch Russ.为便携式设备选择最佳电池方案[N].电子工程专辑,2003-7-13
    20.林锐.高质量C++ / C编程指南[M].2001-07.
    21.陈曦,陈利学.嵌入式微处理器在电子硬盘控制器中的应用[J].电子元器件应用,2005-02
    22.吴芝路,任广辉,王桂玲,赵雅琴.基于IDE硬盘的高速数据存储器研究[J].电子技术应用,2000(05)
    23.刘洋,吕志民.基于ARM系统硬盘接口的使用和文件管理[J].电气电子教学学报,2003(3)
    24.姜换新.ARM嵌入式系统C语言编程[J].计算机应用与软件,2003
    25.谭浩强.C 程序设计[M].清华大学出版社.第一版.1997-7
    26.严慰敏吴伟民.数据结构(C 语言版) [M].清华大学出版社.第一版.1997-4
    27.吴芝路,任广辉,王桂玲,赵雅琴.基于IDE硬盘的高速数据存储器研究[J].电子技术应用,2000(05)
    28.JinAspinwall.IRQ、DMA&I/O 使用手册[M].第三版.陈仕华,周明艳译.中国水利水电出版社
    29.Raj Kamal.嵌入式系统体系结构编程与设计[M].清华大学出版社,2005-3
    30.Randal E.Bryant, David O’Hallaron.深入理解计算机系统[M].龚奕利,雷迎春译.中国电力出版社.修订版.2004-5
    31.Fadi Afa Al-Refaee.在便携式消费电子产品中应用大容量存储设备[N].电子工程专辑,2004-9-20
    32.Intel Corporation.Connecting the Intel PXA27X Processor Family to a Hard-Disk Driver via the VLIO Memory Interface.Application Note, October 2005
    33.Connecting the Intel PXA27X Processor Family to a Hard-Disk Driver with a CoolRunner-2 CPLD.XAPP914, January 15, 2006
    34.American National Standards Institute.Information Technology AT Attachment with Packet interface-5[S].13 December 1999
    35.Microsoft Corporation.Microsoft Windows CE.NET Help[S].2002
    36.Douglas Boling.Programming Microsoft Windows CE .NET[M].Third Edition.Microsoft Press.2003
    37.HITACHI Corporation.Hard Disk Driver Specifications Travelstar C4K40-40/20 REV.5.March 2004
    38.Intel Corporation.Intel? PXA255 Processor Developer’s Manual[S].March 2003
    39.Massoud Pedram.Power Optimization and Management in Embedded Systems[J].University of Southern California.Dept. of EE-Systems.Los Angeles CA 90089.0-7803-6634-4.2001 IEEE
    40.Bishop Brock, Karthick Rajamani.Dynamic Power Management for Embedded Systems[J]. IEEE International SOC conference.2003 IEEE
    41.Luca Benini,Alessandro Bogliolo,Giovanni De Micheli.A survey of design techniques for system-level dynamic power management[J].IEEE Transactions on Very-Large-Scale Integration Systems,2000,8(3)
    42.James Y Wilson.Building Powerful Platforms with Windows CE[M].第一版.2004-4
    43.Patterson D,Hennessy J.Computer Organization and Design[J].San Francisco,CA:Morgan Kaufmann Publishers,Inc.
    44.T. Simunic, L. Benini, P. Glynn, G. D. Micheli.Dynamic Power Management for Portable Systems[J].MobiCom.2000
    45.Q. Qiu, M. Pedram.Dynamic Power Management Based on Continuous-time Markov Decision Processes[J].DAC.1999.
    46.Nathaniel Pettis, Le Cai, and Yung-Hsiang Lu.Dynamic Power Management for Streaming Data[J].ISLPED’04.Newport Beach, California, USA.August 9–11, 2004,
    47.Q. Qiu, Q.Wu, and M. Pedram.Dynamic PowerManagement in A Mobile Multimedia System With Guaranteed Quality-of-service[J].DAC.834–839, 2001.
    48.Le Cai, Yung-Hsiang Lu.Dynamic power management using data buffers[J].Design, Automation and Test in Europe Conference and Exhibition.2004

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

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

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