Universal Serial Bus Motivation



Download 205.96 Kb.
Page1/5
Date23.04.2018
Size205.96 Kb.
#46015
  1   2   3   4   5

Universal Serial Bus

Motivation


Emerged as result of difficulties associated with

Cost configuration attachment

Peripheral devices to personal computer

Creates method of attaching and accessing devices

Reduces cost

Simplifies attachment and configuration

From end user perspective

Solves several technical issues

Associated with old style peripherals

I/O Legacy


Peripherals typically

Mapped into CPU’s I/O address space

Assigned specific IRQ line

Some cases DMA channel

Such scheme consumes many I/O resources

Interrupts


Most critical issue centered around

Allocation of interrupts

Exacerbated on ISA bus based devices

Do not reliably support sharable interrupts

Shortage of interrupts had become major problem

I/O Addresses


I/O address conflicts

Quite common in PC environment



Attachment


No hot attachment of peripherals

Consider booting without a mouse attached

Most peripheral devices not usable without rebooting system

System software must

Detect device

Load necessary drivers



Cost


Cost of implementing I/O systems based upon legacy technology

Fairly high

Cables

Associated connectors



Potential need for expansion cards

New Solution

Goals


Should overcome existing shortcomings

Provide room for growth and expansion



Needs


Single connector type

Ability to attach many peripherals to same connector

Method to ease resource conflicts

Automatic detection and configuration of peripheral devices

Low cost for system and peripheral implementers

Enhanced performance capability

Support for attaching new peripherals

Support for legacy software and hardware

Low power implementation - support for green systems

USB Approach


I/O resource limitations no longer exist

Each device residing on USB is assigned an address known only to USB subsystem

Does not consume any system resources

USB supports up to 127 addresses

Does pose limitation on number of addresses in single installation

Each USB device supports number of ports called endpoints

Can be accessed indirectly

Overview


Typical system

USB host controller

Resides on PCI bus

Fetches transaction list that describes USB transactions

Scheduled by system

For delivery over USB

Executes transaction list by performing each transaction in list
All USB transactions initiated by USB software

Typically originate in USB device driver

That wishes to communicate with its associated device
USB driver provides interface between

USB device driver - on peripheral device

USB host controller - typically in PC
Software is responsible for translating

Client requests

Into transactions

Directed to or from target USB device



Primary Components

Hardware

Host controller / Root Hub

Hubs


Devices
Software

USB Device drivers

USB Driver



Controller Driver




USB Device Drivers - Host Side - Client Software


These are the client drivers

Located on host side

Top box
They issue requests to USB driver

Second box

Use IRP - Interrupt Request Packets

Initiate transfer to or from target USB device


Example

USB keyboard driver

Must initiate interrupt transfer

Establishing an IRP

Supplying memory buffer into which data will be transferred

By USB keyboard


Note: Client driver has no knowledge of USB serial transfer mechanisms

All transactions transpire through lower level software packages

Exactly what we want

USB Driver - Host Side - Client Driver


Second box

USB system software


USB driver knows

Characteristics of USB target device

How to communicate with device via USB
USB Characteristics

Detected by driver when it parses device descriptors

Done during device configuration

At power up

When new device added to system
Examples

Amount of bandwidth necessary during transfer of each frame

Service only during nth frame
When IRP received by USB client driver - on host side

USB driver organizes request into individual transactions

Executed during series of 1 ms frames

Driver sets up transactions based upon knowledge of

USB device requirements

Needs of client driver

Limitations / capabilities of USB
USB driver may be

Shipped with operating system

Added as extension via loadable device driver

USB Host Controller Driver - Host Side - Client Driver


Second box

USB system software


Host Controller Driver - HCD

Schedules transactions

To be broadcast over USB
Scheduled by host controller driver

Building series of transaction lists

Each list

Consists of pending transactions

Targeted for one or more USB devices attached to bus

Arise from various USB device drivers


Transaction lists executed at 1 ms intervals
Transaction or frame list

Defines sequence of transactions to be performed

During each 1 ms frame
Note - Single block transfer requested by USB client

May be performed as series of transactions

Scheduled during consecutive 1 ms frames
USB host controller

Initiates transactions via root hub or hubs

Each 1 ms frame begins with a start of frame - SOF - transaction

Followed by serial transmission of all frames in current list



USB Host Controller / Root Hub


All communication on USB

Originates at host under software control

Have basic tree type architecture
Host hardware consists of


  • USB host controller

Initiates transactions over USB

  • Root hub

Provides attachment points or ports

For USB devices


Two USB host controller designs have been developed

Open host controller

Universal host controller
Each performs same basic job

Implemented in slightly different ways



The Host Controller


In either case host controller responsible for generating transactions

Scheduled by host software


Host controller driver -HCD

Builds linked list of data structures - called transfer descriptors

List defines transactions scheduled to be performed

During given frame


Data structures contain all information host controller needs

To generate transactions



  • USB device address

  • Type of transfer

  • Direction of transfer

  • Address of device driver’s memory buffer - remember 472



Writes

Performs writes to target device

  • By reading data to be delivered

From memory buffer

Buffer supplied by individual USB device driver - top box



  • Perform parallel to serial conversion

  • Create USB transaction

  • Forward to root hub for transmission on bus



Reads

Performs reads from target device

  • By building read transaction

  • Send to root hub

Hub transmits read transaction over USB
Target device

  • Recognizes

That it’s being addressed

Data is being requested




  • Device transmits data back to root hub

Root hub forwards data to host controller
Host controller

  • Performs serial to parallel conversion

  • Transfers data to device driver’s memory buffer

Buffer supplied by individual USB device driver - top box

Root Hub


Transactions generated by host controller

Forwarded to root hub

To be transmitted to USB

Consequently every USB transaction



Originates at root hub
Root Hub

  • Provides connection points

For USB devices

  • Performs following key operations

  • Controls power to USB ports

  • Enables and disables ports

  • Recognizes devices attached to ports

  • Sets and reports status events

Associated with each port
Consists of hub controller and repeater

  • Hub controller responds to accesses made to hub itself

  • Repeater forwards transactions to and from USB and host controller





USB Hubs


In addition to root hub

USB supports additional hubs

Permit extension of USB system

Provide means for attaching one or more USB ports

Additional peripheral devices
USB hubs integrated into devices such as keyboards

Called compound devices

Can also be implemented as stand alone devices
Hubs may be bus or self powered

Bus powered hubs limited in amount of power available


Hubs contain two major functional elements

  • Hub controller

  • Repeater

Hubs must recognize

That device has been attached or detached

Report event when host software polls hub






Hub Controller

Contains

USB interface

Descriptors needed to identify device as a hub

Hub controller gathers

Hub and port status information

Detect connection and removal of devices

Other status info as well

Receives commands from host software

Control various aspects of hubs operation

Powering


Enabling ports

Etc.


Hub Repeater

Traffic arriving at hub

Must be forwarded

Upstream - towards host

Downstream - away from host


Transmissions originating at host arrive on hub’s root port

Forwarded to all enabled ports


When target device responds to host initiated transaction

Repeater must transmit response upstream



USB Devices - On Client Side

Device descriptors


USB devices contain descriptors

Specify devices attributes and characteristics

Information specifies to host software

Variety of features and capabilities needed to

Configure device

Locate USB client software driver

USB device driver may also use device descriptors

To determine additional information

Needed to access device in proper fashion
Mechanism referred to as Device Framework

Must be understood by software to

Configure and access device correctly

USB Devices

High-Speed Devices

High speed devices

See all transactions broadcast over USB

Can be implemented as full feature devices

Accept and send serial data at maximum rate of 12 Mbyte / sec



Low-Speed Devices

Limited in

Throughput - 1.5 Mbyte / sec

Feature support

See only transactions that follow preamble packet


Low speed ports remain disabled during full speed transactions
Full speed bus traffic

Prevented from being sent over low-speed cables


Preamble packets

Specify following transaction will be broadcast at low speed

Hubs enable low-speed ports

After detecting preamble packet

Low-speed devices now accept low-speed bus activity



Download 205.96 Kb.

Share with your friends:
  1   2   3   4   5




The database is protected by copyright ©ininet.org 2024
send message

    Main page