JP2008242815A - Test circuit for random number generation circuit, and test method for random number generation circuit - Google Patents

Test circuit for random number generation circuit, and test method for random number generation circuit Download PDF

Info

Publication number
JP2008242815A
JP2008242815A JP2007082405A JP2007082405A JP2008242815A JP 2008242815 A JP2008242815 A JP 2008242815A JP 2007082405 A JP2007082405 A JP 2007082405A JP 2007082405 A JP2007082405 A JP 2007082405A JP 2008242815 A JP2008242815 A JP 2008242815A
Authority
JP
Japan
Prior art keywords
random number
number generation
circuit
generation circuit
operation time
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
JP2007082405A
Other languages
Japanese (ja)
Inventor
Noriko Inoue
典子 井上
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007082405A priority Critical patent/JP2008242815A/en
Publication of JP2008242815A publication Critical patent/JP2008242815A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a test circuit and test method for a random number generation circuit, capable of easily setting an operation time for generating random numbers which never cause collision to the random number generation circuit. <P>SOLUTION: A random number generation circuit 2 which shows a transitional response up to generation of random numbers is activated from an initial state by applying a random number generation activation signal 10 just after a reset signal 9 thereto to start random number generating operation, and fetches output data to a buffer memory 6 at a time after an end signal 15 set by an operation time setting signal 13. Two pieces of output data 16 fetched for a predetermined frequency are compared by a comparison circuit 7, and when even one matching set is present, the same operation is repeated by extending the operation time, whereby an operation time capable of generating sufficiently random numbers without collision is calculated. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、乱数発生回路から出力される出力データが乱数になっているか否かの評価に使用される乱数発生回路用テスト回路及び乱数発生回路用テスト方法に関する。   The present invention relates to a test circuit for a random number generation circuit and a test method for a random number generation circuit used for evaluating whether or not output data output from a random number generation circuit is a random number.

例えば、ネットワーク上の情報等の保護に関して、真性乱数又はこれに等価に近い擬似乱数が不可欠となりつつあり、その性質は、全くの不規則、平等な確率、前後が無関係、周期がないなどの特徴を有する。なお、真性乱数は、一般には物理現象を利用して生成されるものを指すが、本明細書においては、これに等価に近い擬似乱数の場合も含む意味で用いる。
例えばSoC(システム・オン・ア・チップ)装置に搭載される乱数発生回路にはリセット解除後に種情報としてのSeedを入力するものと、入力せずに自分で発生させるものがある。
前者の場合、同じSeedを入れるとリセット解除後の乱数出力が常に同じになるので、フラッシュメモリ等に値を格納しておき、リセット解除のたびに異なる値のSeedを読み出して使用する。
後者の場合、Seedを入力する手間は不要だが、攪拌回路(ランダム性の源となる回路)を使用する。この攪拌回路のため、リセット解除してからランダム性の高い出力を出すまでに一定の時間としての動作時間が必要な場合がある。
For example, for protection of information on the network, true random numbers or pseudo-random numbers close to equivalent are becoming indispensable, and their characteristics are completely irregular, equal probabilities, irrelevant before and after, and no periodicity. Have Note that the true random number generally indicates that generated by using a physical phenomenon, but in the present specification, it is used to include a pseudo-random number close to the equivalent.
For example, there are a random number generation circuit mounted on a SoC (system on a chip) device that inputs Seed as seed information after reset release and another that generates it by itself without inputting it.
In the former case, if the same Seed is inserted, the random number output after reset release is always the same, so a value is stored in a flash memory or the like, and a different value Seed is read and used each time reset is released.
In the latter case, there is no need to input Seed, but a stirring circuit (a circuit that is a source of randomness) is used. Because of this stirring circuit, there may be a case where an operation time as a certain period of time is required after releasing the reset until a highly random output is output.

後者のような攪拌回路を用いた場合、リセット解除後の乱数発生回路の起動において乱数発生回路の動作時間の設定が短いと、リセット解除後、数回の乱数出力が全く同じ値となる。こういう現象を衝突と呼ぶ。
乱数出力の衝突が起きない乱数発生回路の動作時間の設定は、ノイズ等の環境(レイアウト条件、プログラムのレジスタアクセス頻度)により影響されるため、乱数発生回路を搭載したSoC装置毎に実機評価をして決めている。
通常は、所定オーダーの衝突確率を考えて、1サンプルあたり1000回程度の測定が行われる。また、個体差も考慮すると、さらに数サンプル程度の測定が必要となる。
乱数発生回路の動作時間の設定を変化させながら、上記1000回×数サンプルの実機評価を行い、衝突が発生しない動作時間の設定或いは取得するために、測定者或いはユーザは、多くの手間を必要とすると共に、多くのリソースを消費する。
In the case of using the latter agitation circuit, if the setting of the operation time of the random number generation circuit is short in starting the random number generation circuit after reset release, the random number output several times after the reset release becomes exactly the same value. This phenomenon is called collision.
Since the setting of the operation time of the random number generation circuit that does not cause a collision of random number output is affected by the environment such as noise (layout conditions, register access frequency of the program), actual machine evaluation is performed for each SoC device equipped with the random number generation circuit. I have decided.
Normally, measurement is performed about 1000 times per sample in consideration of a predetermined order of collision probability. In addition, considering individual differences, it is necessary to measure several samples.
The operator or user needs a lot of time to perform the actual machine evaluation of the above 1000 times x several samples while changing the setting of the operation time of the random number generation circuit, and to set or obtain the operation time that does not cause a collision. And consumes many resources.

一方、特許文献1には、乱数を連続して発生させ、出現する値が同じものを数え、数えた値がある閾値より多かった場合には、発生した乱数がランダムでないと判定する装置が開示されている。
また、特許文献2には、特許文献1に類似して、チップ内に形成した装置が開示されている。この特許文献2には、乱数発生素子を組み込んだ半導体チップにおいて、乱数発生素子から発生した信号に基づく、任意のビット数の乱数を発生させ、所定の時間内に一定量のサンプルデータを取得し、各数値の乱数発生頻度等を調べて、閾値を超えるものを不良品と判定する装置が開示されている。
このように特許文献1及び特許文献2も、上述した乱数発生回路における衝突が発生しないような乱数を発生させるための動作時間の設定を簡単に行う手段及び方法を開示するものでない。
WO 2004/081786号公報 特開2003−196081号公報
On the other hand, Patent Document 1 discloses an apparatus that continuously generates random numbers, counts the same appearing values, and determines that the generated random numbers are not random when the counted values are larger than a certain threshold value. Has been.
Further, Patent Document 2 discloses a device formed in a chip, similar to Patent Document 1. In this patent document 2, a random number of bits is generated based on a signal generated from a random number generating element in a semiconductor chip incorporating the random number generating element, and a certain amount of sample data is acquired within a predetermined time. An apparatus is disclosed in which a random number generation frequency of each numerical value is examined and a product exceeding a threshold value is determined as a defective product.
Thus, Patent Document 1 and Patent Document 2 do not disclose means and a method for easily setting an operation time for generating a random number that does not cause a collision in the random number generation circuit described above.
WO 2004/081786 JP 2003-196081 A

本発明は上述した点に鑑みてなされたもので、乱数発生回路に対して衝突が発生しない乱数を発生させるための動作時間の設定を簡単に行うことができる乱数発生回路用テスト回路及び乱数発生回路用テスト方法を提供することを目的とする。   The present invention has been made in view of the above points, and a random number generation circuit test circuit capable of easily setting an operation time for generating a random number that does not cause a collision to the random number generation circuit, and a random number generation An object is to provide a test method for a circuit.

本発明の一実施形態に係る乱数発生回路用テスト回路は、過渡的な乱数発生特性を有する乱数発生回路に対して、初期状態から乱数を発生させる起動信号を所定の時間間隔で複数回、印加する起動信号印加手段と、各起動信号が印加された時間を基準時刻として、前記時間間隔より短く設定された動作時間後に前記乱数発生回路から出力される各出力データを、相互に比較し、一致する出力データが存在するか否かの判定を行う判定手段と、を備えたことを特徴とする。   A test circuit for a random number generation circuit according to an embodiment of the present invention applies a start signal for generating a random number from an initial state a plurality of times at a predetermined time interval to a random number generation circuit having a transient random number generation characteristic. The start signal applying means, and each output data output from the random number generation circuit after the operation time set shorter than the time interval are compared with each other with the time when each start signal is applied as a reference time, and they match. Determining means for determining whether there is output data to be output.

本発明の一実施形態に係る乱数発生回路用テスト方法は、過渡的な乱数発生特性を有する乱数発生回路に対して、初期状態から乱数を発生させるための起動信号を所定の時間間隔で複数回、印加する起動信号印加ステップと、各起動信号が印加された時間を基準時刻として、前記時間間隔よりも短く設定された動作時間後に前記乱数発生回路から出力される各出力データを、相互に比較し、一致する出力データが存在するか否かの判定を行う判定ステップと、を備えたことを特徴とする。   A test method for a random number generation circuit according to an embodiment of the present invention provides a random number generation circuit having a transient random number generation characteristic with a start signal for generating a random number from an initial state a plurality of times at predetermined time intervals. The start signal applying step to be applied and the output data output from the random number generation circuit after the operation time set shorter than the time interval are compared with each other with the time when each start signal is applied as a reference time. And a determination step for determining whether or not matching output data exists.

本発明によれば、乱数発生回路に対して衝突が発生しない乱数を発生させるための動作時間の設定を簡単に行うことができる。   According to the present invention, it is possible to easily set an operation time for generating a random number that does not cause a collision to the random number generation circuit.

以下、図面を参照して本発明の各実施形態を説明する。
(第1の実施形態)
図1は本発明の第1の実施形態に係る乱数発生回路用テスト回路(以下、テスト回路と略記)1の構成を示す。このテスト回路1は、乱数を発生する乱数発生回路2と接続して使用される。この乱数発生回路2は、過渡的な乱数発生特性を持つ。つまり、この乱数発生回路2は、初期状態から十分にランダムな擬似乱数(以下、単に乱数という)を発生するまでに必要となるある時間(以下、動作時間)を必要とする攪拌回路3を内蔵している。
そして、このテスト回路1は、乱数発生回路2と共に、SoC製品4に組み込まれ、このSoC製品4の初期評価や量産テスト時に、乱数発生回路2が真性乱数と見なすことができる乱数を発生するまでの上記の動作時間として推奨される値、つまり推奨値を出力する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(First embodiment)
FIG. 1 shows the configuration of a test circuit for random number generation circuit (hereinafter abbreviated as a test circuit) 1 according to a first embodiment of the present invention. The test circuit 1 is used in connection with a random number generation circuit 2 that generates random numbers. The random number generation circuit 2 has a transient random number generation characteristic. That is, the random number generation circuit 2 has a built-in stirring circuit 3 that requires a certain time (hereinafter referred to as operation time) required to generate a sufficiently random pseudo-random number (hereinafter simply referred to as a random number) from the initial state. is doing.
The test circuit 1 is incorporated in the SoC product 4 together with the random number generation circuit 2 until the random number generation circuit 2 generates a random number that can be regarded as a true random number during the initial evaluation or mass production test of the SoC product 4. The recommended value for the above operation time, that is, a recommended value is output.

このテスト回路1は、各種のタイミング信号を発生するタイミング発生回路5を有する。また、このテスト回路1は、タイミング信号が印加される乱数発生回路2から出力される(動作時間後には乱数となる)出力データを一時格納(記憶)するメモリ回路としてのバッファメモリ6と、このバッファメモリ6からの2つの出力データを相互に一致しているか否かを比較する比較回路7とを有する。
バッファメモリ6及び比較回路7は、乱数発生回路2が十分にランダムな乱数を発生しているか否かの判定を行う判定手段を形成している。
タイミング発生回路5は、図示しないクロック発振器によるクロックに同期して、各種のタイミング信号の発生の制御を行うCPU8を有する。そして、タイミング発生回路5で発生された各種のタイミング信号としてのリセット信号9や乱数発生起動信号10は乱数発生回路2に、所定の時間間隔で複数回印加される。
The test circuit 1 includes a timing generation circuit 5 that generates various timing signals. The test circuit 1 also includes a buffer memory 6 as a memory circuit that temporarily stores (stores) output data output from the random number generation circuit 2 to which a timing signal is applied (which becomes a random number after the operation time), The comparator circuit 7 compares the two output data from the buffer memory 6 with each other.
The buffer memory 6 and the comparison circuit 7 form determination means for determining whether or not the random number generation circuit 2 generates a sufficiently random random number.
The timing generation circuit 5 includes a CPU 8 that controls generation of various timing signals in synchronization with a clock by a clock oscillator (not shown). The reset signal 9 and the random number generation start signal 10 as various timing signals generated by the timing generation circuit 5 are applied to the random number generation circuit 2 a plurality of times at predetermined time intervals.

乱数発生回路2は、リセット信号9が印加されることにより、初期状態にリセットされ、リセット信号9直後に乱数発生起動信号10が印加されることにより、乱数発生回路2は、内部の攪拌回路3の攪拌動作をソフトウェア的に開始させる制御動作を行う。
このようにタイミング発生回路5は、過渡的な乱数発生特性を有する乱数発生回路2に対して初期状態から乱数を発生させる起動信号を所定の時間間隔で印加する起動信号印加手段を形成する。
上記攪拌回路3は、例えば図2に示す構成である。図2では、1ビット分の攪拌回路3の例で示しているが、実際には複数個の攪拌回路3により、複数ビットの乱数を発生する。
The random number generation circuit 2 is reset to an initial state when the reset signal 9 is applied, and the random number generation start signal 10 is applied immediately after the reset signal 9, so that the random number generation circuit 2 includes the internal stirring circuit 3. A control operation is started to start the stirring operation in software.
In this manner, the timing generation circuit 5 forms activation signal application means for applying an activation signal for generating random numbers from an initial state to the random number generation circuit 2 having a transient random number generation characteristic at predetermined time intervals.
The stirring circuit 3 has a configuration shown in FIG. 2, for example. In FIG. 2, an example of the agitation circuit 3 for 1 bit is shown, but actually, a plurality of random numbers are generated by the plurality of agitation circuits 3.

この攪拌回路3は、2入力のOR回路11と、このOR回路11からの出力と2つの制御データX1,X2とが入力される3入力の排他的OR回路(XOR回路と略記)12とから構成され、XOR回路12の出力UはモードデータYが入力されるOR回路11に入力される。なお、この3入力のXOR回路12は、2入力のXORを調べ、その出力と残りの1つの入力間で、さらにXORの演算を行うものである。
また、モードデータYと制御データX1,X2のデジタル値(2値)は、乱数発生回路2内の図示しない制御手段により制御される。モードデータYは、Y=0とした場合が攪拌動作に関係する攪拌用モードで、Y=1とした場合が攪拌動作には関係しない他のモードに用いられる。なお、Y=1の他のモードの時には、X1=X2の時には、出力U=1、X1≠X2の時には出力U=0となる。
The stirring circuit 3 includes a two-input OR circuit 11 and a three-input exclusive OR circuit (abbreviated as XOR circuit) 12 to which an output from the OR circuit 11 and two control data X1 and X2 are input. The output U of the XOR circuit 12 is input to an OR circuit 11 to which mode data Y is input. The three-input XOR circuit 12 examines the two-input XOR, and further performs an XOR operation between the output and the remaining one input.
The digital values (binary values) of the mode data Y and the control data X1 and X2 are controlled by a control means (not shown) in the random number generation circuit 2. The mode data Y is used for the stirring mode related to the stirring operation when Y = 0, and to other modes not related to the stirring operation when Y = 1. In the other mode of Y = 1, the output U = 1 when X1 = X2, and the output U = 0 when X1 ≠ X2.

Y=0の攪拌用モードにおいては、攪拌動作を禁止する場合には、制御データX1,X2をX1=X2とする。この場合には、攪拌回路3の出力Uは、U=0或いは1の確定値となる。
これに対して、攪拌動作を開始させる場合には、制御データX1,X2をX1≠X2とする。この場合には、この攪拌回路3は、非常に高い周波数で発振する。
この非常に高い周波数での発振状態は、始動時においては攪拌機能に関して不安定な過渡応答特性を示すが、始動時から適度な時間、つまり動作時間の経過後には安定した攪拌動作状態となる。この安定した攪拌動作状態においては、出力Uがノイズ等によってランダムに変化する。そして、この攪拌回路3の出力Uは、乱数発生回路2の1ビット分の乱数発生用の出力データとして利用される。
In the stirring mode with Y = 0, the control data X1 and X2 are set to X1 = X2 when the stirring operation is prohibited. In this case, the output U of the stirring circuit 3 becomes a definite value of U = 0 or 1.
On the other hand, when the stirring operation is started, the control data X1 and X2 are set to X1 ≠ X2. In this case, the stirring circuit 3 oscillates at a very high frequency.
This oscillation state at a very high frequency shows an unstable transient response characteristic with respect to the stirring function at the time of starting, but becomes a stable stirring operation state after an appropriate time from the starting time, that is, after the operating time has elapsed. In this stable stirring operation state, the output U changes randomly due to noise or the like. The output U of the agitation circuit 3 is used as output data for random number generation for one bit of the random number generation circuit 2.

本実施形態においては、攪拌回路3を乱数発生起動信号10により起動させ、その乱数発生起動時間から動作時間後のタイミング(の後述する乱数発生終了信号15)で乱数であるか否かを評価する出力データとしてを取り込むと共に、その乱数発生の動作を停止(終了)させる。
リセット信号9と乱数発生起動信号10は、CPU8の制御下で、例えば図3に示すように複数の測定回数M、具体的には例えばM=1000、繰り返し発生される。
上記のようにリセット信号9により、乱数発生回路2は初期状態に設定され、乱数発生起動信号10が印加されることにより攪拌回路3の攪拌動作が開始する。なお、タイミング発生回路5は、リセット信号9と、その直後の乱数発生起動信号10を1組の信号として、乱数発生回路2に印加するようにしても良い。
In the present embodiment, the agitation circuit 3 is activated by the random number generation activation signal 10, and it is evaluated whether or not it is a random number at a timing after the operation time from the random number generation activation time (random number generation end signal 15 described later). The output data is taken in, and the random number generation operation is stopped (terminated).
The reset signal 9 and the random number generation start signal 10 are repeatedly generated under the control of the CPU 8, for example, as shown in FIG.
As described above, the reset signal 9 sets the random number generation circuit 2 to an initial state, and the stirring operation of the stirring circuit 3 starts when the random number generation start signal 10 is applied. The timing generation circuit 5 may apply the reset signal 9 and the random number generation start signal 10 immediately after the reset signal 9 to the random number generation circuit 2 as a set of signals.

また、図3に示すようにCPU8は、乱数発生回路2の乱数発生の動作時間を設定する乱数発生回路動作時間設定信号(以下、単に動作時間設定信号と略記)13を乱数発生回路2に出力する。
図3に示すように乱数発生回路2は、乱数発生起動信号10がアクティブになってから、動作時間設定信号13により設定された動作時間後に、乱数発生の動作を終了する乱数発生終了信号(以下、単に終了信号と略記)15を出力する。
なお、図3では、乱数発生起動信号10がLからHでアクティブになり、このタイミングから終了信号15がLからHになるまでの時間間隔が動作時間として設定されているが、この定義に限定されるものでない。
この終了信号15は、乱数発生回路2から出力される出力データ16と共に、バッファメモリ6に出力される。
As shown in FIG. 3, the CPU 8 outputs a random number generation circuit operation time setting signal (hereinafter simply abbreviated as an operation time setting signal) 13 for setting a random number generation operation time of the random number generation circuit 2 to the random number generation circuit 2. To do.
As shown in FIG. 3, the random number generation circuit 2 includes a random number generation end signal (hereinafter referred to as a random number generation end signal) that terminates the random number generation operation after the operation time set by the operation time setting signal 13 after the random number generation start signal 10 becomes active. , Simply abbreviated as end signal) 15.
In FIG. 3, the random number generation start signal 10 becomes active from L to H, and the time interval from this timing until the end signal 15 changes from L to H is set as the operation time. It is not what is done.
This end signal 15 is output to the buffer memory 6 together with the output data 16 output from the random number generation circuit 2.

バッファメモリ6は、乱数発生回路2から出力される出力データ16を終了信号15が例えばがアクティブになったタイミング(例えば図3に示す終了信号15のパルスの立ち下がりエッジのタイミング)で、出力データ16を取り込み、このバッファメモリ6内に一時格納する。
なお、この終了信号15により、攪拌回路3の動作が停止する。そして、この終了信号15のタイミングで出力データ16がバッファメモリ6内に一時格納された直後に、タイミング発生回路5から次のリセット信号9が出力される。そして、同様の動作が繰り返される。
つまり、図3におけるリセット信号9から次のリセット信号との間で、乱数発生起動信号10が印加されることにより乱数発生回路2はそれぞれ初期状態から起動し、同じ動作時間の経過後に、最初に乱数発生回路2から出力される出力データ16がバッファメモリ6に順次格納される動作が繰り返されることになる。但し、後述するように一致する出力データ16が得られてしまう場合には、動作時間が長くなるように変更される。
The buffer memory 6 outputs the output data 16 output from the random number generation circuit 2 at the timing when the end signal 15 becomes active (for example, the timing of the falling edge of the pulse of the end signal 15 shown in FIG. 3). 16 is fetched and temporarily stored in the buffer memory 6.
The operation of the stirring circuit 3 is stopped by the end signal 15. Immediately after the output data 16 is temporarily stored in the buffer memory 6 at the timing of the end signal 15, the next reset signal 9 is output from the timing generation circuit 5. Then, the same operation is repeated.
That is, when the random number generation start signal 10 is applied between the reset signal 9 and the next reset signal in FIG. 3, the random number generation circuit 2 starts from the initial state, and after the same operation time has elapsed, The operation of sequentially storing the output data 16 output from the random number generation circuit 2 in the buffer memory 6 is repeated. However, when matching output data 16 is obtained as described later, the operation time is changed to be longer.

バッファメモリ6は、このバッファメモリ6内に複数の出力データ16を格納すると、その内の2つの出力データを比較回路7に出力する。各出力データは、所定ビット数以上の複数ビットからなるデータである。
例えば、バッファメモリ6から出力される2つの出力データを6a、6bとした場合、比較回路7は2つの出力データ6a、6bを各ビット単位で比較し、完全に一致するか否かの判定を行い、判定結果の判定信号17を出力する。
比較回路7により、出力データ16全ての組み合わせで比較が行われる。例えば測定回数M=1000の場合、1000×999通りの比較が行われる。
比較回路7の判定信号17は、例えばタイミング発生回路5(のCPU8)に出力される。CPU8は、1度でも、一致した場合の判定信号17が入力されると、動作時間設定信号13の値(つまり動作時間)を長くして、乱数発生回路2に出力する。
When the buffer memory 6 stores a plurality of output data 16 in the buffer memory 6, the buffer memory 6 outputs two of the output data 16 to the comparison circuit 7. Each output data is data composed of a plurality of bits of a predetermined number of bits or more.
For example, when the two output data output from the buffer memory 6 are 6a and 6b, the comparison circuit 7 compares the two output data 6a and 6b in units of bits, and determines whether or not they completely match. The determination signal 17 of the determination result is output.
The comparison circuit 7 compares the output data 16 with all combinations. For example, when the number of times of measurement M = 1000, 1000 × 999 comparisons are performed.
The determination signal 17 of the comparison circuit 7 is output to, for example, the timing generation circuit 5 (the CPU 8). The CPU 8 increases the value of the operation time setting signal 13 (that is, the operation time) and outputs it to the random number generation circuit 2 when the determination signal 17 in the case of coincidence is input even once.

そして、長くした動作時間設定信号13により、乱数発生回路2は最初から出力データ16を出力する動作を行う。
これに対して、比較結果が全ての組み合わせにおいて、一致しないと判定された場合には、その場合の動作時間設定信号13による動作時間がSoC製品4から出力される。そして、その動作時間が推奨値として乱数発生に使用することができる。
実際にユーザが使用するときには、例えばソフトウエア(より具体的には、動作時間のレジスタライトの処理)により、この推奨値の動作時間を動作時間設定信号13として使用することができる。
Then, the random number generation circuit 2 performs an operation of outputting the output data 16 from the beginning by the extended operation time setting signal 13.
On the other hand, when it is determined that the comparison results do not match in all combinations, the operation time based on the operation time setting signal 13 in that case is output from the SoC product 4. The operation time can be used as a recommended value for random number generation.
When actually used by the user, the operation time of the recommended value can be used as the operation time setting signal 13 by software (more specifically, operation time register write processing), for example.

また、最初に動作時間設定信号13による動作時間の初期値を設定する場合、動作時間設定入力手段としての例えばキーボード18からの入力により、行うことができる。また、ユーザは、このキーボード18から測定回数Mの値の設定や変更の入力を行うこともできる。
図4は、本実施形態に係るテスト回路1による乱数発生の動作時間の推奨値を得る(評価する)ためのテスト方法のフローチャートを示す。以下、図4を参照して本実施形態の動作を説明する。
Moreover, when setting the initial value of the operation time by the operation time setting signal 13 for the first time, it can be performed by input from, for example, the keyboard 18 as the operation time setting input means. In addition, the user can also set or change the value of the number of times of measurement M from the keyboard 18.
FIG. 4 shows a flowchart of a test method for obtaining (evaluating) a recommended value of the operation time of random number generation by the test circuit 1 according to the present embodiment. The operation of this embodiment will be described below with reference to FIG.

図1のSoC製品4の電源が投入されることにより、タイミング発生回路5のCPU8は、出力データ16を得る測定回数M(ここでは例えばM=1000)の設定を行うと共に、その測定回数用のパラメータiを初期値i=1にセットする。この測定回数Mは、例えば最初にユーザが設定することにより、以後はその値がデフォルト値として使用される。 次のステップS2においてCPU8は、図3に示すように乱数発生回路2に対して、例えばHからLになるパルス状のリセット信号9を出力して、リセット機能をアクティブにする。そして、このパルス状のリセット信号9により、乱数発生回路2は、初期状態にリセットされる。
次のステップS3においてCPU8は、図3に示すように乱数発生回路2に対して、リセット信号9の直後に、例えばパルス状の乱数発生起動信号10を出力する。この乱数発生起動信号10が例えばLからHになると、乱数発生回路2は乱数発生の機能がアクティブになる。
When the power of the SoC product 4 in FIG. 1 is turned on, the CPU 8 of the timing generation circuit 5 sets the number of times of measurement M (for example, M = 1000 here) to obtain the output data 16, and for the number of times of measurement. The parameter i is set to an initial value i = 1. For example, the number of times of measurement M is initially set by the user, and thereafter, the value is used as a default value. In the next step S2, the CPU 8 outputs, for example, a pulsed reset signal 9 that changes from H to L to the random number generation circuit 2 as shown in FIG. 3 to activate the reset function. The random number generation circuit 2 is reset to an initial state by the pulse-like reset signal 9.
In the next step S3, the CPU 8 outputs, for example, a pulse-like random number generation start signal 10 immediately after the reset signal 9 to the random number generation circuit 2 as shown in FIG. For example, when the random number generation activation signal 10 changes from L to H, the random number generation circuit 2 becomes active in the random number generation function.

そして、ステップS4に示すように乱数発生回路2は、乱数発生の動作が起動し、乱数発生の動作を開始する。そして、この乱数発生回路2は、発生した出力データ16をバッファメモリ6に出力し始める。なお、CPU8は、動作時間設定信号13も乱数発生回路2に出力する。
そして、次のステップS5において、バッファメモリ6は、乱数発生回路2から、終了信号15が入力される(若しくはアクティブになる)のを待つ。
換言すると、乱数発生回路2は、動作時間設定信号13による動作時間後に終了信号15を発生し、この終了信号15を発生するまでの間、乱数発生の動作を継続する。終了信号15がアクティブになると、そのタイミングで乱数の値が固定し、乱数発生の動作を停止(終了)する。
Then, as shown in step S4, the random number generation circuit 2 starts the random number generation operation and starts the random number generation operation. Then, the random number generation circuit 2 starts to output the generated output data 16 to the buffer memory 6. The CPU 8 also outputs an operation time setting signal 13 to the random number generation circuit 2.
In the next step S5, the buffer memory 6 waits for the end signal 15 to be input (or activated) from the random number generation circuit 2.
In other words, the random number generation circuit 2 generates the end signal 15 after the operation time according to the operation time setting signal 13 and continues the operation of random number generation until the end signal 15 is generated. When the end signal 15 becomes active, the value of the random number is fixed at that timing, and the operation of random number generation is stopped (terminated).

そして、ステップS6に示すように乱数発生回路2から、終了信号15がアクティブになると、バッファメモリ6は、図3に示すように終了信号15のパルスの例えば立ち上がりでバッファメモリ6のメモリセルにチップイネーブル信号を印加する。
そして、その終了信号15のタイミングで出力データ16がバッファメモリ6のメモリセルに格納される。
そして、図3に示すように、その直後(但し、動作時間は可変設定できるようになっているため、この可変幅のマージンを含む直後)に次のリセット信号9が乱数発生回路2に出力され、上述した同様の動作が繰り返される。
そして、バッファメモリ6に複数の出力データ16が格納される。すると、図4のステップS7に示すようにバッファメモリ6から2つの出力データ6a、6bの組が比較回路7に入力される。なお、図4のステップS6からS7への移行処理は、簡略的なもの(少なくとも複数の出力データ16が得られた場合に、ステップS6からS7に移行する)となっている。
Then, when the end signal 15 becomes active from the random number generation circuit 2 as shown in step S6, the buffer memory 6 chips the memory cell of the buffer memory 6 at the rising edge of the pulse of the end signal 15 as shown in FIG. Apply an enable signal.
The output data 16 is stored in the memory cell of the buffer memory 6 at the timing of the end signal 15.
Then, as shown in FIG. 3, the next reset signal 9 is output to the random number generation circuit 2 immediately thereafter (however, since the operation time can be variably set, immediately after including the variable width margin). The same operation as described above is repeated.
A plurality of output data 16 are stored in the buffer memory 6. Then, a set of two output data 6a and 6b is input from the buffer memory 6 to the comparison circuit 7 as shown in step S7 of FIG. Note that the process of transition from step S6 to S7 in FIG. 4 is simplified (at least when a plurality of output data 16 is obtained, the process proceeds from step S6 to S7).

ステップS8に示すように比較回路7は、バッファメモリ6から入力される2つの出力データ6a、6bの組が一致しているか否かの判定を行う。その判定結果の判定信号17は、タイミング発生回路5に出力される。
そして、一致している場合には、タイミング発生回路5のCPU8は、ステップS9に示すように動作時間設定信号13の動作時間の値を長くして、ステップS1に戻る。従って、この場合には、最初に設定された動作時間よりも長い(大きな)値に設定された動作時間設定信号13により、ステップS1から繰り返し同じ動作を行うようになる。
一方、ステップS8において一致していない場合には、ステップS10に進む。このステップS10においてCPU8は、測定回数用のパラメータiがM未満かの判定を行う。そして、M未満の場合には、ステップS11に示すようにパラメータiを1つ大きくしてステップS2に戻る。
As shown in step S8, the comparison circuit 7 determines whether or not the pair of the two output data 6a and 6b input from the buffer memory 6 matches. The determination signal 17 of the determination result is output to the timing generation circuit 5.
If they match, the CPU 8 of the timing generation circuit 5 increases the operation time value of the operation time setting signal 13 as shown in step S9, and returns to step S1. Accordingly, in this case, the same operation is repeatedly performed from step S1 by the operation time setting signal 13 set to a value longer (larger) than the operation time initially set.
On the other hand, if they do not match in step S8, the process proceeds to step S10. In step S10, the CPU 8 determines whether the parameter i for the number of measurements is less than M. If it is less than M, the parameter i is increased by one as shown in step S11, and the process returns to step S2.

なお、図4のステップS7及びS8は簡略的な動作内容を示している。上述したように比較回路7は、バッファメモリ6に格納された出力データ16における2つの出力データ6a、6bの組全ての組み合わせに対して一致しているか否かの判定を行う。
そして、全ての組み合わせで一致していないと判定した場合には、ステップS10のi=Mを経てステップS12に進む。そして、この場合の動作時間設定信号13がタイミング発生回路5から出力され、この動作時間設定信号13による動作時間の推奨値を設定する評価或いはテストが完了する。
このように本実施形態は、自動的に所定の測定回数Mに対して乱数発生回路2から出力される出力データが1度も同じ出力データとならない、つまり衝突が発生しない条件に適合する十分にランダムな乱数を発生させることができる動作時間の推奨値を自動的に算出する。
つまり、本実施形態は、上記のような動作時間の推奨値を自動的に算出して、その推奨値の動作時間を設定することを行う。
Note that steps S7 and S8 in FIG. 4 show simple operation contents. As described above, the comparison circuit 7 determines whether or not all combinations of the two output data 6a and 6b in the output data 16 stored in the buffer memory 6 match.
If it is determined that all combinations do not match, the process proceeds to step S12 via i = M in step S10. Then, the operation time setting signal 13 in this case is output from the timing generation circuit 5, and the evaluation or test for setting the recommended value of the operation time by the operation time setting signal 13 is completed.
As described above, the present embodiment automatically satisfies the condition that the output data output from the random number generation circuit 2 is not the same output data for the predetermined number of times of measurement M, that is, no collision occurs. Automatically calculates the recommended operating time that can generate random numbers.
That is, in this embodiment, the recommended value of the operation time as described above is automatically calculated, and the operation time of the recommended value is set.

このため、ユーザによる従来例では手間を要していた動作時間の算出設定作業を大幅に低減できる。
なお、図1の構成においては判定信号17をタイミング発生回路5に入力して判定信号17の判定結果により、動作時間の変更制御を行う構成にしている。これに対して、判定信号17をタイミング発生回路5に入力しないで、所定回数Mの場合に対して、比較回路7による判定信号17を得る構成とした場合においても、従来例に比べて簡単に動作時間の推奨値を得たり、評価することができるメリットがある。
For this reason, it is possible to greatly reduce the operation time calculation and setting work that has been troublesome in the conventional example by the user.
In the configuration of FIG. 1, the determination signal 17 is input to the timing generation circuit 5, and the operation time change control is performed based on the determination result of the determination signal 17. On the other hand, even in a case where the determination signal 17 is not input to the timing generation circuit 5 and the determination signal 17 is obtained by the comparison circuit 7 with respect to the case of the predetermined number M, it is easier than the conventional example. There is an advantage that the recommended value of the operating time can be obtained and evaluated.

(第2の実施形態)
次に本発明の第2の実施形態に係るテスト回路を説明する。このテスト回路は、図1に示したテスト回路1と同じ構成である。但し、タイミング発生回路5のCPU8による動作が、第1の実施形態と若干、異なる。
第1の実施形態においては、例えば最初に動作時間設定信号13として、乱数発生回路2に対して、適切な値の動作時間よりも長い動作時間を設定した場合には、その動作時間が最終的に設定或いは得られる動作時間となる。
これに対して、本実施形態においては動作時間を変更する処理を少なくとも1回は行うことにより、より適切な動作時間に近い境界値を推奨値として算出若しくは設定する手段若しくは方法を備える。
(Second Embodiment)
Next, a test circuit according to a second embodiment of the present invention will be described. This test circuit has the same configuration as the test circuit 1 shown in FIG. However, the operation of the timing generation circuit 5 by the CPU 8 is slightly different from that of the first embodiment.
In the first embodiment, for example, when an operation time longer than an appropriate operation time is set for the random number generation circuit 2 as the operation time setting signal 13 first, the operation time is final. The operation time is set or obtained.
On the other hand, this embodiment includes means or a method for calculating or setting a boundary value closer to a more appropriate operation time as a recommended value by performing the process of changing the operation time at least once.

そして、CPU8は、上記の動作時間を変更する処理を少なくとも1回は行うことにより、動作時間としてより適切な値に近い境界値を算出する。
図5は、本実施形態による動作の概略の一部を示すフローチャートである。図5は、図4と類似しており、図4と同じ処理部分を省略している。
本実施形態は、図4のステップS10とS12との間にステップS21を行う構成或いは方法となる。このステップS21においてCPU8は、(ステップS1から)このステップS21に至るまでに動作時間設定信号13を長く設定する変更を行ったか否かの判定を行う。具体的には、図4の処理において、ステップS9による動作時間設定信号13を長く設定する変更を行ったことが有るかの判定する。
そして、この変更が行われている場合には、ステップS12に進み、その変更により、最終的に変更された動作時間設定信号13を境界値の動作時間とする。
Then, the CPU 8 calculates a boundary value closer to a more appropriate value as the operation time by performing the process of changing the operation time at least once.
FIG. 5 is a flowchart showing a part of the outline of the operation according to the present embodiment. FIG. 5 is similar to FIG. 4 and omits the same processing parts as FIG.
The present embodiment is a configuration or method in which step S21 is performed between steps S10 and S12 in FIG. In this step S21, the CPU 8 determines (from step S1) whether or not the operation time setting signal 13 has been changed to be set longer before reaching this step S21. Specifically, in the process of FIG. 4, it is determined whether or not the operation time setting signal 13 in step S9 has been changed to be set longer.
If this change has been made, the process proceeds to step S12, and the operation time setting signal 13 finally changed by the change is set as the operation time of the boundary value.

従って、ステップS21の判定において、動作時間設定信号13を長く設定する変更有り、具体的には、図4の処理において、ステップS9による動作時間設定信号13を長く設定する変更を行ったことが有る場合には、図4の場合の同様の動作時間を得る。
この場合の動作時間は、この値よりも短くすると一致する出力データの組が出現するため、適切な動作時間の値に近い境界値である。
一方、ステップS21の判定において、動作時間設定信号13を長く設定する変更が一度も行われていないと判定した場合には、ステップS22に示すようにCPU8は、動作時間設定信号13を短く設定する変更を行い、図4のステップS1に戻る。そして、ステップS1から図5の変更部分を除けば図4に示した処理を行うようになる。
Therefore, in the determination in step S21, there is a change that sets the operation time setting signal 13 to be long. Specifically, in the processing of FIG. 4, there is a change that sets the operation time setting signal 13 in step S9 to be long. In the case, the same operation time as in FIG. 4 is obtained.
If the operating time in this case is shorter than this value, a matching output data set appears, so that the operating time is a boundary value close to an appropriate operating time value.
On the other hand, if it is determined in step S21 that the setting for setting the operation time setting signal 13 to be longer has not been made, the CPU 8 sets the operation time setting signal 13 to be shorter as shown in step S22. The change is made and the process returns to step S1 in FIG. Then, the processing shown in FIG. 4 is performed except for the changed portion of FIG. 5 from step S1.

この場合、図5に示すようにステップS8において一致する組が現れるまで、動作時間設定信号13を順次短く設定する変更を行う。
このようにして、ステップS8の一致する組が存在するか否かの判定を行い、一致する組が存在した場合には、ステップS23に示すようにCPU8は、その一致する組が存在する直前に設定した動作時間設定信号13を境界値の動作時間としてCPU8のレジスタ等に記憶する。そして、記憶した処理の後、ステップS12に移り、その場合の動作時間設定信号13を出力する。この動作時間も、この値より短くすると、一致する組が存在するため、適切な動作時間の値に近い境界値となる。
ステップS21の判定において、動作時間設定信号13を長く設定する変更が一度も行われていないと判定した場合には、図5に示すようにステップS22を経てステップS1に戻り、さらにステップS8において一致する出力データの組が有りとなるまで図5の処理を繰り返えす。そして、一致する出力データの組が有りとなる前の動作時間を境界値として得る。
In this case, as shown in FIG. 5, the operation time setting signal 13 is changed to be sequentially shortened until a matching set appears in step S8.
In this way, it is determined whether or not there is a matching set in step S8. If there is a matching set, the CPU 8 immediately before the matching set exists as shown in step S23. The set operation time setting signal 13 is stored in a register or the like of the CPU 8 as the operation time of the boundary value. Then, after the stored processing, the process proceeds to step S12, and the operation time setting signal 13 in that case is output. If this operation time is also shorter than this value, there is a matching set, and therefore the boundary value is close to the appropriate operation time value.
If it is determined in step S21 that no change has been made to set the operating time setting signal 13 longer, the process returns to step S1 through step S22 as shown in FIG. 5, and further matches in step S8. The process of FIG. 5 is repeated until there is a set of output data to be processed. Then, the operation time before the coincident output data set exists is obtained as the boundary value.

このようにして、本実施形態により得られる動作時間の境界値は、この境界値よりも短くした場合には衝突が発生する。
このため、本実施の形態によれば、第1の実施形態と同様の効果を有すると共に、さらにより適正な値に近い動作時間、換言するとより精度の高い動作時間を得ることができる。また、消費電力をより低減して乱数発生の動作を行えるようにできる。
また、ユーザがソフトウェアなどで乱数発生動作時間の初期値を任意の値に設定しても、自動的に動作時間として適切な値に近い境界値を得ることができ、ユーザによる動作時間を評価する手間を大幅に軽減することができる。
Thus, when the boundary value of the operation time obtained by this embodiment is shorter than this boundary value, a collision occurs.
For this reason, according to the present embodiment, the same effect as that of the first embodiment can be obtained, and an operation time closer to a more appropriate value, in other words, a more accurate operation time can be obtained. In addition, the power consumption can be further reduced and random number generation can be performed.
Moreover, even if the user sets the initial value of the random number generation operation time to an arbitrary value by software or the like, a boundary value close to an appropriate value can be automatically obtained as the operation time, and the operation time by the user is evaluated. Time and effort can be greatly reduced.

なお、この場合に得られる動作時間の境界値をそのまま使用した場合には、マージンを含めた場合の動作時間よりも消費電力を低減できる。
なお、さらにユーザは、例えばキーボード18から動作時間設定信号13による動作時間を長くしたり、短くしたりする場合の値を必要に応じて、自由に設定しても良い。
また、最初は、この値を大きくして、境界値の概略値を算出し、その後により小さな値で動作時間を変更して、より精度の高い境界値を得るようにしても良い。
Note that if the boundary value of the operation time obtained in this case is used as it is, the power consumption can be reduced as compared with the operation time when the margin is included.
Further, the user may freely set a value for increasing or decreasing the operation time by the operation time setting signal 13 from the keyboard 18 as necessary.
Alternatively, initially, this value may be increased to calculate an approximate value of the boundary value, and then the operation time may be changed with a smaller value to obtain a more accurate boundary value.

(第3の実施形態)
次に本発明の第3の実施形態を説明する。上述した実施形態においては、乱数発生回路2-で発生する出力データ16のビット数や、バッファメモリ6で格納するビット数に関しては特に明確にしていなかったが、例えば24ビットの数倍以上としている。
そして、バッファメモリ6は乱数発生回路2-で発生する出力データ16における全てのビット数を取り込むようにしている。
これに対して、本実施形態は、乱数発生回路2の出力データ16のビット数nが、n>k(例えばk=24)である場合、バッファメモリ6が格納するビット数や、比較回路7が比較するビット数をnビットよりも小さい値にすることができるようにしている。或いは、乱数発生回路2で出力する出力データ16のビット数を小さくする場合にも対応可能とするものである。
(Third embodiment)
Next, a third embodiment of the present invention will be described. In the above-described embodiment, the number of bits of the output data 16 generated by the random number generation circuit 2− and the number of bits stored in the buffer memory 6 are not particularly clarified. .
The buffer memory 6 takes in all the numbers of bits in the output data 16 generated by the random number generation circuit 2-.
On the other hand, in the present embodiment, when the bit number n of the output data 16 of the random number generation circuit 2 is n> k (for example, k = 24), the number of bits stored in the buffer memory 6 or the comparison circuit 7 The number of bits to be compared can be made smaller than n bits. Alternatively, it is possible to cope with a case where the number of bits of the output data 16 output from the random number generation circuit 2 is reduced.

ビット数が大きい場合には、乱数発生回路2が真性乱数に近い乱数を発生する状態において、例えば1000回程度の測定回数において乱数が衝突する衝突確率は十分に小さくなるため、実質的には衝突確率を無視する(つまり0とみなす)ことができる。これに対して、ビット数を小さくする場合、或いは小さい場合には、この衝突確率を考慮する必要がある。
このため、乱数の衝突確率について、計算で求める方法を次に示す。
nビットのランダムデータがある場合、そのデータの異なる組み合わせ総数は、2個となる。このため、それらの出現確率が一様である場合には、m回の乱数取得の間に一つでも同一のデータが現れる確率Pは、1の値から同一のデータが現れない確率を引けばよいので、
P=1−((2-1)/2)×((2-2/2)×……×((2−(m−1))/2) (1)
と計算される。
When the number of bits is large, in the state in which the random number generation circuit 2 generates a random number close to a true random number, the collision probability that the random number collides becomes small enough, for example, in the number of measurements of about 1000 times. Probability can be ignored (ie considered 0). On the other hand, when the number of bits is small or small, it is necessary to consider this collision probability.
Therefore, a method for calculating the random number collision probability by calculation will be described below.
When there are n bits of random data, the total number of different combinations of the data is 2 n . For this reason, when the appearance probabilities are uniform, the probability P that at least one identical data appears during m random number acquisitions is subtracted from the value 1 that the same data does not appear. So good
P = 1 − ((2 n− 1) / 2 n ) × ((2 n −2/2 n ) × …… × ((2 n − (m−1)) / 2 n ) (1)
Is calculated.

例えば、n=k(=24)とした24ビットのランダムデータでm=1000回の乱数取得の間に一つでも同一のデータが現れる確率を計算すると、(1)式は2.9334%となる。
この場合には、乱数発生回路2がnビットの真性乱数と等価な乱数を出力しているにもかかわらず、抜き出した24ビットが一致して、NGの判定信号17が出力される確率が2.9334%ということ(大きな衝突確率)になる。
このため、上記の条件のデータを例えば2組分得るようにして、2組分に対して同一のデータが連続して現れる確率は、0.029334の二乗で、十分に低い確率となる。つまり、ビット数が小さい場合でも、2回とも連続して一致するか否かを判定することにより、大きなビット数の場合において1回一致する組が有るかか否かを判定する場合の判定結果と実質的に同じような結果を得ることができる。
For example, when calculating the probability that even if m = 1000 random numbers are acquired with 24 bits of random data with n = k (= 24), the probability that the same data appears will be 2.9334%.
In this case, although the random number generation circuit 2 outputs a random number equivalent to an n-bit true random number, the probability that the extracted 24 bits match and an NG determination signal 17 is output is 2.9334. % (Large collision probability).
For this reason, for example, two sets of data with the above conditions are obtained, and the probability that the same data continuously appears for the two sets is a square of 0.029334, which is a sufficiently low probability. That is, even when the number of bits is small, the determination result when determining whether or not there is a pair that matches once in the case of a large number of bits by determining whether or not they match twice continuously. And substantially the same result can be obtained.

このため、例えば第1の実施形態で使用した図3のタイミング図において、動作時間設定信号13で設定された動作時間付近で、乱数発生回路2からの出力データ16を(その出力が異なる乱数として)2回取り込むように変更する。この場合、取り込む出力データ16のビット数は、例えば24ビットである。
具体的には、第1の実施形態における動作時間からさらに異なる乱数発生が可能となる例えば1クロック分後に、終了信号15が出力されるようにして、動作時間のタイミングと次の1クロック後とで2つの出力データをバッファメモリ6に格納するようにする。
そして、動作時間のタイミングで得た出力データそれぞれで比較回路7で第1の実施形態と同様に比較すると共に、次の1クロック後で取り込んだ出力データに対しても同様の比較を行う。比較回路7は、2組とも一致したか否かの判定信号17を出力する構成にする。
Therefore, for example, in the timing diagram of FIG. 3 used in the first embodiment, the output data 16 from the random number generation circuit 2 (with its output as a different random number) around the operation time set by the operation time setting signal 13. ) Change to capture twice. In this case, the number of bits of the output data 16 to be captured is 24 bits, for example.
Specifically, the end signal 15 is output, for example, one clock after the operation time in the first embodiment, in which further random number generation becomes possible, and the timing of the operation time and after the next one clock. Thus, the two output data are stored in the buffer memory 6.
Then, each output data obtained at the timing of the operation time is compared by the comparison circuit 7 in the same manner as in the first embodiment, and the same comparison is also performed for the output data fetched after the next one clock. The comparison circuit 7 is configured to output a determination signal 17 as to whether or not both sets match.

そして、比較回路7が一致した判定信号17を出力した場合には動作時間を長くする。一方、一致した判定信号17が出力されない動作時間を推奨値として得る。なお、一致した判定信号17が出力されない場合には、さらに動作時間を短くして、第2の実施形態のように動作時間の境界値を得るようにしても良い。
従って、本実施形態によれば、バッファメモリ6のメモリ容量を低減したり、比較回路7による比較処理の負担を低減することができる。また、乱数発生回路2による乱数発生のビット数を小さくすることもできる。このため、図1で示したテスト回路1や乱数発生回路2等の回路規模を低減でき、かつ低コスト化することができる。
また、乱数発生回路2が24ビットよりもさらに小さいビット数で乱数を発生する場合には、要求される衝突確率を実質的に満たすように例えば3組の出力データを取り込み、3回連続して一致した場合に判定信号を発生させるように変更することもできる。このように本実施形態は、要求される衝突確率に応じて比較等を行うビット数を低減することができる。
When the comparison circuit 7 outputs the coincidence determination signal 17, the operation time is lengthened. On the other hand, an operation time during which no coincident determination signal 17 is output is obtained as a recommended value. When the coincidence determination signal 17 is not output, the operation time may be further shortened to obtain the boundary value of the operation time as in the second embodiment.
Therefore, according to the present embodiment, the memory capacity of the buffer memory 6 can be reduced, and the burden of comparison processing by the comparison circuit 7 can be reduced. In addition, the number of bits for random number generation by the random number generation circuit 2 can be reduced. Therefore, the circuit scale of the test circuit 1 and the random number generation circuit 2 shown in FIG. 1 can be reduced and the cost can be reduced.
Further, when the random number generation circuit 2 generates a random number with a bit number smaller than 24 bits, for example, three sets of output data are taken so as to substantially satisfy the required collision probability, and three consecutive times It can be changed so that a determination signal is generated when they coincide. As described above, this embodiment can reduce the number of bits to be compared according to the required collision probability.

また、例えば乱数発生回路2が例えば24ビットの8倍(192ビット)のように十分大きなビット数の出力データを発生する場合、真性乱数に等価な乱数を発生している状態において要求される衝突確率Prが分かっている場合には、例えば(1)式のnを未知のビット数として
P<Pr (2)
の条件を満たす最も小さいビット数nを算出するようにしても良い。そして、そのビット数で出力データの格納や比較の処理を行うようにしても良い。
この場合には、要求される衝突確率に応じて比較等を行うビット数を低減することを適切に行え、処理時間等を低減できるため測定時間を短縮することができる。
なお、上述した各実施形態等を部分的に組み合わせる等して構成される実施形態等も本発明に属する。
Further, for example, when the random number generation circuit 2 generates output data having a sufficiently large number of bits, for example, eight times (192 bits) of 24 bits, a collision required in a state where a random number equivalent to a true random number is generated. When the probability Pr is known, for example, P <Pr (2) where n in the equation (1) is an unknown number of bits.
The smallest bit number n satisfying the above condition may be calculated. Then, the output data may be stored or compared with the number of bits.
In this case, it is possible to appropriately reduce the number of bits to be compared in accordance with the required collision probability, and the processing time can be reduced, so that the measurement time can be shortened.
Embodiments configured by partially combining the above-described embodiments and the like also belong to the present invention.

本発明の第1の実施形態に係る乱数発生回路用テスト回路の構成を示すブロック図。1 is a block diagram showing a configuration of a test circuit for a random number generation circuit according to a first embodiment of the present invention. 攪拌回路の構成例を示す回路図。The circuit diagram which shows the structural example of a stirring circuit. 第1の実施形態の動作を示すタイミング図。FIG. 3 is a timing chart showing the operation of the first embodiment. 第1の実施形態におけるテスト方法を示すフローチャート。6 is a flowchart illustrating a test method according to the first embodiment. 本発明の第2の実施形態に係るテスト方法の一部を示すフローチャート。6 is a flowchart showing a part of a test method according to a second embodiment of the present invention.

符号の説明Explanation of symbols

1…(乱数発生回路用)テスト回路
2…乱数発生回路
6…バッファメモリ
7…比較回路
10…乱数発生起動信号
16…出力データ
DESCRIPTION OF SYMBOLS 1 ... (for random number generation circuits) Test circuit 2 ... Random number generation circuit 6 ... Buffer memory 7 ... Comparison circuit 10 ... Random number generation start signal 16 ... Output data

Claims (5)

過渡的な乱数発生特性を有する乱数発生回路に対して、初期状態から乱数を発生させる起動信号を所定の時間間隔で複数回、印加する起動信号印加手段と、
各起動信号が印加された時間を基準時刻として、前記時間間隔より短く設定された動作時間後に前記乱数発生回路から出力される各出力データを、相互に比較し、一致する出力データが存在するか否かの判定を行う判定手段と、
を備えたことを特徴とする乱数発生回路用テスト回路。
A start signal applying means for applying a start signal for generating a random number from an initial state a plurality of times at a predetermined time interval to a random number generating circuit having a transient random number generating characteristic;
Each output data output from the random number generation circuit after the operation time set shorter than the time interval is compared with each other using the time when each start signal is applied as a reference time, and whether there is matching output data Determining means for determining whether or not;
A test circuit for a random number generation circuit, comprising:
前記判定手段は、前記乱数発生回路から前記動作時間後に出力される各出力データを、一時記憶するメモリ回路と、前記メモリ回路に記憶された各出力データを相互に比較し、一致する出力データが存在するか否かの判定結果を出力する比較回路とから構成されることを特徴とする請求項1に記載の乱数発生回路用テスト回路。   The determination means compares each output data output from the random number generation circuit after the operation time with a memory circuit that temporarily stores the output data stored in the memory circuit, and outputs matching data. 2. The test circuit for a random number generation circuit according to claim 1, further comprising a comparison circuit that outputs a determination result of whether or not it exists. さらに前記判定手段により一致する出力データが存在しないと判定した場合には、前記動作時間の値を小さく設定して動作させ、前記判定手段により一致する出力データが存在すると判定した場合には、前記動作時間の値を大きく設定して動作させることにより、前記判定手段により一致する出力データと一致しない出力データの境界に対応する動作時間の境界値を算出することを特徴とする請求項1又は2に記載の乱数発生回路用テスト回路。   Further, when it is determined by the determining means that there is no matching output data, the operation time value is set to be small, and when the determining means determines that there is matching output data, The operation time boundary value corresponding to the boundary between the output data that does not match the output data that matches the output data is calculated by the determination means by operating with the value of the operation time set to a large value. Test circuit for random number generator circuit described in 1. 前記乱数発生回路から出力される出力データのビット数をnとした場合、前記ビット数nよりも小さい所定ビット数m分のみで出力データの複数個を相互に比較し、一致するか否かの判定を行うことを特徴とする請求項1から3のいずれか1つの請求項に記載の乱数発生回路用テスト回路。   When the number of bits of output data output from the random number generation circuit is n, a plurality of output data are compared with each other only by a predetermined number of bits m smaller than the number of bits n, and whether or not they match. 4. The test circuit for a random number generation circuit according to claim 1, wherein the determination is performed. 過渡的な乱数発生特性を有する乱数発生回路に対して、初期状態から乱数を発生させるための起動信号を所定の時間間隔で複数回、印加する起動信号印加ステップと、
各起動信号が印加された時間を基準時刻として、前記時間間隔よりも短く設定された動作時間後に前記乱数発生回路から出力される各出力データを、相互に比較し、一致する出力データが存在するか否かの判定を行う判定ステップと、
を備えたことを特徴とする乱数発生回路用テスト方法。
A start signal applying step for applying a start signal for generating a random number from an initial state a plurality of times at a predetermined time interval to a random number generating circuit having a transient random number generation characteristic;
Each output data output from the random number generation circuit after the operation time set shorter than the time interval is compared with each other using the time when each activation signal is applied as a reference time, and there is matching output data A determination step for determining whether or not,
A test method for a random number generation circuit, comprising:
JP2007082405A 2007-03-27 2007-03-27 Test circuit for random number generation circuit, and test method for random number generation circuit Pending JP2008242815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007082405A JP2008242815A (en) 2007-03-27 2007-03-27 Test circuit for random number generation circuit, and test method for random number generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007082405A JP2008242815A (en) 2007-03-27 2007-03-27 Test circuit for random number generation circuit, and test method for random number generation circuit

Publications (1)

Publication Number Publication Date
JP2008242815A true JP2008242815A (en) 2008-10-09

Family

ID=39914083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007082405A Pending JP2008242815A (en) 2007-03-27 2007-03-27 Test circuit for random number generation circuit, and test method for random number generation circuit

Country Status (1)

Country Link
JP (1) JP2008242815A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978167A (en) * 2014-04-11 2015-10-14 西门子公司 Random Number Generator and Method for Generating Random Numbers
CN105975247A (en) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 Check code generation method and apparatus
US10146507B2 (en) 2016-11-16 2018-12-04 Samsung Electronics Co., Ltd. Randomness test apparatus and method for random number generator
CN113009265A (en) * 2021-03-18 2021-06-22 国网山西省电力公司晋城供电公司 Relay protection equipment inspection method and device, storage medium and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978167A (en) * 2014-04-11 2015-10-14 西门子公司 Random Number Generator and Method for Generating Random Numbers
CN104978167B (en) * 2014-04-11 2019-01-29 西门子公司 Randomizer and method for generating random number
CN105975247A (en) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 Check code generation method and apparatus
US10146507B2 (en) 2016-11-16 2018-12-04 Samsung Electronics Co., Ltd. Randomness test apparatus and method for random number generator
CN113009265A (en) * 2021-03-18 2021-06-22 国网山西省电力公司晋城供电公司 Relay protection equipment inspection method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
JP2009008681A (en) Measuring device for improving performance of standard cell library
JP2007128184A (en) Semiconductor device with power consumption analysis countermeasure function
JP2008242815A (en) Test circuit for random number generation circuit, and test method for random number generation circuit
JP6070600B2 (en) Microcomputer
JP2008249481A (en) Semiconductor device with pll circuit
JP4705880B2 (en) Semiconductor integrated circuit and its test method
US10761809B1 (en) Random number generator
JP5982845B2 (en) Trace control apparatus and trace control method
JP2003194885A (en) Test device and test method of operation timing of semiconductor device
TW202324429A (en) Clock generating circuit and system having the same
JP2008305947A (en) Delay measuring instrument, and semiconductor device
JP4894327B2 (en) Jitter measurement circuit
JP6511122B1 (en) Information processing apparatus, program, and method for determining authenticity of attached device
JPH08139575A (en) Pulse output circuit
KR100897277B1 (en) Delay Circuit of Semiconductor Memory Apparatus
JP2007171060A (en) Operating mode setting circuit, lsi having the operating mode setting circuit, and operating mode setting method
JP2005156183A (en) Scan test circuit
JP6010645B2 (en) Inspection apparatus and method
JP2004040037A (en) Inspection device for semiconductor integrated circuit
JP3496622B2 (en) Semiconductor integrated circuit
US7016798B2 (en) Method of extract gate delay parameter in high frequency circuits
JP2010096728A (en) Semiconductor device
JP4028292B2 (en) Semiconductor integrated circuit simulation apparatus
JP6582394B2 (en) Counter unit
JP2005127922A (en) Pattern generator and testing device