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

Chapter 6: LS/FS Transfer Types & Scheduling

Adaptive Source and Asynchronous Sink. Feedback from the asyn-

chronous sink can be used by the adaptive source to adjust its data rate to that required by the sink. This only occurs if the range of data rates supported by the adaptive source encompasses the data rate required by the sink. If not, application software is the party responsible for managing the synchronous connection.

Adaptive Source and Synchronous Sink. The synchronous sink is

locked to the SOF timing and the adaptive source has the ability to deliver information at a data rate that is locked to the SOF timing. Note that the adaptive source expects feedback to tell it which data rate it should be using. However, the synchronous sink does not provide feedback. In this case software must provide feedback to the adaptive source to direct it to send data at a rate that is locked to SOF timing.

Adaptive Source and Adaptive Sink. In this case, software can provide

feedback to the adaptive source, directing it to deliver data at a rate supported by the adaptive sink.

How Endpoints Report Their Synchronization Capabilities

Software must understand the synchronization type for an endpoint and whether it uses implicit or explicit feedback or feed forwarding for its synchronization method. Each isochronous endpoint defines its synchronization method in the endpoint descriptor. Table 6-4 on page 132 illustrates the attribute field within the endpoint descriptor that defines the synchronization type. Note that the synchronization values are valid only when the endpoint is defined as isochronous.

Feedback Data

An adaptive source and an asynchronous sink must use the feedback method of synchronization in order to establish a synchronous connection. This is the only combination of source and sink that successfully uses the feedback method.

Feedback data is expressed as a value Ff that represents the number of samples per frame that is being transferred at the source frequency (Fs). The value Ff is specified as an integer value that represents the number of samples per frame, and as a fraction that specifies the portion of a sample needed to match the source frequency within 1Hz. The fraction comes from averaging the data rate over a long period of time (e.g., 1 second). Over the averaging period the fractional portion of Ff will result in extra bytes being transferred during some frames.

131

USB System Architecture

Table 6-4: Endpoint Descriptor Definition

Offset

Field

Size

Value

 

Description

 

 

 

 

 

 

 

 

 

 

3

Attributes

1

BitMap

This field describes the endpoint’s

 

 

 

 

attributes when it is configured using the

 

 

 

 

configuration value.

 

 

 

 

Bits 0:1

Transfer Type

 

 

 

 

00

Control

 

 

 

 

01

Isochronous

 

 

 

 

10

Bulk

 

 

 

 

11

Interrupt

 

 

 

 

Bits 3:2

Synchronization Type

 

 

 

 

00

No Synchronization

 

 

 

 

01

Asynchronous

 

 

 

 

10

Adaptive

 

 

 

 

11

Synchronous

 

 

 

 

Bits 5:4

Usage Type

 

 

 

 

00

Data endpoint

 

 

 

 

01

Feedback endpoint

 

 

 

 

10

Implicit feedback data

 

 

 

 

 

EP

 

 

 

 

11

Reserved

 

 

 

 

Bits 7:6 Reserved (must be zero)

 

 

 

 

 

 

The integer and fraction that represents the number of source samples that occur during a given frame is expressed in a 24-bit (3 byte) value. Figure 6-6 on page 133 depicts the format of these three bytes. The values specified are based on 1 byte samples. The values are defined as:

Bits 23:14 — this 10-bit value gives the number of samples that can be sent in a single frame at the desired source frequency. (10 bits are used to support a maximum packet size of 1023 bytes, assuming 1 byte/sample).

Bits 13:4 — this 10-bit value gives a fraction of a sample that represents the exact amount of data per frame that will be transferred at the desired source clock frequency. This value must be 10-bits to resolve the sampling frequency to 1 Hz within the 1 KHz frame clock frequency.

Bits 3:0 are reserved.

132

Chapter 6: LS/FS Transfer Types & Scheduling

Figure 6-6: Format of Feedback Data for Full-Speed Devices

 

 

 

 

 

 

 

 

 

 

 

,QWHJHU YDOXH

 

)UDFWLRQDO YDOXH

 

#08

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 6-7 on page 133 illustrates the data format that would be used by highspeed devices at the 125 s microframe intervals. For high-speed devices, the integer and fraction that represent the number of source samples that occur during a given microframe require four bytes. The values specified are based on 1 byte samples, and are defined as follows:

Bits 28:17 — this 12-bit value gives the number of samples that can be sent in a single microframe at the desired source frequency (12 bits are used to support a maximum high-speed packet size of 3072 bytes, assuming 1 byte/ sample).

Bits 16:4 — this 13-bit value gives the fraction of a sample that represents the exact amount of data per microframe that will be transferred at the desired source clock frequency. This value must be 13-bits to resolve the sampling frequency to 1Hz within an 8KHz microframe clock frequency.

Bits 3:0 are reserved.

Figure 6-7: Format of Feedback Data for High-Speed Device

 

,QWHJHU YD

)UDFWLRQDO YD

O

5HV

 

 

5HV

 

 

 

 

The sink must provide sufficient buffering to accommodate any overor underruns that occur due to clock drift, jitter, etc. In this case, the sink should adjust to correct the over-run or under-run condition.

133

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