USB: Data Flow Sukesh Shenoy. USB implementation areas.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Computer Architecture
System Integration and Performance
INPUT-OUTPUT ORGANIZATION
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
What is a network? A network consists of two or more computers that are linked in order to share resources (such as printers and CD-ROMs) , exchange.
Protocol Layer Bottom-up view of the USB protocol Bottom-up view of the USB protocol –Byte/Bit Ordering –SYNC Field –Packet Field Formats PID Field PID.
Universal Serial Bus Grant Heileman. The History of USB In 1994 a collaborative effort to design a standard for peripheral devices was made between Compaq,
CCNA – Network Fundamentals
Intermediate TCP/IP TCP Operation.
The 8085 Microprocessor Architecture
Chapter 7 – Transport Layer Protocols
Chapter 2 Network Models.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
1 USB 2.0 Specification  General Description  From where we could begin the work  What would be valid to do?  Main doubts  What is OTG (On the Go)
1 USB 2.0 Specification  General Description  What is OTG (On the Go)  From where we could begin the work  What would be valid to do?
Basic Input/Output Operations
USB – An Overview Group 3 Kaushik Nandha Bikram What is the Universal Serial bus (USB)? Is a cable bus that supports data exchange between a host computer.
Input-Output Problems L1 Prof. Sin-Min Lee Department of Mathematics and Computer Science.
Anush Rengarajan Feng Zheng Thomas Madaelil
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
USB 2.0 INTRODUCTION NTUT CSIE 學 生:許家豪 指導教授:柯開維教授.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Introduction to USB. 2 Agenda Introduction to USB LPC23xx Block diagram MCB2300 demo.
The OSI Model A layered framework for the design of network systems that allows communication across all types of computer systems regardless of their.
USB: UNIVERSAL SERIAL BUS Joe Kaewbaidhoon Alex Motalleb Vishal Joshi Prepared for EECS 373 University of Michigan, Ann Arbor 1.
Computer communication. Introduction Mechanisms applied in communicating between a computer and another computer or with other devices. Mainly serial.
Gursharan Singh Tatla Transport Layer 16-May
Serial Interfaces. Bit serial bus New generation of busses Uses bit-serial, differential drive technology Uses on-line device drivers (Hot-plug technology)
Hardware Interface Design Patterns Ahmet Selman Bozkır – Hacettepe Univ.
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
Process-to-Process Delivery:
Embedded Systems Architecture Class Project USB 2.0 Function Controller December 12, 2008 Brandon Wolfe, Ben Marrou, Daniel Chan.
Peripheral Busses COMP Jamie Curtis. PC Busses ISA is the first generation bus 8 bit on IBM XT 16 bit on 286 or above (16MB/s) Extended through.
Introduction to USB Development. USB Development Introduction Technical Overview USB in Embedded Systems Recent Developments Extensions to USB USB as.
Introduction to USB © 2010 Renesas Electronics America Inc. All rights reserved.
CSC 311 IEEE STANDARD ETHERNET Common Bus topology Uses CSMA/CD Named after “ether”, the imaginary substance many once believed occupied all of space.
ECE 371 – UNIT 20 Universal Serial Bus (USB). References 1. Universal Serial Bus Specification, Revision 2.0. This specification is available on the World.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
USB 2.0 Spec. Chapter4 Architectural Overview Chapter5 USB Data Flow Model.
Microprocessor-based Systems
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
1 Version 3.0 Module 11 TCP Application and Transport.
The OSI Model.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
University of the Western Cape Chapter 12: The Transport Layer.
BR 6/001 Universal Serial Bus Universal Serial Bus is a new synchronous serial protocol for low to medium speed data transmission Full speed signaling.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Kyung Hee University Chapter 2 Network Models. 2 Kyung Hee University 2.1 LAYERED TASKS We use the concept of layers in our daily life. As an example,
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
1 Presented By: Eyal Enav and Tal Rath Eyal Enav and Tal Rath Supervisor: Mike Sumszyk Mike Sumszyk.
By Fernan Naderzad.  Today we’ll go over: Von Neumann Architecture, Hardware and Software Approaches, Computer Functions, Interrupts, and Buses.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Data Communication Network Models
USB Universal Serial Bus. University of Tehran 2.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
USB PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER
USB Universal Serial Bus
Universal Serial Bus Specification 1.0
NS Training Hardware.
USB- Universal Serial Bus
Transport Layer Unit 5.
USB : Universal Serial Bus
Process-to-Process Delivery:
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

USB: Data Flow Sukesh Shenoy

USB implementation areas

USB Communication Concepts Bus Topology Communication Flow Models Bus Access Management Special Consideration for Isochronous Transfers

Bus Topology There are four main parts to USB Bus topology Host and Devices Physical Topology Logical Topology Client Software-to-function Relationships

Physical Topology USB elements connected via a tiered star topology. Connections are provided by special USB devices known as hubs. Hub provides attachment points knows as ports.

Logical Topology. The host communicates with each logical device as if it were directly connected to the root port.

Client Software-to-function Relationships Client software for USB functions must use USB software programming interfaces to manipulate their functions Client software should be independent of other devices that may be connected to the USB.

USB Communication Flow The USB provides a communication service between software on the host and its USB function. Software on the host communicates with a logical device via a set of communication flows. Communication flows are carried over pipes between endpoints and host side memory buffers.

Device End points Terminus of a communication flow Each USB device consists of a set of independent device end points. Each end point is identified by an end point number. Each end point has a device determined direction of data flow. Combination of end point number and direction allow an end point on a device to be uniquely referenced. An end point determines the transfer type between the client software and the end point End point zero requirements This requirement needs to be satisfied for the USB system software to initialize and generically manipulate the logical device The endpoints with endpoint number zero are always accessible once a device is attached, powered, and has received a bus reset. Non-End point zero requirements These end points cannot be used until the device is configured.

Pipes A USB pipe is an association between an endpoint on a device and software on the host Pipes represent the ability to move data between software on the host via a memory buffer and an endpoint on a device. There are two mutually exclusive pipe communication modes: Stream: Data moving through a pipe has no USB-defined structure. Data flows in at one end of a stream pipe and out the other end in the same order. Stream pipes are always unidirectional in their communication flow. Support bulk, isochronous and interrupt transfer types. Message: Data moving through a pipe has some USB-defined structure. Message pipes allow communication flow in both directions, although the communication flow may be predominately one way. Support control transfer type.

Transfer Types Control Transfers IsochronousTransfersInterruptTransfers Bulk Transfers Devices support configuration/com mand/status type communication flows Support those devices t ypes that require data a t a constant rate support those devices types that send/receive data infrequently support devices that ne ed to communicate rela tively large amounts of data Transfer data format USB defined structure No imposed data structure structure structure TransferdirectionBidirectional communication flow over m essage pipes Unidirectional communication flow ove r stream pipes Unidirectional Unidirectional Transfer packet size constraints Full speed devices 8,16,32 or 64 bytes High speed devices 64 bytes Low speed devices 8 bytes Full speed devices 1023 bytes High speed devices 1024 bytes Full speed devices 64 bytes High speed devices 1024 bytes Low speed devices 8 bytes Full speed devices 8,16,32, or 64 bytes High speed devices 512 bytes Bus access constraints can be used by high speed, full speed and low speed USB devices can be used by high speed, full speed USB devices can be used by high speed, full speed and low speed USB devices can be used by high speed, full speed USB devices Data sequence Setup bus transaction Data transaction Status transaction No retransmission of da ta allowed in case of err ors. No handshakes allowed. Use data toggle bits tha t are toggled only upon successful completion. Retransmission of data allowed. Use data toggle bits tha t are toggled only upon successful completion. Retransmission of data allowed.

Bus Access for Transfers. Data transfer between the host and a USB device requires some use of the USB bandwidth. The process of assigning bus bandwidth to devices is called transfer management. The key concepts related to bus access: 1. Transfer Management 2. Transaction Tracking 3. Bus Time 4. Device/Software Buffer Size 5. Bus Bandwidth Reclamation

Transfer management Transfer management involves several entities that operate on different objects in order to move transactions over the bus: Client Software: Consumes/generates function-specific data to/from a function endpoint via calls and callbacks requesting IRP with the USBD interface. USB Driver (USBD): Converts data in client IRP to/from device endpoint via calls/callbacks with the appropriate HCD. Host Controller Driver (HCD): Converts IRP to/from transactions (as required by a Host Controller implementation) and organizes them for manipulation by the Host Controller. Host Controller: Takes transactions and generates bus activity via packets to move function-specific data across the bus for each transaction. Transfer Tracking Host controller has access to the transaction list (stores information regarding pending transactions). Host controller also provides information regarding status of each transaction (done, pending, halted, etc) The Host Controller uses some implementation-dependent representation to track what packets to transfer to/from what endpoints at what time or in what order.

Calculating bus transaction times USB system software needs to calculate the bus time required for each transaction. Bus time is based on the maximum packet size; dependent on the transfer type Calculating buffer sizes in functions and software Client software and functions both need to provide buffer space for pending data tran sactions awaiting their turn on the bus. If more than one transaction request is pending for a given endpoint, the buffering fo r each transaction must be supplied. Bus bandwidth reclamation Bus transmission time is dependent on the transfer types. Bus transmission time is a calculated constant. However in actual scenario during each transaction there will be some bus time remaining. Therefore to use bandwidth efficiently, transfer types such as contro l and bulk maybe used. This is called bus bandwidth reclamation.

Special considerations for isochronous transfers Transmitter and receiver must be time and data synchronized to deliver data correctly. Time in USB is represented by three clocks: Sample Clock: This clock determines the natural data rate of samples moving betwee n client software on the host and the function. Bus Clock: 1 kHz frequency on full-speed segments and 8 kHz frequency on high speed segments of the bus and is indicated by the rate of SOF packets on the bus. Service Clock: This clock is determined by the rate at which client software runs to service IRP that may have accumulated between executions. Synchronization of the above mentioned clocks is necessary for correct data delivery. If transmission errors occur then the receiver reports the errors to the function and a ppropriate corrective measures are taken.