Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesIDE Takes Off


March 1994 / State Of The Art / IDE Takes Off

The most popular method of connecting hard drives to PCs has just gotten a whole lot better

John Bryan

IDE (Integrated Drive Electronics) is the number-one disk interface in the PC environment for two good reasons: First, it is insanely easy to use, and second, it's inexpensive to implement. This is a hard combination to beat. But as CPUs get faster and applications and environments get more complex, IDE's limitations begin to show.

IDE was developed by Western Digital and Compaq Computer. It was a natural outgrowth of the original IBM AT disk interface--the ST-506--which was introduced in 1984. The ST-506 uses the PC BIOS INT 13h to interact with the system, and IDE is set up the same way. IDE also borrows from its ST-506 heritage in the number and type of drives it supports.

This latter feature is one of the major limitations of IDE as we know it today: IDE currently supports two drives, and without some sort of proprietary modification, those two drives must be magnetic disks. Up to now, these limitations have not been crippling, but today's high-end multimedia systems need to be able to control a mix of hard disk, tape, and CD-ROM products. IDE isn't up to the task. Also, IDE is limited in the size of the disks you can attach to it and in the data transfer rates you can get out of it. Western Digital's response to these problems is its proposed enhanced IDE, which is designed to take IDE into the twenty-first century.

Increasing Capacity

A popular feature of IDE is its transparency. You don't need a special driver for an IDE drive, because IDE is defined and supported in your system's BIOS and IDE interface. You pay for this transparency, however--most notably in capacity limitations.

The capacity of IDE drives is constrained not by the BIOS or IDE interface individually but by the combination of the two. IDE identifies a drive and determines its capacity by determining the number of heads, cylinders, and sectors per track that it contains. Because DOS specifies that there are 512 bytes per sector, the capacity of a drive is the number of heads times the number of cylinders times the number of sectors times 512.

The drive lookup table, which the PC BIOS INT 13h accesses, supplies only a specific number of bits for maintaining information about the characteristics of a drive. Similarly, the IDE interface has a set number of bits for storing this information. Either of these methods provides for large drives. The PC BIOS uses enough bits to recognize up to 1024 cylinders, 255 heads, and 63 sectors per track in its CHS (cylinder-head-sector) format. The BIOS can thus support drives with capacities of up to 8.4 GB. IDE can recognize up to 65,536 cylinders, 16 heads, and 255 sectors per track or drives up to 136.9 GB. Unfortunately, drive capacity in a BIOS/IDE setup is determined by the lowest common denominator of the corresponding drive characteristics, resulting in a limit of 528-MB for PC-based IDE drives (see the figure "The Capacity Crunch").

While 528 MB isn't small, it isn't exactly spacious in a high-end environment or for multimedia, where storage requirements for sound and video applications can really eat up disk space. As disk prices fall, too, there will be more and more motivation to move to larger capacities.

Western Digital's proposal for enhanced IDE provides two methods for solving the capacity problem. You choose between the two in CMOS setup. The first method, called auto-configure, is designed for operating systems, such as NetWare and Unix, that bypass the BIOS in accessing disk drives. It uses the standard DPT (Drive Parameter Table) to pass information about drive capacity from the IDE drive to the operating system.

The second method--for DOS and Windows--is called auto-translate. Selecting this drive type tells the BIOS to create an EDPT (Enhanced Driv e Parameter Table) during its POST (power-on self test). The initialization process fills this table with the appropriate values for all the drive characteristics, along with a checksum value to ensure the accuracy of the parameters.

The EDPT contains two sets of drive parameter information: one that comes from the Identify Drive command, and another that the BIOS gives to the operating system. The information presented to the operating system is not simply a copy of that taken from the drive, but a translation that isn't dependent on how the CHS and IDE bit fields match up. The BIOS supports two types of translations based on information returned by the Identify Drive command. The first, called IDE CHS, provides a straightforward translation of BIOS CHS information to IDE CHS information.

The second translation requires more drive firmware changes but has wider-ranging implications. It translates the CHS information that is passed to the BIOS into a 28-bit LBA (logical block address). The BIOS then sends the LBA information to the drive's task-file register and sets bit 6 of the drive's SDH (select drive head) register to indicate that the information in the task registers is LBA rather than CHS. The drive then uses the LBA value to fetch the appropriate physical block from the disk.

The EDPT lets enhanced IDE access drives with sizes up to the CHS limit of 8.4 GB. The advantage of the EDPT is that it doesn't require software or operating-system changes to support high-capacity drives. The IDE CHS and the IDE LBA translations are transparent to the operating system, except in the case of Windows 3.1 in its 32-bit address-on mode. In this case, you need a new driver. Western Digital's IDE LBA-enabling driver is called FASTDISK. It will be available for all Western Digital Caviar drives with capacities greater than 528 MB.

The advantage to IDE CHS is that the BIOS changes required to implement it are minimal. LBA requires more extensive BIOS changes as well as changes in the drive firm ware, but you get advantages with this added complexity. Many current operating systems use LBA to access hard drives. LBA lets you use a single consistent access scheme across the operating system, device driver, and drive interface. Looking ahead, LBA is also compatible with the INT 13h Functional Extension specification as defined by Microsoft and IBM, which specifies "packets" that contain LBA rather than CHS addresses.

Faster and Faster

Current IDE drives outperform the data transfer rate capabilities of the ISA bus, making a faster bus mandatory if you want to increase the data transfer rate of IDE systems. EISA and Micro Channel architecture are options, but increasingly, local-bus technology--VL-Bus and PCI (Peripheral Component Interconnect)--is the preferred solution to higher sustained throughput. Enhanced IDE offers a series of solutions designed to meet escalating levels of performance expected from local-bus technologies over the next few years.

You should consider several issue s when looking at data transfer between a system and a peripheral. First is the speed at which the peripheral can handle the data that moves on and off it. Also important is the delivery cost of the subsystem, especially in the personal computer market. If cost were no object at all, drives with huge read/write cache systems could deliver and accept data at practically any speed.

IDE drives transfer data in two ways: PIO (processor I/O) depends on the processor to handle the data transfer, and DMA lets the drive itself handle the transfer after the processor performs an initial setup. IDE's traditional method of data transfer is PIO because when IDE was introduced, PIO was faster than DMA, which was dependent on the speed of the ISA bus.

The introduction of faster buses, however, has resulted in faster DMA, and enhanced IDE supports several types. Type B DMA offers a transfer rate of 4 MBps, while Type F, supported by the PCI local bus, extends this to either 6.67 MBps or 8.33 MBps, depending on the PCI/ISA bridge chip set in the system. Both Type F and Type B DMA requires device drivers (or BIOS changes).

PCI also makes available to the PC a new type of DMA transfer called Scatter/Gather. Operating systems that use virtual memory management schemes may find that a requested block of memory is scattered across a variety of physical disk locations. With Scatter/Gather support, four 4-KB blocks that make up a single 16-KB block of memory can be fetched with a single I/O request, rather than with the four I/O requests and DMA instructions that would normally be required. The result is greatly improved performance for the operating systems, such as Windows 3.1, OS/2 2.1, and NetWare 3.1 and 4.0, that support this mode. Windows NT does not currently support Scatter/Gather, but future releases will.

VL-Bus designs use PIO or BPIO (block PIO) data-transfer methods. BPIO works in exactly the same fashion as standard PIO, except that where PIO transfers a single block of 256 words (512 bytes), BPIO transfers n blocks of 256 words. The support of BPIO requires BIOS changes and device-driver support, and Western Digital has device drivers that provide this support for Windows 3.11, MS-OS/2 1.31, and NetWare 3.11.

While the system's CPU controls standard PIO and BPIO, local bus and enhanced IDE have made possible a method of PIO that the device controls. The ATA (AT attachment) specification of I/O Channel Ready was too fast for the ISA bus to implement; however, VL-Bus can handle it, and it pushes the data transfer rate up to 6.67 MBps, or 10 MBps for a cache-hit burst.

Gang of Four

To overcome the limitation of two devices, Western Digital's proposal for enhanced IDE specifies that BIOS and system manufacturers actively support the use of both the primary and secondary controller addresses that have always been in the IBM AT system hardware map. The primary address, which is universally supported by BIOS and operating systems, uses IRQ (interrupt request) 14 and task-file address 1F 0h-1F7h/3F6h-3F7h. Virtually all of today's BIOS and operating systems also support the secondary address, which uses IRQ 15 and task-file address 170h-177h/376h-377h, but this support does not generally extend to chip sets or Super I/O devices. As a result, you have to install a second controller with a jumper-selectable IRQ and address to attach more than two IDE devices to your system.

Western Digital is pushing system and controller suppliers to build in hardware support--including a connector--for the second channel, so four IDE devices can coexist in the same system. Dataquest says that four devices would meet the expansion needs of an overwhelming majority of the PC market, especially if those devices can be nondisk.

Diverse Connections

In addition to extending the number of devices IDE can support, enhanced IDE also extends the types of devices. CD-ROM has become an essential part of many personal computer setups, especially in the multimedia environment. Until recently, most CD-ROM d rives used either a SCSI connection or a proprietary interface and command set.

Western Digital's proposal for supporting CD-ROM with IDE is called ATAPI (ATA Packet Interface). ATA is the protocol used to transfer data and status and control information between a PC and a hard drive. ATAPI is an extension of the ATA protocol formulated to bring a single command set and single register set to CD-ROMs, and it can also be easily adapted to other devices, such as tape. The goal is ease of connectivity and command implementation for OEMs and the end-user market.

ATAPI depends on a minor BIOS modification. When the BIOS performs its POST, the POST uses an Identify Drive command to poll the IDE interface and determine the type of devices attached. If the device isn't a disk drive, the command will abort, and the ATAPI-aware BIOS will then issue an ATAPI Identify Device command. This will automatically switch support for that device to the device driver, which initiates Packet Command, as defined in th e ATAPI proposal that is now before the Small Form Factor Committee.

Once Packet Command is in effect, new rules will apply to the device, because the standard IDE rules for disks don't all work with other types of devices. Under Packet Command, the device execute command is padded out to 12 bytes and sent via the data register rather than the task file. When the device interrupts, the DRQ bit in the status register is matched with the interrupt reason registers to determine the actual interrupt type. The amount of data sent at each DRQ (device interrupt request) is determined by a byte count, and after data has been transferred, status is returned to the host as a new interrupt. Data transfers can occur via DMA or PIO modes, depending on the indicator in the ATAPI features register. The commands of Packet Command are based on SCSI-2, making it easier for peripheral manufacturers to create ATAPI drivers.

ATAPI includes several commands that are specific to CD-ROM devices. These include the Read CD family of commands and a CD speed-select command. Play Audio commands are optional to the specification. A standard command set has not yet been established for tape.

The Big Picture

Not all disk vendors implement the features that enhanced IDE offers. At Fall Comdex, however, many disk vendors--including Western Digital, Conner, and Seagate--stated that they will release IDE drives greater than 528 MB in capacity with some type of support for high-speed data transfer rates. Western Digital, particularly, will be extending its Caviar line of drives to include models from 540 MB (already available) to 1.2 GB (available soon).

ATAPI, the IDE CD-ROM standard, has been endorsed by every significant CD-ROM vendor and a large number of system vendors as well, including IBM, Compaq, and Dell. Software giant Microsoft is on board, and BIOS vendor Phoenix Technologies is behind the standardization effort.

Focused on the mainstream, enhanced IDE represents an excellent low-cost solution for m ost users and offers significant performance improvement over standard IDE. The fact that it is low cost doesn't mean that this solution doesn't offer significant performance improvement over standard IDE; it does. But it also offers a no-hassle peripheral-connection method that everyone can like.


Advantages Of Enhanced IDE



INCREASES DRIVE CAPACITIES TO 8.4 GB
INCREASES DATA TRANSFER RATES TO UP TO 10 MBPS
INCREASES NUMBER OF DEVICES TO UP TO FOUR
SUPPORTS CD-ROM AND TAPE DRIVES


Figure: The Capacity Crunch Both the standard PC BIOS and the IDE interface support large-capacity drives. However, when they're combined, they can't support drives over 528 MB due to the different number of bits each reserves to define the different characteristics--cylinders, heads, and sectors per track--of a drive.
Figure: Addressing Logical Blocks Rather than the straightforward transfer of cylinder, head, and sector information, enhanced IDE uses informati on in its Enhanced Drive Parameter Table to translate INT 13h CHS information into either IDE CHS or IDE LBA. In the case of LBA, only the drive need provide the final logical-to-physical translation. The operating system, file system, and device drivers can use logical information exclusively.
John Bryan is a freelance technology writer and consultant based in San Jose, California. You can reach him on BIX c/o "editors."

Up to the State Of The Art section contentsGo to previous article: PRML at WorkGo to next article: SCSI vs. IDESearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network