Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
172
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

Appendix D:

Open Host

Controller

Overview

The Open Host Controller (OHC) and the Open Host Controller Driver (OHCD) are responsible for scheduling and executing IRPs forwarded from the USB driver. The OHC also integrates the root hub function that is compliant with the USB hub definition. The root hub integrated into the OHC has two USB ports. The following sections describe the mechanisms used by the OHC and OHCD to schedule and generate transactions via the USB.

Open Host Controller Transfer Scheduling

Figure D-1 on page 478 illustrates the sequence of transfers performed by the Open Host Controller. Note that a reservation can be made at the beginning of the frame (for non-periodic transfers) to support the 10% bandwidth guarantee for control transfers and to ensure that some non-periodic transfers (control and bulk) get performed during each frame. Next, the periodic transfers (interrupt and isochronous) are performed and can take up to 90% of the bus bandwidth; if time remains, then additional non-periodic transfers can be scheduled.

The OHCD schedules transactions by building a series of transfer descriptors that are linked to form the collection of transactions to be performed during a given frame. This is known as the frame list and is located in system memory.

477

USB System Architecture

Figure D-1: USB Transfer Scheduling

1.0 ms

SOF

Non

Periodic (Isochronous & Interrupt)

 

Non

Periodic

 

Periodic

 

 

 

The Open Host Controller Transfer Mechanism

Figure D-2 on page 479 illustrates the mechanism used to generate transactions during each consecutive frame. The OHCD builds descriptors and places them into an area of memory called the host controller communications area (HCCA). These descriptors include Endpoint Descriptors (EDs) and Transfer Descriptors (TDs). The OHCD assigns an ED to each endpoint in the system. The ED contains the address and endpoint number, thus providing information the controller needs to communicate with the endpoint. Each ED is represented as a circle in Figure D-2. A queue of TDs is linked to each ED that represents the transactions that are pending completion for that endpoint.

EDs of a giver transfer type are linked together and pointed to by a register within the controller. Notice that there is a register that points to each of the non-periodic transfer types (control EDs and bulk EDs), and a separate register (HCCA register) that points to the linked list of periodic transfers (interrupt and isochronous) that points to one of 32 entries points for processing interrupts and isochronous transfers.

478

Appendix D: Open Host Controller

 

Figure D-2: The Transfer Scheduling Mechanism

 

Operational

 

 

 

 

 

Registers

 

 

 

 

 

mode

 

 

Host Controller Communications Area

HCCA

 

 

Interrupt 0

 

 

Status

 

 

Interrupt 1

 

 

Event

 

 

Interrupt 2

 

 

Frame Int

 

 

Interrupt 3

 

 

Ratio

 

 

Interrupt 4

 

 

Control

 

 

Interrupt 5

 

 

Bulk

 

 

Interrupt 6

 

 

 

 

Control

Interrupt 7

 

 

 

 

 

 

 

 

Bulk

Transfer

Interrupt 8

 

 

 

Descriptors

 

 

 

Transfer

 

 

 

 

 

Descriptors

 

Interrupt 9

 

 

 

 

 

 

 

Isochronours

 

 

 

Interrupt 10

 

Transfer

 

 

 

 

 

Descriptors

 

 

 

Interrupt 11

 

 

 

 

 

Interrupt 12

 

 

 

 

 

Interrupt 13

Interrupt

 

 

 

 

Transfer

 

 

 

 

....

 

 

 

 

Descriptors

 

 

 

 

 

 

 

 

 

Interrupt 31

 

 

 

 

 

....

 

 

 

 

 

Done

 

 

Device Registers

 

 

 

Done Queue

 

 

 

 

 

 

Mapped into

Shared Memory

 

 

 

Memory Space

Space in RAM

 

 

 

The OHC traverses the ED list in the order that is illustrated in Figure D-1. The controller begins by accessing the control and bulk descriptors where it left off at the end of the previous transfer. After a predetermined interval that is programmed into the controller, it discontinues non-periodic transfers and pro-

479

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]