** This is the quasi-official and semi-temporary T13 email list server. ** See http://www.e-insite.net/ednmag/index.asp?layout=article&articleId=CA154800 for the cover article of the 13 Sept 2001 edition of EDN magazine, titled "If I only had a drive." The cover article photo is of the Tin Woodman from "The Wizard of Oz" with a disk drive where his long-for heart would be. The article credits Hale Landis' "ATA/ATAPI History" at www.ata-atapi.com as a reference. The article is included below, but the web site or hard copy is easier to read. This article is oriented toward designers of "a new generation of audio and video devices", but it does not mention Serial ATA or CPRM. ___________________________________________________________________ Brian A. Berg [EMAIL PROTECTED] Voice: 408.741.5010 Berg Software Design FAX: 408.741.5234 P.O. Box 3488 visit the Storage Cornucopia at www.bswd.com 14500 Big Basin Way, Suite F Consulting: SCSI/FC/SAN/storage Saratoga, CA 95070 USA If I only had a drive The hard drive is at the heart of a new generation of audio and video devices. You have the brains, so all you need is the courage to design this digital storehouse into your next CE device. By Greg Vrana, Technical Editor -- EDN, 9/13/01 When Thomas A Edison invented the phonograph in 1877, he invented a new way of experiencing audio content. For the first time, people would be able to listen to what they wanted, when they wanted, and where they wanted. Today, the analog phonograph is nearly extinct due to another disruptive technology: digital audio, which you find in every CD player. Ironically, a 45-year-old invention is beginning to appear in digital-audio devices and is complementing the CD. IBM invented the first hard-disk drive, RAMAC 305, in 1956. The cost, space, and weight to store a byte of data has dropped more than a millionfold since the days of 24-in. platters. Today, hard drives for desktop PCs are selling at $2 to $3 per gigabyte. These three innovations are coming together in CE (consumer-electronics) devices to create new products. Digital-audio jukeboxes use a hard disk to store thousands of songs in MP3 format, allowing you to put your entire CD collection into the space of a typical home-audio component (Figure 1). VCRs (videocassette recorders) are transforming into PVRs (personal video recorders) by replacing analog tape with a hard disk, which can store tens of hours of television programming and give you nearly instant access to anything you've recorded (Figure 2). Game consoles, such as Microsoft's (www.microsoft.com) Xbox, will include a hard drive, and even car manufacturers are designing hard drives into dashboards to store music and maps. According to Cahners In-Stat Group, less than 2% of all hard-drive shipments go into the CE market, but the analysts expect that figure to grow to more than 12% by 2004. You're not in Kansas anymore With more than 95% of all hard drives going into PCs today, expertise in designing a hard drive into a non-PC product is a novelty. CE-design teams need to add this skill to their repertoires. Digital media is here to stay and for good reason. Digital circuitry costs less to manufacture than the equivalent analog circuit. Once you digitize A/V (audio/video) content, it is indistinguishable from any other form of digital data. A computer can then manipulate it, and you can ship it around the world like any other digital file. Digital A/V takes less space to store than its analog counterpart with no loss in quality. And, speaking of quality, you can forever make exact copies of original material with no degradation. (Record company executives may see that quality as a drawback.) And forget wow, flutter, dropouts, and other engineering headaches associated with magnetic tape. Alternatives to using a hard drive for storing digitized media include flash memory, which offers faster access times but, at $1 to $2 per megabyte, higher prices than hard drives. If you need to store only a few hours of audio content, flash memory is a good choice. Another option is optical storage such as CD-RW (compact disc read/write) or DVD-RAM (digital-versatile-disk RAM) (Reference 1). Optical drives may be the right choice for an audio application if you need removable media. But optical storage is a poor option for a video recorder today. CD and DVD technology lacks the sustained write-data-transfer rates needed for high-quality, multiple-video-stream recording. Hard-disk drives offer the lowest cost per megabyte, have data transfer rates high enough to support multiple video streams, and provide storage density that is growing nearly 100% per year. Latency, access, and seeks: Oh my! In spite of what PC retailers say, a hard drive is more than how many gigabytes it can hold. But capacity does determine how many hours of A/V content you can store. The compression algorithms you employ also affect how many songs or movies you can keep on the disk at one time (Reference 2). As a rule of thumb and depending on how much quality you are willing to sacrifice, one minute of audio requires 0.5 to 2 Mbytes, and one hour of video takes 1 to 3 Gbytes of data. Data-transfer rates also determine the quality of the content you can store and retrieve on your hard disk. Most PC hard disks are fast enough to play and record consumer-quality video. When you want to process multiple video streams or edit the video, however, you need to pay attention to transfer rates. Hard-disk manufacturers usually specify internal and external transfer rates. The internal transfer rate is the rate at which data moves between the disk's magnetic platter and the disk's onboard memory buffer. The internal transfer rate is probably the most important specification for A/V applications due to the way A/V files are stored on a disk. An A/V system stores its files in large contiguous blocks, whereas a PC may scatter its files in small chunks across the disk. The external data-transfer rate is the rate at which you can move data from the disk's external interface to the rest of your system. Manufacturers specify the maximum external transfer, or "burst," rate. The sustained transfer rate is the average rate at which you can move data between the disk and your system. The internal and external transfer rates and the design of your system, including the disk controller, determine the sustained rate, which affects the quality of A/V content you can use. Other specifications include the disk's cache size, access time, and rotational speed. A large cache allows the disk to maintain its external data-transfer rate because the internal transfer rate is typically slower than the external rate. The disk's access time equals seek time plus latency. When you tell the disk drive to read or write a sector, the head must swing over and position itself above the track that contains the sector you want. The time it takes to do this is the seek time. You must then wait for the platter to rotate until the desired sector is under the head, which is the latency of the disk. The access time a manufacturer specifies is usually the average time it takes for this operation to occur because the time depends on the locations of the head and the sector when the operation begins. The worst-case access time occurs when either the head or the destination track is at the center of the platter and the other is at the outside edge and when you must wait a full revolution for the sector to come under the head. Rotational speed, measured in rpms (rotations per minute), is the number of revolutions the drive platter makes in one minute. A higher rotational speed means a shorter latency time and a faster internal transfer rate. That disk drive behind the curtain Although a typical desktop PC drive can suffice for some A/V applications, disk manufacturers are offering drives targeting the A/V market. A new specification appearing on data sheets is for acoustics. In the past, PC-drive manufacturers paid more attention to a disk drive's performance than to the noise it makes. As disk drives spread into living rooms and bedrooms, drive makers are trying to reduce the amount of noise emanating from their drives. People don't want to awake in the night to the sound of the PVRs in their bedrooms accessing their disks to record programs. They also don't want to hear disk drives while watching a movie or listening to music. Disk-drive manufacturers usually state a drive's acoustics as a sound power level in bels: one level at idle and one level while the disk is seeking. Ideally, a drive should be inaudible once you mount it in its chassis. For quiet environments, such as a home, this level is around 2.5 bels at idle, and seeks should be a barely imperceptible 0.2 bels louder. You should check that a manufacturer uses sound power rather than sound pressure for the drive's specification. Sound pressure is a less accurate measurement of perceived noise than sound power, and a sound-pressure measurement is lower than a sound-power measurement for the same drive. Drive makers specify the sound level of an isolated drive under conditions ideal for sound measurement, but the actual level of sound from the drive may change considerably once you mount it in your system. Several factors contribute to a quieter drive. Manufacturers are using ceramic and fluid motor bearings, which are quieter than standard metal bearings. Specially designed enclosures damp noise. Proprietary algorithms reduce noise by intelligently moving the servo mechanism during data seeks. Drive-motor speed also affects a drive's noise level. A drive with a slower motor is usually quieter than a drive that spins faster. In general, you have to trade off between performance and noise. And the fewer platters a drive contains, the quieter the drive is. Users likely treat CE devices more roughly than they do a PC. For this reason, CE drives need to have good shock tolerance. Manufacturers specify this tolerance in g forces for operating and nonoperating conditions. In addition to ruggedness, power can be a consideration as well. Lower power drives require smaller power supplies and may not need a cooling fan because they dissipate less heat. Having no fan and a smaller power supply also reduces your product's cost. Perhaps the biggest difference between using a drive in a CE device and in a PC is the way the device processes data. Computer-disk data must be correct down to the last bit. If a computer detects an error during a disk data transfer, it retries the operation until the data is correct, or it halts the application and reports an error. In most cases, you want and expect this behavior from your computer. A single bit error can cause huge monetary loses, a faulty bridge design, or even a weapon misfire while playing Doom. With A/V content, however, it's more important that the data arrive on time than that it arrive correctly. When watching a movie, you don't notice a missing pixel, and you can even tolerate a missing frame, but you don't accept waiting for your disk drive to reread data while the picture is frozen on-screen. Some drive makers have modified their drive designs for the CE market to better accommodate the streaming nature of A/V data. These drives may have different caching algorithms, error-recovery techniques, or vendor-specific disk commands tailored to CE applications. Seagate's U Series AV line of disk drives for the CE market are quieter, use less power, and handle streaming data better than typical PC disk drives (Figure 3). The U Series uses Seagate's "sound-barrier technology," which reduces disk-drive noise levels. Some of these features include noise damping enclosures and foam, specially designed moving parts, fluid dynamic motor bearings, and drive-current waveforms that minimize spindle-motor noise. Seagate also uses a just-in-time seek method, which controls the seek time based on where the data is on the disk in relation to the read/write head. This seek algorithm reduces noise by moving the head only as fast as necessary instead of at full speed for every seek. The U Series drives have 20- to 80-Gbyte capacities, have Ultra ATA/100 interfaces, and 5400-rpm spin rates. Operating shock is 63g, and nonoperating shock is 350g. Idle sound level is 2.9 bels for the 20-, 30-, and 40-Gbyte models. The 60- and 80-Gbyte drives have an idle acoustic rating of 3.0 bels. The U Series also has a "quiet-seek" mode that keeps the seek noise level to 0.2 bels above the idle ratings. The faster "performance-seek" mode is 0.5 bels higher. Maxtor also makes drives for CE applications. Maxtor merged last April with Quantum, one of the pioneers of the CE disk-drive market. TiVo (www.tivo.com) and ReplayTV (www.replaytv.com) used Quantum drives in their first PVRs. Instead of offering a series of drives for a general CE market, Maxtor works with each customer to meet its requirements. Maxtor combines its QuickView technology with PC-drive designs for specific consumer applications. In addition to quieter drives, QuickView includes drive firmware, embedded software, and file systems for streaming video. Western Digital and IBM also sell drives for CE applications, but they don't seem to market as intensely in this area as Seagate and Maxtor. Western Digital's Performer line of drives support multiple A/V data streams and run quietly. IBM tags none of its drives as "CE" but believes that the Deskstar line has all the features, including high-shock specs for ruggedness, ceramic bearings and noise-damping enclosures for good acoustics, low power, high capacity, and high speed, that CE applications require. Follow the yellow-brick road The road that data takes from the drive to the rest of your system can be one of several standard interfaces. High-end drives in servers and workstations, for example, usually employ SCSI. Because SCSI drives are typically high-performance, they can cost more than twice as much per gigabyte as desktop-PC drives and are probably overkill for most consumer applications. Most PC drives have an ATA/ATAPI (Advanced Technology Attachment/ATA Packet Interface). The PC-AT used an early version of this interface in 1984 (Reference 3). About that time, PC engineers began using "IDE" (integrated drive electronics) to refer to this interface. Some manufacturers referred to the second version of the ATA specification as "EIDE" (enhanced IDE). Today, people usually use "IDE" or "EIDE" to refer to the current implementation of the ATA/ATAPI bus. To avoid confusion it's better to use "ATA/ATAPI" when referring to the drive interface and to include the version of the specification, such as ATA/ATAPI-5. Version 4 of the ATA standard included the ATAPI command set for controlling CD-ROM and tape drives. ATAPI provides a way to send certain SCSI commands to devices, such as CD-ROM, tape, and DVD drives across the ATA bus. The NCITS (National Committee for Information Technology Standards) (www.ncits.org) T13 Committee (www.t13.org) publishes documents that define the ATA/ATAPI, but the committee has no authority to require manufacturers to prove that their drives comply with the standard. The major drive makers' reputations are at stake if their drives don't work, but it's still up to you to qualify a potential drive vendor before committing to it. Drive manufacturers already offer drives that go beyond the current ATA/ATAPI-5 specification. ATA/ATAPI-5 defines a maximum transfer rate of 66.6 Mbytes/sec, but Ultra ATA/100 drives have been available for months. The 100-Mbyte/sec data rate is new to the ATA/ATAPI-6 specification, but the T13 Committee won't formally approve Version 6 until 2002 (see sidebar "New and improved ATA"). Manufacturers often design "unapproved" features into their disk drives if they feel confident that the features won't change before the specification's final approval. Now, that's a horse of a different color In addition to SCSI and ATAPI, a couple of other options exist for disk interfaces. For example, Maxtor offers a DVR (digital-video-recorder) subsystem for the set-top-box market. The self-contained QuickView IEEE 1394 DVR subsystem uses the 1394 FCP (Function Control Protocol). FCP defines an AVHDD (audio/video hard-disk drive), a new device in the IEEE 1394 specification. AVHDD devices understand FCP commands, such as play, fast-forward, stop, record, and rewind. If you need a really small form factor, IBM offers 340-Mbyte, 500-Mbyte, and 1-Gbyte Microdrives that come in the CF+Type II (CompactFlash) format (Figure 4). The drive measures 5�42.8�36.4 mm and weighs less than 16g. Unless you are designing a high-performance A/V device, such as a digital-video editor or server, you will probably choose ATA/ATAPI. The interface comprises a 40-pin connector for the host, a 40-pin connector for the drive, and an optional connector for a second drive. The connectors attach to an 80-conductor ribbon cable that alternates ground with 31 data and control signals. Older, slower drives use a 40-conductor ribbon cable, but faster DMA modes require the 80-conductor cable. The maximum distance between the host and drive connectors is 18 in. You power the drive with a separate four-pin connector that supplies 5 and 12V. The ATA/ATAPI bus, a relatively simple register-based interface, comprises 16 data bits and several control signals along with an interrupt to the host. You perform drive operations by writing to the drive's command registers. You access data read from or written to the drive with the interface's data register. The ATA/ATAPI specification also supports DMA operations for faster data transfers. You can also read status and error registers to determine the status of the device or the current command. Don't expect to pick up a copy of the ATA/ATAPI-6 specification and begin implementing it right away. The document is more than 500 pages long and growing. You may be able to successfully complete commands, but getting top performance out of the interface is a long learning process. You may want to work with a software provider that has ample experience with ATA/ATAPI devices. Also, partner with your disk-drive vendor to benefit from its intimate knowledge of designing with disk drives. Because the ATA/ATAPI interface is PC-centric, you need to be aware of aspects of the standard that may hinder performance when you use it in non-PC applications. When streaming data, for example, you may want to disable the SMART (self-monitoring, analysis, and reporting technology) error-logging feature. SMART provides a way for a disk drive to monitor itself and attempt to predict when it may fail. Another parameter to change, if you start with a device driver for a PC, is the number of retries you attempt when you encounter a data error. Your application may be able to tolerate a certain number of retries, but you can't retry indefinitely without disrupting the stream of data you're providing to the processor. You probably won't notice a bad bit in A/V content, and dead silence or a blank screen is too high a price to pay for perfect data. As with almost any design, you can choose the level of customization you want when interfacing to an ATA/ATAPI disk drive. You can buy a stand-alone host controller, such as the CMD Technology PCI-649. If your system uses the PCI bus, the PCI-649 allows you to control as many as four ATA/ATAPI-5 disks at speeds as high as 100 Mbytes/sec. According to CMD, most CE devices don't need the Ultra ATA/100 transfer rate and can get by with the company's PCI-648 ATA/ATAPI-5 host controller, which supports the Ultra ATA/66 transfer mode. The Cirrus Logic EP9312 has most of the functions you need for building an audio-jukebox application (Figure 5). The EP9312 contains a 200-MHz ARM920T processor; a math engine for DSP and compression algorithms; external memory interfaces for SDRAM, RAM or ROM, and EEPROM; and an ATA/ATAPI-4 interface, which supports two devices. The EP9312 also supports several peripherals by including a three-port USB host, an LCD interface, an Ethernet MAC (media-access-controller) interface for connecting to an off-chip PHY (physical-layer device), a touchscreen interface, a keypad interface, and a serial-audio interface to drive an off-chip codec. Set-top-box and PVR designers may be able to use TeraLogic's TL811 set-top-box/PVR controller (Figure 6). You can use the chip alone or with TeraLogic's TL851 digital-TV decoder to design digital set-top boxes, digital TVs, and PVRs. The TL811 has an ATA/ATAPI-5 interface for connecting one or two disks and can transfer data at speeds as high as 66.6 Mbytes/sec. It also has a SysAD CPU bus for interfacing to MIPS processors and a PCI-bus interface. If you can't find the functions you need in an ASSP (application-specific standard product), you may have to design your own chip using cores from an ASIC vendor such as IBM Microelectronics. IBM offers a large library of cores, including PowerPC and ARM processors, data compressors, USB and IrDA controllers, and ATA/ATAPI-5 host-controller cores. The most obvious place to obtain ATA/ATAPI chips is from PC-chip vendors, such as Intel, National Semiconductor, and Via. If you want to leverage the huge amount of code written for the x86, then base your system around an x86-compatible processor from one of these vendors. Once you select your processor, you will need to connect it to a south-bridge chip containing an ATA/ATAPI interface and other I/O. The dark side of the moon Electrical design issues are only half of the story when you design a hard disk into your system. Mechanical issues are the other half. Disk drives are electromechanical devices containing delicate mechanisms, and you have to treat them as such. Drive manufacturers spend a lot of their time and money on developing just a drive's packaging so that it arrives in working order. You must handle drives with care as soon as you get them. Disk-drive makers can train you in how to handle, store, and install their drives on your assembly line. Just as important, they can help you design your product's chassis to minimize vibration and noise. Noise can come from airborne or structure-source acoustics. Manufacturers quote airborne noise in their acoustics specifications. Structure-source acoustics are the noises that the drive and the chassis it's mounted in cause. The chassis can amplify the drive's vibration and act as a speaker. The partially enclosed chassis attenuates airborne acoustics, but structure-source acoustics dominate the total acoustics emissions of the system. You can reduce structure-borne acoustics by using isolation mounts between the disk drive and the chassis. Rubber mounts create a trade-off, however. Disk drives are sensitive to rotational vibration, that is, rotation about an axis parallel to the drive's spindle. If you rotate a drive during a seek operation, you are likely to cause the drive's arm to overshoot or undershoot its target, possibly causing delays during a read or a write. Rubber mounts act as springs and, therefore, store and release energy as the mass of the drive's arm accelerates and decelerates while seeking. This "windup" behavior can contribute to decreased drive performance. Work with your disk-drive vendor to ensure that you use the best materials and design practices in your product. The large drive manufacturers offer services to help you create a successful product. For example, Seagate's CETEC (Consumer Electronics Testing and Engineering Center) provides facilities and expertise that include computer-aided chassis evaluation, shock and vibration testing, environmental chambers to simulate shipping, an anechoic chamber to measure acoustics, and a lab for testing your final product. The trend today is to go digital, and this scenario is especially true of audio and video content. You can compress and store digitized media in less space than even lower quality analog content. You can nearly eliminate noise and process audio and video in ways that are impractical with analog data. And hard-disk drives are the most cost-efficient means of storing digital data. So, why are you just standing there? Click your heels three times and repeat, "There's nothing like a hard drive..." For more information... When you contact any of the following manufacturers directly, please let them know you read about their products in EDN. Cirrus Logic 1-512-445-7222 www.cirrus.com CMD Technology 1-800-426-3832 www.cmd.com IBM 1-800-426-4968 www.ibm.com Intel 1-408-765-8080 www.intel.com Maxtor 1-408-894-5000 www.maxtor.com National Semiconductor 1-408-721-5000 www.national.com Seagate Technology 1-405-936-1234 www.seagate.com TeraLogic 1-650-526-2000 www.teralogic-inc.com Via Systems 1-719-579-6800 www.via.com Western Digital 1-949-672-7000 www.wdc.com Author Information Technical Editor Greg Vrana considers The Wizard of Oz one of his all-time-favorite movies and apologizes to L Frank Baum. You can reach Greg Vrana at 1-512-338-0129, fax 1-512-338-0139, e-mail [EMAIL PROTECTED] References 1.Vrana, Greg, "PC Expo has lots of 'biggests' and firsts," EDN, Aug 2, 2001, pg 26. 2.Dipert, Brian, "Digital audio gets an audition. Part two: lossy compression," EDN, Jan 18, 2001, pg 87. 3.Landis, Hale, "ATA/ATAPI History," www.ata-atapi.com. New and improved ATA The ATA/ATAPI (Advanced Technology Attachment/ATA Packet Interface) standard has a lot of miles on it, and it's still going strong. The T13 Committee (www.t13.org) is doing some final housekeeping on ATA/ATAPI-6, which will go out for public review shortly. T13 Chairman Pete McLean expects the Committee to publish the new specification next spring. ATA/ATAPI-6 features four major enhancements. The first defines a faster data rate of 100 Mbytes/sec. Even though this specification is not final, manufacturers have adopted and offer drives with this speed. The second enhancement extends the cylinder-head-sector address from 28 to 48 bits (Reference A). The extra 20 bits will support ATA drive capacities as large as 144 Pbytes (petabytes, or 144�1015 bytes). The third change adds optional A/V (audio/video) features to the specification. The streaming feature allows the host to request delivery of data from the disk within a time limit by setting up an error-recovery policy, which defines the number of retries the drive should attempt. The T13 Committee has defined two ways to achieve this behavior. The disk drive manages the operation in one method, which allows for a lower cost, but lower performance, system. In the other method, the host manages the operation. More expensive systems with more powerful processors will likely use this method. The fourth addition is the optional automatic acoustic-management feature, which allows you to select an acoustic-management level of 01h to FEh. Higher levels indicate higher performance and more noise. Lower values tell the drive to slow down and reduce noise. The feature sets aside the 00h value for vendor-specific behavior. Reference A. Vrana, Greg, "PC Expo has lots of 'biggests' and firsts," EDN, Aug 2, 2001, pg 26. -- If you have any questions or wish to unsubscribe send a message to Hale Landis, [EMAIL PROTECTED] To post to this list server send your message to [EMAIL PROTECTED] For questions concerning Thistle Grove Industries or TGI's list services please send email to [EMAIL PROTECTED]
