TWI523437B - Encoding and syndrome computing co-design circuit for bch code and method for deciding the same - Google Patents

Encoding and syndrome computing co-design circuit for bch code and method for deciding the same Download PDF

Info

Publication number
TWI523437B
TWI523437B TW103114945A TW103114945A TWI523437B TW I523437 B TWI523437 B TW I523437B TW 103114945 A TW103114945 A TW 103114945A TW 103114945 A TW103114945 A TW 103114945A TW I523437 B TWI523437 B TW I523437B
Authority
TW
Taiwan
Prior art keywords
code
matrix
symptom
calculation result
design circuit
Prior art date
Application number
TW103114945A
Other languages
Chinese (zh)
Other versions
TW201541874A (en
Inventor
洪瑞徽
顏池男
Original Assignee
衡宇科技股份有限公司
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 衡宇科技股份有限公司 filed Critical 衡宇科技股份有限公司
Priority to TW103114945A priority Critical patent/TWI523437B/en
Publication of TW201541874A publication Critical patent/TW201541874A/en
Application granted granted Critical
Publication of TWI523437B publication Critical patent/TWI523437B/en

Links

Description

BCH碼編碼與癥狀計算共用設計電路及決定該共 用設計電路的方法 BCH code encoding and symptom calculation share the design circuit and determine the total Method of designing circuits

本發明關於一種共用設計電路及決定該電路的方法,特別是本發明關於一種BCH碼編碼與癥狀計算共用設計電路及決定該電路的方法。 The present invention relates to a shared design circuit and a method for determining the same, and more particularly to a BCH code encoding and symptom calculation sharing design circuit and a method for determining the same.

BoSe-Chaudhuri-Hocquenghem(BCH)碼是非常普遍使用於儲存與通訊設備的錯誤更正碼,BCH碼能偵測及修正由於存儲設備通道中的噪聲和缺陷,隨機發生的錯誤。對於BCH碼的編碼,常利用線性反饋移位暫存器與某些邏輯積體電路的組合來實現。而對於BCH碼的解碼而言,相較於編碼是複雜了許多。請見第1圖,解碼流程可解說如下:在接收一碼字後(S01),依照特定的多項式計算該碼字的癥狀碼(S02)。接著,依照該癥狀碼,可以找到一錯誤位置多項式(S03)。接下來,藉由計算該錯誤位置多項式的根,可以得到錯誤位置數字(S04)。最後,修正該錯誤碼字以獲得正確訊號資料(S05)。 The BoSe-Chaudhuri-Hocquenghem (BCH) code is a very common error correction code used in storage and communication equipment. The BCH code can detect and correct random errors due to noise and defects in the memory device channel. The encoding of the BCH code is often implemented by a combination of a linear feedback shift register and some logic integrated circuits. For the decoding of BCH codes, it is much more complicated than coding. Referring to Fig. 1, the decoding process can be explained as follows: After receiving a codeword (S01), the symptom code of the codeword is calculated according to a specific polynomial (S02). Then, according to the symptom code, an error position polynomial can be found (S03). Next, by calculating the root of the error position polynomial, an error position number can be obtained (S04). Finally, the error code word is corrected to obtain the correct signal data (S05).

習知的線性反饋移位暫存器電路設計如第2圖所 示。為了加速運算,該電路設計通常是採平行化,同時計算多筆輸入位元資料。圖中p表示可同時計算在第j個時脈輸入的R’(j)中的p位元資料,經編碼後,輸出結果Z(j)。如果碼長有n位元,則編碼流程會在[n/p]個時脈後完成。 The conventional linear feedback shift register circuit design is as shown in Fig. 2. Show. In order to speed up the operation, the circuit design is usually parallelized while calculating multiple input bit data. In the figure, p indicates that p-bit data in R'(j) of the j-th clock input can be simultaneously calculated, and after encoding, the result Z(j) is output. If the code length has n bits, the encoding process will be completed after [n/p] clocks.

在一個BCH碼的解碼器中,也有類似的迭代計算 架構,比如說癥狀碼計算單元。對一個具有t個錯誤修正能力的癥狀碼計算單元而言,每個癥狀碼Si可由以下方程式所計算獲得。 In a decoder for a BCH code, there is also a similar iterative computational architecture, such as a symptom code calculation unit. For a symptom code calculation unit having t error correction capabilities, each symptom code S i can be calculated by the following equation.

其中r(αi+1)表示接收到的碼字多項式。為了實現上述方程式,一般解碼電路會使用癥狀碼計算單元來處理,常見的癥狀碼計算單元如第3圖所示。類似前述的編碼器,在該圖中,p表示每一時脈中接收到的碼字位元數(p個平行化計算),gi(j)為第j次迭代計算中的中間生成資料。 Where r(α i+1 ) represents the received codeword polynomial. In order to implement the above equation, the general decoding circuit is processed using the symptom code calculation unit, and the common symptom code calculation unit is as shown in FIG. Similar to the aforementioned encoder, in the figure, p denotes the number of codeword bits received in each clock (p parallelization calculations), and g i (j) is the intermediate generation data in the jth iteration calculation.

上述的方程式可以用矩陣的形式表示,因此,可以在推導的過程中找到相同子運算式。在電路的實現方面,藉由適當的共用硬體,該些相同子運算式可以被精省,同時達到降低硬體複雜度的目標。此外,由於BCH碼的編碼器也是應用類似的迭代運算方式運作,若是編碼解碼不是同時進行,編碼器與癥狀碼計算單元可共用暫存器,這能再進一步 節省面積成本。許多前案都有揭露類似的設計,比如美國專利第6,405,339號、7,743,311號、8,418,021號等。但這些專利所提出的硬體複雜度還是太高,對於時下追求更輕薄短小的電子設備而言,還是有再改進的空間。 The above equations can be expressed in the form of a matrix, so the same sub-expression can be found in the process of derivation. In terms of circuit implementation, the same sub-expressions can be refined by appropriate shared hardware while achieving the goal of reducing hardware complexity. In addition, since the encoder of the BCH code is also operated by a similar iterative operation mode, if the codec is not simultaneously performed, the encoder and the symptom code calculation unit can share the register, which can further Save on area costs. Many of the previous cases have revealed similar designs, such as U.S. Patent Nos. 6,405,339, 7,743,311, 8,418,021, and the like. However, the hardware complexity of these patents is still too high, and there is still room for improvement in the pursuit of thinner, lighter and shorter electronic devices.

如上所述,在BCH碼的編碼與徵狀碼計算的共用設計電路現有方案中,硬體的複雜度偏高且面積成本大。因此,一種適合共用設計電路能夠降低硬體的複雜度,最好能有效減少相同子運算單元的BCH碼的編碼與徵狀碼計算的共用設計電路是非常迫切需要的。 As described above, in the conventional scheme of the shared design circuit for encoding and character code calculation of the BCH code, the complexity of the hardware is high and the area cost is large. Therefore, a common design circuit suitable for the shared design circuit can reduce the complexity of the hardware, and it is better to effectively reduce the coding and syndrome calculation of the BCH code of the same sub-operation unit.

依照本發明的一種態樣,一種用於BCH碼編碼與癥狀計算共用設計電路,可進行p個平行運算,包含:一編碼單元,用以將具有k位元的一訊息,經一第一迭代運算後編碼成具有n位元的BCH碼碼字,該第一迭代運算在每一時脈中依次接收p位元,並於[n/p]時脈後輸出該BCH碼碼字;一癥狀碼計算單元,用以將具有n位元的一BCH碼碼字,經一第二迭代運算後得到2t個m位元的癥狀碼,該第二迭代運算在每一時脈中依次接收p位元,並於[n/p]時脈後輸出該癥狀碼;複數個多工器,每一多工器用以接收該第一迭代運算所產生的一第一中間計算結果與該第二迭代運算所產生的一第二中間計算結果,當第一迭代運算進行時,輸出該第一中間計算結果;當第二迭代運算進行時,輸出該第二中間計算結果;及複數個 暫存器,每一暫存器用以接收來自對應多工器的第一中間計算結果或第二中間計算結果,或來自對應癥狀碼計算單元的第二中間計算結果,及在收到該第一中間計算結果或第二中間計算結果後的一時脈中,輸出該第一中間計算結果到該編碼單元或該第二中間計算結果到該癥狀碼計算單元。其中k、n、p與t為正整數,n大於k。m為GF(2m)中2的次方。 According to an aspect of the present invention, a common design circuit for BCH code encoding and symptom calculation can perform p parallel operations, including: a coding unit for transmitting a message having k bits through a first iteration Encoded into a BCH code codeword having n bits, the first iterative operation sequentially receives p bits in each clock, and outputs the BCH code codeword after [n/p] clock; a symptom code a calculating unit, configured to obtain a symptom code of 2t m bits after a second iterative operation by using a BCH code codeword having n bits, wherein the second iterative operation sequentially receives p bits in each clock. And outputting the symptom code after the [n/p] clock; a plurality of multiplexers, each multiplexer is configured to receive a first intermediate calculation result generated by the first iterative operation and the second iterative operation a second intermediate calculation result, when the first iterative operation is performed, outputting the first intermediate calculation result; when the second iteration operation is performed, outputting the second intermediate calculation result; and a plurality of temporary registers, each temporary The register is configured to receive the first intermediate calculation result from the corresponding multiplexer Or a second intermediate calculation result, or a second intermediate calculation result from the corresponding symptom code calculation unit, and outputting the first intermediate calculation result in a time after receiving the first intermediate calculation result or the second intermediate calculation result Go to the coding unit or the second intermediate calculation result to the symptom code calculation unit. Where k, n, p and t are positive integers and n is greater than k. m is the power of 2 in GF(2 m ).

依照本案構想,該第一迭代運算獲得Z(j)的運算 值及完整BCH碼字,其中Z(j)=Fp×[Z(j-1)+R'(j)],其中Z(0)中所有元素皆為0。 According to the present concept, the first iterative operation obtains the computed value of Z(j) and the complete BCH codeword, where Z(j)=F p ×[ Z ( j -1)+ R' ( j )], where Z( 0) All elements are 0.

Z(j)為第一迭代運算的第j次迭代計算的第一中間計算結果;將一具有k位元訊息的n位元的初始處理資料以p位元為單位切割,R’(j)為第j個分割的p位元;R=n-k+1;g’R-1、g’R-2...g’0為一生成多項式g(x)=xR+g' R-1xR-1+g' R-2xR-2+…+g' 2x2+g' 1x1+g' 0的係數。 Z(j) is the first intermediate calculation result calculated by the jth iteration of the first iterative operation; the initial processing data of an n-bit having a k-bit message is cut in units of p bits, R'(j) Is the j-th divided p-bit; R=n-k+1; g' R-1 , g' R-2 ... g' 0 is a generator polynomial g(x)=x R +g ' R -1 x R-1 +g ' R-2 x R-2 +...+g ' 2 x 2 +g ' 1 x 1 +g ' 0 coefficient.

依照本案構想,該第一迭代運算滿足一矩陣F”之 運算,其中,F'=[Fp的首P欄|Fp],m為一正整 數。 According to the present concept, the first iterative operation satisfies a matrix F" operation, wherein , F ' = [F p 's first P column | F p ], m is a positive integer.

依照本案構想,該第二迭代運算獲得G(j)的運算 值及完整癥狀碼,其中 ,其中 G(j)=[g1(j)g3(j)…g2t-1(j)],G(j)表示第二迭代運算的第j次迭代計算中,m×t個第二中間計算結果,R(j)=[r 0(j)r 1(j)...r p-1(j)],R(j)表示在第j次迭代計算中,癥狀碼計算單元收到該碼字的p個位元,S(j)表示在第j次迭代計算中輸出的癥狀碼計算值;矩陣XR為一p×mt的二進制矩陣,XG為一個mt×mt的二進制矩陣,XS為一個mt×2mt的二進制矩陣。 According to the concept of the present case, the second iterative operation obtains the calculated value of G(j) and the complete symptom code, wherein , where G(j)=[g 1 (j)g 3 (j)...g 2t-1 (j)], G(j) represents the j-th iteration calculation of the second iteration operation, m×t Second intermediate calculation result, R(j)=[ r 0 (j) r 1 (j)... r p -1 (j)], R(j) represents the symptom code calculation unit in the jth iterative calculation Receiving p bits of the codeword, S(j) represents the symptom code calculated value in the jth iteration calculation; matrix X R is a p×mt binary matrix, and X G is a mt×mt Binary matrix, X S is a binary matrix of mt × 2mt.

依照本案構想,該矩陣XR、XG與XG定義如下:XR=[C1 C3…C2t-1], α 0...α m-1為GF(2 m )中的元素 ,I為單位矩陣,Bw表示零矩陣與 單位矩陣外的運算矩陣,w為2的正整數次方但小於或等於 According to the present concept, the matrices X R , X G and X G are defined as follows: X R = [C 1 C 3 ... C 2t-1 ], , α 0 ... α m -1 are elements in GF(2 m ) , I is the identity matrix, B w represents the operation matrix outside the zero matrix and the unit matrix, and w is a positive integer power of 2 but less than or equal to

依照本案構想,該多工器的數量要大於編碼單元 可編成的BCH碼之R值,其中R=n-k+1。該暫存器的數量要大於或等於m×t個。該第一中間計算結果與第二中間計算結果是1位元訊號。 According to the concept of the case, the number of multiplexers is larger than the coding unit. The R value of the BCH code that can be programmed, where R = n - k + 1. The number of registers is greater than or equal to m × t. The first intermediate calculation result and the second intermediate calculation result are 1-bit signals.

依照本發明的另一種態樣,一種用於決定BCH碼編碼與癥狀計算共用設計電路的方法,包含步驟:依照平行計算數量p與癥狀碼數量2t,建立XR、XG與XS;建立FP;建立F’;建立F”;建立矩陣[XSRG F”];及設計滿足矩陣[XSRG F”]運算的電路,其中k、n、p與t為正整數,n大於k,XR=[C1 C3…C2t-1],C2t-1= α 0...α m-1為GF(2 m )中的元素 ,I為單位矩陣,Bw表示零矩陣與 單位矩陣外的運算矩陣,w為2的正整數次方但小於或等於 ,F'=[Fp的首P欄|Fp], R=n-k+1,g’R-1、g’R-2...g’0為一生成多項式g(x)=xR+g' R-1xR-1+g' R-2xR-2+…+g' 2x2+g' 1x1+g' 0的係數。 According to another aspect of the present invention, a method for determining a common design circuit for BCH code encoding and symptom calculation includes the steps of: establishing X R , X G , and X S according to the number of parallel calculations p and the number of symptom codes 2t; F P ; establish F '; establish F "; establish matrix [X SRG F"]; and design a circuit that satisfies the matrix [X SRG F"] operation, where k, n, p, and t are positive integers, n is greater than k, X R =[C 1 C 3 ... C 2t-1 ], C 2t-1 = , α 0 ... α m -1 are elements in GF(2 m ) , I is the identity matrix, B w represents the operation matrix outside the zero matrix and the unit matrix, and w is a positive integer power of 2 but less than or equal to , F ' = [F p 's first P column | F p ], R=n-k+1,g' R-1 ,g' R-2 ...g' 0 is a generator polynomial g(x)=x R +g ' R-1 x R-1 +g ' R -2 x R-2 +...+g ' 2 x 2 +g ' 1 x 1 +g ' The coefficient of 0 .

10‧‧‧共用設計電路 10‧‧‧Shared design circuit

100‧‧‧編碼單元 100‧‧‧ coding unit

200‧‧‧癥狀碼計算單元 200‧‧‧ symptom code calculation unit

300‧‧‧多工器 300‧‧‧Multiplexer

400‧‧‧暫存器 400‧‧‧ register

第1圖為習知BCH碼的解碼流程。 Figure 1 is a decoding flow of a conventional BCH code.

第2圖顯示習知的線性反饋移位暫存器電路設計。 Figure 2 shows a conventional linear feedback shift register circuit design.

第3圖顯示習知的癥狀碼計算單元。 Figure 3 shows a conventional symptom code calculation unit.

第4圖為依照本發明的BCH碼編碼與癥狀計算共用設計電路。 Figure 4 is a diagram showing a common design circuit for BCH code encoding and symptom calculation in accordance with the present invention.

第5圖描繪該共用設計電路在編碼時的運作。 Figure 5 depicts the operation of the shared design circuit at the time of encoding.

第6圖描繪該共用設計電路在癥狀碼計算時的運作。 Figure 6 depicts the operation of the shared design circuit during symptom code calculation.

第7圖為決定該共用設計電路的方法。 Figure 7 is a diagram of the method of determining the shared design circuit.

本發明將藉由參照下列的實施例而更具體地描述。 The invention will be more specifically described by reference to the following examples.

首先,讓吾人更進一步了解BCH碼的編碼流程。對於一編成具有n位元的BCH碼碼字,其中包含k位元訊息。在編碼過程中,是應用了以下的生成多項式:g(x)=xR+g' R-1xR-1+g' R-2xR-2+…+g' 2x2+g' 1x1+g' 0其中R=n-k+1。當使用能同時進行p個平行運算的編碼器編碼時,一具有該k位元訊息的n位元初始處理資料以p位元為單位切割成R’(1)、R’(2)...R’(n/p)(R’(n/p)不一定為p位元),依次在每一時脈中輸入至編碼器中進行運算。以一個通式來看,在第j個時脈中(1≦j≦n/p)輸出的運算值為:Z(j)=Fp×[Z(j-1)+R'(j)]應當注意的是Z(0)中所有元素皆為0。在此,為了運算表示方便, R’(j)為第j個p位元,Z(j)則包含了R位元,分別以Z0(j)、Z1(j)...ZR-1(j)來表示。 First, let us further understand the encoding process of the BCH code. For a BCH code codeword with n bits, it contains a k-bit message. In the encoding process, the following generator polynomial is applied: g(x)=x R +g ' R-1 x R-1 +g ' R-2 x R-2 +...+g ' 2 x 2 +g ' 1 x 1 +g ' 0 where R=n-k+1. When encoding with an encoder capable of performing p parallel operations at the same time, an n-bit initial processing data having the k-bit message is cut into R'(1), R'(2) in units of p-bits.. .R'(n/p) (R'(n/p) is not necessarily a p-bit), and is input to the encoder for calculation in each clock. In terms of a general formula, the operation value of the output in the jth clock (1≦j≦n/p) is: Z(j)=F p ×[ Z ( j -1)+ R' ( j ) It should be noted that all elements in Z(0) are 0. Here, in order to facilitate the calculation, R'(j) is the jth p-bit, and Z(j) contains R bits, which are represented by Z 0 (j), Z 1 (j)...Z R-1 (j), respectively.

而其它式中諸表示式進一步描述如下: 令F'=[Fp的首P欄|Fp],可以得到Z(j)的轉置矩陣: 滿足此運算的電路,即可達到第2圖中的編碼作業。 The expressions in the other formulas are further described as follows: Let F ' =[F p 's first P column|F p ], you can get the Z(j) transposed matrix: The circuit that satisfies this operation can achieve the coding operation in Figure 2.

再回頭看癥狀碼計算。Yungjoo Lee等人於2012年IEEE國際期刊所公開的論文,論文名稱為Small-area parallel syndrome calculation for strong BCH decoding,其中討論到一個用於癥狀碼計算單元,尋找並刪除相同子運算式的方案。根據該論文,一具有p個癥狀碼平行計算能力的癥狀碼計算單元將需要[n/p]個時脈完成癥狀碼計算,它也包含2t個子單元以同時產生2t個癥狀碼。在第j個時脈中,該癥狀碼計算單元所計算得到的癥狀碼S(j)可以下面的式子表示: 在上式中,S(j)是一個1×2mt二進制矩陣,表示在第j次迭代計算中輸出的2t個癥狀碼計算值,每一個癥狀碼計算值有m位 元,m為非零正整數且為GF(2m)中2的次方。G(j)為一1×mt二進制矩陣,表示在第j次迭代計算中,m×t個暫時的中間計算結果。G(j)可以表示為以下:G(j)=[g1(j)g3(j)…g2t-1(j)]g1(j)、g3(j)...g2t-1(j)表示來自迭代計算中的第奇數次暫時結果,每一者皆是1×m二進制矩陣,含有m位元。 Look back at the symptom code calculation. Yungjoo Lee et al., published in the IEEE International Journal in 2012, entitled "Small-area parallel syndrome calculation for strong BCH decoding," which discusses a solution for the symptom code calculation unit to find and delete the same sub-expression. According to the paper, a symptom code calculation unit having p symptom code parallel computing capabilities would require [n/p] clock completion symptom code calculations, which also contained 2t subunits to simultaneously generate 2t symptom codes. In the jth clock, the symptom code S(j) calculated by the symptom code calculation unit can be expressed by the following equation: In the above formula, S(j) is a 1×2mt binary matrix representing the calculated value of 2t symptom codes output in the jth iteration calculation. Each symptom code has a m-bit value and m is non-zero positive. An integer is the power of 2 in GF(2 m ). G(j) is a 1×mt binary matrix representing m×t temporary intermediate calculation results in the jth iteration calculation. G(j) can be expressed as follows: G(j)=[g 1 (j)g 3 (j)...g 2t-1 (j)]g 1 (j), g 3 (j)...g 2t -1 (j) represents the odd-numbered temporary results from the iterative calculation, each of which is a 1 x m binary matrix containing m bits.

R(j)為一1×p的二進制矩陣,表示在第j次迭代計 算中,癥狀碼計算單元收到該碼字的p個位元r 0(j)、r 1(j)...r p-1(j),以矩陣式表示如:R(j)=[r 0(j)r 1(j)...r p-1(j)]。 R(j) is a 1×p binary matrix, indicating that in the jth iterative calculation, the symptom code calculation unit receives the p bits r 0 (j), r 1 (j) of the codeword... r p -1 (j), expressed in a matrix such as: R(j) = [ r 0 (j) r 1 (j)... r p -1 (j)].

XR為關於輸入碼字的一個p×mt的二進制矩陣。 XR可以表示為:XR=[C1 C3…C2t-1],C2t-1又可表示為: α 0...α m-1為GF(2 m )中的元素。 X R is a binary matrix of p × mt with respect to the input codeword. X R can be expressed as: X R = [C 1 C 3 ... C 2t-1 ], and C 2t-1 can be expressed as: α 0 ... α m -1 is an element in GF(2 m ).

XG為一個mt×mt的二進制矩陣,代表該方法中固定的乘法運算。XG可以表示為: 其中,A(2t-1)p可表示為 X G is a binary matrix of mt x mt representing a fixed multiplication operation in the method. X G can be expressed as: Where A (2t-1)p can be expressed as

XS為一mt×2mt的二進制矩陣,其中又包含了許 多m×m的單位矩陣與m×m的運算矩陣。Xs可以下方矩陣式表示: I表示單位矩陣,Bw為運算矩陣B2、B4...等的通式,w為2的正整數次方但小於或等於2t。每一Bw可表示為: X S is a binary matrix of mt × 2 mt, which in turn contains a number of m × m unit matrix and m × m operation matrix. Xs can be represented by a matrix: I denotes an identity matrix, B w is a general formula of the operation matrices B 2 , B 4 , etc., and w is a positive integer power of 2 but less than or equal to 2 t. Each B w can be expressed as:

在Yungjoo Lee等人的論文描述,很明顯的,依 照該法所實現的癥狀碼計算單元,已經減少了許多相同子運算式。此時,若能結合BCH編碼單元,則有機會減少電路設計的面積成本。 In the paper by Yungjoo Lee et al., it is obvious that According to the symptom code calculation unit implemented by the method, many identical sub-expressions have been reduced. At this time, if the BCH coding unit can be combined, there is an opportunity to reduce the area cost of the circuit design.

按照上述的推論,令,加上XSRG 可得Y=[XSRG F"](P+mt)×(3mt+Rt)。應用矩陣Y的電路,配合適當的緩衝器與電路切換,一種BCH碼編碼與癥狀碼計算共用設計電路就能實現。 According to the above inference, , plus X SRG can get Y = [X SRG F"] (P + mt) × (3mt + Rt) . Apply the circuit of matrix Y, with appropriate buffer and circuit switching, a BCH code encoding and symptom code calculation A shared design circuit can be implemented.

是故,本發明提出上述的BCH碼編碼與癥狀碼計 算共用設計電路。請見第4圖,該圖描繪一BCH碼編碼與癥狀碼計算共用設計電路10架構。該共用設計電路10包含了一編碼單元100、一癥狀碼計算單元200、R個多工器300及t×m個暫存器400。共用設計電路10具有同時進行p個平行運算的能力,可用於將具有k位元的一訊息,經編碼後成為具有n位元的BCH碼碼字;又或在收到一具有n位元的BCH碼碼字,可以對其進行癥狀碼計算。BCH碼編碼與癥狀碼計算在適當的電路切換下,彼此不會衝突。 Therefore, the present invention proposes the above BCH code coding and symptom code meter. Calculate the shared design circuit. See Figure 4, which depicts a BCH code encoding and symptom code calculation sharing design circuit 10 architecture. The shared design circuit 10 includes a coding unit 100, a symptom code calculation unit 200, R multiplexers 300, and t×m registers 400. The shared design circuit 10 has the capability of performing p parallel operations simultaneously, and can be used to encode a message having a k-bit into a BCH code codeword having n bits, or to receive an n-bit message. The BCH code code word can be used to calculate the symptom code. The BCH code encoding and symptom code calculations do not conflict with each other under appropriate circuit switching.

編碼單元100能執行以獲得Z(j)的運算值及完整 BCH碼字Z,故滿足F”。是故,在第j個時脈(第j次迭代計算)中,R’(j)的p個輸入r’0(j)、r’1(j)、r’2(j)…r’(p-1)(j)依序輸入到共用設計電路10中。經由迭代計算,在第[n/p]次運算後,完整BCH碼字Z(Z0、Z1...ZR-1)可由共用設計電路10輸出。由於編碼作業和癥狀碼計算共用部分迭代運算的多工器300與暫存器400,在接收輸入訊號時,要分清楚運算是編碼還是癥狀碼計算,這個工作由多工器300所進行。請見第5圖。當R’(j)輸入後,中間計算結果Z0(j)、Z1(j)...ZR-1(j)各自輸入不同之多工器300中;而各多工器300僅選擇來自編碼單元100的訊號輸出(中間計算結果),而不選擇來自癥狀碼計算單元200的訊號(即虛線箭號的部分)。各別由多工器300輸出的訊號,輸入到對應的一個暫存器400。該些暫存器400又在第j+1個時脈中,將該些訊號再輸入至編碼單元100中進行運算。 The encoding unit 100 can perform the operation value of Z(j) and the complete BCH codeword Z, so that F" is satisfied. Therefore, in the jth clock (the jth iteration calculation), R'(j) p inputs r' 0 (j), r' 1 (j), r' 2 (j)...r' (p-1) (j) are sequentially input to the common design circuit 10. Through iterative calculation, at the After [n/p] operations, the complete BCH codeword Z (Z 0 , Z 1 ... Z R-1 ) can be output by the shared design circuit 10. The multiplexer that shares the iterative operation is shared due to the coding operation and the symptom code. 300 and the register 400, when receiving the input signal, it is necessary to distinguish whether the operation is coding or symptom code calculation, and this work is performed by the multiplexer 300. See Figure 5. When R'(j) is input, the middle The calculation results Z 0 (j), Z 1 (j)...Z R-1 (j) are each input into different multiplexers 300; and each multiplexer 300 selects only the signal output from the encoding unit 100 (middle) The result of the calculation is not selected from the signal of the symptom code calculation unit 200 (ie, the portion of the dotted arrow). The signals respectively output by the multiplexer 300 are input to a corresponding one of the registers 400. 400 in the j+1th clock, the signals 100 computes the input to the encoding unit.

當進行癥狀碼計算時,癥狀碼計算單元200運 作。癥狀碼計算單元200能執行以獲得G(j)的運算值及完整癥狀碼S,故滿足XSRG。是故,在第j個時脈(第j次迭代計算)中,R(j)的p個輸入r0(j)、r1(j)、r2(j)…r(p-1)(j)依序輸入到共用設計電路10中。經由迭代計算,在第[n/p]次運算後,完整癥狀碼S(S1(1)、S1(2)、...S1(2)...S2t(m))可由共用設計電路10輸出。其中S的下標括號內數字或字母,表示某癥狀碼的對應該數字或字母的位元。比如S2t(m)就是癥狀碼S2t的第m個位元。 由於編碼作業和癥狀碼計算共用部分迭代運算的多工器300與暫存器400,在接收輸入訊號時,要分清楚是運算編碼還是癥狀碼計算,這個工作亦由多工器300所進行。請見第6圖。 當R(j)輸入後,中間計算結果g1(1)(j)、g1(2)(j)...g2t-1(m)(j)各自輸入不同之多工器300中;而各多工器300僅選擇來自編碼單元100的訊號輸出(中間計算結果),而不選擇來自癥狀碼計算單元200的訊號(即虛線箭號的部分)。各別由多工器300輸出的訊號,輸入到對應的一個暫存器400。該些暫存器400又在第j+1個時脈中,將該些訊號再輸入至癥狀碼計算單元200中進行運算。由於一次輸出的位元數量有m×t個,大於R。故,某些輸出值可不經多工器300,直接輸出到暫存器400中。也因此,暫存器400的數量至少要為m×t個。 The symptom code calculation unit 200 operates when symptom code calculation is performed. The symptom code calculation unit 200 can execute the operation value of G(j) and the complete symptom code S, so that X SRG is satisfied. Therefore, in the jth clock (jth iteration calculation), p inputs r 0 (j), r 1 (j), r 2 (j)...r (p-1) of R ( j ) (j) is sequentially input to the shared design circuit 10. Through iterative calculation, after the [n/p]th operation, the complete symptom code S(S 1(1) , S 1(2) , ...S 1(2) ... S 2t(m) ) can be The shared design circuit 10 outputs. The number or letter in the subscript of S in the subscript indicates the bit corresponding to the number or letter of a symptom code. For example, S 2t(m) is the mth bit of the symptom code S 2t . Since the coding operation and the symptom code calculate the multiplexer 300 and the temporary memory 400 which share the partial iteration operation, when the input signal is received, it is necessary to distinguish whether it is an operation code or a symptom code calculation, and this work is also performed by the multiplexer 300. See Figure 6. When R(j) is input, the intermediate calculation results g 1(1) (j), g 1(2) (j)...g 2t-1(m) (j) are respectively input into different multiplexers 300. And each multiplexer 300 selects only the signal output from the encoding unit 100 (intermediate calculation result), and does not select the signal from the symptom code calculation unit 200 (ie, the portion of the dotted arrow). The signals respectively output by the multiplexer 300 are input to a corresponding one of the registers 400. The buffers 400 are again input to the symptom code calculation unit 200 for calculation in the j+1th clock. Since the number of bits of one output is m × t, it is greater than R. Therefore, some output values can be directly output to the scratchpad 400 without going through the multiplexer 300. Therefore, the number of registers 400 must be at least m×t.

請再參閱第4圖,有幾點事項要注意。首先,本 發明可以應用在不同的BCH編碼上,即,碼長n及攜帶訊息k 的位元數是可變的,R值也會隨著變化。又因為多工器300的數量是與R值息息相關,所以在設計多工器300時,它的數量最好是要大於所可編成的BCH碼之R值。第4圖到第6圖所示的多工器300數量僅有R個,實作上並不限於此。此外,癥狀碼位元的數量,2tm,和碼長n沒有對應關係,第4圖顯示2tm大於n亦僅是示例性,2tm也有可能小於n。最後,第4圖顯示ZR-1(j)與g3(2)(j)共用一個多工器300,可以推導出R=m+2。然而,這也僅是眾多組合的一種情形,並非一成不變的。R與m的差值可能是任何數目。 Please refer to Figure 4 again. There are a few things to note. First, the present invention can be applied to different BCH codes, that is, the code length n and the number of bits carrying the message k are variable, and the R value also varies. Also, since the number of multiplexers 300 is closely related to the R value, when designing the multiplexer 300, its number is preferably larger than the R value of the BCH code that can be programmed. The number of multiplexers 300 shown in Figs. 4 to 6 is only R, and the implementation is not limited thereto. In addition, the number of symptom code bits, 2tm, has no corresponding relationship with the code length n. FIG. 4 shows that 2tm is greater than n and is only exemplary, and 2tm may be smaller than n. Finally, Figure 4 shows that Z R-1 (j) shares a multiplexer 300 with g 3(2) (j), and R = m + 2 can be derived. However, this is only a situation of many combinations, and it is not static. The difference between R and m may be any number.

由上述對於BCH碼編碼與癥狀計算共用設計電 路的介紹,可以得到以下決定該共用設計電路的方法:首先,依照平行計算數量與癥狀碼數量,建立XR、XG與XS。(步驟S11)。之後依序建立FP(步驟S2)、F’(步驟S13)與F”(步驟S14)。依照上述建立的資料,建立矩陣[XSRG F”](步驟S15)。最後,設計滿足矩陣[XSRG F”]運算的電路(步驟S16)。 From the above description of the common design circuit for BCH code encoding and symptom calculation, the following method for determining the shared design circuit can be obtained: First, X R , X G and X S are established according to the number of parallel calculations and the number of symptom codes. (Step S11). Then, F P (steps S2), F' (steps S13) and F" are sequentially established (step S14). Based on the above-established data, a matrix [X SRG F" is established (step S15). Finally, a circuit that satisfies the matrix [X SRG F"] operation is designed (step S16).

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

10‧‧‧共用設計電路 10‧‧‧Shared design circuit

100‧‧‧編碼單元 100‧‧‧ coding unit

200‧‧‧癥狀碼計算單元 200‧‧‧ symptom code calculation unit

300‧‧‧多工器 300‧‧‧Multiplexer

400‧‧‧暫存器 400‧‧‧ register

Claims (9)

一種用於BCH碼編碼與癥狀計算共用設計電路,可進行p個平行運算,包含:一編碼單元,用以將具有k位元的一訊息,經一第一迭代運算後編碼成具有n位元的BCH碼碼字,該第一迭代運算在每一時脈中依次接收p位元,並於[n/p]時脈後輸出該BCH碼碼字;一癥狀碼計算單元,用以將具有n位元的一BCH碼碼字,經一第二迭代運算後得到2t個m位元的癥狀碼,該第二迭代運算在每一時脈中依次接收p位元,並於[n/p]時脈後輸出該癥狀碼;複數個多工器,每一多工器用以接收該第一迭代運算所產生的一第一中間計算結果與該第二迭代運算所產生的一第二中間計算結果,當第一迭代運算進行時,輸出該第一中間計算結果;當第二迭代運算進行時,輸出該第二中間計算結果;及複數個暫存器,每一暫存器用以接收來自對應多工器的第一中間計算結果或第二中間計算結果,或來自對應癥狀碼計算單元的第二中間計算結果,及在收到該第一中間計算結果或第二中間計算結果後的一時脈中,輸出該第一中間計算結果到該編碼單元或該第二中間計算結果到該癥狀碼計算單元, 其中k、n、p與t為正整數,n大於k,m為GF(2m)中2的次方。 A common design circuit for BCH code encoding and symptom calculation, which can perform p parallel operations, comprising: a coding unit for encoding a message having k bits into a n-bit after a first iterative operation The BCH code codeword, the first iterative operation sequentially receives the p-bit in each clock, and outputs the BCH code codeword after the [n/p] clock; a symptom code calculation unit for having n A BCH code code word of a bit bit obtains a symptom code of 2t m bits after a second iterative operation, and the second iterative operation sequentially receives p bits in each clock, and at [n/p] The symptom code is output after the pulse; a plurality of multiplexers, each multiplexer is configured to receive a first intermediate calculation result generated by the first iterative operation and a second intermediate calculation result generated by the second iterative operation, When the first iterative operation is performed, outputting the first intermediate calculation result; when the second iteration operation is performed, outputting the second intermediate calculation result; and a plurality of temporary registers, each of the temporary registers is configured to receive from the corresponding multiplexing The first intermediate calculation result or the second intermediate calculation result, or a second intermediate calculation result from the corresponding symptom code calculation unit, and in a time after receiving the first intermediate calculation result or the second intermediate calculation result, outputting the first intermediate calculation result to the coding unit or the second The intermediate calculation results to the symptom code calculation unit, where k, n, p, and t are positive integers, n is greater than k, and m is the power of 2 of GF(2 m ). 如申請專利範圍第1項所述之共用設計電路,其中該第一迭代運算獲得Z(j)的運算值及完整BCH碼字,其中Z(j)=Fp×[Z(j-1)+R'(j)],Z(0)中所有元素皆為0,其中 Z(j)為第一迭代運算的第j次迭代計算的第一中間計算結果;一具有k位元訊息的n位元的初始處理資料以p位元為單位切割,R’(j)為第j個分割的p位元;R=n-k+1;g’R-1、g’R-2...g’0為一生成多項式g(x)=xR+g' R-1xR-1+g' R-2xR-2+…+g' 2x2+g' 1x1+g' 0的係數。 The shared design circuit of claim 1, wherein the first iterative operation obtains an operation value of Z(j) and a complete BCH codeword, where Z(j)=F p ×[ Z ( j -1) + R' ( j )], all elements in Z(0) are 0, where Z(j) is the first intermediate calculation result calculated by the jth iteration of the first iterative operation; the initial processing data of an n-bit having a k-bit message is cut in units of p bits, and R'(j) is The jth divided p-bit; R=n-k+1; g' R-1 , g' R-2 ... g' 0 is a generator polynomial g(x)=x R +g ' R- 1 x R-1 +g ' R-2 x R-2 +...+g ' 2 x 2 +g ' 1 x 1 +g ' 0 coefficient. 如申請專利範圍第2項所述之共用設計電路,其中該第一迭代運算滿足一矩陣F”之運算,其中 F'=[Fp的首P欄|Fp],m為一正整數。 A shared design circuit as described in claim 2, wherein the first iterative operation satisfies a matrix F" operation, wherein F ' = [F p 's first P column | F p ], m is a positive integer. 如申請專利範圍第1項所述之共用設計電路,其中該第二迭代運算獲得G(j)的運算值及完整癥狀碼,其中 中G(j)=[g1(j)g3(j)…g2t-1(j)],G(j)表示第二迭代運算的第j次迭代計算中,m×t個第二中間計算結果,R(j)=[r 0(j)r 1(j)...r p-1(j)],R(j)表示在第j次迭代計算中,癥狀碼計算單元收到該碼字的p個位元,S(j)表示在第j次迭代計算中輸出的癥狀碼計算值;矩陣XR為一p×mt的二進制矩陣,XG為一個mt×mt的二進制矩陣,XS為一個mt×2mt的二進制矩陣。 The shared design circuit according to claim 1, wherein the second iterative operation obtains the calculated value of G(j) and the complete symptom code, wherein Where G(j)=[g 1 (j)g 3 (j)...g 2t-1 (j)], G(j) represents the j-th iteration calculation of the second iteration operation, m×t second Intermediate calculation result, R(j)=[ r 0 (j) r 1 (j)... r p -1 (j)], R(j) indicates that in the j-th iteration calculation, the symptom code calculation unit receives To the p bits of the codeword, S(j) represents the symptom code calculated value in the jth iteration calculation; the matrix X R is a p×mt binary matrix, and X G is a mt×mt binary The matrix, X S is a binary matrix of mt × 2mt. 如申請專利範圍第4項所述之共用設計電路,其中該矩陣XR、XG與XG定義如下:XR=[C1 C3…C2t-1], α 0...α m-1為GF(2 m )中的元素 , ,I為單位矩陣, Bw表示零矩陣與單位矩陣外的運算矩陣,w為2的正整數次 方但小於或等於2t, A shared design circuit as described in claim 4, wherein the matrices X R , X G and X G are defined as follows: X R =[C 1 C 3 ... C 2t-1 ], , α 0 ... α m -1 is an element in GF(2 m ), , I is the identity matrix, B w represents the operation matrix outside the zero matrix and the unit matrix, and w is a positive integer power of 2 but less than or equal to 2t, 如申請專利範圍第1項所述之共用設計電路,其中該多工器的數量要大於編碼單元可編成的BCH碼之R值,其中R=n-k+1。 A shared design circuit as described in claim 1, wherein the number of the multiplexers is greater than an R value of a BCH code that can be programmed by the coding unit, where R = n - k + 1. 如申請專利範圍第1項所述之共用設計電路,其中該暫存器的數量要大於或等於m×t個。 The shared design circuit according to claim 1, wherein the number of the registers is greater than or equal to m×t. 如申請專利範圍第1項所述之共用設計電路,其中該第一中間計算結果與第二中間計算結果是1位元訊號。 The shared design circuit of claim 1, wherein the first intermediate calculation result and the second intermediate calculation result are 1-bit signals. 一種用於決定BCH碼編碼與癥狀計算共用設計電路的方法,包含步驟:依照平行計算數量p與癥狀碼數量2t,建立XR、XG與XS;建立FP; 建立F’;建立F”;建立矩陣[XSRG F”];及設計滿足矩陣[XSRG F”]運算的電路,其中k、n、p與t為正整數,n大於k,XR=[C1 C3…C2t-1], α 0...α m-1為GF(2 m )中的元素 , ,I為單位矩陣, Bw表示零矩陣與單位矩陣外的運算矩陣,w為2的正整數次 方但小於或等於2t, F'=[Fp的首欄|Fp], R=n-k+1,g’R-1、g’R-2...g’0為一生成多項式g(x)=xR+g' R-1xR-1+g' R-2xR-2+…+g' 2x2+g' 1x1+g' 0的係數。 A method for determining a common design circuit for BCH code encoding and symptom calculation, comprising the steps of: establishing X R , X G and X S according to the number of parallel calculations p and the symptom code number 2t; establishing F P ; establishing F′; establishing F "Building a matrix [X SRG F"]; and designing a circuit that satisfies the operation of the matrix [X SRG F"], where k, n, p, and t are positive integers, n is greater than k, X R = [C 1 C 3 ... C 2t-1 ], , α 0 ... α m -1 is an element in GF(2 m ), , I is the identity matrix, B w represents the operation matrix outside the zero matrix and the unit matrix, and w is a positive integer power of 2 but less than or equal to 2t, F ' =[F p 's first column|F p ], R=n-k+1,g' R-1 ,g' R-2 ...g' 0 is a generator polynomial g(x)=x R +g ' R-1 x R-1 +g ' R -2 x R-2 +...+g ' 2 x 2 +g ' 1 x 1 +g ' The coefficient of 0 .
TW103114945A 2014-04-25 2014-04-25 Encoding and syndrome computing co-design circuit for bch code and method for deciding the same TWI523437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103114945A TWI523437B (en) 2014-04-25 2014-04-25 Encoding and syndrome computing co-design circuit for bch code and method for deciding the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103114945A TWI523437B (en) 2014-04-25 2014-04-25 Encoding and syndrome computing co-design circuit for bch code and method for deciding the same

Publications (2)

Publication Number Publication Date
TW201541874A TW201541874A (en) 2015-11-01
TWI523437B true TWI523437B (en) 2016-02-21

Family

ID=55220631

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103114945A TWI523437B (en) 2014-04-25 2014-04-25 Encoding and syndrome computing co-design circuit for bch code and method for deciding the same

Country Status (1)

Country Link
TW (1) TWI523437B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI822952B (en) * 2019-03-29 2023-11-21 英商Arm股份有限公司 Processing of iterative operation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI822952B (en) * 2019-03-29 2023-11-21 英商Arm股份有限公司 Processing of iterative operation

Also Published As

Publication number Publication date
TW201541874A (en) 2015-11-01

Similar Documents

Publication Publication Date Title
US9998148B2 (en) Techniques for low complexity turbo product code decoding
JP4320418B2 (en) Decoding device and receiving device
US8352847B2 (en) Matrix vector multiplication for error-correction encoding and the like
KR101227264B1 (en) Method and apparatus for block and rate independent decoding of ldpc codes
WO2011142133A1 (en) Error-correcting code processing method and device
US8335974B2 (en) Binary BCH decoders
US10439643B2 (en) Reed-Solomon decoders and decoding methods
US7870468B1 (en) Reed-solomon decoder using a configurable arithmetic processor
US9614550B2 (en) Parallel BCH coding circuit, encoder and method
US9337869B2 (en) Encoding and syndrome computing co-design circuit for BCH code and method for deciding the same
KR102519667B1 (en) Encoding method of efficient generalized tensor product codes, and apparatus there-of
TWI523437B (en) Encoding and syndrome computing co-design circuit for bch code and method for deciding the same
US9455747B1 (en) Parallel chien search with folding and a symbolized minimal polynomial combinational network (S-MPCN)
US20180006664A1 (en) Methods and apparatus for performing reed-solomon encoding by lagrangian polynomial fitting
US9467173B2 (en) Multi-code Chien's search circuit for BCH codes with various values of m in GF(2m)
US9459836B2 (en) Simplified inversionless berlekamp-massey algorithm for binary BCH code and circuit implementing therefor
JP5385944B2 (en) Decoder
Perrone et al. High-throughput one-channel RS (255,239) decoder
TWI551059B (en) MULTI-CODE CHIEN'S SEARCH CIRCUIT FOR BCH CODES WITH VARIOUS VALUES OF M IN GF(2m)
Srivastava et al. Efficient Berlekamp-Massey based recursive decoder for Reed-Solomon codes
TWI514778B (en) Method and circuit for shortening latency of chien's search algorithm for bch codewords
JP2012124888A (en) Decoder and decoding method
US10879933B2 (en) Reed solomon decoder and semiconductor device including the same
JP4755238B2 (en) Decoder
KR100907547B1 (en) Algorithm calculation method of Reed-Solomon decoder and its circuit