High-reliability true random number generator circuit based on magnetic tunnel junction and working method thereof
By introducing magnetic tunnel junction and BCH code post-processing technology into the true random number generator circuit, the reliability and area energy overhead of random number generation in the prior art are solved, and high-quality random number output is achieved.
Patent Information
- Application Number
- CN202410958247.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-12-06
AI Technical Summary
The existing true random number generator cannot ensure the reliability and randomness of the generated random number under the influence of process accuracy and environmental fluctuations, and the circuit design area and energy overhead are relatively large.
A high-reliability true random number generator circuit based on magnetic tunnel junction is designed, including a random extraction part and a post-processing part, using a clock control circuit, a reset circuit, a write circuit and a read circuit, combined with a linear modifier to reduce the Generate deviations of true random numbers and post-process them through the BCH code to improve random entropy.
It realizes a simplified structure, compact area and high energy efficiency, reduces the deviation of generating true random numbers, and improves the output quality of random numbers under different processes, bias voltages and temperature conditions.
Smart Images

Figure CN119088343A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuit hardware, and in particular to a high-reliability true random number generator circuit based on a magnetic tunnel junction and a working method thereof. Background Art
[0002] A random number generator (RNG) is a device or algorithm used to generate a sequence of disordered and randomly occurring numbers or symbols, and is commonly used in the field of information security. Depending on the principle, RNG can be divided into a pseudo-random number generator (PRNG) or a true random number generator (TRNG). PRNG is generally generated by an algorithm and has predictable regularity. It cannot be called a true random number and has low security. TRNG, on the other hand, is derived from unpredictable physical phenomena and uses the randomness brought by the physical chaotic state to generate true random numbers, which has unpredictable characteristics. Since the physical chaotic state is easily affected by the environment, such as temperature, bias voltage, and process deviation, it is necessary to explore a random number generation circuit design method that can provide highly stable output.
[0003] Linear feedback shift register (LFSR) is often used as a random source for random number generators. LFSR consists of multiple registers and multiple XOR gates, with large circuit area and high hardware cost. By utilizing the natural random characteristics of the resistance change process of emerging non-volatile memory devices (such as MTJ), the cost of generating true random numbers can be reduced.
[0004] In the prior art, there is a true random number generator that uses a magnetic tunnel junction (MTJ) as a random source, randomly changes the MTJ state through a magnetic field generator, and reads the MTJ state through a detection circuit. The solution lacks post-processing or a control mechanism based on a feedback loop, and will be affected by process accuracy and environmental fluctuations, and cannot ensure the reliability and randomness of the generated true random numbers.
[0005] In addition, the prior art also has a true random number generator that uses a feedback loop to adjust the write circuit so that the random bit stream generator generates a random bit stream, and a counter and a comparator are needed to compare the random bit stream obtained from the read circuit with the clock signal, thereby adjusting the current value of the write circuit to ensure the randomness of the read random bit stream. Compared with the present invention, the circuit design of this solution requires a larger area and energy cost. Summary of the invention
[0006] Purpose of the invention: To propose a high-reliability true random number generator circuit based on a magnetic tunnel junction and a working method thereof, so as to solve the above-mentioned problems raised by the prior art.
[0007] The first aspect of the present invention proposes a high-reliability true random number generator circuit based on a magnetic tunnel junction, comprising a randomness extraction part and a post-processing part; the randomness extraction part comprises at least one clock control circuit; at least one reset circuit; at least one write circuit; at least one random source; and at least one read circuit.
[0008] The output of the clock control circuit is connected to the write circuit, the reset circuit, and the read circuit respectively; the output of the reset circuit and the write circuit is connected to the random source; the random source is a magnetic tunnel junction MTJ; the output of the random source is connected to the read circuit;
[0009] The post-processing part includes at least one linear modifier, which includes a plurality of shift registers connected in sequence and a plurality of XOR gates; the output of the reading circuit is connected to the linear modifier, and the linear modifier outputs a true random number.
[0010] In a further embodiment of the first aspect, the randomness extraction part specifically includes pMOS transistors P0, P1, P2, P3, P5, P6; nMOS transistors N0, N1, N2, N3, N4, N5, N6; power supplies Vdd and V ddh ; Resistance R ref ; Magnetic tunnel junction MTJ; Inverter.
[0011] Among them, the clock control circuit controls Reset, 、Write、 and CLK signal; pMOS transistor P6, nMOS transistor N6 and power supply V ddh The reset circuit is composed of pMOS transistor P5, nMOS transistor N5 and power supply V ddh MTJ write circuit: pMOS transistors P0, P1, P2, P3, nMOS transistors N0, N1, N2, N3, N4, resistor R ref , power supply V ddh and an inverter form a read circuit.
[0012] In a further embodiment of the first aspect, the clock signal CLK is respectively connected to the pMOS transistor P0 and the pMOS transistor P3; the reset signal Reset is connected to the nMOS transistor N6; The signal is the inversion of the reset signal, which is connected to the pMOS transistor P6; the write signal Write is connected to the nMOS transistor N5; The signal is the inversion of the write signal, which is connected to the pMOS transistor P5; the write current I wr From the power supply V ddh The reset current I flows to the ground line GND through the pMOS transistor P5, the magnetic tunnel junction MTJ and the nMOS transistor N5 in sequence;r From the power supply V ddh The current flows to the ground line GND through the pMOS transistor P6, the magnetic tunnel junction MTJ, and the nMOS transistor N6 in sequence.
[0013] In a further embodiment of the first aspect, the resistor R ref =(R AP +R P ) / 2, where R AP is the resistance of the magnetic tunnel junction MTJ in the antiparallel state AP, R P It is the resistance value of the magnetic tunnel junction MTJ in the parallel state P.
[0014] In a further embodiment of the first aspect, the linear modifier comprises 9 shift registers and 4 XOR gates;
[0015] The shift register consists of 9 edge-triggered master-slave D-type flip-flops;
[0016] The output Vout of the randomness extraction circuit is transmitted to a 9-bit shift register circuit.
[0017] In a further embodiment of the first aspect, the output random bit stream Output is composed of a signal Qs SR0 , Qs SR2 , Qs SR3 , Qs SR4 and Qs SR8 Produced by performing XOR operation.
[0018] The second aspect of the present invention discloses a working method of the true random number generator circuit as described in the first aspect, wherein each time a true random number is generated, it sequentially undergoes a 5ns reset phase, a 2.5ns random write phase, and a 2.5ns read phase.
[0019] In the reset phase: the Reset signal is high, the Write signal and the CLK signal are low; the pMOS transistors P0, P3, P6, and the nMOS transistor N6 are turned on, and the remaining transistors are turned off;
[0020] The complementary output ports Qm and is precharged to V dd At this time, nMOS transistors N3 and N4 are turned on, while pMOS transistors P1 and P2 are turned off; at the same time, the reset current I r From the power supply V ddh The current flows to the ground line GND through the pMOS transistor P6, the magnetic tunnel junction MTJ and the nMOS transistor N6 in turn; the magnetic tunnel junction MTJ flips or stays in the P state. Since the random writes generated in each cycle should be independent of each other, I r Set to Ic0 3 times of that to ensure that the MTJ is 100% reset in the P state.
[0021] In the random write phase: the Write signal is high, the Reset signal and the CLK signal are low; the pMOS transistors P0, P3, P5, and the nMOS transistors N3, N4, and N5 are turned on, while the remaining transistors are turned off; the complementary output ports Qm and Continue to maintain the precharge state; write current I wr From the power supply V ddh It flows to the ground line GND through the pMOS transistor P5, the magnetic tunnel junction MTJ and the nMOS transistor N5 in sequence. Due to the random flipping behavior of the MTJ, the MTJ either flips to the AP state or remains in the P state. By properly setting the parameters of P5 and N5, a 50% flipping probability can be obtained.
[0022] In the read phase: the CLK signal is high, the Reset signal and the Write signal are low; the nMOS transistors N0, N1, N2, N3 and N4 are turned on, and the remaining transistors are turned off; the complementary output ports Qm and Start discharging; the output of the randomness extraction circuit V out The current flowing through the magnetic tunnel junction MTJ and the reference resistor R ref The discharge speed of the current determines: if the magnetic tunnel junction MTJ is in the P state, The MTJ will be discharged to the ground at a rate greater than a predetermined rate because the resistance of the MTJ is lower than a predetermined value; When the voltage is low enough that P2 is open and N4 is closed, V dd Charge Qm, at the same time continues to discharge; as a result, Qm is pulled high, so V out will be low level; otherwise, Qm will discharge to the ground at a rate greater than the preset discharge rate, V out Repeat the above process to obtain the original random bit stream. Since the original data is very sensitive to PVT (process deviation, bias voltage and temperature) changes, a post-processing method is required to maintain a high random entropy.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] (1) The present invention utilizes the random flipping characteristics of MTJ to convert the random state of MTJ into a random bit stream. Compared with the previous TRNG, the circuit design proposed by the present invention has a simplified structure, a more compact area and higher energy efficiency.
[0025] (2) The linear modifier designed by the present invention can effectively reduce the deviation of generating true random numbers, generate random numbers with the expected probability (50%), have high throughput and can improve the random entropy of true random numbers. Under different process, bias and temperature fluctuation conditions, the design proposed by the present invention can obtain high-quality random number output. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic diagram of a magnetic tunnel junction MTJ.
[0027] Figure 2 This is the principle diagram of the linear correction code.
[0028] Figure 3 This is the structural block diagram of a true random number generator.
[0029] Figure 4 This is the working flow diagram of the true random number generator circuit.
[0030] Figure 5 This is the circuit diagram of the randomness extraction part in the true random number generator circuit.
[0031] Figure 6 is the circuit diagram of the linear modifier in the true random number generator circuit. DETAILED DESCRIPTION
[0032] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.
[0033] The technical terms involved in the embodiments of the present disclosure include:
[0034] a. Random Number Generator (RNG): A device or algorithm used to generate a sequence of disordered and randomly appearing numbers or symbols, commonly used in the field of information security. Depending on the principle, RNG can be divided into a pseudo-random number generator (PRNG) or a true random number generator (TRNG). PRNG is generally generated by an algorithm and has predictable regularity. It cannot be called a true random number and has low security. TRNG, on the other hand, comes from unpredictable physical phenomena and uses the randomness brought by the physical chaotic state to generate true random numbers, which has unpredictable characteristics. Since the physical chaotic state is easily affected by the environment, such as temperature, bias voltage, and process deviation, it is necessary to explore a random number generation circuit design method that can provide highly stable output.
[0035] Linear feedback shift register (LFSR) is often used as a random source for random number generators. LFSR consists of multiple registers and multiple XOR gates, with large circuit area and high hardware cost. By utilizing the natural random characteristics of the resistance change process of emerging non-volatile memory devices (such as MTJ), the cost of generating true random numbers can be reduced.
[0036] b. Magnetic Tunnel Junction (MTJ): Magnetic tunnel junction is the basic storage unit of magnetic random access memory (MRAM). Figure 1 MTJ consists of two ferromagnetic layers (such as CoFeB) and an insulating layer (such as MgO). The insulating layer is sandwiched between the two ferromagnetic layers, forming a structure similar to a sandwich. Of the two ferromagnetic layers, the magnetization direction of one remains unchanged, which is called the pinned layer (or fixed layer); the magnetization direction of the other can be flipped in both positive and negative directions, which is called the free layer. When the two ferromagnetic layers of the MTJ have the same magnetization direction, the MTJ is said to be in a parallel state (parallel, P), and when the two ferromagnetic layers of the MTJ are in opposite magnetization directions, it is said to be in an anti-parallel state (anti-parallel, AP). Due to the presence of an insulating layer in the three-layer film structure, the MTJ exhibits resistance characteristics. In the parallel state, the MTJ exhibits a low resistance state; in the anti-parallel state, the MTJ exhibits a high resistance state. This magnetic tunnel junction structure enables the MRAM unit to store and read data according to the magnetization state of the ferromagnetic layer.
[0037] The magnetic tunnel junction (STT-MTJ) driven by the spin transfer torque realizes state flipping through the spin polarized current. The delay of this flipping is not constant, but follows a certain distribution law. Therefore, the magnetic moment flipping of the free layer of the STT-MTJ is random, which leads to the randomness of the duration of its resistance change. The flipping probability Psw can be described as:
[0038] PsW = exp { − t pulse τ 0 exp [ − Δ ( 1 − I I c 0 ) ] }
[0039] Among them, τ0 is the inherent trial time, the typical value is 1ns; t pulse is the current pulse width; I c0 is the threshold current; I is the current size; ∆ is the thermal stability factor. MTJ random flipping can provide a high-quality entropy source for a true random number generator (TRNG). Based on unpredictable physical phenomena, a truly random bit stream can be provided through special circuit design.
[0040] c. Post-processing circuit: Due to limited manufacturing precision, correlation between different process steps, and sensitivity to environmental fluctuations, process, bias, and temperature (PVT) variations have a fatal impact on the randomness of STT-MTJ-based TRNG. Therefore, post-processing or feedback loop-based control mechanisms are required to ensure stable randomness.
[0041] TRNG often encounters deviation problems for very long bit streams. Post-processing functions, namely correctors, are often used in TRNG to reduce or eliminate the statistical weaknesses of physical RNG. This corrector can effectively reduce the deviation of the original bit stream generated by the physical RNG. The randomness of the original bit stream depends on the unpredictability of the physical process. XOR and Von Neumann functions are widely used in practical designs. Although these correctors are useful, their disadvantages are also obvious. XOR is not efficient in enhancing entropy values, and the Von Neumann corrector has a low throughput, which brings unnecessary consumption.
[0042] If a suitable three-dimensional [n, k, d] linear code is used, random deviation can be greatly reduced while maintaining a high data rate (where n is the length, k is the dimension, and d is the distance). BCH code belongs to the cyclic code family, has a very high Hamming distance, and can be derived from a generating polynomial as a linear corrector. BCH code can effectively reduce deviation when used for linear compression. The linear correction function can be constructed using a generating polynomial or a parity check polynomial. The present invention uses BCH code [255, 247, 3] as a linear corrector, and preferably uses a generator polynomial to implement it when less resources are occupied.
[0043] Figure 2 The use of a generating polynomial to implement the BCH code [255, 247, 3] is shown in Figure 11. The generating polynomial g(x) of the BCH code [255, 247, 3] can be expressed as 11D. The hexadecimal 11D can be expressed in binary form as (000100011101)2, and its polynomial form is x 8 +x 4 +x 3 +x 2 +1. The degree of the polynomial is 8, and the rightmost digit represents the coefficient of the constant term (x 0 ). Initially, 9(x i ) is input into a 9-bit shift register. In the next clock cycle, the output bit stream consists of XOR-ing bits x of the shift register. 8 , x 4 , x 3 , x 2 and x 0 , which are determined by the polynomial generator g(x). At the same time, the bits of the other inputs are shifted into the shift register.
[0044] A random number generator is a device or algorithm used to generate a sequence of disordered and randomly occurring numbers or symbols. A true random number generator uses the inherent randomness brought by the physical properties of the device to generate true random numbers. The magnetic tunnel junction (MTJ), the basic unit of magnetic random access memory (MRAM), has natural random characteristics and can provide a high-quality entropy source for TRNG. At present, there are few studies and inventions on high-reliability TRNG circuits based on MTJ. Therefore, the present invention combines the low power consumption and random flipping characteristics of the magnetic tunnel junction (MTJ) and the linear modifier (LC) to correct the random number sequence, and proposes a highly reliable true random number generator circuit design.
[0045] Compared with the previous random number generator, the design proposed in the present invention eliminates the influence of manufacturing process and environmental changes on the circuit through the post-processing circuit, and can generate high-quality random numbers without the need for complex feedback circuits to adjust the random signal extraction circuit, which greatly reduces the complexity of the design, thereby reducing hardware overhead and energy consumption while improving stability under different temperature and bias conditions. The proposed linear corrector as a post-processing circuit can effectively reduce the deviation of the generated true random numbers, has high throughput and can improve the random entropy of the true random numbers.
[0046] This embodiment discloses a highly reliable true random number generator circuit based on a magnetic tunnel junction, which generates random numbers by using the random flipping behavior of STT-MTJ. The architecture of the proposed TRNG design is as follows: Figure 3 As shown, it includes the randomness extraction part and the post-processing part; its workflow is as follows Figure 4 shown.
[0047] Specifically, the randomness extraction circuit of the true random number generator of the present invention is as follows: Figure 5 As shown. The transistors used in the figure are configured to obtain the desired flip probability (50%). The magnetic tunnel junction MTJ is used as a random signal source to provide the original random signal, pMOS transistors P0, P1, P2, P3, P5 and P6, nMOS transistors N0, N1, N2, N3, N4, N5 and N6, power supplies Vdd and V ddh , resistor R ref =(R AP +R P ) / 2, where R AP is the resistance of the magnetic tunnel junction MTJ in the antiparallel state AP, R P is the resistance of the magnetic tunnel junction MTJ in the parallel state P. CLK is the clock signal; Reset is the reset signal, The signal is the inversion of the Reset signal; Write is the write signal. The signal is the inversion of the Write signal.wr is the write current, I r is the reset current.
[0048] The randomness extraction part includes a random source, a clock control circuit, a reset circuit, a write circuit, and a read circuit. The random source is a magnetic tunnel junction (MTJ); the clock control circuit controls the reset, 、Write、 and CLK signal; pMOS transistor P6, nMOS transistor N6 and power supply V ddh The reset circuit is composed of pMOS transistor P5, nMOS transistor N5 and power supply V ddh MTJ write circuit: pMOS transistors P0, P1, P2, P3, nMOS transistors N0, N1, N2, N3, N4, resistor R ref , power supply V ddh and an inverter form a read circuit.
[0049] The operation of the true random number generator consists of three phases (reset phase 5ns, write and read phases 2.5ns each):
[0050] Reset: In this phase, Reset is high, Write and CLK are low. P0, P3, P6 and N6 are turned on, while the rest of the transistors are turned off. The complementary output ports Qm and is precharged to “V dd At this time, N3 and N4 will be turned on, while P1 and P2 will be turned off. At the same time, I r From V ddh Flows to the ground line through P6, MTJ and N6 in turn. MTJ flips or stays in the P state. Since the random writes generated in each cycle should be independent of each other, I r Set to I c0 3 times of that to ensure that the MTJ is 100% reset in the P state.
[0051] Random Write: During the random write phase, Write is high, Reset and CLK are low. P0, P3, N3, N4, P5 and N5 are turned on, while the rest of the transistors are turned off. Qm and Continue to maintain the pre-charge state. wr From V ddh It flows to the ground line through P5, MTJ and N5 in sequence. Due to the random flipping behavior of MTJ, MTJ either flips to AP state or remains in P state. By properly setting the parameters of P5 and N5, a 50% flipping probability can be obtained.
[0052] Read: During the read phase, CLK is high, Reset and Write are low. N0, N1, N2, N3 and N4 are turned on, while the rest of the transistors are turned off. Qm and Start discharging. Since the total resistance of the two discharge branches is different, the discharge current is also different. Therefore, V out The current flowing through the MTJ and the reference resistor (R ref =(R p +R ap ) / 2) is determined by the discharge speed of the current. If the MTJ is in the P state, The MTJ will discharge to the ground line faster due to its lower resistance. When the voltage is low enough that P2 is open and N4 is closed, V dd Charge Qm, at the same time continues to discharge; as a result, Qm is pulled high, so V out On the contrary, Qm will discharge to the ground faster, V out The original random bit stream can be obtained by setting the high level. Since the original data is very sensitive to PVT (process deviation, bias voltage and temperature) changes, a post-processing method is required to maintain a high random entropy.
[0053] Post-processing part: The hardware implementation of BCH code [255, 247, 3] requires 9 registers and 4 XOR gates, g(x)=x 8 +x 4 +x 3 +x 2 +1. Figure 6 As shown in the figure, the shift register consists of 9 edge-triggered master-slave D-type flip-flops connected in a serial-input serial-output (SISO) shift register mode. When the clock signal is at the falling edge, the output (Vout) of the randomness extraction circuit is transferred to the 9-bit shift register (SR0 to SR8) circuit. In this way, the original random data is transferred to the shift register. At the same time, the output random bit stream Output is generated by the signal Qs SR0 , Qs SR2 , Qs SR3 , Qs SR4 and Qs SR8Perform an XOR operation to generate. One or more of the above disclosed elements may include or be implemented as: a processing circuit, such as hardware including a logic circuit; a hardware / software combination, such as a processor that executes software; or a combination thereof. For example, the processing circuit may more specifically include, but is not limited to, a central processing unit (CPU), an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a system on a chip (SoC), a programmable logic unit, a microprocessor, an application-specific integrated circuit (ASIC), etc. The true random number generator TRNG disclosed in the above embodiment can use any magnetic tunnel junction (MTJ) that controls the flip probability by current. In addition, the linear modifier proposed in the above embodiment is used for post-processing of the true random number generator TRNG, and the original random bit stream obtained from the MTJ is processed, which can effectively reduce the deviation, thereby generating a random number with a desired probability (50%). Under different processes, bias voltages and temperature fluctuations, the design proposed in the present invention can obtain high-quality random number outputs.
[0054] Although example embodiments of the inventive concept have been specifically shown and described, it will be understood by those skilled in the art that changes in form and detail may be made therein without departing from the spirit and scope of the appended claims, such as using other types of non-volatile memory, such as phase change memory (PRAM) or resistive random memory (RRAM), etc., to replace STT-MRAM, which also has random flipping properties and can be used as a random source for a true random number generator. Another example is using STT-MRAM in combination with other types of non-volatile memory or physical effects to expand the source of randomness, thereby obtaining a higher entropy value and ultimately obtaining a more efficient random number output. Similar to the above-mentioned scheme replacement without departing from the spirit and scope of the appended claims should be included in the scope of protection of this application.
Claims
1. A highly reliable true random number generator circuit based on a magnetic tunnel junction, characterized in that: It includes a randomness extraction part and a post-processing part; the randomness extraction part includes: at least one clock control circuit; at least one reset circuit; at least one write circuit; at least one source of randomness; at least one read circuit; The output of the clock control circuit is respectively connected to the write circuit, the reset circuit, and the read circuit; the output of the reset circuit and the write circuit is connected to the random source; the random source is a magnetic tunnel junction MTJ; the output of the random source is connected to the read circuit; The post-processing part includes at least one linear modifier, which includes a plurality of shift registers connected in sequence and a plurality of XOR gates; the output of the reading circuit is connected to the linear modifier, and the linear modifier outputs a true random number.
2. The high-reliability true random number generator circuit based on a magnetic tunnel junction according to claim 1, characterized in that: The randomness extraction part specifically includes pMOS transistors P0, P1, P2, P3, P5, P6; nMOS transistors N0, N1, N2, N3, N4, N5, N6; power supply V dd and V ddh ; Resistance R ref ; Magnetic tunnel junction MTJ; Inverter; Among them, the clock control circuit controls Reset, 、Write、 and CLK signal; pMOS transistor P6, nMOS transistor N6 and power supply V ddh The reset circuit is composed of pMOS transistor P5, nMOS transistor N5 and power supply V ddh MTJ write circuit; pMOS transistors P0, P1, P2, P3, nMOS transistors N0, N1, N2, N3, N4, resistor R ref , power supply V ddh and an inverter form a read circuit.
3. The high-reliability true random number generator circuit based on a magnetic tunnel junction according to claim 2, characterized in that: The clock signal CLK is connected to the pMOS transistor P0 and the pMOS transistor P3 respectively; The reset signal Reset is connected to the nMOS transistor N6; The signal is the inversion of the reset signal, which is connected to the pMOS transistor P6; The write signal Write is connected to the nMOS transistor N5; The signal is the inversion of the write signal, which is connected to the pMOS transistor P5; Write current I wr From the power supply V ddh Flows to the ground line GND through the pMOS transistor P5, the magnetic tunnel junction MTJ and the nMOS transistor N5 in sequence; Reset current I r From the power supply V ddh The current flows to the ground line GND through the pMOS transistor P6, the magnetic tunnel junction MTJ, and the nMOS transistor N6 in sequence.
4. The high-reliability true random number generator circuit based on magnetic tunnel junction according to claim 2, characterized in that: The resistor R ref =(R AP +R P ) / 2, where R AP is the resistance of the magnetic tunnel junction MTJ in the antiparallel state AP, R P It is the resistance value of the magnetic tunnel junction MTJ in the parallel state P.
5. The high-reliability true random number generator circuit based on magnetic tunnel junction according to claim 1, characterized in that: The linear modifier includes 9 shift registers and 4 XOR gates; The shift register consists of 9 edge-triggered master-slave D-type flip-flops; The output of the randomness extraction circuit V out is transferred to the 9-bit shift register circuit.
6. The high-reliability true random number generator circuit based on magnetic tunnel junction according to claim 5, characterized in that: The output random bit stream Output is composed of the signal Qs SR0 , Qs SR2 , Qs SR3 , Qs SR4 and Qs SR8 Produced by performing XOR operation.
7. A working method of a high-reliability true random number generator circuit according to any one of claims 1 to 6, characterized in that: Each time a true random number is generated, it goes through a 5ns reset phase, a 2.5ns random write phase, and a 2.5ns read phase.
8. The working method of the high-reliability true random number generator circuit according to claim 7, characterized in that: In the reset phase: the Reset signal is high, the Write signal and the CLK signal are low; the pMOS transistors P0, P3, P6, and the nMOS transistor N6 are turned on, and the remaining transistors are turned off; The complementary output ports Qm and is precharged to V dd At this time, nMOS transistors N3 and N4 are turned on, while pMOS transistors P1 and P2 are turned off; at the same time, the reset current I r From the power supply V ddh The current flows to the ground line GND through the pMOS transistor P6, the magnetic tunnel junction MTJ and the nMOS transistor N6 in sequence; the magnetic tunnel junction MTJ flips or stays in the P state; In the random write phase: the Write signal is high, the Reset signal and the CLK signal are low; the pMOS transistors P0, P3, P5, and the nMOS transistors N3, N4, and N5 are turned on, while the remaining transistors are turned off; The complementary output ports Qm and Continue to maintain the precharge state; write current I wr From the power supply V ddh Flows to the ground line GND through the pMOS transistor P5, the magnetic tunnel junction MTJ and the nMOS transistor N5 in sequence; In the read phase: the CLK signal is high, the Reset signal and the Write signal are low; the nMOS transistors N0, N1, N2, N3 and N4 are turned on, and the remaining transistors are turned off; the complementary output ports Qm and Start discharging and obtain the original random bits.
9. The working method of the high-reliability true random number generator circuit according to claim 8, characterized in that: The complementary output ports Qm and Start discharging and obtain the original random bit stream, including: The output of the randomness extraction circuit V out The current flowing through the magnetic tunnel junction MTJ and the reference resistor R ref The discharge speed of the current determines: if the magnetic tunnel junction MTJ is in the P state, Discharging to the ground line at a rate greater than a predetermined rate because the resistance of the MTJ is lower than a predetermined value; when When the voltage is low enough that P2 is open and N4 is closed, V dd Charge Qm, at the same time continues to discharge; as a result, Qm is pulled high, so V out will be low level; otherwise, Qm will discharge to the ground at a rate greater than the preset discharge rate, V out will be high level; Repeat the above process to obtain the original random bit stream.
