当pc一接上电源时.ppt_第1页
当pc一接上电源时.ppt_第2页
当pc一接上电源时.ppt_第3页
当pc一接上电源时.ppt_第4页
当pc一接上电源时.ppt_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Universal Serial Bus System Architecture (1),overview,The big picture overview,USB Bus Topology,USB Host There is only one host in any USB system. The USB interface to the host computer system is referred to as the Host Controller. A root hub is integrated within the host system to provide one or mo

2、re attachment points. USB Devices USB devices are one of the following: Hubs, which provide additional attachment points to the USB Functions, which provide capabilities to the system, such as an ISDN connection, a digital joystick, or speakers.,USB electrical,USB bus protocol,The USB is a polled bu

3、s. The Host Controller initiates all data transfers. All bus transactions involve the transmission of up to three packets. Token packet Each transaction begins when the Host Controller, on a scheduled basis, sends a USB token packet describing the type and direction of transaction, the USB device ad

4、dress, and endpoint number. Data packet The USB device that is addressed selects itself by decoding the appropriate address fields. In a given transaction, data is transferred either from the host to a device or from a device to the host. The direction of data transfer is specified in the token pack

5、et. The source of the transaction then sends a data packet or indicates it has no data to transfer. Handshake packet The destination, in general, responds with a handshake packet indicating whether the transfer was successful.,USB pipe,The USB data transfer model between a source or destination on t

6、he host and an endpoint on a device is referred to as a pipe. stream pipe Message pipe Pipes have associations of data bandwidth, transfer service type, and endpoint characteristics like directionality and buffer sizes. Most pipes come into existence when a USB device is configured. One message pipe

7、, the Default Control Pipe, always exists once a device is powered, in order to provide access to the devices configuration, status, and control information. The transaction schedule allows flow control for some stream pipes. At the hardware level, this prevents buffers from underrun or overrun situ

8、ations by using a NAK handshake to throttle the data rate. When NAKed, a transaction is retried when bus time is available.,Plug and play,當pc一接上電源時, 所有利用usb所連接的裝置與集線器都預設為位址0 接著pc就向usb查詢, 若發現第一個device其位址為0, 則assign 一個新位址給他, 然後再向下尋找第二個位址為0的裝置或集線器 最多可連接127個devices 在配給新位址的同時, pc亦為每個device或hub載入其驅動程式 若有一

9、新的裝置被接上時, 其預設為位址0, pc就會確認並載入其相對應的驅動程式, 並分配一個尚未使用的位址給它 一旦某個device突然被拔取後, pc可經由D+或D-的電壓變化測到裝置被移除掉, 就將其位址收回並列入可使用的位址名單中. 每個device (function)有4-bit endpoint address (為register或memory位址) , 可當輸入或輸出 port 所以在一個單獨的小管線(pipe)內最多可再分割成16組的微管線(micro-pipe), 也就是可對16個輸出/入的端點(共32個端點endpoint)定址 位址0 的in, out是給開機時之初始控制傳

10、輸用, 真正可用的endpoint number為15, 即30個endpoint,Data flow types,The USB architecture comprehends four basic types of data transfers: Control Transfers Used to configure a device at attach time and can be used for other device-specific purposes, including control of other pipes on the device. Bulk Data Tra

11、nsfers (ex: printer or scanner) 用於傳輸大量資料,這種資料是非週期性或是無傳輸速度限制,例如:USB印表機,較不即時的資料傳輸並不會導致列印工作資料的流失或損毀. Interrupt Data Transfers (polling, ex: mouse or keyboard) 用於傳統個人電腦中被認為是靠中斷驅動的裝置。因為USB不支援硬體中斷,那些必須靠中斷驅動的USB裝置必須被週期性的POLLING,以得知是否有資料需要傳送。例如:在傳統個人電腦系統中,每當鍵盤上有一個鍵被壓下,鍵盤會發出一個硬體中斷以通知處理器去執行一段軟體斷程序,以便服務鍵盤。如果是U

12、SB鍵盤,它將週期性的被詣問以便決定有是否有資料要傳送。詢問的週期當然是很重要(它的頻率必須足夠以免資料移失,但也不能太高以免佔用太多匯流排頻寬。 Isochronous Data Transfers 需要固定之傳送速率應用, 使用這種傳應用必須確保發送端與接收端的速率是相互吻合的。例如:USB麥克風與喇叭即是用此種傳輸。,USB Implementation Areas,USB bus interface layer provides physical/signaling/packet connectivity between the host and a device. USB Devic

13、e Layer is the view the USB System Software has forperforming generic USB operations with a device. Function Layer provides additional capabilities to the host via an appropriate matched client software layer.,USB Host,The hosts logical composition is USB Host Controller Aggregate USB System Softwar

14、e (USB Driver, Host Controller Driver, and host software) Client.,USB Devices,A USB physical devices logical composition is USB bus interface USB logical device Function.,Physical Bus Topology,USB attachment points are provided by a special class of USB device known as a hub. The additional attachme

15、nt points provided by a hub are called ports. A host includes an embedded hub called the root hub. USB devices that provide additional functionality to the host are known as functions. When multiple functions are combined with a hub in a single package, they are referred to as a compound device.,Log

16、ical Bus Topology,USB Communication Flow,USB Communication Model,與一般其它匯流排上的裝置不同, USB並不宜接消耗系統資源 USB裝置並不被對映到記憶體或I/O位址空間, 也不會佔用IRQ或DMA channel 所用transaction皆由host啟動,Transfer Management,Transfer Management,Client Software: Consumes/generates function-specific data to/from a function endpoint via calls a

17、nd callbacks requesting IRPs with the USBD interface. A software client normally requests data transfers via I/O Request Packets (IRPs) to a pipe and then either waits or is notified when they are completed. USB Driver (USBD): Converts data in client IRPs to/from device endpoint via calls/callbacks

18、with the appropriate HCD. A single client IRP may involve one or more transfers. Host Controller Driver (HCD): Converts IRPs to/from transactions (as required by a Host Controller implementation) and organizes them for manipulation by the Host Controller. Interactions between the HCD and its hardware is implementation-dependent and is outside the scope of the USB Specification. Host Controller: Takes transactions and generates bus activity via packets to move function-specific data across the bus for each transaction.,Transaction Tracking,當一個cl

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论