Code sequence generator

Abstract: A code sequence generator having a register (5) for holding n-bit code, and a calculation circuit (6) for performing matrix calculation on the content of the register (5), and sequentially generating a code sequence by feeding back the calculation results to the register. The matrix which is set in the calculation circuit (6) is changed by selectively reading a matrix from a memory circuit (7) that stores precalculated matrices. This makes it possible to set a desired register state in a short time even if the desired code sequence is very long, and to generate any code sequences without changing the rate of a clock signal.

Description: The present invention relates to a code sequence generator which generates maximum length sequences or Gold sequences. Digital code sequences are used in various fields such as cryptography of digital information, and spreading codes for expanding the signal bandwidth of spread-spectrum communications. In particular, the maximum length sequences (M-sequences) are utilized as a random code or a pseudonoise signal because they have a very long period and their autocorrelational characteristics are impulsive. Digital codes can be generated by using a register and a calculation circuit performing a calculation on the content of the register, and by feeding the computed results back to the register. For example, the calculation for generating M-sequences with period 15 can be implemented by a single EXCLUSIVE OR circuit, and a simple feedback circuit as shown in Fig. 1. In Fig. 1, the reference numeral 1 designates a four stage shift register consisting of four registers R1 - R4, and the reference numeral 2 designates an EXCLUSIVE OR circuit EXCLUSIVE-ORing the outputs of the registers R1 and R4. The output of the EXCLUSIVE OR circuit 2 is fed back to the input of the register R1. Each of the registers R1 - R4 is set at an initial value (not all initial values are zero) and the contents of the registers R1 - R4 are shifted by a clock signal provided thereto, thereby generating an M-sequence code with period 15. Fig. 2 shows an M-sequence generator with period 15 arranged by generalizing the generator of Fig. 1. This generator includes four 1-bit registers instead of the shift register 1 of Fig. 1. In Fig. 2, the reference numeral 3 designates a register circuit including four 1-bit registers REG1 - REG4, and the reference numeral 4 designates a calculation circuit for performing calculation on the contents of the register circuit 3, and feeds the calculated results back to the register circuit 3. The M-sequence is outputted from the output terminal of the register REG4. In these M-sequence code generators, let us assume that the generation of a code sequence is started after the state of the register circuit 3 is changed by providing it with a given number of clock pulses. For example, to start generation of a code sequence after providing five clock pulses, the five clock pulses must be quickly applied to the register circuit 3 to place it in the start state. In this case, although it will be easy to generate an M-sequence with period 15 from a desired phase, it will take a much longer time to place a register in a desired start state by providing it with a necessary number of clock pulses in order to generate a code sequence with a much longer period from a desired phase. An article by M T G Hughes (Electronics letters Vol. 4, No. 19, 20 September 1968 P417-419 entitled "Transition-Matrix Construction for Pseudorandom Binary-sequence Generators") discloses a code sequence generator for generating a code sequence Y=A m X by using a fixed table and a variable n X n matrix evaluated with values taken from said table. The present invention provides an alternative code sequence generator for generating a maximum length sequence comprising means for generating a start phase from an initial phase Y, defined by Y = A m X by repeating a linear transformation defined by an n x n matrix A to n-bit data X by m times, where m is a positive integer, characterised by storing means for storing in advance p j -th powers of said matrix A, that is, A pj , for each of predetermined t+1 positive integers p j , where j = 0, 1, 2, ..., t, and t > 0; means for resolving said integer m to a linear combination of said integers p j , that is, m = k 0 p 0 + k 1 p 1 + k 2 p 2 + ... + k t p t , where k 0 , k 1 , k 2 , ..., k t are integers equal to or greater than zero; selecting means for sequentially selecting matrices A p0 , A p1 , A p2 , ..., A pt associated with nonzero ones of said k 0 , k 1 , k 2 ,..., k t from said storing means; and means for performing the following matrix calculation for nonzero ones of said k 0 , k 1 , k 2 , ..., k t . Y =( A p 0 ) k 0 ( A P 1 ) k 1 ( A p 2 ) k 2 ....( A p t ) k t X The integers p j may be determined by sequentially dividing n by 2 as p 0 = 1, p 1 = n/2, p 2 = n/2 2 , ..., p t = n/2 t , and rounding down the results to nearest integers. The selecting means may comprise n t+1-to-1 line multiplexers operating in parallel. The selecting means may selectively provide the storing means with an address associated with a matrix to be selected from the matrices A pj . The selecting means may provide the calculation means with a particular matrix selected from the matrices A pj so that the code sequence generator generates a code sequence with a desired code interval which is defined as the difference of the values m of the two successive code sequences. An i-th state vector X i (i is a positive integer) of the register circuit of the code sequence generator is changed to an i+1-th state vector X i+1 by advancing the state by one step, where X i+1 is expressed as follows: X i+1 = AX i where a matrix A represents a calculation procedure. In the conventional technique, a register state at m (m is a positive integer) steps later is expressed as X i+m = A m X i In other words, m times of multiplications of the matrix A must be performed. In the code sequence generator the number of multiplications by the calculation circuit can be reduced. For example, assuming that m is expressed by the following equation. m = k 0 p 0 + k 1 p 1 + k 2 p 2 where k 0 , k 1 , k 2 , p 0 , p 1 and p 2 are integers equal to or greater than zero. If we have calculated matrices where k 0 , k 1 , k 2 , p 0 , p 1 and p 2 are integers equal to or m steps later can be expressed as X i+m = A m X i =( A p 0 ) k 0 ( A p 1 ) k 1 ( A p 2 ) k 2 This means that the number of multiplications M is given by M = k 0 + k 1 + k 2 Accordingly, the number of multiplications M can be greatly reduced. For example, when m = 127, and p 1 = 100 and p 2 = 10, it follows that k 0 = 7, k 1 = 1 and k 2 = 2, and the number of multiplications M = 10. A greater reduction in the number of multiplications M will be expected with the increase in the value m. Furthermore, combining a plurality of matrices makes it possible to set the register to a desired phase quickly, and then, to start generating a code sequence from the desired phase. The present invention differs from the conventional technique in that it does not sequentially obtain the next register states step by step, but prepares in advance matrices that represent calculation procedures which gives discontinuous register states. Furthermore, a code sequence can be generated at an intended interval without changing the clock rate. Therefore, the present invention is particularly effective when a code sequence is long and a register state separated far apart from the current state is to be set. Embodiments of the present invention will now be described with reference to the accompanying drawings, in which: Fig. 1 is a block diagram showing a concrete example of a conventional M-sequence generator with period 15; Fig. 2 is a block diagram showing a general arrangement of a conventional M-sequence generator; and Fig. 3 is a block diagram showing an example of a code sequence generator in accordance with one embodiment of the present invention. Fig. 3 is a block diagram showing an embodiment of a code sequence generator in accordance with the present invention. In Fig. 3, the reference numeral 5 designates an n-bit register, which includes n 1-bit registers REG1, REG2, ... , REGn. The register 5 holds an n-bit state vector X i (i is an integer equal to or greater than zero), which is supplied to a calculation circuit 6. On the other hand, the reference numeral 7 designates a memory circuit which stores t+1 n×n-matrices A p0 , A p1 , A p2 , ..., A pt in advance. Here, the value t is determined taking account of the capacity of the memory circuit 7 and the degree of simplification of calculation. For example, when t = 4 and n = 100, p j (j = 0, 1, 2, ..., t= 4) is determined as follows: First, since the matrix A is essential, p 0 is set at p 0 = 1. Subsequently, sequentially dividing by 2 and rounding down the results to nearest integers gives p 1 = n/2 = 50, p 2 = n/2 2 = 25, p 3 = n/2 3 = 12, and p 4 = p t = n/2 4 = 6. The output data of the memory circuit 7 are provided to t+1 n-bit input terminals of a selecting switch 8. The selecting switch 8 consists of n t+1-to-1 line multiplexers operating in parallel, selects a desired matrix A pj under the control of a control circuit 9, and sequentially provides the calculation circuit 6 with each row of the selected matrix through the n-bit output terminal of the selecting switch 8. The calculation circuit 6 multiplies the state vector X i by the matrix A pj supplied thereto. The one-step advanced state vector X i+1 of the state vector X i is given by X i+1 = AX i and the m-step advanced state vector X i+m is given by X i+m = A m X i The control circuit 9 resolves m into a linear expression of p j as follows: m = k 0 p 0 + k 1 p 1 + k 2 p 2 + ... = k t p t For example, in the above mentioned example where n = 100 and t = 4, m = 81 can be resolved as follows: m = 1 × 50 + 1 × 25 + 6 This resolution can be easily performed by sequentially dividing m by 2. According to the resolution, the control circuit 9 controls the selecting switch 8 such that a matrix A pj used in calculation is supplied from the memory circuit 7 to the calculation circuit 6. Then, the control circuit 9 provides the memory circuit 7 with a readout signal so that rows of the matrix A pj are sequentially read one by one beginning from the top row, and are supplied to the calculation circuit 6 through the selecting switch 8. In addition, the control circuit 9 provides the calculation circuit 6 with information on the number of calculations (multiplications). With such an arrangement, A m X i is expressed as follows using equation (3). A m X i = ( A p 0 ) k 0 ( A p 1 ) k 1 ... ( A p t ) k t X i In this case, since A pj have been calculated in advance and prestored in the memory circuit 7, they can be obtained by only reading them out of the memory circuit 7. Accordingly, (A pj ) kj can be obtained by repeating multiplications of the matrix (A pj ) by k j times. Thus, the calculation of equation (5) can be obtained by M = k 0 + k 1 + ... +k t multiplications. The calculation result is stored into the register 5, and is outputted from therefrom. Taking account of the fact that the multiplications of the matrix A is repeated m times in the conventional technique, it will be clear that the calculation amount can be greatly reduced. For example, when m = 81, M = 1 + 1 + 6 = 8 from equation (4). This means that only eight times of multiplications can provide a desired result. Although the matrix A pj which is to be supplied to the calculation circuit 6 is selected by the selecting switch 8 in this embodiment, the matrix can be selected by providing the memory circuit 7 with address information from the control circuit 9. In this case, the selecting switch 8 can be obviated, and the control circuit 9 bears the function of a selecting means. Furthermore, the speed of calculation can be increased with the increase of the value t in this embodiment. However, this will increase the number of matrices which must be calculated in advance, and requires a memory circuit of larger capacity. In addition, providing a fixed matrix A p1 from the memory circuit 7 to the calculation circuit 6 makes it possible to produce state vectors by every p1 steps. In addition, although the embodiment employs only one calculation circuit 6, and sets one of a plurality of matrices thereto by reading it out of the memory circuit 7, it may be possible to employ a plurality of calculation circuits, each associated with one of the matrices, and perform calculations by combining these calculation circuits. Moreover, a desired register state can be quickly reached in this embodiment. As a result, a given phase of a code sequence can be achieved in a short time so that the code sequence can be generated from that phase. In addition, code sequences can be generated at a desired interval without using a clock signal of a higher rate. Thus, the present invention is particularly effective in setting register states associated with a long code sequence and separated by a large number of steps. The present invention has been described in detail with respect to an embodiment, and it will now be apparent from the foregoing to those skilled in the art that changes and modifications may be made without departing from the invention as claimed.

Claims: A code sequence generator for generating a maximum length sequence comprising means for generating a start phase Y from an initial phase X, defined by Y = A m X by repeating a linear transformation defined by an n x n matrix A to n-bit data X by m times, where m is a positive integer, characterised by storing means (7) for storing in advance p j -th power of said matrix A, that is, A pj , for each of predetermined t+1 positive integers p j , where j = 0, 1, 2, ..., t, and t > 0; means for resolving said integer m to a linear combination of said integers p j , that is, m = k 0 p 0 + k 1 p 1 + k 2 p 2 + ... + k t p t , where (k 0 , k 1 , k 2 , ..., k t are integers equal to or greater than zero; selecting means (8) for sequentially selecting matrices A p0 , A p1 , A p2 , ..., A pt associated with nonzero ones of said k 0 , k 1 , k 2 , ..., k t from said storing means; and means for performing the following matrix calculation for nonzero ones of said k 0 , k 1 , k 2 , ..., k t . Y = ( A p 0 ) k 0 ( A P 1 ) k 1 ( A p 2 ) k 2 .... ( A p t ) k t X The code sequence generator as claimed in claim 1, characterised in that said integers p j are determined by sequentially dividing n by 2 as p 0 = 1, p 1 = n/2, P 2 = n/2 2 , ..., p t = n/2 t , and rounding down the results to nearest integers. The code sequence generator as claimed in claim 2, characterised in that said selecting means comprises a number of n (t+1 to 1)-line-multiplexers operating in parallel. The code sequence generator as claimed in claim 2, characterised in that selecting means selectively provides said storing means with an address associated with a matrix to be selected from said matrices A pj . The code sequence generator as claimed in claim 1, characterised in that said selecting means provides said calculation means with a particular matrix selected from said matrices A pj so that said code sequence generator generates a code sequence with a desired code interval which is defined as the difference of the values m of the two successive code sequences.

Inventors: HIGASHI AKIHIRO, OHNO KOJI, UMEDA NARUMI, HIGASHI, AKIHIRO, OHNO, KOJI, UMEDA, NARUMI
Applicants: NIPPON TELEGRAPH & TELEPHONE, NTT MOBILE COMMUNICATIONS NETWORK INC.
Application year: 1995
Main classification: H04L9
IPC codes: H04J11, G06F7, H04L9