Showing posts with label TechnicalEssay. Show all posts
Showing posts with label TechnicalEssay. Show all posts

Tuesday, April 3, 2007

Improve mass storage access speed with USB2.0 (3) - Alternative HW design

  • Limitation of speed with HW design, Fig.1
With the HW design, Fig.1, there is a bottleneck of speed when it connects with PC. To get maximum speed, the transfers, (1) and (2) should be done at the same time. But usual device driver for mass storage isn't designed considering it. For example, with Intel PXA27X BSP for Microsoft Windows Mobile, the transfer is done one after the other. Cause the FIFO size for USB endpoints is very small, typically 512Byets, comparing with the size of HDD, larger than 128KB, the speed is reduced even by one-fifth of its maximum.
  • Alternative HW design
The Fig.2 may be alternative HW design. With direct connection between HDD controller and USB controller, a fastest Ultra DMA could be used. Typical currently used USB controller supports direct connection by ATAPI standard interface, like Ultra DMA.
In case of connection with PC, we can get the maximum speed without any CPU load, (1). When it is need for CPU to access the HDD, (2), DMA can be used.

Improve mass storage access speed with USB2.0 (2) - Use DMA

  • Use DMA
Using a DMA is the common way to improve transfer speed and reduce CPU load. There are roughly 3 types of DMA transfers used by USB peripheral controller, like Philips ISP1583.
  1. PIO mode - Usually use a small size of transfer buffer, for example 8KB FIFO. Slowest and make CPU load high. DIOR/DIOW and IORDY signals are used.
  2. Multi word DMA mode - DREQ and DACK signals without IORDY signals are used. According to specification it has almost same speed with PIO mode. But it's faster and makes lower the CPU load in practical implementation.
  3. Ultra DMA mode - Such as HDMARDY and DSTROBE signals are needed. Highest speed.
* For further investigation, refer the ATAPI specification.

With CPUs commonly used for handheld device like Intel PXA27x(passed to Marvell), PIO mode or Multi word DMA mode can be implemented. The data transfer of connections (1) at Fig.1 should be implemented with Multi word DMA.

Improve mass storage access speed with USB2.0 (1) - Domain

For the handheld device, it becomes being smaller and having more functionalities, USB 2.0 interface is likely to be used more frequently with huge capacity of storage device, HDD. Comparing other interface like as CF, it requires less pins to connect with peripherals, only 4 pins, D+, D-, ground and Vcc.

To get the maximum speed of transfer it's best way to make connection directly between the USB2.0 controller and storage device. But some of hardware design may cause bottleneck of transferring speed(see Fig.1.). I'll deal how to improve the speed of accessing mass storage device, HDD, with USB2.0.