The present invention relates to error correction techniques, and more particularly, to syndrome generation methods and apparatus for data with a block configuration.
In data storage systems, error detection and correction mechanisms play an important role in improving the correctness of data. For example, symbols read from an optical medium are typically arranged into a block format for decoding according to industry standard optical storage techniques.
The symbols of the ECC block 100 from an optical disc such as a DVD or a HD-DVD are typically stored in a DRAM and must be checked for errors and corrected for later use. The error detection and correction operations for the ECC block 100 are divided into two phases known as PI decoding and PO decoding. In the PI decoding phase, the conventional error detection and correction operation corrects errors of the ECC block 100 row by row based on PI parity symbols. PI corrected symbols are then written to the DRAM to update the ECC block 100. Specifically, the symbols of the ECC block 100 are accessed along a direction D1 (i.e., along the row direction) in the PI decoding phase.
In the PO decoding phase, the conventional error detection and correction operation corrects errors of the ECC block 100 column by column in accordance with PO parity symbols. The error correction operation is performed in a column basis for code sequences in a direction D2, i.e. in the column direction. For each column, the symbols are processed by syndrome generation logic to generate syndromes of the column. As is well known in the art, the error locations and error values of the column are calculated based on the syndromes of the column, so that the errors within the symbols of the column can be corrected according to the error locations and error values. The calculations of the error locations and error values are very well known in the art and the details are therefore omitted here. Afterwards, PO corrected symbols are applied to the DRAM to update the ECC block 100.
Although the error correction operation is performed along the direction D2 in the PO decoding phase, the symbols of the ECC block 100 are not read along the direction D2 but are instead read along the direction D1. In order to access the symbols of a same column, a discontinuous access (a jump) of the DRAM must be made from one row to another row. Unfortunately, these discontinuous accesses result in page misses, and each page miss causes a penalty being an increased latency.
One conventional method of reducing the latency penalty is to process multiple columns at the same time or to update whole syndrome per cycle. To realize this goal, the syndrome generation logic is typically duplicated, one set for each column or use a memory with wide bandwidth to update whole syndrome. Unfortunately, such an arrangement requires significant layout area or increases the hardware cost.
In view of the foregoing, it can be appreciated that there is a need to improve the syndrome generation efficiency while avoiding the layout area and cost penalties.
It is therefore an objective of the claimed invention to provide high-speed syndrome generation method and apparatus with low cost to solve the above-mentioned problems.
An exemplary embodiment of a method of syndrome generation for an error correction code (ECC) block is disclosed comprising: storing a sub-block of the ECC block into a data memory, wherein the sub-block is M columns by N rows with both M and N being greater than 1; reading a plurality of symbols of a column of the sub-block from the data memory, at least one symbol being read during each reading cycle; and updating a plurality of syndromes corresponding to the column of the sub-block according to the plurality of symbols read from the data memory.
An exemplary embodiment of a syndrome generating device for generating syndromes corresponding to an error correction code (ECC) block is disclosed comprising: a first data memory for storing a sub-block of the ECC block, wherein the sub-block is M columns by N rows with both M and N being greater than 1; a syndrome generator electrically coupled to the data memory for receiving a plurality of symbols of a column of the sub-block from the data memory and for accordingly generating a plurality of updated syndromes corresponding to the column of the sub-block; and a first syndrome memory electrically coupled to the syndrome generator for receiving and storing the updated syndromes from the syndrome generator.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
The syndrome generating device 200 is utilized for generating syndromes corresponding to the ECC block 212. The syndromes are utilized for correcting errors of the ECC block 212 during the PO decoding phase. In a DVD/HD-DVD player, for example, an RS decoder (not shown) is typically employed to correct errors of the ECC block 212 in accordance with the syndromes generated from the syndrome generating device 200.
As mentioned in
The syndrome generating device 200 sequentially processes the plurality of sub-blocks to generate syndromes for the ECC block 212. In this embodiment, the plurality of sub-blocks is sequentially processed along the path and in the direction shown by the dotted arrow in
In the syndrome generating device 200, the data memory 220 is for storing a sub-block of the ECC block 212, for example, a sub-block SBJ of the ECC block 212. The syndrome generator 230 is utilized for receiving a plurality of symbols of a column of the sub-block SBJ from the data memory 220 and for accordingly generating a plurality of updated syndromes corresponding to the column of the sub-block SBJ. The syndrome memory 240 is utilized for receiving and storing the updated syndromes from the syndrome generator 230. Note that the term “symbol” as used herein may be an element from Galois field. In practice, each symbol may contain multiple bits of data, e.g., each symbol of this embodiment has 8 bits data. Hereinafter, the operations of the syndrome generating device 200 will be explained in more detail with reference to
Please refer to
In step 310, a memory controller (not shown) of the syndrome generating device 200 reads symbols of a sub-block SBJ of the ECC block 212 from the first memory 210. In practice, the memory controller may be a memory controller of the optical storage device. As described before, the sub-block SBJ of this embodiment is 64 columns by 16 rows for J being from 0 to 25, and is 54 columns by 16 rows for J being from 26 to 38. In a preferred embodiment, the symbols of the sub-block SBJ are sequentially read from the first memory 210 in the row direction of the ECC block 212 as illustrated in
The sub-block SBJ is then stored into the data memory 220 in step 320. Symbols of the sub-block SBJ can be written into the data memory 220 in any manner. To optimize the writing efficiency, the symbols of the sub-block SBJ are preferably sequentially written into the data memory 220 along the direction shown by the dotted arrow illustrated in
In step 330, the syndrome generator 230 reads a plurality of symbols of a column CT of the sub-block SBJ from the data memory 220 and reads a plurality of syndromes corresponding to the column CT of the sub-block SBJ from the syndrome memory 240. As mentioned above, the symbols of the column CT of the sub-block SBJ are stored in column CT of the data memory 220. In this embodiment, each column of the syndrome memory 240 stores 16 syndromes corresponding to one column of the sub-block SBJ. For example, column C0 of the syndrome memory 240 stores 16 syndromes corresponding to column C0 of the sub-block SBJ, column C1 of the syndrome memory 240 stores 16 syndromes corresponding to column C1 of the sub-block SBJ, and so forth. Accordingly, in step 330, the syndrome generator 230 reads symbols from column CT of the data memory 220 and reads syndromes from column CT of the syndrome memory 240.
In step 340, the syndrome generator 230 updates the plurality of syndromes to the syndrome memory 240 according to the plurality of symbols of the column CT of the sub-block SBJ read from the data memory 220.
In this embodiment, the 16 syndromes corresponding to the column CT of the sub-block SBJ are updated one by one in step 340. Specifically, the syndrome generator 230 reads a current symbol from the column CT of the data memory 220 and reads a current syndrome from the column CT of the syndrome memory 240 during each reading cycle. The syndrome generator 230 then calculates an updated syndrome according to both the current symbol and the current syndrome. Afterwards, the syndrome generator 230 writes the updated syndrome into the column CT of the syndrome memory 240 to replace the current syndrome. The syndrome generator 230 continues this operation for the next one of the 16 syndromes corresponding to the column CT of the sub-block SBJ until all of 16 syndromes have been updated.
When the 16 syndromes corresponding to the column CT of the sub-block SBJ are completely updated, the syndrome generating device 200 performs step 350 to determine if the column CT is a last column of the sub-block SBJ. If so, the syndrome generating device 200 proceeds to step 360; otherwise, the syndrome generator 230 repeats steps 330 through 350 for next column CT+1 of the sub-block SBJ until all 64 columns of the sub-block SBJ have been processed. The symbol read direction for the data memory 220 is illustrated by the dotted arrow shown in
In step 360, the syndrome generating device 200 determines if the sub-block SBJ is the last sub-block of the ECC block 212. If the sub-block SBJ is not the last sub-block of the ECC block 212, the syndrome generating device 200 repeats steps 310 through 360 for next sub-block SBJ+1 until all sub-blocks of the ECC block 212 have been processed.
As in the foregoing description, a current sub-block to be processed is buffered in the data memory 220, and symbols of the current sub-block are applied to the syndrome generator 230 from the data memory 220 instead of from the first memory 210. Accordingly, the latency of reading symbols of the sub-block to update corresponding syndromes is significantly reduced. The latency can be reduced to a minimum level by utilizing an SRAM to implement the data memory 220.
In this embodiment, after thirteen sub-blocks are completely processed, partial syndromes of the ECC block 212 are obtained in the syndrome memory 240. For example, after the first 13 sub-blocks SB0˜SB12 are processed, the syndromes stored in the syndrome memory 240 can be utilized to perform the error correction operation for the first 64 columns C0˜C63 of the ECC block 212. Similarly, after the next 13 sub-blocks SB13˜SB25 are processed, syndromes for the next 64 columns C64˜C127 of the ECC block 212 are obtained. Finally, after the last 13 sub-blocks SB26˜SB38 are processed, syndromes for the last 54 columns C128˜C181 of the ECC block 212 are obtained. Accordingly, once thirteen sub-blocks are completely processed, the syndromes stored in the syndrome memory 240 are applied to the RS decoder of the optical storage device.
It should be noted that the symbol writing direction for the data memory 220 shown in
As in the foregoing descriptions, the syndromes stored in the syndrome memory 240 are read sequentially by the syndrome generator 230, where one syndrome is read during each reading cycle. Accordingly, the syndrome memory 240 can be implemented with a one-port memory such as a one-port SRAM. However, this is merely an example implementation of the syndrome memory rather than a limitation. In other embodiments, the syndrome memory 240 could be implemented as a two-port memory or a dual-port memory. As known, each syndrome is one byte in this application. Therefore, the data bus between the syndrome memory 240 and the syndrome generator 230 only requires a width of one byte. In practical implementations, the capacity requirement of the data memory reduces as the data bus width of the syndrome memory increases.
For example,
In particular, a sub-block SBJ of an ECC block 912 is read from the first memory 910 and stored in the first data memory 922 according to steps 310 and 320. Then, the syndrome generator 930 updates syndromes corresponding to the sub-block SBJ stored in the first data memory 922 by repeating steps 330 through 350. A difference between the syndrome generating device 900 and the previous embodiments is that a next sub-block SBJ+1 is loaded into the second data memory 924 while the syndrome generator 930 processes the sub-block SBJ. Therefore, after symbols of the sub-block SBJ stored in the first data memory 922 are processed, the syndrome generator 930 can read symbols of the next sub-block SBJ+1 from the second data memory 924 immediately without waiting. Similarly, while the syndrome generator 930 updates syndromes corresponding to the sub-block SBJ+1 stored in the second data memory 924, a succeeding sub-block SBJ+2 is loaded into the first data memory 922.
In addition, all the sub-bocks of the ECC block 912 can be defined as multiple columns of sub-blocks. Specifically, suppose that the sub-blocks SB0 through SB25 of the ECC block 912 are 64 columns by 16 rows each while the other sub-blocks SB26 through SB38 are 54 columns by 16 rows each as well as the first embodiment mentioned before. The first 13 sub-blocks SB0˜SB12 of the ECC block 912 are herein defined as a first column of sub-blocks, the next 13 sub-blocks SB13˜SB25 are defined as a second column of sub-blocks, and the last 13 sub-blocks SB26˜SB38 are defined as a third column of sub-blocks. Another difference between the syndrome generating device 900 and the prior embodiments is that the two syndrome memories 942 and 944 are alternated to store syndromes for the multiple columns of sub-blocks.
For example, if the first syndrome memory 942 is employed to store the syndromes for the first column of sub-blocks composed of the first 13 sub-blocks SB0˜SB12 of the ECC block 912, then the second syndrome memory 944 will be employed to store the syndromes for the second column of sub-blocks composed of the next 13 sub-blocks SB13˜SB25. As in the previous description, after the first 13 sub-blocks SB0˜SB12 are completely processed, the first syndrome memory 942 outputs the syndromes of the first column of sub-blocks to a RS decoder (not shown) to perform the error correction operation for the first 64 columns of the ECC block 912. At the same time, the syndrome generator 930 stores the syndromes of the second column of sub-blocks into the second syndrome memory 944 during the syndrome generation operation for the next 13 sub-blocks SB13˜SB25 of the ECC block 912. After the syndromes for the second column of sub-blocks are completely updated, the second syndrome memory 944 outputs the updated syndromes to the RS decoder, and the syndrome generator 930 stores the syndromes of the third column of sub-blocks into the first syndrome memory 942 during the syndrome generation operation for the last 13 sub-blocks SB26˜SB38 of the ECC block 912.
As a result, by utilizing the two data memories 922, 924 and the two syndrome memories 942 and 944, the syndrome generator 930 can continuously generate syndromes for the ECC block 912 and thereby significantly improving the syndrome generation performance. As an exemplary preferred embodiment, each of the data memories 922, 924 and the syndrome memories 942 and 944 can be implemented as an SRAM, such as a single-port SRAM. In practice, the two data memories 922 and 924 may be replaced by a two-port SRAM. Similarly, the two syndrome memories 942 and 944 can also be replaced by a two-port SRAM.
In practice, the disclosed syndrome generation methods of the present invention can be performed after the PI decoding phase is completed or be performed during the PI decoding phase. In the latter case, it is possible that only a portion of a target ECC block is stored in the first memory (e.g., 210 or 910) while another portion of the target ECC block does not yet be read from the optical storage medium. As long as a current sub-block to be processed by the syndrome generator is stored in the first memory, the syndrome generation methods of the present invention can be performed to generate the syndromes for use in the PO decoding. In other words, the syndrome generation operation for the PO decoding can be performed during the PI decoding phase. As a result, the decoding speed of the PO decoding phase can be thereby greatly improved without influencing the decoding speed of the PI decoding phase. Additionally, the proposed syndrome generation method can be performed on a whole ECC block or on a portion of columns of the ECC block.
In the foregoing embodiments, the symbols of the sub-block stored in the data memory to be processed by the syndrome generator are read from the first memory. This is merely an example rather than a limitation of practical applications of the present invention. In practice, the symbols of the target ECC block read from the optical storage medium are typically buffered in a buffer, which is arranged between the optical storage medium and the first memory, before they are wrote into the first memory. This stage is also referred to as a buffering phase. The PI decoding operation for the target ECC block may be performed in the buffering phase to reduce the bandwidth loading of the first memory. Similarly, the proposed syndrome generation method disclosed previously can be performed in the buffering phase.
For example, the symbols of the current sub-block to be stored in the data memory can instead be retrieved from the buffer in the buffering phase. Then, the disclosed syndrome generator can generate the syndromes of the target ECC block according to the symbols stored in the data memory as well as the foregoing embodiments and put the updated syndromes in the syndrome memory. After the target ECC block is wrote into the first memory, the error correction for the column direction of the target ECC block can be performed according to the updated syndromes stored in the syndrome memory without reading symbols from the first memory to the data memory to generate required syndromes. Obviously, the bandwidth requirement of the first memory can be therefore significantly reduced when correcting errors in the column direction of the target ECC block. In practice, the disclosed syndrome generation method can also be applied in data read from a blue-ray disc to reduce the memory bandwidth requirement of a reproducing system.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.