CN1773864A - Extended Reed-Solomon code decoding method which error-correcting capcity is 2 - Google Patents

Extended Reed-Solomon code decoding method which error-correcting capcity is 2 Download PDF

Info

Publication number
CN1773864A
CN1773864A CN 200410090805 CN200410090805A CN1773864A CN 1773864 A CN1773864 A CN 1773864A CN 200410090805 CN200410090805 CN 200410090805 CN 200410090805 A CN200410090805 A CN 200410090805A CN 1773864 A CN1773864 A CN 1773864A
Authority
CN
China
Prior art keywords
error
code word
mistake
data
situation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410090805
Other languages
Chinese (zh)
Other versions
CN1773864B (en
Inventor
张玉良
曹松
陈小敏
孙辉先
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Space Science Center of CAS
Original Assignee
National Space Science Center of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Space Science Center of CAS filed Critical National Space Science Center of CAS
Priority to CN 200410090805 priority Critical patent/CN1773864B/en
Publication of CN1773864A publication Critical patent/CN1773864A/en
Application granted granted Critical
Publication of CN1773864B publication Critical patent/CN1773864B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Error Detection And Correction (AREA)

Abstract

A decoding method of expanded Reed-Soloman code with error correction ability of 2 includes calculating out syndrome of data with error to be corrected, storing data in FIFO buffer, calculating auxiliary parameter according to syndrome calculation result, confirming number and scope of error code according said result and said parameter, calculating out error value error position as per different error situation, adding data in buffer with error value for correcting error, deleting calibration byte to finalize error correction decoding.

Description

A kind of error correcting capability is the interpretation method of extended Reed-Solomon code of 2
Technical field
The present invention relates to the Reed Solomon code that a kind of many mass storage adopts data are handled as error-control method, particularly relate to a kind of error correcting capability and be the interpretation method of extended Reed-Solomon code of 2.
Background technology
In transmission of Information and storage, because the interference of channel or ambient noise tends to cause transmission and canned data to make a mistake.1948, Shannon proposed information theory.Wherein, " thanks for your hospitality the channel coding theorem of discrete channel " and point out the technology of carrying out error control by the redundancy that increases information, be that information data is encoded before transmission and storage, when receiving and extract data, decipher, be corrected in the mistake that takes place in transmission and the storing process by redundant information.People have worked out multiple code word and coding and decoding method.Nineteen sixty, REED and SOLOMON have proposed Reed Solomon code, are called for short the RS sign indicating number.The RS sign indicating number has the ability of outstanding burst-error-correction, is widely used in radio communication and storage system.
Because RS sign indicating number self, the more complicated of the interpretation method of RS sign indicating number own, the Project Realization of interpretation method be difficulty relatively, and engineering cost is higher, and is difficult to the decoding speed that reaches desirable.A kind of decoder of RS sign indicating number can Project Realization and the cost of Project Realization and effect how, often become the whether practical decisive factor of this RS sign indicating number.And the Project Realization of RS decoder also becomes the focus of engineers and technicians' research and practice.
Mass storage is widely used in the storage in fields such as space flight, industry, consumer electronics.Rugged environment will cause the storage data that unpredictalbe mistake takes place; At magnetic, the optical storage media of consumer electronics field, also can be owing to the physics breakage causes loss of data and damage.Therefore, the correct reliable and zero access technology of data is one of key technologies of mass storage.At present, many mass storages have all adopted the RS sign indicating number that data are handled measure as error control.But, because mass storage self, as require to guarantee quite high memory capacity, high speed data access, control complex logic or the like all requires to adopt a kind of advantages of simplicity and high efficiency RS code word and effective interpretation method, fast operation, and be easy to Project Realization.
Summary of the invention
The objective of the invention is in order to overcome because the interpretation method complexity of RS sign indicating number, the slow shortcoming of decoder that is unfavorable for Project Realization or realization, thereby provide a kind of can in the mass storage through RS (256,252) coded data is carried out the high speed error-correcting decoding, correct two bytes with interior mistake, the error-correcting decoding method of the Reed Solomon code that whole error decoding circuit is all realized in programmable logic device (can be FPGA) chip, this method are applicable to that error correcting capability is 2 expansion RS sign indicating number.
Parameters related in the error-correcting decoding method of the present invention is:
S (S 0, S 1, S 2, S 3): syndrome (Syndrome);
H: check matrix;
R: data block to be decoded;
FIFO: first-in first-out buffer memory;
N: the number of code word in each data block to be decoded;
K: the number of information word in each data block to be decoded;
B 0, B 1, B 2, E, CO 0, CO 1: auxiliary parameter, wherein B 1, B 2Be used for the judgement of error situation; B 0, B 1, B 2It still is the coefficient of finding the solution the linear equation in two unknowns of wrong occurrence positions under the 5th kind of situation; E is an improper value under the 4th kind of error situation, CO 0, CO 1It is the coefficient of the 5th kind of improper value accounting equation under the error situation;
α: the primitive element of finite field;
(n-1, k): the former RS sign indicating number before the expansion, true form only can be corrected the mistake of 1 code word to RS.
(n, k): the RS sign indicating number after the expansion expands by increasing an additional check code word RS.Should additional check code word be the algebraical sum of a front n-1 code word.Expansion back code block has n code word, and n-k=4, can correct the mistake of two code words.
The error-correcting decoding method of a kind of Reed Solomon code provided by the present invention comprises the steps:
(1) at first the syndrome counting circuit is calculated in the input of data to decode piece, calculate syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits FIFO (first-in first-out buffer memory) in;
Wherein store the polynomial expression formula of data:
R (x)=r N-1x N-1+ ...+r 1x 1+ r 0, r wherein 0Be additional check code word;
By channel coding theorem, syndrome S:
S=R·H T=(S 0,S 1,S 2,S 3)=(r 0,r 1,...,r n-1)·H T
(2) calculate next step (3) and the needed auxiliary parameter B of step (4) 0, B 1, B 2, E, CO 0And CO 1Computing formula is as follows:
B 0 = S 1 2 + S 0 S 2
B 1 = S 2 2 + S 1 S 3
B 2=S 1S 2+S 0S 3
E=S 1S 2/S 3
CO 0=B0S 1/B 2
CO 1=B 1S 0/B 2
(3) according to the resulting syndrome S of step (1) (S 0, S 1, S 2, S 3), and the resulting auxiliary parameter of step (2), come the number of misjudgment code word and position or the scope that wrong code word occurs, select the improper value computation schema different again with errors present;
(4), obtain wrong position and corresponding error value again according to the estimate of situation of step (3);
(5) with the improper value addition of data in buffer and correspondence position, carry out error correction; All check code words of data are finished decoding after the amputation error correction.
In the step (3) of technique scheme, described basis for estimation:
First kind of situation illustrates that this blocks of data is correct, and mistake did not take place, and do not need to carry out error correction;
Second kind of situation illustrates that a mistake has taken place this blocks of data, appears at additional check code word, and just mistake has taken place last code word;
The third situation illustrates that a mistake has taken place this blocks of data, appears at additional check code word some code words in addition, and a mistake has taken place just preceding n-1 code word;
The 4th kind of situation illustrates that two mistakes have taken place this blocks of data, appears at additional check code word and certain non-add check code word, and mistake has taken place some code words in the just preceding n-1 code word, and mistake has also taken place last code word simultaneously;
The 5th kind of situation illustrates that two mistakes have taken place this blocks of data, appears at additional check code word two code words in addition, that is to say that mistake has taken place certain two code word in the preceding n-1 code word;
Other situations.For other wrong more than two any situations take place, (decoder can not be discerned for n, k) Ma error correction and error detecing capability, still is considered as the 5th kind of situation, sees Table 1 to exceed RS;
In the step (4) of technique scheme, according to the result of calculation of the judged result of step (3) and step (1), (2), the branch situation is carried out correction process:
For first kind of situation, directly the output buffers data do not process;
For second kind of situation, mistake appears in additional check byte, and its improper value is S 0
For the third situation, a mistake has appearred in the non-add check byte, and its improper value is S 0Bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake i
For the 4th kind of situation, the improper value of additional check byte is E+S 0, the improper value of non-add check byte is E, bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake in the non-add check byte i
For the 5th kind of situation, bit-error locations equation B 0i) 2+B 2α i+ B 1Separate α for two of=0 iAnd α jBe the position of making a mistake, corresponding improper value is respectively: CO 1α -i+ CO 0And CO 1α -j+ CO 0
The advantage of the inventive method is:
It is RS (256, the 252) sign indicating number of two bytes that error-correcting decoding method provided by the present invention adopts error correcting capability.Because RS (256,252) sign indicating number is RS (255,252) sign indicating number is by increasing the extended code that an additional check byte obtains, make the error correcting capability of mass storage bring up to 2 bytes from 1 byte, this error correcting capability enough can satisfy the needs of the memory device error control of space exploration, Industry Control and magnetic, light medium, and deciphers fairly simple.Another selects RS (256,252) Ma major reason is, in 256 bytes store data, the information data that 252 bytes are arranged, it is extra check byte that increase that 4 byte datas are only arranged, in whole storage data, account for very little ratio, so adopt this error control coding and decoding very little to the memory capacity influence.Simultaneously, the storage cell of digital storage equipment generally is 2 integral number power, and the operating unit of access instruction is also often with 2 integral number power.And RS (256,252) sign indicating number is by expansion, and the length of every block codewords is increased to 256 bytes from 255, and promptly 28 powers are very easy to use.This method error correcting capability is strong, and decoding is simple, and decoding speed is fast, particularly is easy to Project Realization.
Description of drawings
Fig. 1 is the flow chart of the method for a kind of error-correcting decoding provided by the invention;
Fig. 2 is a kind of RS (256,252) code error-correcting decoding block diagram of system of implementing the inventive method.
Fig. 3 is RS (256,252) the code error-correcting decoding chip circuit block diagram of implementing in the system of the inventive method.
Fig. 4 is the syndrome counting circuit block diagram of implementing in the system of the inventive method.
Fig. 5 is the finite field multiplication and division computing circuit block diagram of implementing in the system of the inventive method.
Fig. 6 A, Fig. 6 B, Fig. 6 C are respectively the finite field gfs of implementing in the system of the inventive method (2 8) element multiply by α, α 2And α 3Circuit block diagram.
Fig. 7 is a kind of work schedule signal waveforms of implementing system's chips of the inventive method.
The drawing explanation:
1 input interface circuit, 2 error decoding circuits, 3 error decoding circuits
4 output interface circuits, 5 syndrome counting circuits, 6 auxiliary parameter counting circuits
7 error situation decision circuitry, 8 fifo circuits, 9 improper values are by wrong position
Output circuit 10 error decoding circuits 11 error byte counting circuits
Circuit is selected in 91 error correction
A0, a1, a2, a3, a4, a5, a6, a7 1 bit register
B0, b1, b2, b3, b4, b5, b6, b7 1 bit register
C0, c1, c2, c3, c4, c5, c6, c7 1 bit register
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is done and to describe in further detail.
With RS (256,252) sign indicating number be example, uses method of the present invention to carry out the error-correcting decoding of RS (256,252) sign indicating number, and RS (256,252) is that to expand the error correcting capability that obtains from RS (255,252) be extended Reed-Solomon code of 2.
An existing correct RS (256,252) sign indicating number code word data, totally 256 byte datas according to input sequence are:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81;
(253)8′h86;
(254)8′h66;
(255)8′h06;
(256)8′h9D;
Above-mentioned data all represent with 16 systems, the width of the each input of " 8 " expression data, i.e. and figure place, " h " represents hexadecimal, wherein the data value of the 7th byte to the 251 bytes all is 8 ' h00.
Embodiment 1
Use interpretation method of the present invention that RS (256,252) sign indicating number is carried out error-correcting decoding, supposing does not in the present embodiment have mistake in RS (256, the 252) code word.The error-correcting decoding process is as follows.
1) at first with data to decode piece input syndrome counting circuit, calculates syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits FIFO (first-in first-out buffer memory) in; To deposit 256 byte datas in the first-in first-out buffer memory exactly in the present embodiment, and calculate syndrome, obtain the result of syndrome: S about these data 0=S 1=S 2=S 3=0.
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1, computing formula is B 0 = S 1 2 + S 0 S 2 ,
B 0 = S 2 2 + S 1 S 3 , B 2=S 1S 2+S 0S 3,E=S 1S 2/S 3,CO 0=B 0S 1/B 2,CO 1=B 1S 0/B 2
Readily appreciate that from the result of above-mentioned syndrome the value of above auxiliary parameter is 0 or does not exist.
3) from step 1) and 2) result of calculation S (S 0, S 1, S 2, S 3) and B 1, B 2, judge table 1 according to error situation, determine the number of wrong code word and position or the scope that wrong code word occurs,
The inventive method has following five kinds of estimate of situations:
If first kind of situation is S 0=S 1=S 2=S 3=0, illustrate that this blocks of data is correct, mistake did not take place, do not need to carry out error correction;
If second kind of situation is S 0≠ 0, S 1=S 2=S 3=0, illustrate that a mistake has taken place this blocks of data, appears at additional check code word;
If the third situation is S 1≠ 0, S 2≠ 0, S 3≠ 0, B 1=B 2=0, illustrate that a mistake has taken place this blocks of data, appear at additional check code word some code words in addition;
If the 4th kind of situation is S 1≠ 0, S 2≠ 0, S 3≠ 0, B 1=0, B 2≠ 0, illustrate that two mistakes have taken place this blocks of data, appear at additional check code word and certain non-add check code word;
If the 5th kind of situation is S 1≠ 0, S 2≠ 0, S 3≠ 0, B 1≠ 0, illustrate that two mistakes have taken place this blocks of data, appear at additional check code word two code words in addition;
Other situations, for other wrong more than two any situations take place, (decoder can not be discerned for n, k) Ma error correction and error detecing capability, still is considered as the 5th kind of situation to exceed RS;
In the present embodiment, judge it is first kind of situation by the result of calculation of syndrome in the step 1), promptly this blocks of data is correct, and mistake did not take place, and does not need to carry out error correction.
4) according to 3) judged result, the improper value that mistake in computation position and correspondence position occur;
The inventive method has five kinds of different dispositions:
For first kind of situation, directly the output buffers data do not process;
For second kind of situation, mistake appears in additional check byte, and its improper value is S 0
For the third situation, a mistake has appearred in the non-add check byte, and its improper value is S 0, bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake i
For the 4th kind of situation, the improper value of additional check byte is E+S 0, the improper value of non-add check byte is E, bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake in the non-add check byte i
For the 5th kind of situation, bit-error locations equation B 0i) 2+ B 2α i+ B 1Separate α for two of=0 iAnd α jBe the position of making a mistake, corresponding improper value is respectively: CO 1α -i+ CO 0And CO 1α -j+ CO 0
Specific to present embodiment, judge present embodiment by step 3) and belong to first kind of situation, so direct output buffers data.
5) with data in the buffer memory and improper value addition, carry out error correction; Last amputation check code word is finished error-correcting decoding.
In the present embodiment, data do not make a mistake, so this step can be skipped.
Final decode results:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81。
Embodiment 2
In the present embodiment,, become 8 ' h0D from 8 ' h9D if mistake has taken place the data of the 256th byte of above-mentioned correct RS (256,252) sign indicating number code word.Use interpretation method of the present invention that it is carried out error-correcting decoding.
1) at first with data to decode piece input syndrome counting circuit, calculates syndrome S (S 0, S 1, S 2, S 3), simultaneously, deposit the RS coded data R (x) that imports in FIFO (first-in first-out buffer memory).In the present embodiment, syndrome result of calculation is S 0=8 ' h90 ≠ 0, S 1=S 2=S 3=0.
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1, computing formula is B 0 = S 1 2 + S 0 S 2 , B 1 = S 2 2 + S 1 S 3 , B 2=S 1S 2+S 0S 3,E=S 1S 2/S 3,CO 0=B 0S 1/B 2,CO 1=B 1S 0/B 2
In the present embodiment, each auxiliary parameter is 0 or does not exist.
3) from step 1) and 2) result of calculation S (S 0, S 1, S 2, S 3) and B 1, B 2, judge table 1 according to error situation, determine the number of wrong code word and the position that wrong code word occurs, various possible estimate of situations are described in detail in embodiment 1.In the present embodiment, by S 0=8 ' h90 ≠ 0, S 1=S 2=S 3=0, judge this blocks of data a mistake has taken place, appear at additional check code word.
4) according to 3) judged result, the improper value that mistake in computation position and correspondence position occur; In the present embodiment, mistake occurs in additional check code word, and improper value is S 0, i.e. 8 ' h90.
5) with data in the buffer memory and improper value addition, carry out error correction; Last amputation check code word is finished error-correcting decoding.In the present embodiment, be about to last 1 byte 8 ' h0D improper value 8 ' h90 that " adds (XOR) ", obtain right value 8 ' h9D, finish error correction, last amputation check code word, dateout.Obtain:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81;
Embodiment 3
In the present embodiment,, become 8 ' h0A from 8 ' h01 if mistake has taken place the data of the 1st byte of above-mentioned correct RS (256,252) sign indicating number code word.Use interpretation method of the present invention that it is carried out error-correcting decoding.
1) at first with data to decode piece input syndrome counting circuit, calculates syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits FIFO (first-in first-out buffer memory) in; Will deposit 256 byte datas in the first-in first-out buffer memory exactly in the present embodiment, and calculate the syndrome about these data, the result is: S 0=8 ' h0B ≠ 0, S 1=8 ' h8B ≠ 0, S 2=8 ' hCB ≠ 0, S 3=8 ' hEB ≠ 0.
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1, computing formula is B 0 = S 1 2 + S 0 S 2 , B 1 = S 2 2 + S 1 S 3 , B 2=S 1S 2+S 0S 3,E=S 1S 2/S 3,CO 0=B 0S 1/B 2,CO 1=B 1S 0/B 2
In the present embodiment, the result of calculation of auxiliary parameter is: B 1=B 2=0.
3) from step 1) and 2) result of calculation S (S 0, S 1, S 2, S 3) and B 1, B 2, judge table 1 according to error situation, determine the number of wrong code word and the position that wrong code word occurs, various possible estimate of situations are described in detail in embodiment 1.In the present embodiment, by above-mentioned syndrome result and auxiliary parameter, as can be known: a mistake has taken place in this blocks of data, appears at additional check code word some code words in addition.
4) according to 3) judged result, the improper value that mistake in computation position and correspondence position occur; In the present embodiment, improper value is S 0, i.e. 8 ' h0B is by bit-error locations equation S 2+ S 1α i=0 asks the position alpha that makes a mistake i, the position that wrong code word occurs in the present embodiment is the 1st byte in code word as can be known.
5) with data in the buffer memory and improper value addition, carry out error correction; Last amputation check code word is finished error-correcting decoding.In the present embodiment, the 1st byte 8 ' h0A " adds (XOR) " improper value 8 ' h0B obtains right value 8 ' h01, and last amputation check byte obtains:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81。
Embodiment 4
In the present embodiment, if mistake has all taken place for the 3rd byte of above-mentioned correct RS (256,252) sign indicating number code word and the data of the 256th byte, the former has become 8 ' h8A from 8 ' h02, and the latter has become 8 ' h62 from 8 ' h9D.Use interpretation method of the present invention that it is carried out error-correcting decoding.
1) at first with data to decode piece input syndrome counting circuit, calculates syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits FIFO (first-in first-out buffer memory) in; Will deposit 256 byte datas in the first-in first-out buffer memory exactly in the present embodiment, and calculate the syndrome about these data, the result is: S 0=8 ' h77, S 1=8 ' h11 ≠ 0, S 2=8 ' hAF ≠ 0, S 3=8 ' h71 ≠ 0.
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1, computing formula is B 0 = S 1 2 + S 0 S 2 , B 1 = S 2 2 + S 1 S 3 , B 2=S 1S 2+S 0S 3,E=S 1S 2/S 3,CO 0=B 0S 1/B 2,CO 1=B 1S 0/B 2
In the present embodiment, B 1=0, B 2=8 ' h13 ≠ 0, E=8 ' h88.
3) from step 1) and 2) result of calculation S (S 0, S 1, S 2, S 3) and B 1, B 2, judge table 1 according to error situation, determine the number of wrong code word and the position that wrong code word occurs, various possible estimate of situations are described in detail in embodiment 1.In the present embodiment, by S 1≠ 0, S 2≠ 0, S 3≠ 0, B 1=0, B 2≠ 0, illustrate that two mistakes have taken place this blocks of data, appear at additional check code word and certain non-add check code word.
4) according to 3) judged result, the improper value that mistake in computation position and correspondence position occur; In the present embodiment, the improper value of additional check byte is E+S 0=8 ' h88+8 ' h77=8 ' hFF, the improper value of non-add check byte are E=8 ' h88, bit-error locations equation S 2+ S 1α i=0 separate is exactly the position alpha that makes a mistake in the non-add check byte i, result of calculation is that the 3rd byte makes a mistake.
5) with data in the buffer memory and improper value addition, carry out error correction; Last amputation check code word is finished error-correcting decoding.In the present embodiment, the 3rd byte 8 ' h8A " adds (XOR) " improper value 8 ' h88 obtains right value 8 ' h02, and last 1 byte 8 ' h62 adds 8 ' hFF, obtains right value 8 ' h9D.With data amputation check byte, obtain:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81。
Embodiment 5
In the present embodiment, if mistake has all taken place for the 1st byte of above-mentioned correct RS (256,252) sign indicating number code word and the data of the 4th byte, the former has become 8 ' h9E from 8 ' h01, and the latter has become 8 ' hFB from 8 ' h04.Use interpretation method of the present invention that it is carried out error-correcting decoding.
1) at first with data to decode piece input syndrome counting circuit, calculates syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits FIFO (first-in first-out buffer memory) in; In the present embodiment, the result of calculation of syndrome is S 1=8 ' h72 ≠ 0, S 2=8 ' h90 ≠ 0, S 3=8 ' h14 ≠ 0.
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1, computing formula is B 0 = S 1 2 + S 0 S 2 , B 1 = S 2 2 + S 1 S 3 , B 2=S 1S 2+S 0S 3,E=S 1S 2/S 3,CO 0=B 0S 1/B 2,CO 1=B 1S 0/B 2
In the present embodiment, B 1=8 ' hA8 ≠ 0, CO 0=8 ' h41, CO 1=8 ' h6F.
3) from step 1) and 2) result of calculation S (S 0, S 1, S 2, S 3) and B 1, B 2, judge table 1 according to error situation, determine the number of wrong code word and the position that wrong code word occurs, various possible estimate of situations are described in detail in embodiment 1.In the present embodiment, S 1≠ 0, S 2≠ 0, S 3≠ 0, B 1≠ 0, illustrate that two mistakes have taken place this blocks of data, appear at additional check code word two code words in addition.
4) according to 3) judged result, the improper value that mistake in computation position and correspondence position occur; In the present embodiment, by bit-error locations equation B 0i) 2+ B 2α i+ B 1Separate α for two of=0 iAnd α jObtain the position of making a mistake, corresponding improper value is respectively: CO 1α -i+ CO 0And CO 1α -j+ CO 0With the correlation substitution, the code word that makes a mistake as can be known is respectively the 1st byte and the 4th byte, and improper value is respectively 8 ' h9F and 8 ' hFF.
5) with data in the buffer memory and improper value addition, carry out error correction; Last amputation check code word is finished error-correcting decoding.In the present embodiment, the 1st byte 8 ' h9E " adds (XOR) " improper value 8 ' h9F obtains right value 8 ' h01, and the 4th byte 8 ' hFB adds 8 ' hFF, obtains right value 8 ' h04.Last amputation check byte obtains:
(1)8’h01;
(2)8′h02;
(3)8′h02;
(4)8′h04;
(5)8′h0F;
(6)8′hF0;
(7)-(251)8′h00;
(252)8′h81。
Error correction method of the present invention is to carry out on referring to the system that Fig. 2 did, and the RS that present embodiment provides (256,252) code error-correcting decoding system comprises input interface circuit 1, error decoding circuit 2 and 3, and output interface circuit 4.Input interface circuit 1 is connected with concrete system environments on the one hand, from system, obtain clock, reset, read and write control, control signal and data/address signal such as sheet choosing, link to each other with 3 with error decoding circuit 2 on the other hand, supply with error decoding circuit correct data input and error-correcting decoding enable signal.Output interface circuit 4 is connected with 3 with error decoding circuit 2, obtains the error-correcting decoding result, and to subordinate equipment output serial data and serial data clock.
Error decoding circuit is the core of the chip that provides of present embodiment.Referring to Fig. 3.256 byte datas enter syndrome counting circuit 5 and calculate syndrome, and data enter fifo circuit 8 simultaneously.Auxiliary parameter counting circuit 6 is connected with circuit 5, calculates auxiliary parameter according to the output of syndrome counting circuit 5.Error situation decision circuitry 7 is connected with auxiliary parameter counting circuit 6 with syndrome counting circuit 5 respectively, calculates 6 result of calculation according to syndrome counting circuit 5 and auxiliary parameter, and circuit 7 is judged the error situation of 256 byte datas.Errors present is connected with circuit 7 by wrong position output circuit 9, according to the output result of error situation decision circuitry 7, improper value selects circuit 91 to select different submodules 92,93 by the error correction in the wrong position output circuit 9,94 or 95, according to errors present output error value.The output of last each submodule is selected 96 outputs by multichannel.The output of the output of fifo circuit 8 and circuit 9 all is connected to error decoding circuit 10, realizes error-correcting decoding.Error byte counting circuit 11 links to each other with error situation decision circuitry 7, obtains the error byte number, and back output adds up.
In error decoding circuit, syndrome counting circuit 5 is referring to Fig. 4.In each clock cycle, S 0Add up with the parallel data of input; S 1, S 2And S 3The result of last computation multiply by α, α respectively in the register 2And α 3, and with 8 parallel-by-bit data additions, the result still preserves back former register.After 256 clock cycle, what preserve in each register is exactly syndrome result of calculation.
Finite field gf (2 in the syndrome counting circuit 5 8) element multiply by α, α 2And α 3Circuit referring to Fig. 6 A, Fig. 6 B, Fig. 6 C.
The realization of multiplication and division arithmetic in the auxiliary parameter counting circuit 6 utilizes finite field gf (2 8) element and itself be with respect to the corresponding relation between the power of primitive element time, field element is mapped to the index of oneself by tabling look-up, multiplication and divide operations are converted to the addition and the subtraction of mould 255, again the result of mould plus and minus calculation is shone upon back finite field at last.Each computing is all tabled look-up by twice and one-off pattern adds and finishes.Direct transform that this circuit is realized and inverse transformation need two mapping tables, and each table is realized with the RAM of 256 bytes.Because finite field element 0 can't shine upon, so, when having one to be 0 in the element that carries out computing, do not need to shine upon the computing of adding and subtracting with mould 255, directly export result of calculation 0.If though divisor is 0 result of calculation also is 0, there is not physical significance, the parameter (E, the CO that calculate by division circuit 0And CO 1) service condition, guaranteed that divisor is not 0 when carrying out these division calculation, result of calculation is correct.
Such implementation has not only been saved logical resource valuable in the programmable logic device chip, and has made full use of the block RAM resource of chip.Multiplication of realizing and division circuit at most only need 4 clock cycle, but this implementation requires chip to have certain block RAM capacity.The specific implementation circuit is referring to Fig. 5.
Improper value is by wrong position output circuit 9, and the circuit of mistake in computation value in the circuit of mistake in computation position and the submodule 95 all is by Fig. 6 A in the submodule 93,94 and 95 wherein, the finite field gf (2 among Fig. 6 B and Fig. 6 C 8) element multiply by α, α 2And α 3Circuit is realized.
Fig. 7 is the clock signal oscillogram of error decoding circuit.CLK is a clock signal among the figure, and RST is a reset signal, and ENIN treats that for input error-correcting decoding data, ECASE are error situation for input enable signal, RS, and M is data behind the error-correcting decoding, and ENOUT is an output enable.Through 14 clock cycle, export first byte behind the every 256 byte data input error decoding circuit through error-correcting decoding; Through 13 clock cycle, this circuit can begin to receive new a collection of 256 byte datas; Each treats that error correction entered behind the error decoding circuit through 270 clock cycle, exported corresponding error-correcting decoding result.
Table 1 error situation is judged table
Wherein, "/" is illustrated in and do not consider this value when judging

Claims (8)

1. an error correcting capability is the interpretation method of 2 expansion RS sign indicating number, comprises the steps:
1) at first the syndrome counting circuit is calculated in the input of data to decode piece, calculate syndrome S (S 0, S 1, S 2, S 3); Simultaneously, the RS coded data R (x) with input deposits first-in first-out buffer memory FIFO in;
Wherein store the polynomial expression formula of data:
R (x)=r N-1x N-1+ ... + r 1x 1+ r 0, r wherein 0Be additional check code word;
By channel coding theorem, syndrome S:
S=R·H T=(S 0,S 1,S 2,S 3)=(r 0,r 1,…,r n-1)·H T
2) according to the syndrome result of calculation S (S of step 1) 0, S 1, S 2, S 3), calculation procedure 3) and the auxiliary parameter B that needs of step 4) 0, B 1, B 2, E, CO 0And CO 1
Wherein computing formula is B 0 = S 1 2 + S 0 S 2 ;
B 1 = S 2 2 + S 1 S 3 ;
B 2=S 1S 2+S 0S 3
E=S 1S 2/S 3
CO 0=B 0S 1/B 2
CO 1=B 1S 0/B 2
3) from the result of calculation S (S of step 1) 0, S 1, S 2, S 3) and step 2) resulting auxiliary parameter B 1, B 2, judge table according to error situation, come the number of misjudgment code word and position or the scope that wrong code word occurs, select the improper value computation schema different again with errors present;
4) according to the judged result of step 3), the improper value that occurs of mistake in computation position and correspondence position again;
5) with data in the buffer memory and the resulting improper value addition of step 4), carry out error correction; Last amputation check code word is finished error-correcting decoding.
2. a kind of error correcting capability according to claim 1 is the interpretation method of 2 expansion RS sign indicating number, it is characterized in that: in the step (3), and described basis for estimation:
First kind of situation illustrates that this blocks of data is correct, and mistake did not take place, and do not need to carry out error correction;
Second kind of situation illustrates that a mistake has taken place this blocks of data, appears at additional check code word, and just mistake has taken place last code word;
The third situation illustrates that a mistake has taken place this blocks of data, appears at additional check code word some code words in addition, and a mistake has taken place just preceding n-1 code word;
The 4th kind of situation illustrates that two mistakes have taken place this blocks of data, appears at additional check code word and certain non-add check code word, and mistake has taken place some code words in the just preceding n-1 code word, and mistake has also taken place last code word simultaneously;
The 5th kind of situation illustrates that two mistakes have taken place this blocks of data, appears at additional check code word two code words in addition, that is to say that mistake has taken place certain two code word in the preceding n-1 code word;
Other situations.For other wrong more than two any situations take place, (decoder can not be discerned for n, k) Ma error correction and error detecing capability, still is considered as the 5th kind of situation to exceed RS.
3. a kind of error correcting capability according to claim 2 is the interpretation method of 2 expansion RS sign indicating number, it is characterized in that: for first kind of situation, directly the output buffers data do not process.
4. a kind of error correcting capability according to claim 2 is the interpretation method of 2 expansion RS sign indicating number, and it is characterized in that: for second kind of situation, mistake appears in additional check byte, and its improper value is S 0
5. a kind of error correcting capability according to claim 2 is the interpretation method of 2 expansion RS sign indicating number, and it is characterized in that: for the third situation, a mistake has appearred in the non-add check byte, and its improper value is S 0, bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake i
6. a kind of error correcting capability according to claim 2 is the interpretation method of 2 expansion RS sign indicating number, it is characterized in that: for the 4th kind of situation, the improper value of additional check byte is E+S 0, the improper value of non-add check byte is E, bit-error locations equation S 2+ S 1α i=0 separate is the position alpha that makes a mistake in the non-add check byte i
7. a kind of error correcting capability according to claim 2 is the interpretation method of 2 expansion RS sign indicating number, it is characterized in that: for the 5th kind of situation, bit-error locations equation B 0i) 2+ B 2α i+ B 1Separate α for two of=0 iAnd α jBe the position of making a mistake, corresponding improper value is respectively: CO 1α -i+ CO 0And CO 1α -j+ CO 0
8, a kind of error correcting capability according to claim 1 is the interpretation method of 2 expansion RS sign indicating number, it is characterized in that: according to code word number that makes a mistake and the wrong scope that occurs, select different improper values and errors present account form to carry out error-correcting decoding.
CN 200410090805 2004-11-12 2004-11-12 Extended Reed-Solomon code decoding method which error-correcting capcity is 2 Expired - Fee Related CN1773864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410090805 CN1773864B (en) 2004-11-12 2004-11-12 Extended Reed-Solomon code decoding method which error-correcting capcity is 2

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410090805 CN1773864B (en) 2004-11-12 2004-11-12 Extended Reed-Solomon code decoding method which error-correcting capcity is 2

Publications (2)

Publication Number Publication Date
CN1773864A true CN1773864A (en) 2006-05-17
CN1773864B CN1773864B (en) 2010-05-05

Family

ID=36760660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410090805 Expired - Fee Related CN1773864B (en) 2004-11-12 2004-11-12 Extended Reed-Solomon code decoding method which error-correcting capcity is 2

Country Status (1)

Country Link
CN (1) CN1773864B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431338B (en) * 2007-11-07 2011-06-15 中国科学院微电子研究所 Self-adapting Reed-Solomon encoder
CN101692612B (en) * 2009-05-27 2012-10-17 华为技术有限公司 Multi-specification Reed-Solomon encoding and decoding method, device and system
CN102929742A (en) * 2012-10-29 2013-02-13 无锡江南计算技术研究所 Single particle fault-tolerance method for any bit width storage interface of 18 particles
CN110489268A (en) * 2019-08-05 2019-11-22 南开大学 A kind of two-stage error correction/encoding method and system applied to storage system in adverse circumstances on star
CN112688693A (en) * 2020-12-14 2021-04-20 海光信息技术股份有限公司 Memory multi-matrix coding method, error correction method and related device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3233860B2 (en) * 1996-10-25 2001-12-04 松下電器産業株式会社 Reed-Solomon decoder
TW510086B (en) * 1998-12-11 2002-11-11 Matsushita Electric Ind Co Ltd Reed-solomon decode device and the control method of the same
TW522657B (en) * 2002-01-17 2003-03-01 Via Tech Inc PGZ algorithm based multi-mode Reed-Solomon decoder and its method
US7206993B2 (en) * 2003-03-12 2007-04-17 Matsushita Electric Industrial Co., Ltd. Method and device for decoding Reed-Solomon code or extended Reed-Solomon code

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431338B (en) * 2007-11-07 2011-06-15 中国科学院微电子研究所 Self-adapting Reed-Solomon encoder
CN101692612B (en) * 2009-05-27 2012-10-17 华为技术有限公司 Multi-specification Reed-Solomon encoding and decoding method, device and system
CN102929742A (en) * 2012-10-29 2013-02-13 无锡江南计算技术研究所 Single particle fault-tolerance method for any bit width storage interface of 18 particles
CN102929742B (en) * 2012-10-29 2015-04-08 无锡江南计算技术研究所 Single particle fault-tolerance method for any bit width storage interface of 18 particles
CN110489268A (en) * 2019-08-05 2019-11-22 南开大学 A kind of two-stage error correction/encoding method and system applied to storage system in adverse circumstances on star
CN112688693A (en) * 2020-12-14 2021-04-20 海光信息技术股份有限公司 Memory multi-matrix coding method, error correction method and related device
CN112688693B (en) * 2020-12-14 2023-12-05 海光信息技术股份有限公司 Memory multi-matrix coding method, error correction method and related device

Also Published As

Publication number Publication date
CN1773864B (en) 2010-05-05

Similar Documents

Publication Publication Date Title
CN1153354C (en) Error-correcting encoder, error-correcting decoder and data transmitting system with error-correctincodes
CN1084966C (en) Error correction coding and decoding method, and circuit using said method
CN1113295C (en) Error correcting encoding set
CN1630204A (en) CRC computing method and system having matrix conversion technology
CN1516381A (en) Processing unit and processing method
CN1310458C (en) Method for coding/decoding a stream of coded digital data with bit-interleaving in multiple transmission and in reception in the presence of intersymbol interference and corresponding system
CN1164039C (en) Reed-solomon code device and coding method
CN1274202A (en) Alternate method, alternating device, accelerating coding method and accelerating coding device
CN1008316B (en) Decoding method and system for error correcting codes
CN1692557A (en) Encoding device, encoding method, encoding program, decoding device, decoding method, decoding program
CN1094609C (en) Arithmetic equipment
CN1838542A (en) Decoding apparatus and method and program
CN1836394A (en) Apparatus and method for coding/decoding block ldpc codes in a mobile communication system for maximizing error correction performance and minimizing coding complexity
CN1179488C (en) Digital transmission system and method comprising punctured product code combined with quadrature amplitude modulation
CN1171389C (en) Parallet CRC generation circuit for generating a CRC code
CN1637713A (en) (18, 9) error correction code for double error correction and triple error detection
CN1685621A (en) Method and apparatus for deinterleaving interleaved data stream in a communication system
CN1701517A (en) Decoding device and method, program recording medium, and program
CN1653699A (en) Method of soft-decision decoding of reed-solomon codes
CN101064591A (en) Decoding method for low density parity check code and its check node refreshing circuit
CN1427548A (en) Iterative chain code decoding circuit and encoding/decoding system with same
CN1173480C (en) Weitebi decoder and transmission equipment
CN1773864A (en) Extended Reed-Solomon code decoding method which error-correcting capcity is 2
CN1968024A (en) A coding method of convolution code
CN1160726C (en) Error correction device and optical disk reader comprising such device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100505

Termination date: 20151112

EXPY Termination of patent right or utility model