MEMORY DEVICE AND OPERATING METHOD THEREOF
20230221882 · 2023-07-13
Inventors
- Wei-Chen WANG (Taipei City, TW)
- Han-Wen HU (Tainan City, TW)
- Yung-Chun LI (New Taipei City, TW)
- Huai-Mu WANG (New Taipei City, TW)
- Chien-Chung HO (Chiayi County, TW)
- Yuan-Hao CHANG (Taipei City, TW)
- Tei-Wei KUO (Taipei City, TW)
Cpc classification
G06F3/0604
PHYSICS
G06F3/0655
PHYSICS
International classification
Abstract
A memory device, includes a memory array for storing a plurality of vector data each of which has an MSB vector and a LSB vector. The memory array includes a plurality of memory units each of which has a first bit and a second bit. The first bit is used to store the MSB vector of each vector data, the second bit is used to store the LSB vector of each vector data. A bit line corresponding to each vector data executes one time of bit-line-setup, and reads the MSB vector and the LSB vector of each vector data according to the bit line. The threshold voltage distribution of each memory unit is divided into N states, where N is a positive integer and N is less than 2 to the power of 2, and the effective bit number stored by each memory unit is less than 2.
Claims
1. A memory device, comprising: a memory array, for storing a plurality of vector data, each vector data has an MSB vector and a LSB vector, and the memory array comprises: a plurality of memory units, each memory unit has a first bit and a second bit, the first bit is used to store the MSB vector of each vector data, and the second bit is used to store the LSB vector of each vector data; wherein, a bit line corresponding to each vector data executes one time of bit-line-setup, and reads the MSB vector and the LSB vector of each vector data according to the bit line, the threshold voltage distribution of each memory unit is divided into N states, N is a positive integer and N is less than 2 to the power of 2, and the effective bit number stored by each memory unit is less than 2.
2. The memory device according to claim 1, wherein a physical page of the memory array has a plurality of logic pages, the logic pages include a high page and a low page, the high page corresponds to the first bit to store the MSB vector, the low page corresponds to the second bit to store the LSB vector.
3. The memory device according to claim 1, wherein each memory unit is a multi-level cell (MLC), the threshold voltage distribution of each memory unit is divided into a first state, a second state and a third state; wherein, the first state only corresponds to a data with the first bit of “1” and the second bit of “0”, or the first state only corresponds to a data with the first bit of “1” and the second bit of “1”.
4. The memory device according to claim 1, wherein each memory unit is a multi-level cell (MLC), the threshold voltage distribution of each memory unit is divided into a first state, a second state and a third state; wherein, the third state only corresponds to a data with the first bit of “0” and the second bit of “0”, or the third state only corresponds to a data with the first bit of “0” and the second bit of “1”.
5. The memory device according to claim 1, wherein each memory unit is a triple-level cell (TLC), each memory unit further includes a third bit, the first bit is used to store a first part of each vector data, the second bit is used to store a second part of each vector data, the third bit is used to store a third part of each vector data; wherein, the threshold voltage distribution of each memory unit is divided into N states, N is a positive integer and N is less than 2 to the power of 3, and the effective bit number stored by each memory unit is less than 3.
6. The memory device according to claim 1, wherein the vector data include a plurality of weight feature vector and an input feature vector, and the memory array comprises: a plurality of word lines, for storing the weight feature vectors; wherein, the memory device executes a selective bit line read operation to read the weight feature vectors from the word lines respectively.
7. The memory device according to claim 6, further comprising: a common data latch, for receiving the input feature vector; and a first data latch, for temporarily storing the input feature vector; wherein, the memory device executes a multiplying-operation according to the input feature vector and one of the weight feature vectors.
8. The memory device according to claim 7, further comprising: a second data latch, for temporarily storing a result of the multiplying-operation; wherein, the memory device executes an accumulating-operation according to a result of the multiplying-operation.
9. An operating method of a memory device, wherein the memory device includes a memory array, the memory array includes a plurality of memory units, each memory unit has a first bit and a second bit, the operating method comprising: storing a plurality of vector data in the memory array, each vector data has an MSB vector and a LSB vector; storing the MSB vector of each vector data in the first bit; and storing the LSB vector of each vector data in the second bit; executing one time of bit-line-setup for a bit line corresponding to each vector data; and reading the MSB vector and the LSB vector of each vector data according to the bit line; wherein, the threshold voltage distribution of each memory unit is divided into N states, N is a positive integer and N is less than 2 to the power of 2, and the effective bit number stored by each memory unit is less than 2.
10. The operating method according to claim 9, wherein a physical page of the memory array has a plurality of logic pages, the logic pages include a high page and a low page, the high page corresponds to the first bit to store the MSB vector, the low page corresponds to the second bit to store the LSB vector.
11. The operating method according to claim 9, wherein each memory unit is a multi-level cell (MLC), the threshold voltage distribution of each memory unit is divided into a first state, a second state and a third state; wherein, the first state only corresponds to a data with the first bit of “1” and the second bit of “0”, or the first state only corresponds to a data with the first bit of “1” and the second bit “1”.
12. The operating method according to claim 9, wherein each memory unit is a multi-level cell (MLC), the threshold voltage distribution of each memory unit is divided into a first state, a second state and a third state; wherein, the third state only corresponds to a data with the first bit of “0” and the second bit of “0”, or the third state only corresponds to a data with the first bit of “0” and the second bit of “1”.
13. The operating method according to claim 9, wherein each memory unit is a triple-level cell (TLC), each memory unit further includes a third bit, the operating method comprises: storing a first part of each vector data in the first bit; storing a second part of each vector data in the second bit; and storing a third part of each vector data in the third bit; wherein, the threshold voltage distribution of each memory unit is divided into N states, N is a positive integer and N is less than 2 to the power of 3, and the effective bit number stored by each memory unit is less than 3.
14. The operating method according to claim 9, wherein the vector data include a plurality of weight feature vector and an input feature vector, and the memory array comprises a plurality of word lines for storing the weight feature vectors, the operating method further comprises: executing a selective bit line read operation to read the weight feature vectors from the word lines respectively.
15. The operating method according to claim 14, wherein the memory device further comprises a common data latch and a first data latch, the operating method further comprises: receiving the input feature vector through the common data latch; temporarily storing the input feature vector in the first data latch; and executing a multiplying-operation according to the input feature vector and one of the weight feature vectors.
16. The operating method according to claim 15, wherein the memory device further comprises a second data latch, the operating method further comprises: temporarily storing a result of the multiplying-operation in the second data latch; and executing an accumulating-operation according to a result of the multiplying-operation.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020] 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.
DETAILED DESCRIPTION
[0021]
[0022] The memory array 100 includes a plurality of word lines WL1-WLN, each of the word lines WL1-WLN may store a vector data. When the memory device 1000 is used to perform a MAC-operation of face recognition algorithm, the feature vectors q1-qN of N faces F1-FN may be pre-stored in the word lines WL1-WLN of the memory array 100. For example, the feature vector q1 of the first face F1 is a 20-bit binary data “00110011001100001111” which is stored in the word line WL1, and the feature vector q2 of the second face F2 is a 20-bit data “11001100110000001111” which is stored in the word line and so on.
[0023] Moreover, each of the memory units (or memory units) in the memory array 100 of the present disclosure is 1.5-bit multi-level cell (MLC). Compared with the normal 2-bit MLC memory unit (hereinafter referred to as “2-bit MLC”), the 1.5-bit MLC memory unit (hereinafter referred to as “1.5-bit MLC”) of the present disclosure stores a less amount of data, and the equivalent number of bits is 1.5 bits. The mechanism of the 1.5-bit MLC will be described in detail later.
[0024] The data latch 230 (i.e., the common data latch (CDL)) may temporarily store vector data inputted from the memory device 1000 externally. When performing face recognition or face search, the feature vector p0 of the face F0 to be recognized may be externally inputted to the memory device 1000 and temporarily stored in the data latch 230. The feature vector p0 is, for example, a data of 20 bits “11111111000000001111”. Then, the feature vector p0 is transferred from the data latch 230 to the data latch 210.
[0025] A “selective bit line (BL) read” operation may be performed in the memory array 100 to read the feature vectors q1-qN from the word lines WL1-WLN respectively, and the selective BL read operation may have a function of multiplying-operation. The feature vector p0 to be identified may be referred to as “input feature vector p0”, and the pre-stored feature vectors q1-qN may be referred to as “weight feature vector qi”, where i=1−N. The selective BL read operation may achieve the multiplying-operation of the input feature vector p0 and the weight feature vector qi. When a bit of the feature vector p0 and the corresponding bit of the feature vector qi are both “1”, the selective BL read operation may read the bit of the feature vector qi as “1”. When a bit of the feature vector p0 is “0” or the corresponding bit of the feature vector qi is “0”, selective BL read operation may read the bit of the feature vector qi as “0”. Accordingly, the output result qi′=p0*qi obtained by the selective BL read operation. The output result qi′ may be referred to as “output feature vector qi′”. For example, the feature vector p0 is “11111111000000001111”, the feature vector q1 of the first face F1 is “00110011001100001111”, and the output feature vector q1′ obtained by the selective BL read operation is “00110011000000001111”. Then, the output feature vector q1′ may be written into the data latch 220.
[0026] Then, an accumulating-operation may be performed on the output feature vector q1′ which is temporarily stored in the data latch 220, so as to accumulate the bits of “1” in the output feature vector q1′. In one example of the accumulating-operation, the memory device 1000 may execute a fail-bit-count instruction to perform a counting-operation on the output feature vector q1′. Taking the output feature vector q1′=“00110011000000001111” as an example, the 8 bits of B0˜B3, B12, B13, B16 and B17 are “1”, and the counting result C1 of the output feature vector err is a decimal “8”, and the counting result C1 is the MAC-operation result MAC1 of the feature vector p0 and the feature vector q1 Then, the counting result C1 may be transferred to the data latch 230, and the counting result C1 may be outputted to the exterior of the memory device 1000.
[0027] In the face recognition algorithm, the similarity between the pre-stored face F1 and the face F0 to be recognized may be represented as the inner product “∥q1∥∥p0∥cos θ” of the feature vector p0 and the feature vector q1. When the similarity between the face F1 and the face F0 is higher, the angle “θ” is closer to zero, and the inner product of the feature vector p0 and the feature vector q1 is close to “∥q1∥∥p0∥”. Therefore, the similarity between the face F1 and the face F0 to be recognized may be estimated according to the MAC-operation result MAC1 of the feature vector p0 and the feature vector q1.
[0028]
[0029] Then, in step S104, the feature vector p0 is transferred from the data latch 230 (i.e., the common data latch (CDL)) to the data latch 210 (i.e., the first data latch). Then, in step S106, a selective BL read operation is performed, so as to read the feature vectors q1-qN from the word lines WL1-WLN of the memory array 100 respectively and perform a multiplying-operation thereon. The output feature vectors q1′-qN′ obtained by the selective BL read operation are products of the feature vectors q1-qN and the feature vector p0. The output feature vectors q1′-qN′ may be temporarily stored in the data latch 220 in sequence.
[0030] Then, in step S108, a counting-operation is performed on the output feature vectors q1′-qN′ temporarily stored in the data latch 220 respectively, so as to obtain a counting result C1. Then, in step S110, the counting result C1 may be transferred to the data latch 230, and the counting result C1 may be outputted through the data latch 230.
[0031] On the other hand, referring to Table 1 and Table 2. Table 1 shows a data allocation DA_1 of a normal 2-bit MLC of a comparative example. A physical page in a memory array may include a plurality of logical pages, such as high pages and low pages. Taking a normal 2-bit MLC as an example, the high page corresponds to the first bit CB1 of the MLC, and the low page corresponds to the second bit CB2 of the MLC. In the data allocation DA_1 of the comparative example, the feature vectors of different faces may be stored in the high page or the low page respectively. For example, the feature vector q1 of the first face F1 out of the faces F1-FN is stored in the high page, the feature vector q2 of the second face F2 is stored in the low page.
TABLE-US-00001 TABLE 1 (data allocation DA_1) High page Feature vector q1 of face F1 (the first bit CB1) Low page Feature vector q2 of face F2 (the second bit CB2)
[0032] Table 2 shows a data allocation DA_2 of the 1,5-bit MLC of the present disclosure. The data of each 8 bits of the feature vector of the face can be divided into vectors of most significant bits (MSB) and least significant bits (LSB). For example, the feature vector q1 of the face F1 is divided into an MSB vector and an LSB vector, and each of the MSB vector and the LSB vector has, for example, 4 bits. The data of the MSB vector is more important and hence stored in the high page, and the data of the LSB vector less important and hence stored in the low page. Similarly, the MSB vector of the feature vector q2 of the next face F2 is stored in the high page, and the LSB vector of the feature vector q2 is stored in the low page. Moreover, the high page corresponds to the first bit CB1 of the 1.5-bit MLC of the present disclosure, and the low page corresponds to the second bit CB2 of the 1.5-bit MLC.
TABLE-US-00002 TABLE 2 (data allocation DA_2) High page MSB vector of feature MSB vector of feature (the first bit CB1) vector q1 of face F1 vector q2 of face F2 Low page LSB vector of feature LSB vector of feature (the second bit vector q1 of face F1 vector q2 of face F2 CB2)
[0033]
[0034] Please refer to
[0035] Please refer to
[0036] Table 3 shows an example of contents of the first bit CB1 and the second bit CB2, which may show the difference between the data (CB1, CB2) of the 1.5-bit MLC and the normal 2-bit MLC.
TABLE-US-00003 TABLE 3 Normal 2-bit MLC High page The first bit CB1 10010100 Low page The second bit CB2 01011011 1.5-bit MLC High page The first bit CB1 10010100 Low page The second bit CB2 00010000
[0037] The memory device 1000 of the present disclosure uses 1.5-bit MLC to improve accuracy of data reading. Furthermore, in operation the memory device 1000 reduces redundant bit-line-setup (BL setup) to reduce time which is required for data reading.
[0038] For normal 2-bit MLC, the reading-operation of the second bit CB2 of the low page needs to perform one time of bit line setup and apply one time of reading voltage V.sub.R2. One setup-time t_BL_S for bit-line-setup is, for example, 60 μs, and the reading-time t_Vread corresponding to applying reading voltage V.sub.R2 is, for example, 15 μs. That is, the execution time of the reading-operation of the second bit CB2 is approximately 60 μs+15 μs=75 μs. On the other hand, the reading-operation of the first bit CB1 of the high page needs to perform one time of bit-line-setup and apply two times of reading voltages V.sub.R1 and V.sub.R3. That is, the execution time of the reading-operation of the first bit CB1 is approximately 60 μs+2*15 μs=90 μs. From the above, the reading-time of the data (CB1, CB2) of high page and low page of a normal 2-bit MLC is approximately 75 μs+90 μs=165 μs.
[0039] In addition, for normal 1-bit single-level cell (SLC), since normal 1-bit SLC only stores 1-bit data, reading of 2-bit data requires two times of reading-operations. One time of reading-operation needs to perform one time of bit-line-setup and apply one time of reading voltage V.sub.R1, and execution time thereof is approximately 60 μs+15 μs=75 μs. Therefore, reading-time for a normal 1-bit SLC to read 2-bit data is approximately 2*75 μs=150 μs.
[0040] In contrast, the memory device 1000 of the present disclosure only performs one time of bit-line-setup when performing reading-operation of the first bit CB1 and the second bit CB2, therefore, only one of setup-time t_BL_S=60 μs is required. Moreover, the 1.5-bit MLC used in the memory device 1000 of the present disclosure only operates at two reading voltages V.sub.R1 and V.sub.R2, therefore, only two of reading-time t_Vread are required, i.e., 2*15 μs=30 μs. From the above, reading-time of data (CB1, CB2) of high page and low page of the 1.5-bit MLC is approximately 60 μs+30 μs=90 μs. Accordingly, the memory device 1000 of the present disclosure performs only one time of bit line setup with the 1.5-bit MLC so as to greatly improve reading-time-latency, compared with reading-time of 165 μs of normal 2-bit MLC and reading-time of 150 μs of normal 1-bit SLC.
[0041]
[0042] On the other hand, in step S202, when it is determined that the memory device 1000 will remove the data, then proceeding to step S210: delete the data. For example, the N feature vectors q1-qN stored in the memory array 100 are deleted.
[0043] On the other hand, in step S202, when it is determined that the memory device 1000 will create data, insert data or update data, then proceeding to step S206: quantize and calculate revised feature vector qi. Next, executing step S208: programing and writing the data of revised feature vector qi into the memory array 100. The writing-operation of the data of the feature vector qi may be performed according to the data pattern of the 1.5-bit MLC shown in
[0044]
[0045] Please refer to
[0046] Please refer to
[0047] Please refer to
[0048] The first data pattern DP_1 to the fourth data pattern DP_4 of the 1.5-bit MLC shown in
[0049] In other examples, the memory unit of the memory device 1000 of the present disclosure may also be a triple level cell (TLC), and the TLC memory unit may have a first bit CB1, a second bit CB2 and a third bit 083. Please refer to
[0050] Please refer to
[0051]
[0052] First, the second data pattern DP_2′ shown in
[0053] According to variations of data arrangements, other data patterns of TLC may be obtained. The third data pattern DP_3′ shown in
[0054] On the other hand, please refer to Table 4 and Table 5. Table 4 shows the data allocation DA_3 of the normal 3-bit TLC of another comparative example. A physical page of the memory array may include a high page, a middle page and a low page, which respectively correspond to the first bit CB1, the second bit CB2 and the third bit CB3 of the TLC memory units. The feature vector q1 of the first face F1 out of the faces F1˜FN is stored in the high page, the feature vector q2 of the second face F2 is stored in the middle page, and the feature vector q3 of the third face F3 is stored in low page.
TABLE-US-00004 TABLE 4 (data allocation DA_3) High page Feature vector q1 of face F1 (the first bit CB1) Middle page Feature vector q2 of face F2 (the second bit CB2) low page Feature vector q3 of face F3 (the third bit CB3)
[0055] Table 5 shows the data allocation DA_4 of TLC of the present disclosure. The data of each feature vector may be divided into a first part P1, a second part P2 and a third part P3, which are respectively stored in the high page, the middle page and the low page according to importance of data for each part.
TABLE-US-00005 TABLE 5 (data allocation DA_4) High page first part P1 of first part P1 of first part P1 of (the first bit feature vector q1 feature vector q2 feature vector q3 CB1) of face F1 of face F2 of face F3 Middle page second part P2 of second part P2 of second part P2 of (the second Feature vector q1 feature vector q2 feature vector q3 bit CB2) of face F1 of face F2 of face F3 low page third part P3 of third part P3 of third part P3 of (the third bit Feature vector q1 feature vector q2 feature vector q3 CB3) of face F1 of face F2 of face F3
[0056] The above-mentioned embodiments describe various data patterns and data allocations of the MLC and TLC with less equivalent number of bits. Similar mechanism may also be applied to the quad level cell (QLC).
[0057] 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.