TWI387214B - Method and circuit for decoding an error correction code - Google Patents

Method and circuit for decoding an error correction code Download PDF

Info

Publication number
TWI387214B
TWI387214B TW98111798A TW98111798A TWI387214B TW I387214 B TWI387214 B TW I387214B TW 98111798 A TW98111798 A TW 98111798A TW 98111798 A TW98111798 A TW 98111798A TW I387214 B TWI387214 B TW I387214B
Authority
TW
Taiwan
Prior art keywords
error
code
polynomial
coefficients
assumed
Prior art date
Application number
TW98111798A
Other languages
Chinese (zh)
Other versions
TW201031127A (en
Inventor
Tsung Chieh Yang
Original Assignee
Silicon Motion Inc
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 Silicon Motion Inc filed Critical Silicon Motion Inc
Priority to US12/479,833 priority Critical patent/US8370727B2/en
Publication of TW201031127A publication Critical patent/TW201031127A/en
Application granted granted Critical
Publication of TWI387214B publication Critical patent/TWI387214B/en

Links

Landscapes

  • Error Detection And Correction (AREA)

Description

糾錯碼的解碼方法及電路Error correction code decoding method and circuit

本發明係有關於糾錯碼,特別是有關於糾錯碼之解碼。The present invention relates to error correcting codes, and more particularly to decoding of error correcting codes.

糾錯碼(error correction code)係用於修正資料的錯誤。通信系統所傳輸的資料於傳輸端傳送前經常事先被編碼為糾錯碼。當接收端收到糾錯碼資料時,即使資料於傳輸過程中遭受損毀而產生隨機錯誤,亦可藉解碼糾錯碼而回復正確的資料。同樣的,資料儲存系統亦經常在儲存資料前將所儲存的資料編碼為糾錯碼。當資料於儲存過程中遭受損毀而產生隨機錯誤時,亦可藉解碼糾錯碼而回復正確的資料。常見的糾錯碼如BCH碼(Bose,Ray-Chaudhuri,and Hocquenghem code)及RS碼(Reed-Solomon code)。BCH碼常用於快閃記憶體資料的儲存,而RS碼常用於光碟資料的儲存。The error correction code is used to correct the error of the data. The data transmitted by the communication system is often encoded as an error correction code before being transmitted on the transmission side. When the receiving end receives the error correcting code data, even if the data is corrupted during transmission, a random error is generated, and the correct data can be recovered by decoding the error correcting code. Similarly, data storage systems often encode stored data as error correction codes before storing the data. When the data is corrupted during storage and a random error occurs, the correct error can also be recovered by decoding the error correction code. Common error correction codes such as BCH (Bose, Ray-Chaudhuri, and Hocquenghem code) and RS code (Reed-Solomon code). BCH codes are often used for the storage of flash memory data, while RS codes are often used for the storage of optical disc data.

當資料儲存系統欲取出其所儲存的資料時,所取出的為編碼後的糾錯碼,因此在資料使用前必須先將糾錯碼解碼,以還原為原始資料。第1圖為解碼糾錯碼之習知方法100的流程圖。此處以BCH碼為糾錯碼之釋例以進行說明。首先,解碼電路接收一BCH碼(步驟102)。接著,解碼電路依據該BCH碼計算一症狀碼(syndrome)(步驟104)。接著,解碼電路檢查是否該症狀碼為零(步驟106)。若症狀碼為零,表示該BCH碼沒有發生錯誤,因此不需進一步的修正。反之,若症狀碼不為零,表示BCH碼有錯誤發生,因此必須對BCH碼進行修正。When the data storage system wants to take out the stored data, the extracted error correcting code is taken. Therefore, the error correcting code must be decoded before the data is used to be restored to the original data. FIG. 1 is a flow diagram of a conventional method 100 of decoding an error correction code. Here, the BCH code is taken as an explanation of the error correction code for explanation. First, the decoding circuit receives a BCH code (step 102). Next, the decoding circuit calculates a symptom code based on the BCH code (step 104). Next, the decoding circuit checks if the symptom code is zero (step 106). If the symptom code is zero, it means that there is no error in the BCH code, so no further correction is needed. On the other hand, if the symptom code is not zero, it indicates that an error occurs in the BCH code, so the BCH code must be corrected.

首先,解碼電路依據該症狀碼依次計算一錯誤多項式(error-location polynomial)的多個係數(步驟108)。該錯誤多項式之係數的計算係以迴圈的方式,逐次產生由低次係數直到高次係數。因此,必須持續迴圈執行步驟108到產生該錯誤多項式的最高次係數為止,才將係數計算完畢,而得到完整的錯誤多項式(步驟110)。接著,解碼電路執行一秦氏搜尋(Chien search)以找出該錯誤多項式之根(步驟112)。該錯誤多項式之根便指示BCH碼中發生錯誤的位元之位置,因此解碼電路便可依據該錯誤多項式之根修正該BCH碼(步驟114),而得到無錯誤的BCH碼。First, the decoding circuit sequentially calculates a plurality of coefficients of an error-location polynomial according to the symptom code (step 108). The calculation of the coefficients of the error polynomial is sequentially generated from the low-order coefficient to the high-order coefficient in a loop manner. Therefore, it is necessary to continue the loop execution step 108 until the highest-order coefficient of the error polynomial is generated, and then the coefficient is calculated to obtain a complete error polynomial (step 110). Next, the decoding circuit performs a Chien search to find the root of the error polynomial (step 112). The root of the error polynomial indicates the location of the bit in the BCH code where the error occurred, so the decoding circuit can correct the BCH code based on the root of the error polynomial (step 114), resulting in an error-free BCH code.

第2圖顯示習知解碼糾錯碼之時序圖。自時點ta 開始,解碼電路首先於時段T1 中計算糾錯碼之症狀碼(步驟202)。自時點tb 開始,解碼電路接著於時段T2 中依據症狀碼計算糾錯碼之錯誤多項式之係數(步驟204)。自時點tc 開始,解碼電路接著於時段T3 中進行秦氏搜尋以找出錯誤多項式之根,而得到糾錯碼之錯誤位元的位置(步驟206)。因此,解碼糾錯碼之整個時程需要(T1 +T2 +T3 )的時間。Figure 2 shows a timing diagram of a conventional decoding error correction code. Starting from time t a , the decoding circuit first calculates the symptom code of the error correction code in time period T 1 (step 202). T b from the start point, then the decoding circuit 2 on the basis of the period T symptoms error correction code calculation of the coefficients of the polynomial of the code (step 204). Since the start time point t c, Qin search followed by the decoding circuit to identify the root of the error polynomial in the period T 3, the obtained position of the error bit of an error correction code (step 206). Therefore, the entire time history of decoding the error correction code requires a time of (T 1 + T 2 + T 3 ).

由於解碼糾錯碼是通訊系統之接收端、及光碟機或快閃記憶體讀取資料之必要步驟,因此若加速糾錯碼之解碼會大大提升通訊系統及如光碟機或快閃記憶體之資料儲存系統的效能。然而,由於資料錯誤係隨機發生,第2圖的步驟202、204、206的需要時間T1 、T2 、T3 很難大幅縮短。因此,需要一種加速糾錯碼之解碼的方法,以提升對糾錯碼進行解碼的通訊系統及資料儲存系統的效能。Since decoding the error correcting code is a necessary step for the receiving end of the communication system and the optical disk drive or the flash memory to read the data, if the decoding of the error correcting code is accelerated, the communication system, such as the optical disk drive or the flash memory, is greatly improved. The performance of the data storage system. However, since data errors occur randomly, the required times T 1 , T 2 , and T 3 of steps 202, 204, and 206 of FIG. 2 are difficult to be greatly shortened. Therefore, there is a need for a method of accelerating the decoding of error correcting codes to improve the performance of communication systems and data storage systems for decoding error correcting codes.

有鑑於此,本發明之目的在於提供一種糾錯碼(error correction code)的解碼方法,以解決習知技術存在之問題。首先,依據該糾錯碼計算一症狀碼(syndrome)。接著,依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數。每當計算得到該等係數中之一新產生係數時,檢查該新產生係數是否為零。當該新產生係數為零時,依據已計算得到且次數低於該新產生係數之多個低次項係數建立一假定錯誤多項式。接著,執行一秦氏搜尋(Chien search)以找出該假定錯誤多項式之根。最後,依據該假定錯誤多項式之根修正該糾錯碼。In view of the above, it is an object of the present invention to provide a decoding method for an error correction code to solve the problems of the prior art. First, a symptom code (syndrome) is calculated based on the error correction code. Then, a plurality of coefficients of an error-location polynomial are sequentially calculated according to the symptom code. Whenever one of the coefficients is newly calculated, it is checked whether the newly generated coefficient is zero. When the new generation coefficient is zero, a hypothetical error polynomial is established based on the plurality of low order term coefficients that have been calculated and whose number is lower than the newly generated coefficient. Next, perform a Chien search to find the root of the assumed error polynomial. Finally, the error correcting code is modified in accordance with the root of the assumed error polynomial.

本發明更提供一種糾錯碼(error correction code)的解碼方法。首先,依據一糾錯碼計算一症狀碼(syndrome)。接著,依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數。當該錯誤多項式之該等係數仍未計算完畢時,同時執行一秦氏搜尋(Chien search)以找出一假定錯誤多項式之根,其中該假定錯誤多項式係依據已計算得到之該錯誤多項式之部分係數而決定。最後,依據該假定錯誤多項式之根修正該糾錯碼。The present invention further provides a decoding method of an error correction code. First, a symptom code (syndrome) is calculated based on an error correction code. Then, a plurality of coefficients of an error-location polynomial are sequentially calculated according to the symptom code. When the coefficients of the error polynomial are still not calculated, a Chien search is performed to find the root of a hypothetical error polynomial, which is based on the calculated portion of the error polynomial. Determined by the coefficient. Finally, the error correcting code is modified in accordance with the root of the assumed error polynomial.

本發明提供一種糾錯碼(error correction code)的解碼電路。於一實施例中,該解碼電路包括一症狀碼計算模組、一錯誤多項式計算模組、一控制模組、以及一秦氏搜尋(Chien search)模組。該症狀碼計算模組依據一糾錯碼計算一症狀碼(syndrome)。當該症狀碼不為零時,該錯誤多項式計算模組依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數。每當該錯誤多項式計算模組計算得到該等係數中之一新產生係數時,該控制模組檢查該新產生係數是否為零,以及當該新產生係數為零時,發送一啟動信號。當自該控制模組收到該啟動信號時,該秦氏搜尋模組依據該錯誤多項式計算模組已計算得到且次數低於該新產生係數之多個低次項係數建立一假定錯誤多項式,以及執行一秦氏搜尋以找出該假定錯誤多項式之根,以供該糾錯碼之錯誤修正。The present invention provides a decoding circuit for an error correction code. In one embodiment, the decoding circuit includes a symptom code calculation module, an error polynomial calculation module, a control module, and a Chien search module. The symptom code calculation module calculates a symptom code according to an error correction code. When the symptom code is not zero, the error polynomial calculation module sequentially calculates a plurality of coefficients of an error-location polynomial according to the symptom code. Whenever the error polynomial calculation module calculates one of the coefficients to generate a new generation coefficient, the control module checks whether the newly generated coefficient is zero, and when the new generation coefficient is zero, sends a start signal. When the start signal is received from the control module, the Qin search module establishes a hypothetical error polynomial according to the plurality of low-order coefficients calculated by the error polynomial calculation module and the number of times lower than the newly generated coefficient, and A Qin search is performed to find the root of the assumed error polynomial for error correction of the error correction code.

為了讓本發明之上述和其他目的、特徵、和優點能更明顯易懂,下文特舉數較佳實施例,並配合所附圖示,作詳細說明如下:The above and other objects, features, and advantages of the present invention will become more apparent and understood.

第3圖為依據本發明之糾錯碼之解碼電路300的區塊圖。於一實施例中,解碼電路300包括症狀碼計算電路302、錯誤多項式計算模組304、秦式搜尋模組306、控制模組308、以及錯誤修正模組310。第4圖為依據本發明之糾錯碼的解碼方法400的流程圖。解碼電路300係依據第4圖之方法400運作,以對BCH糾錯碼進行解碼。於後續的實施例中,糾錯碼均以BCH碼為釋例,但本發明之方法電路同樣適用於RS碼。解碼電路300依據方法400運作時,可以大大縮短BCH糾錯碼的解碼所需時間,因而提升應用解碼電路300之系統的效能。Figure 3 is a block diagram of a decoding circuit 300 for an error correcting code in accordance with the present invention. In one embodiment, the decoding circuit 300 includes a symptom code calculation circuit 302, an error polynomial calculation module 304, a Qin search module 306, a control module 308, and an error correction module 310. Figure 4 is a flow diagram of a method 400 of decoding an error correcting code in accordance with the present invention. The decoding circuit 300 operates in accordance with the method 400 of FIG. 4 to decode the BCH error correcting code. In the following embodiments, the error correction codes are all based on the BCH code, but the method circuit of the present invention is equally applicable to the RS code. When the decoding circuit 300 operates according to the method 400, the time required for decoding the BCH error correction code can be greatly shortened, thereby improving the performance of the system applying the decoding circuit 300.

首先,症狀碼計算模組302接收一BCH碼(步驟402)。接著,症狀碼計算模組302依據該BCH碼計算一症狀碼(syndrome)(步驟404)。接著,症狀碼計算模組302檢查是否計算得到的該症狀碼為0(步驟406)。若症狀碼為0,表示該BCH碼未發生錯誤,因此不需要對BCH碼進行修正。若症狀碼不為0,表示該BCH碼發生錯誤,需要對BCH碼進行修正。因此,當症狀碼不為0時,症狀碼計算模組302將計算得到的該症狀碼遞送至錯誤多項式計算模組304,以進行錯誤多項式(error-location polynomial)的計算。First, the symptom code calculation module 302 receives a BCH code (step 402). Next, the symptom code calculation module 302 calculates a symptom code according to the BCH code (step 404). Next, the symptom code calculation module 302 checks if the calculated symptom code is 0 (step 406). If the symptom code is 0, it means that there is no error in the BCH code, so there is no need to correct the BCH code. If the symptom code is not 0, it indicates that the BCH code has an error, and the BCH code needs to be corrected. Therefore, when the symptom code is not 0, the symptom code calculation module 302 delivers the calculated symptom code to the error polynomial calculation module 304 to perform an error-location polynomial calculation.

接著,錯誤多項式計算模組304依據症狀碼依序計算錯誤多項式的多個係數Λ12 ,...,Λt (步驟408)。於一實施例中,錯誤多項式計算模組304對該等係數之計算的次序係依由錯誤多項式之一次項係數Λ1 、二次項係數Λ2 、進而逐次計算到一最高次項係數Λt 。每當錯誤多項式計算模組304執行一次迴圈,才會產生錯誤多項式的一個i次項係數Λi 。錯誤多項式計算模組304將持續運作,直到錯誤多項式的所有係數Λ12 ,...,Λt 均計算完畢為止。因此,當錯誤多項式計算模組304計算完畢,可得到如下式之錯誤多項式:1+Λ1 x+Λ2 x2 +…+Λ i x i +…+Λ t x t Next, the error polynomial calculation module 304 sequentially calculates a plurality of coefficients Λ 1 , Λ 2 , . . . , Λ t of the error polynomial according to the symptom code (step 408). In one embodiment, the order of calculation of the equal coefficients by the error polynomial calculation module 304 is sequentially calculated to a highest order coefficient Λ t according to the first term coefficient Λ 1 and the quadratic coefficient Λ 2 of the error polynomial. Each time the error polynomial calculation module 304 performs a loop, an i-th order coefficient Λ i of the error polynomial is generated. The error polynomial calculation module 304 will continue to operate until all coefficients Λ 1 , Λ 2 , ..., Λ t of the error polynomial are calculated. Therefore, when the error polynomial calculation module 304 is calculated, an error polynomial of the following formula is obtained: 1 + Λ 1 x + Λ 2 x 2 + ... + Λ i x i +... + Λ t x t .

於第1、2圖之習知解碼方式100中,錯誤多項式計算模組必須將錯誤多項式的所有係數Λ12 ,...,Λt 均計算完畢,才會進行秦式搜尋,以找出錯誤多項式的根。然而,於依據本發明的解碼方法400下,不須等到錯誤多項式計算模組304將錯誤多項式的所有係數Λ12 ,...,Λt 均計算完畢,便可進行秦式搜尋,以節省解碼過程的整體時間。In the conventional decoding method 100 of Figures 1 and 2, the error polynomial calculation module must calculate all the coefficients Λ 1 , Λ 2 , ..., Λ t of the error polynomial before the Qin search is performed. Find the root of the error polynomial. However, in the decoding method 400 according to the present invention, it is not necessary to wait until the error polynomial calculation module 304 calculates all the coefficients Λ 1 , Λ 2 , ..., Λ t of the error polynomial, and then performs the Qin search. To save the overall time of the decoding process.

首先,每當錯誤多項式計算模組304計算得到錯誤多項式之一個i次項係數Λi 時(i≧2),控制模組308便檢查計算所得的係數Λi 是否為零(步驟410)。若計算所得的係數Λi 為零,控制模組308便對秦氏搜尋模組306發送一啟動信號,以使秦氏搜尋模組306依據目前錯誤多項式計算模組304已計算得到的錯誤多項式之部分係數,進行秦式搜尋。此時,由於錯誤多項式計算模組304尚未對錯誤多項式之係數計算完畢,藉著提前進行秦式搜尋的時間,便可減少解碼過程所需的整體時間。若計算所得的係數Λi 不為零,控制模組308便檢查是否錯誤多項式計算模組304已計算出該錯誤多項式的最高次項係數Λt (步驟412)。若如此,控制模組308便對秦氏搜尋模組306發送一啟動信號,以使秦氏搜尋模組306依據錯誤多項式之所有係數,進行秦式搜尋。First, each time the error polynomial calculation module 304 calculates an i-th order coefficient Λ i of the error polynomial (i≧2), the control module 308 checks whether the calculated coefficient Λ i is zero (step 410). If the calculated coefficient Λ i is zero, the control module 308 sends a start signal to the Qin search module 306, so that the Qin search module 306 calculates the error polynomial calculated by the module 304 according to the current error polynomial. Part of the coefficient, the Qin style search. At this time, since the error polynomial calculation module 304 has not calculated the coefficients of the error polynomial, the overall time required for the decoding process can be reduced by performing the time of the Qin search in advance. If the calculated coefficient Λ i is not zero, the control module 308 checks if the error polynomial calculation module 304 has calculated the highest order coefficient Λ t of the error polynomial (step 412). If so, the control module 308 sends a start signal to the Qin search module 306, so that the Qin search module 306 performs a Qin search based on all coefficients of the error polynomial.

接著,當秦式搜尋模組306自控制模組308收到啟動信號,秦氏搜尋模組306便依據目前計算所得的係數建立一假定錯誤多項式(步驟414)。由於錯誤多項式計算模組304計算錯誤多項式之係數的次序係依由一次項係數Λ1 進而逐次計算到最高次項係數Λt ,因此當秦氏搜尋模組306收到啟動信號時,目前錯誤多項式計算模組304已計算得到的錯誤多項式之部分係數為Λ12 ,...,Λi ,...,Λk ,則秦氏搜尋模組306所建立的假定錯誤多項式如下式:Then, when the Qin search module 306 receives the start signal from the control module 308, the Qin search module 306 establishes a hypothetical error polynomial based on the currently calculated coefficients (step 414). Since the error polynomial calculation module 304 calculates the order of the coefficients of the error polynomial according to the first term coefficient Λ 1 and then successively calculates the highest order coefficient Λ t , when the Qin search module 306 receives the start signal, the current error polynomial calculation The partial coefficients of the error polynomial calculated by the module 304 are Λ 1 , Λ 2 , . . . , Λ i , . . . , Λ k , and the hypothetical error polynomial established by the Qin search module 306 is as follows:

1+Λ1 x+Λ2 x2 +…+Λ i x i +…+Λ k x k 1+Λ 1 x+Λ 2 x 2 +...+Λ i x i +...+Λ k x k .

接著,秦氏搜尋模組306執行一秦氏搜尋(Chein search),以找出該假定錯誤多項式之根(步驟416)。此時,錯誤多項式計算模組304仍持續計算錯誤多項式之高次項係數,而控制模組308則仍持續檢查是否新計算得到的該等高次項係數為零。若控制模組308發現錯誤多項式計算模組304後續有計算得到錯誤多項式的非零高次項係數(步驟418),則控制模組308產生一重置(reset)信號。而當秦氏搜尋模組306收到該重置信號時,秦氏搜尋模組306依據錯誤多項式計算模組304目前計算所得的所有係數建立一第二假定錯誤多項式(步驟414),並執行一秦氏搜尋以找出該第二假定錯誤多項式之根(步驟416)。最後,由於假定錯誤多項式或第二假定錯誤多項式之根皆指示BCH糾錯碼中發生錯誤位元的位置,錯誤修正模組310便依據該等假定錯誤多項式之根修正該BCH碼(步驟420),以得到正確的BCH碼。Next, the Qin search module 306 performs a Chen search to find the root of the assumed error polynomial (step 416). At this time, the error polynomial calculation module 304 continues to calculate the high order term coefficients of the error polynomial, and the control module 308 continues to check whether the newly calculated high order term coefficients are zero. If the control module 308 finds that the error polynomial calculation module 304 subsequently has a non-zero higher order term coefficient that calculates the error polynomial (step 418), the control module 308 generates a reset signal. When the Qin search module 306 receives the reset signal, the Qin search module 306 establishes a second hypothetical error polynomial according to all the coefficients currently calculated by the error polynomial calculation module 304 (step 414), and executes one. Qin searches to find the root of the second hypothetical error polynomial (step 416). Finally, since it is assumed that the root of the error polynomial or the second hypothetical error polynomial indicates the location of the error bit in the BCH error correction code, the error correction module 310 corrects the BCH code according to the root of the assumed error polynomial (step 420). To get the correct BCH code.

第5圖為依據本發明之解碼電路300運作之示意圖。首先,症狀碼計算模組302計算症狀碼(步驟502)。接著,錯誤多項式計算模組304逐次計算出錯誤多項式之一次項係數Λ1 (步驟504)、二次項係數Λ2 (步驟504)、三次項係數Λ3 (步驟508),直到最終計算得到最高t次項係數Λt (步驟510)。當錯誤多項式計算模組304計算出錯誤多項式的係數時,控制模組308檢查是否錯誤多項式計算模組304計算出的i次項係數Λi 是否為0(i≧2),若如此便指示秦氏搜尋模組306開始進行秦氏搜尋(步驟512)。當秦氏搜尋模組306開始進行秦氏搜尋後,若控制模組308發現錯誤多項式計算模組304新計算出錯誤多項式的非零高次係數Λj 時(i<j≦t),控制模組308重置秦氏搜尋模組306並重新開始執行秦氏搜尋(步驟512)。最後,若秦氏搜尋模組306無法找到根,表示解碼有誤(步驟514)。若秦氏搜尋模組306成功地找到假定錯誤多項式的根,且根之數目為假定錯誤多項式之次數,則表示解碼成功(步驟516)。Figure 5 is a schematic illustration of the operation of the decoding circuit 300 in accordance with the present invention. First, the symptom code calculation module 302 calculates a symptom code (step 502). Next, the error polynomial calculation module 304 successively calculates the primary term coefficient Λ 1 (step 504), the quadratic coefficient Λ 2 (step 504), and the cubic term coefficient Λ 3 (step 508) of the error polynomial until the final calculation reaches the highest t. The secondary coefficient Λ t (step 510). When the error polynomial calculation module 304 calculates the coefficient of the error polynomial, the control module 308 checks whether the i-term coefficient Λ i calculated by the error polynomial calculation module 304 is 0 (i≧2), and thus indicates that Qin The search module 306 begins a Qin search (step 512). After the Qin search module 306 starts the Qin search, if the control module 308 finds that the error polynomial calculation module 304 newly calculates the non-zero higher-order coefficient 错误j of the error polynomial (i<j≦t), the control mode Group 308 resets Qin's search module 306 and resumes performing the Qin search (step 512). Finally, if the Qin search module 306 cannot find the root, it indicates that the decoding is incorrect (step 514). If the Qin search module 306 successfully finds the root of the hypothetical error polynomial and the number of roots is the number of assumed error polynomials, then the decoding is successful (step 516).

第6圖為糾錯碼資料中出現錯誤位元的數目的機率示意圖。由圖中可見,當錯誤位元的數目愈大,發生的機率愈小。亦即,大部分的糾錯碼資料均僅存在少數的錯誤位元。由於錯誤多項式之根的數目,亦即錯誤多項式之次數,係表示糾錯碼資料的錯誤位元數目,因此當錯誤多項式計算模組304計算錯誤多項式之係數時,經常高次項係數都為零。換句話說,在大部分的情況下,習知的糾錯碼之解碼方法200浪費了許多時間進行錯誤多項式之高次項係數的計算。然而,本發明的解碼電路300只要一計算得到錯誤多項式的零係數,便開始進行秦氏搜尋。除了少數的多個錯誤位元發生的情況,在大部分的狀況下,本發明的解碼電路300都可有效的進行糾錯碼的錯誤修正,並節省解碼糾錯碼的所需時間。Figure 6 is a schematic diagram of the probability of the number of error bits occurring in the error correction code data. As can be seen from the figure, the greater the number of error bits, the smaller the probability of occurrence. That is, most of the error correction code data has only a few error bits. Since the number of roots of the error polynomial, that is, the number of error polynomials, indicates the number of error bits of the error correction code data, when the error polynomial calculation module 304 calculates the coefficients of the error polynomial, the frequent high order term coefficients are all zero. In other words, in most cases, the conventional error correction code decoding method 200 wastes a lot of time performing the calculation of the high order term coefficients of the error polynomial. However, the decoding circuit 300 of the present invention starts the Qin search as soon as the zero coefficient of the error polynomial is calculated. In addition to the case where a small number of error bits occur, in most cases, the decoding circuit 300 of the present invention can effectively perform error correction of the error correction code and save the time required to decode the error correction code.

第7圖為依據本發明解碼糾錯碼之時序圖。自時點ta 開始,解碼電路300首先於時段T1 中計算糾錯碼之症狀碼(步驟702)。自時點tb 開始,解碼電路300接著於時段T2 中依據症狀碼計算糾錯碼之錯誤多項式之係數(步驟704)。然而,自時點te 開始,解碼電路300在錯誤多項式的係數尚未計算完畢的情況下,便於時段T3 中進行秦氏搜尋以找出假定錯誤多項式之根,而得到糾錯碼之錯誤位元的位置(步驟706),以供修正糾錯碼。因此,解碼糾錯碼之整個時程僅需要(T1 +T2 +T5 )的時間。與第2圖之習知糾錯碼解碼所需的時間(T1 +T2 +T3 )相比,節省了時段T4 ,而提升的解碼電路的效能。Figure 7 is a timing diagram of decoding an error correcting code in accordance with the present invention. Starting from time t a , decoding circuit 300 first calculates the symptom code of the error correction code in time period T 1 (step 702). Since the start time point t b, then the coefficient decoding circuit 300 of the error correction code polynomials (step 704) in the period T 2 is calculated in accordance with the symptoms code. However, starting from the time point t e , the decoding circuit 300 facilitates the Qin search in the time period T 3 to find the root of the assumed error polynomial, and obtains the error bit of the error correcting code, in the case where the coefficient of the error polynomial has not been calculated. The location (step 706) is for correcting the error correction code. Therefore, the entire time history of decoding the error correction code requires only (T 1 + T 2 + T 5 ). Compared with the time (T 1 + T 2 + T 3 ) required for the decoding of the conventional error correction code of Fig. 2 , the time period T 4 is saved, and the performance of the improved decoding circuit is improved.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟習此項技術者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above preferred embodiments, it is not intended to limit the invention, and it is intended that the invention may be modified and modified without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

300...解碼電路300. . . Decoding circuit

302...症狀碼計算模組302. . . Symptom code calculation module

304...錯誤多項式計算模組304. . . Error polynomial calculation module

308...控制模組308. . . Control module

306...秦氏搜尋模組306. . . Qin's search module

以及as well as

310...錯誤修正模組310. . . Error correction module

第1圖為解碼糾錯碼之習知方法的流程圖;Figure 1 is a flow chart of a conventional method of decoding an error correcting code;

第2圖顯示習知解碼糾錯碼之時序圖;Figure 2 shows a timing diagram of a conventional decoding error correction code;

第3圖為依據本發明之糾錯碼之解碼電路的區塊圖;Figure 3 is a block diagram of a decoding circuit of an error correcting code according to the present invention;

第4圖為依據本發明之糾錯碼的解碼方法的流程圖;Figure 4 is a flow chart showing a decoding method of an error correcting code according to the present invention;

第5圖為依據本發明之解碼電路運作之示意圖;Figure 5 is a schematic diagram showing the operation of the decoding circuit in accordance with the present invention;

第6圖為糾錯碼資料中出現錯誤位元的數目的機率示意圖;以及Figure 6 is a schematic diagram of the probability of the number of error bits occurring in the error correction code data;

第7圖為依據本發明解碼糾錯碼之時序圖。Figure 7 is a timing diagram of decoding an error correcting code in accordance with the present invention.

Claims (23)

一種糾錯碼(error correction code)的解碼方法,包括下列步驟:依據一糾錯碼計算一症狀碼(syndrome);依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數;每當計算得到該等係數中之一新產生係數時,檢查該新產生係數是否為零;當該新產生係數為零時,依據已計算得到且次數低於該新產生係數之多個低次項係數建立一假定錯誤多項式;執行一秦氏搜尋(Chien search)以找出該假定錯誤多項式之根;以及依據該假定錯誤多項式之根修正該糾錯碼。 An error correction code decoding method includes the following steps: calculating a symptom code according to an error correction code; calculating a plurality of coefficients of an error-location polynomial according to the symptom code Whenever one of the coefficients is newly calculated, it is checked whether the newly generated coefficient is zero; when the new generation coefficient is zero, based on the calculated and the number of times lower than the new generation coefficient The secondary coefficient establishes a hypothetical error polynomial; performs a Chien search to find the root of the assumed error polynomial; and corrects the error correcting code based on the root of the assumed error polynomial. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該方法更包括:當計算得到該等係數中之次數高於該新產生係數之多個高次項係數時,檢查該等高次項係數是否為零;當該等高次項係數其中之一不為零時,依據該等高次項係數及該等低次項係數建立一第二假定錯誤多項式;執行一秦氏搜尋以找出該第二假定錯誤多項式之根;以及依據該第二假定錯誤多項式之根修正該糾錯碼。 The method for decoding an error correction code according to claim 1, wherein the method further comprises: when calculating that the number of the coefficients is higher than the plurality of higher order coefficients of the newly generated coefficient, checking the contour Whether the coefficient of the secondary term is zero; when one of the coefficients of the higher order term is not zero, a second assumed error polynomial is established according to the coefficient of the higher order term and the coefficient of the lower order term; performing a Qin search to find the first Assuming the root of the error polynomial; and correcting the error correcting code according to the root of the second assumed error polynomial. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該方法更包括:每當計算得到該等係數其中之一時,檢查該等係數之 次數是否為該錯誤多項式之一最高次數;當該等係數其中之一之次數為該錯誤多項式之該最高次數時,依據該等係數建立該錯誤多項式;執行一秦氏搜尋以找出該錯誤多項式之根;以及依據該錯誤多項式之根修正該糾錯碼。 The method for decoding an error correcting code according to claim 1, wherein the method further comprises: checking each of the coefficients when calculating one of the coefficients Whether the number of times is the highest number of times of the error polynomial; when the number of times of the coefficients is the highest number of times of the error polynomial, the error polynomial is established according to the coefficients; performing a Qin search to find the error polynomial a root; and correcting the error correcting code based on the root of the error polynomial. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該錯誤多項式之該等係數之計算的次序係依由一一次項係數進而逐次計算到一最高次項係數。 The method for decoding an error correcting code according to claim 1, wherein the order of calculating the coefficients of the error polynomial is successively calculated to a highest order coefficient by a primary term coefficient. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該假定錯誤多項式之建立係依據下式:1+Λ1 x2 x 2 +…+Λ i x i +…+Λ k x k ;其中Λ1k 為該等低次項係數。The method for decoding an error correcting code according to claim 1, wherein the assumed error polynomial is established according to the following formula: 1+Λ 1 x2 x 2 +...+Λ i x i +...+Λ k x k ; where Λ 1 ~ Λ k are the coefficients of the lower order terms. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該方法更包括:當找出該假定錯誤多項式之根後,檢查該假定錯誤多項式之根的數目是否等於該假定錯誤多項式之次數;以及當該錯誤多項式之根的數目等於該假定錯誤多項式之次數,依據該假定錯誤多項式之根修正該糾錯碼。 The method for decoding an error correcting code according to claim 1, wherein the method further comprises: after finding the root of the assumed error polynomial, checking whether the number of roots of the assumed error polynomial is equal to the assumed error polynomial The number of times; and when the number of roots of the error polynomial is equal to the number of times of the assumed error polynomial, the error correction code is corrected according to the root of the assumed error polynomial. 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該方法更包括:當計算得到該症狀碼後,檢查是否該症狀碼為零;以及當該症狀碼不為零時,啟動該錯誤多項式的該等係數之計算。 The method for decoding an error correcting code according to claim 1, wherein the method further comprises: when the symptom code is calculated, checking whether the symptom code is zero; and when the symptom code is not zero, starting The calculation of the coefficients of the error polynomial. 如申請專利範圍第1項所述之糾錯碼的解碼方法, 其中該糾錯碼為BCH碼(Bose,Ray-Chaudhuri,and Hocquenghem code)。 For example, the decoding method of the error correcting code described in claim 1 is The error correction code is a BCH code (Bose, Ray-Chaudhuri, and Hocquenghem code). 如申請專利範圍第1項所述之糾錯碼的解碼方法,其中該糾錯碼為RS碼(Reed-Solomon code)。 The method for decoding an error correcting code according to claim 1, wherein the error correcting code is an RS code (Reed-Solomon code). 一種糾錯碼(error correction code)的解碼方法,包括下列步驟:依據一糾錯碼計算一症狀碼(syndrome);依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數;當該錯誤多項式之該等係數仍未計算完畢時,同時執行一秦氏搜尋(Chien search)以找出一假定錯誤多項式之根;依據該假定錯誤多項式之根修正該糾錯碼;以及當計算得到該錯誤多項式之一新產生係數為零時,依據已計算得到且次數低於該新產生係數之多個低次項係數建立該假定錯誤多項式。 An error correction code decoding method includes the following steps: calculating a symptom code according to an error correction code; calculating a plurality of coefficients of an error-location polynomial according to the symptom code When the coefficients of the error polynomial are still not calculated, a Chien search is performed simultaneously to find the root of a hypothetical error polynomial; the error correction code is corrected according to the root of the assumed error polynomial; When one of the error polynomials is calculated to have a new generation coefficient of zero, the assumed error polynomial is established based on the plurality of low order term coefficients that have been calculated and whose number is lower than the newly generated coefficient. 如申請專利範圍第10項所述之糾錯碼的解碼方法,其中該假定錯誤多項式之建立係依據下式:1+Λ1 x2 x 2 +…+Λ i x i +…+Λ k x k ;其中Λ1k 為該等低次項係數。The method for decoding an error correcting code according to claim 10, wherein the assumed error polynomial is established according to the following formula: 1+Λ 1 x2 x 2 +...+Λ i x i +...+Λ k x k ; where Λ 1 ~ Λ k are the coefficients of the lower order terms. 如申請專利範圍第10項所述之糾錯碼的解碼方法,其中該方法更包括:當找出該假定錯誤多項式之根後,檢查該假定錯誤多項式之根的數目是否等於該假定錯誤多項式之次數;以及當該錯誤多項式之根的數目等於該假定錯誤多項式之 次數,依據該假定錯誤多項式之根修正該糾錯碼。 The method for decoding an error correcting code according to claim 10, wherein the method further comprises: after finding the root of the assumed error polynomial, checking whether the number of roots of the assumed error polynomial is equal to the assumed error polynomial The number of times; and when the number of roots of the error polynomial is equal to the assumed error polynomial The number of times, the error correcting code is corrected according to the root of the assumed error polynomial. 如申請專利範圍第10項所述之糾錯碼的解碼方法,其中該糾錯碼為BCH碼(Bose,Ray-Chaudhuri,and Hocquenghem code)。 The method for decoding an error correcting code according to claim 10, wherein the error correcting code is a BCH code (Bose, Ray-Chaudhuri, and Hocquenghem code). 如申請專利範圍第10項所述之糾錯碼的解碼方法,其中該糾錯碼為RS碼(Reed-Solomon code)。 The method for decoding an error correcting code according to claim 10, wherein the error correcting code is an RS code (Reed-Solomon code). 一種糾錯碼(error correction code)的解碼電路,包括:一症狀碼計算模組,依據一糾錯碼計算一症狀碼(syndrome);一錯誤多項式計算模組,當該症狀碼不為零時,依據該症狀碼依序計算一錯誤多項式(error-location polynomial)的多個係數;一控制模組,每當計算得到該等係數中之一新產生係數時,檢查該新產生係數是否為零,以及當該新產生係數為零時,發送一啟動信號;以及一秦氏搜尋(Chien search)模組,當自該控制模組收到該啟動信號時,依據該錯誤多項式計算模組已計算得到且次數低於該新產生係數之多個低次項係數建立一假定錯誤多項式,以及執行一秦氏搜尋以找出該假定錯誤多項式之根,以供該糾錯碼之錯誤修正。 An error correction code decoding circuit includes: a symptom code calculation module, calculating a symptom code according to an error correction code; an error polynomial calculation module, when the symptom code is not zero Calculating a plurality of coefficients of an error-location polynomial according to the symptom code; a control module, when calculating one of the newly generated coefficients, checking whether the newly generated coefficient is zero And sending a start signal when the new generation coefficient is zero; and a Chien search module, when the start signal is received from the control module, the calculation module is calculated according to the error polynomial A plurality of low order term coefficients obtained and less than the newly generated coefficient establish an assumed error polynomial, and a Qin search is performed to find the root of the assumed error polynomial for error correction of the error correcting code. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中該解碼電路更包括:一錯誤修正模組,依據該假定錯誤多項式之根修正該糾錯碼。 The decoding circuit of the error correction code of claim 15, wherein the decoding circuit further comprises: an error correction module, and correcting the error correction code according to the root of the assumed error polynomial. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中當該錯誤多項式計算模組計算得到該等係數中之次數高於該新產生係數之多個高次項係數時,該控制模組檢查該等高次項係數是否為零,以及當該等高次項係數其中之一不為零時,產生一重置(reset)信號;而當該秦氏搜尋模組收到該重置信號時,該秦氏搜尋模組依據該等高次項係數及該等低次項係數建立一第二假定錯誤多項式,並執行一秦氏搜尋以找出該第二假定錯誤多項式之根,以供修正該糾錯碼。 The decoding circuit of the error correcting code according to claim 15, wherein when the error polynomial calculating module calculates that the number of the coefficients is higher than the plurality of higher order coefficients of the newly generated coefficient, the control mode The group checks whether the higher order term coefficients are zero, and when one of the higher order term coefficients is not zero, generates a reset signal; and when the Qin search module receives the reset signal The Qin search module establishes a second hypothetical error polynomial according to the higher order coefficient and the lower order coefficient, and performs a Qin search to find the root of the second assumed error polynomial for correcting the correction Wrong code. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中每當該錯誤多項式計算模組計算得到該等係數時,該控制模組檢查該等係數其中之一之次數是否為該錯誤多項式之一最高次數,以及當該等係數其中之一之次數為該錯誤多項式之該最高次數時,該控制模組產生該啟動信號;當該秦氏搜尋模組收到該啟動信號時,該秦式搜尋模組依據該等係數建立該錯誤多項式,並執行一秦氏搜尋以找出該錯誤多項式之根,以供修正該糾錯碼。 The decoding circuit of the error correction code of claim 15, wherein the control module checks whether the number of the coefficients is one of the errors when the error polynomial calculation module calculates the coefficients. The highest number of times of the polynomial, and when the number of times of the coefficients is the highest number of times of the error polynomial, the control module generates the start signal; when the Qin search module receives the start signal, the The Qin-style search module establishes the error polynomial according to the coefficients, and performs a Qin search to find the root of the error polynomial for correcting the error correction code. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中該錯誤多項式計算模組由該錯誤多項式之一一次項係數進而逐次計算到該錯誤多項式之一最高次項係數。 The decoding circuit of the error correcting code according to claim 15, wherein the error polynomial calculating module successively calculates one of the error polynomials and the highest order coefficient of the error polynomial. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中該秦氏搜尋模組係依據下式建立該假定錯誤多項式:1+Λ1 x2 x 2 +…+Λ i x i +…+Λ k x k ; 其中Λ1k 為該等低次項係數。The decoding circuit of the error correcting code described in claim 15 wherein the Qin search module establishes the assumed error polynomial according to the following formula: 1+Λ 1 x2 x 2 +...+Λ i x i +...+Λ k x k ; where Λ 1 ~ Λ k are the coefficients of the lower order terms. 如申請專利範圍第16項所述之糾錯碼的解碼電路,其中當該秦氏搜尋模組找出該假定錯誤多項式之根後,該秦氏搜尋模組檢查該假定錯誤多項式之根的數目是否等於該假定錯誤多項式之次數,而當該錯誤多項式之根的數目等於該假定錯誤多項式之次數時,該錯誤修正模組依據該假定錯誤多項式之根修正該糾錯碼。 The decoding circuit of the error correcting code described in claim 16, wherein the Qin search module checks the number of roots of the assumed error polynomial after the Qin search module finds the root of the assumed error polynomial Whether it is equal to the number of times of the assumed error polynomial, and when the number of roots of the error polynomial is equal to the number of times of the assumed error polynomial, the error correction module corrects the error correction code according to the root of the assumed error polynomial. 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中該糾錯碼為BCH碼(Bose,Ray-Chaudhuri,and Hocquenghem code)。 The decoding circuit of the error correcting code according to claim 15, wherein the error correcting code is a BCH code (Bose, Ray-Chaudhuri, and Hocquenghem code). 如申請專利範圍第15項所述之糾錯碼的解碼電路,其中該糾錯碼為RS碼(Reed-Solomon code)。 The decoding circuit of the error correcting code according to claim 15, wherein the error correcting code is an RS code (Reed-Solomon code).
TW98111798A 2009-02-03 2009-04-09 Method and circuit for decoding an error correction code TWI387214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/479,833 US8370727B2 (en) 2009-02-03 2009-06-07 Method and circuit for decoding an error correction code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US14937809P 2009-02-03 2009-02-03

Publications (2)

Publication Number Publication Date
TW201031127A TW201031127A (en) 2010-08-16
TWI387214B true TWI387214B (en) 2013-02-21

Family

ID=42587587

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98111798A TWI387214B (en) 2009-02-03 2009-04-09 Method and circuit for decoding an error correction code

Country Status (2)

Country Link
CN (1) CN101795140B (en)
TW (1) TWI387214B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI566091B (en) * 2015-09-10 2017-01-11 慧榮科技股份有限公司 Method for decoding an error correction code, and associated decoding circuit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW523996B (en) * 2002-04-26 2003-03-11 Univ Nat Chiao Tung Method using error correction code to calculate syndrome polynomial at decoding
TW566008B (en) * 2001-11-28 2003-12-11 Univ Nat Chiao Tung Apparatus for solving key equation polynomials in decoding error correction codes
US20060107190A1 (en) * 2001-08-21 2006-05-18 Equator Technologies, Inc. Even-load software reed-solomon decoder

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4599722A (en) * 1984-04-03 1986-07-08 Canadian Patents And Development Limited-Societe Canadienne Des Brevets Et D'exploitation Limitee Apparatus for encoding and decoding digital data to permit error correction
JPS63236416A (en) * 1987-03-25 1988-10-03 Mitsubishi Electric Corp Encoding/decoding method
JPH088760A (en) * 1994-06-16 1996-01-12 Toshiba Corp Error correction device
US8001449B2 (en) * 2007-07-27 2011-08-16 Yao-Chung Chang Syndrome-error mapping method for decoding linear and cyclic codes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060107190A1 (en) * 2001-08-21 2006-05-18 Equator Technologies, Inc. Even-load software reed-solomon decoder
TW566008B (en) * 2001-11-28 2003-12-11 Univ Nat Chiao Tung Apparatus for solving key equation polynomials in decoding error correction codes
TW523996B (en) * 2002-04-26 2003-03-11 Univ Nat Chiao Tung Method using error correction code to calculate syndrome polynomial at decoding

Also Published As

Publication number Publication date
CN101795140A (en) 2010-08-04
TW201031127A (en) 2010-08-16
CN101795140B (en) 2013-08-21

Similar Documents

Publication Publication Date Title
US7788570B1 (en) Optimized Reed-Solomon decoder
US8122328B2 (en) Bose-Chaudhuri-Hocquenghem error correction method and circuit for checking error using error correction encoder
US8370727B2 (en) Method and circuit for decoding an error correction code
JP4152887B2 (en) Erase location for linear block codes-and-single-error correction decoder
US10050642B2 (en) Low power scheme for bit flipping low density parity check decoder
US20060031742A1 (en) Decoding device and decoding method
US7395491B2 (en) Decoding device for decoding product code and decoding method using the same
US20110004812A1 (en) Coder-decoder and method for encoding and decoding an error correction code
US8949697B1 (en) Low power Reed-Solomon decoder
KR101819152B1 (en) Method and associated decoding circuit for decoding an error correction code
TWI397811B (en) Method for encoding and decoding an error correction code and coder-decoder
CN110806948B (en) Data verification method and device
US7328395B1 (en) Iterative Reed-Solomon error-correction decoding
US11522562B2 (en) Error correcting decoding device and error correcting decoding method
JP2007200535A (en) Post viterbi error correction method, and post viterbi processor
US20090106634A1 (en) Error detecting and correcting circuit using chien search, semiconductor memory controller including error detecting and correcting circuit, semiconductor memory system including error detecting and correcting circuit, and error detecting and correcting method using chien search
US11101925B2 (en) Decomposable forward error correction
US7206993B2 (en) Method and device for decoding Reed-Solomon code or extended Reed-Solomon code
TWI387214B (en) Method and circuit for decoding an error correction code
WO2012092902A2 (en) Decoding method and decoding device
KR101569637B1 (en) Method and Apparatus for Non-Iterative Soft-Decision BCH Decoding using Test Syndrome
US20130111304A1 (en) Cyclic code decoding method and cyclic code decoder
KR100594002B1 (en) Reed Solomon Decoder with Variable Pipeline Structure
US6954892B2 (en) Method for calculating syndrome polynomial in decoding error correction codes
US9088483B1 (en) Packet identification tracker