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.

Slides:



Advertisements
Similar presentations
May 9, High Speed Protocol Additions John Garney USB2.0 Hub Working Group Chair Intel Corporation John Garney USB2.0 Hub Working Group Chair Intel.
Advertisements

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,
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
May 17, USB 2.0 Hub Details John Garney Hub Working Group Chair Intel Corporation John Garney Hub Working Group Chair Intel Corporation.
May 16, Data Transfer & Framework John Garney Hub Working Group Chair Intel Corporation John Garney Hub Working Group Chair Intel Corporation.
USB: Data Flow Sukesh Shenoy. USB implementation areas.
D Channel Data Link Protocol Link access procedure on the D channel - LAPD.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
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)
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
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?
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
Anush Rengarajan Feng Zheng Thomas Madaelil
USB 2.0 INTRODUCTION NTUT CSIE 學 生:許家豪 指導教授:柯開維教授.
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
Universal Serial Bus Host Specification and Implementation
May 16, USB 2.0 Hub Additions John Garney Hub Working Group Chair Intel Corporation John Garney Hub Working Group Chair Intel Corporation.
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
May 9, USB 2.0 High Bandwidth Peripheral Design Challenges Robert Shaw Cypress Semiconductor Robert Shaw Cypress Semiconductor
October 10, USB 2.0 Hub Testing Dan Froelich Intel.
Introduction to USB © 2010 Renesas Electronics America Inc. All rights reserved.
USB Link Layer Protocol
October 10, USB 2.0 Hub Additions John Garney Chair Hub Working Group Intel Corporation John Garney Chair Hub Working Group Intel Corporation.
ECE 371 – UNIT 20 Universal Serial Bus (USB). References 1. Universal Serial Bus Specification, Revision 2.0. This specification is available on the World.
USB 2.0 Spec. Chapter4 Architectural Overview Chapter5 USB Data Flow Model.
Microprocessor-based Systems
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transmission Control Protocol
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.
1 Data Link Layer Lecture 22 Imran Ahmed University of Management & Technology.
May 16, USB 2.0 Signal Protocols Jon Lueker Intel Corporation.
Computer communication. Introduction Mechanisms applied in communicating between a computer and another computer or with other devices. Mainly serial.
1 Dong Wang, Yaping Wang, Changzhou Xiang, Zhongbao Yin, Fan Zhang, Daicui Zhou (Huazhong Normal University, China) Status and planning on common readout.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
May 8, USB 2.0 Signal Protocols Jon Lueker Intel Corporation.
May 16, High Speed Protocol Additions John Garney USB2.0 Hub Working Group Chair Intel Corporation John Garney USB2.0 Hub Working Group Chair.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
GBT SCA overview Slide 1-5 Work status Slide 6-10 Shuaib Ahmad Khan.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
SpaceWire Remote Memory Access Protocol
JMicron Technology Corporation
The World Leader in High Performance Signal Processing Solutions SD/SDIO Introduction Cliff Cai.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
IP: Addressing, ARP, Routing
2.10 Flow and Error Control Before that ...
USB PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER
Data Link Layer.
Ethernet Frame Structure
Data Networking via LANs Packets and Frames
TCP.
Universal Serial Bus Specification 1.0
USB- Universal Serial Bus
Embedding USB technology Limitations, challenges and compliance
USB-Microcontroller C540U Family
USB : Universal Serial Bus
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Data Link Issues Relates to Lab 2.
TRANSMISSION CONTROL PROTOCOL
Net 323 D: Networks Protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Layer 9/22/2019.
Data Link Layer. Position of the data-link layer.
Presentation transcript:

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 Field Address Field Address Field Frame Number Field Frame Number Field Data Field Data Field CRC CRC –Packet Formats Token Packets Token Packets Split Transaction Special Token Packets Split Transaction Special Token Packets Start-of-Frame Packets Start-of-Frame Packets Data Packets Data Packets Handshake Packets Handshake Packets

Byte/Bit Ordering Bits are sent onto the bus Bits are sent onto the bus –LSB first, MSB last Multiple bytes are interpreted Multiple bytes are interpreted –Little endian order, i.e., LSB to MSB

Endian Order Little Endian Little Endian –The low-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address (The little end comes first) –Example, a 4 byte Long Int Byte3 Byte2 Byte1 Byte0 Byte3 Byte2 Byte1 Byte0 –Will be arranged in memory as follows Base Address+0 Byte0 Base Address+0 Byte0 Base Address+1 Byte1 Base Address+1 Byte1 Base Address+2 Byte2 Base Address+2 Byte2 Base Address+3 Byte3 Base Address+3 Byte3 Big Endian Big Endian –Will be arrange in memory as follows Base Address+0 Byte3 Base Address+0 Byte3 Base Address+1 Byte2 Base Address+1 Byte2 Base Address+2 Byte1 Base Address+2 Byte1 Base Address+3 Byte0 Base Address+3 Byte0

SYNC Field Synchronization field Synchronization field All packets begin with SYNC field All packets begin with SYNC field Align incoming data with the local clock Align incoming data with the local clock Length Length –8 bits for full/low speed –32 bits for high speed Serves only synchronization mechanism Serves only synchronization mechanism The last two bits are a marker of the end of the SYNC field The last two bits are a marker of the end of the SYNC field

Packet Field Formats Field formats for Field formats for –Token packets –Data packets –Handshake packets SOP / EOP SOP / EOP –All packets have distinct Start-Of-Packet (SOP) and End-Of-Packet (EOP) delimiters

PID (Packet IDentifier Field) Immediately follows the SYNC field of every USB packets Immediately follows the SYNC field of every USB packets Indicates the type of packet Indicates the type of packet A PID consists of A PID consists of –4 bits packet type field Packet format, error type Packet format, error type –4 bits check field Complements of the their respective packet identifier bits Complements of the their respective packet identifier bits

PID (Packet IDentifier Field) The host and all functions must perform a complete decoding of all received PID fields The host and all functions must perform a complete decoding of all received PID fields Any PID received with a failed check field or which decodes to a non-defined value is assumed to be corrupted  ignored by the packet receiver Any PID received with a failed check field or which decodes to a non-defined value is assumed to be corrupted  ignored by the packet receiver Valid PID for a transaction but does not support, the function must not respond Valid PID for a transaction but does not support, the function must not respond –IN-only endpoint must ignore an OUT token

PID Types

Address Fields Function endpoints are addressed using two fields Function endpoints are addressed using two fields –The function ADDRess field (ADDR) –The ENDPoint field (ENDP)

Address Field (ADDR) Specifies the function via its address Specifies the function via its address Either the source or destination of a data packet, depending on the value of the token PID Either the source or destination of a data packet, depending on the value of the token PID 128 addresses are specified as ADDR 128 addresses are specified as ADDR Function address zero is reserved as the default address Function address zero is reserved as the default address

Endpoint Field (ENDP) More flexible addressing of functions in which more than one endpoint is required More flexible addressing of functions in which more than one endpoint is required Is defined for IN, SETUP, OUTPUT and PING token Is defined for IN, SETUP, OUTPUT and PING token Device Endpoint: Device Endpoint: –A uniquely addressable portion of a USB device that is the source or sink of information in a communication flow between the host and device

Frame Number Field 11-bit field that is incremented by the host on a per-frame basis 11-bit field that is incremented by the host on a per-frame basis Maximum value of 7FFh and rolls over after reaching its maximum value Maximum value of 7FFh and rolls over after reaching its maximum value

Data Field Data packet size varies with the transfer type Data packet size varies with the transfer type May range from zero to 1,024 bytes May range from zero to 1,024 bytes Data bits within each bytes are shifted out LSB first Data bits within each bytes are shifted out LSB first

CRC-Cyclic Redundancy Checks CRCs are used to protect all non-PID fields in token and data packets CRCs are used to protect all non-PID fields in token and data packets Token and data packet CRCs provide 100% coverage for all single and double bit errors Token and data packet CRCs provide 100% coverage for all single and double bit errors

Packet Formats Token packets Token packets Data packets Data packets Handshake packets Handshake packets

Token Packets PID PID –IN, OUT, or SETUP ADDR / ENDP ADDR / ENDP –For OUT, SETUP Identify the endpoint that will receive the subsequent Data packet Identify the endpoint that will receive the subsequent Data packet –For IN Identify which endpoint transmit a Data packet Identify which endpoint transmit a Data packet –For PING Identify which endpoint will respond with a handshake packet Identify which endpoint will respond with a handshake packet A five bit CRC that covers that address and endpoint fields A five bit CRC that covers that address and endpoint fields

Split Transactions A high speed split transaction is used only between the host controller and a hub when the hub has full/low speed devices attached to it A high speed split transaction is used only between the host controller and a hub when the hub has full/low speed devices attached to it Only defined to be used between the host controller and a hub Only defined to be used between the host controller and a hub No other high speed or full/low speed devices ever use split transactions No other high speed or full/low speed devices ever use split transactions

Split Transaction Special Token Packets SPLIT SPLIT –A special token for split transaction –4 byte token packets Other normal 3 byte token packets Other normal 3 byte token packets –Provides additional transaction types with its specific information –Is used to support split transactions between the host controller communicating with a hub operating at high speed with full/low speed devices to some of its downstream facing ports SSPLIT / CSPLIT SSPLIT / CSPLIT –Start SPLIT transaction –Complete SPLIT transaction

Packets in a split Transaction

Relationship of Interrupt IN Transaction to High-speed Split Transaction

Relationship of Interrupt OUT Transaction to High-speed Split OUT Transaction

Start-Split (SSPLIT) Transaction Token SC (Start/Complete) SC (Start/Complete) –Zero indicates that this is a start-split transaction (SSPLIT) Port Port –The port number of the target hub for which this full/low speed transaction is destined

Start-Split (SSPLIT) Transaction Token For full-speed isochronous OUT start-splits, For full-speed isochronous OUT start-splits, –S and E fields specify how the high speed data payload corresponds to data for a full-speed data packet as show in this table –Allow the hub to detect various error cases due to lack of receiving start-split transactions

Start-Split (SSPLIT) Transaction Token ET (Endpoint Type) ET (Endpoint Type) –Tells the hub which split transaction state machine to use for this full/low speed transaction

Complete-Split Transaction Token A SPLIT special token packet with the SC field set to one A SPLIT special token packet with the SC field set to one U: reserved/unused and must be reset to zero U: reserved/unused and must be reset to zero

Start-of-Frame Packets Start-of-Frame (SOF) packets are issued by the host at a nominal rate of once every 1 ms for full-speed bus and 125 μs for a high-speed bus Start-of-Frame (SOF) packets are issued by the host at a nominal rate of once every 1 ms for full-speed bus and 125 μs for a high-speed bus

USB Frames and Microframes A full speed 1 ms frame time A full speed 1 ms frame time A high speed microframe with a 125 μs frame time A high speed microframe with a 125 μs frame time High speed devices see an SOF packet with the same frame number each times during each 1 ms period High speed devices see an SOF packet with the same frame number each times during each 1 ms period

Data Packets Four types of data packets Four types of data packets –DATA0, DATA1, DATA2, MDATA

Handshake Packets Used to report the status of a data transaction Used to report the status of a data transaction ACK ACK –The data packet was received without bit stuff or CRC errors over the data field and that the data PID was received correctly NAK NAK –Unable to accept data from the host (OUT) or has no data to transmit to the host (IN) STALL STALL –Unable to transmit or receive data or a control pipe request is not supported NYET and ERR NYET and ERR –High speed only handshake