Summary of the invention
The invention provides the coding circuit method for designing of one (15,5) BCH code, greatly can shorten the scramble time, not by the restriction of clock cycle, coding rate improves greatly.
According to one embodiment of present invention, provide the coding circuit method for designing of one (15,5) BCH code, this coding circuit method for designing comprises: according to this (15,5) generator polynomial of BCH code, there is the serial encoding circuitry of the register of 10 series connection; According to this serial encoding circuitry, be respectively each register in serial encoding circuitry, the first relational expression between the redundancy check bit that after redundancy check bit that after obtaining input the i-th+1 information bit, it stores and input i-th information bit, each register memory stores up, the i-th+1 information bit of input, i≤4 and be nonnegative integer; According to the first relational expression, be respectively each register in serial encoding circuitry, the redundancy check bit that when obtaining redundancy check bit of its storage after inputting whole 5 information bits and do not input any information bit, each register memory stores up, the second relational expression of whole 5 information bits; According to the second relational expression, construct with 5 information bits be input, 10 redundancy check bits are the parallel encoding circuit exported.
Alternatively, the redundancy check bit not inputting each register memory storage during any information bit is all set to 0.
Alternatively, the step obtaining the second relational expression according to the first relational expression comprises: by the first relational expression vectorization obtained for each register in serial encoding circuitry, thus obtain represent input the i-th+1 information bit after the vector of the redundancy check bit that 10 registers store, input after the vector of redundancy check bit that stores of 10 registers and input i-th information bit the i-th+1 information bit between the primary vector relational expression of relation; According to primary vector relational expression, obtain the secondary vector relational expression of the vector of the redundancy check bit that 10 registers store after representing whole 5 information bits of input and relation when not inputting any information bit between the vector of the redundancy check bit that 10 registers store, whole 5 information bits; From secondary vector relational expression, obtain the second relational expression of each register corresponded in serial encoding circuitry.
The redundancy check bit that after the present invention's redundancy check bit that first draw input the i-th+1 information bit from serial encoding circuitry after, each register stores and input i-th information bit, each register memory stores up, relation between the i-th+1 information bit of input, and then the redundancy check bit that the redundancy check bit that after drawing whole 5 information bits of input, each register stores stores up with each register memory when not inputting any information bit, the relation of whole 5 information bits, this relation is exactly the relation of 10 redundancy check bits and 5 information bits, thus can construct with 5 information bits as input, 10 redundancy check bits are the parallel encoding circuit exported.Compared with the serial encoding circuitry of prior art, parallel circuit is adopted to replace traditional tandem coding solution, can not by the restriction of clock cycle, greatly shorten the scramble time, coding rate improves greatly.
Embodiment
Embodiments of the invention are described below in detail.
The example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.Disclosing hereafter provides many different embodiments or example is used for realizing different structure of the present invention.Of the present invention open in order to simplify, hereinafter the parts of specific examples and setting are described.Certainly, they are only example, and object does not lie in restriction the present invention.
The invention provides the coding circuit method for designing of one (15,5) BCH code, wherein the figure place of information bit is 5, and the total bit after coding is 15, and the figure place of redundancy check bit is 10.As shown in Figure 4, the method comprises:
In step S1, according to the generator polynomial of this (15,5) BCH code, there is the serial encoding circuitry of the register of 10 series connection.
With (15,5) BCH code for example, Fig. 2 shows a serial encoding circuitry with the register of 10 series connection constructed, and it can construct by the mode of prior art.With the generator polynomial of (15,5) BCH code described above be:
g(X)=φ
1(X)·φ
3(X)·φ
5(X)=1+X+X
2+X
4+X
5+X
8+X
10
Situation be example, construct the serial encoding circuitry shown in Fig. 2.In fact, Fig. 2 is the connection layout specialized of Fig. 1.This circuit comprises S
0~ S
9ten registers.
Concrete, during circuit working, clock signal c1k controls ten register S
0~ S
9.When rising edge clock arrives, the output of ten registers sends into next stage respectively, produces the output of next stage simultaneously.After information bit has inputted, the value of preserving in 10 registers has been exactly the value of 10 bit check positions.Together with the data of preserving in 10 registers input with the external world, cyclic shift.Understand according to algebraic method, ten bit check positions are exactly the information bit multinomial that information bit is formed, and are then multiplied by X
10(output of input information and rightmost register together computing is equivalent to be multiplied by X
10), then the coefficient of the residue obtained divided by the generator polynomial g (X) that BCH is corresponding.
In step S2, according to this serial encoding circuitry, be respectively each register in serial encoding circuitry, the first relational expression between the redundancy check bit that after redundancy check bit that after obtaining input the i-th+1 information bit, it stores and input i-th information bit, each register memory stores up, the i-th+1 information bit of input, i≤4 and be nonnegative integer.
Still for the example of Fig. 2, can be each register in 10 registers of Fig. 2, obtain the first relational expression as follows:
Wherein,
the redundancy check bit stored in each register S0 ~ S9 after representing input i-th information bit,
each register S after inputting the i-th+1 information bit
0~ S
9the redundancy check bit of interior storage, u
i+1represent the i-th+1 information bit of input.As shown in Figure 2, register S
9after input the i-th+1 information bit, its storing value is last register S
8pass over, last register S should be equaled
8storing value after input i-th information bit, therefore
register S
8after input the i-th+1 information bit, its storing value is last register S
7the value passed over adds register S
9the value fed back and, therefore
adding here is all that finger print two adds.
In step s3, according to the first relational expression (1), be respectively each register in serial encoding circuitry, the redundancy check bit that when obtaining redundancy check bit of its storage after inputting whole 5 information bits and do not input any information bit, each register memory stores up, second relational expression (2) of whole 5 information bits.Particularly:
In sub-step S31, by the first relational expression vectorization obtained for each register in serial encoding circuitry, thus obtain represent input the i-th+1 information bit after the vector of the redundancy check bit that 10 registers store, input after the vector of redundancy check bit that stores of 10 registers and input i-th information bit the i-th+1 information bit between the primary vector relational expression of relation.
Still with above-mentioned (15,5) BCH code be example for example, the first relational expression (1) is rewritten into primary vector relational expression (I):
S
ithe vector of the redundancy check bit of 10 register storages after expression input i-th information bit, S
i+1the vector of the redundancy check bit of 10 register storages after expression input the i-th+1 information bit.Still with aforementioned (15,5) BCH code for example:
The coefficient matrix of matrix A for being obtained by each coefficient in above formula (1).Matrix A is:
G
i+1it is the vector of the i-th+1 information bit of reflection input.It is a column vector, and the first row is the vector of the i-th+1 information bit of input, all the other behaviors 0.If U is the vectorial U=[u of all information bits composition
0, u
1..., u
4],
Wherein G
, i+1i-th+1 row of representing matrix.
In sub-step S32, according to primary vector relational expression (I), obtain the secondary vector relational expression of the vector of the redundancy check bit that 10 registers store after representing whole 5 information bits of input and relation when not inputting any information bit between the vector of the redundancy check bit that 10 registers store, whole 5 information bits.
With above-mentioned (15,5) BCH code for example, by primary vector relational expression (I), obtain secondary vector relational expression (II):
S
5for the vector of the redundancy check bit of 10 register storages after whole 5 information bits of expression input, S
0the vector of the redundancy check bit that 10 registers store during for not inputting any information bit.The redundancy check bit of register memory storage each when not inputting any information bit all can be set to 0, now S
0be 0, above formula (II) becomes:
In step S33, from secondary vector relational expression, obtain the second relational expression of each register corresponded in serial encoding circuitry.
With above-mentioned (15,5) BCH code for example, above formula (II-1) is launched to obtain following expression, namely corresponds to the second relational expression of each register in serial encoding circuitry:
Step S3 also can perform not according to the mode of above-mentioned S31-S33.Such as, directly from the first relational expression (1), namely
, by deriving, will
be expressed as u
0-u
4function, namely obtain (2), only process is complicated a little.
Herein, plus sige all represents the addition on mould two, namely equals binary XOR
In step S4, according to the second relational expression, construct with 5 information bits be input, 10 redundancy check bits are the parallel encoding circuit exported.
With above-mentioned (15,5) BCH code for example, according to above-mentioned (2), construct parallel encoding circuit as shown in Figure 3.
Suppose that information bit to be encoded is for (11000), corresponding multinomial is U (X)=1+X, X
10u (X) is divided by generator polynomial g (X)=1+X+X
2+ X
4+ X
5+ X
8+ X
10obtain residue:
b(X)=1+X
3+X
4+X
6+X
8+X
9
Therefore coding obtains (1001101011|11000), 10, the left side is redundancy check bit, and 5, the right is information bit,
Can be correct according to formula (2) checking derivation result.
Although with the generator polynomial of (15,5) BCH code be above:
g(X)=φ
1(X)·φ
3(X)·φ
5(X)=1+X+X
2+X
4+X
5+X
8+X
10
For example describes the design process of coding circuit of the present invention, but those skilled in the art are known, if g (X) is other, the present invention is applicable equally.
The present invention proposes the coding circuit method for designing of one (15,5) BCH code, adopts parallel circuit to replace traditional tandem coding solution, can not by the restriction of clock cycle, and greatly shorten the scramble time, coding rate improves greatly.