JPH10320180A - Pseudo-random number generating device - Google Patents

Pseudo-random number generating device

Info

Publication number
JPH10320180A
JPH10320180A JP9129680A JP12968097A JPH10320180A JP H10320180 A JPH10320180 A JP H10320180A JP 9129680 A JP9129680 A JP 9129680A JP 12968097 A JP12968097 A JP 12968097A JP H10320180 A JPH10320180 A JP H10320180A
Authority
JP
Japan
Prior art keywords
circuit
counter
clock
latch
random number
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
JP9129680A
Other languages
Japanese (ja)
Inventor
Nobumasa Imai
信正 今井
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.)
L II TEC KK
Original Assignee
L II TEC KK
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 L II TEC KK filed Critical L II TEC KK
Priority to JP9129680A priority Critical patent/JPH10320180A/en
Publication of JPH10320180A publication Critical patent/JPH10320180A/en
Pending legal-status Critical Current

Links

Landscapes

  • Pinball Game Machines (AREA)

Abstract

PROBLEM TO BE SOLVED: To generate a random number through simple hardware and to obtain superior periodicity by latching the output signal of a counter circuit when a composite signal outputted by a gate circuit rises or falls and outputting the numeral of the counter as a pseudo-random number value. SOLUTION: A clock generating means for latching generates different clocks L1 to Ln for latching which have clock pulse widths that are odd multiples of that of a reference clock and relatively prime. An (n)-bit counter 4 counts with (n)-bit width on the basis of a counter clock which has pulse width that is the same with the reference clock or optionally a power-raised multiple of a positive number. A gate circuit 1 puts the clocks for latching together in specific combination. An (n)-bit latch circuit 3 latches the output signal of the (n)-bit counter 4 when the composite signal outputted from the gate circuit 1 rises or fall and outputs the numeral of the counter as a pseudo-random number value.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、パチンコ遊技機等
で使用される乱数発生装置において、できる限り自然乱
数に近い値を提供することができるように構成された擬
似乱数発生装置に関するものである。遊技機業界におい
て求められる理想的な乱数としては以下の要件を満たす
ことが望ましい。 (1)固有の乱数値の発生頻度の同等性 例えば1000個の乱数を発生させた場合には”
0”、”1”(2進数)の数がそれぞれ500個である
ことが望ましい。 (2)不規則性 系列(乱数の並び)がどんなに不規則であったとして
も、系列の中にある特定の乱数値が一定周期で出現する
ような乱数発生装置では、いわゆる体感器のようなイン
ターバルタイマー発生器で簡単に照準を合わせることが
可能となってしまう為に、系列としての不規則性はもち
ろんのこと特定の乱数値の出現に関する周期も不規則で
あることが必要とされる。 (3)検査機関での再現性 遊技機メーカー側の試験結果と同等のものが検査機関で
テストしても同様に再現できるものでなくてはならな
い。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pseudo-random number generator used in a pachinko game machine and the like, which is configured to provide a value as close to a natural random number as possible. . It is desirable that the following requirements be satisfied as ideal random numbers required in the gaming machine industry. (1) Equivalent frequency of occurrence of unique random numbers For example, when 1000 random numbers are generated,
It is desirable that the number of “0” and “1” (binary number) is 500 each. (2) Irregularity Even if the sequence (arrangement of random numbers) is irregular, it is specified in the sequence. In random number generators where random numbers appear in a fixed cycle, it is possible to aim easily with an interval timer generator such as a so-called bodily sensation device. (3) Reproducibility at the inspection organization Even if the test results equivalent to the test results from the gaming machine maker side are tested at the inspection organization, It must be reproducible as well.

【0002】[0002]

【従来の技術】従来の遊技機に使用されている乱数発生
方式はあくまでも擬似乱数発生方式であるが、比較的乱
数値の系列は不規則であっても、特定の乱数値が一定の
周期で出現しているものがある。例えば、乱数の発生方
式として線形合同法(b=0:乗積合同法、b≠0混合
合同法)による乱数が使用され、これは次式で発生させ
ている。 Xn+1≡aXn+b(mod m) かかる線形合同法は、aとbにどの様な大きい数値を選
んでも周期はmで限定される為に、mを超える周期を持
つことはできない。
2. Description of the Related Art A conventional random number generation method used in a gaming machine is a pseudo random number generation method. However, even if a sequence of random numbers is relatively irregular, a specific random number is generated at a constant period. Some have appeared. For example, as a random number generation method, a random number by a linear congruential method (b = 0: product congruential method, b ≠ 0 mixed congruential method) is used, and is generated by the following equation. X n + 1 ≡aX n + b (mod m) In such a linear congruential method, the period is limited by m no matter how large a value is selected for a and b, so that it cannot have a period exceeding m.

【0003】[0003]

【発明が解決しようとする課題】すなわち線形合同法に
おいては、周期を長くするためにはmを大きな数値に設
定するしかないが、それに比例してハードロジックの規
模が大きくなってしまうという欠点がある。線形合同法
によるハードウェアは、四則演算で構成されるが、例え
ば16ビット×16ビットの乗算回路だけ見積もっても
約2000〜3000ゲート(並列式演算方式で実現し
た場合)も要してしまい、さらには除算回路においては
この数倍のゲート数を必要とすることになる。また仮に
大きな周期を持つ乱数発生装置ができたとしても、遊技
機で必要な大当たりの確率はせいぜい数百分の1程度で
あるため、大きな周期で発生させた場合には数百分の1
の確率に合わせるための抽選回路が別途必要となる。そ
こで本発明は、かかる従来技術の欠点に鑑みなされたも
ので、市販の乱数発生用ICよりも簡単なハードウエア
で乱数を発生させることができ、なおかつ線形合同法
(乗積合同法/混合合同法)よりも優れた周期性を持つ
と共に検査機関においても開発メーカーと同様に再現さ
せることが可能な疑似乱数発生装置を提供することを目
的とする。
That is, in the linear congruential method, in order to lengthen the period, it is necessary to set m to a large value, but there is a disadvantage that the scale of the hard logic increases in proportion thereto. is there. Although the hardware based on the linear congruential method is composed of four arithmetic operations, for example, if only a multiplication circuit of 16 bits × 16 bits is estimated, about 2000 to 3000 gates (when realized by a parallel operation method) are required. Further, the division circuit requires several times the number of gates. Even if a random number generator having a large cycle can be created, the probability of a jackpot required for a gaming machine is at most about one hundredth, so if it is generated at a large cycle, it will be several hundredths.
Separately requires a lottery circuit to match the probability. Therefore, the present invention has been made in view of the drawbacks of the conventional technology, and can generate random numbers with simpler hardware than a commercially available IC for generating random numbers. It is an object of the present invention to provide a pseudo-random number generator having a periodicity superior to that of the method (1) and capable of being reproduced in an inspection organization in the same manner as a development maker.

【0004】[0004]

【課題を解決するための手段】すなわち本発明は、クロ
ックパルス幅がそれぞれ基準クロックに対して奇数倍で
あり互いに素である複数のラッチ用クロック発生手段
と、基準クロックに対して同一か若しくは任意の正数の
べき乗倍のパルス幅からなるカウンタ用クロックに基づ
きnビット幅でカウントするカウンタ回路と、前記ラッ
チ用クロックを所定の組合せによって合成するゲート回
路と、ゲート回路から出力された合成信号の立上り又は
立ち下がりの際のカウンタ回路の出力信号をラッチし前
記カウンタの数値を擬似乱数値として出力するラッチ回
路とからなる擬似乱数発生装置により本目的を達成す
る。請求項2の発明は、ラッチ用クロック発生手段を複
数設け、これにラッチ用クロックのセレクタを介在さ
せ、任意のラッチ信号に基づきカウンタ回路の出力信号
を擬似乱数値として出力するように構成したものであ
る。請求項3の発明は前記ラッチ回路から出力された乱
数値を記憶しておき、nビットカウンタ回路に対して初
期値を入力する記憶手段とからなる擬似乱数発生装置で
ある。請求項4の発明は、前記擬似乱数発生装置を内蔵
させた遊技機制御用マイクロコンピュータである。
According to the present invention, there are provided a plurality of latch clock generating means having clock pulse widths each being an odd multiple of the reference clock and being relatively prime, and having the same or arbitrary number of latch clocks. A counter circuit that counts with an n-bit width based on a counter clock having a pulse width that is a multiple of a power of a positive number, a gate circuit that combines the latch clocks by a predetermined combination, and a combined signal output from the gate circuit. This object is achieved by a pseudo-random number generator comprising a latch circuit which latches an output signal of a counter circuit at the time of rising or falling and outputs the value of the counter as a pseudo-random value. According to a second aspect of the present invention, a plurality of latch clock generating means are provided, a selector for the latch clock is interposed therebetween, and an output signal of the counter circuit is output as a pseudo-random value based on an arbitrary latch signal. It is. According to a third aspect of the present invention, there is provided a pseudo-random number generator including a storage unit for storing a random number value output from the latch circuit and inputting an initial value to an n-bit counter circuit. The invention according to claim 4 is a gaming machine control microcomputer incorporating the pseudorandom number generator.

【0005】[0005]

【作用】本発明にかかる擬似乱数発生装置では、基準ク
ロックに対してパルス幅が奇数倍であり互いに素である
n本のラッチ用クロックをそれぞれ組にして、論理積又
は排他的論理和の演算を行うことにより、同期する周期
をそれぞれのパルス幅比率の乗算値とすることができ
る。例えば基準クロックに対して<181と187>、
<189と197>の比率の組合せを採用した場合に、
それぞれの同期する周期は、33847クロック目と3
7233クロック目となる。そこで、セレクタ用クロッ
クとして例えば30000パルス幅のものを採用するこ
とによりいずれかの論理積等を選択する。ラッチするタ
イミングは、信号の立上り又は立ち下がりをもって行う
関係から不規則なタイミングとなりnビットカウンタか
らカウント数値(0〜2n−1)が出力され、これをラッ
チ回路がこの数値をラッチし、これを擬似乱数値として
出力する。これらの擬似乱数値として出力される数値
は、不規則なタイミングにてカウンタから抽出されるた
め、乱数とみなすことができる。さらに本発明にかかる
乱数発生装置ではセレクタを介してラッチ用クロックの
合成信号を選択できるように構成しているために、さら
に不規則性を増すことができる。理論的には、3.78
×1013クロック目で循環することになる。また請求項3
の発明では、ラッチ回路で選択した擬似乱数値kを記憶
手段に格納しておき、次のラッチの時の初期値をkから
スタートさせるように構成させたものである。
In the pseudorandom number generating device according to the present invention, n latch clocks whose pulse widths are odd multiples of the reference clock and which are relatively prime are respectively grouped to calculate a logical product or an exclusive logical sum. Is performed, the synchronizing period can be set as a multiplication value of the respective pulse width ratios. For example, <181 and 187> with respect to the reference clock,
When the ratio combination of <189 and 197> is adopted,
The respective synchronizing cycles are 33847 clocks and 3
This is the 7233th clock. Therefore, any logical product or the like is selected by adopting, for example, a clock having a pulse width of 30,000 as the selector clock. The timing of latching is irregular due to the rise or fall of the signal, and the count value (0 to 2 n -1) is output from the n-bit counter, and the latch circuit latches this value. Is output as a pseudo-random value. Since the numerical values output as these pseudo random numbers are extracted from the counter at irregular timings, they can be regarded as random numbers. Further, since the random number generator according to the present invention is configured so that the synthesized signal of the latch clock can be selected via the selector, the irregularity can be further increased. Theoretically, 3.78
× 10 It circulates at the 13th clock. Claim 3
According to the invention, the pseudo random number value k selected by the latch circuit is stored in the storage means, and the initial value at the time of the next latch is started from k.

【0006】[0006]

【発明の実施の形態】以下に本発明を図示された実施例
に従って詳細に説明する。図1は本発明にかかる擬似乱
数発生装置の第1実施例の概念を示すブロック図であ
り、図示しないラッチ用クロック発生手段から、パルス
幅が基準クロックに対して奇数倍であり互いに素である
複数の異なるラッチ用クロックL1,L2,L3…Lnがゲート
回路1に入力されるように構成されている。このゲート
回路1は前記複数のラッチ用クロックをそれぞれ組にし
て論理積又は排他的論理和を演算するものであり、その
結果mビットセレクタ2には前記ゲート回路1からm種
類の合成信号が入力される。mビットセレクタ2にはセ
レクト用クロックから、それぞれの合成信号が同期する
比率より小さな比率のクロック数のものが採用されてお
り、該セレクト用クロックの信号に基づいてセレクタ2
が任意の合成信号を選択し、ラッチ信号としてnビット
ラッチ回路3に信号を出力する。4は、カウンタ用クロ
ックの入力を受けてnビットの範囲内にカウントするn
ビットカウンタであり、該カウンタ4のカウント値が前
記nビットラッチ回路3に対して出力される。nビット
ラッチ回路3は、前記ビットセレクタ2のラッチ信号に
基づきnビットカウンタ4のカウント値を保持すると共
にその保持されたカウント値を擬似乱数値として出力す
るように構成されている。nビットラッチ回路3の出力
は同時に初期値記憶メモリ5に出力され、該メモリ5は
入力された擬似乱数値を初期値として格納する。メモリ
5に格納された初期値は、前記nビットカウンタ4のカ
ウント開始の初期値として入力され、nビットカウンタ
4は該初期値からカウントを開始することになる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the illustrated embodiments. FIG. 1 is a block diagram showing the concept of a first embodiment of a pseudo-random number generator according to the present invention. From a latch clock generating means (not shown), the pulse width is an odd multiple of a reference clock and are relatively prime. latch clock L 1 a plurality of different, L 2, L 3 ... L n are configured to be input to the gate circuit 1. The gate circuit 1 calculates a logical product or an exclusive OR by using each of the plurality of latch clocks as a set. As a result, m types of synthesized signals are input to the m-bit selector 2 from the gate circuit 1. Is done. The m-bit selector 2 employs a clock having a smaller number of clocks than the ratio of synchronizing the respective composite signals from the selection clocks.
Selects an arbitrary composite signal and outputs a signal to the n-bit latch circuit 3 as a latch signal. Reference numeral 4 denotes an n which receives an input of a counter clock and counts within a range of n bits.
This is a bit counter, and the count value of the counter 4 is output to the n-bit latch circuit 3. The n-bit latch circuit 3 is configured to hold the count value of the n-bit counter 4 based on the latch signal of the bit selector 2 and to output the held count value as a pseudo-random value. The output of the n-bit latch circuit 3 is output to the initial value storage memory 5 at the same time, and the memory 5 stores the inputted pseudo random number value as the initial value. The initial value stored in the memory 5 is input as an initial value at the start of counting of the n-bit counter 4, and the n-bit counter 4 starts counting from the initial value.

【0007】図2に示すものは、本発明の第2実施例の
概念を示すものであり、単一の発振器を用いてラッチ用
クロック、セレクト用クロック及びカウンタ用クロック
を出力させた場合の簡単なブロック図である。すなわ
ち、所定の周波数で発振する発振器9と、該発振器9か
ら出力されたクロック信号を正数のべき乗倍で分周する
カウンタ用クロック発生手段6と、前記発振器9から出
力されたクロック信号を延長回路10を介して、基準ク
ロックに対してパルス幅が奇数倍であり互いに素である
複数のラッチ用クロック発生手段71,72,…7n と、
複数の異なるラッチ用クロックが同期する前のパルス幅
比率であるセレクト用クロックを発生する手段8とから
なり、それぞれのクロック信号は、図1に示すゲート回
路1,mビットセレクタ2、nビットラッチ回路3、n
ビットカウンタ4及びメモリ5とからなる第1実施例の
擬似乱数発生装置と接続され、全体として擬似乱数発生
装置の第2実施例を構成する。
FIG. 2 shows the concept of the second embodiment of the present invention. In the case where a single oscillator is used to output a latch clock, a select clock and a counter clock, a simple oscillator is used. FIG. That is, an oscillator 9 that oscillates at a predetermined frequency, a counter clock generator 6 that divides the clock signal output from the oscillator 9 by a positive power, and extends the clock signal output from the oscillator 9. A plurality of latch clock generating means 7 1 , 7 2 ,... 7 n whose pulse widths are odd multiples of the reference clock and are relatively prime via the circuit 10;
Means 8 for generating a select clock having a pulse width ratio before a plurality of different latch clocks are synchronized. Each of the clock signals includes a gate circuit 1, an m-bit selector 2, an n-bit latch Circuit 3, n
The pseudorandom number generator of the first embodiment, which includes the bit counter 4 and the memory 5, is connected to the second embodiment of the pseudorandom number generator as a whole.

【0008】図3は、本発明にかかる擬似乱数発生装置
の第1実施例の具体的な論理回路を示すもので、パルス
幅が基準クロックに対して奇数倍で互いに素であるラッ
チ用クロックとして181(197/197)、182
(189/189)、183(187/187)、18
4(181/181)を選択している。それぞれのラッ
チ用クロックは、排他的論理和回路11,12にそれぞ
れ入力され、その出力信号はセレクト用クロック(30000
/30000)と共にAND回路13,14に入力されるよう
に接続されている。本実施例では、セレクタブルとする
ためにAND回路13へのセレクト用クロックをNOT
回路15を介して入力している。また各AND回路1
3,14の出力信号はOR回路16へ入力され、結果的
にいずれかの排他的論理和回路出力信号がラッチ信号と
して出力されるように構成されている。
FIG. 3 shows a specific logic circuit of the first embodiment of the pseudorandom number generator according to the present invention. The pulse width is an odd multiple of the reference clock and is relatively prime to the latch clock. 181 (197/197), 182
(189/189), 183 (187/187), 18
4 (181/181) is selected. The respective latch clocks are input to exclusive OR circuits 11 and 12, respectively, and the output signals thereof are selected clocks (30000).
/ 30000) to be input to the AND circuits 13 and 14. In the present embodiment, the select clock to the AND circuit 13 is NOT
It is input via a circuit 15. Also, each AND circuit 1
The output signals 3 and 14 are input to the OR circuit 16, and as a result, one of the exclusive OR circuit output signals is output as a latch signal.

【0009】図3の17は、基準クロック信号を正数べ
き乗倍したカウント用のクロック信号(10/10)で
あり、nビット(n=4)のカウンタ回路22に基本カ
ウンタクロックとして入力される。当初本実施例ではメ
モリ5からのカウント初期値21としてAが入力されて
おり、ラッチ回路24にOR回路16から出力されるラ
ッチ信号の立ち上がり時点におけるカウンタ回路22の
カウント値をラッチし、これを乱数値として出力する構
成からなる。尚、23、25は16進表示を行う為のモ
ニタであり、201、202、は共にリセット信号の代替
スイッチである。201、の方が202よりリセット期
間が長く、すなわち202のリセット期間中にカウンタ
回路22とラッチ回路24の内部が初期化され、さらに
201のリセット期間中にメモリ5からの初期値Aがカ
ウンタ回路22にロードされ、リセット信号がインアク
ティブになると、カウンタ回路22は「0」ではなく、
「A」を起点としてカウントアップを開始する。
Reference numeral 17 in FIG. 3 denotes a counting clock signal (10/10) obtained by multiplying the reference clock signal by a positive power, and is input to an n-bit (n = 4) counter circuit 22 as a basic counter clock. . Initially, in the present embodiment, A is input as the count initial value 21 from the memory 5, and the latch circuit 24 latches the count value of the counter circuit 22 at the rising edge of the latch signal output from the OR circuit 16, It consists of outputting as a random value. Reference numerals 23 and 25 denote monitors for performing hexadecimal display, and reference numerals 201 and 202 denote alternate switches for reset signals. 201 has a longer reset period than 202, that is, the inside of the counter circuit 22 and the latch circuit 24 is initialized during the reset period of 202, and the initial value A from the memory 5 is reset by the counter circuit during the reset period of 201. 22 and the reset signal becomes inactive, the counter circuit 22 is not "0",
The count-up starts from “A”.

【0010】図4及び図5に示すものは、ラッチ用クロ
ックと排他的論理和によりラッチされた信号及びカウン
ト用クロック信号との関係を示すタイムチャートであ
り、0〜30000クロック目までは、(197/19
7)と(189/189)のラッチ用クロック信号が使
用され、30000クロック目において、セレクト用ク
ロックが切り替わる為に(187/187)と(181
/181)ラッチ用クロック信号が使用されることにな
る。各段階におけるラッチ用クロック信号の排他的論理
和回路11で合成されたラッチ信号(LATCH)が図の8
列目に示すもので、ラッチ信号の立上り時におけるカウ
ンタ回路22のカウント値をラッチ回路24で保持する
ことにより、初期値をAとした時に図8で示されるよう
な数値が擬似乱数値として出力されることとなる。
FIGS. 4 and 5 are time charts showing the relationship between the latch clock, the signal latched by exclusive OR, and the count clock signal. 197/19
7) and (189/189) are used for the latch clock signal, and at the 30000th clock, the selection clocks are switched, so that (187/187) and (181)
/ 181) The latch clock signal will be used. The latch signal (LATCH) synthesized by the exclusive OR circuit 11 of the latch clock signal at each stage is shown in FIG.
In the column, by holding the count value of the counter circuit 22 at the time of the rising edge of the latch signal in the latch circuit 24, a numerical value as shown in FIG. Will be done.

【0011】図6は、図2に示すパルス幅変調回路(以
下PWM回路という。6,71〜7n、8で構成され
る)の具体的な論理回路を示すもので、基準クロック9
のパルス幅の2〜16倍の範囲まで設定可能な論理回路
図である。本PWM回路の特徴を示すため、本論理回路
図では所望クロックのパルス幅のローレベルが3、ハイ
レベルが2の場合を採用している。26は単なる2分周
回路であり、カウンタ用クロックが(2/2)のものを
採用したい場合はこの回路から出力される信号をカウン
タ用クロックとして使用すればよい。27,28は基準
クロック9をカウントするカウンタ回路である。29は
所望クロックのローレベルパルス幅比率を設定する為の
もので、30はハイレベルパルス幅比率を設定する為の
設定回路である。31はカウンタ回路27と設定回路2
9の値を比較し、一致すればハイレベルを出力し、また
同様に32はカウンタ回路28と設定回路30の値を比
較し、一致すればハイレベルを出力するコンパレータと
して機能する。すなわち、所望クロックのローレベルパ
ルス幅である3に達するとコンパレータ31から一致信
号が出力され、この信号は回路34に入力される。回路
34はこの信号の立ち上がりを検知して今までローレベ
ル出力であったのをハイレベル出力へ変換する。この
間、L→Hに変化するまでの時間がすなわちローレベル
パルス幅である。このL→Hに変化するまでの時間はカ
ウンタ回路28はディセーブルになっており、回路34
から出力される信号はAND回路36へ入力され、この
信号のレベルがハイレベルになった時に初めてカウント
を開始する。すなわち、所望クロックのハイレベルパル
ス幅である2に達するとコンパレータ32から一致信号
が出力され、この信号はNOT回路33にてローレベル
に変換され、AND回路37へ入力される。回路34は
AND回路37からのローレベル信号を受けて初期化さ
れ、今までハイレベル出力であったのをローレベル出力
へ変換する。この間、H→Lに変化するまでの時間がす
なわちハイレベルパルス幅である。同様に、NOT回路
33から出力される信号はAND回路35へも入力され
ており、カウンタ回路27はAND回路35からのロー
レベル信号を受けて初期化され、再度0からカウントア
ップする。以上の繰り返しシーケンスが所望クロックを
生成している。尚、203はリセット信号の代替スイッ
チであり、電源投入時の初期化用である。
FIG. 6 shows a specific logic circuit of the pulse width modulation circuit (hereinafter, referred to as a PWM circuit, consisting of 6, 71 to 7n, 8) shown in FIG.
FIG. 9 is a logic circuit diagram that can be set up to a range of 2 to 16 times the pulse width of FIG. In order to show the features of the PWM circuit, the logic circuit diagram employs a case where the low level of the pulse width of the desired clock is 3 and the high level is 2. Reference numeral 26 denotes a simple frequency-dividing circuit. When it is desired to use a counter clock of (2/2), a signal output from this circuit may be used as the counter clock. 27 and 28 are counter circuits for counting the reference clock 9. Reference numeral 29 denotes a setting circuit for setting a low-level pulse width ratio of a desired clock, and reference numeral 30 denotes a setting circuit for setting a high-level pulse width ratio. 31 is a counter circuit 27 and a setting circuit 2
The value of the counter circuit 28 is compared with the value of the setting circuit 30, and the value of the counter circuit 28 is compared with the value of the setting circuit 30. If the values match, the function of the comparator 32 is outputted. That is, when the pulse reaches the low-level pulse width 3 of the desired clock, the comparator 31 outputs a coincidence signal, and this signal is input to the circuit 34. The circuit 34 detects the rising of this signal and converts the low level output to the high level output. During this time, the time required to change from L to H is the low-level pulse width. The counter circuit 28 is disabled during the time until this change from L to H, and the circuit 34
Is output to the AND circuit 36, and counting is started only when the level of this signal becomes high. That is, when the pulse reaches the high-level pulse width of 2 of the desired clock, a match signal is output from the comparator 32, and this signal is converted to a low level by the NOT circuit 33 and input to the AND circuit 37. The circuit 34 is initialized by receiving a low level signal from the AND circuit 37, and converts a high level output to a low level output. During this time, the time required to change from H to L is the high-level pulse width. Similarly, the signal output from the NOT circuit 33 is also input to the AND circuit 35, and the counter circuit 27 is initialized by receiving the low level signal from the AND circuit 35, and counts up from 0 again. The above repetitive sequence generates the desired clock. Reference numeral 203 denotes an alternative switch for the reset signal, which is used for initialization when the power is turned on.

【0012】図7に示すものは、図6の論理回路図のタ
イムチャートである。
FIG. 7 is a time chart of the logic circuit diagram of FIG.

【0013】図9に示すものは、図8の試験データを基
に特定の乱数値の出現周期を表したものである。
FIG. 9 shows an appearance cycle of a specific random value based on the test data shown in FIG.

【0014】図10に示すものは本発明にかかる第3の
実施例を示すもので、前述図1の実施例の装置におい
て、セレクタ用のクロックにおける立ち下がり(又は立
上り)を検出するエッジ検出回路38を設け、該検出回
路38がセレクト用クロックの変化を検出した時に、そ
の時点のラッチ回路3のデータ(乱数値)をカウンタ回
路4にロードし、このデータ値を基点としてカウンタ回
路4がカウントアップを開始するように構成されたもの
である。
FIG. 10 shows a third embodiment according to the present invention. In the apparatus of the embodiment shown in FIG. 1, an edge detecting circuit for detecting a falling (or rising) in a clock for a selector. 38, when the detection circuit 38 detects a change in the select clock, the data (random number value) of the latch circuit 3 at that time is loaded into the counter circuit 4, and the counter circuit 4 counts based on the data value. It is configured to start up.

【0015】以上述べた構成において本実施例にかかる
擬似乱数発生装置では、まず基準クロックに対してパル
ス幅が奇数倍で、互いに素である複数のクロックを選択
する。奇数としては、3,5,7,11,13,17,
19,23,31,37,41,43,47,53,5
9,61,67,71,73,…,181,187,1
89,191,193,197,…とあり任意の奇数を
選択する。選択するための基準としては、同期するまで
のカウント数が最大となるような組合せとする。結果的
には、選択される奇数は比較的近似したものとなる。選
択する奇数としてはクロック数比180付近のものを選
択した。
In the pseudorandom number generator according to the present embodiment having the above-described configuration, first, a plurality of clocks whose pulse widths are odd multiples of the reference clock and which are relatively prime are selected. As odd numbers, 3, 5, 7, 11, 13, 17,
19, 23, 31, 37, 41, 43, 47, 53, 5
9, 61, 67, 71, 73, ..., 181, 187, 1
89, 191, 193, 197,... And an arbitrary odd number is selected. As a criterion for selection, a combination that maximizes the count number until synchronization is obtained. As a result, the odd numbers chosen will be relatively close. As an odd number to be selected, a clock number ratio of about 180 was selected.

【0016】奇数の組合せとしては色々考えられるが、
本実施例では(197,189)、(181,187)
の組合せのものを選択した。この結果、理論的な同期の
周期は前者が37233クロック目であり、後者が33
847クロック目である。セレクタ用のクロック数fは
これら2つの同期周期よりも小さいものであることが要
件となる。そこで、f<33847の要件を満たすもの
であれば良い。そこで実施例では、30000を選択し
た。これらラッチ用のクロックをゲート回路1で排他的
論理和の演算をすると、0から30000クロック目ま
ではセレクタ用のクロックが0であるためにラッチ用ク
ロック(197,189)の組合せのみが作用し、図4
に示すようなラッチ信号となる。
Various combinations of odd numbers are conceivable.
In this embodiment, (197, 189), (181, 187)
Was selected. As a result, the theoretical synchronization cycle is 37233 clocks in the former case and 33
This is the 847th clock. It is required that the number f of clocks for the selector be smaller than these two synchronization periods. Therefore, any material that satisfies the requirement of f <33847 may be used. Therefore, in the example, 30,000 was selected. When the exclusive OR of these latch clocks is performed by the gate circuit 1, only the combination of the latch clocks (197, 189) operates since the selector clock is 0 from the 0th to the 30000th clock. , FIG.
The latch signal is as shown in FIG.

【0017】ラッチ回路3では、ラッチ信号の立上り時
のクロックを検出するように構成されているために、当
該ラッチ回路3がラッチするカウンタ4のデータは0〜
Fの16種類の数値のいずれかが不規則に図6に示すよ
うに出力されることとなる。一方セレクト用クロックの
クロック数が30000になったとき、L→Hに変化す
るためにラッチ用クロック(181,187)の組合せ
にかかる排他的論理和が、ラッチ信号として作用するこ
とになり、図5に示すようなラッチ信号となる。尚、本
実施例においては、ラッチした際に出力した擬似乱数値
は、出力と同時にメモリ5に入力され、再度電源投入時
に4ビットカウンタ回路4がカウントを開始する際の初
期値として機能する。
Since the latch circuit 3 is configured to detect the clock at the time of the rising of the latch signal, the data of the counter 4 latched by the latch circuit 3 is 0 to 0.
One of the 16 numerical values of F is output irregularly as shown in FIG. On the other hand, when the number of clocks for the select clock reaches 30,000, the exclusive OR of the combination of the latch clocks (181, 187) changes from L to H, which acts as a latch signal. The latch signal shown in FIG. In this embodiment, the pseudo-random number output when latched is input to the memory 5 at the same time as the output, and functions as an initial value when the 4-bit counter circuit 4 starts counting when the power is turned on again.

【0018】図10の第3実施例にかかる擬似乱数発生
装置では、30000クロックに1回の割合でセレクタ
用クロックの論理が切り替わった際に、その時点のラッ
チ回路3のデータ(乱数値)がカウンタ回路4へ入力さ
れることになる。
In the pseudorandom number generator according to the third embodiment shown in FIG. 10, when the logic of the selector clock is switched once every 30,000 clocks, the data (random number value) of the latch circuit 3 at that time is changed. This is input to the counter circuit 4.

【0019】本実施例においてラッチ用クロックを複数
種類の組合せのものを選択し、セレクタ用のクロック信
号に基づいて、選択するように構成したが、これに限定
されるものではなく、一番簡易な方式としてはセレクタ
回路2を用いずに、1組の異なるラッチ用クロック信号
の排他的論理和回路で合成されるラッチ信号に基づいて
カウンタ回路4のカウント数値を擬似乱数値として出力
するように構成しても良いことはいうまでもない。
In this embodiment, the latch clock is selected from a plurality of combinations and selected based on the clock signal for the selector. However, the present invention is not limited to this. As a simple method, the count value of the counter circuit 4 is output as a pseudo-random value based on a latch signal synthesized by an exclusive OR circuit of a set of different latch clock signals without using the selector circuit 2. It goes without saying that it may be configured.

【0020】[0020]

【発明の効果】現在、パチンコ遊技機等においては、一
般的には乱数の発生はソフトウェアで行われているた
め、ソフトウェアにかかる負担が大きい。本発明にかか
る擬似乱数発生装置は、かかるソフトウェアの負担を軽
減する役割を果たし、ハードウェアで発生させる場合で
も、市販の乱数発生用IC回路よりも簡単なハードウエ
ア、すなわち演算回路を有することなく乱数を発生させ
ることができると共に線形合同法(乗積合同法/混合合
同法)よりも優れた周期性(特定の乱数値の出現周期が
不規則であること)を持つ乱数を提供することができ
る。このため、遊技者が機械(体感器等)を用いて意図
的に入賞タイミングを図って特定の乱数値を引いて大当
たりを狙うことが実質的にできなくなる。すなわち、入
賞タイミングを人為的に操作することによる攻略法を無
くすことができる。また、第2実施例のように、単一の
発振源のみでも疑似乱数発生装置を動作させることがで
きることから、コスト面のメリットも大きい。
At present, in pachinko gaming machines and the like, generally, random numbers are generated by software, so that the burden on software is large. The pseudo-random number generator according to the present invention plays a role of reducing the load of such software, and even when generating the hardware, it is simpler than a commercially available IC circuit for generating random numbers, that is, without having an arithmetic circuit. It is possible to provide random numbers that can generate random numbers and have better periodicity (the occurrence period of a specific random number value is irregular) than the linear congruential method (multiplicative congruential method / mixed congruential method). it can. For this reason, it becomes virtually impossible for the player to intentionally aim at the prize timing using a machine (such as a bodily sensation device), draw a specific random number value, and aim for a jackpot. That is, it is possible to eliminate a capture method by manipulating the winning timing artificially. Further, as in the second embodiment, since the pseudorandom number generator can be operated with only a single oscillation source, the merit of cost is great.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明にかかる第1実施例の装置のブロック
図である。
FIG. 1 is a block diagram of an apparatus according to a first embodiment of the present invention.

【図2】 本発明の第2実施例であり、第1実施例にか
かる装置におけるラッチ用クロック及びセレクト用クロ
ック並びにカウンタ用クロックを一つの基準クロックか
ら合成する例を示すブロック図である。
FIG. 2 is a block diagram illustrating a second embodiment of the present invention, in which the latch clock, the select clock, and the counter clock in the device according to the first embodiment are synthesized from one reference clock.

【図3】 図1の装置における具体的な論理回路図であ
る。
FIG. 3 is a specific logic circuit diagram in the device of FIG. 1;

【図4】 各クロック信号とラッチ信号との関係を示す
タイムチャート(その1)である。
FIG. 4 is a time chart (part 1) showing a relationship between each clock signal and a latch signal.

【図5】 各クロック信号とラッチ信号との関係を示す
タイムチャート(その2)である。
FIG. 5 is a time chart (part 2) showing a relationship between each clock signal and a latch signal.

【図6】 第2実施例におけるPWM回路にかかる部分
の具体的な論理回路図である。
FIG. 6 is a specific logic circuit diagram of a portion related to a PWM circuit in a second embodiment.

【図7】 図6の論理回路図のタイムチャートである。FIG. 7 is a time chart of the logic circuit diagram of FIG. 6;

【図8】 図3の第1実施例にかかる擬似乱数発生装置
による乱数試験データである。
FIG. 8 shows random number test data by the pseudorandom number generator according to the first embodiment of FIG. 3;

【図9】 各方式による特定乱数値の発生周期の比較表
である。
FIG. 9 is a comparison table of a generation cycle of a specific random number value according to each method.

【図10】本発明の第3実施例の概念ブロック図であ
る。
FIG. 10 is a conceptual block diagram of a third embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 ゲート回路 2 mビットセレクタ回路 3 nビットラッチ回路 4 nビットカウンタ回路 5 メモリ 6 カウンタ用クロック発生回路 7 ラッチ用クロック発生回路 8 セレクト用クロック発生回路 9 基準クロック(発振器) 10 延長回路 11,12 排他的論理和回路 13,14、34, AND回路 35,36,37 AND回路 15 33 NOT回路 16 OR回路 17 カウンタ用クロック 18 ラッチ用クロック 19 セレクト用クロック 20 リセット信号の代替スイッチ 21 カウント初期値入力回路 22、27,28 カウンタ回路 24 ラッチ回路 26 2分周回路 29 ローレベルパルス幅比率設定回路 30 ハイレベルパルス幅比率設定回路 31,32 コンパレータ 38 エッジ検出回路 REFERENCE SIGNS LIST 1 gate circuit 2 m-bit selector circuit 3 n-bit latch circuit 4 n-bit counter circuit 5 memory 6 counter clock generation circuit 7 latch clock generation circuit 8 select clock generation circuit 9 reference clock (oscillator) 10 extension circuit 11, 12 Exclusive OR circuit 13, 14, 34, AND circuit 35, 36, 37 AND circuit 15 33 NOT circuit 16 OR circuit 17 Counter clock 18 Latch clock 19 Select clock 20 Replacement switch for reset signal 21 Count initial value input Circuits 22, 27, 28 Counter circuit 24 Latch circuit 26 Divide-by-2 circuit 29 Low-level pulse width ratio setting circuit 30 High-level pulse width ratio setting circuit 31, 32 Comparator 38 Edge detection circuit

【手続補正書】[Procedure amendment]

【提出日】平成9年7月22日[Submission date] July 22, 1997

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0008[Correction target item name] 0008

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0008】図3は、本発明にかかる擬似乱数発生装置
の第1実施例の具体的な論理回路を示すもので、パルス
幅が基準クロックに対して奇数倍で互いに素であるラッ
チ用クロックとして181(197/197)、18
2(189/189)、183(187/187)、18
4(181/181)を選択している。それぞれのラッ
チ用クロックは、排他的論理和回路11,12にそれぞ
れ入力され、その出力信号はセレクト用クロック(30000
/30000)と共にAND回路13,14に入力されるよう
に接続されている。本実施例では、セレクタブルとする
ためにAND回路13へのセレクト用クロックをNOT
回路15を介して入力している。また各AND回路1
3,14の出力信号はOR回路16へ入力され、結果的
にいずれかの排他的論理和回路出力信号がラッチ信号と
して出力されるように構成されている。
FIG. 3 shows a specific logic circuit of the first embodiment of the pseudorandom number generator according to the present invention. The pulse width is an odd multiple of the reference clock and is relatively prime to the latch clock. 18 1 (197/197), 18
2 (189/189), 18 3 (187/187), 18
4 (181/181) is selected. The respective latch clocks are input to exclusive OR circuits 11 and 12, respectively, and the output signals thereof are selected clocks (30000).
/ 30000) to be input to the AND circuits 13 and 14. In the present embodiment, the select clock to the AND circuit 13 is NOT
It is input via a circuit 15. Also, each AND circuit 1
The output signals 3 and 14 are input to the OR circuit 16, and as a result, one of the exclusive OR circuit output signals is output as a latch signal.

【手続補正2】[Procedure amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0009[Correction target item name] 0009

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0009】図3の17は、基準クロック信号を正数べ
き乗倍したカウント用のクロック信号(10/10)で
あり、nビット(n=4)のカウンタ回路22に基本カ
ウンタクロックとして入力される。当初本実施例ではメ
モリ5からのカウント初期値21としてAが入力されて
おり、ラッチ回路24にOR回路16から出力されるラ
ッチ信号の立ち上がり時点におけるカウンタ回路22の
カウント値をラッチし、これを乱数値として出力する構
成からなる。尚、23、25は16進表示を行う為のモ
ニタであり、201、202、は共にリセット信号の代替ス
イッチである。201、の方が202よりリセット期間が
長く、すなわち202のリセット期間中にカウンタ回路
22とラッチ回路24の内部が初期化され、さらに20
1のリセット期間中にメモリ5からの初期値Aがカウン
タ回路22にロードされ、リセット信号がインアクティ
ブになると、カウンタ回路22は「0」ではなく、「A」を
起点としてカウントアップを開始する。
Reference numeral 17 in FIG. 3 denotes a counting clock signal (10/10) obtained by multiplying the reference clock signal by a positive power, and is input to an n-bit (n = 4) counter circuit 22 as a basic counter clock. . Initially, in the present embodiment, A is input as the count initial value 21 from the memory 5, and the latch circuit 24 latches the count value of the counter circuit 22 at the rising edge of the latch signal output from the OR circuit 16, It consists of outputting as a random value. Incidentally, 23 and 25 is a monitor for performing hexadecimal, 20 1, 20 2, is an alternative switch both reset signals. 20 1, it is 20 2 than the reset period is long, i.e. the internal counter circuit 22 and the latch circuit 24 during the 20 second reset period initializes the further 20
When the initial value A from the memory 5 is loaded into the counter circuit 22 during the reset period of 1 and the reset signal becomes inactive, the counter circuit 22 starts counting up from "A" instead of "0". .

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 クロックパルス幅がそれぞれ基準クロッ
クに対して奇数倍であり互いに素である複数のラッチ用
クロック発生手段と、基準クロックに対して同一か若し
くは任意の正数のべき乗倍のパルス幅からなるカウンタ
用クロックに基づきnビット幅でカウントするカウンタ
回路と、前記ラッチ用クロックを所定の組合せによって
合成するゲート回路と、ゲート回路から出力された合成
信号の立上り又は立ち下がりの際のカウンタ回路の出力
信号をラッチし前記カウンタの数値を擬似乱数値として
出力するラッチ回路とからなる擬似乱数発生装置。
1. A plurality of latch clock generating means, each having a clock pulse width odd and multiple relative to a reference clock and being mutually prime, and a pulse width equal to or an arbitrary positive multiple of the reference clock. A counter circuit that counts in an n-bit width based on a counter clock composed of: a gate circuit that combines the latch clocks by a predetermined combination; and a counter circuit that is used when a composite signal output from the gate circuit rises or falls. And a latch circuit for latching the output signal of the counter and outputting the value of the counter as a pseudo-random value.
【請求項2】 クロックパルス幅がそれぞれ基準クロッ
クに対して奇数倍であり互いに素である複数のラッチ用
クロック発生手段と、基準クロックに対して同一か若し
くは任意の正数のべき乗倍のパルス幅からなるカウンタ
用クロックに基づきnビット幅でカウントするカウンタ
回路と、前記ラッチ用クロックを所定の組合せによって
合成するゲート回路と、ゲート回路の出力信号のいずれ
かを選択するセレクタと、前記セレクタで選択された合
成信号の立上り又は立ち下がりの際のカウンタ回路の出
力信号をラッチし前記カウンタの数値を擬似乱数値とし
て出力するラッチ回路とからなる擬似乱数発生装置。
2. A plurality of latch clock generating means each having an odd multiple of a clock pulse width and being relatively prime to a reference clock, and a pulse width of the same or an arbitrary positive multiple of the reference clock. A counter circuit that counts in n bits based on a counter clock consisting of: a gate circuit that combines the latch clocks in a predetermined combination; a selector that selects one of the output signals of the gate circuit; And a latch circuit for latching an output signal of the counter circuit at the time of rising or falling of the synthesized signal and outputting the value of the counter as a pseudo-random value.
【請求項3】 前記ラッチ回路から出力された乱数値を
記憶しておき、nビットカウンタ回路に対して初期値を
入力する記憶手段を有することを特徴とする請求項1又
は2記載の擬似乱数発生装置。
3. The pseudo-random number according to claim 1, further comprising storage means for storing a random number value output from said latch circuit and inputting an initial value to an n-bit counter circuit. Generator.
【請求項4】 請求項1乃至3のいずれか1項記載の擬
似乱数発生装置を内蔵させたことを特徴とする遊技機制
御用マイクロコンピュータ。
4. A microcomputer for controlling a gaming machine, comprising a pseudo-random number generator according to claim 1.
JP9129680A 1997-05-20 1997-05-20 Pseudo-random number generating device Pending JPH10320180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9129680A JPH10320180A (en) 1997-05-20 1997-05-20 Pseudo-random number generating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9129680A JPH10320180A (en) 1997-05-20 1997-05-20 Pseudo-random number generating device

Publications (1)

Publication Number Publication Date
JPH10320180A true JPH10320180A (en) 1998-12-04

Family

ID=15015526

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9129680A Pending JPH10320180A (en) 1997-05-20 1997-05-20 Pseudo-random number generating device

Country Status (1)

Country Link
JP (1) JPH10320180A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001120753A (en) * 1999-10-28 2001-05-08 Samii Kk Game machine
JP2003271379A (en) * 2002-03-15 2003-09-26 Yamatake Corp Electronic apparatus and its random number generating method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001120753A (en) * 1999-10-28 2001-05-08 Samii Kk Game machine
JP4535349B2 (en) * 1999-10-28 2010-09-01 サミー株式会社 Game machine
JP2003271379A (en) * 2002-03-15 2003-09-26 Yamatake Corp Electronic apparatus and its random number generating method

Similar Documents

Publication Publication Date Title
US7376687B2 (en) Pseudo-random number generator
KR101180895B1 (en) Clock frequency divider circuit
US5390192A (en) High-speed pattern generator
KR100862317B1 (en) Digital frequency multiplier and method of generating an output signal
KR100704349B1 (en) Apparatus for measuring intervals between signal edges
JP2750808B2 (en) Gaming machine random number generation structure
JPH10320180A (en) Pseudo-random number generating device
CN114115807A (en) Random number generator and random number generation method
JP2010002959A (en) Pseudo-random number generating device
JPH0542031B2 (en)
JP2004005223A (en) Random number generator and game machine with the same applied
JPH08181679A (en) Pseudo random number noise generator
EP0076843A1 (en) Automatic electronic musical instrument
JP2009259013A (en) Pseudorandom number generator
JPH10340183A (en) Random number generating circuit
US7502814B2 (en) Device and method for generating a pseudorandom sequence of numbers
CN116368463A (en) Random number generator and random number generation method
JP2005066127A (en) Random number generator for game machine
JP3536426B2 (en) Waveform generator
JPH1198007A (en) Frequency divider
JPH0651957A (en) Random numbers generator
JP4140156B2 (en) Address generating circuit, address generating device and address generating method
JP2002278749A (en) Random number generator
JP3592998B2 (en) Frequency multiplier
JPS601983B2 (en) Frequency divider circuit