Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
698 Chapter <strong>13</strong> Optical Storage<br />
Handling Errors<br />
Handling errors was a big part of the original Red Book CD standard. CDs use parity and interleaving<br />
techniques called cross-interleave Reed-Solomon code (CIRC) to minimize the effects of errors on the disk.<br />
This works at the frame level. When being stored, the 24 data bytes in each frame are first run<br />
through a Reed-Solomon encoder to produce a 4-byte parity code called “Q” parity, which then is<br />
added to the 24 data bytes. The resulting 28 bytes are then run though another encoder that uses a<br />
different scheme to produce an additional 4-byte partity value called “P” parity. These are added to<br />
the 28 bytes from the previous encoding, resulting in 32 bytes (24 of the original data plus the Q and<br />
P parity bytes). An additional byte of subcode (tracking) information is then added, resulting in 33<br />
bytes total for each frame. Note that the P and Q parity bytes are not related to the P and Q subcodes<br />
mentioned earlier.<br />
To minimize the effects of a scratch or physical defect that would damage adjacent frames, several<br />
interleaves are added before the frames are actually written. Parts of 109 frames are cross-interleaved<br />
(stored in different frames and sectors) using delay lines. This scrambling decreases the likelihood of a<br />
scratch or defect affecting adjacent data because the data is actually written out of sequence.<br />
With audio CDs and CD-ROMs, the CIRC scheme can correct errors up to 3,874 bits long (which<br />
would be 2.6mm in track length). In addition, for audio CDs, only the CIRC can also conceal<br />
(through interpolation) errors up to <strong>13</strong>,282 bits long (8.9mm in track length). Interpolation is the<br />
process in which the data is estimated or averaged to restore what is missing. That would of course be<br />
unacceptable on a CD-ROM data disc, so this applies only to audio discs. The Red Book CD standard<br />
defines the block error rate (BLER) as the number of frames (98 per sector) per second that have any<br />
bad bits (averaged over 10 seconds) and requires that this be less than 220. This allows a maximum of<br />
up to about 3% of the frames to have errors, and yet the disc will still be functional.<br />
An additional layer of error detection and correction circuitry is the key difference between audio CD<br />
players and CD-ROM drives. Audio CDs convert the digital information stored on the disc into analog<br />
signals for a stereo amplifier to process. In this scheme, some imprecision is acceptable because it<br />
would be virtually impossible to hear in the music. CD-ROMs, however, can’t tolerate any imprecision.<br />
Each bit of data must be read accurately. For this reason, CD-ROM discs have a great deal of<br />
additional ECC information written to the disc along with the actual stored information. The ECC<br />
can detect and correct most minor errors, improving the reliability and precision to levels that are<br />
acceptable for data storage.<br />
In the case of an audio CD, missing data can be interpolated—that is, the information follows a predictable<br />
pattern that enables the drive to guess the missing values. For example, if three values are<br />
stored on an audio disc, say 10, <strong>13</strong>, and 20 appearing in a series, and the middle value is missing—<br />
because of damage or dirt on the CD’s surface—you could interpolate a middle value of 15, which is<br />
midway between 10 and 20. Although this might not be exactly correct, in the case of audio recording,<br />
it will not be noticeable to the listener. If those same three values appear on a CD-ROM in an<br />
executable program, there is no way to guess at the correct value for the middle sample. Interpolation<br />
can’t work because executable program instructions or data must be exact; otherwise, the program<br />
will crash or improperly read data needed for a calculation. Using the previous example with a CD-<br />
ROM running an executable program, to guess 15 is not merely slightly off, it is completely wrong.<br />
In a CD-ROM on which data is stored instead of audio information, additional information is added<br />
to each sector to detect and correct errors as well as to identify the location of data sectors more accurately.<br />
To accomplish this, 304 bytes are taken from the 2,352 that originally were used for audio data<br />
and are instead used for sync (synchronizing bits), ID (identification bits), ECC, and EDC information.<br />
This leaves 2,048 bytes for actual user data in each sector. Just as when reading an audio CD, on<br />
a 1x (standard speed) CD-ROM, sectors are read at a constant speed of 75 per second. This results in a<br />
standard CD-ROM transfer rate of 2,048 × 75 = 153,600 bytes per second, which is expressed as either<br />
153.6KB/sec or 150KiB/sec.