节点文献
嵌入式系统I/O设备驱动模式和结构的研究
Study of the I/O Device Driver Model and Framework Based Embedded System
【作者】 邓彬伟;
【导师】 朱绍文;
【作者基本信息】 华中师范大学 , 电路与系统, 2005, 硕士
【摘要】 嵌入式系统在工业控制、多媒体、通讯等各方面都有广泛应用。I/O驱动作为嵌入式操作系统的一个组成部分,对于嵌入式操作系统的应用起着关键作用。 I/O驱动在实现上通常有两种方法:一种是进程结构的系统方式,另一种是单一系统方式;I/O驱动在嵌入式操作系统的结构上也有两种实现方式:一种是核内驱动的I/O结构,另一种是核外I/O技术。核内I/O结构是将I/O驱动作为内核的一部分存在,且运行在较高的优先级和特权级。核外I/O技术是将设备驱动程序移出核的外部,在用户级直接控制设备,完成对设备的读写操作以及设备缓冲区的管理,具有实现简单,易于在微内核机制的操作系统上实现,因而成为当前的热点。 嵌入式系统中I/O驱动的目标是为硬件输入输出(I/O)设备提供一个抽象层,以便软件在更高层按照统一的风格来访问设备,它与硬件无关。由于在实现I/O驱动上,采用任何一种方式都很难达到实现容易和实时性的统一。为了改善这一问题,我们提出了进程结构的核外I/O技术与分层结构思想相结合的I/O驱动模式;在进程结构的基础上采用分层结构的实现方法,把应用和硬件驱动分开为独立的两层,使得I/O驱动结构清晰、代码实现容易,跟踪调试方便并能很好的隐藏硬件驱动细节,采用进程结构通过信号量实现与嵌入式操作系统内核的通信来实现核外I/O技术;在实时性保障上,通过采用基于硬中断的响应方式与基于信号的处理方式的结合,根据硬件实时性要求的不同,用户可选择不同的方式。对基于信号的方式还增加专用I/O设备数据的高速缓冲,使I/O中断响应过程能尽可能及时得到完成。当然这种实现方法要求MCU核要有较大的内部RAM,对内存和ROM容量要求比较高。但随着MCU性能的快速提升和价格的不断下降,这方面问题对I/O驱动的实现的影响将会越来越小。 进程结构的核外I/O技术与分层结构结合的驱动模式在桑夏3000操作系统的带USB的流设备管理中得到应用和实现。
【Abstract】 Embedded System applies to industry control、 multimedia、 communication and so on widely. I/O Device Driver-one of Embedded Operating System structure, plays a pivotal role in the application area of Embedded Operating System. As a rule, two methods are used for doing I/O device driver. One is process structure system; another is single system. On I/O device driver structure of Embedded Operating System, Implementing I/O device driver has another two approaches-kernel-level I/O Technology and user-level I/O Technology. I/O device driver is one of Operating System and lie in priority level in kernel-level I/O Technology. Kernel-level Technology supports device driver program remove embedded operating system kernel; Devices are directly controlled, written, red and device buffers are managed on user-level; because it is simple to be implemented in micro-kernel operating system, user-level I/O gets increasingly important for embedded applications.Embedded operating system implements software called device drivers, whose purpose is to manage, or drive, hardware devices. A device driver links an operating system and a device, making it possible for the operating system to recognize the device and to present the device’s services to applications. It is difficult to obtain easily-implement and real-time at one time by means of single method in implementing I/O device driver.To resolve the problem, this thesis discusses user-level I/O Technology of process structure combining with layered structure model. Layered device drivers split the code into an upper layer called application layer and a lower layer called hardware device driver layer. It is legible and easily-implement for I/O devicedriver structure; it is convenient for Debug and concealing hardware driver detail. To support user-level I/O of process structure for embedded system, signal mechanism is adopted. To ensure real-time demand, this thesis discusses signal mechanism combining with external interrupt to implement user-level I/O. According to real-time demand, user selects some way. To achieve Interrupt response procedure in times, special I/O device cache is used in signal mechanism. User-level I/O Technology of process structure combining with layered structure model needs bigger internal RAM and ROM. But, with the development of MCU performance and price fall increasingly, RAM and ROM influence gets more and more unimportant for the implementation of user-level I/O Technology of process structure combining with layered structure model.The implementation of stream device management with USB device in Sx3000 real-time embedded operating system adopts user-level I/O Technology of process structure combining with layered structure model.
【Key words】 Embedded System; Embedded Operating System; Device Driver Model and Framework Stream Device;
- 【网络出版投稿人】 华中师范大学 【网络出版年期】2005年 05期
- 【分类号】TP316
- 【被引频次】16
- 【下载频次】483