The present disclosure relates to a semiconductor device and a computing method performed by the semiconductor device, and more particularly, relates to a memory device and a computing method for processing a model computation using the memory device.
In recent days as technology progresses significantly, daily life is closely related to big data, and models can be constructed based on various parameters with big data. Furthermore, model computations can be used to provide solutions for target problems. For example, in view of a target problem of travel route planning, model computations can be used to locate the shortest travel route.
On the other hand, in the field of electronics or semiconductor technology, model computations are often used to adjust process parameters or condition factors of electronic devices or semiconductor components. However, complex electronic devices or semiconductor components involve a large number of parameters or factors and therefore need to perform complex model computations, which may result in time-consuming, energy-consuming or hardware cost-consuming for such model computations. Therefore, any skilled person of related industries in this technical field is dedicated to technical solutions to more efficiently perform model computations.
The present disclosure provides a memory device which includes a memory array for processing a model computation. The model computation has a plurality of input-values, a plurality of self-coefficients, a plurality of mutual-coefficients and a plurality of output-values. The memory array includes a plurality of first-word-lines and a plurality of second-word-lines, a plurality of first-bit-lines and a plurality of second-bit-lines, and, a plurality of common-source-lines and a plurality of memory cells. The memory cells respectively receive the input-values through the first-word-lines, receive inverted logic values of the input-values through the second-word-lines, receive the input-values through the first-bit-lines, receive the inverted logic values through the second-bit-lines and output the output-values through the common-source-lines. Wherein, each of the memory cells performs a logic XNOR operation according to each of the input-values and each of the inverted logic values to obtain a first computation result, and multiplies each of the first computation results by one of the self-coefficients or one of the mutual-coefficients to obtain each of the output-values.
The present disclosure also provides a computing method which includes the following steps. Receiving a plurality of input-values of a model computation through a plurality of first-word-lines of a memory array. Receiving inverted logic values of the input-values through a plurality of second-word-lines of the memory array. Receiving the input-values through a plurality of first-bit-lines of the memory array. Receiving the inverted logic values through a plurality of second-bit-lines of the memory array. Performing a logic XNOR operation according to each of the input-values and each of the inverted logic values to obtain a first computation result. Multiplying each of the first computation results by one of the self-coefficients of the model computation or one of the mutual-coefficients of the model computation to obtain a plurality of output-values of the model computation. And, outputting the output-values respectively through a plurality of common-source-lines of the memory array.
In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the disclosed embodiments. It will be apparent, however, that one or more embodiments may be practiced without these specific details. In other instances, well-known structures and devices are schematically illustrated in order to simplify the drawing.
Furthermore, referring to
The operator symbol of “*” in equation (1) represents a logic XNOR operation. If the input-values σi and σj have the same logic value (for example, “1, 1” or “0, 0”), the result of the logic XNOR operation is “1”. If the input-values σi and σj have different logic values (for example, “1, 0” or “0, 1”), the result of the logic XNOR operation is “0”. In the embodiment illustrated in
H=h
1σ1+h2σ2+h3σ3+J12(σ1*σ2)+J13(σ1*σ3)+J23(σ2*σ3) (2)
H
j
=h
jσj+Σi,j<jJij(σi*σj),j=1,2,3,4 (3)
Then, the updating circuit 320 may compare each of the total-output-values H1 to H4 with a threshold value Hth according to the majority vote rule. If the j-th total-output-value Hj is greater than the threshold value Hth, the updating circuit 320 returns a control signal SP_IN(σj) to the spin operator 310 to update the j-th input-value σj. For example, the input-value σj is flipped from logic value “1” to logic value “0”. Then, the spin operator 310 performs the Ising model computing again according to the updated input-value σj and other input-values which maintain the original logic value, and the updating circuit 320 determines whether updating is needed again, until the lowest energy Hmin is located.
In the technical solution of the present disclosure, a semiconductor memory device can be used to implement the spin operator 310 to process Ising model computations.
In addition, the first transistor Ma has a first threshold voltage Vtha. The relationship between the first-gate-voltage VGa, the first-drain-voltage VDa and the first-source-current ISa of the first transistor Ma can be expressed as equation (4):
I
Sa≅(VGa−Vtha)×VDa (4)
According to equation (4), if the first-gate-voltage VGa is a relatively high voltage value (for example, 1.8V) and is higher than the first threshold voltage Vtha (for example, 0.6V), channel of the first transistor Ma can be turned on. Furthermore, the first-drain-voltage VDa is also a relatively high voltage value (for example, 1.5V) so as to drive the drain-source current, and hence the first-source-current ISa can be generated. The first-source-current ISa is positively related to the product of the difference between the first-gate-voltage VGa and the first threshold voltage Vtha with the first-drain-voltage VDa.
In view of logic computations, the first-gate-voltage VGa may correspond to the input-value σi of the Ising model, where the argument “i” represents the i-th input-value σi (i.e., the i-th spin state of the Ising model). This argument “i” also indicates that, the memory cell 30(i,j) is coupled to the i-th first-word-line WLia. For example, the first-gate-voltage VGa of the memory cell 30(3,4) corresponds to the 3rd input-value σ3 of the Ising model, and the first transistor Ma of the memory cell 30(3,4) is coupled to the 3rd first-word-line WL3a. If the first-gate-voltage VGa is a relatively high voltage value (for example, 1.8V) and is higher than the first threshold voltage Vtha (for example, 0.6V), the input-value σi corresponding to the first-gate-voltage VGa refers to logic value “1”. On the other hand, if the first-gate-voltage VGa is a relatively low voltage value (for example, 0.3V) and is lower than the first threshold voltage Vtha, the corresponding input-value σi refers to logic value “0”.
Similarly, the first-drain-voltage VDa corresponds to the input-value σj, where the argument “j” represents the j-th input-value σj (i.e., the j-th spin state of the Ising model). This argument “j” also means that, the memory cell 30(i j) is coupled to the j-th first-bit-line BLja. If the argument “j” is equal to the argument “i”, the input-value σj is the same as the input-value σi, which is the same spin state. If the first-drain-voltage VDa is a higher voltage value (for example, 1.5V), the corresponding input-value σj=“1”. If the first-drain-voltage VDa is a relatively low voltage value (for example, 0.2V), the corresponding input-value σj=“O”. In addition, the first-source-current ISa also corresponds to an output-value Paij of the logic value “1” or “0”.
According to equation (4), if the first-gate-voltage VGa is a relatively high voltage value (i.e., input-value σi=“1”) and the first-drain-voltage VDa is also a relatively high voltage value (i.e., input-value σj=“1”) the first-source-current ISa may be generated (i.e., output-value Paij=“1”). In view of logic computation, the output-value Paij is the result of the logic AND operation of the input-value a; and the input-value σj, which can be expressed as equation (5):
Pa
ij=σ1AND σj (5)
In addition, if the first transistor Ma is a floating gate transistor, the first threshold voltage Vtha is adjustable. If the first threshold voltage Vtha is adjusted to a relatively low voltage value (for example, 0.2V), the relationship between the input-value σi, the input-value σj and the output-value Paij still remains as equation (5). In contrast, if the first threshold voltage Vtha is adjusted to a relatively high voltage value (for example, 2.0V), no matter whether the first-gate-voltage VGa is a relatively high voltage value (for example, 1.8V) or a relatively low voltage value (for example, 0.3V) the channel of the first transistor Ma cannot be turned-on and therefore cannot generate the first-source-current ISa, hence the output-value Paij is always logic value “0”. From the above, the first threshold voltage Vtha may correspond to one of the mutual-coefficients Jij of the Ising model. If the first threshold voltage Vtha is adjusted to a relatively low voltage value (for example, 0.2V), it corresponds to the mutual-coefficient Jij=“1”. If the first threshold voltage Vtha is adjusted to a relatively high voltage value (for example, 2.0V), it corresponds to the mutual-coefficient Jij=“0”. Moreover, if the arguments “i” and “j” are swapped (i.e., interchanged), the mutual-coefficient Jij is still equal to the mutual-coefficient Jji. Taking the factor of the first threshold voltage Vtha into consideration, the relationship between the input-value σi, the input-value σj and the output-value Paij can be expressed as equation (6):
Pa
ij
=J
ij×(σi AND σj) (6)
On the other hand, if the applied first-gate-voltage VGa is a higher voltage value (for example, 2.0V), correspondingly, the second-gate-voltage VGb applied by the second transistor Mb is a lower voltage value (for example, 0.3V). In view of logic computations, the second-gate-voltage VGb of the second transistor Mb corresponds to an inverted logic value σi′ of the input-value σi.
Similarly, the second-drain-voltage VDb applied to the second transistor Mb corresponds to the inverted logic value σj′ of the input-value σj. In addition, the second threshold voltage Vthb of the second transistor Mb also corresponds to the mutual-coefficient Jij, and the second-source-current ISb corresponds to the output-value Pbij. Then, the output-value Pbij is the result of the logic AND operation of the inverted logic value σi′ and the inverted logic value σj′ and multiplied by the mutual-coefficient Jij, as shown in equation (7):
Pb
ij
=J
ij×(σi′ AND σj′) (7)
Moreover, the output-value Pij corresponding to the common-source current Is outputted by the memory cell 30(i,j) is the sum of the output-value Paij of the first transistor Ma and the output-value Pbij of the second transistor Mb. The output-value Pij can be expressed as equation (8):
From the above, the output-value Pij of the memory cell 30(i,j) on the common-source-line SLj is the product of the result of the logic XNOR operation of the input-value σi and the input-value σj and the mutual-coefficient Jij. That is, the first transistor Ma of the memory cell 30(i,j) performs a logic “AND” operation of the input-value σi and the input-value σj, and the second transistor Mb performs a logic “AND” operation of the inverted logic value σi′ and the inverted logic value of σj′, then, the common-source-line SLj performs a logic “OR” operation on the result of the logic “AND” operation of the first transistor Ma and the result of the logic “AND” operation of the second transistor Mb. That is, the memory cell 30(i, j) performs two logic “AND” operations and one logic “OR” operation to achieve one logic XNOR operation.
In addition, the mutual-coefficient Jij is not limited to digital logic “1” or logic “0”, the mutual-coefficient Jij may also have an analog value. As shown in Table 1, if the first threshold voltage Vtha and the second threshold voltage Vthb are set to any voltage value between zero (i.e., 0V) and a relatively high voltage value (for example, 2.0V), the corresponding mutual-coefficient Jij has an analog value between value “0” and value “1”.
The above paragraphs describe that a single memory cell 30(i,j) performs one time of spin state computation for a set of input-values σi and σj. The following paragraphs will describe overall computation by the entire memory array 302 of four input-values σ1, σ2, σ3 and σ4. Please refer to FIG. 3B again, the common-source-lines SL1˜SL4 are respectively coupled to the sensing amplifiers SA1˜SA4. Taking the first sensing amplifier SA1 as an example, the sensing amplifier SA1 can sum the common-source currents output by all the memory cells of the first common-source-line SL1, so as to sum up all the output-values of the common-source-line SL1 as a total-output-value H1. The sensing amplifiers SA1˜SA4 are coupled to the summing circuit 304 to sum the total-output-values H1˜H4 of the common-source-lines SL1˜SL4 as the energy H. Energy H is expressed as equation (9):
H=Σ
i=1˜4,i<j[Jij×(σi*σj)] (9)
The energy H of equation (9) temporarily does not include computation results of the memory cells 30(1,1), 30(2,2), 30(3,3) and 30(4,4) in the diagonal address of the memory array 302. For these memory cells in the diagonal address, taking the memory cell 30(1,1) as an example, the input-value σ1 received via the first-word-line WL1a and the input-value σ1 received via the first-bit-line BL1a is the same. In this embodiment, the memory cells 30(1,1), 30(2,2), 30(3,3) and 30(4,4) in the diagonal address do not perform logic “XNOR” operation on the input-values σ1˜σ4, but perform logic “AND” operation, instead. Referring to
In equation (10), the computing coefficient of the memory cell 30(i,j) (where i=j) in the diagonal address is not the mutual-coefficient Jij but the self-coefficient hi. According to equations (9) and (10), the sum of the computing results of all memory cells 30(1,1)˜30(4,4) of the memory array 302 is energy H, which can be expressed as equation (11):
H=Σ
i=1˜4(hi×σi)+Σi=1˜4,i<j[Jij×(σi*σj)] (11)
According to equation (11), the energy H computed by the memory device 300B matches the energy H of Ising model.
Then, in step S120, the inverted logic values σ1′˜σ4′ of the input-values σ1˜σ4 (not shown in
Next, in step S130, input-values σ1˜σ4 are respectively received via the first-bit-lines BL1a˜BL4a. More specifically, the first-drain-voltage VDa is applied to the first transistor Ma of the memory cell 30(i,j) through the j-th first-bit-line BLja. The first-drain-voltage VD corresponds to the input-value σj received by the j-th first-bit-line BLja.
Next, in step S140, the inverted logic values σ1′˜σ4′ of the input-values σ1˜σ4 (not shown in
Next, in step S150, each of the memory cells 30(1,1)˜30(4,4) performs a logic XNOR operation based on each input-value σ1˜σ4 and each inverted logic value σ1′˜σ4′ to obtain a first computation result. Next, in step S160, each of the memory cells 30(1,1)˜30(4,4) multiplies the first computation result by one of the self-coefficients h1˜h4 or one of the mutual-coefficients J12˜J34 of the Ising model, thus to obtain a plurality of output-values Pij of the Ising Model.
Please also refer to
Next, in step S162, adjusting the first threshold voltage Vtha and the second threshold voltage Vthb of memory cells 30(1,2), 30(1,3), 30(1,4), 30(2,4), 30(3,1) and 30(4,2) other than those in the diagonal address so as to correspond to mutual-coefficients J12, J13, J14, J24, J31, J42 being all “1”. In
Referring to
Then, in step S180, the output-values Pij of the common-source-lines SL1˜SL4 are summed up as total-output-values H1˜H4 via the sensing amplifiers SA1˜SA4, which can be expressed as equations (12) to (15):
H
1
=h
1σ1+J13(σ3*σ1)=1+0=1 (12)
H
2
=J
12(σ1*σ2)+J24(σ4*σ2)=1+1=2 (13)
H
3
=J
13(σ1*σ3)+h3σ3=0+0=0 (14)
H
4
=J
14(σ1*σ4)+J24(σ2*σ4)+h4σ4=1+1+1=3 (15)
From the above, the sum of the total-output-values H1˜H4 at the first time T1 is energy H (H=6). Then, in step S190, a threshold value Hth is set (for example, set as “2”), and the total-output-values H1˜H4 are compared with the threshold value Hth.
Then, in step S200, if it is determined that the total-output-value Hj of the j-th common-source-line SLj is greater than the threshold value Hth, step S210 is performed to update the input-value σj received by the j-th first-bit-line BLja. For example, if the total-output-value H4 (value of H4 is “3”) of the 4-th common-source-line SL4 is greater than the threshold Hth (value of Hth is “2”), the 4-th input-value σ4 is updated from logic value “1” to the logic value “0”.
Next, referring to
H
1
=h
1σ1+J13(σ3*σ1)=1+0=1 (16)
H
2
=J
12(σ1*σ2)+J24(σ4*σ2)=1+0=1 (17)
H
3
=J
13(σ1*σ3)+h3σ3=0+0=0 (18)
H
4
=J
14(σ1*σ4)+J24(σ2*σ4)+h4σ4=0+0+0=0 (19)
From the above, the sum of the total-output-values H1˜H4 at the second time T2 is energy H (which is “2”). Such an energy H tends to decrease, and hence the lowest energy Hmin can be located accordingly.
Next, please refer to
Referring again to
Please refer to
First, referring to
Then, in step S162B, adjusting the first threshold voltage Vtha and the second threshold voltage Vthb of memory cells 50(2,2), 50(2,3), 50(2,4), 50(3,4), 50(4, 1) and 50 (5, 2), so as to correspond to the mutual-coefficients J12, J13, J14, J24, J13, J24 being all “1”.
Then, in step S163B, for the memory cells other than those in the first raw address, the common-source currents of memory cells 50(i,i-1) of the shifted diagonal address are zero. From the above, at the first time T1, the total-output-values H1˜H4 of the sensing amplifiers SA1˜SA4 of the memory array 502 can be expressed as equations (20) to (23):
H
1
=h
1σ1+J13s(σ3*σ1)=1+0=1 (20)
H
2
=J
12(σ1*σ2)+J24(σ4*σ2)=1+1=2 (21)
H
3
=h
3σ3+J13(σ1*σ3)=0+0=0 (22)
H
4
=h
4σ4+J14(σ1*σ4)+J24(σ2*σ4)=1+1+1=3 (23)
The sum of the total-output-values H1˜H4 at the first time T1 is energy H with value of “6”. Then, step S200 in
Next, referring to
H
1
=h
1σ1+J13(σ3*σ1)=1+0=1 (24)
H
2
=J
12(σ1*σ2)+J24(σ4*σ2)=1+0=1 (25)
H
3
=h
3σ3+J13(σ1*σ3)=0+0=0 (26)
H
4
=h
4σ4+J14(σ1*σ4)+J24(σ2*σ4)=0+0+0=0 (27)
The sum of the total-output-values H1˜H4 at the second time T2 is energy H (with value of “2”), and such an energy H tends to decrease. Based on the above, the lowest energy Hmin in can be located.
In addition, the common-source-line SL1-1 of the memory cell 70(1,1) is coupled to an analog-to-digital converter (ADC) 702, so as to convert an analog signal of the common-source current outputted by the memory cell 70(1,1) to a digital signal. In addition, the ADC 702 is further coupled to a two-bit shifter 708 to shift the digital signal with two-bits toward the higher bit. Similarly, the common-source-line SL1-2 of the memory cell 70(1, 2) is also coupled to an ADC 704 to convert the analog signal of the common-source current to a digital signal, which is then shifted with one-bit toward higher bit via the one-bit shifter 710. In addition, the digital signal outputted by the ADC 706 of the common-source-line SL1-3 of the memory cell 70 (1, 3) is not performed bit-shifting. The outputs of the two-bits shifter 708, the one-bit shifter 710 and the ADC 706 can be integrated as a total-output-value H1 (which equals h1σ1).
Similarly, the memory cells 70(1,4), 70(1,5) and 70(1,6) of another group may correspond to the mutual-coefficient J12, where the mutual-coefficient J12 can be encoded as the first-bit J12(1), the second-bit J12(2) and the third-bit J12(3). The first threshold voltage Vtha and the second threshold voltage Vf of the memory cells 70 (1, 4), 70(1, 5) and 70(1, 6) can be adjusted to set the first-bit J12(1), the second-bit J12(2) and the third-bit J12(3). The ADC 712, 714, and 716, the two-bits shifter 718 and the one-bit shifter 720 are used to convert analog common-source current outputted by the common-source-lines SL2-1, SL2-2 and SL2-3 to digital signals and then integrated into a total-output-value H2 (which equals J12 σ1*σ2).
Similarly, the first threshold voltage Vtha and the second threshold voltage Vthb of the memory cells 92(1,9)˜92(9,9) at the 9-th row address of the memory subarray 902 correspond to the first portion J19+ of the mutual-coefficient J19. The first threshold voltage Vtha and the second threshold voltage Vthb of the memory cells 94(1,9)˜94(9,9) at the 9-th row address of the memory subarray 904 correspond to the second portion J19− of the mutual-coefficient J19. The first portion J19+ and the second portion J19− may form the mutual-coefficient J19 (where J19=J19++J19−).
According to the memory devices 300B˜1200 of the above-mentioned embodiments and the corresponding computing method, the technical solution of the present disclosure employs semiconductor memory devices 300B˜1200 to process Ising model computations, which can be used for processing a plurality of input-values σi, a plurality of self-coefficients hi and mutual-coefficients Jij to obtain the energy H. Furthermore, cooperating with updating mechanism with the majority vote rule, the lowest energy Hmin in of the Ising model can be located. The technical solution of the present disclosure can rapidly compute energy H by the semiconductor memory device 300B˜1200 with simulating quantum annealing computation, and hence obtain input-values a, of the best solution (lowest energy Hmin).
It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments. It is intended that the specification and examples be considered as exemplary only, with a true scope of the disclosure being indicated by the following claims and their equivalents.