may 8, 20012 the easy way to create i/o devices john hyde intel corporation john.hyde @ intel.com

63

Upload: terence-gordon

Post on 24-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com
Page 2: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 2

The EASY Way toCreate I/O DevicesThe EASY Way toCreate I/O Devices

John HydeJohn Hyde

Intel CorporationIntel Corporationjohn.hydejohn.hyde@@intel.comintel.com

Page 3: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 3

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

EXAMPLESEXAMPLESWHATWHAT HOWHOW

Does this sound useful to you?Does this sound useful to you?

Page 4: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 4

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving– Recap of Key ConceptsRecap of Key Concepts– Software Model of I/O DeviceSoftware Model of I/O Device– I/O Device ResponsibilitiesI/O Device Responsibilities– ““Typical” ImplementationTypical” Implementation– Overall Design TaskOverall Design Task

HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

Page 5: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 5

Recap of Key ConceptsRecap of Key Concepts

USB is a “Single Master + Multiple Slaves” Polled Bus USB is a “Single Master + Multiple Slaves” Polled Bus

Host Host PCPC

HubHub

I/O DeviceI/O Device

To other devices To other devices (including hubs)(including hubs)

Page 6: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 6

Recap of Key ConceptsRecap of Key Concepts

USB cable has 4 wires = Power + Ground + 2 SignalUSB cable has 4 wires = Power + Ground + 2 Signal

Signals in this cable are at 1 of 3 nominal speeds andSignals in this cable are at 1 of 3 nominal speeds andare Uni-directional, Point-to-Point & Mainly Differentialare Uni-directional, Point-to-Point & Mainly Differential

PVCPVCCopperCopper

AluminumAluminum

Page 7: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 7

Recap of Key ConceptsRecap of Key Concepts

Communication uses PACKETSCommunication uses PACKETS

The “Packet” is a fundamental building blockThe “Packet” is a fundamental building block

IDLEIDLE IDLEIDLE

Page 8: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 8

Recap of Key ConceptsRecap of Key Concepts

There are FOUR packet “types”There are FOUR packet “types”

These differ These differ onlyonly in their response characteristics in their response characteristics

CONTROLCONTROL

BULKBULK

INTERRUPTINTERRUPT

ISOCHRONOUSISOCHRONOUS

Page 9: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 9

Recap of Key ConceptsRecap of Key Concepts

Communication uses TRANSFERS = Communication uses TRANSFERS = Packets Packets

Transfers are built using PacketsTransfers are built using Packets

Token

OUT

ADDR

ENDP

CRC5

Token

NACK

Data

DAT0

DataBytes

CRC16

Data

DAT1

DataBytes

CRC16

Data

DAT0

Data BytesCRC16

Token

IN

ADDR

ENDP

CRC5

Token

IN

ADDR

ENDP

CRC5

Token

IN

ADDR

ENDP

CRC5

Page 10: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 10

Recap of Key ConceptsRecap of Key Concepts

Communication uses Communication uses

TRANSACTIONS = TRANSACTIONS = Transfers = Transfers = Packets Packets

Transactions are built using TransfersTransactions are built using Transfers

SOF

SETUP

DATA0

ACK

ACK

IN

DATA1

ACK

IN

DATA0

ACK

SOF

SOF

SOF

SOF

OUT

DATA1

SOF

SOF

ACK

SOF

IN

NAK

IN

DATA0

Token

IN

ADDR

ENDP

CRC5

Token

IN

ADDR

ENDP

CRC5

IN

ADDR

ENDP

CRC5

Page 11: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 11

Recap of Key ConceptsRecap of Key Concepts

Bus Protocol = Defined Subset (Transactions)Bus Protocol = Defined Subset (Transactions)

USB has a Defined Protocol LayerUSB has a Defined Protocol Layer

AdministrationAdministration(USB “overhead”)(USB “overhead”)

User Data TransferUser Data Transfer

StandardStandardCommandsCommands

Class/VendorClass/VendorCommandsCommands

Get_Device_DescriptorGet_Device_DescriptorSet_ProtocolSet_Protocol

HID (interrupt)HID (interrupt)Printer (bulk)Printer (bulk)

Page 12: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 12

Recap of Key ConceptsRecap of Key Concepts

Information is Exchanged using Data BuffersInformation is Exchanged using Data Buffers

StandardStandardCommandsCommands

use Descriptorsuse Descriptors

Class/VendorClass/VendorCommands &Commands &

Data MovementData Movement

BYTES are moved back and forthBYTES are moved back and forth

Length = 18

Type = 1

USBVersion#

Class

SubClass

Protocol

EP0 size

VendorID

ProductID

Version#

Manufacturer

Product Name

Serial #

Configurations

Length = 18

Type = 1

USBVersion#

Class

SubClass

Protocol

EP0 size

VendorID

ProductID

Version#

Manufacturer

Product Name

Serial #

Configurations

Length = 9

Type = 4

ThisInterface

Alternate

Endpoints

Protocol

Class

SubClass

Interface Name

Length = 9

Type = 2

TotalLength

Interfaces

ThisConfig.

Config. Name

Attributes

Max. Power

Length = 9

Type = 4

ThisInterface

Alternate

Endpoints

Protocol

Class

SubClass

Interface Name

Length = 9

Type = 4

ThisInterface

Alternate

Endpoints

Protocol

Class

SubClass

Interface Name

Length = 9

Type = 2

TotalLength

Interfaces

ThisConfig.

Config. Name

Attributes

Max. Power

Length = 9

Type = 2

TotalLength

Interfaces

ThisConfig.

Config. Name

Attributes

Max. Power

Length = 7

Type=5

EndpointAddress

Max PacketSize

Polling Interval

Attributes

Length = 7

Type=5

EndpointAddress

Max PacketSize

Polling Interval

Attributes

Char(N)UNICODEChar(N)

Length = N+2

Type=3

UNICODEChar(0)

UNICODEChar(1)

UNICODEChar(2)

UNICODEChar(N)

Length = 4

Type=3

LanguageIdentifier

Char(N)Char(N)UNICODEChar(N)

UNICODEChar(N)

Length = N+2

Type=3

UNICODEChar(0)

UNICODEChar(1)

UNICODEChar(2)

UNICODEChar(N)

Length = N+2

Type=3

UNICODEChar(0)

UNICODEChar(1)

UNICODEChar(2)

UNICODEChar(N)

Length = 4

Type=3

LanguageIdentifier

Length = 4

Type=3

LanguageIdentifier

Length = 9

Type = 21H

HIDVersion#

CountryCode

HIDdescriptors

Report = 22H

Total ReportLength = M

Length = 9

Type = 21H

HIDVersion#

CountryCode

HIDdescriptors

Report = 22H

Total ReportLength = M

Report(0)

Report(1)

Report(M-1)

Report(0)

Report(1)

Report(M-1)

Page 13: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 13

Software Model of I/O DeviceSoftware Model of I/O Device

Configuration = Configuration = Interfaces = Interfaces = Endpoints Endpoints

Note 1:1 Mapping of Device Driver and InterfaceNote 1:1 Mapping of Device Driver and Interface

Real WorldReal World

I/O Device I/O Device Config 1Config 1

KernelKernel

CntlEndPCntl

EndPIN

EndPIN

EndPOUTEndPOUTEndP

OUTEndPOUTEndP

INEndP

INEndP

OUTEndPOUTEndP

Interface 1Interface 1Interface 1Interface 1 Interface 2Interface 2Interface 2Interface 2

Configuration 2Configuration 2

INEndP

INEndP

OUTEndPOUTEndP

Interface 1Interface 1Interface 1Interface 1

OUTEndPOUTEndP

IF 2IF 2IF 2IF 2

Device Driver 1Device Driver 1 Device Driver 2Device Driver 2

I/O ManagerI/O Manager

UserApplication ProgramApplication Program

Host PCHost PC

Dat

a Pi

peD

ata

Pipe

Dat

a Pi

peD

ata

Pipe

Con

trol

Pip

eC

ontr

ol P

ipe

Page 14: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 14

Software Model of I/O DeviceSoftware Model of I/O Device

Endpoints from the I/O Device’s point of viewEndpoints from the I/O Device’s point of view

Endpoints are a KEY abstractionEndpoints are a KEY abstraction

Real World

I/O DeviceI/O Device

Configuration1Configuration1

ControlEndP

ControlEndP

INEndP

INEndP

OUTEndPOUTEndP

ControlEndP

ControlEndP

OUTEndPOUTEndP

Data PipeData Pipe

Data Pipe

Control Pipe Control Pipe

FROMHostPC

FROMHostPC

TOHostPC

TOHostPC

Page 15: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 15

I/O Device ResponsibilitiesI/O Device Responsibilities

FROMFROMHostHostPCPC

FROMFROMHostHostPCPC

TOTOHostHostPCPC

TOTOHostHostPCPC

1 = RESPOND to Commands1 = RESPOND to Commands

Commands and Responses use Control EP0Commands and Responses use Control EP0

Real World

I/O DeviceI/O Device

Configuration1Configuration1

ControlEndP

ControlEndP

INEndP

INEndP

OUTEndPOUTEndP

ControlEndP

ControlEndP

OUTEndPOUTEndP

Data PipeData Pipe

Data Pipe

Control Pipe Control Pipe

Page 16: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 16

I/O Device ResponsibilitiesI/O Device Responsibilities

2 = PREPARE DATA for Host PC2 = PREPARE DATA for Host PC

Note that Host PC READS (I/O device does not write)Note that Host PC READS (I/O device does not write)

Real World

I/O DeviceI/O Device

Configuration1Configuration1

ControlEndP

ControlEndP

INEndP

INEndP

OUTEndPOUTEndP

ControlEndP

ControlEndP

OUTEndPOUTEndP

Data PipeData Pipe

Data Pipe

Control Pipe Control Pipe

TOHostPC

TOHostPC

Page 17: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 17

I/O Device ResponsibilitiesI/O Device Responsibilities

3 = CONSUME DATA from Host PC3 = CONSUME DATA from Host PC

Data is typically sent via a Data PipeData is typically sent via a Data Pipe

Real World

I/O DeviceI/O Device

Configuration1Configuration1

ControlEndP

ControlEndP

INEndP

INEndP

OUTEndPOUTEndP

ControlEndP

ControlEndP

OUTEndPOUTEndP

Data PipeData Pipe

Data Pipe

Control Pipe Control Pipe

FROMHostPC

FROMHostPC

Page 18: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 18

I/O Device ResponsibilitiesI/O Device Responsibilities

4 = Conserve Power4 = Conserve Power

I/O Device is REQUIRED to move to Suspend StateI/O Device is REQUIRED to move to Suspend State

AttachedAttached PoweredPowered SuspendedSuspended

DefaultDefault SuspendedSuspended

AddressedAddressed SuspendedSuspended

ConfiguredConfigured SuspendedSuspended

Page 19: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 19

“Typical” Implementation“Typical” Implementation

This is a “Minimal I/O Device”This is a “Minimal I/O Device”

TransceiverTransceiverTransceiverTransceiverSerialSerial

InterfaceInterfaceEngineEngine

SerialSerialInterfaceInterfaceEngineEngine

ProtocolProtocolControllerController

ApplicationApplication““firmware”firmware”

ProtocolProtocolControllerController

ApplicationApplication““firmware”firmware”

CustomCustomI/OI/O

DevicesDevices

CustomCustomI/OI/O

DevicesDevices

D+D+

D-D-

bytesbytes

controlcontrol

RealWorld

I/O

RealWorld

I/O

Page 20: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 20

Overall Design TaskOverall Design Task

Write USB Protocol FirmwareWrite USB Protocol Firmware Design Custom I/ODesign Custom I/O Write “run-time” FirmwareWrite “run-time” Firmware

Operation of I/O Device is exactly definedOperation of I/O Device is exactly defined

Page 21: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 21

EXAMPLESEXAMPLESWHATWHAT HOWHOW

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

Write “firmware” to respond to PC Host commandsWrite “firmware” to respond to PC Host commandsusing the Software Model with the Defined Protocolusing the Software Model with the Defined Protocol

Page 22: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 22

AgendaAgenda

WHAT problemWHAT problem are we solving are we solving HOW will we solve this problemHOW will we solve this problem

– Adding to our minimal I/O deviceAdding to our minimal I/O device– Using a PC as an I/O deviceUsing a PC as an I/O device– Overall design task nowOverall design task now

EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

Page 23: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 23

Adding to Minimal I/O DeviceAdding to Minimal I/O Device

Wide range of expansion optionsWide range of expansion options Friendly development toolsFriendly development tools Display, keyboard and mouseDisplay, keyboard and mouse Single step, breakpoint, traceSingle step, breakpoint, trace Performance monitor/measurePerformance monitor/measure Hard drive?Hard drive? Printer?Printer?

This sounds like a PC!This sounds like a PC!

Page 24: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 24

TransceiverTransceiverTransceiverTransceiverSerialSerial

InterfaceInterfaceEngineEngine

SerialSerialInterfaceInterfaceEngineEngine

ProtocolProtocolControllerController

ApplicationApplication““firmware”firmware”

ProtocolProtocolControllerController

ApplicationApplication““firmware”firmware”

CustomCustomI/OI/O

DevicesDevices

CustomCustomI/OI/O

DevicesDevices

D+D+

D-D-

bytesbytes

controlcontrol

RealWorld

I/O

RealWorld

I/O

Using a PC As an I/O DeviceUsing a PC As an I/O Device

Any PC / Laptop will do!Any PC / Laptop will do!

Page 25: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 25

Using a PC As an I/O DeviceUsing a PC As an I/O Device

Use a USB peripheral (Transceiver + SIE)Use a USB peripheral (Transceiver + SIE) Simple solution #1 = I2C dongle (1.1)Simple solution #1 = I2C dongle (1.1) Simple solution #2 = Parallel dongle (1.1)Simple solution #2 = Parallel dongle (1.1) Simple solution #3 = PCI-based card (1.1 or 2.0)Simple solution #3 = PCI-based card (1.1 or 2.0)

Need to partition the device softwareNeed to partition the device software

Page 26: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 26

Using a PC + I2C DongleUsing a PC + I2C Dongle

Simple, low costSimple, low cost

Page 27: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 27

Using a PC + Parallel DongleUsing a PC + Parallel Dongle

Simple, higher data rateSimple, higher data rate

AD[8:1]AD[8:1]

nADDRSTBnADDRSTB

nWAITnWAIT

nDATASTBnDATASTBnWRITEnWRITE

nRESETnRESETnINTRnINTR

D[7:0]D[7:0]

A[7:0]A[7:0]

RD#RD#

WR#WR#

RESET#RESET#INT#INT#

ALEALE

EPPEPPNameName

I/O DeviceI/O DeviceNameName

Page 28: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 28

Using a PC + PCI Add-in CardUsing a PC + PCI Add-in Card

Simple, supports 480Mbps data ratesSimple, supports 480Mbps data rates

Page 29: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 29

Partitioning the Device S/WPartitioning the Device S/W

And all written in CAnd all written in C

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

PortablePortableSoftwareSoftware

HardwareHardwareDependantDependantSoftwareSoftware

Page 30: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 30

Overall Design Task NowOverall Design Task Now

Write USB Protocol Firmware = DONEWrite USB Protocol Firmware = DONE Design Custom I/ODesign Custom I/O Write “run-time” FirmwareWrite “run-time” Firmware (Port to USB microcontroller or ASIC)(Port to USB microcontroller or ASIC)

Easy USB prototyping!Easy USB prototyping!

Page 31: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 31

EXAMPLESEXAMPLESWHATWHAT HOWHOW

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

PC provides a robust development platformPC provides a robust development platformfor portable, extensible, testable “firmware”for portable, extensible, testable “firmware”

Page 32: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 32

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

– Keyboard = Simplest example I could think of! Keyboard = Simplest example I could think of! – Using custom I/O = “Buttons and Lights” (HID)Using custom I/O = “Buttons and Lights” (HID)– Audio using iso transfersAudio using iso transfers– Printer using bulk transfersPrinter using bulk transfers– USB 2.0 480Mbps exampleUSB 2.0 480Mbps example

Page 33: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 33

Keyboard ExampleKeyboard Example

Design/build hardware = DONEDesign/build hardware = DONE

Host PCHost PC

Device PCDevice PC

USBUSB

Page 34: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 34

Keyboard ExampleKeyboard Example

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Write “Chapter 9” codeWrite “Chapter 9” code

Write SIE access codeWrite SIE access code

Page 35: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 35

Keyboard ExampleKeyboard Example

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Scan device PC keyboardScan device PC keyboard

Generate Report on keypressGenerate Report on keypress

Write run-time firmware = DONEWrite run-time firmware = DONE

Page 36: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 36

“Buttons and Lights”“Buttons and Lights”

Design/build hardware = DONEDesign/build hardware = DONE

Host PCHost PC

Device PCDevice PC

Page 37: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 37

“Buttons and Lights”“Buttons and Lights”

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGESNO CHANGESfrom Keyboard Examplefrom Keyboard Example

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

Page 38: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 38

“Buttons and Lights”“Buttons and Lights”

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Edit Descriptor TablesEdit Descriptor Tables

Listen for Input ReportsListen for Input Reports

Drive custom hardwareDrive custom hardware

Write run-time firmware = DONEWrite run-time firmware = DONE

Page 39: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 39

Audio Using ISO TransfersAudio Using ISO Transfers

Design/build hardware = DONEDesign/build hardware = DONE

Host PCHost PC

Device PCDevice PCIntegrated Sound CardIntegrated Sound Card

Jump forward 3 slidesJump forward 3 slidesWe will come back to this Audio sectionWe will come back to this Audio section

The D11 does not support isochronous transfers!!The D11 does not support isochronous transfers!!

Page 40: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 40

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor Commandsand User Data Movement

Class/ Vendor Commandsand User Data Movement

DescriptorTables

DescriptorTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O Interface

NO CHANGESfrom Keyboard Example

Audio Using iso TransfersAudio Using iso Transfers

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

Page 41: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 41

Audio Using iso TransfersAudio Using iso Transfers

Write run-time firmware = DONEWrite run-time firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Edit Descriptor TablesEdit Descriptor Tables

Receive SOF packetReceive SOF packet

Meter out iso data fromMeter out iso data fromprevious frameprevious frame

Drive sound cardDrive sound card

Page 42: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 42

Printer Using Bulk TransfersPrinter Using Bulk Transfers

Design/build hardware = first use I2C dongleDesign/build hardware = first use I2C dongle

Host PCHost PC

Device PCDevice PC Received user data will be Received user data will be displayed on screendisplayed on screen

NOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Page 43: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 43

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor Commandsand User Data Movement

Class/ Vendor Commandsand User Data Movement

DescriptorTables

DescriptorTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O Interface

NO CHANGESNO CHANGESfrom Keyboard Examplefrom Keyboard Example

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

Page 44: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 44

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Edit Descriptor TablesEdit Descriptor Tables

Receive bulk packetsReceive bulk packets

Copy user data to displayCopy user data to display

Measure throughputMeasure throughput

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

Page 45: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 45

Test R

esult

s

3

KBps

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

Edit Descriptor TablesEdit Descriptor Tables

Receive bulk packetsReceive bulk packets

Copy user data to displayCopy user data to display

Measure throughputMeasure throughput

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

Page 46: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 46

Printer Using Bulk TransfersPrinter Using Bulk Transfers

Design/build hardware = next use parallel dongleDesign/build hardware = next use parallel dongle

NOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Host PCHost PC

Device PCDevice PC

Received user data will be Received user data will be displayed on screendisplayed on screen

Page 47: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 47

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceNeed new SIE access codeNeed new SIE access code

Page 48: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 48

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

Page 49: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 49

Test R

esult

s

0

KBps

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

Page 50: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 50

Printer Using Bulk TransfersPrinter Using Bulk Transfers

Design/build hardware = next use parallel dongleDesign/build hardware = next use parallel dongle

NOTE: “Printer” is a generic bulk transfer device

Host PCHost PC

Device PCDevice PC

Received user data will be Received user data will be displayed on screendisplayed on screen

Page 51: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 51

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer deviceNOTE: “Printer” is a generic bulk transfer device

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

StandardStandardCommandsCommands

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

SIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceNeed new SIE access codeNeed new SIE access code

Page 52: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 52

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer device

Write run-time firmware = DONEWrite run-time firmware = DONE

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

Page 53: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 53

Test R

esult

s

~80

0 KBps

Printer Using Bulk TransfersPrinter Using Bulk TransfersNOTE: “Printer” is a generic bulk transfer device

Write run-time firmware = DONEWrite run-time firmware = DONE

StandardCommands

Class/ Vendor Commandsand User Data Movement

DescriptorTables

SIE Interface Custom I/O Interface

NO CHANGE from previous example

Measure throughput

Page 54: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 54

USB 2.0 480Mbps ExampleUSB 2.0 480Mbps Example

Design/build hardware = “upgrade” “printer” exampleDesign/build hardware = “upgrade” “printer” example

Host PCHost PC

Device PCDevice PC

Received user data will be Received user data will be displayed on screendisplayed on screen

Page 55: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 55

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

New SIE access codeNew SIE access code

Additional DescriptorsAdditional Descriptorsfor high speedfor high speed

USB 2.0 480Mbps ExampleUSB 2.0 480Mbps Example

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

Page 56: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 56

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

USB 2.0 480Mbps ExampleUSB 2.0 480Mbps Example

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

Page 57: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 57

Test R

esult

s

28,

000

KBps

StandardStandardCommandsCommandsStandardStandard

CommandsCommandsClass/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

DescriptorDescriptorTablesTables

SIE InterfaceSIE InterfaceSIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O InterfaceCustom I/O InterfaceCustom I/O Interface

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

NO CHANGENO CHANGE from previous examplefrom previous example

Measure throughputMeasure throughput

USB 2.0 480Mbps ExampleUSB 2.0 480Mbps Example

Write run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONEWrite run-time firmware = DONE

Page 58: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 58

Audio Using ISO TransfersAudio Using ISO Transfers

Design/build hardware = DONEDesign/build hardware = DONE

Host PCHost PC

Device PCDevice PCIntegrated Sound CardIntegrated Sound Card

Page 59: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 59

StandardStandardCommandsCommands

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

SIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O Interface

NO CHANGESNO CHANGESfrom Keyboard Examplefrom Keyboard Example

Audio Using ISO TransfersAudio Using ISO Transfers

Write USB protocol firmware = DONEWrite USB protocol firmware = DONE

Page 60: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 60

Audio Using ISO TransfersAudio Using ISO Transfers

Write run-time firmware = DONEWrite run-time firmware = DONE

StandardStandardCommandsCommands

Class/ Vendor CommandsClass/ Vendor Commandsand User Data Movementand User Data Movement

DescriptorDescriptorTablesTables

SIE InterfaceSIE Interface Custom I/O InterfaceCustom I/O Interface

Edit Descriptor TablesEdit Descriptor Tables

Receive SOF packetReceive SOF packet

Meter out iso data fromMeter out iso data fromprevious frameprevious frame

Drive sound cardDrive sound card

Page 61: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 61

EXAMPLESEXAMPLESWHATWHAT HOWHOW

AgendaAgenda

WHAT problem are we solvingWHAT problem are we solving HOW will we solve this problemHOW will we solve this problem EXAMPLES of solutions using this methodologyEXAMPLES of solutions using this methodology

Did this sound EASY to you?Did this sound EASY to you?

Page 62: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 62

A Special THANK YOU to: A Special THANK YOU to:

www.devasys.com www.netchip.com

Page 63: May 8, 20012 The EASY Way to Create I/O Devices John Hyde Intel Corporation john.hyde @ intel.com

May 8, 2001 63

The EASY Way toCreate I/O DevicesThe EASY Way toCreate I/O Devices

John HydeJohn Hyde

Intel CorporationIntel Corporationjohn.hydejohn.hyde@@intel.comintel.com