Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
26
Добавлен:
16.04.2013
Размер:
2.02 Mб
Скачать

Universal Serial Bus Specification Revision 1.1

5.9.3 Calculating Bus Transaction Times

When the USB System Software allows a new pipe to be created for the bus, it must calculate how much bus time is required for a given transaction. That bus time is based on the maximum packet size information reported for an endpoint, the protocol overhead for the specific transaction type request, the overhead due to signaling imposed bit stuffing, inter-packet timings required by the protocol, inter-transaction timings, etc. These calculations are required to ensure that the time available in a frame is not exceeded. The equations used to determine transaction bus time are:

KEY:

Data_bc

The byte count of data payload

Host_Delay

The time required for the host to prepare for or

 

recover from the transmission; Host Controller

 

implementation-specific

Floor()

The integer portion of argument

Hub_LS_Setup

The time provided by the Host Controller for hubs to

 

enable low-speed ports; measured as the delay from the

 

end of the PRE PID to the start of the low-speed SYNC;

 

minimum of four full-speed bit times

BitStuffTime

Function that calculates theoretical additional time

 

required due to bit stuffing in signaling; worst case

 

is (1.1667*8*Data_bc)

Full-speed (Input)

Non-Isochronous Transfer (Handshake Included)

= 9107 + (83.54 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

Isochronous Transfer (No Handshake)

= 7268 + (83.54 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

Full-speed (Output)

Non-Isochronous Transfer (Handshake Included)

= 9107 + (83.54 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

Isochronous Transfer (No Handshake)

= 6265 + (83.54 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

Low-speed (Input)

= 64060 + (2 * Hub_LS_Setup) +

(676.67 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

Low-speed (Output)

= 64107 + (2 * Hub_LS_Setup) +

(667.0 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay

The bus times in the above equations are in nanoseconds and take into account propagation delays due to the distance the device is from the host. These are typical equations that can be used to calculate bus time; however, different implementations may choose to use coarser approximations of these times.

The actual bus time taken for a given transaction will almost always be less than that calculated because bit stuffing overhead is data-dependent. Worst case bit stuffing is calculated as 1.1667 (7/6) times the raw time (i.e., the BitStuffTime function multiplies the Data_bc by 8*1.1667 in the equations). This means that there will almost always be time unused on the bus (subject to data pattern specifics) after all regularly

54

Тут вы можете оставить комментарий к выбранному абзацу или сообщить об ошибке.

Оставленные комментарии видны всем.

Соседние файлы в папке usb 1.1