MEMORY DEVICE AND COMPUTING METHOD THEREOF

20240046970 ยท 2024-02-08

    Inventors

    Cpc classification

    International classification

    Abstract

    The application provides a memory device and an operation method thereof. The memory device includes: a memory array, for processing model computation having a plurality of input values and a plurality of interact coefficients; and at least one calculation unit. In receiving the input values, a first part and a second part of the memory cells generate a first part and a second part of the common source currents, respectively. The first part of the memory cells is electrically isolated from the second part of the memory cells based on a diagonal of the memory array. The at least one calculation unit calculates a first part and a second part of a local field energy of the model computation based on the first part and the second part of the common source currents.

    Claims

    1. A memory device, comprising: a memory array, for processing model computation having a plurality of input values and a plurality of interact coefficients, the memory array including at least one memory sub-array, the at least one memory sub-array including: a plurality of memory cells, a plurality of first signal lines, a plurality of second signal lines and a plurality of third signal lines coupled to the memory cells; and at least one calculation unit, coupled to the at least one memory sub-array, wherein, the memory cells receive the input values via the second signal lines and the third signal lines, the memory cells generate a plurality of source currents, the source currents flowing through the first signal lines to generate a plurality of common source currents, the common source currents flowing into the at least one calculation unit, a first part of the memory cells generate a first part of the common source currents, a second part of the memory cells generate a second part of the common source currents; the first part of the memory cells store a plurality of first part coefficients of the interact coefficients, and the second part of the memory cells store a plurality of second part coefficients of the interact coefficients, wherein the first part of the memory cells is electrically isolated from the second part of the memory cells based on a diagonal of the memory array; and the at least one calculation unit calculates a first part of a local field energy of the model computation based on the first part of the common source currents, and calculates a second part of the local field energy of the model computation based on the second part of the common source currents.

    2. The memory device according to claim 1, wherein the at least one memory sub-array includes: a first memory sub-array, the first memory sub-array being for storing a plurality of odd order interact coefficients, the first memory sub-array being on a diagonal position of the memory array; a second memory sub-array, the second memory sub-array being for storing a plurality of even order interact coefficients, the second memory sub-array being on two sides of the memory array; and a third memory sub-array, the third memory sub-array being turned off in normal operations.

    3. The memory device according to claim 1, wherein the at least one memory sub-array includes: a plurality of first memory sub-arrays for storing a plurality of odd order interact coefficients, the first memory sub-arrays being on a diagonal position of the memory array; a plurality of second memory sub-arrays for storing a plurality of even order interact coefficients, the second memory sub-arrays being on two sides of the memory array; and a plurality of third memory sub-arrays, the third memory sub-arrays being turned off in normal operations; the first memory sub-arrays, the second memory sub-arrays and the third memory sub-arrays form a plurality of groups; in calculation, the groups independently calculate and one among the groups are selected to calculate the local field energy of the model computation, the input values are input into the selected group but not into the unselected groups.

    4. The memory device according to claim 1, wherein the at least one memory sub-array includes: a plurality of first memory sub-arrays for storing a plurality of odd order interact coefficients, the first memory sub-arrays being on a diagonal position of the memory array; a plurality of second memory sub-arrays for storing a plurality of even order interact coefficients, the second memory sub-arrays being on two sides of the memory array; and a plurality of third memory sub-arrays, the third memory sub-arrays being turned off in normal operations; the first memory sub-arrays, the second memory sub-arrays and the third memory sub-arrays form a plurality of groups; in calculation, the groups independently calculate; wherein the memory device further includes a switch circuit coupled between the first signal lines and the groups; the input values are input into all the groups; the switch circuit select at least one among the groups to output the local field energy of the model computation.

    5. The memory device according to claim 4, wherein the memory device includes a plurality of calculation units coupled to the first signal lines, the switch circuit selects two or more groups to output the local field energy of the model computation.

    6. An operation method for a memory device, for processing a model computation, the model computation having a plurality of input values and a plurality of interact coefficients, the operation method including: storing a plurality of first part coefficients of the interact coefficients in a first part of a plurality of memory cells of at least one memory sub-array of a memory array of the memory device, storing a plurality of second part coefficients of the interact coefficients in a second part of the plurality of memory cells of at least one memory sub-array of the memory device, wherein the first part of the memory cells is electrically isolated from the second part of the memory cells based on a diagonal of the memory array; inputting the input values into the memory cells, the memory cells generate a plurality of source currents, the source currents flowing through a plurality of first signal lines of the memory device to generate a plurality of common source currents, the first part of the memory cells generate a first part of the common source currents, the second part of the memory cells generate a second part of the common source currents; and calculating a first part of a local field energy of the model computation based on the first part of the common source currents, and calculating a second part of the local field energy of the model computation based on the second part of the common source currents.

    7. The operation method according to claim 6, wherein the at least one memory sub-array includes: a first memory sub-array, a second memory sub-array and a third memory sub-array, wherein the operation method further includes: storing a plurality of odd order interact coefficients in the first memory sub-array, the first memory sub-array being on a diagonal position of the memory array; storing a plurality of even order interact coefficients in the second memory sub-array, the second memory sub-array being on two sides of the memory array; and turned off the third memory sub-array in normal operations.

    8. The operation method according to claim 6, wherein the at least one memory sub-array includes: a plurality of first memory sub-arrays, a plurality of second memory sub-arrays and a plurality of third memory sub-arrays; wherein the operation method further includes: storing a plurality of odd order interact coefficients in the plurality of first memory sub-arrays, the first memory sub-arrays being on a diagonal position of the memory array; storing a plurality of even order interact coefficients in the plurality of second memory sub-arrays, the second memory sub-arrays being on two sides of the memory array; and turned off the third memory sub-arrays in normal operations; the first memory sub-arrays, the second memory sub-arrays and the third memory sub-arrays form a plurality of groups; in calculation, the groups independently calculate; selecting one among the groups to calculate the local field energy of the model computation, the input values are input into the selected group but not into the unselected groups.

    9. The operation method according to claim 6, wherein the at least one memory sub-array includes: a plurality of first memory sub-arrays, a plurality of second memory sub-arrays and a plurality of third memory sub-arrays; wherein the operation method further includes: storing a plurality of odd order interact coefficients in the plurality of first memory sub-arrays, the first memory sub-arrays being on a diagonal position of the memory array; storing a plurality of even order interact coefficients in the plurality of second memory sub-arrays, the second memory sub-arrays being on two sides of the memory array; and turned off the third memory sub-arrays in normal operations; the first memory sub-arrays, the second memory sub-arrays and the third memory sub-arrays form a plurality of groups; in calculation, the groups independently calculate; and wherein the memory device further includes a switch circuit, the input values are input into all the groups, and the switch circuit selects at least one among the groups to output the local field energy of the model computation.

    10. The operation method according to claim 9, wherein the memory device includes a plurality of calculation units coupled to the first signal lines, the switch circuit selects two or more groups to output the local field energy of the model computation.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0009] FIGS. 1A and 1B illustrate schematic diagrams of an Ising model with input-values.

    [0010] FIG. 2A illustrates a schematic diagram of computing energy using the Ising model.

    [0011] FIG. 2B illustrates a schematic diagram of simulating quantum annealing using the Ising model.

    [0012] FIG. 3 shows a circuit diagram of a memory cell according to one embodiment of the application.

    [0013] FIG. 4A to FIG. 4D show the operations of the memory cell according to one embodiment of the application.

    [0014] FIG. 5 shows a circuit diagram of a memory cell according to one embodiment of the application.

    [0015] FIG. 6A to FIG. 6H show the operations of the memory cell according to one embodiment of the application.

    [0016] FIG. 7 shows calculation of the local field energy by the memory cell according to one embodiment of the application.

    [0017] FIG. 8A and FIG. 8B show determination of the coefficient according to one embodiment of the application.

    [0018] FIG. 9A shows the programming operations according to one embodiment of the application.

    [0019] FIG. 9B shows the erase operations according to one embodiment of the application.

    [0020] FIG. 10 shows a block diagram of a memory device according to one embodiment of the application.

    [0021] FIG. 11 shows a circuit diagram of a memory device according to one embodiment of the application.

    [0022] FIG. 12 shows a circuit diagram of a memory device according to one embodiment of the application.

    [0023] FIG. 13 shows a circuit diagram of a memory device according to one embodiment of the application.

    [0024] FIG. 14 shows a circuit diagram of a memory device according to one embodiment of the application.

    [0025] FIG. 15A and FIG. 15B show cascade of the memory cells according to one embodiment of the application.

    [0026] FIG. 16 shows an operation method for a memory device according to one embodiment of the application.

    [0027] FIG. 17 shows an operation method of a memory device according to one embodiment of the application.

    [0028] 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 shown in order to simplify the drawing.

    DESCRIPTION OF THE EMBODIMENTS

    [0029] Technical terms of the disclosure are based on general definition in the technical field of the disclosure. If the disclosure describes or explains one or some terms, definition of the terms is based on the description or explanation of the disclosure. Each of the disclosed embodiments has one or more technical features. In possible implementation, one skilled person in the art would selectively implement part or all technical features of any embodiment of the disclosure or selectively combine part or all technical features of the embodiments of the disclosure.

    [0030] FIGS. 1A and 1B illustrate schematic diagrams of an Ising model with input-values. Please refer to FIG. 1A, the Ising model has two input-values ?.sub.1 and ?.sub.2, where the first input-value ?.sub.1 is the first spin state of the Ising model, and the second input-value ?.sub.2 is the second spin state. The first input-value ?.sub.1 is logic value 1, which means the spin state is spin in a positive direction (i.e., the upward arrow in FIG. 1A), and the second input-value ?.sub.2 is logic value 0, which means the spin state is spin in a reverse direction (i.e., the downward arrow in FIG. 1A). The first input-value ?.sub.1 has a self-coefficient h.sub.1, the second input-value ?.sub.2 has a self-coefficient h.sub.2, and there is a mutual-coefficient (or interact coefficient) J.sub.12 between the two input-values ?.sub.1 and ?.sub.2.

    [0031] Furthermore, referring to FIG. 1B, taking an Ising model with three input-values ?.sub.1, ?.sub.2 and ?.sub.3 as an example, the logic values of the input-values ?.sub.1, ?.sub.2 and ?.sub.3 are, for example, 1, 0, 0. The input-values ?.sub.1, ?.sub.2 and ?.sub.3 have self-coefficients h.sub.1, h.sub.2 and h.sub.3 respectively. And, the input-values ?.sub.1 and ?.sub.2 have mutual-coefficient J.sub.12, the input-values ?.sub.1 and ?.sub.3 have mutual-coefficient J13, and the input-values ?.sub.2 and ?.sub.3 have mutual-coefficient J.sub.23.

    [0032] FIG. 2A illustrates a schematic diagram of computing energy using the Ising model. Please refer to FIG. 2A, the Ising model can be used to compute the cost function and locate the minimum value of the cost function. For example, the Ising model uses the energy H of a specific material (such as a magnetic material) as a cost function and locates the lowest energy H.sub.min. Take the Ising model with two input-values ?.sub.1 and ?.sub.2 in FIG. 1A as an example, according to the Ising model computation illustrated in equation (1), the input-values ?.sub.1 and ?.sub.2 of different logic values can be computed which correspond to different values of energy H:

    [00001] H = ? i = 1 ? 2 h i ? i + ? i < j J ij ( ? i * ? j ) = h 1 ? 1 + h 2 ? 2 + J 12 ( ? 1 * ? 2 ) ( 1 )

    [0033] 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 FIG. 2A, the computation according to equation (1) can locate the material has the lowest energy H.sub.min when the input-values ?.sub.1 and ?.sub.2 are logic values 1, 1. Similarly, if the Ising model has three input-values ?.sub.1, ?.sub.2 and ?.sub.3, the energy H can be computed according to the Ising model of equation (2):


    H=h.sub.1?.sub.1+h.sub.2?.sub.2+h.sub.3?.sub.3+J.sub.12(?.sub.1*?.sub.2)+J.sub.13(?.sub.1*?.sub.3)+J.sub.23(?.sub.2*?.sub.3)(2)

    [0034] FIG. 2B illustrates a schematic diagram of simulating quantum annealing using the Ising model. Please refer to FIG. 2B, the computing device (for example: complementary metal oxide semiconductor (CMOS) semiconductor device) can perform computation of the Ising model to simulate quantum annealing so as to locate the minimum value (i.e., the lowest energy H.sub.min) of the cost function (i.e., energy H). The Ising model computation of the embodiment in FIG. 2B has, for example, N input-values ?.sub.1, ?.sub.2, . . . , ?.sub.N, and the input-values ?.sub.1, ?.sub.2, . . . , ?.sub.N of different logic values correspond to different configurations 200, 202, 204 and 206, etc. Configuration 200 indicates that the input-values ?.sub.1, ?.sub.2, . . . , ?.sub.N are logic values 0, 1, . . . , 1, and configuration 204 indicates that the input-values ?.sub.1, ?.sub.2, . . . , ?.sub.N are logic values 1, 1, . . . , 0, etc. The moving path of the Ising model computation refers to the following: moving from configuration 200 to configuration 202 and then to configuration 204, and then locating configuration 204 with the lowest energy H.sub.min. On the other hand, the quantum annealing computation moves from configuration 206 to configuration 204 so as to locate the lowest energy Hmm. From the above, the result of the computing device performing the Ising model computation is the same as the result of the quantum annealing computation.

    [0035] The energy difference ?H of the Ising model is expressed as the equation (3):


    ?H=H(??.sub.i)?HH(?.sub.i)(3)

    [0036] The energy difference ?H of the second order and the third order of the Ising model are expressed as the equations (4-1) and (4-2):

    [00002] H = - .Math. i J i ( 1 ) ? i - .Math. i < j J ij ( 2 ) ? i ? j .Math. ? H = 2 ? i ( J i ( 1 ) + .Math. j ? i J ij ( 2 ) ? j ) ( 4 - 1 ) H = - ? i J i ( 1 ) ? i - ? i < j J ij ( 2 ) ? i ? j - ? i < j < k J ijk ( 3 ) ? i ? j ? k .Math. ? H = 2 ? i ( J i ( 1 ) + ? j ? i J ij ( 2 ) ? j + ? j , k ? i j < k J ijk ( 3 ) ? i ? j ) ( 4 - 2 )

    [0037] In the equations (4-1) and (4-2), the energy difference is related to the input value ? and the local field energy.

    [0038] For example, in the equation (4-1), the first order local field energy L.sub.i.sup.(1) and the second order local field energy L.sub.i.sup.(2) are expressed as the equations (5-1) and (5-2):


    L.sub.i.sup.(1)=J.sub.i.sup.(1)(5-1)


    L.sub.i.sup.(2)=?.sub.j?iJ.sub.ij.sup.(2)?.sub.j(5-2)

    [0039] In the equation (4-2), the first order local field energy L.sub.i.sup.(1), the second order local field energy L.sub.i.sup.(2) and the third order local field energy L.sub.i.sup.(3) are expressed as the equations (6-1), (6-2) and (6-3):

    [00003] L i ( 1 ) = J i ( 1 ) ( 6 - 1 ) L i ( 2 ) = .Math. j ? i J ij ( 2 ) ? j ( 6 - 2 ) L i ( 3 ) = .Math. j , k ? i j < k J ijk ( 3 ) ? i ? j ( 6 - 3 )

    [0040] After the local field energy is calculated, the local field energy may be used in determining whether to flip the spin status (i.e. to spin the input value) or in determining whether to update the spin status (i.e. to update the input value), for generating the optimum solution.

    [0041] One embodiment of the application discloses a semiconductor memory device to calculate the local field energy for processing the Ising model computation.

    [0042] FIG. 3 shows a circuit diagram of a memory cell 30 according to one embodiment of the application. The memory cell 30 includes a first transistor Ma and a second transistor Mb. For example but not limited by, the first transistor Ma is an N-type transistor and the second transistor Mb is a P-type transistor.

    [0043] The first transistor Ma includes a first gate Ga for receiving a gate voltage V.sub.G, a first drain Da for receiving a first drain voltage V.sub.D1 and a first source Sa. The second transistor Mb includes a second gate Gb for receiving the gate voltage V.sub.G, a second drain Db for receiving a second drain voltage V.sub.D2 and a second source Sb. The first source Sa of the first transistor Ma are coupled to the second source Sb of the second transistor Mb by common source coupling.

    [0044] In logic computation, the gate voltage V G is corresponding to the input value ?.sub.j of the Ising model, wherein j refers to the j-th input value ?.sub.j (i.e. the j-th spin status of the Ising model). When the input value ?.sub.j is logic +1, the gate voltage V.sub.G is a first gate voltage V.sub.GN for conducting the first transistor Ma; and when the input value ?.sub.j is logic ?1, the gate voltage V.sub.G is a second gate voltage ?V.sub.GP for conducting the second transistor Mb.

    [0045] Similarly, the first drain voltage V.sub.D1 and the second drain voltage V.sub.D2 are corresponding to the input value ?.sub.k wherein k refers to the k-th input value ?.sub.k (i.e. the k-th spin status of the Ising model). When the input value ?.sub.k is logic +1, the first drain voltage V.sub.D1 and the second drain voltage V.sub.D2 are the voltages +V.sub.DN and ?V.sub.DP, respectively; and when the input value ?.sub.k is logic ?1, the first drain voltage V.sub.D1 and the second drain voltage V.sub.D2 are the voltages ?V.sub.DN and +V.sub.DP, respectively.

    [0046] In logic computation, the source current I.sub.S of the memory cell 30 is expressed as: I.sub.S=J?.sub.j?.sub.k.

    [0047] FIG. 4A to FIG. 4D show the operations of the memory cell 30 according to one embodiment of the application. As shown in FIG. 4A, when the input value ?.sub.j is logic +1 and the input value ?.sub.k is logic +1, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k+J. As shown in FIG. 4B, when the input value ?.sub.j is logic +1 and the input value ?.sub.k is logic ?1, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k=?J. As shown in FIG. 4C, when the input value ?.sub.j is logic ?1 and the input value ?.sub.k is logic +1, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k=?J. As shown in FIG. 4D, when the input value ?.sub.j is logic ?1 and the input value ?.sub.k is logic ?1, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k=+J. The positive current has a current direction from the drain to the source, and the negative current has a current direction from the source to the drain.

    [0048] In one embodiment of the application, when the input value ?.sub.k is fixed as logic +1, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k=J?.sub.j, as shown in FIG. 4A and FIG. 4C.

    [0049] In one embodiment of the application, when the input value ?.sub.j and the input value ?.sub.k have the same value, the source current I.sub.S of the memory cell 30 is I.sub.S=J?.sub.j?.sub.k=J, as shown in FIG. 4A and FIG. 4D.

    [0050] Thus, from FIG. 3 and FIG. 4A to FIG. 4D, the memory cell 30 may implement I.sub.S=J, I.sub.S=J?.sub.j and I.sub.S=J?.sub.j?.sub.k (J being a constant value).

    [0051] FIG. 5 shows a circuit diagram of a memory cell 50 according to one embodiment of the application. The memory cell 50 includes two cascaded memory cells 30. As shown in FIG. 5, the two drains of another memory cell 30 receive the third drain voltage V.sub.D3 and the fourth drain voltage V.sub.D4, respectively. The third drain voltage V.sub.D3 and the fourth drain voltage V.sub.D4 are corresponding to the input value ?.sub.l, wherein l refers to the l-th input value ?.sub.k (i.e. the l-th spin status of the Ising model). When the input value ?.sub.l is logic +1, the third drain voltage V.sub.D3 and the fourth drain voltage V.sub.D4 are the voltages +V.sub.DN and ?V.sub.DP; and when the input value ?.sub.l is logic ?1, the third drain voltage V.sub.D3 and the fourth drain voltage V.sub.D4 are the voltages ?V.sub.DN and +V.sub.DP. In logic computation, the source current I.sub.S of the memory cell 50 is expressed as: I.sub.S=J?.sub.j?.sub.k?.sub.l. In cascading the memory cells 30, the common source of one of the memory cells 30 is coupled to the gate of another memory cell 30.

    [0052] FIG. 6A to FIG. 6H show the operations of the memory cell 50 according to one embodiment of the application. As shown in FIG. 6A, when the input value ?.sub.j is logic +1, the input value ?.sub.k is logic +1 and the input value ?.sub.l is logic +1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=+J. As shown in FIG. 6B, when the input value ?.sub.j is logic +1, the input value ?.sub.k is logic ?1 and the input value ?.sub.l is logic +1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=?J. As shown in FIG. 6C, when the input value ?.sub.j is logic +1, the input value ?.sub.k is logic +1 and the input value ?.sub.l is logic ?1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=?J. As shown in FIG. 6D, when the input value ?.sub.j is logic +1, the input value ?.sub.k is logic ?1 and the input value ?.sub.l is logic ?1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=+J. As shown in FIG. 6E, when the input value ?.sub.j is logic ?1, the input value ?.sub.k is logic +1 and the input value ?.sub.l is logic +1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=?J. As shown in FIG. 6F, when the input value ?.sub.j is logic ?1, the input value ?.sub.k is logic ?1 and the input value ?.sub.l is logic +1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=+. As shown in FIG. 6G, when the input value ?.sub.j is logic ?1, the input value ?.sub.k is logic +1 and the input value ?.sub.l is logic ?1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=+J. As shown in FIG. 6H, when the input value ?.sub.j is logic ?1, the input value ?.sub.k is logic ?1 and the input value ?.sub.l is logic ?1, the source current I.sub.S of the memory cell 50 is I.sub.S=J?.sub.j?.sub.k?.sub.l=?J.

    [0053] Thus, from the above, in one embodiment of the application, by cascading more memory cells 30, the source current I.sub.S of the memory cell are corresponding to more input values.

    [0054] In one embodiment of the application, the local field energy L.sub.i corresponding to the input value ?.sub.i is expressed as the equation (7):


    L.sub.i=J.sub.i.sup.(1)+?.sub.jJ.sub.ij.sup.(2)?.sub.j+?.sub.j<kJ.sub.ijk.sup.(3)?.sub.j?.sub.k+?.sub.j<k<lJ.sub.ijkl.sup.(4)?.sub.j?.sub.k?.sub.l+ . . . +?.sub.j<k< . . . <r<sJ.sub.ijkl . . . ?.sup.(n)?.sub.j?.sub.k . . . ?.sub.r?.sub.s(7)

    [0055] FIG. 7 shows calculation of the local field energy L.sub.i by the memory cell 30 according to one embodiment of the application. As shown in FIG. 4A and FIG. 4B, the constant value J.sub.i.sup.(1) is calculated by the single order memory cell 30. As shown in FIG. 4A and FIG. 4B, the first order local field energy L.sub.i.sup.(1) is calculated by the single order memory cell 30. As shown in FIG. 4A and FIG. 4B, the second local field energy L.sub.i.sup.(2) is calculated by the single order memory cell 30. Similarly, as shown in FIG. 5, the third order local field energy L.sub.i.sup.(3) is calculated by cascading two memory cells 30. By so, higher order local field energy L.sub.i.sup.(n) is calculated by cascading more memory cells 30. As shown in FIG. 7, the input value ?.sub.r is corresponding to the drain voltage V.sub.D(2n?3) and the drain voltage V.sub.D(2n?2), and the input value ?.sub.s is corresponding to the drain voltage V.sub.D(2n?1) and the drain voltage V.sub.D2n.

    [0056] Determination of the coefficient J according to one embodiment of the application is described. FIG. 8A and FIG. 8B show determination of the coefficient J according to one embodiment of the application. In one embodiment of the application, by adjusting threshold voltages of the first transistor Ma and the second transistor Mb, the coefficient J is determined.

    [0057] As shown in FIG. 8A, when the threshold voltage V.sub.TN of the N type transistor (for example, the first transistor Ma) and the threshold voltage V.sub.TP of the P type transistor (for example, the second transistor Mb) are the reference threshold voltages V.sub.L and ?V.sub.L, the coefficient J is 1. When the gate voltage V.sub.G=V.sub.GN, the N type transistor (for example, the first transistor Ma) is conducted while the P type transistor (for example, the second transistor Mb) is turned off. When the gate voltage V.sub.G=?V.sub.GP, the N type transistor (for example, the first transistor Ma) is turned off while the P type transistor (for example, the second transistor Mb) is conducted.

    [0058] As shown in FIG. 8B, when the threshold voltage V.sub.TN of the N type transistor (for example, the first transistor Ma) and the threshold voltage V.sub.TP of the P type transistor (for example, the second transistor Mb) are the reference threshold voltages V.sub.H and ?V.sub.H, the coefficient J is 0 wherein V.sub.H>V.sub.L. When the gate voltage V.sub.G=V.sub.GN, both the N type transistor (for example, the first transistor Ma) and the P type transistor (for example, the second transistor Mb) are turned off. When the gate voltage V.sub.G=?V.sub.GP, both the N type transistor (for example, the first transistor Ma) and the P type transistor (for example, the second transistor Mb) are turned off.

    [0059] FIG. 8A and FIG. 8B show when the coefficient J has two levels, which is not to limit the application. In other possible embodiment of the application, by fine tuning the threshold voltages of the N type transistor and/or the P type transistor, the coefficient J has more levels or the coefficient J may be analog.

    [0060] FIG. 9A shows the programming operations according to one embodiment of the application. FIG. 9B shows the erase operations according to one embodiment of the application.

    [0061] As shown in FIG. 9A, in programming, a positive voltage (+V.sub.G) is applied to the gate voltage, a positive voltage (+V.sub.D1) is applied to the first drain voltage, and 0V is applied to the second drain voltage and the output terminal (V.sub.D2=V.sub.out=0) to form a Channel hot electron (CHE) effect for changing the threshold voltage V.sub.TN of the N type transistor (for example the first transistor Ma) from the reference threshold voltage V.sub.L into the reference threshold voltage V.sub.H; and thus the N type transistor is programmed. Then, a negative voltage (?V.sub.G) is applied to the gate voltage, a negative voltage (?V.sub.D2) is applied to the second drain voltage, and 0V is applied to the first drain voltage and the output terminal (V.sub.D1=V.sub.out=0) to form a Channel hot hole (CHH) effect; and thus the threshold voltage V.sub.TP of the P type transistor (for example the second transistor Mb) is changed from the reference threshold voltage ?V.sub.L into the reference threshold voltage ?V.sub.H; and thus the P type transistor is programmed.

    [0062] As shown in FIG. 9B, in erasing, a negative voltage (?V.sub.G) is applied to the gate voltage, a positive voltage (+V.sub.D1) is applied to the first drain voltage, and 0V is applied to the second drain voltage and the output terminal (V.sub.D2=V.sub.out=0) to form a Band-to-Band Tunneling Hot Hole Injection (BBTHHI) effect for changing the threshold voltage V.sub.TN of the N type transistor (for example the first transistor Ma) from the reference threshold voltage V.sub.H into the reference threshold voltage V.sub.L; and thus the N type transistor is erased. Then, a positive voltage (+V.sub.G) is applied to the gate voltage, a negative voltage (?V.sub.D2) is applied to the second drain voltage, and 0V is applied to the first drain voltage and the output terminal (V.sub.D1=V.sub.out=0) to form a Band to band tunneling hot electron injection (BBTHEI) effect for changing the threshold voltage V.sub.TP of the P type transistor (for example the second transistor Mb) from the reference threshold voltage ?V.sub.H into the reference threshold voltage ?V.sub.L; and thus the P type transistor is erased.

    [0063] FIG. 10 shows a block diagram of a memory device according to one embodiment of the application. As shown in FIG. 10, the memory device 1000 includes a memory array 1005, a calculation unit 1020, a conversion unit 1030, a bit line driver 1040 and a word line driver 1050. In here, the memory device 1000 is used in calculating the local field energy L.sub.1 (in the equation (8)) which is taken as an example. One skilled in the art would understand how to calculate other first order local field energy or high order local field energy.


    L.sub.1=L.sub.1.sup.(+)?L.sub.1.sup.(?)=J.sub.1.sup.(1+)?J.sub.1.sup.(1?)+?.sub.j?1(J.sub.ij.sup.(2+)?J.sub.ij.sup.(2?))?.sub.j+?.sub.j,k?1,j<k(J.sub.ijk.sup.(3+)?J.sub.ijk.sup.(3?))?.sub.j?.sub.k(8)

    [0064] The memory array 1005 includes a memory sub-array 1010. The memory sub-array 1010 includes a plurality of memory cell 1-1?N-(N+1), a plurality of common source lines SL.sub.1?SL.sub.(N+1) (the first signal lines), a plurality of word lines WL.sub.1?WL.sub.N (the second signal lines) and a plurality of bit lines BL.sub.1?BL.sub.(2N+2) (the third signal lines). The memory cell 1-1?N-(N+1), arranged in an array, are implemented by the memory cells 30. The common source lines SL.sub.1?SL.sub.(N+1) are coupled to the sources of the memory cells 1-1?N-(N+1),the word lines WL.sub.1?WL.sub.N are coupled to the gates of the memory cells 1-1?N-(N+1) and the bit lines BL.sub.1?BL.sub.(2N+2) are coupled to the first drains and the second drains of the memory cells 1-1?N-(N+1). The common source lines SL.sub.3?SL.sub.(N?1) are electrically isolated based on a diagonal such that the common source lines SL.sub.3?SL.sub.(N?1) on the upper part of the memory sub-array 1010 are isolated from the common source lines SL.sub.3?SL.sub.(N?1) on the lower part of the memory sub-array 1010.

    [0065] The calculation unit 1020 is coupled to the memory sub-array 1010, for calculating a plurality of source currents from the memory sub-array 1010 to generate a calculation result. For example but not limited by, the calculation unit 1020 is a subtractor.

    [0066] The conversion unit 1030 is coupled to the calculation unit 1020 for converting the calculation result of the calculation unit 1020 into the local field energy. For example but not limited by, the conversion unit 1030 is an analog to digital converter (ADC).

    [0067] The bit line driver 1040 is coupled to the memory sub-array 1010 for driving the bit lines BL.sub.1?BL.sub.(2N+2).

    [0068] The word line driver 1050 is coupled to the memory sub-array 1010 for driving the word lines WL.sub.1?WL.sub.N.

    [0069] As shown in FIG. 10, the word line driver 1050 outputs the gate voltages corresponding to the input values ?.sub.2??.sub.N to the gates of the memory cells 1-1?N-(N+1), respectively. Similarly, the bit line driver 1040 outputs the drain voltages corresponding to the input values ?.sub.1 (=logic +1), the input values ?.sub.2??.sub.N and the input values ?.sub.1 (=logic +1) to the first drains and the second drains of the memory cells 1-1?N-(N+1), respectively.

    [0070] As shown in FIG. 10, the gate voltage, the first drain voltage and the second drain voltage of the memory cell 1-2 are corresponding to the input value ?.sub.2, and thus the memory cell 1-2 has a source current I.sub.S=J.sub.1.sup.(1+). Similarly, the gate voltage, the first drain voltage and the second drain voltage of the memory cell N-N are corresponding to the input value ?.sub.N, and thus the memory cell N-N has a source current I.sub.S=J.sub.1.sup.(1?). Therefore, by the calculation unit 1020, the source current I.sub.S=J.sub.1.sup.(1+) of the memory cell 1-2 is subtracted by the source current I.sub.S=J.sub.1.sup.(1?) of the memory cell N-N to generate J.sub.1.sup.(1+)?J.sub.1.sup.(1?).

    [0071] The gate voltage of the memory cell 1-1 is corresponding to the input value ?.sub.2, and the first drain voltage and the second drain voltage of the memory cell 1-1 are corresponding to the input value ?.sub.1 (=logic +1). Thus, the memory cell 1-1 has a source current I.sub.S=J.sub.12.sup.(2+)?.sub.2. Similarly, the gate voltage of the memory cell 2-1 is corresponding to the input value ?.sub.3, and the first drain voltage and the second drain voltage of the memory cell 2-1 are corresponding to the input value ?.sub.1 (=logic +1). Thus, the memory cell 2-1 has a source current I.sub.S=J.sub.13.sup.(2+)?.sub.3. The current sources of the memory cells 3-1?N?1 are generated similarly. Because the common source line SL.sub.1 is commonly coupled to the sources of the memory cells 1-1?N?1, the common source current on the common source line SL.sub.1 is expressed as: ?.sub.j?1J.sub.1j.sup.(2+)?.sub.j. Similarly, because the common source line SL.sub.(N+1) is commonly coupled to the sources of the memory cells 1-(N+1)?N-(N+1), the common source current on the common source line SL.sub.(N+1) is expressed as: ?.sub.j?1J.sub.1j.sup.(2?)?.sub.j. The common source current (=?.sub.j?1J.sub.1j.sup.(2+)?.sub.j) on the common source line SL.sub.1 is subtracted by the common source current (=?.sub.j?1J.sub.1j.sup.(2?)?.sub.j) on the common source line SL.sub.(N+1) to calculate ?.sub.j?1J.sub.ij.sup.(2+)?J.sub.ij.sup.(2?)?.sub.j.

    [0072] Similarly, the gate voltage of the memory cell 2-2 is corresponding to the input value ?.sub.3, and the first drain voltage and the second drain voltage of the memory cell 2-2 are corresponding to the input value ?.sub.2. Thus, the memory cell 2-2 has a source current I.sub.S=J.sub.123.sup.(3+)?.sub.2?.sub.3. Similarly, the gate voltage of the memory cell N?2 is corresponding to the input value ?.sub.N, and the first drain voltage and the second drain voltage of the memory cell N?2 are corresponding to the input value ?.sub.2. Thus, the memory cell N?2 has a source current I.sub.S=J.sub.12N.sup.(3+)?.sub.2?.sub.N. The current sources of the memory cells 3-2?(N?1)-2 are generated similarly. Because the common source line SL.sub.2 is commonly coupled to the sources of the memory cells 2-2?N?2, the common source current on the common source line SL.sub.2 is expressed as: ?.sub.kJ.sub.12k.sup.(3+)?.sub.j?.sub.k. Similarly, because the common source line SL.sub.N is commonly coupled to the sources of the memory cells 1-N?(N?1)-N, the common source current on the common source line SL.sub.N is expressed as: ?.sub.k?1J.sub.12k.sup.(3?)?.sub.j?.sub.k. The common source current (=?.sub.k?1J.sub.12k.sup.(3+)?.sub.j?.sub.k) on the common source line SL.sub.2 is subtracted by the common source current (=?.sub.k?1J.sub.12k.sup.(3?)?.sub.j?.sub.k) on the common source line SL.sub.N to calculate ?.sub.k?1J.sub.12k.sup.(3+)?J.sub.12k.sup.(3?)?.sub.j?.sub.k.

    [0073] By so, the common source currents on the common source lines SL.sub.1?SL.sub.(N+1) are calculated.

    [0074] Because the common source currents on the common source lines SL.sub.1?SL.sub.(N+1) are input into the calculation unit 1020, the calculation unit 1020 calculates the local field energy L.sub.1 as: L.sub.1=L.sub.1.sup.(+)?L.sub.1.sup.(?)=J.sub.1.sup.(1+)?J.sub.1.sup.(1?)+?.sub.j?1(J.sub.ij.sup.(2+)?J.sub.ij.sup.(2?))?.sub.j+?.sub.j,k?1,j<k(J.sub.ijk.sup.(3+)?J.sub.ijk.sup.(3?))?.sub.j?.sub.k).

    [0075] The conversion unit 1030 may further convert the local field energy L.sub.1 into a digital signal.

    [0076] In FIG. 10, the memory sub-array 1010 may be regarded as having two parts, a first part for storing first part coefficients J.sup.(+)(J.sub.1.sup.(1+), J.sub.12.sup.(2+), . . . ) of the interact coefficient J while a second part for storing second part coefficients J.sup.(?)(J.sub.1.sup.(1?), J.sub.12.sup.(2?), . . . ) of the interact coefficient J. By so, the full range of the interact coefficient J are generated. As described above, by the erase operations or the programming operations, the threshold voltages of the N type transistor and the P type transistor are changed to change the first part coefficients J.sup.(+) and the second part coefficients J.sup.(?) of the interact coefficient J.

    [0077] A first part of the memory sub-array 1010 is for calculating a first part local field energy Lim of the local field energy L.sub.1 while a second part of the memory sub-array 1010 is for calculating a second part local field energy L.sub.1.sup.(?) of the local field energy L.sub.1 to generate the local field energy L.sub.1 as L.sub.1=L.sub.1.sup.(+)+L.sub.1.sup.(?).

    [0078] Further, in FIG. 10, the first part of the memory sub-array 1010 is electrically isolated from the second part of the memory sub-array 1010.

    [0079] FIG. 11 shows a circuit diagram of a memory device according to one embodiment of the application. In FIG. 11, the memory device 1100 has a memory array including: a first memory sub-array 1110, a second memory sub-array 1120 and a third memory sub-array 1130. The first memory sub-array 1110 and the second memory sub-array 1120 are substantially equivalent to the memory sub-array 1010 of the memory device 1000 in FIG. 10. Of course, the memory device 1100 may further include: a calculation unit, a conversion unit, a bit line driver, a word line driver and so on.

    [0080] The first memory sub-array 1110 is for storing the first order coefficients J.sub.1.sup.(1)(=J.sub.1.sup.(1+)+J.sub.1.sup.(1?)) and the third order coefficients J.sub.3.sup.(3)(=J.sub.3.sup.(3+)+J.sub.3.sup.(3?)). That is, the first memory sub-array 1110 is for storing a plurality of odd order interact coefficients. The first memory sub-array 1110 is substantially equivalent to the memory cells 1-2?1-N, 2-2?2-N, . . . , N?2?N-N in FIG. 10. The first memory sub-array 1110 is on the diagonal position of the memory array.

    [0081] The second memory sub-array 1120 is for storing the second order coefficients J.sub.2.sup.(2)(=J.sub.2.sup.(2+)+J.sub.2.sup.(2?)). That is, the second memory sub-array 1120 is for storing a plurality of even order interact coefficients. The second memory sub-array 1120 is substantially equivalent to the memory cells 1-1?N?1 and 1-(N+1?N-(N+1). The second memory sub-array 1120 is on the two sides of the memory array.

    [0082] The plurality of memory cells of the third memory sub-array 1130 are programmed as the N type transistors and the P type transistors having high threshold voltages (V.sub.H and ?V.sub.H). That is, in normal operations, the plurality of memory cells of the third memory sub-array 1130 are turned off.

    [0083] The memory device 1100 in FIG. 11 has an advantage of array scalability, that is, mapping coefficients of a low spin-count with a small partition in a large array.

    [0084] FIG. 12 shows a circuit diagram of a memory device according to one embodiment of the application. In FIG. 12, the memory device 1200 includes: a plurality of first memory sub-arrays 1210-1?1210-M, a plurality of second memory sub-arrays 1220-1?1220-M and a plurality of third memory sub-arrays 1230-1?1230-M. The first memory sub-array 1210-1, the second memory sub-array 1220-1 and the third memory sub-array 1230-1 are of the first group, the first memory sub-array 1210-2, the second memory sub-array 1220-2 and the third memory sub-array 1230-2 are of the second group. Others are so on. The first memory sub-array 1210-M, the second memory sub-array 1220-M and the third memory sub-array 1230-M are of the M-th group.

    [0085] Of course, the memory device 1200 may further include a calculation unit 1240, a conversion unit 1250, a bit line driver, and a word line driver and so on.

    [0086] Each of the first memory sub-arrays 1210-1?1210-M is for storing the first order coefficients J.sub.1.sup.(1)(=J.sub.1.sup.(1+)+J.sub.1.sup.(1?)) and the third order coefficients J.sub.3.sup.(3)(=J.sub.3.sup.(3+)+J.sub.3.sup.(3?)). That is, the first memory sub-arrays 1210-1?1210-M are for storing a plurality of odd order interact coefficients. The first memory sub-arrays 1210-1?1210-M are substantially equivalent to the first memory sub-array 1110 in FIG. 10. The first memory sub-arrays 1210-1?1210-M are on the diagonal position of the memory array.

    [0087] Each of the second memory sub-arrays 1220-1?1220-M is for storing the second order coefficients J.sub.2.sup.(2)(=J.sub.2.sup.(2+)+J.sub.2.sup.(2?)). That is, the second memory sub-arrays 1220-1?1220-M are for storing a plurality of even order interact coefficients. The second memory sub-arrays 1220-1?1220-M are substantially equivalent to the second memory sub-array 1120 in FIG. 11. The second memory sub-arrays 1220-1?1220-M are on the two sides of the memory array.

    [0088] The plurality of memory cells of the third memory sub-arrays 1230-1?1230-M are substantially equivalent to the third memory sub-array 1130 in FIG. 11. In normal operations, the plurality of memory cells of the third memory sub-arrays 1230-1-1230-M are turned off.

    [0089] In FIG. 12, in calculation, the first group to the M-th group independently calculate the local field energy group by group. That is, one group is allowed to calculate the local field energy. The input values are input into the selected group, but not into the unselected groups.

    [0090] The word lines corresponding to the unselected groups are grounded (0V) and the bit lines corresponding to the unselected groups are floated or grounded.

    [0091] The memory device 1200 of FIG. 12 is an extension version of the memory device 1100 of FIG. 11.

    [0092] FIG. 13 shows a circuit diagram of a memory device according to one embodiment of the application. In FIG. 13, the memory device 1300 includes: a plurality of first memory sub-arrays 1310-1?1310-M, a plurality of second memory sub-arrays 1320-1?1320-M and a plurality of third memory sub-arrays 1330-1?1330-M. Of course, the memory device 1300 may further include a calculation unit 1340, a conversion unit 1350, a bit line driver, and a word line driver and so on. Further, the memory device 1300 includes: a switch circuit 1360 coupled to the common source lines.

    [0093] The first memory sub-arrays 1310-1?1310-M, the second memory sub-arrays 1320-1?1320-M, the third memory sub-arrays 1330-1?1330-M, the calculation unit 1340, the conversion unit 1350 are similar to the above description and thus are not repeated here.

    [0094] In FIG. 13, the input values are input into all groups while the switch circuit 1360 selects the common source lines to select which one of the groups to calculate the local field energy. Similarly, one group is selected in one time to calculate the local field energy.

    [0095] FIG. 14 shows a circuit diagram of a memory device according to one embodiment of the application. In FIG. 14, the memory device 1400 includes: a plurality of first memory sub-arrays 1410-1?1410-M, a plurality of second memory sub-arrays 1420-1?1420-M and a plurality of third memory sub-arrays 1430-1?1430-M. Of course, the memory device 1400 may further include a plurality of calculation units 1440-1?1440-3, a plurality of conversion units 1450-1?1450-3, a bit line driver, a word line driver and so on. Further, the memory device 1400 includes: a switch circuit 1460 coupled to the common source lines.

    [0096] The first memory sub-arrays 1410-1?1410-M, the second memory sub-arrays 1420-1?1420-M, the third memory sub-arrays 1430-1?1430-M, the calculation units 1440-1?1440-3 and the conversion units 1450-1?1450-3 are similar to the above description and thus are not repeated here.

    [0097] In FIG. 14, the switch circuit 1460 selects the common source lines for selecting one or more groups for outputting the local field energy. As shown in FIG. 14, because there are three calculation units 1440-1?1440-3 and three conversion units 1450-1?1450-3, at most three groups are selected in one time to output the local field energy.

    [0098] In the above embodiments, the N type transistor and the P type transistor of the memory cell 30 are for example but not limited by, floating gate devices, Silicon-Oxide-Nitride-Oxide-Silicon (SONOS) thin film transistors, ferroelectric field effect transistors (FeFET) and so on.

    [0099] FIG. 15A and FIG. 15B show cascade of the memory cells according to one embodiment of the application. As shown in FIG. 15A, by three dimension integration, the memory cells on different metal layers M0, M1, . . . Mn are cascaded.

    [0100] As shown in FIG. 15B, in cascading the memory cells, by three dimension integration, a control signal line (CSL) is inserted between different metal layers (M0, Mn) for effective programming and erasing, wherein the memory cell on the upper metal layer (Mn) is free of programming and erasing.

    [0101] FIG. 16 shows an operation method for a memory device according to one embodiment of the application. The operation method is applicable to the above memory devices. In step 1610, a configuration of a plurality of input values (?.sub.1 . . . ) of the model computation is initialized. In step 1620, it is determined whether the input values have a converged update status. If converged, then the configuration of the input values is optimized (step 1625), and the operation method is completed. If not converged yet, the step 1630 is performed to randomly select one input value from the input values.

    [0102] In step 1640, the selected input value is flipped. In step 1650, it is determined an energy difference (?H.sub.i) corresponding to the selected input value is smaller than 0. If the energy difference (?H.sub.i) is smaller than 0, then the input value flip is accepted (step 1665). If the energy difference (?H.sub.i) is not smaller than 0, in step 1660, it is determined whether exp(?(?H.sub.i/T)) is larger than a random number (the random number is between 0?1), wherein the parameter T refers to temperature.

    [0103] If the step 1660 is yes, then the flow proceeds to step 1665. If the step 1660 is no, then the flow proceeds to step 1670 to reject the input value flip. In step 1675, the input values are updated.

    [0104] FIG. 17 shows an operation method of a memory device according to one embodiment of the application. The operation method is applicable to the above memory devices. The operation method is for processing a model computation, the model computation having a plurality of input values and a plurality of interact coefficients. The operation method includes: storing a plurality of first part coefficients of the interact coefficients in a first part of a plurality of memory cells of at least one memory sub-array of a memory array of the memory device, storing a plurality of second part coefficients of the interact coefficients in a second part of the plurality of memory cells of at least one memory sub-array of the memory device, wherein the first part of the memory cells is electrically isolated from the second part of the memory cells based on a diagonal of the memory array (1710); inputting the input values into the memory cells, the memory cells generate a plurality of source currents, the source currents flowing through a plurality of first signal lines of the memory device to generate a plurality of common source currents, the first part of the memory cells generate a first part of the common source currents, the second part of the memory cells generate a second part of the common source currents (1720); and calculating a first part of a local field energy of the model computation based on the first part of the common source currents, and calculating a second part of the local field energy of the model computation based on the second part of the common source currents (1730).

    [0105] The above embodiments use hardware designs to rapidly execute complex model computations, which may result in less time-consuming, less energy-consuming. When the dimension of the Ising model is larger and has a larger amount of spin states, the above embodiments may still rapidly complete computation.

    [0106] 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.