Method, hardware unit and neural network for performing digital XOR operations
By designing a hardware unit composed of magnetic junctions and transistors, and using spin transfer torque and spin-orbit interaction torque programming, efficient digital XOR operations in deep learning neural networks are realized, solving the problem of low efficiency of multiplication and accumulation operations and simulation processing. Noise problem, improves the computing performance and anti-interference ability of neural networks.
Patent Information
- Application Number
- CN201811243986.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-02-01
- Filing Date
- 2018-10-24
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2038-10-24
AI Technical Summary
The multiplication and accumulation operations in existing deep learning neural networks are inefficient, resulting in computationally intensive problems, and the simulation processing is affected by noise and process changes, making it difficult to realize digital implementation with low noise and resistance to process changes.
Design a hardware unit that includes multiple pairs of magnetic junctions, output transistors and selection transistors. Through spin transfer torque and spin-orbit interaction torque programming, digital exclusive-OR operations are implemented, weights are stored and local processing is performed, reducing dependence on DRAM. .
It realizes efficient digital exclusive-OR operation, reduces the impact of noise and process changes, improves the computing performance and anti-interference ability of the neural network, and avoids the loss of information in analog processing.
Smart Images

Figure CN109712656B_ABST
Abstract
Description
Technical Field
[0001] The inventive concept relates to a hardware unit and method for performing a digital XOR on an input signal and a weight. Background Art
[0002] Applications involving deep learning neural networks (NNs) or neuromorphic computing (e.g., image recognition, natural language processing, and more generally various pattern matching or classification tasks) are rapidly becoming as important as general computing. The basic computational element (or neuron) of a neural network multiplies a set of input signals by a set of weights and sums the products. Thus, neurons perform vector-matrix products or multiply-accumulate (MAC) operations. Neural networks generally include a large number of interconnected neurons, each of which performs a multiply-accumulate operation. Therefore, the operation of neural networks is computationally intensive.
[0003] The performance of neural networks can be improved by improving the efficiency of multiplication-accumulation operations. It would be desirable to store weights locally to reduce the power and frequency of dynamic random access memory (DRAM) accesses. It may also be desirable to perform multiplication-accumulation operations in digital form to help reduce noise and process variability. Binary neurons may be able to achieve these goals. It has been shown that a feasible binary neuron can be constructed through an XNOR operation. The weights w of such an XNOR neuron are mathematically 1 and -1, and are represented digitally as 1 and 0. The signal x is also 1 and -1, and is represented digitally by 1 and 0. The multiplication operation p is only performed when both x and w are 1, and both x and w are -1 (0 in Boolean representation). i =w i x i The result is positive. This is exactly the logical negation form (XOR) of the exclusive OR (XOR) operation. Therefore, the product of each weight and signal can be completed by the exclusive OR logic unit. The complete multiplication and accumulation operation of a given neuron is expressed as Or represented by the Boolean term sum = 2Count(XNOR(w,x))-n. The count operation counts the number of non-zero results of the XNOR expression, and n is the total number of inputs to the neuron. The result is then thresholded based on the deviation, resulting in a high or low output of the neuron. The entire process is digital. There is no information loss associated with analog processing.
[0004] Although such binary networks require substantially more neurons than analog (or multi-bit digital) networks for the same level of overall accuracy, a purely digital implementation may be desirable when noise reduction and immunity to process variations are critical goals. Thus, an improved XNOR logic cell is desired to enhance the operation of digital neural networks or other logic operations. Summary of the invention
[0005] The present invention describes a hardware unit and method for performing a digital XOR operation of an input signal and a weight. The hardware unit includes an input line, a plurality of pairs of magnetic junctions, an output transistor, and at least one selection transistor. The input line receives the input signal and the complement of the input signal. The plurality of pairs of magnetic junctions are coupled to the input line and store the weight. Each pair of magnetic junctions includes a first magnetic junction and a second magnetic junction. Each magnetic junction includes a reference layer, a free layer, and a non-magnetic separation layer between the reference layer and the free layer. The free layer has a plurality of stable magnetic states and can be programmed using at least one of a spin-transfer torque (STT) and a spin-orbit interaction torque (SOT). The first magnetic junction receives the input signal. The second magnetic junction receives the complement of the input signal. The output transistor is coupled to the magnetic junction so that each pair of magnetic junctions forms a voltage divider. The output transistor forms a sense amplifier. The at least one selection transistor is coupled to the plurality of output transistors.
[0006] The hardware unit may perform XOR operations digitally and efficiently and may be insensitive to global processing variations.
[0007] The present invention describes a neural network. The neural network includes a plurality of XOR units and a plurality of lines. Each of the plurality of XOR units performs a digital XOR operation of an input signal and a weight, each of the plurality of XOR units includes a pair of input lines, a plurality of pairs of magnetic junctions coupled to the pair of input lines, a plurality of output transistors and at least one selection transistor, the pair of input lines receiving the input signal and the input signal complement, the plurality of pairs of magnetic junctions coupled to the pair of input lines and storing the weight, each pair of magnetic junctions including a first magnetic junction and a second magnetic junction, each of the first magnetic junction and the second magnetic junction including a reference layer, a free layer and a non-magnetic separation layer between the reference layer and the free layer, the free layer having a plurality of stable magnetic states and being programmable using at least one of a spin transfer torque and a spin-orbit interaction torque, the first magnetic junction receiving the input signal, the second magnetic junction receiving the input signal complement, the plurality of output transistors coupled to the plurality of pairs of magnetic junctions so that each pair of magnetic junctions forms a voltage divider, the plurality of output transistors form a sense amplifier, and the at least one selection transistor coupled to the plurality of output transistors. The plurality of lines are coupled to the plurality of XOR units. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a block diagram illustrating an exemplary embodiment of a hardware XOR unit.
[0009] Figure 2 is a block diagram illustrating an exemplary embodiment of a portion of a neural network that includes multiple XNOR units and performs multiplication and accumulation operations.
[0010] Figure 3 An exemplary embodiment of a hardware unit for performing a digital XOR operation is shown.
[0011] Figure 4A and Figure 4B An exemplary embodiment of a magnetic junction that may be used in a hardware unit that performs a digital XOR operation is shown.
[0012] Figure 5 An exemplary embodiment of an optional input stage of a digital hardware XOR unit is shown.
[0013] FIG. 6A to FIG. 6E is a timing diagram illustrating the operation of an exemplary embodiment of a hardware unit for performing a digital XOR operation.
[0014] Figure 7 An exemplary embodiment of another hardware unit for performing digital XOR operations is shown.
[0015] Figure 8 is a flow chart illustrating an exemplary embodiment of a method of performing an XOR operation using an exemplary embodiment of a hardware unit.
[0016] [Explanation of Symbols]
[0017] 100: same or unit / hardware same or unit / device;
[0018] 100-1, 100-2, 100-3, 100-4: same or same unit;
[0019] 100A: Same OR unit / hardware unit;
[0020] 100B: same or unit / hardware unit / device;
[0021] 102, 104: input line / input / line;
[0022] 106: output line / output / XOR output;
[0023] 108: output line / XOR output / output;
[0024] 110, 120: magnetic knot group / pair / group / magnetic knot pair / magnetic knot;
[0025] 112, 114, 122, 124: magnetic knot;
[0026] 115, 125: reference layer;
[0027] 116, 126: non-magnetic separation layer;
[0028] 117, 127: free layer;
[0029] 130: output transistor;
[0030] 132, 134: output transistor / transistor;
[0031] 140, 140B, 142, 144: selection transistor;
[0032] 140A: select transistor / select input;
[0033] 150, 150A: input level;
[0034] 152, 154: Multiplexer;
[0035] 160: Delay / Delay block;
[0036] 180: part / binary neuron / neuron;
[0037] 182: bit count and sign block;
[0038] 200, 200A, 200B, 200C, 200D: curve graph / timing diagram;
[0039] 202, 202A, 202B, 202D: x;
[0040] 202C: x / input x;
[0041] 204, 204A, 204B: x_bar / complement x_bar;
[0042] 204C:x_bar;
[0043] 204D: x_bar / input signal complement x_bar;
[0044] 206, 206A, 206B, 206C, 206D: same or output voltage;
[0045] 208, 208A, 208B, 208C, 208D: XOR output voltage;
[0046] 300: Method / Process;
[0047] 302, 304, 306, 308, 310: steps;
[0048] Vdd: supply voltage;
[0049] x: signal / input / input signal;
[0050] x_bar: complement of input / complement of input signal / complement;
[0051] x_value, x_value_bar: signal;
[0052] x1, x2, x3, x4: input;
[0053] x1_bar, x2_bar, x3_bar, x4_bar: complement of the input. DETAILED DESCRIPTION
[0054] The exemplary embodiments relate to XOR logic devices that can be used in various fields including but not limited to machine learning, artificial intelligence, neuromorphic computing, and neural networks. The methods and systems can be extended to other applications in which logic devices are used. The following description is presented to enable a person of ordinary skill in the art to make and use the invention, and the following description is provided in the context of a patent application and its requirements. Various modifications to the exemplary embodiments and general principles and features described herein will be apparent. The exemplary embodiments are mainly described with respect to the specific methods and systems provided in the specific embodiments. However, the methods and systems will also function effectively in other embodiments.
[0055] Phrases such as "exemplary embodiment", "one embodiment", and "another embodiment" may refer to the same or different embodiments and multiple embodiments. The embodiments will be described with respect to systems and / or devices having certain components. However, the systems and / or devices may include more or fewer components than those shown in the figures, and the arrangement and type of components may vary without departing from the scope of the invention. The exemplary embodiments will also be described in the context of specific methods having certain steps. However, the methods and systems will also work effectively for other methods having different and / or additional steps and steps in different orders that do not contradict the exemplary embodiments. Therefore, the present invention is not intended to be limited to the embodiments shown in the figures, but is intended to be consistent with the widest scope consistent with the principles and features described herein.
[0056] The terms "a and an," "the," and similar references used in the context of describing the invention (especially in the context of the following claims) are intended to cover both the singular and the plural, unless otherwise indicated herein or clearly contradicted by context. The terms "comprising," "having," "including," and "containing" are intended to be considered open-ended terms (i.e., meaning "including but not limited to") unless otherwise noted.
[0057] Unless otherwise defined, the meaning of all technical and scientific terms used herein is the same as that commonly understood by those of ordinary skill in the art to which the present invention belongs. It should be noted that, unless otherwise specified, any and all examples or exemplary terms provided herein are used only to better illustrate the present invention and are not intended to limit the scope of the present invention. In addition, unless otherwise defined, all terms defined in commonly used dictionaries may not be over-interpreted.
[0058] The present invention describes a hardware unit and method for performing a digital XOR operation of an input signal and a weight. The hardware unit includes an input line, a plurality of pairs of magnetic junctions, an output transistor, and at least one selection transistor. The input line receives the input signal and the complement of the input signal. The plurality of pairs of magnetic junctions are coupled to the input line and store the weight. Each pair of magnetic junctions includes a first magnetic junction and a second magnetic junction. Each magnetic junction includes a reference layer, a free layer, and a non-magnetic separation layer between the reference layer and the free layer. The free layer has a plurality of stable magnetic states and can be programmed using at least one of a spin transfer torque (STT) and a spin-orbit interaction torque (SOT). The first magnetic junction receives the input signal. The second magnetic junction receives the complement of the input signal. The output transistor is coupled to the magnetic junction so that each pair of magnetic junctions forms a voltage divider. The output transistor forms a sense amplifier. The at least one selection transistor is coupled to the plurality of output transistors.
[0059] Figure 1 is a high-level block diagram illustrating an exemplary embodiment of a hardware XNOR unit 100. For simplicity, only a portion of the XNOR unit 100 is shown. The XNOR unit 100 performs an XNOR operation on the input signal and the weight in digital form. Therefore, the XNOR unit 100 can be regarded as a neuromorphic computing unit.
[0060] The XOR cell 100 includes at least two magnetic junction groups 110 and 120, an output transistor 130, and a selection transistor 140. In some embodiments, an input stage ( Figure 1 106 and 108. The input lines 102 and 104 receive the input signal and the complement of the input signal, respectively. The output line 106 provides the result of the XOR operation. The optional output line 108 provides the complement of the output of interest. In other words, an XOR is provided on the output line 108.
[0061] The XOR cell 100 includes at least four magnetic junctions organized into pairs / groups 110 and 120. In other embodiments, the magnetic junction groups 110 and 120 may include more than two magnetic junctions. Each of the magnetic junctions includes a reference layer, a free (data storage) layer, and a non-magnetic spacer layer located between the reference layer and the free layer. The reference layer and the free layer are ferromagnetic and may be multilayered. The reference layer magnetic moment may be substantially fixed, while the free layer magnetic moment may switch between stable states. In some embodiments, the non-magnetic spacer layer is a tunnel barrier. In such an embodiment, the magnetic junction is a magnetic tunneling junction (MTJ). In other embodiments, the non-magnetic spacer layer may be a conductor or other layer. Each magnetic junction may also include other layers, such as a seed layer, a polarization enhancement layer, a cap layer, an additional non-magnetic spacer layer, an additional reference layer, etc.
[0062] The free layer has two stable magnetic states: the magnetic moment is substantially parallel to the reference layer magnetic moment (low resistance) and the magnetic moment is substantially antiparallel to the reference layer magnetic moment (high resistance). These states correspond to logical "0" and "1". Therefore, the magnetic junction can store the binary / logical weight of the XNOR cell 100. The weight can be programmed into the magnetic junction in a variety of ways including, but not limited to, spin transfer torque (STT) and spin-orbit coupling torque (SOT) (e.g., spin Hall effect). The spin transfer torque originates from the current that passes through the magnetic junction and is driven perpendicular to the plane. The spin-orbit coupling torque is due to the current that is driven in the plane of the free layer close to the magnetic junction. The magnetic junctions in pairs 110 and 120 also serve as resistors in the XNOR cell 100. The magnitude of the resistance depends on the state of the free layer and therefore on the weight stored by the magnetic junction.
[0063] The XNOR cell 100 also includes a plurality of output transistors 130 connected to the magnetic junction pairs 110 and 120. The output transistors are connected such that each pair of magnetic junctions 110 and 120 forms a voltage divider between the inputs 102 (x) and 104 (x_bar). For example, the output transistors 130 may be connected between the first magnetic junction and the second magnetic junction of a pair of magnetic junctions. The output transistors 130 are also interconnected to form a sense amplifier.
[0064] In operation, input x and the complement of input x x_bar are driven by magnetic junction pairs 110 and 120. The resistance of the magnetic junctions within pairs 110 and 120 varies based on the weights programmed into the magnetic junctions. Output transistor 130 is connected so that outputs 106 and 108 are driven to the XOR and XOR of input signal x, respectively, with the weights w stored by the magnetic junctions. Select transistor 140 selects the XOR cell 100 for operation. For example, select transistor 140 may be connected between magnetic junction pairs 110 and 120 and output transistor 130, and may selectively decouple the magnetic junction from output transistor 130. Alternatively, select transistor 140 may be located between output transistor 130 and ground. Thus, select transistor 140 may decouple XOR cell 100 from ground.
[0065] Since the XOR unit 100 is implemented in hardware, the XOR unit 100 can efficiently perform XOR operations. In addition, since the output is in digital form, problems with analog XOR operations can be reduced or eliminated. In addition, the signal output is obtained from a voltage divider that is essentially composed of only magnetic structures. Therefore, the voltage provided by the voltage divider is insensitive to global process changes. The weights are also stored locally in the magnetic junctions 110 and 120, which are both used as non-volatile memory and resistors of the voltage divider. The XOR unit can therefore efficiently perform XOR operations in digital form and have an output that is insensitive to global process changes.
[0066] Figure 2 1 is a block diagram illustrating an exemplary embodiment of a portion 180 of a binary neural network. Portion 180 may be viewed as a binary neuron. Binary neuron 180 performs a multiplication and accumulation (MAC) operation. Binary neuron 180 illustrates a possible use of XNOR unit 100 and is not intended to be limiting.
[0067] Neuron 180 includes a plurality of XNOR units 100-1, 100-2, 100-3, and 100-4 (collectively referred to as XNOR units 100) and a bit count and sign block 182. In this embodiment, it is desired to combine four inputs x1, x2, x3, and x4 with four weights. Therefore, four XNOR units 100 are used. Figure 2 Each of the XNOR units 100-1, 100-2, 100-3 and 100-4 shown in FIG. Figure 1 The OR unit 100 shown in FIG. 1 operates in a similar manner.
[0068] The bit count and sign block 182 counts the number of non-zero results from the four XNOR units 100 and subtracts four (the number of input signals to the neuron 180). The result is then thresholded based on the deviation, resulting in a high or low output for the neuron 180.
[0069] The binary neuron 180 using the XNOR unit 100 can therefore perform a multiply-accumulate operation. Because the binary neuron 180 uses units implemented in hardware, the binary neuron 180 operates efficiently. The multiply-accumulate operation can be performed digitally, which avoids the problems associated with analog XNOR operations. Figure 1 As discussed, the XNOR operation performed by the XNOR unit 100 may also be insensitive to global processing variations. The performance of the binary neuron 180 may thus be improved.
[0070] Figure 3An exemplary embodiment of a hardware unit 100A for performing a digital XOR operation is shown. XOR unit 100A is similar to XOR unit 100 and can be used in binary neuron 180 or other applications. Therefore, portions of XOR unit 100A similar to components in XOR unit 100 are labeled similarly. Therefore, XOR unit 100A includes input lines 102 and 104, magnetic junction pairs 110 and 120, output transistor 130, output lines 106 and 108, and select transistor 140A, which are similar to input lines 102 and 104, magnetic junction pairs 110 and 120, output transistor 130, output lines 106 and 108, and select transistor 140, respectively. An optional input stage 150 is also shown.
[0071] Input lines 102 and 104 carry an input signal x and a complement x_bar of the input signal x, respectively. Input lines 102 and 104 are connected to a pair 110 of magnetic junctions 112 and 114 and a pair 120 of magnetic junctions 122 and 124, respectively. Magnetic junctions 112 and 122 receive the input signal x, while magnetic junctions 114 and 124 receive the complement x_bar of the input signal. During operation, magnetic junctions 112, 114, 122, and 124 act as resistive elements and are therefore shown as resistors. However, the value of the resistance (high or low) depends on the weight stored in each magnetic junction 112, 114, 122, and 124, respectively. For example, the magnetic junction 112 can be programmed using spin transfer torque and / or spin-orbit coupling torque. In each pair of magnetic junctions, a weight and a complement of the weight are stored. Thus, magnetic junctions 114 and 122 can store a weight, while magnetic junctions 112 and 124 store the complement of the weight. Thus, when magnetic junctions 112 and 124 are in a low resistance state, magnetic junctions 114 and 122 are in a high resistance state, and vice versa.
[0072] It may be desirable for magnetic junctions 112 and 114 / pair 110 to have an orientation relative to the substrate opposite that of magnetic junctions 122 and 124 / pair 120. For example, Figure 4A and Figure 4B In one embodiment, magnetic junctions 112 / 114 and 122 / 124 are shown respectively. Magnetic junctions 112 / 114 each include a reference layer 115, a non-magnetic spacer layer 116, and a free layer 117. Reference layer 115 has a substantially fixed magnetic moment. Non-magnetic spacer layer 116 may be a tunnel barrier layer. Free layer 117 has a magnetic moment that can be programmed, for example, via spin-orbit coupling torque and / or spin transfer torque. Similarly, magnetic junctions 122 / 124 each include a reference layer 125, a non-magnetic spacer layer 126, and a free layer 127. Reference layer 125 has a substantially fixed magnetic moment. Non-magnetic spacer layer 126 may be a tunnel barrier layer. Free layer 127 has a magnetic moment that can be programmed, for example, via spin-orbit coupling torque and / or spin transfer torque. As shown from Figure 4A and Figure 4B As can be seen from the comparison of the magnetic junctions 112 / 114, the magnetic junctions 112 / 114 are oriented so that the free layer 117 is farther away from the underlying substrate than the reference layer 115. In contrast, the magnetic junctions 122 and 124 are oriented "bottom-up", where the free layer 127 is closer to the underlying substrate than the reference layer 125. Magnetic junctions 112 and 114 can therefore have a traditional orientation, while magnetic junctions 122 and 124 can have a bottom-up configuration. This configuration enables simpler interconnection of magnetic junctions 112, 114, 122, and 124. In alternative embodiments, the orientation can be switched or all magnetic junctions 112, 114, 122, and 124 can have the same orientation. For example, all magnetic junctions 112, 114, 122, and 124 can have a traditional orientation, or all magnetic junctions 112, 114, 122, and 124 can have a bottom-up orientation. XNOR cell 100A is still used to change orientation, but it may be desirable for XNOR cell 100A to have a slightly different and potentially more complex interconnect structure.
[0073] Return to reference Figure 3 , output transistor 130 includes output transistor 132 and output transistor 134. Output transistors 132 and 134 are cross-coupled. Therefore, the drain of output transistor 132 is connected between magnetic junctions 112 and 114 and connected to XOR output 108. The gate of output transistor 132 is connected to output 106 and the drain of output transistor 134. The drain of output transistor 134 is connected between magnetic junctions 122 and 124 and connected to XOR output 106. The gate of output transistor 134 is connected to output 108 and the drain of output transistor 132. Therefore, output transistor 132 and output transistor 134 form a sense amplifier for the voltage between magnetic junction 112 and magnetic junction 114 and the voltage between magnetic junction 122 and magnetic junction 124.
[0074] The select transistor 140A is connected between ground and the sources of the output transistors 132 and 134. Thus, the XNOR cell 100A is operational when enabled by the select input.
[0075] An optional input stage 150 may be used to facilitate the operation of the XOR cell 100A. If the input stage is omitted, x and x_bar are simply signals x_value and x_value_bar, respectively. If the input stage 150 is used, the input signals x and x_bar are signals x_value and x_value_bar for a portion of the operating cycle and are driven high for the remainder of the operating cycle. For example, the input stage 150 may provide x_value and x_value_bar as x and x_bar for the first clock cycle and provide high inputs for both x and x_bar for the second clock cycle. The operation of the XOR cell 100A then takes two clock cycles to complete. Alternatively, the optional input stage 150 may provide x_value and x_value_bar as x and x_bar for the first portion of the clock cycle and provide high inputs for both x and x_bar for the second portion of the clock cycle. If the input stage 150 is omitted, x and x_bar are simply x_value and x_value_bar. The XOR cell 100A still functions. However, due to the presence of the voltage divider, the high output of the XOR cell 100A is significantly smaller than the supply voltage.
[0076] Figure 5 An exemplary embodiment of an input stage 150A that can be used for an optional input stage 150 is shown. In other embodiments, other circuits can be used. Input stage 150A includes multiplexers 152 and 154 and a delayer 160. Multiplexers 152 and 154 have x_value and x_value_bar as inputs, respectively. Multiplexers 152 and 154 also have a supply voltage Vdd as input. In the first half of the clock cycle, multiplexers 152 and 154 output x_value and x_value_bar as x and x_bar, respectively. After a delay of, for example, half a clock cycle, the delayer block 160 switches the operation of multiplexers 152 and 154. Multiplexers 152 and 154 then output the supply voltage Vdd as both x and x_bar.
[0077] FIG. 6A to FIG. 6E 1 shows a timing diagram of the operation of the XOR unit 100A. Therefore, for all graphs 200, 200A, 200B, 200C, and 200D, the horizontal axis is time and the vertical axis is voltage. The maximum voltage shown may actually be the supply voltage Vdd. Although specific signals are shown, the graphs 200, 200A, 200B, 200C, and 200D are only for illustration purposes and are not intended to represent specific implementations. Figure 3 , Figure 5 and FIG. 6A to FIG. 6E , describing the operation of the XOR unit 100A.
[0078] The operation of the XNOR cell described below is performed after setting weights for the magnetic junctions 112, 114, 122, and 124. The writing of the weights can be performed via spin transfer torque by setting the select input to low, disabling the select transistor 140A. Thus, the magnetic junctions 110 and 120 are effectively decoupled from the output transistors 132 and 134. Applying a write voltage to the input 102 and applying a zero to the input 104 programs the magnetic junctions 112, 114, 122, and 124 to a first set of states. Applying a zero voltage to the input 102 and applying a write voltage to the input 104 programs the magnetic junctions 112, 114, 122, and 124 to an opposite second set of states. All four magnetic junctions 112, 114, 122, and 124 can thus be programmed in a single step. For spin-orbit coupling torque writing, current is driven through a line (not shown) adjacent to free layers 117 and 127 of magnetic junctions 112, 114, 122, and 124. As described above, magnetic junctions 112 and 122 are programmed with weights, while magnetic junctions 114 and 124 are programmed with weight complements.
[0079] After the appropriate weights are programmed into magnetic junctions 112, 114, 122, and 124, the XNOR cell is enabled and provides the appropriate inputs via select input / select transistor 140A. Fig. 6A and Figure 6B Timing diagrams 200 and 200A are shown for the slow clock and the fast clock, respectively, when input 102 (x) is high (x_value=1, x_value_bar=0) and weight w is high (w=1). At the beginning, the inputs on lines 102 and 104 are set to the actual inputs (x=x_value, x_bar=x_value_bar). Input 102 of x 202 / 202A is set high, while input 104 of x_bar 204 / 204A is set low. As used herein, "high" is at or near Vdd, while "low" is near zero, such as about 50 millivolts or less. As in Fig. 6A and Figure 6B As can be seen in FIG. 1 , there is some small delay as x increases to the final value of x. The complement x_bar 204 / 204A is low. As the input of x increases, the XOR output voltage 208 / 208A increases briefly. However, after the sense amplifier formed by transistors 132 and 134 locks, the XOR output voltage 208 / 208A settles to low. Similarly, the XOR output voltage 206 / 206A increases. Due to the presence of the voltage divider, the XOR output voltage 206 / 206A reaches a plateau. This plateau is more significant for slow clocks.
[0080] Input stage 150 / 150A then sends both signals on lines 102 and 104 to Vdd (x=1 and x_bar=1). For fast clock graph 200A, this occurs substantially midway through the clock cycle. Since both inputs 102 and 104 are high, current no longer flows through the voltage divider formed by magnetic junctions 112 and 114 and magnetic junctions 122 and 124. Therefore, XNOR output voltage 206 / 206A stabilizes at high. Therefore, for x_value=1, w=1, XNOR=1 and XOR=0.
[0081] Figure 6C Timing diagram 200B shows the case where input 102 is low (x_value=0, x_value_bar=1) and weight w is high (w=1). At the beginning, the inputs on lines 102 and 104 are set to the actual inputs (x=x_value, x_bar=x_value_bar). Input 102 of x 202B is set to low, and input 104 of x_bar 204B is set to high. Figure 6C As can be seen in FIG. 1 , there is some small delay as the complement x_bar 204B increases to the final value of the complement x_bar 204B. The input x is low. As the input of x_bar increases, the XNOR output voltage 206B increases briefly. However, after the sense amplifier formed by transistors 132 and 134 locks, the XNOR output voltage 206B settles to low. Similarly, the XNOR output voltage 208B increases. Due to the presence of the voltage divider, the XNOR output voltage 208B reaches a plateau. The input stage 150 / 150A then sends the two signals on lines 102 and 104 to Vdd (x=1 and x_bar=1). Since both inputs 102 and 104 are high, current no longer flows through the voltage divider formed by magnetic junctions 112 and 114 and magnetic junctions 122 and 124. Therefore, the XNOR output voltage 208B settles to high. Therefore, for x_value=0, w=1, XNOR=0 and XOR=1.
[0082] Fig.6D Timing diagram 200C is shown for the case where input 102 is high (x_value=1, x_value_bar=0) and weight w is low (w=0). At the beginning, the inputs on lines 102 and 104 are set to the actual inputs (x=x_value, x_bar=x_value_bar). Input 102 of x 202C is set high, while input 104 of x_bar 204C is set low. Fig.6DAs can be seen in FIG. 1 , there is some small delay as input x 202C increases to the final value of input x 202C. The complement x_bar is low. As the input x increases, the XNOR output voltage 206C increases briefly. However, after the sense amplifier formed by transistors 132 and 134 locks, the XNOR output voltage 206C settles to low. Similarly, the XNOR output voltage 208C increases. Due to the presence of the voltage divider, the XNOR output voltage 208C reaches a plateau. The input stage 150 / 150A then sends the two signals on lines 102 and 104 to Vdd (x=1 and x_bar=1). Since both inputs 102 and 104 are high, current no longer flows through the voltage divider formed by magnetic junctions 112 and 114 and magnetic junctions 122 and 124. Therefore, the XNOR output voltage 208C settles to high. Therefore, for x_value=1, w=0, XNOR=0 and XOR=1.
[0083] Fig. 6E Timing diagram 200D shows the case where input 102 is low (x_value=0, x_value_bar=1) and weight w is low (w=0). At the beginning, the inputs on lines 102 and 104 are set to the actual inputs (x=x_value, x_bar=x_value_bar). Input 102 of x 202D is set to low, while input 104 of x_bar 204D is set to high. Fig. 6E As can be seen in FIG. 1 , there is some small delay as the input signal complement x_bar 204D increases to the final value of the input signal complement x_bar 204D. The input signal x is low. As the input of x_bar increases, the XOR output voltage 208D increases briefly. However, after the sense amplifier formed by transistors 132 and 134 locks, the XOR output voltage 208D settles to low. Similarly, the XOR output voltage 206D increases. Due to the presence of the voltage divider, the XOR output voltage 206D reaches a plateau. The input stage 150 / 150A then sends the two signals on lines 102 and 104 to Vdd (x=1 and x_bar=1). Since both inputs 102 and 104 are high, current no longer flows through the voltage divider formed by magnetic junctions 112 and 114 and magnetic junctions 122 and 124. Therefore, the XOR output voltage 206D settles to high. Therefore, for x_value=0, w=0, XNOR=1 and XOR=0.
[0084] Therefore, the XOR cell 100A has an appropriate truth table. Since the XOR cell 100A is implemented in hardware, the XOR cell 100A can efficiently perform XOR operations. In addition, since the output is in digital form, problems with analog XOR operations can be reduced or eliminated. For example, electrical noise and irrecoverable signal loss due to IR drop can be avoided. In addition, the signal output is obtained from a voltage divider essentially composed of magnetic structures. Therefore, the voltage provided by the voltage divider is insensitive to global process changes. The weights are also stored locally in the magnetic junctions 110 and 120, which are both used as non-volatile memory and resistors of the voltage divider. Therefore, the time spent on accessing the dynamic random access memory to obtain the weights is avoided. The output of the XOR cell 100A can also be close to zero and Vdd for 0 and 1, respectively. Therefore, a substantially full swing output can be obtained. In addition, the choice of the threshold voltage of the selection transistor 140A may affect the output. For the low threshold voltage (low resistance) of the selection transistor 140A, the pull-up of the output signal is faster. However, for logic 0, there is usually a limited voltage (e.g., about 50 millivolts) instead of a true zero value. For the threshold voltage (higher resistance) of the rule, the pull-up is slower, but the output voltage of logic zero is very low (e.g., about a few millivolts). Therefore, the performance of the XOR unit 100A can be adjusted using the selection transistor 140A. The XOR unit 100A can therefore perform the XOR operation in digital form, quickly and with lower power, and has an output that is insensitive to global processing changes. Although the neural network using the XOR unit 100A may require more neurons to achieve accuracy, this can be at least partially compensated by hardware-aware training (e.g., weight optimization performed under the assumption that the final weight is binary).
[0085] Figure 7 Another exemplary embodiment of a hardware unit 100B for performing digital XOR operations is shown. XOR unit 100B is similar to XOR units 100 and 100A and can be used in binary neurons 180 or other applications. Therefore, parts of XOR unit 100B similar to components in XOR unit 100 and / or XOR unit 100A are similarly labeled. Therefore, XOR unit 100B includes input lines 102 and 104, magnetic junction pairs 110 and 120, output transistor 130, output lines 106 and 108, select transistor 140B and input stage 150, which are similar to input lines 102 and 104, magnetic junction pairs 110 and 120, output transistor 130, output lines 106 and 108, select transistor 140 / 140A and input stage 150 / 150A, respectively.
[0086] The XNOR cell 100B operates in a similar manner to the XNOR cell 100A. However, the select transistor 140B is different from the select transistor 140A. In the XNOR cell 100B, two select transistors 142 and 144 are used. The select transistors 142 and 144 are not connected between the output transistor 130 and the ground, but are coupled between the output transistor 130 and the magnetic junction pair 110 and 120. When the select input enables the select transistors 142 and 144, the select transistors 142 and 144 couple the pairs 110 and 120 to the output transistor 130, respectively.
[0087] The XOR cell 100B shares the benefits of the XOR cell 100A. Since the output is in digital form, the problems with analog XOR operations can be reduced or eliminated. In addition, the signal output is obtained from a voltage divider that is essentially composed of magnetic structures. Therefore, the voltage provided by the voltage divider is insensitive to global process changes. The weights are also stored locally in the magnetic junctions 110 and 120. Therefore, the time spent accessing the dynamic random access memory to obtain the weights is avoided. The output of the XOR cell 100B can be a full-swing output (Vdd and close to 0). Therefore, the selection transistor 140B can be used to adjust the performance of the XOR cell 100B. The XOR cell 100B can therefore perform XOR operations in digital form, quickly and with lower power, and has an output that is insensitive to global process changes.
[0088] Figure 8 300 is a flow chart illustrating an exemplary embodiment of a method for performing an XOR operation using an exemplary embodiment of a hardware unit. For simplicity, some steps may be omitted, performed in another order, and / or combined. Method 300 is also described in the context of XOR unit 100A. However, method 300 may be used in conjunction with another XOR unit (e.g., device 100 and / or 100B).
[0089] The weights are programmed into magnetic junctions 112, 114, 122, and 124 via step 302. Step 302 thus programs the weight w into magnetic junctions 112 and 122 and the weight complement w_bar into magnetic junctions 114 and 124. Although step 302 is shown as part of flow 300, step 302 may be performed prior to and separate from the remaining steps of method 300.
[0090] The signal and the complement of the signal are received, via step 304. Step 304 may include receiving x_value and x_value_bar in the input stage 150. The input is passed to the magnetic junction, via step 306. Thus, x and x_bar are x_value and x_value_bar on input lines 102 and 104, respectively. Thus, the output of the XNOR cell 100A begins to be driven high or low depending on the input and weight. This continues until after the sense amplifier formed by the output transistors 132 and 134 locks.
[0091] Inputs 102 and 104 are driven high for the remainder of the clock cycle or read operation, via step 308. Thus, the output is driven very close to Vdd and zero volts. The output of the XOR cell 100A may then be forwarded, via step 310. Thus, the output of the XOR cell may be provided to the next component in the neural network or to another device to which the XOR cell 100A belongs.
[0092] Thus, using method 300, XOR units 100, 100A, 100B, and / or similar devices may be used. Thus, the advantages of one or more XOR units 100, 100A, 100B, and / or similar devices may be realized. A method and system for performing digital XOR operations in hardware has been described. The method and system have been described in accordance with the exemplary embodiments shown in the figures, and a person of ordinary skill in the art will readily recognize that various changes may be made to the embodiments, and any changes are within the spirit and scope of the method and system. Therefore, various modifications may be made by a person of ordinary skill in the art without departing from the spirit and scope of the appended claims.
Claims
1. A hardware unit that performs a digital XOR operation on an input signal and a weight, It is characterized in that include: A plurality of input lines for receiving the input signal and the complement of the input signal; a plurality of pairs of magnetic junctions coupled to the plurality of input lines and storing the weights, each pair of magnetic junctions comprising a first magnetic junction and a second magnetic junction, each of the first magnetic junction and the second magnetic junction comprising a reference layer, a free layer and a non-magnetic spacer layer between the reference layer and the free layer, the free layer having a plurality of stable magnetic states and being programmable using at least one of a spin transfer torque and a spin-orbit interaction torque, the first magnetic junction receiving the input signal, and the second magnetic junction receiving the complement of the input signal; a plurality of output transistors coupled to the plurality of pairs of magnetic junctions such that each pair of magnetic junctions forms a voltage divider, the plurality of output transistors forming a sense amplifier; as well as At least one selection transistor is coupled to the plurality of output transistors.
2. The hardware unit according to claim 1, It is characterized in that The plurality of output transistors include a first output transistor and a second output transistor, the first output transistor and the second output transistor are cross-coupled, the first output transistor is connected between the first magnetic junction and the second magnetic junction of the plurality of pairs of magnetic junctions and is connected to an XNOR output.
3. The hardware unit according to claim 2, It is characterized in that The first output transistor has a first source, a first drain and a first gate, the second output transistor has a second source, a second drain and a second gate, the first drain is connected between the first magnetic junction and the second magnetic junction of the first pair of magnetic junctions, the first drain is connected to the second gate of the second output transistor and is connected to the XOR output, the first gate is connected to the second drain of the second output transistor, the second drain is connected between the first magnetic junction and the second magnetic junction of the second pair of magnetic junctions, the first magnetic junction of the first pair of magnetic junctions stores the weight and the second magnetic junction of the first pair of magnetic junctions stores the weight complement, the first magnetic junction of the second pair of magnetic junctions stores the weight complement, and the second magnetic junction of the second pair of magnetic junctions stores the weight.
4. The hardware unit according to claim 3, It is characterized in that The second drain is connected to the XOR output.
5. The hardware unit according to claim 3, It is characterized in that The at least one select transistor includes a single select transistor having a select transistor source, a select transistor gate, and a select transistor drain coupled with the first source and the second source.
6. The hardware unit according to claim 3, It is characterized in that The at least one selection transistor includes a first selection transistor and a second selection transistor, the first selection transistor has a first selection transistor source and a first selection transistor drain, the second selection transistor has a second selection transistor source and a second selection transistor gate, the first selection transistor source is connected to the first drain, the first selection transistor drain is connected between the first magnetic junction and the second magnetic junction of the first pair of magnetic junctions, the second selection transistor source is connected to the second drain, and the second selection transistor drain is connected between the first magnetic junction and the second magnetic junction of the second pair of magnetic junctions.
7. The hardware unit according to claim 3, It is characterized in that The second pair of magnetic junctions has an opposite orientation relative to the substrate as the first pair of magnetic junctions, and wherein the first pair of magnetic junctions are bottom-up magnetic junctions.
8. The hardware unit according to claim 3, It is characterized in that Also includes: a pair of signal lines, providing an input signal value on a first signal line and providing a complement value of the input signal on a second signal line; An input stage is coupled to the plurality of input lines, the pair of signal lines and a supply voltage, the input stage providing the input signal value and the input signal complement value to the plurality of input lines during a first portion of a time period and providing the supply voltage to the plurality of input lines during a second portion of the time period.
9. The hardware unit according to claim 8, It is characterized in that The input stage further comprises: a first multiplexer coupled to the first signal line, the supply voltage, and a first input line of the plurality of input lines, the first input line carrying the input signal; and A second multiplexer is coupled to the second signal line, the supply voltage, and a second input line of the plurality of input lines, the second input line carrying the complement of the input signal.
10. The hardware unit according to claim 1, It is characterized in that The nonmagnetic spacer layer is a tunnel barrier layer.
11. A neural network device, It is characterized in that include: a plurality of XNOR cells, each of which performs a digital XNOR operation of an input signal and a weight, each of which comprises a pair of input lines, a plurality of pairs of magnetic junctions coupled to the pair of input lines, a plurality of output transistors, and at least one selection transistor, the pair of input lines receiving the input signal and the input signal complement, the plurality of pairs of magnetic junctions coupled to the pair of input lines and storing the weight, each pair of magnetic junctions comprising a first magnetic junction and a second magnetic junction, each of the first magnetic junction and the second magnetic junction comprising a reference layer, a free layer, and a non-magnetic separation layer between the reference layer and the free layer, the free layer having a plurality of stable magnetic states and being programmable using at least one of a spin transfer torque and a spin-orbit interaction torque, the first magnetic junction receiving the input signal, the second magnetic junction receiving the input signal complement, the plurality of output transistors coupled to the plurality of pairs of magnetic junctions so that each pair of magnetic junctions forms a voltage divider, the plurality of output transistors forming a sense amplifier, and the at least one selection transistor coupled to the plurality of output transistors; and The bit count and sign block is coupled to each of the plurality of XNOR units through a plurality of lines.
12. The neural network device according to claim 11, It is characterized in that The multiple output transistors include a first output transistor and a second output transistor, the first output transistor having a first source, a first drain and a first gate, the second output transistor having a second source, a second drain and a second gate, the first drain being connected between the first magnetic junction and the second magnetic junction of a first pair of magnetic junctions, the first drain being connected to the second gate of the second output transistor and connected to an XOR output, the first gate being connected to the second drain of the second output transistor, the second drain being connected between the first magnetic junction and the second magnetic junction of a second pair of magnetic junctions, the first magnetic junction of the first pair of magnetic junctions storing the weight and the second magnetic junction of the first pair of magnetic junctions storing the weight complement, the first magnetic junction of the second pair of magnetic junctions storing the weight complement, and the second magnetic junction of the second pair of magnetic junctions storing the weight.
13. The neural network device according to claim 12, It is characterized in that Also includes: a pair of signal lines, providing an input signal value on a first signal line and providing a complement value of the input signal on a second signal line; And each of the plurality of XNOR cells comprises an input stage coupled to the pair of input lines, the pair of signal lines and a supply voltage, the input stage providing the input signal value and the input signal complement value to the pair of input lines in a first portion of a time period and providing the supply voltage to the pair of input lines in a second portion of the time period.
14. The neural network device according to claim 13, It is characterized in that The input stage further comprises: a first multiplexer coupled to the first signal line, the supply voltage, and a first input line of the pair of input lines, the first input line carrying the input signal; and A second multiplexer is coupled to the second signal line, the supply voltage, and a second input line of the pair of input lines, the second input line carrying the complement of the input signal.
15. A method for performing a digital XOR operation, It is characterized in that include: receiving an input signal and the complement of the input signal; The input signal and the complement of the input signal are provided to an XOR unit to perform a digital XOR operation of the input signal and a weight, the XOR unit comprising a plurality of pairs of magnetic junctions coupled to a plurality of input lines, a plurality of output transistors and at least one selection transistor, each pair of magnetic junctions storing weights and comprising a first magnetic junction and a second magnetic junction, each of the first magnetic junction and the second magnetic junction comprising a reference layer, a free layer and a non-magnetic separation layer between the reference layer and the free layer, the free layer having a plurality of stable magnetic states and being programmable using at least one of a spin transfer torque and a spin-orbit interaction torque, the first magnetic junction receiving the input signal, the second magnetic junction receiving the complement of the input signal, the plurality of output transistors comprising a first output transistor and a second output transistor, the first output transistor being connected between the first magnetic junction and the second magnetic junction of the plurality of pairs of magnetic junctions and connected to an XOR output, the second output transistor being connected between the first magnetic junction and the second magnetic junction of the plurality of pairs of magnetic junctions, and the at least one selection transistor being coupled to the first output transistor and the second output transistor.
16. The method according to claim 15, It is characterized in that The input signal is a true input signal during a first portion of a clock cycle, the input signal complement is a true input signal complement during the first portion of the clock cycle, the input signal is a logic high signal during a second portion of the clock cycle, and the input signal complement is high during the second portion of the clock cycle.
17. The method according to claim 16, It is characterized in that The first output transistor has a first source, a first drain and a first gate, the second output transistor has a second source, a second drain and a second gate, the first drain is connected between the first magnetic junction and the second magnetic junction of the first pair of magnetic junctions, the first drain is connected to the second gate of the second output transistor and is connected to the XOR output, the first gate is connected to the second drain of the second output transistor, the second drain is connected between the first magnetic junction and the second magnetic junction of the second pair of magnetic junctions, the first magnetic junction of the first pair of magnetic junctions stores the weight and the second magnetic junction of the first pair of magnetic junctions stores the weight complement, the first magnetic junction of the second pair of magnetic junctions stores the weight complement, and the second magnetic junction of the second pair of magnetic junctions stores the weight.
Citation Information
Patent Citations
Magnetic memory and method for providing and programming the magnetic memory
CN104050988A
Magnetic memory, providing method and programming method thereof
CN104051611A
Magnetic junctions having a magnetoelastic free layer programmable using spin transfer torque
CN106711322A
Method and system for providing a sense amplifier and drive circuit for spin transfer torque magnetic random access memory
US20090040855A1
