JP2006293429A - Device and method for random number generation - Google Patents

Device and method for random number generation Download PDF

Info

Publication number
JP2006293429A
JP2006293429A JP2005109111A JP2005109111A JP2006293429A JP 2006293429 A JP2006293429 A JP 2006293429A JP 2005109111 A JP2005109111 A JP 2005109111A JP 2005109111 A JP2005109111 A JP 2005109111A JP 2006293429 A JP2006293429 A JP 2006293429A
Authority
JP
Japan
Prior art keywords
bit
random number
cyclic code
sequence cyclic
uniform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005109111A
Other languages
Japanese (ja)
Inventor
Takayuki Tsutsumi
隆之 堤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2005109111A priority Critical patent/JP2006293429A/en
Publication of JP2006293429A publication Critical patent/JP2006293429A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device for random number generation that generates random numbers having excellent normal distribution characteristics with a very small hardware scale when normal random numbers are generated. <P>SOLUTION: The device for random number generation has an M-series cyclic code generating means (101) of generating an M-series cyclic code having designated cycles, a uniformly random number generating means (102) of generating a plurality of uniformly random numbers each having uniform distribution characteristics based upon the M-series cyclic code, and a normal random number generating means (103) of generating a normal random number having normal distribution characteristics by using the plurality of uniformly random numbers. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、乱数生成技術に関し、特に正規分布特性を有する乱数の生成技術に関する。   The present invention relates to a random number generation technique, and more particularly to a random number generation technique having a normal distribution characteristic.

カラー複写機やカラープリンタにおいては、カラーイメージスキャナ等の原稿画像の読取装置やコンピュータから入力された画像信号に対して、Log変換、CMYKへの色空間変換や、プリンタエンジンの特性に合わせた、ガンマ変換が行われた後、誤差拡散処理などの擬似中間処理が行われる。通常、擬似中間処理においては、量子化歪みによるマッハバンドを目立ちにくくするために、意図的に乱数を画像信号に加算する乱数加算処理が行われている。   In color copiers and color printers, image signals input from original image reading devices such as color image scanners and computers are converted to Log conversion, CMYK color space conversion, and printer engine characteristics. After the gamma conversion is performed, pseudo intermediate processing such as error diffusion processing is performed. Normally, in the pseudo-intermediate processing, random number addition processing for intentionally adding a random number to an image signal is performed in order to make the Mach band due to quantization distortion inconspicuous.

上記擬似中間処理はハードウェアで構成され、1サイクル当り1画素の処理が行われる場合、上記乱数加算処理に用いられる正規乱数の生成も1サイクルに1回行う必要がある。   The pseudo intermediate processing is configured by hardware, and when processing of one pixel per cycle is performed, it is necessary to generate a normal random number used for the random number addition processing once per cycle.

上記正規乱数を生成する手法として、主にボックスミューラ法、極座標法、中心極限定理が利用されている。また、一様乱数を生成する手法は、主に線形合同法、M系列巡回符号を利用した手法などがある(下記の非特許文献1参照)。   As a method for generating the normal random numbers, the box mueller method, the polar coordinate method, and the central limit theorem are mainly used. Further, methods for generating uniform random numbers mainly include a linear congruential method and a method using an M-sequence cyclic code (see Non-Patent Document 1 below).

正規乱数生成装置の回路規模を増大させないために、一様乱数を生成する手法を用いて生成された長ビットの一様乱数から複数の短ビットの乱数を抽出し、上記複数の短ビットの乱数を用いて正規乱数を生成する方法がある。例えば、M系列巡回符号から長ビットの一様乱数を生成し、上記長ビットの一様乱数から複数の短ビットの乱数を抽出し、上記複数の短ビットの乱数を用いて正規乱数を生成する方法がある。   In order not to increase the circuit size of the normal random number generator, a plurality of short bit random numbers are extracted from the long bit uniform random number generated using a method of generating a uniform random number, and the plurality of short bit random numbers are extracted. There is a method of generating normal random numbers using. For example, a long-bit uniform random number is generated from an M-sequence cyclic code, a plurality of short-bit random numbers are extracted from the long-bit uniform random number, and a normal random number is generated using the plurality of short-bit random numbers. There is a way.

しかし上記の方法では、上記長ビットの一様乱数から抽出した上記複数の短ビットの乱数の相互相関が強くなってしまうため、上記複数の短ビットの乱数を用いて生成された正規乱数の自己相関が強くなってしまう問題がある。   However, in the above method, since the cross-correlation of the plurality of short bit random numbers extracted from the long bit uniform random number becomes strong, the self-regulation of the normal random number generated using the plurality of short bit random numbers. There is a problem that the correlation becomes strong.

以上の問題を解決するためには、例えば、図8で示すように、それぞれシードレジスタ1000〜1011のシードが異なる複数のM系列巡回符号生成器1012〜1023が生成した複数の一様乱数をビット操作部1026〜1037でビット操作し、上記複数の一様乱数を用いて正規乱数生成部1025で正規乱数を生成する手法がある。また、下記の特許文献1に示されるように、一様乱数を生成するためのM系列巡回符号生成器とは別のM系列巡回符号生成器(以下、EXOR生成器と呼ぶ)を用意し、上記M系列巡回符号生成器から生成された乱数とEXOR生成器から生成された乱数をそれぞれのビットごとの排他的論理和を計算し、正規乱数を生成する手法がある。   In order to solve the above problem, for example, as shown in FIG. 8, a plurality of uniform random numbers generated by a plurality of M-sequence cyclic code generators 1012 to 1023 having different seeds in the seed registers 1000 to 1011 are bits. There is a technique in which a bit is operated by the operation units 1026 to 1037 and a normal random number is generated by the normal random number generation unit 1025 using the plurality of uniform random numbers. Also, as shown in Patent Document 1 below, an M-sequence cyclic code generator (hereinafter referred to as an EXOR generator) different from the M-sequence cyclic code generator for generating uniform random numbers is prepared, There is a method of generating a normal random number by calculating an exclusive OR for each bit of the random number generated from the M-sequence cyclic code generator and the random number generated from the EXOR generator.

三上直樹、「アルゴリズム教科書-実用的なプログラミングで示すアルゴリズムの基礎と応用」CQ出版 1996/5 初版Naoki Mikami, “Algorithm Textbook-Basics and Applications of Algorithms Shown in Practical Programming” CQ Publishing 1996/5 First Edition 特開平11-85474号公報Japanese Patent Laid-Open No. 11-85474

しかし、以上のような自己相関が弱い正規乱数を生成する正規乱数生成装置は複数のM系列巡回符号器、又はEXOR生成器、及び上記M系列巡回符号生成器又は上記EXOR生成器に設定するシードを格納するレジスタを必要とするため、その分回路規模が増大してしまう。また、上記M系列巡回符号生成器又は上記EXOR生成器の数が増えることで、上記M系列巡回符号生成器、又は上記EXOR生成器に対するシード設定が困難になってしまう。   However, the normal random number generator for generating normal random numbers with weak autocorrelation as described above includes a plurality of M-sequence cyclic encoders, or EXOR generators, and seeds set in the M-sequence cyclic code generators or the EXOR generators. Therefore, the circuit scale increases accordingly. In addition, as the number of M-sequence cyclic code generators or EXOR generators increases, seed setting for the M-sequence cyclic code generator or EXOR generator becomes difficult.

本発明は、かかる事情に鑑みてなされたものであり、その目的は、正規乱数を生成する場合に少ないハードウェア規模で良好な正規分布特性を有する乱数を生成する乱数発生装置及び乱数生成方法を提供することにある。   The present invention has been made in view of such circumstances, and an object thereof is to provide a random number generation device and a random number generation method for generating random numbers having good normal distribution characteristics with a small hardware scale when generating normal random numbers. It is to provide.

本発明の乱数生成装置は、所定の周期を有するM系列巡回符号を生成するM系列巡回符号生成手段と、前記M系列巡回符号を基にそれぞれが一様分布特性を有する複数の一様乱数を生成する一様乱数生成手段と、前記複数の一様乱数を用いて正規分布特性を有する正規乱数を生成する正規乱数生成手段とを有することを特徴とする。   The random number generation device of the present invention includes an M-sequence cyclic code generation means for generating an M-sequence cyclic code having a predetermined period, and a plurality of uniform random numbers each having uniform distribution characteristics based on the M-sequence cyclic code. Uniform random number generation means for generating and normal random number generation means for generating normal random numbers having normal distribution characteristics using the plurality of uniform random numbers.

また、本発明の乱数生成装置は、M系列巡回符号を生成してそのM系列巡回符号を基に一様分布特性を有する複数の一様乱数を生成する一様乱数生成手段と、前記複数の一様乱数を加算して正規分布特性を有する正規乱数を生成する正規乱数生成手段とを有することを特徴とする。   Further, the random number generation device of the present invention includes a uniform random number generating means for generating an M-sequence cyclic code and generating a plurality of uniform random numbers having uniform distribution characteristics based on the M-sequence cyclic code; And normal random number generation means for generating normal random numbers having normal distribution characteristics by adding uniform random numbers.

また、本発明の乱数生成方法は、所定の周期を有するM系列巡回符号を生成するM系列巡回符号生成ステップと、前記M系列巡回符号を基にそれぞれが一様分布特性を有する複数の一様乱数を生成する一様乱数生成ステップと、前記複数の一様乱数を用いて正規分布特性を有する正規乱数を生成する正規乱数生成ステップとを有することを特徴とする。   The random number generation method according to the present invention includes an M-sequence cyclic code generation step for generating an M-sequence cyclic code having a predetermined period, and a plurality of uniform distribution characteristics each having uniform distribution characteristics based on the M-sequence cyclic code. A uniform random number generating step for generating a random number; and a normal random number generating step for generating a normal random number having a normal distribution characteristic using the plurality of uniform random numbers.

また、本発明の乱数生成方法は、M系列巡回符号を生成してそのM系列巡回符号を基に一様分布特性を有する複数の一様乱数を生成する一様乱数生成ステップと、前記複数の一様乱数を加算して正規分布特性を有する正規乱数を生成する正規乱数生成ステップとを有することを特徴とする。   Further, the random number generation method of the present invention includes a uniform random number generation step of generating an M-sequence cyclic code and generating a plurality of uniform random numbers having uniform distribution characteristics based on the M-sequence cyclic code, And a normal random number generation step of generating normal random numbers having normal distribution characteristics by adding uniform random numbers.

正規乱数を生成する場合に少ないハードウェア規模で良好な正規分布特性を有する乱数を生成することができる。   When generating normal random numbers, random numbers having good normal distribution characteristics can be generated with a small hardware scale.

(第1の実施形態)
図1は、本発明の第1の実施形態による正規乱数生成装置の一様乱数生成法の概略を示す。100はシードレジスタ、101はM系列巡回符号生成器、102は一様乱数生成部、103は正規乱数生成部、104〜115はビット操作部、116〜127は識別ビットである。以上の構成において、本発明の第1の実施形態を図1を用いて説明する。第1の実施形態は、毎サイクル正規乱数を生成する正規乱数生成装置である。
(First embodiment)
FIG. 1 shows an outline of a uniform random number generation method of a normal random number generation apparatus according to the first embodiment of the present invention. 100 is a seed register, 101 is an M-sequence cyclic code generator, 102 is a uniform random number generation unit, 103 is a normal random number generation unit, 104 to 115 are bit operation units, and 116 to 127 are identification bits. With the above configuration, a first embodiment of the present invention will be described with reference to FIG. The first embodiment is a normal random number generator that generates a normal random number every cycle.

シードレジスタ100について説明する。シードレジスタ100は、後述するM系列巡回符号生成器101に設定するためのシードを格納するレジスタである。   The seed register 100 will be described. The seed register 100 is a register that stores a seed to be set in the M-sequence cyclic code generator 101 described later.

M系列巡回符号生成器101について説明する。M系列巡回符号生成器101は、所定の段数のシフトレジスタを構成し、シフトレジスタの所定の出力を排他的論理和による論理演算にてフィードバックすることにより、擬似乱数を生成している。また、上記M系列巡回符号生成器101がN段のシフトレジスタで構成されているとすると、上記M系列巡回符号生成器101が生成する擬似乱数の周期は2N-1である。例えば、28ビットM系列巡回符号生成器を用いた場合、28段のシフトレジスタを構成し、生成する擬似乱数の周期は2*28-1である。M系列巡回符号生成器101は、所定の周期を有するM系列巡回符号を生成する。   The M-sequence cyclic code generator 101 will be described. The M-sequence cyclic code generator 101 constitutes a shift register having a predetermined number of stages, and generates a pseudo-random number by feeding back a predetermined output of the shift register by a logical operation using exclusive OR. Also, assuming that the M-sequence cyclic code generator 101 is composed of N stages of shift registers, the period of the pseudorandom number generated by the M-sequence cyclic code generator 101 is 2N-1. For example, when a 28-bit M-sequence cyclic code generator is used, a 28-stage shift register is configured, and the period of the pseudo random number to be generated is 2 * 28-1. M-sequence cyclic code generator 101 generates an M-sequence cyclic code having a predetermined period.

次に、一様乱数生成部102について説明する。上記一様乱数生成部102は上記M系列巡回符号生成器101が生成した擬似乱数を入力とするビット操作部104〜115を備え、またハードウェア固定値で、お互い異なる値の識別ビット116〜127を備えている。これにより、上記ビット操作部104〜115への入力はすべて異なる。例えば、図2で示すように、識別ビット116をハードウェア固定値"0000"としてビット操作部104に入力し、識別ビット117をハードウェア固定値"0001"としてビット操作部105に入力し、識別ビット118をハードウェア固定値"0010"としてビット操作部106に入力し、識別ビット119をハードウェア固定値"0011"としてビット操作部107に入力し、識別ビット120をハードウェア固定値"0100"としてビット操作部108に入力し、識別ビット121をハードウェア固定値"0101"としてビット操作部109に入力し、識別ビット122をハードウェア固定値"0110"としてビット操作部110に入力し、識別ビット123をハードウェア固定値"0111"としてビット操作部111に入力し、識別ビット124をハードウェア固定値"1000"としてビット操作部112に入力し、識別ビット125をハードウェア固定値"1001"としてビット操作部113に入力し、識別ビット126をハードウェア固定値"1010"としてビット操作部114に入力し、識別ビット127をハードウェア固定値"1011"としてビット操作部115に入力することで、上記ビット操作部104〜115はそれぞれ異なる32ビット長の値を入力していることになる。   Next, the uniform random number generation unit 102 will be described. The uniform random number generation unit 102 includes bit operation units 104 to 115 that receive the pseudo random numbers generated by the M-sequence cyclic code generator 101, and are identification values 116 to 127 each having a fixed hardware value and different values. It has. Thereby, the inputs to the bit operation units 104 to 115 are all different. For example, as shown in FIG. 2, the identification bit 116 is input to the bit operation unit 104 as a hardware fixed value “0000”, and the identification bit 117 is input to the bit operation unit 105 as a hardware fixed value “0001”. Bit 118 is input to bit operation unit 106 as hardware fixed value “0010”, identification bit 119 is input to bit operation unit 107 as hardware fixed value “0011”, and identification bit 120 is fixed to hardware fixed value “0100”. Is input to the bit operation unit 108, the identification bit 121 is input to the bit operation unit 109 as the hardware fixed value "0101", and the identification bit 122 is input to the bit operation unit 110 as the hardware fixed value "0110". Bit 123 is input to bit operation unit 111 as hardware fixed value “0111”, identification bit 124 is input to bit operation unit 112 as hardware fixed value “1000”, and identification bit 125 is fixed to hardware fixed value “1001”. As a bit By inputting to the operation unit 113, the identification bit 126 is input to the bit operation unit 114 as the hardware fixed value “1010”, and the identification bit 127 is input to the bit operation unit 115 as the hardware fixed value “1011”. Each of the bit operation units 104 to 115 inputs a different 32-bit length value.

以上の構成より上記一様乱数生成部102は、一様分布特性を有する相互相関の弱い一様乱数uk(0 <= k <= 11)を生成する。上記ビット操作部104〜115の詳細は後述する。 With the above configuration, the uniform random number generation unit 102 generates a uniform random number u k (0 ≤ k ≤ 11) having a uniform distribution characteristic and a weak cross-correlation. Details of the bit operation units 104 to 115 will be described later.

上記正規乱数生成部103について説明する。上記正規乱数生成部103は上記一様乱数生成部102で生成する一様乱数uk(0 <= k <= 11)を入力とする。互いに独立ないくつかの乱数の和は正規分布に近づくという中心極限定理に従って正規分布特性を有する正規乱数vn を出力している。例えば一様乱数生成部102が生成する12ビットの一様乱数uk (k = 0,1,・・・11)を用いて中心極限定理に従って正規乱数vnを生成する。正規乱数vnは、式(1)で算出される。正規乱数生成部103は、一様乱数ukを用いて正規分布特性を有する正規乱数vnを生成する。 The normal random number generation unit 103 will be described. The normal random number generation unit 103 receives the uniform random number u k (0 ≦ k ≦ 11) generated by the uniform random number generation unit 102 as an input. A normal random number v n having a normal distribution characteristic is output according to the central limit theorem that the sum of several independent random numbers approaches a normal distribution. For example, the normal random number v n is generated according to the central limit theorem using the 12-bit uniform random number u k (k = 0, 1,... 11) generated by the uniform random number generation unit 102. The normal random number v n is calculated by the equation (1). Normal random number generation unit 103 generates a normal random number v n with normal distribution characteristics by using a uniform random number u k.

Figure 2006293429
Figure 2006293429

よってvn=-24570〜24570(16 ビット)となる。 Therefore, v n = -24570 to 24570 (16 bits).

次に、図3を使用して、上記ビット操作部104を説明する。101は図1記載のM系列巡回符号生成器、116は図1記載の識別ビット、300はビット抽出回路、301は排他的論理和演算回路、302はビット反転回路である。   Next, the bit operation unit 104 will be described with reference to FIG. 101 is an M-sequence cyclic code generator shown in FIG. 1, 116 is an identification bit shown in FIG. 1, 300 is a bit extraction circuit, 301 is an exclusive OR operation circuit, and 302 is a bit inversion circuit.

以上の構成において、M系列巡回符号生成器101のビット長を28ビットにし、識別ビット116を4ビットにした場合の、12ビットの一様乱数u0を生成する上記ビット操作部104について説明する。上記識別ビット116のLSBから数えて、4ビット目をN3、3ビット目をN2、2ビット目をN1、1ビット目をN0とする。 In the above configuration, the bit operation unit 104 that generates a 12-bit uniform random number u 0 when the bit length of the M-sequence cyclic code generator 101 is 28 bits and the identification bit 116 is 4 bits will be described. . Counting from the LSB of the identification bit 116, the fourth bit is N3, the third bit is N2, the second bit is N1, and the first bit is N0.

ビット抽出回路300について説明する。上記M系列巡回符号生成器101が生成する上記擬似乱数は自己相関が強いので、ビット抽出回路300は、ビット操作部104が生成する一様乱数u0 の自己相関を軽減するように、上記擬似乱数のビットを任意に抽出する。例えば、一様乱数u0 を生成する際、上記M系列巡回符号生成器101が生成する上記擬似乱数からビットS0〜S13を抽出する必要があるとし、生成する一様乱数u0 のLSBから数えて1ビット目を生成するためにはS0、2ビット目を生成するためにはS1、3ビット目を生成するためにはS2、4ビット目を生成するためにはS3、5ビット目を生成するためにはS4、6ビット目を生成するためにはS5、7ビット目を生成するためにはS6、8ビット目を生成するためにはS7、9ビット目を生成するためにはS8、10ビット目を生成するためにはS9、11ビット目を生成するためにはS10、S11、12ビット目を生成するためにはS12、S13、が必要であるとすると、ビット操作部104は式(2)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。 The bit extraction circuit 300 will be described. Since the pseudo-random number generated by the M-sequence cyclic code generator 101 has a strong autocorrelation, the bit extraction circuit 300 is configured to reduce the autocorrelation of the uniform random number u 0 generated by the bit operation unit 104. Extract random bits arbitrarily. For example, uniform random numbers in generating u 0, and it is necessary to extract a bit S0~S13 from the pseudo-random number which the M-sequence cyclic code generator 101 generates, counted from the LSB of the uniform random number u 0 that produces S0 to generate the first bit, S1 to generate the second bit, S2 to generate the third bit, S3 to generate the fourth bit, and S5 to generate the fifth bit S4 to generate the sixth bit, S5 to generate the sixth bit, S6 to generate the seventh bit, S7 to generate the eighth bit, S8 to generate the ninth bit, Assuming S9 to generate the 10th bit, S10 and S11 to generate the 11th bit, and S12 and S13 to generate the 12th bit, the bit operation unit 104 has the formula It is configured as (2). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 12、S12 = 22、S11 = 1、S10 = 7、S9 = 25、S8 = 2、S7 = 18、S6 = 26、S5 = 3、S4 = 14、S3 = 23、S2 = 6、S1 = 21、S0 = 10 ・・・(2)     S13 = 12, S12 = 22, S11 = 1, S10 = 7, S9 = 25, S8 = 2, S7 = 18, S6 = 26, S5 = 3, S4 = 14, S3 = 23, S2 = 6, S1 = 21, S0 = 10 (2)

また、ビット操作部105〜115について図示していないが、S0〜S13を用いてビット操作部105〜115のビット抽出回路を説明すると、ビット操作部105は式(3)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Although the bit operation units 105 to 115 are not illustrated, the bit extraction unit of the bit operation units 105 to 115 will be described using S0 to S13. The bit operation unit 105 is configured as shown in Expression (3). . The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 20、S12 = 5、S11 = 0、S10 = 11、S9 = 15、S8 = 4、S7 = 19、S6 = 27、S5 = 9、S4 = 17、S3 = 16、S2 = 24、S1 = 13、S0 = 8 ・・・(3)     S13 = 20, S12 = 5, S11 = 0, S10 = 11, S9 = 15, S8 = 4, S7 = 19, S6 = 27, S5 = 9, S4 = 17, S3 = 16, S2 = 24, S1 = 13, S0 = 8 (3)

また、ビット操作部106は式(4)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 106 is configured as shown in Expression (4). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 26、S12 = 14、S11 = 10、S10 = 2、S9 = 21、S8 = 7、S7 = 18、S6 = 20、S5 = 5、S4 = 12、S3 = 22、S2 = 6、S1 = 0、S0 = 25 ・・・(4)     S13 = 26, S12 = 14, S11 = 10, S10 = 2, S9 = 21, S8 = 7, S7 = 18, S6 = 20, S5 = 5, S4 = 12, S3 = 22, S2 = 6, S1 = 0, S0 = 25 (4)

また、ビット操作部107は式(5)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   The bit operation unit 107 is configured as shown in Equation (5). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 23、S12 = 4、S11 = 3、S10 = 17、S9 = 13、S8 = 1、S7 = 19、S6 = 27、S5 = 9、S4 = 11、S3 = 16、S2 = 24、S1 = 8、S0 = 15 ・・・(5)     S13 = 23, S12 = 4, S11 = 3, S10 = 17, S9 = 13, S8 = 1, S7 = 19, S6 = 27, S5 = 9, S4 = 11, S3 = 16, S2 = 24, S1 = 8, S0 = 15 (5)

また、ビット操作部108は式(6)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 108 is configured as shown in Expression (6). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 27、S12 = 16、S11 = 9、S10 = 6、S9 = 21、S8 = 7、S7 = 18、S6 = 20、S5 = 5、S4 = 12、S3 = 22、S2 = 2、S1 = 13、S0 = 8 ・・・(6)     S13 = 27, S12 = 16, S11 = 9, S10 = 6, S9 = 21, S8 = 7, S7 = 18, S6 = 20, S5 = 5, S4 = 12, S3 = 22, S2 = 2, S1 = 13, S0 = 8 (6)

また、ビット操作部109は式(7)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 109 is configured as shown in Expression (7). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 13、S12 = 0、S11 = 8、S10 = 19、S9 = 17、S8 = 1、S7 = 26、S6 = 23、S5 = 4、S4 = 11、S3 = 14、S2 = 24、S1 = 10、S0 = 15 ・・・(7)     S13 = 13, S12 = 0, S11 = 8, S10 = 19, S9 = 17, S8 = 1, S7 = 26, S6 = 23, S5 = 4, S4 = 11, S3 = 14, S2 = 24, S1 = 10, S0 = 15 (7)

また、ビット操作部110は式(8)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 110 is configured as shown in Expression (8). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 21、S12 = 15、S11 = 10、S10 = 5、S9 = 19、S8 = 7、S7 = 9、S6 = 20、S5 = 6、S4 = 12、S3 = 26、S2 = 4、S1 = 27、S0 = 13 ・・・(8)     S13 = 21, S12 = 15, S11 = 10, S10 = 5, S9 = 19, S8 = 7, S7 = 9, S6 = 20, S5 = 6, S4 = 12, S3 = 26, S2 = 4, S1 = 27, S0 = 13 (8)

また、ビット操作部111は式(9)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 111 is configured as shown in Expression (9). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 18、S12 = 3、S11 = 1、S10 = 25、S9 = 16、S8 =0、S7 = 22、S6 = 23、S5 = 2、S4 = 11、S3 = 14、S2 = 24、S1 = 17、S0 = 8 ・・・(9)     S13 = 18, S12 = 3, S11 = 1, S10 = 25, S9 = 16, S8 = 0, S7 = 22, S6 = 23, S5 = 2, S4 = 11, S3 = 14, S2 = 24, S1 = 17, S0 = 8 (9)

また、ビット操作部112は式(10)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 112 is configured as shown in Expression (10). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 22、S12 = 24、S11 = 7、S10 = 8、S9 = 19、S8 =1、S7 = 3、S6 = 20、S5 = 6、S4 = 12、S3 = 18、S2 = 10、S1 = 27、S0 = 13 ・・・(10)     S13 = 22, S12 = 24, S11 = 7, S10 = 8, S9 = 19, S8 = 1, S7 = 3, S6 = 20, S5 = 6, S4 = 12, S3 = 18, S2 = 10, S1 = 27, S0 = 13 (10)

また、ビット操作部113は式(11)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 113 is configured as shown in Expression (11). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 11、S12 = 9、S11 = 2、S10 = 16、S9 = 23、S8 =0、S7 = 26、S6 = 5、S5 = 4、S4 = 21、S3 = 14、S2 = 15、S1 = 17、S0 = 25 ・・・(11)     S13 = 11, S12 = 9, S11 = 2, S10 = 16, S9 = 23, S8 = 0, S7 = 26, S6 = 5, S5 = 4, S4 = 21, S3 = 14, S2 = 15, S1 = 17, S0 = 25 (11)

また、ビット操作部114は式(12)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 114 is configured as shown in Expression (12). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 25、S12 = 19、S11 = 10、S10 = 6、S9 = 22、S8 =7、S7 = 24、S6 = 20、S5 = 8、S4 = 12、S3 = 18、S2 = 2、S1 = 27、S0 = 3 ・・・(12)     S13 = 25, S12 = 19, S11 = 10, S10 = 6, S9 = 22, S8 = 7, S7 = 24, S6 = 20, S5 = 8, S4 = 12, S3 = 18, S2 = 2, S1 = 27, S0 = 3 (12)

また、ビット操作部115は式(13)のように構成される。右辺の値は上記M系列巡回符号101のビット番号である。   Further, the bit operation unit 115 is configured as shown in Expression (13). The value on the right side is the bit number of the M-sequence cyclic code 101.

S13 = 13、S12 = 4、S11 = 1、S10 = 23、S9 = 15、S8 = 0、S7 = 26、S6 = 16、S5 = 9、S4 = 21、S3 = 14、S2 = 5、S1 = 17、S0 = 11 ・・・(13)     S13 = 13, S12 = 4, S11 = 1, S10 = 23, S9 = 15, S8 = 0, S7 = 26, S6 = 16, S5 = 9, S4 = 21, S3 = 14, S2 = 5, S1 = 17, S0 = 11 (13)

次に、排他的論理和演算回路301について説明する。排他的論理和演算回路301は上記ビット抽出回路300で上記M系列巡回符号器101が出力した擬似乱数から抽出したビットS6〜S13と上記識別ビット116の排他的論理和の論理演算を行う。上記排他的論理和演算回路301の構成は、例えば出力が12ビットの乱数列で、上記乱数列をLSBから数えて1ビット目をP0、2ビット目をP1、3ビット目をP2、4ビット目をP3、5ビット目をP4、6ビット目をP5、7ビット目をP6、8ビット目をP7、9ビット目をP8、10ビット目をP9、11ビット目をP10、12ビット目をP11とし、また上記ビット抽出回路300が出力したビットS0〜S13、及び上記識別ビットの各ビットN0〜N3を用いて表すと式(14)で表される。A EXOR BはAとBの排他的論理和の論理演算を意味する。   Next, the exclusive OR operation circuit 301 will be described. The exclusive OR operation circuit 301 performs an exclusive OR logical operation of the bits S6 to S13 extracted from the pseudo random number output from the M-sequence cyclic encoder 101 by the bit extraction circuit 300 and the identification bit 116. The configuration of the exclusive OR operation circuit 301 is, for example, a 12-bit random number output, and when the random number sequence is counted from the LSB, the first bit is P0, the second bit is P1, the third bit is P2, 4 bits Eye P3, bit 5 P4, bit 6 P5, bit 7 P6, bit 8 P7, bit 9 P8, bit 10 P9, bit 11 P10, bit 12 P11, and using the bits S0 to S13 output from the bit extraction circuit 300 and the bits N0 to N3 of the identification bit, is expressed by equation (14). A EXOR B means a logical operation of exclusive OR of A and B.

P11 = S13 EXOR S12、P10 = S11 EXOR S10、P9 = S9 EXOR N3、P8 = S8 EXOR N2 、P7 = S7 EXOR N1、 P6 = S6 EXOR N0、 P5 = S5、P4 = S4、P3 = S3、P2 = S2、P1 = S1、P0 = S0 ・・・(14)     P11 = S13 EXOR S12, P10 = S11 EXOR S10, P9 = S9 EXOR N3, P8 = S8 EXOR N2, P7 = S7 EXOR N1, P6 = S6 EXOR N0, P5 = S5, P4 = S4, P3 = S3, P2 = S2, P1 = S1, P0 = S0 (14)

また、ビット操作部105〜115の排他的論理和演算回路及び識別ビット117〜127について図示してはいないが、ビット操作部105〜115の排他的論理和演算回路の構成は、ビット操作部104の排他的論理和演算回路301の構成の説明で使用したN0〜N3及びP0〜P11及びS0〜13を用いて表すと式(14)で表される。A EXOR BはAとBの排他的論理和の論理演算を意味する。ただし、それぞれのビット操作部104〜115の記号が同じであっても上記記号に対するビットの値が同じとは限らない。例えば、ビット操作部104の出力ビットP11とビット操作部105の出力ビットP11の値が同じであるとは限らない。   Although the exclusive OR operation circuit and the identification bits 117 to 127 of the bit operation units 105 to 115 are not shown, the configuration of the exclusive OR operation circuit of the bit operation units 105 to 115 is the bit operation unit 104. When expressed using N0 to N3, P0 to P11, and S0 to 13 used in the description of the configuration of the exclusive OR operation circuit 301, the equation (14) is obtained. A EXOR B means a logical operation of exclusive OR of A and B. However, even if the symbols of the respective bit operation units 104 to 115 are the same, the bit values for the symbols are not necessarily the same. For example, the value of the output bit P11 of the bit operation unit 104 and the value of the output bit P11 of the bit operation unit 105 are not necessarily the same.

以上のように、排他的論理和の論理演算を行うことで、極端な値を持つ一様乱数u0が連続して生成されることを回避できる。 As described above, by performing a logical operation of exclusive OR, it is possible to avoid the generation of a uniform random number u 0 having an extreme value continuously.

次に、ビット反転回路302について説明する。ビット反転回路302は上記排他的論理和演算回路301の出力のビットP0〜P11のうちの任意のビットを反転させ、正規乱数を生成している。例えば、P9、P7、P4、P3、P0をビット反転させ、P11を12ビット目、P10を11ビット目、P9を10ビット目、P8を9ビット目、P7を8ビット目、P6を7ビット目、P5を6ビット目、P4を5ビット目、P3を2ビット目、P2を3ビット目、P1を2ビット目、P0を1ビット目とする12ビット長の一様乱数を生成する。   Next, the bit inverting circuit 302 will be described. The bit inversion circuit 302 inverts an arbitrary bit among the bits P0 to P11 output from the exclusive OR operation circuit 301 to generate a normal random number. For example, P9, P7, P4, P3, P0 are bit-inverted, P11 is the 12th bit, P10 is the 11th bit, P9 is the 10th bit, P8 is the 9th bit, P7 is the 8th bit, P6 is the 7th bit First, a 12-bit uniform random number is generated, with P5 as the 6th bit, P4 as the 5th bit, P3 as the 2nd bit, P2 as the 3rd bit, P1 as the 2nd bit, and P0 as the 1st bit.

図示してはいないが、ビット操作部105〜115の反転回路について上記P0〜P11を用いて説明すると、上記ビット反転回路302の構成と同じである。ただし、反転するビットはP9、P7、P4、P3、P0に限定するものではない。   Although not shown, when the inverting circuits of the bit operation units 105 to 115 are described using the above P0 to P11, they are the same as the configuration of the bit inverting circuit 302. However, the bits to be inverted are not limited to P9, P7, P4, P3, and P0.

ビット操作部105〜115は、それぞれが異なる識別ビット116を基にM系列巡回符号をビット操作する。具体的には、ビット操作部105〜115は、M系列巡回符号からビットを抽出するビット抽出回路300と、上記抽出したビット及び識別ビット116の排他的論理和を求める排他的論理和演算回路301と、上記抽出したビット又は上記排他的論理和のビットを反転させるビット反転回路302とを有する。   Bit operation sections 105 to 115 perform bit operations on M-sequence cyclic codes based on identification bits 116 that are different from each other. Specifically, the bit operation units 105 to 115 include a bit extraction circuit 300 that extracts bits from the M-sequence cyclic code, and an exclusive OR operation circuit 301 that calculates an exclusive OR of the extracted bits and the identification bits 116. And a bit inversion circuit 302 for inverting the extracted bit or the bit of the exclusive OR.

第1の実施形態では、一様乱数生成部102はビット操作部104〜115を備えることで、例えば相互相関が弱い一様乱数uk(0 <= k <= 11)を生成していたが、一様乱数生成部102が出力した一様乱数uk(0 <= k <= 11)の相互相関が弱ければ、例えば上記ビット生成部104から一様乱数u0、u1を生成するように、上記ビット生成部104〜115が複数の一様乱数uk(0 <= k <= 11)を生成しても特に問題はない。また、一様乱数生成部102が生成した一様乱数uk(0 <= k <= 11)の相互相関が弱ければ、各上記ビット操作部104〜115の構成が同じであるか否かは特に問題ない。例えば、ビット操作部104〜115がハッシュ演算を行うものである場合、ビット操作部104〜115の入力が異なるものであれば、出力する一様乱数uk (0 <= k <= 11)の相互相関が弱いので、上記ビット操作部104〜115の構成がすべて同じであっても特に問題ない。 In the first embodiment, the uniform random number generation unit 102 includes the bit operation units 104 to 115 to generate, for example, a uniform random number u k (0 <= k <= 11) having weak cross-correlation. If the cross-correlation of the uniform random number u k (0 ≦ k ≦ 11) output from the uniform random number generator 102 is weak, for example, the uniform random numbers u 0 and u 1 are generated from the bit generator 104. In addition, there is no particular problem even if the bit generation units 104 to 115 generate a plurality of uniform random numbers u k (0 ≤ k ≤ 11). Further, if the cross-correlation of the uniform random number u k (0 ≦ k ≦ 11) generated by the uniform random number generation unit 102 is weak, whether or not the configuration of each of the bit operation units 104 to 115 is the same There is no particular problem. For example, when the bit operation units 104 to 115 perform hash operations, if the input of the bit operation units 104 to 115 is different, the output of the uniform random number u k (0 ≤ k ≤ 11) Since the cross-correlation is weak, there is no particular problem even if the bit operation units 104 to 115 have the same configuration.

また、一様乱数生成部102はビット操作部104〜115に対してそれぞれ異なる値の記識別ビット116〜127が必要となるため、上記識別ビット116〜127のビット長は4ビットであったが、記識別ビットのビット長は各ビット操作部に対して識別ビットが異なる値を表現できるのであれば特に問題はないことはいうまでもない。また、識別ビット116〜127はハードウェア固定値として説明したが、レジスタ等の記憶媒体であっても特に問題ではない。   In addition, since the uniform random number generation unit 102 requires different identification bits 116 to 127 for the bit operation units 104 to 115, the bit length of the identification bits 116 to 127 is 4 bits. Needless to say, the bit length of the identification bit is not particularly problematic as long as the identification bit can represent different values for each bit operation unit. Further, although the identification bits 116 to 127 have been described as hardware fixed values, there is no particular problem even if they are storage media such as registers.

また、ビット操作部104〜115の反転回路の構成はすべて同じであるが、特に同じである必要はない。   In addition, the configurations of the inverting circuits of the bit operation units 104 to 115 are all the same, but need not be the same.

(第2の実施形態)
図4は、本発明の第2の実施形態による正規乱数生成装置の一様乱数生成法の概略を示す。100は図1記載のシードレジスタ、101は図1記載のM系列巡回符号生成器、104〜109は図1記載のビット操作部、500は一様乱数生成部、501〜506は識別ビット、507は正規乱数生成部、508はカウンタである。以上の構成において、本発明の第2の実施形態を、図4を用いて説明する。
(Second Embodiment)
FIG. 4 shows an outline of the uniform random number generation method of the normal random number generation apparatus according to the second embodiment of the present invention. 100 is a seed register shown in FIG. 1, 101 is an M-sequence cyclic code generator shown in FIG. 1, 104 to 109 are bit operation units shown in FIG. 1, 500 is a uniform random number generator, 501 to 506 are identification bits, 507 Is a normal random number generator, and 508 is a counter. With the above configuration, a second embodiment of the present invention will be described with reference to FIG.

シードレジスタ100、M系列巡回符号生成器101、ビット操作部104〜109は、第1の実施形態と同じ構成なので説明を割愛する。数サイクルに1回正規乱数vnを生成する正規乱数生成装置、例えば、正規乱数vnを生成するために一様乱数uk(0 <= k <= 11)が必要で、2サイクルに1回正規乱数vnを生成する正規乱数生成装置は後述する一様乱数生成部500により回路規模を縮小することができる。 Since the seed register 100, the M-sequence cyclic code generator 101, and the bit operation units 104 to 109 have the same configuration as that of the first embodiment, description thereof is omitted. A normal random number generator that generates a normal random number v n once in several cycles, for example, a uniform random number u k (0 ≤ k ≤ 11) is required to generate a normal random number v n , and 1 in 2 cycles The normal random number generation device that generates the round normal random number v n can reduce the circuit scale by the uniform random number generation unit 500 described later.

一様乱数生成部500について説明する。一様乱数生成部500はビット操作部104〜109と後述する識別ビット501〜506を備え、最初のサイクルで一様乱数uk(0 <= k <= 5)を生成し、次のサイクルで一様乱数uk(6 <= k <= 11)を生成する。 The uniform random number generation unit 500 will be described. The uniform random number generation unit 500 includes bit operation units 104 to 109 and identification bits 501 to 506 to be described later, generates a uniform random number u k (0 ≤ k ≤ 5) in the first cycle, and in the next cycle. Generate uniform random number u k (6 <= k <= 11).

次に、識別ビット501〜506について説明する。各上記識別ビット501〜506は3ビットのビット長であり、第1の実施形態と同じ構成である。   Next, the identification bits 501 to 506 will be described. Each of the identification bits 501 to 506 has a bit length of 3 bits and has the same configuration as that of the first embodiment.

次に、正規乱数生成部507について説明する。正規乱数生成部507は上記一様乱数生成部が生成した一様乱数uk(0 <= k <= 11)を入力とし、上記一様乱数uk(0 <= k <= 11)を保持する。カウンタ508は1ビットのカウンタであり、正規乱数生成部507はカウンタ508が"1"の時、つまり2サイクルに1回正規乱数vnを生成する。 Next, the normal random number generation unit 507 will be described. The normal random number generator 507 receives the uniform random number u k (0 ≤ k ≤ 11) generated by the uniform random number generator and holds the uniform random number u k (0 ≤ k ≤ 11). To do. The counter 508 is a 1-bit counter, and the normal random number generation unit 507 generates the normal random number v n when the counter 508 is “1”, that is, once every two cycles.

第2の実施形態は正規乱数vnを生成するために一様乱数uk(0 <= k <= 11)が必要で、2サイクルに1回正規乱数vnを生成する場合について説明したが、正規乱数生成部で一様乱数生成部から出力する一様乱数を保持して、正規乱数生成部から正規乱数を生成するタイミングをカウンタで制御していれば、上記構成に限定するものではない。例えば、正規乱数vnを生成するために一様乱数uk(0 <= k <= 11)が必要で、6サイクルに一度だけ正規乱数vnを生成する正規乱数生成装置は、一様乱数生成部がビット操作部を2つ、異なる値を持つ1ビットの識別ビットを2つ備え、また0から5を表すカウンタを備えることで実現できる。 The second embodiment requires a uniform random number u k (0 <= k < = 11) for generating a normal random number v n, has been described to generate a once normal random number v n 2 cycles If the uniform random number output from the uniform random number generation unit is held by the normal random number generation unit and the timing for generating the normal random number from the normal random number generation unit is controlled by the counter, the configuration is not limited to the above. . For example, uniform random numbers u k to generate a normal random number v n (0 <= k < = 11) is required, normal random number generator for generating a normal random number v n only once in six cycles, uniform random number This can be realized by providing the generation unit with two bit operation units, two 1-bit identification bits having different values, and a counter representing 0 to 5.

本実施形態では、上記シードレジスタ100及び上記M系列巡回符号生成器101のビット長を28ビットにし、上記一様乱数生成部102では12ビットの一様乱数を12個生成したが、特に上記ビット長や個数に限定することはないことは言うまでもない。   In this embodiment, the bit length of the seed register 100 and the M-sequence cyclic code generator 101 is 28 bits, and the uniform random number generator 102 generates 12 12-bit uniform random numbers. Needless to say, the length and number are not limited.

以上のように、第1及び第2の実施形態の正規乱数生成装置によれば、シードレジスタ及びM系列巡回符号生成器101が一組だけの構成であるため、M系列巡回符号に与えるシード設定を容易にし、回路のハードウェアの量を増大させることなく、また極端な値が連続して生成され自己相関が強くなってしまうことを回避した、正規乱数生成装置を提供することができる。また、毎サイクル出力を必要としない場合、カウンタを用いることによって、本実施形態の生成装置の回路規模を縮小することができる。   As described above, according to the normal random number generators of the first and second embodiments, since the seed register and the M-sequence cyclic code generator 101 have only one set, seed setting to be given to the M-sequence cyclic code Thus, it is possible to provide a normal random number generation device that does not increase the amount of circuit hardware, and avoids that an extreme value is continuously generated and autocorrelation is strengthened. In addition, when the output is not required every cycle, the circuit scale of the generation apparatus of the present embodiment can be reduced by using a counter.

これにより画像処理において、正規乱数の自己相関による画質劣化を防ぐことができ、良質な画質を得ることができる。図5は本実施形態による正規乱数生成装置が生成した正規乱数の近傍の自己相関を示した図である。また、図6は本実施形態による正規乱数生成装置が生成した正規乱数の28ビットM系列の周期周辺の自己相関を示したグラフである。そして図7は本実施形態による正規乱数生成装置が生成した正規乱数の度数分布表である。標準偏差は127/3である。図5〜図7より相関が弱く、正規分布特性を持った正規乱数を発生することができる正規乱数生成装置であることを証明することができる。   Thereby, in image processing, image quality deterioration due to autocorrelation of normal random numbers can be prevented, and high quality image quality can be obtained. FIG. 5 is a diagram showing the autocorrelation near the normal random number generated by the normal random number generation apparatus according to the present embodiment. FIG. 6 is a graph showing the autocorrelation around the period of a 28-bit M-sequence of normal random numbers generated by the normal random number generation apparatus according to the present embodiment. FIG. 7 is a frequency distribution table of normal random numbers generated by the normal random number generation apparatus according to the present embodiment. The standard deviation is 127/3. It can be proved that the present invention is a normal random number generation device that has a weaker correlation than FIGS. 5 to 7 and can generate normal random numbers having normal distribution characteristics.

(第3の実施形態)
カラー複写機やカラープリンタにおいては、カラーイメージスキャナ等の原稿画像の読取装置やコンピュータから入力された画像信号に対して、Log変換、CMYKへの色空間変換や、プリンタエンジンの特性に合わせた、ガンマ変換が行われた後、誤差拡散処理などの擬似中間処理が行われる。通常、擬似中間処理においては、量子化雑音によるモアレを目立ちにくくするために、故意に一様乱数値や正規乱数値を小雑音として加算する乱数加算処理が行われている。
(Third embodiment)
In color copiers and color printers, image signals input from original image reading devices such as color image scanners and computers are converted to Log conversion, CMYK color space conversion, and printer engine characteristics. After the gamma conversion is performed, pseudo intermediate processing such as error diffusion processing is performed. Normally, in the pseudo-intermediate process, random number addition processing is performed in which a uniform random number value or a normal random number value is intentionally added as small noise in order to make moire due to quantization noise less noticeable.

上記擬似中間処理はハードウェアで構成され、1システムクロック当り1画素の処理が行われる場合、上記乱数加算処理は2画素に一回の処理を行うので正規乱数の生成は2システムクロックに1回行う必要がある。通常ハードウェアを用いて簡略的に正規乱数を生成する方法としては、所望の画素数内で正規乱数の相関が出ないようなビット長で、かつ1システムクロック当り1個の一様乱数を抽出することが可能な複数のM系列巡回符号発生器を用意し、中心極限定理に従って抽出した複数の一様乱数を加算することにより、正規乱数値の生成を行っている。ここで、一様乱数を複数のM系列巡回符号発生器から抽出している理由は、一様乱数間の相関を無くすためである。この時、各M系列巡回符号発生器は同一の原始多項式を基にした構成をとり、夫々のM系列巡回符号発生器に対して異なるシード値を与えることにより、抽出した一様乱数間の相関を無くしている。   The pseudo intermediate processing is configured by hardware, and when one pixel processing is performed per system clock, the random number addition processing is performed once every two pixels, so generation of normal random numbers is performed once every two system clocks. There is a need to do. A simple method of generating normal random numbers using normal hardware is to extract a single random number per system clock with a bit length that does not correlate normal random numbers within the desired number of pixels. A plurality of M-sequence cyclic code generators that can be used are prepared, and normal random values are generated by adding a plurality of uniform random numbers extracted according to the central limit theorem. Here, the reason why uniform random numbers are extracted from a plurality of M-sequence cyclic code generators is to eliminate correlation between uniform random numbers. At this time, each M-sequence cyclic code generator has a configuration based on the same primitive polynomial, and a different seed value is given to each M-sequence cyclic code generator to correlate between the extracted uniform random numbers. Is lost.

例えば、A3 1200DPIの画素数について、相関が出ないように正規乱数を発生する為には、1画素おきに正規乱数を発生したとしても28ビット長のM系列巡回符号発生器が必要である。そして中心極限定理の一様乱数の加算個数を12個とし、28ビット長M系列巡回符号発生器をから12ビットの一様乱数値を2つ抽出する場合、28ビット長M系列巡回符号発生器が6個必要となる。   For example, in order to generate a normal random number so that no correlation occurs for the number of pixels of A3 1200 DPI, an M-sequence cyclic code generator having a 28-bit length is required even if a normal random number is generated every other pixel. If the number of uniform random numbers added to the central limit theorem is 12, and two 12-bit uniform random numbers are extracted from the 28-bit long M-sequence cyclic code generator, the 28-bit long M-sequence cyclic code generator 6 are required.

しかし、上記すべての巡回符号に同じ原始多項式を用意し、すべて同じシード値を与えると、1クロックでM系列のデータが1bitしかシフトさせないことから、こうして生成した一様乱数から生成した正規乱数の自己相関は強く出てしまう欠点がある。上記欠点を解消するために異なるシード値を各々のM系列巡回符号に与えることが考えられるが、複数のM系列巡回符号発生器に対して異なるシード値をCPU等から設定する必要があり、それらの設定値を格納するためのレジスタが巡回符号発生器のビット長と同等な分だけ必要となり、ハードウェア規模の増加を招いていた。   However, if the same primitive polynomial is prepared for all of the above cyclic codes and the same seed value is given, the M-sequence data is shifted by only 1 bit in one clock, so the normal random number generated from the uniform random number generated in this way Autocorrelation has a drawback that it appears strongly. In order to eliminate the above drawbacks, it is conceivable to give different seed values to each M-sequence cyclic code, but it is necessary to set different seed values from a CPU or the like for a plurality of M-sequence cyclic code generators. The register for storing the set value is required to be equivalent to the bit length of the cyclic code generator, resulting in an increase in hardware scale.

例えば上記28ビット長M系列巡回符号発生器を6個用いる構成とした場合、シード値設定用のレジスタとしては28x6=168ビット長のレジスタが必要となる。   For example, in the case of using six 28-bit length M-sequence cyclic code generators, a 28 × 6 = 168-bit length register is required as a seed value setting register.

図9は、本発明の第3の実施形態による乱数発生装置の概略を示す。11はCPU等からの設定を格納するレジスタ部、12は他のブロックの動作シーケンス制御を行う制御部、13は一様乱数を生成する一様乱数生成部、14は上記一様乱数生成部13で生成された一様乱数を入力とし、正規乱数を生成する正規乱数生成部、15は上記正規乱数生成部14が生成した正規乱数をスケーリングするスケーリング部である。上記構成において、本発明の第3の実施形態を図9を用いて説明する。   FIG. 9 schematically shows a random number generator according to the third embodiment of the present invention. 11 is a register unit that stores settings from the CPU, 12 is a control unit that controls the operation sequence of other blocks, 13 is a uniform random number generator that generates uniform random numbers, and 14 is the uniform random number generator 13 The normal random number generator 15 generates a normal random number, and 15 is a scaling unit that scales the normal random number generated by the normal random number generator 14. In the above configuration, a third embodiment of the present invention will be described with reference to FIG.

レジスタ部11はCPU等からの設定値を格納し、他のブロックに供給する。制御部12は他のブロックの動作シーケンス制御を行う。一様乱数生成部13は28ビット長M系列巡回符号発生器6個を備え、12ビットの一様乱数を12個抽出して出力する。ここで、一様乱数のビット長は、後述するスケーリング部15での出力値のビット長は10ビット以上の値が必要であるため、後述するスケーリング部15での演算誤差等を考えて12ビットとしている。正規乱数生成部14は中心極限定理に従って、一様乱数生成部13からの12個の一様乱数を加算して正規乱数を出力する。   The register unit 11 stores setting values from the CPU and the like and supplies them to other blocks. The control unit 12 performs operation sequence control of other blocks. The uniform random number generator 13 includes six 28-bit long M-sequence cyclic code generators, and extracts and outputs 12 12-bit uniform random numbers. Here, the bit length of the uniform random number is 12 bits in consideration of the operation error in the scaling unit 15 described later because the bit length of the output value in the scaling unit 15 described later needs to be 10 bits or more. It is said. The normal random number generation unit 14 adds the 12 uniform random numbers from the uniform random number generation unit 13 and outputs a normal random number according to the central limit theorem.

この手法はXi(i=0,1,・・・11)を区間(0,1)上の一様乱数とすると、これらの乱数の和(X0+X2+・・・+X11)が平均値0、分散が1の正規分布によく近似することを利用する。ここで、出力される一様乱数をuk(k=1〜12)とすると正規乱数xは式(15)で算出される。 In this method, if Xi (i = 0,1, ... 11) is a uniform random number on the interval (0,1), the sum of these random numbers (X 0 + X 2 + ... + X 11 ) Is well approximated to a normal distribution with an average value of 0 and a variance of 1. Here, if the output uniform random number is u k (k = 1 to 12), the normal random number x is calculated by the equation (15).

Figure 2006293429
Figure 2006293429

よってx=-24570〜24570(16ビット)となる。   Therefore, x = -24570 to 24570 (16 bits).

スケーリング部15は上記正規乱数生成部14から出力された16ビットの正規乱数に対して、スケーリングを行い、10ビットの乱数加算値を生成する。図10にスケーリングの一例を示す。3σの値を255にスケーリングすることにより、正規乱数の最大値の6σが510にスケーリングされる。よって符号ビットも含めて10ビットの乱数加算値が生成される。   The scaling unit 15 performs scaling on the 16-bit normal random number output from the normal random number generation unit 14, and generates a 10-bit random number addition value. FIG. 10 shows an example of scaling. By scaling the value of 3σ to 255, the maximum value of 6σ of normal random numbers is scaled to 510. Therefore, a 10-bit random number addition value including the sign bit is generated.

スケーリング部15の出力値の上記乱数加算値は図示していない前段のガンマ変換処理の10ビットの出力濃度値Din(0〜1023の整数値)との加算を行う。以下、図示していない後段のクリッピング処理、誤差拡散処理に出力される。   The above random number addition value of the output value of the scaling unit 15 is added to a 10-bit output density value Din (an integer value of 0 to 1023) of the preceding stage gamma conversion process (not shown). Thereafter, it is output to a subsequent clipping process and error diffusion process (not shown).

次に図11を用いて一様乱数発生部13の詳細を説明する。31は28bitの共通のシード値(初期値)を格納するシードレジスタ、32はM系列巡回符号を発生させる28ビット長のM系列巡回符号発生器、33は32と原始多項式の異なる28ビット長のM系列巡回符号発生器、34は32、33と原始多項式の異なる28ビット長のM系列巡回符号発生器、35は32、33、34と原始多項式の異なる28ビット長のM系列巡回符号発生器、36は32、33、34、35と原始多項式の異なる28ビット長のM系列巡回符号発生器、37は32、33、34、35、36と原始多項式の異なる28ビット長のM系列巡回符号発生器である。   Next, the details of the uniform random number generator 13 will be described with reference to FIG. 31 is a seed register that stores a common 28-bit seed value (initial value), 32 is a 28-bit M-sequence cyclic code generator that generates an M-sequence cyclic code, and 33 is a 28-bit length that differs from 32 in the primitive polynomial. M-sequence cyclic code generator, 34 is a 28-bit length M-sequence cyclic code generator with a different primitive polynomial of 32, 33, and 35 is a 28-bit length M-sequence cyclic code generator with a different primitive polynomial of 32, 33, 34 , 36 is an M-sequence cyclic code generator with a 28-bit length different from 32, 33, 34, 35 and a primitive polynomial, 37 is an M-sequence cyclic code with a 28-bit length different from 32, 33, 34, 35, and 36 Generator.

本実施形態において、M系列巡回符号発生部13は、28bit長のM系列巡回符号発生器を6個備える。上記28bit長のM系列巡回符号発生器は各々異なった原始多項式を持つ。例えば、6個の上記28bit長M系列巡回符号発生器各々をMa,Mb・・・Mfとすると、Ma,Mb・・・Mf は式(16)に表される原始多項式を備える。上記原始多項式の組み合わせはなるべく次数が重ならないようにすることで、一様乱数間の相関を抑えることができる。   In this embodiment, the M-sequence cyclic code generator 13 includes six 28-bit length M-sequence cyclic code generators. Each of the 28-bit length M-sequence cyclic code generators has a different primitive polynomial. For example, assuming that each of the six 28-bit long M-sequence cyclic code generators is Ma, Mb... Mf, Ma, Mb... Mf has a primitive polynomial expressed by Equation (16). Correlation between uniform random numbers can be suppressed by preventing the orders of the primitive polynomial combinations from overlapping as much as possible.

Ma: h(X)=X28+X3
Mb: h(X)=X28+X6+X4+X1
Mc: h(X)=X28+X7+X6+X5
Md: h(X)=X28+X9+X8+X5
Me: h(X)=X28+X10+X3+X1
Mf: h(X)=X28+X11+X7+X3 ・・・(16)
Ma: h (X) = X 28 + X 3
Mb: h (X) = X 28 + X 6 + X 4 + X 1
Mc: h (X) = X 28 + X 7 + X 6 + X 5
Md: h (X) = X 28 + X 9 + X 8 + X 5
Me: h (X) = X 28 + X 10 + X 3 + X 1
Mf: h (X) = X 28 + X 11 + X 7 + X 3 (16)

ここで、Ma,Mb,Mc,Md,Me,Mfは28bit長M系列巡回符号発生器、h(X)は原始多項式である。また、シード値を格納するシードレジスタ31はレジスタ部11内から抜粋して明示している。   Here, Ma, Mb, Mc, Md, Me, and Mf are 28-bit long M-sequence cyclic code generators, and h (X) is a primitive polynomial. The seed register 31 for storing the seed value is extracted from the register unit 11 and clearly shown.

M系列巡回符号発生器32は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器32は、12ビットの一様乱数u0 [11:0]及びu1 [11:0]を出力する。ここで、一様乱数u0 [11:0]及びu1 [11:0]は28ビット長M系列巡回符号発生器32から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 32 is a 28-bit M-sequence cyclic code generator, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 32 outputs 12-bit uniform random numbers u 0 [11: 0] and u 1 [11: 0]. Here, uniform random numbers u 0 [11: 0] and u 1 [11: 0] are output by extracting bits from the 28-bit long M-sequence cyclic code generator 32 as follows.

u0 [11:0]=[22,7,11,2,18,1,3,13,23,9,21,10] ・・・(17)
u1 [11:0]=[5,20,8,16,19,0,12,17,4,6,13,15] ・・・(18)
u 0 [11: 0] = [22,7,11,2,18,1,3,13,23,9,21,10] (17)
u 1 [11: 0] = [5,20,8,16,19,0,12,17,4,6,13,15] (18)

式(17)の右辺の数字は、28ビット長M系列巡回符号発生器32のビット番号であり、所望のビットを抽出することにより一様乱数を生成している。またビットの抽出は、乱数としての特性を良くするために連続したビット位置にならないよう不連続なビット位置から抽出する。式(18)で表されるu1 [11:0]についても同様である。ここで、u0 [11:0]とu1 [11:0]はお互いの相関を無くすために28ビット長M系列巡回符号発生器から抽出するビット位置が重ならないようにしている。 The number on the right side of Equation (17) is the bit number of the 28-bit long M-sequence cyclic code generator 32, and a uniform random number is generated by extracting desired bits. In addition, bits are extracted from discontinuous bit positions so as not to be continuous bit positions in order to improve characteristics as a random number. The same applies to u 1 [11: 0] represented by formula (18). Here, u 0 [11: 0] and u 1 [11: 0] are arranged so that the bit positions extracted from the 28-bit long M-sequence cyclic code generator do not overlap with each other in order to eliminate the correlation.

M系列巡回符号発生器33は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器33は、12ビットの一様乱数u2 [11:0]及びu3 [11:0]を出力する。ここで、一様乱数u2 [11:0]及びu3 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で28ビット長M系列巡回符号発生器33から以下の様にビットを抽出することにより出力される。 The M-sequence cyclic code generator 33 is a 28-bit M-sequence cyclic code generator, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 33 outputs 12-bit uniform random numbers u 2 [11: 0] and u 3 [11: 0]. Here, uniform random numbers u 2 [11: 0] and u 3 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 28-bit M-sequence cyclic code. It is output by extracting the bits from the unit 33 as follows.

u2 [11:0]= [7,11,2,18,1,3,13,23,9,21,10,22] ・・・(19)
u3 [11:0]= [20,8,16,19,0,12,17,4,6,13,15,5] ・・・(20)
u 2 [11: 0] = [7,11,2,18,1,3,13,23,9,21,10,22] (19)
u 3 [11: 0] = [20,8,16,19,0,12,17,4,6,13,15,5] (20)

式(19)及び式(20)の表記は、式(17)等と同様である。但し、28ビット長M系列巡回符号発生器33から抽出するビット位置に関して、u2 [11:0]はu0 [11:0]に対してMSB側に1ビットシフトし、u0 [11:0]でMSBだったビット番号'22'をLSBに割り当てている。同様にu3 [11:0]はu1 [11:0]に対してMSB側に1ビットシフトし、u1 [11:0]でMSBだったビット番号'5'をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions (19) and (20) are the same as those in expression (17) and the like. However, regarding the bit position extracted from the 28-bit length M-sequence cyclic code generator 33, u 2 [11: 0] is shifted by 1 bit to the MSB side with respect to u 0 [11: 0], and u 0 [11: 0] is assigned MSB bit number '22' to LSB. Similarly u 3 [11: 0] is u 1 has allocated: [0 11] bit number '5' was MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 1 . Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

M系列巡回符号発生器34は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器34は、12ビットの一様乱数u4 [11:0]及びu5 [11:0]を出力する。ここで、一様乱数u4[11:0]及びu5[11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で28ビット長M系列巡回符号発生器34から以下の様にビットを抽出することにより出力される。 The M-sequence cyclic code generator 34 is a 28-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 34 outputs 12-bit uniform random numbers u 4 [11: 0] and u 5 [11: 0]. Here, uniform random numbers u 4 [11: 0] and u 5 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 28-bit M-sequence cyclic code. It is output by extracting the bits from the unit 34 as follows.

u4 [11:0]= [11,2,18,1,3,13,23,9,21,10,22,7] ・・・(21)
u5 [11:0]= [8,16,19,0,12,17,4,6,13,15,5,20] ・・・(22)
u 4 [11: 0] = [11,2,18,1,3,13,23,9,21,10,22,7] (21)
u 5 [11: 0] = [8,16,19,0,12,17,4,6,13,15,5,20] (22)

式(21)及び式(22)の表記は、式(17)等と同様である。但し、28ビット長M系列巡回符号発生器34から抽出するビット位置に関して、u4 [11:0]はu2 [11:0]に対してMSB側に1ビットシフトし、u2 [11:0]でMSBだったビット番号'7'をLSBに割り当てている。同様にu5 [11:0]はu3 [11:0]に対してMSB側に1ビットシフトし、u3 [11:0]でMSBだったビット番号'20'をLSBに割り当てている。 The expressions (21) and (22) are the same as those in expression (17) and the like. However, regarding the bit position extracted from the 28-bit length M-sequence cyclic code generator 34, u 4 [11: 0] is shifted by 1 bit to the MSB side with respect to u 2 [11: 0], and u 2 [11: 0] is assigned MSB bit number '7' to LSB. Similarly u 5 [11: 0] is u 3 are assigned: [0 11] bit numbers '20' was the MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 3 .

M系列巡回符号発生器35は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器35は、12ビットの一様乱数u6 [11:0]及びu7 [11:0]を出力する。ここで、一様乱数u6 [11:0]及びu7[11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で28ビット長M系列巡回符号発生器35から以下の様にビットを抽出することにより出力される。 The M-sequence cyclic code generator 35 is a 28-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 35 outputs 12-bit uniform random numbers u 6 [11: 0] and u 7 [11: 0]. Here, uniform random numbers u 6 [11: 0] and u 7 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 28-bit long M-sequence cyclic code. It is output by extracting bits from the device 35 as follows.

u6 [11:0]= [2,18,1,3,14,23,9,21,10,22,7,11] ・・・(23)
u7 [11:0]= [16,19,0,12,17,4,6,13,15,5,20,8] ・・・(24)
u 6 [11: 0] = [2,18,1,3,14,23,9,21,10,22,7,11] (23)
u 7 [11: 0] = [16,19,0,12,17,4,6,13,15,5,20,8] (24)

式(23)及び式(24)の表記は、式(17)等と同様である。但し、28ビット長M系列巡回符号発生器35から抽出するビット位置に関して、u6 [11:0]はu4[11:0]に対してMSB側に1ビットシフトし、u4[11:0]でMSBだったビット番号'11'をLSBに割り当てている。同様にu7 [11:0]はu5 [11:0]に対してMSB側に1ビットシフトし、u5 [11:0]でMSBだったビット番号'8'をLSBに割り当てている。 The expressions (23) and (24) are the same as those in expression (17) and the like. However, regarding the bit position extracted from the 28-bit length M-sequence cyclic code generator 35, u 6 [11: 0] is shifted by 1 bit to the MSB side with respect to u 4 [11: 0], and u 4 [11: 0] is assigned MSB bit number '11' to LSB. Similarly u 7 [11: 0] are u 5 are assigned the:: [0 11] bit number '8' was MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 5 .

M系列巡回符号発生器36は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器36は、12ビットの一様乱数u8 [11:0]及びu9 [11:0]を出力する。ここで、一様乱数u8 [11:0]及びu9[11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で28ビット長M系列巡回符号発生器36から以下の様にビットを抽出することにより出力される。 The M-sequence cyclic code generator 36 is an M-sequence cyclic code generator having a 28-bit length, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 36 outputs 12-bit uniform random numbers u 8 [11: 0] and u 9 [11: 0]. Here, uniform random numbers u 8 [11: 0] and u 9 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 28-bit M-sequence cyclic code. It is output by extracting the bits from the unit 36 as follows.

u8 [11:0]= [18,1,3,13,23,9,21,10,22,7,11,2] ・・・(25)
u9 [11:0]= [19,0,12,17,4,6,13,15,5,20,8,16] ・・・(26)
u 8 [11: 0] = [18,1,3,13,23,9,21,10,22,7,11,2] (25)
u 9 [11: 0] = [19,0,12,17,4,6,13,15,5,20,8,16] (26)

式(25)及び式(26)の表記は、式(17)等と同様である。但し、28ビット長M系列巡回符号発生器36から抽出するビット位置に関して、u8 [11:0]はu6 [11:0]に対してMSB側に1ビットシフトし、u6 [11:0]でMSBだったビット番号'2'をLSBに割り当てている。同様にu9 [11:0]はu7 [11:0]に対してMSB側に1ビットシフトし、u7 [11:0]でMSBだったビット番号'16'をLSBに割り当てている。 The expressions (25) and (26) are the same as those in expression (17) and the like. However, regarding the bit position extracted from the 28-bit length M-sequence cyclic code generator 36, u 8 [11: 0] is shifted by 1 bit to the MSB side with respect to u 6 [11: 0], and u 6 [11: 0] is assigned MSB bit number '2' to LSB. Similarly u 9 [11: 0] is u 7 are assigned: [0 11] bit numbers '16' was the MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 7 .

M系列巡回符号発生器37は28ビット長のM系列巡回符号発生器であり、シードレジスタ31に格納されたシード値を初期値として動作する。28ビット長M系列巡回符号発生器37は、12ビットの一様乱数u10 [11:0]及びu11 [11:0]を出力する。ここで、一様乱数u10 [11:0]及びu11[11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で28ビット長M系列巡回符号発生器37から以下の様にビットを抽出することにより出力される。 The M-sequence cyclic code generator 37 is a 28-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 31 as an initial value. The 28-bit long M-sequence cyclic code generator 37 outputs 12-bit uniform random numbers u 10 [11: 0] and u 11 [11: 0]. Here, uniform random numbers u 10 [11: 0] and u 11 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 28-bit long M-sequence cyclic code. It is output by extracting bits from the device 37 as follows.

u10 [11:0]= [1,3,14,23,9,21,10,22,7,11,2,18] ・・・(27)
u11 [11:0]= [0,12,17,4,6,13,15,5,20,8,16,19] ・・・(28)
u 10 [11: 0] = [1,3,14,23,9,21,10,22,7,11,2,18] (27)
u 11 [11: 0] = [0,12,17,4,6,13,15,5,20,8,16,19] (28)

式(27)及び式(28)の表記は、式(17)等と同様である。但し、28ビット長M系列巡回符号発生器37から抽出するビット位置に関して、u10 [11:0]はu8 [11:0]に対してMSB側に1ビットシフトし、u8 [11:0]でMSBだったビット番号'18'をLSBに割り当てている。同様にu11 [11:0]はu9 [11:0]に対してMSB側に1ビットシフトし、u9 [11:0]でMSBだったビット番号'19'をLSBに割り当てている。 The expressions (27) and (28) are the same as those in expression (17) and the like. However, regarding the bit position extracted from the 28-bit length M-sequence cyclic code generator 37, u 10 [11: 0] is shifted by 1 bit to the MSB side with respect to u 8 [11: 0], and u 8 [11: 0] is assigned MSB bit number '18' to LSB. Similarly u 11 [11: 0] are u 9 are assigned: [0 11] bit numbers '19' was the MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 9 .

本実施形態によれば、上記一様乱数生成手段を用いることで、上記シード値を一つだけ用いたとしても、良質な正規分布特性を持つ乱数を生成することができる。また、シード値を格納するためのレジスタを軽減できるので、ハードウェア規模を縮小させることができる。   According to the present embodiment, by using the uniform random number generating means, it is possible to generate random numbers having good normal distribution characteristics even if only one seed value is used. In addition, since the registers for storing the seed value can be reduced, the hardware scale can be reduced.

(第4の実施形態)
次に、図12を用いて、本発明の第4の実施形態での一様乱数発生部13の詳細を説明する。401は17bitのシード値を格納するシードレジスタ、402は11bitのシード値を格納するシードレジスタ、403はM系列巡回符号を発生させる17ビット長のM系列巡回符号発生器、404はM系列巡回符号を発生させる11ビット長のM系列巡回符号発生器、405は403と原始多項式の異なる17ビット長のM系列巡回符号発生器、406は404と原始多項式の異なる11ビット長のM系列巡回符号発生器、407は403,405と原始多項式の異なる17ビット長のM系列巡回符号発生器、408は404,406と原始多項式の異なる11ビット長のM系列巡回符号発生器、409は403,405,407と原始多項式の異なる17ビット長のM系列巡回符号発生器である。410は404,406,408と原始多項式の異なる11ビット長のM系列巡回符号発生器、411は403,405,407,409と原始多項式の異なる17ビット長のM系列巡回符号発生器、412は404,406,408,410と原始多項式の異なる11ビット長のM系列巡回符号発生器、413は403,405,407,409,411と原始多項式の異なる17ビット長のM系列巡回符号発生器、414は404,406,408,410,412と原始多項式の異なる11ビット長のM系列巡回符号発生器である。
(Fourth embodiment)
Next, details of the uniform random number generation unit 13 in the fourth embodiment of the present invention will be described with reference to FIG. 401 is a seed register that stores a 17-bit seed value, 402 is a seed register that stores an 11-bit seed value, 403 is a 17-bit M-sequence cyclic code generator that generates an M-sequence cyclic code, and 404 is an M-sequence cyclic code 11-bit length M-sequence cyclic code generator, 405 is a 17-bit length M-sequence cyclic code generator with a primitive polynomial different from 403, 406 is an 11-bit length M-sequence cyclic code generator with a different primitive polynomial 407 is an M-sequence cyclic code generator of 403,405 with a different primitive polynomial and 17-bit length, 408 is 404,406 and an 11-bit length of an M-sequence cyclic code generator with a different primitive polynomial, 409 is 403,405,407 and 17 bits with a different primitive polynomial It is a long M-sequence cyclic code generator. 410 is an M-sequence cyclic code generator with a different primitive polynomial of 404,406,408 and 11-bit length, 411 is an M-sequence cyclic code generator of 403,405,407,409 and a different primitive polynomial of 17-bit length, 412 is an 11-bit length different from 404,406,408,410 and a primitive polynomial An M-sequence cyclic code generator 413 is a 17-bit length M-sequence cyclic code generator having different primitive polynomials such as 403, 405, 407, 409, 411, and 414 is an 11-bit length M-sequence cyclic code generator having 404, 406, 408, 410, 412 and different primitive polynomials.

第3の実施形態ではM系列巡回符号発生器31で28ビット長のM系列巡回符号を一つだけ使用していたが、第4の実施形態では上記M系列巡回符号発生器31で、17bit長のM系列巡回符号発生器、11bit長のM系列巡回符号発生器を各々6個備える。上記17bit長のM系列巡回符号発生器及び上記11bit長のM系列巡回符号発生器は各々異なった原始多項式を持つ。例えば、6個の上記17bit長M系列巡回符号発生器各々をM1a,M1b・・・M1fとすると、M1a,M1b・・・M1f は式(29)に表される原始多項式を備える。また、6個の上記11bit長M系列巡回符号発生器各々をM2a,M2b・・・M2fとすると、M2a,M2b・・・M2f は式(30)に表される原始多項式を備える。上記17bit長のM系列巡回符号発生器及び上記11bit長のM系列巡回符号発生器は、異なる周期を有するM系列巡回符号を生成する。   In the third embodiment, only one 28-bit M-sequence cyclic code is used in the M-sequence cyclic code generator 31, but in the fourth embodiment, the M-sequence cyclic code generator 31 uses a 17-bit length. 6 M-sequence cyclic code generators and 6 11-bit M-sequence cyclic code generators. The 17-bit M-sequence cyclic code generator and the 11-bit M-sequence cyclic code generator have different primitive polynomials. For example, assuming that each of the six 17-bit long M-sequence cyclic code generators is M1a, M1b... M1f, M1a, M1b... M1f includes a primitive polynomial expressed by Equation (29). Further, assuming that each of the six 11-bit long M-sequence cyclic code generators is M2a, M2b... M2f, M2a, M2b... M2f includes a primitive polynomial expressed by Equation (30). The 17-bit M-sequence cyclic code generator and the 11-bit M-sequence cyclic code generator generate M-sequence cyclic codes having different periods.

17ビット M系列巡回多項式用原始多項式
M1a: h(X)=X17+X
M1b: h(X)=X17+X5+X3+X2
M1c: h(X)=X17+X6+X4+X2
M1d: h(X)=X17+X7+X5+X
M1e: h(X)=X17+X8+X3+X
M1f: h(X)=X17+X9+X5+X4 ・・・(29)
Primitive polynomial for 17-bit M-sequence cyclic polynomial
M1a: h (X) = X 17 + X
M1b: h (X) = X 17 + X 5 + X 3 + X 2
M1c: h (X) = X 17 + X 6 + X 4 + X 2
M1d: h (X) = X 17 + X 7 + X 5 + X
M1e: h (X) = X 17 + X 8 + X 3 + X
M1f: h (X) = X 17 + X 9 + X 5 + X 4 (29)

11ビットM系列巡回多項式用原始多項式
M2a: h(X)=X11+X2
M2b: h(X)=X11+X4+X2+X
M2c: h(X)=X11+X5+X3+X
M2d: h(X)=X11+X6+X2+X
M2e: h(X)=X11+X7+X5+X3
M2f: h(X)=X11+X8+X3+X2 ・・・(30)
Primitive polynomial for 11-bit M-sequence cyclic polynomial
M2a: h (X) = X 11 + X 2
M2b: h (X) = X 11 + X 4 + X 2 + X
M2c: h (X) = X 11 + X 5 + X 3 + X
M2d: h (X) = X 11 + X 6 + X 2 + X
M2e: h (X) = X 11 + X 7 + X 5 + X 3
M2f: h (X) = X 11 + X 8 + X 3 + X 2 (30)

ここで、M1a,M1b,M1c,M1d,M1e,M1fは17bit長M系列巡回符号発生器、M2a,M2b,M2c,M2d,M2e,M2fは17bit長M系列巡回符号発生器、h(X)は原始多項式である。また、シード値を格納するシードレジスタ401、シードレジスタ402はレジスタ部11内から抜粋して明示している。   Here, M1a, M1b, M1c, M1d, M1e, M1f are 17-bit long M-sequence cyclic code generators, M2a, M2b, M2c, M2d, M2e, M2f are 17-bit long M-sequence cyclic code generators, and h (X) is It is a primitive polynomial. Further, the seed register 401 and the seed register 402 for storing the seed value are extracted from the register unit 11 and clearly shown.

M系列巡回符号発生器403は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器404は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器403及び11ビット長M系列巡回符号発生器404は、12ビットの一様乱数u0 [11:0]及びu1 [11:0]を出力する。ここで、一様乱数u0 [11:0]及びu1 [11:0]は17ビット長M系列巡回符号発生器403及び11ビット長M系列巡回符号発生器404から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 403 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 404 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 403 and the 11-bit long M-sequence cyclic code generator 404 output 12-bit uniform random numbers u 0 [11: 0] and u 1 [11: 0]. Here, the uniform random numbers u 0 [11: 0] and u 1 [11: 0] are transmitted from the 17-bit length M-sequence cyclic code generator 403 and the 11-bit length M-sequence cyclic code generator 404 as follows. Output by extracting.

u0 [11:0]=[ 11,7',0,2',7,1',3',3,12,9',10,10'] ・・・(31)
u1 [11:0]=[ 5',9,8',5,8,0',1,6,4',6',2,4] ・・・(32)
u 0 [11: 0] = [11,7 ', 0,2', 7,1 ', 3', 3,12,9 ', 10,10'] (31)
u 1 [11: 0] = [5 ', 9,8', 5,8,0 ', 1,6,4', 6 ', 2,4] (32)

式(31)の右辺の数字は、「'」がない数字が17ビット長M系列巡回符号発生器403のビット番号であり、「'」がある数字が11ビット長M系列巡回符号発生器404のビット番号であり、所望のビットを抽出することにより一様乱数を生成している。またビットの抽出は、乱数としての特性を良くするために連続したビット位置にならないよう不連続なビット位置から抽出する。式(32)で表されるu1 [11:0]についても同様である。ここで、u0 [11:0]とu1 [11:0]はお互いの相関を無くすために28ビット長M系列巡回符号発生器から抽出するビット位置が重ならないようにしている。 As for the number on the right side of Expression (31), the number without “′” is the bit number of the 17-bit length M-sequence cyclic code generator 403, and the number with “′” is the 11-bit length M-sequence cyclic code generator 404. A uniform random number is generated by extracting a desired bit. In addition, bits are extracted from discontinuous bit positions so as not to be continuous bit positions in order to improve characteristics as a random number. The same applies to u 1 [11: 0] represented by formula (32). Here, u 0 [11: 0] and u 1 [11: 0] are arranged so that the bit positions extracted from the 28-bit long M-sequence cyclic code generator do not overlap with each other in order to eliminate the correlation.

M系列巡回符号発生器405は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器406は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器405及び11ビット長M系列巡回符号発生器406は、12ビットの一様乱数u2 [11:0]及びu3 [11:0]を出力する。ここで、一様乱数u2 [11:0]及びu3 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で17ビット長M系列巡回符号発生器405及び11ビット長M系列巡回符号発生器406から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 405 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 406 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 405 and the 11-bit long M-sequence cyclic code generator 406 output 12-bit uniform random numbers u 2 [11: 0] and u 3 [11: 0]. Here, uniform random numbers u 2 [11: 0] and u 3 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 17-bit long M-sequence cyclic code. The bit is extracted from the generator 405 and the 11-bit long M-sequence cyclic code generator 406 as follows.

u2 [11:0]= [7',0,2',7,1',3',3,12,9',10,10',11] ・・・(33)
u3 [11:0]= [9,8',5,8,0',1,6,4',6',2,4,5'] ・・・(34)
u 2 [11: 0] = [7 ', 0,2', 7,1 ', 3', 3,12,9 ', 10,10', 11] (33)
u 3 [11: 0] = [9,8 ', 5,8,0', 1,6,4 ', 6', 2,4,5 '] (34)

式(33)及び式(34)の表記は、式(31)等と同様である。但し、17ビット長M系列巡回符号発生器405及び11ビット長M系列巡回符号発生器406から抽出するビット位置に関して、u2 [11:0]はu0 [11:0]に対してMSB側に1ビットシフトし、u0 [11:0]でMSBだったビット番号「11」をLSBに割り当てている。同様にu3 [11:0]はu1 [11:0]に対してMSB側に1ビットシフトし、u1 [11:0]でMSBだったビット番号「5'」をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions of Expression (33) and Expression (34) are the same as Expression (31) and the like. However, regarding the bit positions extracted from the 17-bit length M-sequence cyclic code generator 405 and the 11-bit length M-sequence cyclic code generator 406, u 2 [11: 0] is MSB side with respect to u 0 [11: 0]. The bit number “11” that was MSB in u 0 [11: 0] is assigned to the LSB. Similarly u 3 [11: 0] is u 1 [11: 0] by one bit shifted to the MSB side of the, u 1 [11: 0] bit number "5 '" was MSB by assigning the LSB Yes. Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

M系列巡回符号発生器407は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器408は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器407及び11ビット長M系列巡回符号発生器408は、12ビットの一様乱数u4 [11:0]及びu5 [11:0]を出力する。ここで、一様乱数u4 [11:0]及びu5 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で17ビット長M系列巡回符号発生器407及び11ビット長M系列巡回符号発生器408から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 407 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 408 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 407 and the 11-bit long M-sequence cyclic code generator 408 output 12-bit uniform random numbers u 4 [11: 0] and u 5 [11: 0]. Here, uniform random numbers u 4 [11: 0] and u 5 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 17-bit M-sequence cyclic code. 407 and the 11-bit long M-sequence cyclic code generator 408 output the bits as follows.

u4[11:0]= [0,2',7,1',3',3,12,9',10,10',11,7'] ・・・(35)
u5[11:0]= [8',5,8,0',1,6,4',6',2,4,5',9] ・・・(36)
u 4 [11: 0] = [0,2 ', 7,1', 3 ', 3,12,9', 10,10 ', 11,7'] (35)
u 5 [11: 0] = [8 ', 5,8,0', 1,6,4 ', 6', 2,4,5 ', 9] (36)

式(35)及び式(36)の表記は、式(31)等と同様である。但し、17ビット長M系列巡回符号発生器407及び11ビット長M系列巡回符号発生器408から抽出するビット位置に関して、u4[11:0]はu2 [11:0]に対してMSB側に1ビットシフトし、u2 [11:0]でMSBだったビット番号「7'」をLSBに割り当てている。同様にu5 [11:0]はu3 [11:0]に対してMSB側に1ビットシフトし、u3 [11:0]でMSBだったビット番号「9」をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions (35) and (36) are the same as those in expression (31) and the like. However, regarding the bit positions extracted from the 17-bit length M-sequence cyclic code generator 407 and the 11-bit length M-sequence cyclic code generator 408, u 4 [11: 0] is MSB side with respect to u 2 [11: 0]. The bit number “7 ′” that was the MSB in u 2 [11: 0] is assigned to the LSB. Similarly u 5 [11: 0] is u 3 are assigned: [0 11] the bit number "9" was MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 3 . Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

M系列巡回符号発生器409は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器410は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器409及び11ビット長M系列巡回符号発生器410は、12ビットの一様乱数u6 [11:0]及びu7 [11:0]を出力する。ここで、一様乱数u6 [11:0]及びu7 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で17ビット長M系列巡回符号発生器409及び11ビット長M系列巡回符号発生器410から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 409 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 410 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 409 and the 11-bit long M-sequence cyclic code generator 410 output 12-bit uniform random numbers u 6 [11: 0] and u 7 [11: 0]. Here, uniform random numbers u 6 [11: 0] and u 7 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating 17-bit long M-sequence cyclic codes. 409 and 11-bit length M-sequence cyclic code generator 410 to output the bits as follows.

u6 [11:0]= [7,1',3',3,12,9',10,10',11,7',0,2'] ・・・(37)
u7 [11:0]= [5,8,0',1,6,4',6',2,4,5',9,8'] ・・・(38)
u 6 [11: 0] = [7,1 ', 3', 3,12,9 ', 10,10', 11,7 ', 0,2'] (37)
u 7 [11: 0] = [5,8,0 ', 1,6,4', 6 ', 2,4,5', 9,8 '] (38)

式(37)及び式(38)の表記は、式(31)等と同様である。但し、17ビット長M系列巡回符号発生器409及び11ビット長M系列巡回符号発生器410から抽出するビット位置に関して、u6 [11:0]はu4 [11:0]に対してMSB側に1ビットシフトし、u4 [11:0]でMSBだったビット番号「2'」をLSBに割り当てている。同様にu7 [11:0]はu5 [11:0]に対してMSB側に1ビットシフトし、u5 [11:0]でMSBだったビット番号「8'」をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions of Expression (37) and Expression (38) are the same as Expression (31) and the like. However, regarding the bit positions extracted from the 17-bit length M-sequence cyclic code generator 409 and the 11-bit length M-sequence cyclic code generator 410, u 6 [11: 0] is MSB side with respect to u 4 [11: 0]. The bit number “2 ′” that was the MSB in u 4 [11: 0] is assigned to the LSB. Similarly u 7 [11: 0] are u 5 [11: 0] by one bit shifted to the MSB side with respect to, u 5 [11: 0] bit number "8 '" was MSB by assigning the LSB Yes. Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

M系列巡回符号発生器411は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器412は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器411及び11ビット長M系列巡回符号発生器412は、12ビットの一様乱数u8 [11:0]及びu9 [11:0]を出力する。ここで、一様乱数u8 [11:0]及びu9 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で17ビット長M系列巡回符号発生器411及び11ビット長M系列巡回符号発生器412から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 411 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 412 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 411 and the 11-bit long M-sequence cyclic code generator 412 output 12-bit uniform random numbers u 8 [11: 0] and u 9 [11: 0]. Here, uniform random numbers u 8 [11: 0] and u 9 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 17-bit M-sequence cyclic code. The bit is extracted from the 411 and the 11-bit long M-sequence cyclic code generator 412 as follows.

u8 [11:0]= [1',3',3,12,9',10,10',11,7',0,2',7] ・・・(39)
u9 [11:0]= [8,0',1,6,4',6',2,4,5',9,8',5] ・・・(40)
u 8 [11: 0] = [1 ', 3', 3,12,9 ', 10,10', 11,7 ', 0,2', 7] (39)
u 9 [11: 0] = [8,0 ', 1,6,4', 6 ', 2,4,5', 9,8 ', 5] (40)

式(39)及び式(40)の表記は、式(31)等と同様である。但し、17ビット長M系列巡回符号発生器411及び11ビット長M系列巡回符号発生器412から抽出するビット位置に関して、u8 [11:0]はu6 [11:0]に対してMSB側に1ビットシフトし、u6 [11:0]でMSBだったビット番号「7」をLSBに割り当てている。同様にu9 [11:0]はu7 [11:0]に対してMSB側に1ビットシフトし、u7 [11:0]でMSBだったビット番号「5」をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions (39) and (40) are the same as expressions (31) and the like. However, regarding the bit positions extracted from the 17-bit long M-sequence cyclic code generator 411 and the 11-bit long M-sequence cyclic code generator 412, u 8 [11: 0] is MSB side with respect to u 6 [11: 0]. The bit number “7” that was MSB in u 6 [11: 0] is assigned to the LSB. Similarly u 9 [11: 0] is u 7 are assigned: [0 11] the bit number "5" was a MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 7 . Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

M系列巡回符号発生器413は17ビット長のM系列巡回符号発生器であり、シードレジスタ401に格納されたシード値を初期値として動作する。また、M系列巡回符号発生器414は11ビット長のM系列巡回符号発生器であり、シードレジスタ402に格納されたシード値を初期値として動作する。17ビット長M系列巡回符号発生器413及び11ビット長M系列巡回符号発生器414は、12ビットの一様乱数u10 [11:0]及びu11 [11:0]を出力する。ここで、一様乱数u10 [11:0]及びu11 [11:0]はu0 [11:0]及びu1 [11:0]と同様な方法で17ビット長M系列巡回符号発生器413及び11ビット長M系列巡回符号発生器414から以下のようにビットを抽出することにより出力される。 The M-sequence cyclic code generator 413 is a 17-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 401 as an initial value. The M-sequence cyclic code generator 414 is an 11-bit long M-sequence cyclic code generator, and operates using the seed value stored in the seed register 402 as an initial value. The 17-bit long M-sequence cyclic code generator 413 and the 11-bit long M-sequence cyclic code generator 414 output 12-bit uniform random numbers u 10 [11: 0] and u 11 [11: 0]. Here, uniform random numbers u 10 [11: 0] and u 11 [11: 0] are generated in the same manner as u 0 [11: 0] and u 1 [11: 0] by generating a 17-bit M-sequence cyclic code. 413 and 11 bit length M-sequence cyclic code generator 414 extract the bits as follows.

u10 [11:0]= [3',3,12,9',10,10',11,7',0,2',7,1'] ・・・(41)
u11 [11:0]= [0',1,6,4',6',2,4,5',9,8',5,8] ・・・(42)
u 10 [11: 0] = [3 ', 3,12,9', 10,10 ', 11,7', 0,2 ', 7,1'] (41)
u 11 [11: 0] = [0 ', 1,6,4', 6 ', 2,4,5', 9,8 ', 5,8] (42)

式(41)及び式(42)の表記は、式(31)等と同様である。但し、17ビット長M系列巡回符号発生器413及び11ビット長M系列巡回符号発生器414から抽出するビット位置に関して、u10 [11:0]はu8 [11:0]に対してMSB側に1ビットシフトし、u8 [11:0]でMSBだったビット番号「1'」をLSBに割り当てている。同様にu11 [11:0]はu9 [11:0]に対してMSB側に1ビットシフトし、u9 [11:0]でMSBだったビット番号「8」をLSBに割り当てている。このように一様乱数間でM系列巡回符号発生器からの抽出位置を変更することにより、抽出位置の依存性による、一様乱数間の相関を少なくしている。 The expressions (41) and (42) are the same as expressions (31) and the like. However, regarding the bit positions extracted from the 17-bit length M-sequence cyclic code generator 413 and the 11-bit length M-sequence cyclic code generator 414, u 10 [11: 0] is MSB side with respect to u 8 [11: 0]. The bit number “1 ′” that was the MSB in u 8 [11: 0] is assigned to the LSB. Similarly u 11 [11: 0] are u 9 are assigned: [0 11] bit number "8" were MSB in the LSB [11 0] shifted one bit to the MSB side with respect to, u 9 . Thus, by changing the extraction position from the M-sequence cyclic code generator between the uniform random numbers, the correlation between the uniform random numbers due to the dependency of the extraction position is reduced.

図12で説明した複数のM系列巡回符号から1個の一様乱数を生成する場合、生成した一様乱数間の相互相関だけでなく、M系列巡回符号間の相互相関が強く出ないようにシード値を決定する必要があるが、良いシード値を与えることで、28ビット長のM系列巡回符号を一つだけ用いる場合よりも11ビット長のM系列巡回符号と17ビット長のM系列巡回符号各々1個用いる場合の方が、良質な正規分布特性を持つ乱数を生成することができる。   When generating one uniform random number from a plurality of M-sequence cyclic codes described in FIG. 12, not only the cross-correlation between the generated uniform random numbers but also the cross-correlation between M-sequence cyclic codes does not appear strongly. It is necessary to determine the seed value, but by giving a good seed value, the 11-bit M-sequence cyclic code and the 17-bit M-sequence cyclic are used, compared to the case where only one 28-bit M-sequence cyclic code is used. When one code is used, random numbers having good normal distribution characteristics can be generated.

なお、上記実施形態は本発明の一例を示したものであり、本発明はこれに限定されるべきものではないことは言うまでもないことである。   In addition, the said embodiment showed an example of this invention, and it cannot be overemphasized that this invention should not be limited to this.

例えば、式(16)又は式(29)及び式(30)で表した組み合わせの原始多項式をもつM系列巡回符号発生器を使用したが、一様乱数間の相関が出ないような原始多項式であれば、特に限定はない。   For example, an M-sequence cyclic code generator having a primitive polynomial with a combination represented by Equation (16) or Equation (29) and Equation (30) is used. If there is, there is no particular limitation.

また、一様乱数を生成するために28ビット長M系列巡回符号発生器の上記で示したビット位置からビットを抽出したが、乱数としての特性を良くするために連続したビット位置にならないよう不連続なビット位置から抽出していれば、特に限定はない。   In addition, in order to generate uniform random numbers, bits were extracted from the above-mentioned bit positions of the 28-bit long M-sequence cyclic code generator. However, in order to improve the characteristics as random numbers, it is necessary to avoid consecutive bit positions. There is no particular limitation as long as it is extracted from consecutive bit positions.

また、第4の実施形態で11ビット長と17ビット長のM系巡回符号器を使用したが、この組み合わせの合計ビット長が28ビット以上であれば、特に限定はない。   In the fourth embodiment, 11-bit and 17-bit M-type cyclic encoders are used. However, there is no particular limitation as long as the total bit length of this combination is 28 bits or more.

以上説明したように、第3及び第4の実施形態によれば、中心極限定理を用いて正規乱数を生成する場合に、少ないハードウェア規模で良好な正規分布特性をもつ正規乱数発生装置を提供することができる。また、すべてのM系列巡回多項式のシード値を設定する必要がないので、良質な正規分布特性をもつ乱数を生成するシード値を決定しやすい。   As described above, according to the third and fourth embodiments, when generating a normal random number using the central limit theorem, a normal random number generator having a good normal distribution characteristic with a small hardware scale is provided. can do. In addition, since it is not necessary to set seed values for all M-sequence cyclic polynomials, it is easy to determine a seed value for generating random numbers having good normal distribution characteristics.

なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

本発明の第1の実施形態の正規乱数生成手法を説明する図である。It is a figure explaining the normal random number generation method of the 1st Embodiment of this invention. 第1の実施形態の識別ビットのビット設定について説明する図である。It is a figure explaining the bit setting of the identification bit of 1st Embodiment. 第1の実施形態のビット操作部について説明する図である。It is a figure explaining the bit operation part of 1st Embodiment. 本発明の第2の実施形態の正規乱数生成手法を説明する図である。It is a figure explaining the normal random number generation method of the 2nd Embodiment of this invention. 本実施形態の正規乱数生成装置により出力した正規乱数の近傍の相関を示したグラフである。It is the graph which showed the correlation of the vicinity of the normal random number output by the normal random number generator of this embodiment. 本実施形態の正規乱数生成装置により出力した正規乱数の28ビットM系列の周期周辺の相関を示したグラフである。It is the graph which showed the correlation around the period of the 28-bit M series of the normal random number output by the normal random number generation apparatus of this embodiment. 本実施形態の正規乱数生成装置により出力した正規乱数の度数密度グラフである。It is a frequency density graph of the normal random number output by the normal random number generation device of this embodiment. 従来技術を用いた正規乱数生成手法を説明する図である。It is a figure explaining the normal random number generation method using a prior art. 本発明の第3の実施形態を説明する図である。It is a figure explaining the 3rd Embodiment of this invention. 本実施形態のスケーリングを説明する図である。It is a figure explaining the scaling of this embodiment. 本実施形態の28bitM系列巡回符号発生器を用いた一様乱数生成部の構成を説明する図である。It is a figure explaining the structure of the uniform random number generation part using the 28bitM series cyclic code generator of this embodiment. 本発明の第4の実施形態の17bitM系列巡回符号発生器及び11bitM系列巡回符号発生器を用いた一様乱数生成部の構成を説明する図である。It is a figure explaining the structure of the uniform random number generation part using the 17bitM sequence cyclic code generator and 11bitM sequence cyclic code generator of the 4th Embodiment of this invention.

符号の説明Explanation of symbols

100 シードレジスタ、
101 M系列巡回符号生成器、
102 一様乱数生成部、
103 正規乱数生成部、
104〜115 ビット操作部、
116〜127 識別ビット、
300 ビット抽出回路、
301 排他的論理和演算回路、
302 ビット反転回路、
500 一様乱数生成部、
501〜506 識別ビット、
507 正規乱数生成部、
508 カウンタ、
1000〜1011 シードレジスタ、
1012〜1023 M系列巡回符号生成器、
1024 一様乱数生成部、
1025 正規乱数生成部、
1026〜1037 ビット操作部



100 seed register,
101 M-sequence cyclic code generator,
102 uniform random number generator,
103 normal random number generator,
104-115 bit operation section,
116-127 identification bits,
300-bit extraction circuit,
301 exclusive OR circuit,
302 bit inversion circuit,
500 uniform random number generator,
501 to 506 identification bits,
507 normal random number generator,
508 counter,
1000-1011 seed register,
1012-1023 M-sequence cyclic code generator,
1024 uniform random number generator,
1025 normal random number generator,
1026 to 1037 Bit operation unit



Claims (12)

所定の周期を有するM系列巡回符号を生成するM系列巡回符号生成手段と、
前記M系列巡回符号を基にそれぞれが一様分布特性を有する複数の一様乱数を生成する一様乱数生成手段と、
前記複数の一様乱数を用いて正規分布特性を有する正規乱数を生成する正規乱数生成手段と
を有することを特徴とする乱数生成装置。
M-sequence cyclic code generation means for generating an M-sequence cyclic code having a predetermined period;
Uniform random number generating means for generating a plurality of uniform random numbers each having uniform distribution characteristics based on the M-sequence cyclic code;
A random number generation device comprising normal random number generation means for generating normal random numbers having normal distribution characteristics using the plurality of uniform random numbers.
前記一様乱数生成手段は、それぞれが異なる識別ビットを基に前記M系列巡回符号をビット操作する複数のビット操作手段を有することを特徴とする請求項1記載の乱数生成装置。   2. The random number generation device according to claim 1, wherein the uniform random number generation means includes a plurality of bit operation means for performing bit operations on the M-sequence cyclic code based on different identification bits. 前記ビット操作手段は、前記M系列巡回符号からビットを抽出するビット抽出手段と、前記抽出したビット及び前記識別ビットの排他的論理和を求める論理演算手段と、前記抽出したビット又は前記排他的論理和のビットを反転させるビット反転手段とを有することを特徴とする請求項2記載の乱数生成装置。   The bit manipulation means includes bit extraction means for extracting bits from the M-sequence cyclic code, logic operation means for obtaining an exclusive OR of the extracted bits and the identification bits, and the extracted bits or the exclusive logic 3. The random number generation device according to claim 2, further comprising bit inversion means for inverting the sum bit. 上記ビット操作手段は、ハッシュ演算を行うことを特徴とする請求項2記載の乱数生成装置。   The random number generation device according to claim 2, wherein the bit operation means performs a hash operation. 前記一様乱数生成手段は複数サイクルで複数組みの一様乱数を生成し、前記正規乱数生成手段は前記複数組みの一様乱数を用いて正規乱数を生成することを特徴とする請求項1〜4のいずれか1項に記載の乱数生成装置。   The uniform random number generation means generates a plurality of sets of uniform random numbers in a plurality of cycles, and the normal random number generation means generates a normal random number using the plurality of sets of uniform random numbers. The random number generation device according to any one of 4. M系列巡回符号を生成してそのM系列巡回符号を基に一様分布特性を有する複数の一様乱数を生成する一様乱数生成手段と、
前記複数の一様乱数を加算して正規分布特性を有する正規乱数を生成する正規乱数生成手段と
を有することを特徴とする乱数生成装置。
Uniform random number generating means for generating an M-sequence cyclic code and generating a plurality of uniform random numbers having uniform distribution characteristics based on the M-sequence cyclic code;
A random number generation device comprising normal random number generation means for adding the plurality of uniform random numbers to generate a normal random number having a normal distribution characteristic.
前記一様乱数生成手段は、共通の初期値を基に所定の周期の異なる原始多項式のM系列巡回符号を生成する複数のM系列巡回符号発生手段を有することを特徴とする請求項6記載の乱数生成装置。   7. The uniform random number generating means includes a plurality of M-sequence cyclic code generating means for generating M-sequence cyclic codes of primitive polynomials having different predetermined periods based on a common initial value. Random number generator. 前記一様乱数生成手段は、前記M系列巡回符号の所定のビットを抽出することにより複数の一様乱数を生成することを特徴とする請求項6又は7記載の乱数生成装置。   The random number generation device according to claim 6 or 7, wherein the uniform random number generation unit generates a plurality of uniform random numbers by extracting predetermined bits of the M-sequence cyclic code. さらに、前記正規乱数をスケーリングするスケーリング手段を有することを特徴とする請求項6〜8のいずれか1項に記載の乱数生成装置。   The random number generation device according to claim 6, further comprising scaling means for scaling the normal random number. 前記一様乱数生成手段は、異なる周期を有するM系列巡回符号を生成してそのM系列巡回符号を基に複数の一様乱数を生成することを特徴とする請求項6〜9のいずれか1項に記載の乱数生成装置。   10. The uniform random number generation means generates an M-sequence cyclic code having a different period and generates a plurality of uniform random numbers based on the M-sequence cyclic code. The random number generator according to item. 所定の周期を有するM系列巡回符号を生成するM系列巡回符号生成ステップと、
前記M系列巡回符号を基にそれぞれが一様分布特性を有する複数の一様乱数を生成する一様乱数生成ステップと、
前記複数の一様乱数を用いて正規分布特性を有する正規乱数を生成する正規乱数生成ステップと
を有することを特徴とする乱数生成方法。
An M-sequence cyclic code generating step for generating an M-sequence cyclic code having a predetermined period;
A uniform random number generating step for generating a plurality of uniform random numbers each having a uniform distribution characteristic based on the M-sequence cyclic code;
And a normal random number generation step of generating a normal random number having a normal distribution characteristic using the plurality of uniform random numbers.
M系列巡回符号を生成してそのM系列巡回符号を基に一様分布特性を有する複数の一様乱数を生成する一様乱数生成ステップと、
前記複数の一様乱数を加算して正規分布特性を有する正規乱数を生成する正規乱数生成ステップと
を有することを特徴とする乱数生成方法。
A uniform random number generating step for generating an M-sequence cyclic code and generating a plurality of uniform random numbers having uniform distribution characteristics based on the M-sequence cyclic code;
And a normal random number generating step of generating a normal random number having a normal distribution characteristic by adding the plurality of uniform random numbers.
JP2005109111A 2005-04-05 2005-04-05 Device and method for random number generation Pending JP2006293429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005109111A JP2006293429A (en) 2005-04-05 2005-04-05 Device and method for random number generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005109111A JP2006293429A (en) 2005-04-05 2005-04-05 Device and method for random number generation

Publications (1)

Publication Number Publication Date
JP2006293429A true JP2006293429A (en) 2006-10-26

Family

ID=37413978

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005109111A Pending JP2006293429A (en) 2005-04-05 2005-04-05 Device and method for random number generation

Country Status (1)

Country Link
JP (1) JP2006293429A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018045501A (en) * 2016-09-15 2018-03-22 東芝メモリ株式会社 Randomizer and semiconductor storage unit
EP3767456A1 (en) 2019-07-17 2021-01-20 Fujitsu Limited Random number generation device and random number generation method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018045501A (en) * 2016-09-15 2018-03-22 東芝メモリ株式会社 Randomizer and semiconductor storage unit
EP3767456A1 (en) 2019-07-17 2021-01-20 Fujitsu Limited Random number generation device and random number generation method
JP2021018455A (en) * 2019-07-17 2021-02-15 富士通株式会社 Random number generator and random number generation method
US11231908B2 (en) 2019-07-17 2022-01-25 Fujitsu Limited Random number generation device and random number generation method
JP7295413B2 (en) 2019-07-17 2023-06-21 富士通株式会社 RANDOM NUMBER GENERATOR AND RANDOM NUMBER GENERATION METHOD

Similar Documents

Publication Publication Date Title
US8180055B2 (en) Cryptographic system incorporating a digitally generated chaotic numerical sequence
JP4954941B2 (en) Encryption due to non-scale error caused
JP3696209B2 (en) Seed generation circuit, random number generation circuit, semiconductor integrated circuit, IC card and information terminal device
JP5141910B2 (en) Encryption and decryption processing method and system for realizing SMS4 encryption algorithm
US8401180B2 (en) Non-linear data converter, encoder and decoder
US20090262928A1 (en) Method and Apparatus For Seeding a Cryptographic Random Number Generator
US10171229B2 (en) Pseudo-random bit generator based on multim-modal maps
JP4622222B2 (en) Cryptographic processing apparatus, cryptographic processing method, and computer program
JP2011528444A (en) Closed Galois encryption system
Abd-El-Hafiz et al. Novel permutation measures for image encryption algorithms
JP5670849B2 (en) Pseudorandom number generation device and pseudorandom number generation method
US9619206B2 (en) Pseudo-random bit sequence generator
US9015429B2 (en) Method and apparatus for an efficient hardware implementation of dictionary based lossless compression
JP2006293429A (en) Device and method for random number generation
Suneel Cryptographic pseudo-random sequences from the chaotic Hénon map
EP1875405B1 (en) Improved cipher system
Michaels et al. PRNG sequence combination techniques via Galois extension fields
US20140289295A1 (en) Method for generating a random output bit sequence
JPH11224183A (en) Pseudo-random number generating device
JP2008005386A (en) Solid-state imaging apparatus and signal processing method of the solid-state imaging apparatus
JP4662367B2 (en) Information symbol encoding method and apparatus, information symbol decoding method and decoding apparatus
KR100756435B1 (en) Methods and apparatus for keystream generation
Falih A Pseudorandom Binary Generator Based on Chaotic Linear Feedback Shift Register
CN113971015B (en) UIA2 computing circuit, data processing method, chip, electronic device and storage medium
JP2007087064A (en) Random number generator and random number generation method