JPH01265609A - Pseudo random number generator - Google Patents

Pseudo random number generator

Info

Publication number
JPH01265609A
JPH01265609A JP63093575A JP9357588A JPH01265609A JP H01265609 A JPH01265609 A JP H01265609A JP 63093575 A JP63093575 A JP 63093575A JP 9357588 A JP9357588 A JP 9357588A JP H01265609 A JPH01265609 A JP H01265609A
Authority
JP
Japan
Prior art keywords
random number
shift
output
register
shift register
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
JP63093575A
Other languages
Japanese (ja)
Inventor
Masao Aoki
青木 正夫
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63093575A priority Critical patent/JPH01265609A/en
Publication of JPH01265609A publication Critical patent/JPH01265609A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K3/00Circuits for generating electric pulses; Monostable, bistable or multistable circuits
    • H03K3/84Generating pulses having a predetermined statistical distribution of a parameter, e.g. random pulse generators

Abstract

PURPOSE:To output a pseudo random number with simple constitution by using a shift register having a feedback circuit so as to generate a numeral being a base of a random number at each prescribed interval, extracting the signal by a random number request signal, storing part or all bits into a register and outputting the result. CONSTITUTION:A shift pulse is inputted to shift registers 11, 12, 13 and 14 from a shift clock generating circuit 18 at a prescribed time interval. Thus, the shift register is shifted through a feedback circuit comprising exclusive OR circuits 15, 16 and 17 and the output is an M series code whose level is varied at a prescribed time interval. When a random number request signal is generated, the output value of the low-order 8-bit of the shift registers 11, 12 is stored by the register 19 to form a random number output. Since the shift register in use has 12bits, the low-order 8-bit is outputted at the same probability for the value to be taken and a random series with high uniformity is obtained.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、確率モデルやシミ五し−ション等を実行する
装置、乱数を利用したプロトコルを実現する通信制御装
置、乱数を利用する暗号生成―置。
Detailed Description of the Invention (Industrial Application Field) The present invention relates to a device for executing probabilistic models, staining, etc., a communication control device for realizing a protocol using random numbers, and a cryptographic generation device using random numbers. - Placed.

ゲーム機等に使用する擬似乱数発生装置に関する。This invention relates to a pseudorandom number generator used in game machines and the like.

(従来の技術) 従来、゛この種の擬似乱数発生装置は(特開昭57−8
846号公報に記載されている)第3図に示すように構
成される。第3図において、31は一定時間間隔で出力
値を増加させる自走カウンタ、32は自走カウンタ31
の出力値を記憶するパラメータレジスタ、33は乗算器
、34は乗算器33の出力を記憶して乱数として出力す
るレジスタである。
(Prior art) Conventionally, this type of pseudo-random number generator
It is configured as shown in FIG. 3 (described in Japanese Patent No. 846). In FIG. 3, 31 is a self-running counter that increases the output value at fixed time intervals, and 32 is a free-running counter 31.
33 is a multiplier, and 34 is a register that stores the output of the multiplier 33 and outputs it as a random number.

次に上記従来例の動作について説明する。第3図におい
て、自走カウンタ31は外部信号に関係なく常に一定間
隔で出力値が増加している。乱数要求信号が発生すると
、そのときの自走カウンタ31の値をパラメータレジス
タ32の中間ビット位置に格納する。パラメータレジス
タ32の最上位ビットと最下位ビットは常に1に固定さ
れている。1に固定きれた最上位ビットと最下位ビット
を含むパラメータレジスタ32の出力は乗算器33に入
力され、乗算出力が帰還された値と乗算処理を行われる
Next, the operation of the above conventional example will be explained. In FIG. 3, the output value of the free-running counter 31 always increases at regular intervals regardless of external signals. When a random number request signal is generated, the value of the free-running counter 31 at that time is stored in the intermediate bit position of the parameter register 32. The most significant bit and the least significant bit of the parameter register 32 are always fixed at 1. The output of the parameter register 32 including the most significant bit and the least significant bit fixed to 1 is input to a multiplier 33, where the multiplication output is multiplied by the fed back value.

乗算処理の結果、乗算器33の出力値はレジスタ34に
記憶されると同時に、乗算器33の入力に帰還されて次
の乱数要求信号発生時に使用される。レジスタ34に記
憶された乗算結果は乱数出力となる。
As a result of the multiplication process, the output value of the multiplier 33 is stored in the register 34, and at the same time is fed back to the input of the multiplier 33 to be used when generating the next random number request signal. The multiplication result stored in the register 34 becomes a random number output.

このように、上記従来の擬似乱数発生装置でも。In this way, even with the above-mentioned conventional pseudo-random number generator.

乱数要求信号が出力値が増加する時間間隔より十分大き
な時間間隔で発生すると、自然乱数に近似した乱数列を
発生させることができる。
If the random number request signal is generated at a time interval that is sufficiently larger than the time interval at which the output value increases, it is possible to generate a random number sequence that approximates natural random numbers.

(発明が解決しようとする課題) しかしながら、上記従来の擬似乱数発生装置では、自走
カウンタと乗算器によって乱数を発生させているため、
大きな回路が必要であるという問題があった。さらに1
乗算のように複雑な処理を行うため、乱数要求信号が発
生してから乱数が出力されるまでにかなりの時間遅れが
生じるという問題があった。本発明はこのような従来の
問題を解決するものであり、簡単な構成で時間遅れなし
に乱数を取り出せる優れた擬似乱数発生装置を提供する
ことを目的とするものである。
(Problems to be Solved by the Invention) However, in the above-mentioned conventional pseudo-random number generator, random numbers are generated by a free-running counter and a multiplier;
The problem was that a large circuit was required. 1 more
Since complex processing such as multiplication is performed, there is a problem in that there is a considerable time delay between the generation of the random number request signal and the output of the random number. The present invention is intended to solve these conventional problems, and aims to provide an excellent pseudorandom number generation device that has a simple configuration and can extract random numbers without time delay.

(課題を解決するための手段) 本発明は上記目的を達成するために、帰還回路を備えて
M系列符号を発生するシフトレジスタと。
(Means for Solving the Problems) In order to achieve the above object, the present invention provides a shift register that includes a feedback circuit and generates an M-sequence code.

一定時間間隔でシフトパルスを発生して上記シフトレジ
スタの出力値を変化させるシフトクロック発生手段と、
乱数要求信号が発生するとそのときのシフトレジスタの
出力している複数ビットのうちの一部のビットあるいは
全ビットを記憶し、その内容を乱数として出力する手段
とを備えたものである。
Shift clock generating means for generating shift pulses at regular time intervals to change the output value of the shift register;
When a random number request signal is generated, the shift register stores some or all of the bits output from the shift register at that time, and outputs the contents as a random number.

(作 用) 本発明は上記のような構成により次のような作用を有す
る。すなわち、シフトクロック発生手段が一定時間間隔
でシフトパルスを発生させると、帰還回路を備えてM系
列符号発生器を構成するシフトレジスタがシフトするた
め、全ビットが0である値以外のすべての値が上記シフ
トレジスタの出力に同じ割合で呪われる。、乱数要求信
号が発生すると、そのときのシフトレジスタの出力して
いる複数ビットのうちの一部のビットあるいは全ビット
を記憶する。その記憶内容はシフトレジスタの出力を乱
数要求信号の発生時点にサンプルしたものとなるため、
自然乱数に近似した乱数として出力することができる。
(Function) The present invention has the following effects due to the above configuration. In other words, when the shift clock generating means generates shift pulses at regular time intervals, the shift register that includes a feedback circuit and constitutes an M-sequence code generator shifts, so that all values other than those in which all bits are 0 are shifted. is cursed at the same rate as the output of the above shift register. , when a random number request signal is generated, some or all of the bits output from the shift register at that time are stored. The memory contents are the output of the shift register sampled at the time the random number request signal was generated, so
It can be output as a random number that approximates a natural random number.

さらに、シフトレジスタによる簡単な構成で乱数を発生
させているため、小さな回路で実現できるという効果を
有する。
Furthermore, since the random numbers are generated using a simple configuration using a shift register, it has the advantage that it can be realized with a small circuit.

(実施例) 第1図は本発明の一実施例の構成を示すものである。第
1図において、11.12.13.14はシフトレジス
タであり、15.16.17の排他的論理和回路による
帰還回路によってM系列発生器を構成する。
(Embodiment) FIG. 1 shows the configuration of an embodiment of the present invention. In FIG. 1, reference numerals 11, 12, 13 and 14 are shift registers, and an M-sequence generator is constituted by a feedback circuit consisting of an exclusive OR circuit 15, 16 and 17.

18は一定時間間隔でシフトパルスを発生するシフトク
ロック発生回路、19はレジスタである。
18 is a shift clock generation circuit that generates shift pulses at regular time intervals, and 19 is a register.

次に上記実施例の動作について説明する。上記実施例に
おいて、シフトレジスタ11.12.13.14にはシ
フトクロック発生回路18からシフトパルスが一定時間
間隔で入力される。このため、排他的論理和回路15.
16.17によって構成される帰還回路を通してシフト
レジスタ11.12.13.14がシフトされ、シフト
レジスタの出力が一定時間間隔で変化するM系列符号と
なる。そして、乱数要求信号が発生するとそのときのシ
フトレジスタ11.12の下位8ビツトの出力値をレジ
スタ19に記憶し乱数出力とする。
Next, the operation of the above embodiment will be explained. In the above embodiment, shift pulses are input from the shift clock generation circuit 18 to the shift registers 11, 12, 13, and 14 at regular time intervals. For this reason, the exclusive OR circuit 15.
The shift registers 11, 12, 13, and 14 are shifted through the feedback circuit constituted by 16, 17, and the output of the shift register becomes an M-sequence code that changes at regular time intervals. When a random number request signal is generated, the output value of the lower 8 bits of the shift registers 11 and 12 at that time is stored in the register 19 and used as a random number output.

このように、上記実施例によれば、8ビツトの乱数出力
を得るために12ビツトのシフトレジスタを使用してい
るため、下位8ビツトは全ビットがOである値を含むそ
のとり得る値すべてを同じ確率で出力でき、それを乱数
要求信号の発生した時点でサンプリングした結果である
乱数出力は高度な一様性を持った乱数列とすることがで
きる。また、上記実施例によれば、12ビツトのシフト
レジスタの出力のうち下位8ビツトの出力が一様乱数に
近い性質を持つため、シフトパルスの入力間隔が乱数要
求信号の発生間隔より大きくならないならば、あまりシ
フトパルスの入力間隔を小さくする必要はないという利
点を有する。
In this way, according to the above embodiment, a 12-bit shift register is used to obtain an 8-bit random number output, so the lower 8 bits can take on all possible values, including a value in which all bits are O. can be output with the same probability, and the random number output that is the result of sampling it at the time when the random number request signal is generated can be a highly uniform random number sequence. Further, according to the above embodiment, since the output of the lower 8 bits of the output of the 12-bit shift register has a property close to a uniform random number, if the input interval of the shift pulse does not become larger than the generation interval of the random number request signal, For example, it has the advantage that it is not necessary to reduce the input interval of shift pulses too much.

第2図は本発明の他の実施例を示すものである。FIG. 2 shows another embodiment of the invention.

第2図において、21はシフトレジスタ、22.23゜
24は排他的論理和回路、25はシフトクロック発生回
路、26はレジスタである。
In FIG. 2, 21 is a shift register, 22.23.24 is an exclusive OR circuit, 25 is a shift clock generation circuit, and 26 is a register.

本実施例では、8ビツトのシフトレジスタと3つの排他
的論理和を用いて単純帰還型M系列発生器を構成してい
る。したがって、8ビツトのシフトレジスタによって全
ビットが0である値以外を同じ確率で出力でき、さらに
回路を小さくできるという効果を有する。
In this embodiment, a simple feedback type M-sequence generator is constructed using an 8-bit shift register and three exclusive ORs. Therefore, the 8-bit shift register has the effect that values other than values in which all bits are 0 can be output with the same probability, and the circuit can be made smaller.

(発明の効果) 本発明は上記実施例より明らかなように、乱数の基にな
る数値を帰還回路を持つシフトレジスタによって一定時
間間隔ごとに発生させ、乱数要求信号が発生するとサン
プリングして一部のビットまたは全部のビットをレジス
タに記憶して乱数として出力するものであり、簡単な構
成で自然乱数に近似した擬似乱数を出力できるという効
果を有する。また、シフトレジスタの出力列は一様乱数
列と似た性質を持つため、シフトレジスタへのシフトパ
ルスの入力間隔が乱数要求信号の発生間隔より大きくな
らないならばシフトパルスの入力間隔をあまり小さくす
る必要はなく、回路の高速動作が必要ないという利点を
有する。そして、更に乱数の出力に複雑な手続きが不要
であるため、乱数要求信号が発生するとただちに乱数を
発生することができるという効果を有する。
(Effects of the Invention) As is clear from the above embodiments, the present invention generates numerical values on which random numbers are based at regular time intervals using a shift register having a feedback circuit, and when a random number request signal is generated, samples the numerical values that are the basis of random numbers, and This method stores bits or all bits in a register and outputs them as random numbers, and has the effect of outputting pseudo-random numbers that approximate natural random numbers with a simple configuration. Also, since the output sequence of the shift register has properties similar to a uniform random number sequence, if the input interval of shift pulses to the shift register is not larger than the generation interval of the random number request signal, the input interval of shift pulses should be made too small. This has the advantage that high-speed operation of the circuit is not required. Further, since no complicated procedure is required to output random numbers, it has the advantage that random numbers can be generated immediately when a random number request signal is generated.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例における擬似乱数発生装置の
概略機能ブロック図、第2図は本発明の他の実施例にお
ける擬似乱数発生装置の概略機能ブロック図、第3図は
従来の擬似乱数発生装置の概略機能ブロック図である。 II、 12.13.14.21・・・シフトレジスタ
。 15、16.17.22.23.24・・・排他的論理
和回路、18.25・・・シフトクロック発生回路、1
9.26・・・ レジスタ、31・・・自走カウンタ、
32・・・パラメータレジスタ。 33・・・乗算器、34・・・レジスタ。 特許出願人 松下電器産業株式会社 第1図 +1.+2j3.+4・ シフトレジスタ+5,16.
17・・・誹他物論理知回路第2図
FIG. 1 is a schematic functional block diagram of a pseudorandom number generator in one embodiment of the present invention, FIG. 2 is a schematic functional block diagram of a pseudorandom number generator in another embodiment of the invention, and FIG. 3 is a conventional pseudorandom number generator. FIG. 2 is a schematic functional block diagram of a random number generator. II, 12.13.14.21...Shift register. 15, 16.17.22.23.24... Exclusive OR circuit, 18.25... Shift clock generation circuit, 1
9.26... Register, 31... Free running counter,
32...Parameter register. 33... Multiplier, 34... Register. Patent applicant: Matsushita Electric Industrial Co., Ltd. Figure 1 +1. +2j3. +4・Shift register +5,16.
17... Alternative physical logic knowledge circuit diagram 2

Claims (1)

【特許請求の範囲】[Claims]  帰還回路を備えてM系列符号を発生するシフトレジス
タと、一定時間間隔でシフトパルスを発生して上記シフ
トレジスタの出力値を変化させるシフトクロック発生手
段と、乱数要求信号が発生するとそのときのシフトレジ
スタの出力している複数ビットのうちの一部のビットあ
るいは全ビットを記憶し、その内容を乱数として出力す
る手段とを備えたことを特徴とする擬似乱数発生装置。
a shift register that includes a feedback circuit and generates an M-sequence code; a shift clock generating means that generates shift pulses at regular time intervals to change the output value of the shift register; and a shift register that generates a random number request signal when the random number request signal is generated. 1. A pseudo-random number generator comprising means for storing some or all bits of a plurality of bits output from a register and outputting the contents as a random number.
JP63093575A 1988-04-18 1988-04-18 Pseudo random number generator Pending JPH01265609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63093575A JPH01265609A (en) 1988-04-18 1988-04-18 Pseudo random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63093575A JPH01265609A (en) 1988-04-18 1988-04-18 Pseudo random number generator

Publications (1)

Publication Number Publication Date
JPH01265609A true JPH01265609A (en) 1989-10-23

Family

ID=14086061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63093575A Pending JPH01265609A (en) 1988-04-18 1988-04-18 Pseudo random number generator

Country Status (1)

Country Link
JP (1) JPH01265609A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338045A (en) * 2006-07-28 2006-12-14 Japan Science & Technology Agency Random number generation system using chaos neural network
JP2009111998A (en) * 2007-10-12 2009-05-21 Sanyo Electric Co Ltd Semiconductor integrated circuit
US9389834B2 (en) 2013-02-21 2016-07-12 Socionext Inc. Pseudorandom number generating circuit and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338045A (en) * 2006-07-28 2006-12-14 Japan Science & Technology Agency Random number generation system using chaos neural network
JP2009111998A (en) * 2007-10-12 2009-05-21 Sanyo Electric Co Ltd Semiconductor integrated circuit
US9389834B2 (en) 2013-02-21 2016-07-12 Socionext Inc. Pseudorandom number generating circuit and method

Similar Documents

Publication Publication Date Title
US3790768A (en) Random number generator
US4355366A (en) Circuitry for minimizing auto-correlation and bias in a random number generator
US3984668A (en) Method for generating pseudo-random bit sequence words and a device for carrying out the method
US3706941A (en) Random number generator
US4691291A (en) Random sequence generators
US20090196420A1 (en) Cryptographic system incorporating a digitally generated chaotic numerical sequence
JP3696209B2 (en) Seed generation circuit, random number generation circuit, semiconductor integrated circuit, IC card and information terminal device
US5706029A (en) Apparatus and method for retrieving data from a joystick
US4418275A (en) Data hashing method and apparatus
Yakut et al. Secure and efficient hybrid random number generator based on sponge constructions for cryptographic applications
CN107678731B (en) High-frequency asynchronous random number generator based on FPGA
CA1138069A (en) Encipher-decipher device
JP3502065B2 (en) Random number generator
US20040054703A1 (en) Method and device for generating a pseudo-random sequence using a discrete logarithm
JPH01265609A (en) Pseudo random number generator
KR102197744B1 (en) True random number generator based on cellular automata with random transition rules
JPH11224183A (en) Pseudo-random number generating device
JPS5843743B2 (en) Encryption method
KR940004464A (en) Pseudo-random Number Generator and Method
JPH0651957A (en) Random numbers generator
JPH01258130A (en) Pseudo random number generator
JP2603809B2 (en) Random number generation circuit
JPS60204032A (en) Pseudo random number generating circuit
JPS61189731A (en) Discrete value counting circuit
SU836633A1 (en) Random number sensor