• No results found

Design Considerations for USB Mass Storage

N/A
N/A
Protected

Academic year: 2021

Share "Design Considerations for USB Mass Storage"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

Design

Considerations for

USB Mass Storage

Design

Considerations for

USB Mass Storage

Steve Kolokowsky

Steve Kolokowsky

Cypress Semiconductor

Cypress Semiconductor

syk

(3)

Mass Storage – The Killer App

Mass Storage – The Killer App

(4)

Outline

Outline

Š

ŠMass Storage ClassMass Storage Class

Š

ŠBridge Selection CriteriaBridge Selection Criteria

Fixed Function vs. Programmable BridgesFixed Function vs. Programmable Bridges

(5)

Mass Storage Class

Mass Storage Class

Š

ŠSCSI Command SetSCSI Command Set

RBC, Transparent, SFFRBC, Transparent, SFF--8070 subsets8070 subsets Š

ŠDefines 13 possible combinations of host and Defines 13 possible combinations of host and device behavior

device behavior

Š

ŠDefines Bulk Only Transport (BOT) and Command Defines Bulk Only Transport (BOT) and Command

(6)

Bulk Only Transport (BOT)

Bulk Only Transport (BOT)

Š

ŠOne IN and one OUT endpointOne IN and one OUT endpoint

Š

ŠCBW CBW ---- Data Data ---- CSWCSW

Š

ŠUses STALL for SynchronizationUses STALL for Synchronization

IN Pipe IN Pipe Control Pipe Control Pipe

(7)

READ Transaction

READ Transaction

CSW CSW Host Host Device Device OUT (CBW) OUT (CBW) "Read "Read Sectors" Sectors" ININ ININ Read Data Read Data

(8)

Read Stall

Read Stall

OUT (CBW) OUT (CBW) "Read "Read Sectors" Sectors" STALL STALL IN IN SETUPSETUP Clear Stall Clear Stall CSW CSW w/ Residue w/ Residue Host Host Device Device IN IN

(9)

Write Transaction

Write Transaction

OUT (CBW) OUT (CBW) "Write (10)" "Write (10)" OUT OUT (DATA) (DATA) CSW CSW w/ Residue w/ Residue Device Device IN IN Host Host

(10)

Write with STALL

Write with STALL

OUT (CBW) OUT (CBW) "Write (10)" "Write (10)" CSW CSW w/ Residue w/ Residue Device Device IN IN Host Host STALL STALL OUT OUT (DATA) (DATA) SETUP SETUP Clear Stall Clear Stall

(11)

Command Block Wrapper

(CBW)

Command Block Wrapper

(CBW)

Source – USB MSC BOT spec version 1.0 bit Byte 0-3 4-7 8-11 (08h-0Bh) 12 (0Ch) 13 (0Dh) 14 (0Eh) 15-30 (0Fh-1Eh) CBWCB Reserved (0) bCBWLUN Reserved (0) bCBWCBLength dCBWSignature dCBWTag dCBWDataTransferLength bmCBWFlags 3 2 1 0 7 6 5 4 bit Byte 0-3 4-7 8-11 (08h-0Bh) 12 (0Ch) 13 (0Dh) 14 (0Eh) 15-30 (0Fh-1Eh) CBWCB Reserved (0) bCBWLUN Reserved (0) bCBWCBLength dCBWSignature dCBWTag dCBWDataTransferLength bmCBWFlags 3 2 1 0 7 6 5 4

(12)

Command Block (CBWCB)

READ Example

Command Block (CBWCB)

READ Example

bit Byte 0

1 DPO FUA RELADR

2 3 4 5 6 7 Reserved Reserved (MSB)

LOGICAL BLOCK ADDRESS (LSB) (MSB) Reserved OPERATION CODE (28h) 7 6 5 4 3 2 1 0 bit Byte 0

1 DPO FUA RELADR

2 3 4 5 6 7 Reserved Reserved (MSB)

LOGICAL BLOCK ADDRESS (LSB)

(MSB) Reserved

OPERATION CODE (28h)

(13)

Command Status Word

(CSW) Contents

Command Status Word

(CSW) Contents

bit Byte 0-3 4-7 8-11 (08h-0Bh) 12 (Ch) dCSWDataResidue 0 dCSWSignature dCSWTag 4 3 2 1 bCSWStatus 7 6 5 bit Byte 0-3 4-7 8-11 (08h-0Bh) 12 (Ch) dCSWDataResidue 0 dCSWSignature dCSWTag 4 3 2 1 bCSWStatus 7 6 5

(14)

Hn Hi Ho Dn (1) Hn = Dn (4) Hi > Dn (9) Ho > Dn (5) Hi > Di (6) Hi = Di (7) Hi < Di (11) Ho > Do HOST Di (2) Hn < Di (10) Ho <> Di D e v i Hn Hi Ho Dn (1) Hn = Dn (4) Hi > Dn (9) Ho > Dn (5) Hi > Di (6) Hi = Di (7) Hi < Di (11) Ho > Do HOST Di (2) Hn < Di (10) Ho <> Di D e v i c

The 13 Cases

The 13 Cases

Phase Error

(15)

Host Support

Host Support

Š

ŠBoth Transports SupportedBoth Transports Supported

“Bulk Only” Transport (preferred)“Bulk Only” Transport (preferred)

“CBI” (Obsolete)“CBI” (Obsolete) Š

ŠSupported by Microsoft (W2K, ME, XP)Supported by Microsoft (W2K, ME, XP)

Š

ŠSupported by Apple (OS9, OS X)Supported by Apple (OS9, OS X)

Š

ŠLinux driver AvailableLinux driver Available

Š

(16)

OTG Support

OTG Support

Š

ŠProposal for FAT16 under discussion.Proposal for FAT16 under discussion.

Š

ŠImplementations are ahead of the specImplementations are ahead of the spec

OTG Demo seen earlierOTG Demo seen earlier Š

ŠConcerns about support for other devicesConcerns about support for other devices

CD/DVDCD/DVD

(17)

Bridge Selection Criteria

Bridge Selection Criteria

Š

ŠAll Bridge Chips are not Created EqualAll Bridge Chips are not Created Equal

Š ŠConsiderConsider – – PowerPower – – FlexibilityFlexibility – – TranslationTranslation – – SpeedSpeed

(18)

Power

Power

Š

ŠSome Mass Storage Class devices mustSome Mass Storage Class devices must be bus

be bus--poweredpowered

Key chain drivesKey chain drives

Flash readersFlash readers Š

ŠMost are notMost are not

HDDHDD

(19)

Programmable Vs Fixed

ATA Interface Solutions

Programmable Vs Fixed

ATA Interface Solutions

Fixed Function

Fixed Function

Š

ŠPlug Plug –– n n –– PlayPlay

Š

ŠNo changesNo changes

Š

ŠMaybeMaybe

Š

ŠFixed performanceFixed performance

Programmable

Programmable

Š

ŠRequires LearningRequires Learning

Š

ŠCustom FeaturesCustom Features

Š

ŠBIOS / OS supportBIOS / OS support

Š

(20)

Programmable

Device Benefits

Programmable

Device Benefits

Š

ŠWork With Non ATA compliant devicesWork With Non ATA compliant devices

Many optical drives are nonMany optical drives are non--compliant in subtle wayscompliant in subtle ways Š

ŠMarket DifferentiationMarket Differentiation

Add features beyond raw disk driveAdd features beyond raw disk drive Š

ŠSpecial OS supportSpecial OS support

Support different spec variantsSupport different spec variants

(21)

IDE Translation

IDE Translation

Š

ŠThe Class Spec only uses ATAPI commandsThe Class Spec only uses ATAPI commands

Š

ŠTranslation required for nonTranslation required for non--ATAPI devicesATAPI devices

Hard DrivesHard Drives

Compact FlashCompact Flash

Embedded FlashEmbedded Flash

Other IDE devicesOther IDE devices Š

(22)

Error Recovery

Error Recovery

Š

ŠErrors are not “special cases”. They are a fact of Errors are not “special cases”. They are a fact of life for removable media

life for removable media

Š

ŠError recovery strategiesError recovery strategies

Š

ŠDrive firmware errorsDrive firmware errors

Some may only be fixable by a programmable solutionSome may only be fixable by a programmable solution Š

(23)

Speed

Speed

Š

ŠATA Interface SpeedATA Interface Speed

UDMA/66 = 500MBits/secUDMA/66 = 500MBits/sec Š

ŠBufferingBuffering

Larger buffers if no buffer on the driveLarger buffers if no buffer on the drive Š

ŠQueuing SupportQueuing Support

Still undefined in the specStill undefined in the spec Š

(24)

Driver Performance

Driver Performance

Š

ŠSystem ConfigurationSystem Configuration

Š

ŠSoftware ConfigurationSoftware Configuration

Š

ŠMass Storage Drivers UsedMass Storage Drivers Used

Š

(25)

System Configuration

System Configuration

Š

ŠSystem TestedSystem Tested

P4 1.7Ghz, 128MBP4 1.7Ghz, 128MB

Windows XPWindows XP

Intel USB 2.0 Integrated Host Controller (ICH4)Intel USB 2.0 Integrated Host Controller (ICH4) Š

ŠTest DevicesTest Devices

Cypress ISD300 ATA/ATAPI Bridge ChipCypress ISD300 ATA/ATAPI Bridge Chip

IBM DTLAIBM DTLA--307030 HD (30.7GB, 7200RPM)307030 HD (30.7GB, 7200RPM)

(26)

Software Configuration

Software Configuration

Š

ŠSoftware StackSoftware Stack

Intel Labs EHCI DriverIntel Labs EHCI Driver

Microsoft USB Mass Storage Class DriverMicrosoft USB Mass Storage Class Driver

Cypress USB Mass Storage Class DriverCypress USB Mass Storage Class Driver Š

ŠBenchmark SoftwareBenchmark Software

(27)

Software Configuration

Software Configuration

Š

ŠIntel Labs ECHI Evaluation DriverIntel Labs ECHI Evaluation Driver

Custom ECHI driver developed by Intel LabsCustom ECHI driver developed by Intel Labs

Four different binaries used in Benchmark Comparisons:Four different binaries used in Benchmark Comparisons:

‹

‹Compiled with Interrupt Threshold of 1 (ITH1) Compiled with Interrupt Threshold of 1 (ITH1) –– High priorityHigh priority

‹

‹Compiled with Interrupt Threshold of 2 (ITH2)Compiled with Interrupt Threshold of 2 (ITH2)

‹

‹Compiled with Interrupt Threshold of 4 (ITH4)Compiled with Interrupt Threshold of 4 (ITH4)

‹

(28)

Software Configuration

Software Configuration

Š

Š Microsoft USB Mass Storage Class DriverMicrosoft USB Mass Storage Class Driver

USB Storage Class driver included in the Windows XP USB Storage Class driver included in the Windows XP distribution

distribution

Used to obtain the results of a “Traditional” implementation of Used to obtain the results of a “Traditional” implementation of the USB Storage Class BOT specification

the USB Storage Class BOT specification

Š

Š Cypress USB Mass Storage Class DriverCypress USB Mass Storage Class Driver

(29)

“Traditional” Driver

(30)

Performance Enhanced

Implementation

Performance Enhanced

Implementation

(31)

USB 2.0 Benchmark

Comparisons

USB 2.0 Benchmark

Comparisons

Š

ŠAverage Read Average Read Performance Performance

“Traditional” vs. Cypress “Traditional” vs. Cypress performance enhanced performance enhanced implementation, plus implementation, plus Native IDE Native IDE 0 5 10 15 20 25 30 M B P S

ITH8 ITH4 ITH2 ITH1 Native Microsoft USB Storage Class Driver Cypress USB Storage Class Driver Native IDE 0 5 10 15 20 25 30 M B P S

ITH8 ITH4 ITH2 ITH1 Native Microsoft USB Storage Class Driver Cypress USB Storage Class Driver Native IDE

(32)

USB 2.0 Benchmark

Comparisons

USB 2.0 Benchmark

Comparisons

Š

ŠAverage Write Average Write Performance Performance

“Traditional” vs. Cypress “Traditional” vs. Cypress performance enhanced performance enhanced implementation, plus implementation, plus Native IDE Native IDE 0 2 4 6 8 10 12 14 16 M B P S

ITH8 ITH2 Native

0 2 4 6 8 10 12 14 16 M B P S

(33)

Summary

Summary

Š

ŠMass Storage Class OverviewMass Storage Class Overview

BOT BOT –– Shared Interface for Commands and DataShared Interface for Commands and Data Š

ŠBridge SelectionBridge Selection

Programmable Solutions Allow CustomizationProgrammable Solutions Allow Customization

(34)

Questions and

Answers

Questions and

Answers

(35)

Contact Information

Contact Information

Marketing: Jack Woods

Marketing: Jack Woods

[email protected]

References

Related documents

After you install GPS USB driver, you should know which COM port is available, and check enabled COM port number. You need to know the COM port assignment for the GPS receiver,

(i) In steam distillation, water and the organic substance vapourise together and the total vapour pressure becomes equal to atmospheric pressure, i.e.,.. Vapour pressure of

Evaluation item (9): Status of improvement of policies, procedures, and structures to achieve high-quality examination [evaluation items (1) to (5)] This item was evaluated

Sea Wolf is a high speed close-range anti-missile with a guidance system of semi- automatic command to line of sight with radar and/or infra-red missile and target tracking.. Seawolf

In addition this reference design and evaluation kit could be used with other USB mass storage class devices such as MP3 players, or even for copying files directly from one USB

 Download directly to connected USB devices using the built-in BitTorrent client  Access printers over a network connection using the built-in Print Server  Setup

Connect the USB Flash Drive or External HDD to USB port for network storage; connect a webcam for remote monitoring.. Power on the router and wait for 30

≈ ≈ ACK + SSL_server_hello SYN SYN/ACK ACK + SSL_client_hello SSL_server_hello (PSH) ACKs ACK + SSL_cipher_spec ACK + SSL_cipher_spec (PSH) Data Data RST HTTP_OK (PSH) HTTP_OK