版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 英文翻译USB的互连支持数据在 USB主机与 USB设备之间的流动。这一章主要讲述为了简化主机上的 客户软件(Software client)与设备的功能部件 (function)之间的通信而必须的主机接口(host interface)。在本章中所涉及的具体实现部份并不是必要的,这些实现部份是作为例子来阐述在响应 USB设备请求时的主机系统的行为。只要 USB设备并不感觉到主机行为的改变,USB主机完全可以提供一个不同的软件系统实现方法。10.1 USB主机概况10.1.1 概论图 10-1展示了 USB通信模型之间基本的信息流与互连关系:客户功能部件USB 系统主机控制器USB 设备US
2、B总线接口逻辑的信息流实际的信息流图 10-1通信模型层次关系图由图 10-1 可见,主机与设备都被划分成不同的层次。主机上垂直的箭头是实际的信息流。设备上对应的接口是基于不同实现的。在主机与设备之间的所有通信最终都是通过 USB的电缆进行,然而,在上层的水平层之间存在逻辑的主机设备信息流。主机上的客户软件和设备功能部件之间的通信是基于实际的应用需求及设备所能提供的能力。客户软件与功能部件之间的透明通信的要求,决定主机和设备下层部件的功 能以及它们的界面(interface)这一章从主机的角度来描述上述的通信模型,图 10-2 描述了从主机角度看到的它与设备的连接。主机在整个 USB系统中是唯
3、一的,它包括如下几个层次。USB总线接口USB系统(USB System)USB客户(Client)其中,USB总线接口处理电气及协议层的互连(详见第 7章及第 8章)。从互连的角度看,USB设备和 USB主机都提供类似的 USB总线接口,如串行接口引擎(Serial Interface Engine SIE)。由于主机在 USB 系统中的特殊性,USB 主机上的总线接口还必须具备主机控制器的功能(Host Controller),主机控制器具有一个内集成的集线器(根集线器)提供与 USB电缆的连接。USB系统(USB System)使用主机控制器来管理主机与 USB设备的数据传输。USB系统
4、与主机控制器之间的界面基于主机控制器的硬件特性。USB 系统层相对于主机控制器而言,处理的是以客户观点见到的数据传输及客户与设备的交互。这包括附加的 USB 信息,比如协议头(Protocol Wrappers)。USB 系统还必须管理 USB的系统资源,以使得客户的访问成为可能。(管理界面)通道组(到某一接口)IRPSUSB驱动器主机软件USB系统(管理通道) 标准通道(到缺省端口地址)主机控制器驱动硬件定义硬件定义主机控制器USB 电缆USB 总线接口通道,代表相应层之间连接的抽象图 10-2 主机通信图USB系统有三个主要组成部份:主机控制器驱动(Host Controller Driv
5、er)USB驱动 (USB Driver)主机软件 (host software)主机控制器驱动的存在,方便地将各种不同的主机控制器实现映射到 USB系统,客户可以不必知道设备到底接在哪个主机控制器上就能同设备进行通信。USB驱动提供了基本的面向客户的主机界面。在 HCD与 USB之间的接口称为主机控制器驱动接口(Host Controller Driver Interface HCDI)。这层接口不能被客户直接访问,所以也不是由 USB具体来完成的。一个典型的 HCDI是由支撑各种不同主机控制器的操作系统来定义的。USBD提供 I/O请求包(I/O Request Packets)形式的数据
6、传输,以某一特定通道来传输数据。另外,USBD 为它的客户提供一个容易被支配及配置的抽象的设备。作为这种抽象的一部份,USBD 拥有标准通道(参见第 5 章及第 9 章)对设 备进行一些标准的控制。这标准通道实现了 USBD与抽象设备之间的逻辑通信。(见图 10-2)在有些操作系统中,提供了额外的非 USB系统软件以支持设备的配置及设备驱动程序的加载。在这样的操作系统中,设备驱动程序应使用提供的主机软件接口而不是直接访问 USBDI。客户层描述的是直接与 USB设备进行交互所需要的软件包。当所有的设备都已连上系统时,这些客户就可以直接通设备进行通信。一个客户不能直接访问设备的硬件。该言之,主机
7、可提供如下的功能检测 USB设备的连接与断开。管理主机与设备之间的标准控制流。管理主机与设备之间的数据流。收集状态及一些活动的统计数字。控制主机控制器与 USB设备的电气接口,包括提供有限的能源。在下面的章节中,我们将较细的阐述 USBDI所能提供的功能。对于特定的主机平台与操作系统下的实现接口请参照相关的操作系统手册。所有的集线器都通过状态改变通道报告它的状态的改变,其中包括设备的连上与断开等。 USBD的一类特殊客户即:集线器驱动器拥有这些状态改变通道,接收这些状态的改变。对于像设备连结这种状态改变,集线器驱动器将加载设备的驱动程序。在有些系统中,这种集线器驱动程序是操作系统提供的主机软件
8、的一部份,它用来管理设备。101.2控制机构控 制 信 号 可 通 过 带 内 信 号 ( in-band-singling ) 及 带 外 信 号(out-of-bard-signaling)两种方式在主机与设备之间传输。带内信号将控制信息及数据信息混在一起用同一通道传输,以至于主机根本就没有觉察到。而外带信号是通过单独的通道进行传输。任何一个已连接的设备都有一个标准的信息通道,即标准通道。这个主机与设备之间的逻辑的连接用于传输 USB 的标准控制信息,比如对设备的配置信息等。这些标准通道为 USB的设备提供了标准的接口,它也可以用来进行基于特定 设备而不同的通信,这些通信由拥有所有这些通道
9、的 USBD作媒介。一些特定的设备可能允许使用额外的信息通道来传输特定设备的控制信息。这些额外的信息通道与标准通道使用同样的协议,但是传递的信息是基于特定的设备的,也不是由 USB具体标准化的。USBD 支持和它的客户共享使用标准通道,它还提供给客户与设备相连的其它控制通道的访问。10.1.3 数据流主机控制器在主机与 USB 设备之间传递数据。这些数据被看作连续的字节流。USB支持 4种形式的数据传输控制传输。同步传输。中断传输。块传输。有关于传输方式的额外信息请参见第 5章每个设备具有一到多个界面以用于客户与设备之间的数据传输。每个接口由一到多个在客户及设备端点之间独立传输的通道组成。US
10、BD 根据主机软件的请求来初始化这些通道和接口。当这些配置请求提出后,主机控制器将基于主机软件所提供的参数来提供服务。每个通道基于数据传输模式和请求的有如下几个特性:数据传输的频率。数据是以恒定速率提供还是随机出现的。在数据传输前可延迟的时间。在传输过程中数据的丢失是否是具有灾难性。USB 设备的端口描述了与之相连接的通道的特性。USB 设备端口的特性的具体描述可参照第 9章。10.1.4 收集状态及活动统计数据作为普通的为所有主机与设备之间的控制流与数据流服务的 USB 系统与主机控制器,一直处于随时接收状态变化及活动信息的状态,以使软件能及时接收并处理这些状态的变化。这里并不具体讲述需要被
11、跟踪的状态信息及这些状态信 息的特殊的格式。10.1.5 电气接口因素主机为连在集线器上的 USB设备提供能量。一个集线器口所能提供的能量具体值在第七章有详细说明。10.2 主机控制器功能在所有的实现中,主机控制器都必须提供基本相同的功能。主机控制器对主机及设备来讲都必须满足一定的要求。下面是主机控制器所提供的功能的概况。每种功能在下面的小节中还有具体的说明。1 状态处理(State Handling) 作为主机的一部份,主机控制器报告及管理它的状态。2 串行化与反串行化 对于从主机输出的数据,主机控制器将协议及数据信息从它原始形状转换为字位流。而对于主机接收的数据主机控制器进行反向操作。3
12、帧产生(Frame Generation) 主机控制器以每 1ms 为单位产生 SOF 标志包。4 数据处理 主机控制器处理从主机输入输出数据的请求。5 协议引擎 主机控制器支持 USB具体规定的协议6 传输差错控制 所有的主机控制器在发现和处理已定义的错误时展现相似的行为。 7 远程唤醒 所有的主机控制器都应具有将总线置于挂起状态及在远程唤醒事件下重新启动的能力。8 集线器 集线器提供了标准的将多个 USB设备连到主机控制器的功能。9 主机系统接口 主机控制器在主机系统控制器之间建立一个高速的数据通道。下面的各节将对上面提到的各功能进行详细的讨论。10.2.1 状态处理主机控制器具有一系列
13、USB系统管理的状态。另外,主机控制器为下面两个与 USB有关的部份提供接口。状态改变传播根集线器 根集线器提供与其它 USB 设备一样的标准状态给集线器驱动器。有关 USB状态与其它之间的相互关系的详细讨论请参照第 7章。主机控制器的总的状态与根集线器及总体的 USB密不可分。任何一个对设备来说可见的状态的改变都应反映设备状态的相应改变。从而保证主机控制器与设备之间的状态是一致的。USB设备通过使用恢复信号请求唤醒,使设备回利已配置的状态。主机控制器本身也可以通过同样的方法产生一个恢复事件。主机控制器通过使用该实现系统的某种机制来通知主机的其它部份已产生了一个恢复事件。10.2.2 串行化与
14、反串行化通过物理上的传输是以字位流的形式出现的。不管是作为主机的一部份,还是作为设备的一部份,串行接口引擎(STE)处理 USB传输过程中的串行化与文串行化工作。在主机上,串行接口引擎是主机控制器的一部份。 The basic flow and interrelationships of the USB communications model are shown inFigure 10-1Figure 10-1. Interlayer Communications ModelThe host and the device are divided into the distinct layer
15、s depicted in Figure 10-1.Vertical arrowsindicate the actual communication on the host. The corresponding interfaces on thedevice areimplementation-specific. All communications between the host and device ultimatelyoccur on thephysical USB wire. However, there are logical host-device interfaces betw
16、een eachhorizontal layer.These communications, between client software resident on the host and the functionprovided by thedevice, are typified by a contract based on the needs of the application currently usingthe device and thecapabilities provided by the device.This client-function interaction cr
17、eates the requirements for all of the underlyinglayers and their interfaces.Universal Serial Bus Specification Revision 1.1208 This chapter describes this model from the point of view of the host and its layers.Figure 10-2 describes,based on the overall view introduced in Chapter 5, the hosts view o
18、f itscommunication with the device.Figure 10-2. Host CommunicationsUniversal Serial Bus Specification Revision 1.1209 There is only one host for each USB. The major layers of a host consist of thefollowing:_ USB bus interface_ USB System_ Client.The USB bus interface handles interactions for the ele
19、ctrical and protocol layers (referto Chapter 7 andChapter 8). From the interconnect point of view, a similar USB bus interface isprovided by both the USBdevice and the host, as exemplified by the Serial Interface Engine (SIE). On the host,however, the USBbus interface has additional responsibilities
20、 due to the unique role of the host on theUSB and isimplemented as the Host Controller. The Host Controller has an integrated root hubproviding attachmentpoints to the USB wire.The USB System uses the Host Controller to manage data transfers between the hostand USB devices.The interface between the
21、USB System and the Host Controller is dependent on thehardware definition ofthe Host Controller. The USB System, in concert with the Host Controller, performsthe translationbetween the clients view of data transfers and the USB transactions appearing on thinterconnect. Thisincludes the addition of a
22、ny USB feature support such as protocol wrappers. The USBSystem is alsoresponsible for managing USB resources, such as bandwidth and bus power, so thatclient access to theUSB is possible.The USB System has three basic components:_ Host Controller Driver_ USB Driver_ Host Software.The Host Controller
23、 Driver (HCD) exists to more easily map the various HostController implementationsinto the USB System, such that a client can interact with its device without knowingto which HostController the device is connected. The USB Driver (USBD) provides the basic hostinterface (USBDI) forclients to USB devi
24、ces. The interface between the HCD and the USBD is known asthe Host ControllerDriver Interface (HCDI). This interface is never available directly to clients and thusis not defined by theUSB Specification. A particular HCDI is, however, defined by each operating system that supports variousHost Contr
25、oller implementations.The USBD provides data transfer mechanisms in the form of I/O Request Packets(IRPs), which consist ofa request to transport data across a specific pipe. In addition to providing data transfermechanisms, theUSBD is responsible for presenting to its clients an abstraction of a US
26、B device thatcan be manipulated forconfiguration and state management. As part of this abstraction, the USBD owns thedefault pipe (seeChapter 5 and Chapter 9) through which all USB devices are accessed for thepurposes of standard USBcontrol. This default pipe represents a logical communication betwe
27、en the USBD andthe abstraction of aUSB device as shown in Figure 10-2.In some operating systems, additional non-USB System Software is available thatprovides configurationand loading mechanisms to device drivers. In such operating systems, the devicedriver shall use theprovided interfaces instead of
28、 directly accessing the USBDI mechanisms.The client layer describes all the software entities that are responsible for directlyinteracting with USBdevices. When each device is attached to the system, these clients might interactdirectly with theperipheral hardware. The shared characteristics of the
29、USB place USB SystemSoftware between the clientand its device; that is, a client cannot directly access the devices hardware.Universal Serial Bus Specification Revision 1.1210Overall, the host layers provide the following capabilities:_ Detecting the attachment and removal of USB devices_ Managing U
30、SB standard control flow between the host and USB devices_ Managing data flow between the host and USB devices_ Collecting status and activity statistics_ Controlling the electrical interface between the Host Controller and USB devices,including theprovision of a limited amount of power.The followin
31、g sections describe these responsibilities and the requirements placed onthe USBDI in greaterdetail. The actual interfaces used for a specific combination of host platform andoperating system aredescribed in the appropriate operating system environment guide.All hubs (see Chapter 11) report internal
32、 status changes and their port change statusvia the status change pipe. This includes a notification of when a USB device is attached to or removedfrom one of their ports.A USBD client generically known as the hub driver receives these notifications asowner of the hubsStatus Change pipe. For device
33、attachments, the hub driver then initiates the deviceconfiguration process.In some systems, this hub driver is a part of the host software provided by theoperating system formanaging devices.10.1.2 Control MechanismsControl information may be passed between the host and a USB device using in-bandor
34、out-of-bandsignaling. In-band signaling mixes control information with data in a pipe outside theawareness of thehost. Out-of-band signaling places control information in a separate pipe.There is a message pipe called the default pipe for each attached USB device. Thislogical associationbetween a ho
35、st and a USB device is used for USB standard control flow such asdevice enumeration andconfiguration. The default pipe provides a standard interface to all USB devices. Thedefault pipe mayalso be used for device-specific communications, as mediated by the USBD, whichowns the default pipesof all of t
36、he USB devices.A particular USB device may allow the use of additional message pipes to transferdevice-specific controlinformation. These pipes use the same communications protocol as the default pipe,but the informationtransferred is specific to the USB device and is not standardized by the USBSpec
37、ification.The USBD supports the sharing of the default pipe, which it owns and uses, with itsclients. It alsoprovides access to any other control pipes associated with the device.10.1.3 Data FlowThe Host Controller is responsible for transferring streams of data between the hostand USB devices.These
38、 data transfers are treated as a continuous stream of bytes. The USB supportsfour basic types of datatransfers:_ Control transfers_ Isochronous transfers_ Interrupt transfers_ Bulk transfers.For additional information on transfer types, refer to Chapter 5. Each device presents one or more interfaces
39、 that a client may use to communicatewith the device. Eachinterface is composed of zero or more pipes that individually transfer data betweenthe client and aparticular endpoint on the device. The USBD establishes interfaces and pipes at theexplicit request of theHost Software. The Host Controller pr
40、ovides service based on parameters provided bythe Host Softwarewhen the configuration request is made.Universal Serial Bus Specification Revision 1.1211A pipe has several characteristics based on the delivery requirements of the data to betransferred.Examples of these characteristics include the fol
41、lowing:_ the rate at which data needs to be transferred_ whether data is provided at a steady rate or sporadically_ how long data may be delayed before delivery_ whether the loss of data being transferred is catastrophic.A USB device endpoint describes the characteristics required for a specific pip
42、e.Endpoints are describedas part of a USB devices characterization information. For additional details, refeChapter Collecting Status and Activity StatisticsAs a common communicant for all control and data transfers between the host andUSB devices, the USBSystem and the Host Controller are
43、well-positioned to track status and activityinformation. Suchinformation is provided upon request to the Host Software, allowing that software tomanage status andactivity information. This specification does not identify any specific information thatshould be tracked orrequire any particular format
44、for reporting activity and status information.10.1.5 Electrical Interface ConsiderationsThe host provides power to USB devices attached to the root hub. The amount ofpower provided by a portis specified in Chapter 7.10.2 Host Controller RequirementsIn all implementations, Host Controllers perform th
45、e same basic duties with regard tothe USB and itsattached devices. These basic duties are described below.The Host Controller has requirements from both the host and the USB. The followingis a brief overviewof the functionality provided. Each capability is discussed in detail in subsequentsections.
46、State Handling As a component of the host, the Host Controller reports and managesits states.Serializer/Deserializer For data transmitted from the host, the Host Controllerconvertsprotocol and data information from its native format to a bit streamtransmitted on the USB. For data being received into
47、 the host, thereverse operation is performed.Frame Generation The Host Controller produces SOF tokens at a period of 1ms.Data Processing The Host Controller processes requests for data transmission to andfrom the host.Protocol Engine The Host Controller supports the protocol specified by the USB.Tra
48、nsmission ErrorHandlingAll Host Controllers exhibit the same behavior when detecting andreacting to the defined error categories.Remote Wakeup All host controlers must have the ability to place the bus into theSuspended state and to respond to bus wakeup events.Root Hub The root hub provides standard hub function to link the HostController to one or more USB ports.Universal Serial Bus Specification Revision 1.1212Host System Interface Provides a high-speed data path between the Host Controllerand hostsyst
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 IEC 60335-2-15:2024 EXV EN Household and similar electrical appliances - Safety - Part 2-15: Particular requirements for appliances for heating liquids
- 淮阴师范学院《田径B(2)》2021-2022学年第一学期期末试卷
- 淮阴师范学院《影视特效制作》2021-2022学年第一学期期末试卷
- 淮阴师范学院《小学语文文本解读》2022-2023学年第一学期期末试卷
- 淮阴师范学院《广播电视采访与写作》2022-2023学年第一学期期末试卷
- 淮阴工学院《配送中心规划与设计》2022-2023学年第一学期期末试卷
- 淮阴师范学院《安装工程技术与识图》2022-2023学年第一学期期末试卷
- 淮阴工学院《园艺产品与人体健康》2022-2023学年第一学期期末试卷
- DB6111∕T+217-2024+火龙果保鲜技术规程
- 水利工程中的水土保持与林业经济考核试卷
- 配电室运行维护投标方案(技术标)
- 初中化学试卷讲评课件
- 2024届东北师大附中重庆一中等六校化学高一第一学期期中检测试题含解析
- (完整版)医疗器械网络交易服务第三方平台质量管理文件
- 13G322-1~4《钢筋混凝土过梁(2013年合订本)》
- 关于幼儿园小班反邪教安全教案
- 某单位物业服务项目投标方案
- 35KV场内集电线路工程强条执行检查表
- 【多旋翼无人机的组装与调试5600字(论文)】
- 减速机知识及维修课件
- 内部项目跟投协议书(正)
评论
0/150
提交评论