[go: up one dir, main page]

TWI858341B - Random number generating circuit - Google Patents

Random number generating circuit Download PDF

Info

Publication number
TWI858341B
TWI858341B TW111121011A TW111121011A TWI858341B TW I858341 B TWI858341 B TW I858341B TW 111121011 A TW111121011 A TW 111121011A TW 111121011 A TW111121011 A TW 111121011A TW I858341 B TWI858341 B TW I858341B
Authority
TW
Taiwan
Prior art keywords
voltage
clock signal
random number
noise
operational amplifier
Prior art date
Application number
TW111121011A
Other languages
Chinese (zh)
Other versions
TW202349197A (en
Inventor
林志豐
Original Assignee
華邦電子股份有限公司
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 華邦電子股份有限公司 filed Critical 華邦電子股份有限公司
Priority to TW111121011A priority Critical patent/TWI858341B/en
Publication of TW202349197A publication Critical patent/TW202349197A/en
Application granted granted Critical
Publication of TWI858341B publication Critical patent/TWI858341B/en

Links

Images

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

A random number generating circuit is provided, which includes a noise-voltage generator, configured to convert an external voltage into a noise voltage; a voltage-controlled oscillator, configured to receive the noise voltage, and generates a first clock signal according to the noise voltage; a ring oscillator, configured to generate a sample clock signal; and a D flip-flop, configured to receive the first clock signal, and sample the first clock signal using the sample clock signal to obtain an output digital signal, wherein the output digital signal represents a random number.

Description

隨機數產生電路Random Number Generation Circuit

本發明係有關於電子電路,特別是有關於一種隨機數產生電路。 The present invention relates to electronic circuits, and in particular to a random number generation circuit.

隨機數產生器(random number generator,RNG)在許多不同的應用中均扮演了重要角色,例如加密應用(cryptographic applications)、統計運算、動態隨機存取記憶體(DRAM)之列敲打(row hammer)機制等等。然而,傳統的隨機數產生器之相關電路,例如線性回饋位移暫存器、環形振盪器基礎式的亂數產生器等等,其所產生出的數字往往並非真正的隨機數,而是具有確定性/週期性的偽隨機數(pseudo-random number)。 Random number generators (RNGs) play an important role in many different applications, such as cryptographic applications, statistical operations, and the row hammer mechanism of dynamic random access memory (DRAM). However, the numbers generated by traditional RNG-related circuits, such as linear feedback shift registers and ring oscillator-based random number generators, are often not truly random numbers, but pseudo-random numbers with determinism/periodicity.

有鑑於此,本發明係提出一種隨機數產生電路以解決上述問題。 In view of this, the present invention proposes a random number generation circuit to solve the above problem.

本發明係提供一種隨機數產生電路,包括:一雜訊電壓產生器,用以將一外部電壓轉換為一雜訊電壓;一壓控振盪器, 用以接收該雜訊電壓,並依據該雜訊電壓以產生一第一時脈信號;一環形振盪器,用以產生一取樣時脈信號;以及一D型正反器,用以接收該第一時脈信號,並以該取樣時脈信號對該第一時脈信號進行取樣以得到一輸出數位信號,其中該輸出數位信號表示一隨機數。 The present invention provides a random number generating circuit, comprising: a noise voltage generator for converting an external voltage into a noise voltage; a voltage-controlled oscillator for receiving the noise voltage and generating a first clock signal according to the noise voltage; a ring oscillator for generating a sampling clock signal; and a D-type flip-flop for receiving the first clock signal and sampling the first clock signal with the sampling clock signal to obtain an output digital signal, wherein the output digital signal represents a random number.

100:隨機數產生電路 100: Random number generation circuit

110:雜訊電壓產生器 110: Noise voltage generator

112:電源雜訊放大器 112: Power noise amplifier

114:溫度反向參考電壓電路 114: Temperature reverse reference voltage circuit

116:運算放大器 116: Operational amplifier

120:壓控振盪器 120: Voltage-controlled oscillator

130:環形振盪器 130: Ring oscillator

140:D型正反器 140: D-type flip-flop

1121:運算放大器 1121: Operational amplifier

1301:反及閘 1301: Anti-and-gate

1302、1303:反向器 1302, 1303: Reverse device

VP、VT、VA、VB:電壓 VP, VT, VA, VB: voltage

V1:雜訊電壓 V1: Noise voltage

VMIX:參考電壓 VMIX: reference voltage

VEXT:外部電壓 VEXT: external voltage

VDD:電源電壓 VDD: power supply voltage

R1-R7:電阻 R1-R7: resistor

N1-N7:節點 N1-N7: Nodes

C1-C4:電容 C1-C4: Capacitor

D1:二極體 D1: diode

EN:致能信號 EN: Enable signal

f1、f2’:時脈信號 f1, f2’: clock signal

f2:取樣時脈信號 f2: sampling clock signal

fmix:輸出數位信號 fmix: output digital signal

D:資料端 D: Data terminal

CLK:時脈輸入端 CLK: Clock input terminal

Q:輸出端 Q: Output terminal

第1圖係顯示依據本發明一實施例中之隨機數產生電路的方塊圖。 Figure 1 is a block diagram showing a random number generation circuit according to an embodiment of the present invention.

第2圖為依據本發明一實施例中之電源雜訊放大器及溫度反向參考電壓電路的電路圖。 Figure 2 is a circuit diagram of a power noise amplifier and a temperature reverse reference voltage circuit according to an embodiment of the present invention.

第3A圖為依據本發明一實施例中之電壓VT與溫度之關係的示意圖。 Figure 3A is a schematic diagram of the relationship between voltage VT and temperature in an embodiment of the present invention.

第3B圖為依據本發明一實施例中之電壓VT、VP的示意圖。 Figure 3B is a schematic diagram of voltages VT and VP according to an embodiment of the present invention.

第3C圖為依據本發明一實施例中之參考電壓VMIX的示意圖。 Figure 3C is a schematic diagram of the reference voltage VMIX in an embodiment of the present invention.

第4圖為依據本發明一實施例中之環形振盪器的示意圖。 Figure 4 is a schematic diagram of a ring oscillator according to an embodiment of the present invention.

第5圖為依據本發明第1圖實施例中之D型正反器之取樣操作的波形圖。 Figure 5 is a waveform diagram of the sampling operation of the D-type flip-flop in the embodiment of Figure 1 of the present invention.

以下說明係為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的申請專利範圍。 The following description is a preferred implementation method for completing the invention. Its purpose is to describe the basic spirit of the invention, but it is not intended to limit the invention. The actual content of the invention must refer to the scope of the subsequent patent application.

第1圖為依據本發明一實施例中之隨機數產生電路的方塊圖。 Figure 1 is a block diagram of a random number generation circuit according to an embodiment of the present invention.

如第1圖所示,隨機數產生電路100包括雜訊電壓產生器110、壓控振盪器(voltage-controlled oscillator)120、環形振盪器(ring oscillator)130及D型正反器140。雜訊電壓產生器110係用以將外部電壓VEXT轉換為雜訊電壓V1,並將雜訊電壓V1提供至壓控振盪器120。 As shown in FIG. 1 , the random number generating circuit 100 includes a noise voltage generator 110, a voltage-controlled oscillator 120, a ring oscillator 130, and a D-type flip-flop 140. The noise voltage generator 110 is used to convert the external voltage VEXT into a noise voltage V1, and provide the noise voltage V1 to the voltage-controlled oscillator 120.

壓控振盪器120係依據雜訊電壓V1以產生不規律的時脈信號f1。環形振盪器130係用以產生一取樣時脈信號(sample clock signal)f2,其中取樣時脈信號f2為規律的時脈信號。 The voltage-controlled oscillator 120 generates an irregular clock signal f1 according to the noise voltage V1. The ring oscillator 130 is used to generate a sample clock signal f2, wherein the sample clock signal f2 is a regular clock signal.

此外,取樣時脈信號f2提供至D型正反器140的時脈輸入端CLK以對資料端D所輸入的時脈信號f1進行取樣,並且在輸出端Q產生輸出數位信號fmix,其中輸出數位信號fmix即為隨機數。 In addition, the sampling clock signal f2 is provided to the clock input terminal CLK of the D-type flip-flop 140 to sample the clock signal f1 inputted from the data terminal D, and an output digital signal fmix is generated at the output terminal Q, wherein the output digital signal fmix is a random number.

雜訊電壓產生器110包括電源雜訊放大器112、溫度反向(complementary to absolute temperature,CTAT)參考電壓電路114及運算放大器116。電源雜訊放器112係用以放大外部電壓VEXT之電源雜訊以產生電壓VP,且溫度反向參考電壓電路114則透過環境溫度以產生電壓VT,其中電壓VT係與絕對溫度(absolute temperature)成反比。電壓VP經過電容C1以在節點N1與電壓VT進行混合以得到一參考電壓VMIX。 The noise voltage generator 110 includes a power noise amplifier 112, a temperature inversion (complementary to absolute temperature, CTAT) reference voltage circuit 114 and an operational amplifier 116. The power noise amplifier 112 is used to amplify the power noise of the external voltage VEXT to generate a voltage VP, and the temperature inversion reference voltage circuit 114 generates a voltage VT through the ambient temperature, wherein the voltage VT is inversely proportional to the absolute temperature. The voltage VP is mixed with the voltage VT at the node N1 through the capacitor C1 to obtain a reference voltage VMIX.

運算放大器116例如可做為整壓器(voltage regulator),其中參考電壓VMIX係輸入至運算放大器116之正輸入端,且運算放大器116之輸出端(節點N2)所產生之雜訊電壓V1經過電阻R2及R3所構成之回授路徑以輸入至運算放大器116之負輸入端。舉例來說,雜訊電壓V1及參考電壓VMIX之關係式如式(1)所示:

Figure 111121011-A0305-02-0007-1
The operational amplifier 116 can be used as a voltage regulator, for example, wherein the reference voltage VMIX is input to the positive input terminal of the operational amplifier 116, and the noise voltage V1 generated by the output terminal (node N2) of the operational amplifier 116 is input to the negative input terminal of the operational amplifier 116 via a feedback path formed by resistors R2 and R3. For example, the relationship between the noise voltage V1 and the reference voltage VMIX is shown in equation (1):
Figure 111121011-A0305-02-0007-1

因此,由式(1)可推得雜訊電壓

Figure 111121011-A0305-02-0007-2
。 Therefore, the noise voltage can be deduced from equation (1):
Figure 111121011-A0305-02-0007-2
.

詳細而言,環境溫度之特性是相對數值變化較慢,故電壓VT可決定時脈信號f1的基本頻率。此外,電源雜訊的特性是瞬間變化較快,故電壓VP會短暫地改變時脈信號f1的頻率。 In detail, the characteristic of ambient temperature is that the relative value changes slowly, so the voltage VT can determine the basic frequency of the clock signal f1. In addition, the characteristic of power supply noise is that the instantaneous change is fast, so the voltage VP will temporarily change the frequency of the clock signal f1.

壓控振盪器120係使用雜訊電壓V1以產生不規律的時脈信號f1,且時脈信號f1的頻率會受到外部環境影響,例如外部電壓、環境溫度、晶片製程特性等等,但並未考慮熱雜訊(thermal noise)。環形振盪器130可自動產生取樣時脈信號f2,且取樣時脈信號f2之頻率係由環形振盪器130之內部電路所決定。此外,壓控振盪器120及環形振盪器130均是由致能信號EN所控制。當致能信號EN處於高邏輯狀態,壓控振盪器120及環形振盪器130係處於工作狀態以分別產生時脈信號f1及取樣時脈信號f2。當致能信號EN處於低邏輯狀態,壓控振盪器120及環形振盪器130關閉。 The voltage-controlled oscillator 120 uses the noise voltage V1 to generate an irregular clock signal f1, and the frequency of the clock signal f1 is affected by the external environment, such as external voltage, ambient temperature, chip process characteristics, etc., but thermal noise is not considered. The ring oscillator 130 can automatically generate a sampling clock signal f2, and the frequency of the sampling clock signal f2 is determined by the internal circuit of the ring oscillator 130. In addition, the voltage-controlled oscillator 120 and the ring oscillator 130 are both controlled by the enable signal EN. When the enable signal EN is in a high logic state, the voltage-controlled oscillator 120 and the ring oscillator 130 are in a working state to generate a clock signal f1 and a sampling clock signal f2 respectively. When the enable signal EN is in a low logic state, the voltage-controlled oscillator 120 and the ring oscillator 130 are turned off.

需注意的是,本發明可利用雜訊電壓產生器110之設計即可將電源雜訊及環境溫度轉換為相應的雜訊電壓V1,並且壓控 振盪器可依據雜訊電壓V1(例如為類比信號)以產生時脈信號f1(例如為數位信號),上述設計並不需要使用類比至數位轉換器(analog-to-digital converter)以將熱雜訊轉換為數位信號。 It should be noted that the present invention can utilize the design of the noise voltage generator 110 to convert the power supply noise and the ambient temperature into the corresponding noise voltage V1, and the voltage-controlled oscillator can generate a clock signal f1 (e.g., a digital signal) based on the noise voltage V1 (e.g., an analog signal). The above design does not require the use of an analog-to-digital converter to convert the thermal noise into a digital signal.

第2圖為依據本發明一實施例中之電源雜訊放大器及溫度反向參考電壓電路的電路圖。請同時參考第1圖及第2圖。 Figure 2 is a circuit diagram of a power noise amplifier and a temperature reverse reference voltage circuit according to an embodiment of the present invention. Please refer to Figures 1 and 2 at the same time.

如第2圖所示,在一實施例中,電容C2之第一端及第二端係分別連接至外部電壓VEXT及節點N3,且電阻R4之第一端及第二端分別連接至外部電壓VEXT及節點N3。節點N3具有電壓VA,且電壓VA係輸入至運算放大器1121的正輸入端(+)。在節點N3之電壓VA經過電阻R6及電容C3所構成之RC電路以在節點N4產生電壓VB,且電壓VB係輸入至運算放大器1121的負輸入端(-)。因為電阻R6及電容C3所構成之RC電路可視為低通濾波器,故可將電源雜訊變化程度較大的電壓VA轉換為電源雜訊變化程度較小的電壓VB。電壓VA及電壓VB之差值經過運算放大器1121放大後可在運算放大器1121之輸出端(節點N5)得到電壓VP。 As shown in FIG. 2 , in one embodiment, the first and second ends of capacitor C2 are connected to external voltage VEXT and node N3, respectively, and the first and second ends of resistor R4 are connected to external voltage VEXT and node N3, respectively. Node N3 has voltage VA, and voltage VA is input to the positive input terminal (+) of operational amplifier 1121. Voltage VA at node N3 passes through an RC circuit formed by resistor R6 and capacitor C3 to generate voltage VB at node N4, and voltage VB is input to the negative input terminal (-) of operational amplifier 1121. Because the RC circuit formed by resistor R6 and capacitor C3 can be regarded as a low-pass filter, the voltage VA with a larger power supply noise variation can be converted into the voltage VB with a smaller power supply noise variation. The difference between the voltage VA and the voltage VB can be amplified by the operational amplifier 1121 to obtain the voltage VP at the output terminal (node N5) of the operational amplifier 1121.

在一實施例中,溫度反向參考電壓電路114例如可用二極體D1、電容C4及電阻R7所實現,其中二極體D1亦可用雙載子電晶體(BJT)或場效電晶體(FET)以二極體之連接方式所實現,例如NPN雙載子電晶體之集極與基極可同時連接至節點N6,且NPN雙載子電晶體之射極接地,即可等效視為二極體D1。 In one embodiment, the temperature reverse reference voltage circuit 114 can be implemented by, for example, a diode D1, a capacitor C4, and a resistor R7, wherein the diode D1 can also be implemented by a bipolar junction transistor (BJT) or a field effect transistor (FET) in a diode connection manner, for example, the collector and base of the NPN bipolar junction transistor can be simultaneously connected to the node N6, and the emitter of the NPN bipolar junction transistor is grounded, which can be equivalent to the diode D1.

若採用N型金屬氧化物半導體場效電晶體(MOSFET),則可將該電晶體之閘極與汲極同時連接至節點N6,且 該電晶體之源極接地,即可等效視為二極體D1。因此,溫度反向參考電壓電路114可在節點N6得到具有負溫度係數的電壓VT。意即,當環境溫度(絕對溫度)愈高,電壓VT愈低,當環境溫度(絕對溫度)愈低,電壓VT愈高,其中上述關係式如第3A圖所示。 If an N-type metal oxide semiconductor field effect transistor (MOSFET) is used, the gate and drain of the transistor can be connected to the node N6 at the same time, and the source of the transistor is grounded, which can be equivalent to a diode D1. Therefore, the temperature reverse reference voltage circuit 114 can obtain a voltage VT with a negative temperature coefficient at the node N6. That is, when the ambient temperature (absolute temperature) is higher, the voltage VT is lower, and when the ambient temperature (absolute temperature) is lower, the voltage VT is higher, wherein the above relationship is shown in Figure 3A.

詳細而言,電壓VT經過電阻R1後可在節點N1產生參考電壓VMIX之直流位準(DC level),且電壓VP經過電容C1擾動後可在節點N1得到參考電壓VMIX之暫態位準(transient level)。如第3B圖所示,電壓VP之雜訊變化程度較高,其可視為參考電壓VMIX之暫態位準。電壓VT雖然會隨著環境溫度而改變,但因為環境溫度之變化緩慢,故電壓VT約略可維持在定值。因此,參考電壓VMIX可視為將上述暫態位準疊加於上述直流位準上,如第3C圖所示。需注意的是,本發明中之隨機數產生電路100係分別利用電源雜訊及溫度以做為雜訊來源,而不使用熱雜訊。 In detail, the voltage VT can generate the DC level of the reference voltage VMIX at the node N1 after passing through the resistor R1, and the voltage VP can obtain the transient level of the reference voltage VMIX at the node N1 after being disturbed by the capacitor C1. As shown in Figure 3B, the noise variation of the voltage VP is higher, which can be regarded as the transient level of the reference voltage VMIX. Although the voltage VT will change with the ambient temperature, because the ambient temperature changes slowly, the voltage VT can be roughly maintained at a constant value. Therefore, the reference voltage VMIX can be regarded as the above transient level superimposed on the above DC level, as shown in Figure 3C. It should be noted that the random number generation circuit 100 in the present invention uses power supply noise and temperature as noise sources respectively, but does not use thermal noise.

此外,隨機數產生電路100中的雜訊電壓產生器110係使用二極體、電阻及電容以生成雜訊源,且不需要複雜的類比至數位轉換器或溫度感測器,故在積體電路中實現的面積成本較低。 In addition, the noise voltage generator 110 in the random number generation circuit 100 uses a diode, a resistor and a capacitor to generate a noise source, and does not require a complex analog-to-digital converter or a temperature sensor, so the area cost of the integrated circuit is lower.

第4圖為依據本發明一實施例中之環形振盪器的示意圖。 Figure 4 is a schematic diagram of a ring oscillator according to an embodiment of the present invention.

在一實施例中,環形振盪器130例如可用反及閘(NAND)1301、複數個反向器1302及1303所實現,且電源電壓VDD係提供至反及閘1301及反向器1302-1303以供進行操作,其中電源電壓VDD例如可為外部電壓VEXT。反及閘1301之第一輸入 端係接收致能信號EN,且其第二輸入端則接收最後一級的反向器1302之輸出端所產生的時脈信號f2’。 In one embodiment, the ring oscillator 130 can be implemented by, for example, a NAND gate 1301, a plurality of inverters 1302 and 1303, and a power supply voltage VDD is provided to the NAND gate 1301 and the inverters 1302-1303 for operation, wherein the power supply voltage VDD can be, for example, an external voltage VEXT. The first input terminal of the NAND gate 1301 receives an enable signal EN, and the second input terminal receives a clock signal f2' generated by the output terminal of the last-stage inverter 1302.

舉例來說,當致能信號EN處於低邏輯狀態時,反及閘1301之輸出端會持續處於高邏輯狀態,故此時環形振盪器130無法產生振盪。當致能信號EN處於高邏輯狀態時,反及閘1301之輸出信號為其第二輸入端之輸入信號之反相信號,故此時反及閘1301可視為反向器。因此,反及閘1301及偶數級的反向器1302整體可構成奇數級的反向器進行串接,故可持續進行振盪並且在最後一級的反向器1302之輸出端得到時脈信號f2’。舉例來說,反向器1302具有2N個數量,且N為正整數。 For example, when the enable signal EN is in a low logic state, the output terminal of the NAND gate 1301 will continue to be in a high logic state, so the ring oscillator 130 cannot generate oscillation. When the enable signal EN is in a high logic state, the output signal of the NAND gate 1301 is the inverse signal of the input signal of its second input terminal, so the NAND gate 1301 can be regarded as an inverter. Therefore, the NAND gate 1301 and the inverter 1302 of the even number stage can constitute an inverter of the odd number stage for series connection, so it can continue to oscillate and obtain the clock signal f2' at the output terminal of the inverter 1302 of the last stage. For example, the number of inverters 1302 is 2N, and N is a positive integer.

時脈信號f2’經過反向器1303後即可得到取樣時脈信號f2。本發明領域中具有通常知識者當可了解可透過調整反向器1302之級數及電晶體之尺寸以改變環形振盪器130之振盪頻率(即:取樣時脈信號f2之頻率),故其細節於此不再詳述。 After the clock signal f2' passes through the inverter 1303, the sampling clock signal f2 can be obtained. Those with ordinary knowledge in the field of the present invention should understand that the oscillation frequency of the ring oscillator 130 (i.e., the frequency of the sampling clock signal f2) can be changed by adjusting the order of the inverter 1302 and the size of the transistor, so the details are not described here.

第5圖為依據本發明第1圖實施例中之D型正反器之取樣操作的波形圖。請同時參考第1圖及第5圖。 Figure 5 is a waveform diagram of the sampling operation of the D-type flip-flop in the embodiment of Figure 1 of the present invention. Please refer to Figure 1 and Figure 5 at the same time.

如第5圖所示,當致能信號EN處於高邏輯狀態時,壓控振盪器120及環形振盪器130開始產生振盪以分別產生時脈信號f1及取樣時脈信號f2,其中時脈信號f1為不規律的時脈信號,且取樣時脈信號f2為規律的時脈信號。取樣時脈信號f2提供至D型正反器140的時脈輸入端CLK以對資料端D所輸入的時脈信號f1進行取樣,並且在輸出端Q產生輸出數位信號fmix。 As shown in FIG. 5 , when the enable signal EN is in a high logic state, the voltage-controlled oscillator 120 and the ring oscillator 130 start to oscillate to generate a clock signal f1 and a sampling clock signal f2, respectively, wherein the clock signal f1 is an irregular clock signal, and the sampling clock signal f2 is a regular clock signal. The sampling clock signal f2 is provided to the clock input terminal CLK of the D-type flip-flop 140 to sample the clock signal f1 inputted by the data terminal D, and an output digital signal fmix is generated at the output terminal Q.

詳細而言,D型正反器140在取樣時脈信號f2的正緣(rising edge)對時脈信號f1進行取樣。因為時脈信號f1為不規律的時脈信號,所以每當取樣時脈信號f2處於正緣時,D型正反器140在其輸出端Q所得到的輸出數位信號fmix亦包含不規律的數值0或1。換言之,輸出數位信號fmix為隨機數。 In detail, the D-type flip-flop 140 samples the clock signal f1 at the rising edge of the sampling clock signal f2. Because the clock signal f1 is an irregular clock signal, whenever the sampling clock signal f2 is at the rising edge, the output digital signal fmix obtained by the D-type flip-flop 140 at its output terminal Q also includes an irregular value of 0 or 1. In other words, the output digital signal fmix is a random number.

綜上所述,本發明提供一種隨機數產生電路,其可分別利用電源雜訊及溫度以做為雜訊來源,而不使用熱雜訊。此外,本發明之隨機數產生電路係使用二極體、電阻及電容以生成雜訊源,且不需要複雜的類比至數位轉換器或溫度感測器,故在積體電路中實現的面積成本較低。此外,隨機數產生電路所產生的隨機數會受電源雜訊、溫度及製程所影響,故不易出現規律性,且其效果接近真實的隨機數。 In summary, the present invention provides a random number generating circuit that can use power supply noise and temperature as noise sources instead of thermal noise. In addition, the random number generating circuit of the present invention uses diodes, resistors and capacitors to generate noise sources, and does not require complex analog-to-digital converters or temperature sensors, so the area cost of implementing in integrated circuits is lower. In addition, the random numbers generated by the random number generating circuit will be affected by power supply noise, temperature and process, so it is not easy to have regularity, and its effect is close to the real random number.

本發明雖以較佳實施例揭露如上,然其並非用以限定本發明的範圍,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可做些許的更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention is disclosed as above with the preferred embodiment, it is not intended to limit the scope of the present invention. Anyone with common knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined in the attached patent application.

100:隨機數產生電路 110:雜訊電壓產生器 112:電源雜訊放大器 114:溫度反向參考電壓電路 116:運算放大器 120:壓控振盪器 130:環形振盪器 140:D型正反器 VP、VT:電壓 V1:雜訊電壓 VMIX:參考電壓 R1-R3:電阻 N1-N2:節點 C1:電容 EN:致能信號 f1:時脈信號 f2:取樣時脈信號 fmix:輸出數位信號 D:資料端 CLK:時脈輸入端 Q:輸出端 100: Random number generator circuit 110: Noise voltage generator 112: Power noise amplifier 114: Temperature reverse reference voltage circuit 116: Operational amplifier 120: Voltage controlled oscillator 130: Ring oscillator 140: D-type flip-flop VP, VT: Voltage V1: Noise voltage VMIX: Reference voltage R1-R3: Resistor N1-N2: Node C1: Capacitor EN: Enable signal f1: Clock signal f2: Sampling clock signal fmix: Output digital signal D: Data terminal CLK: Clock input terminal Q: Output terminal

Claims (10)

一種隨機數產生電路,包括:一雜訊電壓產生器,用以將一外部電壓轉換為一雜訊電壓;一壓控振盪器,用以接收該雜訊電壓,並依據該雜訊電壓以產生一第一時脈信號;一環形振盪器,用以產生一取樣時脈信號,其中該取樣時脈信號不受外部環境影響;以及一D型正反器,用以接收該第一時脈信號,並以該取樣時脈信號對該第一時脈信號進行取樣以得到一輸出數位信號,其中該輸出數位信號表示一隨機數。 A random number generating circuit includes: a noise voltage generator for converting an external voltage into a noise voltage; a voltage-controlled oscillator for receiving the noise voltage and generating a first clock signal according to the noise voltage; a ring oscillator for generating a sampling clock signal, wherein the sampling clock signal is not affected by the external environment; and a D-type flip-flop for receiving the first clock signal and sampling the first clock signal with the sampling clock signal to obtain an output digital signal, wherein the output digital signal represents a random number. 如請求項1之隨機數產生電路,其中該雜訊電壓產生器包括:一電源雜訊放大器,用以放大該外部電壓之電源雜訊以生第一電壓;一溫度反向參考電壓電路,用以透過該隨機數產生電路之環境溫度以產生第二電壓;以及一第一運算放大器;其中該第一電壓係透過第一電容以連接至該第一運算放大器之正輸入端,且該第二電壓係透過第一電阻以連接至該第一運算放大器之該正輸入端,其中該第一運算放大器所輸出之該雜訊電壓係透過一回授路徑以輸入至該第一運算放大器之負輸入端。 The random number generating circuit of claim 1, wherein the noise voltage generator comprises: a power noise amplifier for amplifying the power noise of the external voltage to generate a first voltage; a temperature reverse reference voltage circuit for generating a second voltage through the ambient temperature of the random number generating circuit; and a first operational amplifier; wherein the first voltage is connected to the positive input terminal of the first operational amplifier through a first capacitor, and the second voltage is connected to the positive input terminal of the first operational amplifier through a first resistor, wherein the noise voltage output by the first operational amplifier is input to the negative input terminal of the first operational amplifier through a feedback path. 如請求項2之隨機數產生電路,其中該第二電壓具有負溫度係數。 A random number generating circuit as in claim 2, wherein the second voltage has a negative temperature coefficient. 如請求項2之隨機數產生電路,其中該第一電壓表示一參考電壓之暫態位準,且該第二電壓表示該示該參考電壓之直流位準。 A random number generation circuit as claimed in claim 2, wherein the first voltage represents a transient level of a reference voltage, and the second voltage represents a DC level of the reference voltage. 如請求項2之隨機數產生電路,其中該回授路徑包括一第二電阻及一第三電阻,且該第二電阻之第一端及第二端分別連接至第二節點及該第一運算放大器之該負輸入端,且該第三電阻之第一端及第二端分別連接至該第一運算放大器之該負輸入端及接地端,其中該第二節點為該第一運算放大器之輸出端。 The random number generating circuit of claim 2, wherein the feedback path includes a second resistor and a third resistor, and the first end and the second end of the second resistor are respectively connected to the second node and the negative input terminal of the first operational amplifier, and the first end and the second end of the third resistor are respectively connected to the negative input terminal of the first operational amplifier and the ground terminal, wherein the second node is the output terminal of the first operational amplifier. 如請求項2之隨機數產生電路,其中該電源雜訊放大器包括第二運算放大器,且該外部電壓透過並聯的第二電容及第四電阻以連接至第三節點,且該第三節點連接至該第二運算放大器之正輸入端,其中,第五電阻之第一端及第二端分別連接至該第三節點及接地端,且該第三節點係透過第六電阻及第三電容所組成的低通濾波器以連接至該第二運算放大器之負輸入端。 As in claim 2, the random number generating circuit, wherein the power noise amplifier includes a second operational amplifier, and the external voltage is connected to a third node through a second capacitor and a fourth resistor connected in parallel, and the third node is connected to the positive input terminal of the second operational amplifier, wherein the first terminal and the second terminal of the fifth resistor are connected to the third node and the ground terminal respectively, and the third node is connected to the negative input terminal of the second operational amplifier through a low-pass filter composed of a sixth resistor and a third capacitor. 如請求項2之隨機數產生電路,其中該溫度反向參考電壓電路包括一第七電阻、一二極體以及一第四電容,其中該第七電阻之第一端及第二端分別連接至該外部電壓及第六節點, 其中該二極體之陽極及陰極分別連接至該第六節點及接地端,且該第四電容之第一端及第二端分別連接至該第六節點及該接地端,其中該第六節點為該溫度反向參考電壓電路之輸出端。 The random number generation circuit of claim 2, wherein the temperature reverse reference voltage circuit includes a seventh resistor, a diode and a fourth capacitor, wherein the first end and the second end of the seventh resistor are connected to the external voltage and the sixth node respectively, wherein the anode and the cathode of the diode are connected to the sixth node and the ground terminal respectively, and the first end and the second end of the fourth capacitor are connected to the sixth node and the ground terminal respectively, wherein the sixth node is the output terminal of the temperature reverse reference voltage circuit. 如請求項1之隨機數產生電路,其中該壓控振盪器及該環形振盪器係由一致能信號所控制,且當該致能信號處於高邏輯狀態,該壓控振盪器及該環形振盪器係處於工作狀態以分別產生該第一時脈信號及該取樣時脈信號,其中當該致能信號處於低邏輯狀態,該壓控振盪器及該環形振盪器關閉。 As in the random number generating circuit of claim 1, the voltage-controlled oscillator and the ring oscillator are controlled by an enable signal, and when the enable signal is in a high logic state, the voltage-controlled oscillator and the ring oscillator are in a working state to generate the first clock signal and the sampling clock signal respectively, and when the enable signal is in a low logic state, the voltage-controlled oscillator and the ring oscillator are turned off. 如請求項8之隨機數產生電路,其中該環形振盪器包括依序串接的一反及閘、複數個第一反向器、及一第二反向器,其中該致能信號及該等第一反向器中的最後一個反向器所產生的第二時脈信號係輸入至該反及閘,且該等第一反向器具有2N個數量,且N為正整數,其中該第二時脈信號係輸入至該第二反向器以得到該取樣時脈信號。 As in claim 8, the random number generating circuit, wherein the ring oscillator comprises an AND gate, a plurality of first inverters, and a second inverter connected in series in sequence, wherein the enable signal and the second clock signal generated by the last inverter among the first inverters are input to the AND gate, and the first inverters have a number of 2N, and N is a positive integer, wherein the second clock signal is input to the second inverter to obtain the sampling clock signal. 如請求項1之隨機數產生電路,其中該D型正反器,在該取樣時脈信號之正緣對該第一時脈信號進行取樣以得到該輸出數位信號。 As in the random number generation circuit of claim 1, the D-type flip-flop samples the first clock signal at the positive edge of the sampling clock signal to obtain the output digital signal.
TW111121011A 2022-06-07 2022-06-07 Random number generating circuit TWI858341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111121011A TWI858341B (en) 2022-06-07 2022-06-07 Random number generating circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111121011A TWI858341B (en) 2022-06-07 2022-06-07 Random number generating circuit

Publications (2)

Publication Number Publication Date
TW202349197A TW202349197A (en) 2023-12-16
TWI858341B true TWI858341B (en) 2024-10-11

Family

ID=90039158

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111121011A TWI858341B (en) 2022-06-07 2022-06-07 Random number generating circuit

Country Status (1)

Country Link
TW (1) TWI858341B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200925982A (en) * 2007-12-12 2009-06-16 Phison Electronics Corp Random number generator and random number generating method thereof
CN103034472A (en) * 2012-12-12 2013-04-10 深圳国微技术有限公司 True random number generator
US20150193205A1 (en) * 2014-01-09 2015-07-09 Robert Bosch Gmbh Method for generating an output of a random source of a random generator
CN109783061A (en) * 2019-01-16 2019-05-21 宁波大学 A kind of real random number generator using oscillator sample
US20200233644A1 (en) * 2019-01-23 2020-07-23 International Business Machines Corporation True random number generator
CN111490757A (en) * 2019-01-28 2020-08-04 新唐科技股份有限公司 Electronic circuit and method for generating random random numbers
US20220029837A1 (en) * 2018-11-29 2022-01-27 Resado Gmbh Electronic device and method for authentication of an electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200925982A (en) * 2007-12-12 2009-06-16 Phison Electronics Corp Random number generator and random number generating method thereof
CN103034472A (en) * 2012-12-12 2013-04-10 深圳国微技术有限公司 True random number generator
US20150193205A1 (en) * 2014-01-09 2015-07-09 Robert Bosch Gmbh Method for generating an output of a random source of a random generator
US20220029837A1 (en) * 2018-11-29 2022-01-27 Resado Gmbh Electronic device and method for authentication of an electronic device
CN109783061A (en) * 2019-01-16 2019-05-21 宁波大学 A kind of real random number generator using oscillator sample
US20200233644A1 (en) * 2019-01-23 2020-07-23 International Business Machines Corporation True random number generator
CN111490757A (en) * 2019-01-28 2020-08-04 新唐科技股份有限公司 Electronic circuit and method for generating random random numbers

Also Published As

Publication number Publication date
TW202349197A (en) 2023-12-16

Similar Documents

Publication Publication Date Title
Kinniment et al. Design of an on-chip random number generator using metastability
US7107178B2 (en) Temperature sensing circuit for use in semiconductor integrated circuit
CN110719102A (en) Oscillation circuit and clock circuit
CN102486414A (en) temperature sensor circuit
TWI671617B (en) Current generating circuits
TW201024955A (en) Circuit for generating a reference voltage
US20080126458A1 (en) Apparatus and Methods for Generating Random Signals
US20190199329A1 (en) Ring oscillator temperature sensor
TWI858341B (en) Random number generating circuit
Shakir et al. 555-timer and comparators operational at 500° C
CN101315566A (en) reference voltage generator
US20240028300A1 (en) Random-number-generating circuit
JP6032131B2 (en) Temperature sensor circuit
JP2011007545A (en) Temperature sensor
CN117348842A (en) Random number generation circuit
JP2003283306A (en) Oscillator
JP6163992B2 (en) Temperature sensor circuit
KR940001568A (en) Level conversion circuit
CN111953330A (en) Low-power-consumption power-on reset circuit irrelevant to temperature
TWI756855B (en) RC oscillator circuit and information processing device
TWI387736B (en) Low power temperature sensor operated in sub-threshold region
JP2003283305A (en) Oscillation circuit with temperature compensation
KR100247367B1 (en) Voltage controlled oscillator
Someya et al. A 13nW temperature-to-digital converter utilizing sub-threshold MOSFET operation at sub-thermal drain voltage
CN115378434A (en) Voltage-pulse width conversion circuit for temperature sensor and temperature sensor