DATA SCRAMBLING METHOD THAT CONTROLS CODE DENSITY
20220215874 · 2022-07-07
Inventors
- Dong Hee Lee (Seoul, KR)
- Choul Seung HYUN (Uijeongbu-si, KR)
- Gwan Il JEONG (Seoul, KR)
- Soo Won YOU (Seoul, KR)
Cpc classification
G11C29/18
PHYSICS
G11C7/1006
PHYSICS
International classification
G11C11/56
PHYSICS
G11C29/18
PHYSICS
Abstract
A data scrambling method for controlling a code density according to an exemplary embodiment of the present disclosure includes receiving a plain code which is a code to be stored in the non-volatile memory device and a storage address at which the plain code is recorded; determining a rank corresponding to the plain code, using an ET table including appearance frequency rank information corresponding to individual plain code; calculating an adjustment rank corresponding to the plain code, using the rank and a random number that is generated based on the address of storage address; determining a cipher code corresponding to the appearance frequency rank of the plain code, using the adjustment rank and an ECC table including rank information determined by an objective function for individual cipher code; and storing the cipher code in the storage address.
Claims
1. A data scrambling method performed by a non-volatile memory device to control a code density, the method comprising: receiving a plain code which is a code to be stored in the non-volatile memory device and a storage address at which the plain code is recorded; determining a rank corresponding to the plain code, using an ET table including appearance frequency rank information corresponding to individual plain code; calculating an adjustment rank corresponding to the plain code, using the rank and a random number that is generated based on the address of storage address; determining a cipher code corresponding to the appearance frequency rank of the plain code, using the adjustment rank and an ECC table including rank information determined by an objective function for individual cipher code; and storing the cipher code in the storage address.
2. The data scrambling method according to claim 1, wherein in the determining of a cipher code corresponding to the appearance frequency rank of the plain code, when the adjustment rank is out of index range of the ECC table, the adjustment rank is rearranged within the index range of the ECC table.
3. The data scrambling method according to claim 1, wherein the determining of a cipher code corresponding to the appearance frequency rank of the plain code further uses an EW table which has a circular shape and is constructed from the ECC table such that the corresponding rank increases as the index of the EW table increases until half of the entire index and then the corresponding rank decreases as the index of the EW table increases.
4. The data scrambling method according to claim 1, wherein the determining of a cipher code corresponding to the appearance frequency rank of the plain code further uses a WH table which has a circular shape and translates the appearance frequency rank information of the ET table to an index of the ECC table such that the corresponding rank of the ECC table increases as the index of the WH table increases until half of the entire index and then the corresponding rank of the ECC table decreases as the index of the WH table increases.
5. The data scrambling method according to claim 1, wherein a random number is determined using one of a plurality of non-uniform probability density functions in which 0 has the highest probability and other numbers have probabilities proportional to the distance from 0 and, wherein the one of the plurality of non-uniform probability density functions is selected with information about cell states and, wherein the cell state is conjectured from a history queue that collects recently translated plain and cipher codes.
6. The data scrambling method according to claim 1, further comprising: reconfiguring an appearance frequency rank of the ET table, wherein the reconfiguring of an appearance frequency rank of the ET table includes: increasing the rank of a recently translated plain code by a predetermined step value in the ET table.
7. The data scrambling method according to claim 1, further comprising: reconfiguring an appearance frequency rank of the ET table, wherein the reconfiguring of an appearance frequency rank of the ET table includes: increasing the rank of a recently translated plain code to the top in the ET table.
8. The data scrambling method according to claim 1, wherein in the calculating of the adjustment rank, the plain code is divided into a plurality of sub-plain-codes and an adjustment rank corresponding to each of the plurality of sub-plain-codes is calculated using an ET table corresponding to each of the plurality of sub-plain-codes and the random number, in the determining of a cipher code, a plurality of sub-cipher-codes corresponding to an appearance frequency rank of the plurality of sub-plain-codes is determined using the adjustment rank and the ECC table including information of the sub-cipher-codes corresponding to the appearance frequency rank of the plurality of sub-plain-codes and the plurality of sub-cipher-codes is combined to determine the cipher code, and the calculating of the adjustment rank and the determining of the cipher code operate in parallel for the plurality of sub-plain-codes.
9. The data scrambling method according to claim 1, wherein when a programming distance (PD) is defined by an objective function which digitizes the closeness to a target for individual cipher code in accordance with a predetermined criterion, the ECC table matches a cipher code with a rank induced from the appearance frequency of the individual plain code.
10. A data descrambling method performed on data scrambled in accordance with the data scrambling method according to claim 1, the method comprising: receiving a read address from which a plain code is read; reading a cipher code from the read address; calculating a rank corresponding to a cipher code, using a DT table including appearance frequency rank information of a plain code corresponding to individual cipher codes, using a random number to calculate adjustment rank; and acquiring a plain code from a DCC table including information of a plain code corresponding to an appearance frequency rank of an individual plain code.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other aspects, features and other advantages of the present disclosure will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
[0051] Those skilled in the art may make various modifications to the present disclosure and the present disclosure may have various embodiments thereof, and thus specific embodiments will be described in detail with reference to the drawings. It should be understood, however, that the present disclosure is not limited to the specific embodiments, but includes all changes, equivalents, or alternatives which are included in the spirit and technical scope of the present disclosure. In the description of respective drawings, similar reference numerals designate similar elements.
[0052] Though terms such as first, second, A, or B may be used to describe various components, the components are not limited by the above terms. The above terms are used only to discriminate one component from the other component. For example, without departing from the scope of the present disclosure, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component. A term of and/or includes combination of a plurality of related elements or any one of the pluralities of related elements.
[0053] Terms such as “coupled” and “connected” between elements should be understood to mean that the element may be directly coupled or directly connected to the other element or coupled or connected to the other element through a third element. In contrast, terms “directly coupled” and “directly connected” between elements should be understood to mean that no element is not present therebetween.
[0054] Terms used in the present application are used only to describe a specific exemplary embodiment, but they are not intended to limit the present disclosure. A singular form may include a plural form if there is no clearly opposite meaning in the context. In the present application, terms “include” and “have” should be understood to indicate that a feature, a number, a step, an operation, a component, a part or the combination those of described in the specification is present, but do not exclude a possibility of presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations, in advance.
[0055] If it is not contrarily defined, all terms used herein including technological or scientific terms have the same meaning as those generally understood by a person with ordinary skill in the art. Terms defined in generally used dictionary shall be construed that they have meanings matching those in the context of a related art, and shall not be construed in ideal or excessively formal meanings unless they are clearly defined in the present application.
[0056] A data size used in the exemplary embodiment of the present disclosure is not limited to a specific value, and another size may also be used. Further, a table or a data structure may be configured with different size of data from the proposed size. Proposed techniques are not limited to a specific size of data but may also be operated with various size of data.
[0057] In the specification and the claim, unless explicitly described to the contrary, the word “comprise” and variations such as “comprises” or “comprising”, will be understood to imply the inclusion of status elements but not the exclusion of any other elements.
[0058] In the exemplary embodiment of the present disclosure, encoding refers to a process of converting a plain code to a cipher code while performing scrambling or ciphering. Further, decoding refers to a process of converting a cipher code to a plain code while performing descrambling or deciphering. The terms scrambling and encoding may be used interchangeably in the sense of converting a plain code to a cipher code and the terms descrambling and decoding may be used interchangeably in the sense of converting a cipher code to a plain code.
[0059] Hereinafter, the present disclosure will be described in detail with reference to the accompanied drawings.
[0060] Each plain code has a rank determined by its appearance frequency and an ET table provides the rank information of plain codes. Also, each cipher code has a rank determined by an objective function and an DT table provides the rank information of cipher codes.
[0061]
[0062] In step S110, a non-volatile memory device receives a plain code and a storage address at which the plain code is recorded (programmed).
[0063] Here, the plain code is a data code given for recording to non-volatile memory. However, the plain code may be converted to a cipher code by a scrambling method and, in fact, the cipher code may be recorded.
[0064] In step S120, the non-volatile memory device determines a rank corresponding to the plain code, using an ET table including appearance frequency rank information corresponding to individual plain code.
[0065] The non-volatile memory device obtains the rank of the plain code from the ET table.
[0066] In step S130, the non-volatile memory device calculates an adjustment rank with the rank and a random number.
[0067] Here, the random number is generated by a function and the adjustment rank refers to a rank that is newly calculated from the original rank (obtained from the ET table) and the random number.
[0068] In step S140, the non-volatile memory device determines a cipher code corresponding to the adjustment rank using an ECC table, which includes cipher codes in an order of the rank determined by an objective function.
[0069] Eventually, a plain code is converted to a cipher code through ET and ECC tables.
[0070] Finally, in step S150, the non-volatile memory device stores a cipher code at the address of the storage device.
[0071]
[0072] In step S210, the non-volatile memory device receives a read address from which a plain code is read.
[0073] For example, from an external device, the non-volatile memory device may receive a read address to read the plain code. In fact, however, a cipher code may be stored at the address of the non-volatile memory device.
[0074] In step S220, the non-volatile memory device reads the cipher code from the address.
[0075] In step S230, the non-volatile memory device may acquire the rank of the cipher code from the DT table.
[0076] Then the non-volatile memory device calculates an adjustment rank with the rank and a random number generated by a function.
[0077] Finally, in step S240, the non-volatile memory device acquires a plain code corresponding to the adjustment rank from a DCC table that includes plain codes in an order of the rank.
[0078] In the exemplary embodiment of the present disclosure, the rank represents the appearance frequency of a plain code.
[0079] By calculating the adjustment rank with a random number generated by the function shift(addr) as illustrated in
[0080] Unlike existing scrambling techniques of the art, which generate pure-random cipher codes, data scrambling of the present disclosure tries to control cipher code densities to meet specific objectives.
[0081] Controlling cipher code densities may be done through a combination of a source of non-uniformity, data structure connecting the non-uniformity to cipher codes, and a random number having non-uniform probability density. In the exemplary embodiment of present disclosure, appearance frequencies of plain codes are used as the source of non-uniformity. However, it is understood that the source of non-uniformity is not limited to the appearance frequencies and any kind of non-uniform property may be used as the source of non-uniformity.
[0082] An exemplary embodiment of the present disclosure, which controls cipher code densities, may use 1) different appearance frequencies of plain codes, 2) a table configuration connecting plain codes having different appearance frequencies to cipher codes having different PD values, and 3) a non-uniform probability density function for random number generation.
[0083]
[0084] In
[0085] In the PDT table, ranks 0, 1, 2 are assigned to cipher codes 221, 205, and 220, respectively, according to their PD values determined by an objective function.
[0086] ET, ECC, DT, and DCC tables for encoding and decoding may be built as illustrated in
[0087] It is understood that the rank relationship in tables is gradually formed in ascending or descending order.
[0088] In
[0089] During encoding and decoding operations, the adjustment rank is used as a table index. If the adjustment rank is out of index range of a table, it is rearranged (rotated) within the index range.
[0090] For example, if the adjustment rank is a negative number smaller than 0, the non-volatile memory device may repeatedly add the number of indexes of the ECC table to the adjustment rank until the adjustment rank is equal to or larger than 0. To be more specific, if the adjustment rank is −100, the non-volatile memory device may change the adjustment rank to 156 by adding 256 to −100.
[0091] In other case, when the adjustment rank is equal to or larger than the number of indexes of the ECC table, the non-volatile memory device may repeatedly subtract the number of indexes from the adjustment rank until the adjustment rank is within the index range. For example, if the adjustment rank is 356, the non-volatile memory device may change the adjustment rank to 100 by subtracting 256 from 356. In the present disclosure, the rearrange of the adjustment rank is referred to as “rotation”.
[0092] By the way, rank relationship may collapse by the rotation. For example, it is assumed that a code has rank 0 (the highest rank) and the adjustment rank is calculated by subtracting 1 from it. In this example, the adjustment rank is expected to be the second highest rank by subtracting 1 from it. After subtraction, the adjustment rank becomes −1. As the adjustment rank is out of index range, it is rotated by adding 256 (the number of indexes), resulting in the adjustment rank 255 (the lowest rank). Now, the adjustment rank becomes the lowest rank after the rotation and it is far below what it is expected to be. Like this, rank relationship may collapse by the rotation.
[0093] According to the exemplary embodiment of the present disclosure, to rotate while maintaining the meaning of the rank, the ECC and DCC tables may be reconfigured to have a circular shape.
[0094] The EW table, which has a circular shape, may be constructed from the ECC table as illustrated in
[0095] As illustrated in
[0096] Further, as illustrated in
[0097] As illustrated in
[0098]
[0099] In
[0100] After finding the index, the random number s is generated by the function shift(addr) with an input of the storage address. Then the adjustment rank is calculated by adding s to wh_index. As the adjustment rank may be out of index range 0˜255, the function rotate( ) rearranges the adjustment rank within 0˜255.
[0101] Finally, the cipher code pointed by the adjustment rank in the EW table is returned. In the example of
[0102]
[0103] The encoding and decoding operations may be performed using single WH table seen in
[0104]
[0105]
[0106] To control cipher code densities, a random number may need to be generated by a non-uniform probability density function. In the exemplary embodiment, the function shift(addr) is used to generate a random number.
[0107]
[0108] Probability density functions are not limited to those illustrated in
[0109] As mentioned previously, a source of non-uniformity in plain codes may be needed to control code densities. To this end, in the exemplary embodiment of present disclosure, appearance frequencies of plain codes are used. An initial table for encoding such as FT table may be built from initial information about appearance frequencies. And, if necessary, other tables may be built from the FT table.
[0110] As another exemplary embodiment, tables may be dynamically reconfigured by examining plain codes and cipher codes after, before or during the encoding process.
[0111] In
[0112] Increasing step is not limited to 1 and the rank may be increased by n (n>=1). Also, the dynamic reconfiguration technique may increase the rank of a plain code to the highest, 0 in the previous example, regardless of the previous rank. For example, if plain code 32 is encoded, its rank rises from 2 to 0 and ranks of plain code 0 and 255 drop to 1 and 2, respectively, in FIG. 5.
[0113] The dynamic reconfiguration technique may be performed after, before or during decoding process. For example, when cipher code c is converted to plain code 32, the dynamic reconfiguration technique may increase the rank of plain code 32 by n step in the FT table (n>=1). Or the rank of plain code 32 may rise to the top regardless of the previous rank. And, if necessary, the ET, DCC, and DW tables may be modified in accordance with the rank changes. In
[0114] The dynamic reconfiguration may be performed at every encoding/decoding time or may be performed periodically or may be performed when some conditions are met. Furthermore, the increasing and decreasing step may change dynamically. For example, the increasing step may be 1 for a period and it may be n (n>=1) for the next period. Or the rank may be changed to the top regardless of previous rank.
[0115] As another exemplary embodiment, the dynamic reconfiguration may be performed at every P conversion time and, during P conversions, appearance frequencies of plain codes are collected. After P conversions, the FT table may be reconfigured with the collected appearance frequencies. If necessary, other tables such as ET, DCC, and DW tables may be modified in accordance with the rank changes.
[0116] Through controlling cipher code densities, the present disclosure may make the average cell state of non-volatile memory close to a target state.
[0117] A quad-level cell (QLC) flash memory stores four bits per cell. The state of a cell after erase operation is defined as S0 and a programming operation may change the state to S0, S1, . . . , S14, and S15. States S0 to S15 of a cell are represented by numerical values of 0 to 15. If scrambling techniques of the related art are used to generate pure-random cipher codes, the average cell state is close to 7.5, which is the median value as illustrated in
[0118] According to yet another exemplary embodiment of the present disclosure, controlling cipher code densities may make the average cell state close to the median value. By setting the target PD value to 7.5, the PDT table may be built to give high ranks to cipher codes making the cell state close to 7.5. Then, the exemplary embodiment of the present disclosure may increase densities of high-rank cipher codes, making the average cell state close to 7.5 as illustrated in
[0119] It is understood that the target PD value is not limited to the median value but any number can be the target PD value.
[0120] Some cells may have fringe states. For example, states in regions 0, 1, 3 or 4 may be regarded as fringe states in
[0121] To reduce ratio of cells with fringe states, according to yet another exemplary embodiment of the present disclosure, a probability density function may be dynamically selected among a plurality of probability density functions by examining information in a history queue. The history queue may be the First-In-First-Out (FIFO) queue, which collects M previous plain and corresponding cipher codes during encoding and decoding processes. From cipher codes in the history queue, cell states may be induced.
[0122] During encoding process in
[0123] Thus, the one-to-one corresponding cipher code is not the code which is actually stored in the non-volatile memory device. Also, the cell state induced from the one-to-one corresponding cipher code may be incorrect.
[0124] Though the cipher code and the induced cell state may be incorrect, the one-to-one corresponding cipher code may be an important clue to conjecture a cell state. If a random number is generated by a non-uniform probability density function, the adjustment ranks is not far from the original rank with high probability. Therefore, the one-to-one corresponding cipher code may have similar cell state to the cipher code of the adjustment rank. And it is why we can conjecture cell states from one-to-one corresponding cipher codes.
[0125] Referring to
[0126] In
[0127] For example, if the majority region is region 0 or 4, Eval-HIST( ) returns 0 or 4. Then shift_0( ) function is called to use a uniform probability density function for random number generation. If the majority region is region 1 or 3, Eval-HIST( ) returns 1 or 3. In this case, shift_1( ) function is called to use a low-degree non-uniform probability density function. Otherwise, Eval-HIST( ) returns 2 and shift_2( ) function is called to use a high-degree non-uniform probability density function.
[0128] In the above-described exemplary embodiment, the cell state is divided into five regions. However, it can be divided into an arbitrary number of regions. Also, in the above-described exemplary embodiment, Eval_HIST( ) evaluates the history to determine a region at every time. However, Eval_HIST( ) may determine a region periodically or when some conditions are met.
[0129] The non-volatile memory device may store data in a specific size. For example, read and write unit size may be multiples of pages. And the scrambling and descrambling may be done in the unit of the specific size. In the exemplary embodiment of the present disclosure, the dynamic reconfiguration and history queue methods try to adapt to a code pattern. And the adaption may be applied to each of the unit. In
[0130] When the above-described exemplary embodiment is implemented by hardware, ET and DCC tables used for encoding and decoding may be consolidated to single table implemented with an associative memory. The associative memory is consisted with registers storing values and arithmetic/logic circuits for adding, comparing, and transmitting data. Particularly, the associative memory can transmit data from a register to adjacent registers.
[0131] In
[0132]
[0133]
[0134] In yet another exemplary embodiment, the associative memory may be configured in a different way. In
[0135]
[0136] Next, as illustrated in
[0137] To enhance performance, encoding/decoding operations and the dynamic reconfiguration may be performed in parallel. To enhance performance further, a code may be divided into sub-codes and those sub-codes may be encoded and decoded simultaneously.
[0138]
[0139] In the same way, FT.sub.L and PDT.sub.L tables may be built in the order of the appearance frequency of the low nibble and the PD of 4-bit cipher code. ET.sub.L, ECC.sub.L, DT.sub.L, and DCC.sub.L tables may be built with these tables and, if necessary, EW.sub.L, DW.sub.L, WH tables may be built. As illustrated in
[0140] FT.sub.H and FT.sub.L may be different from each other because the high and low nibbles may have different appearance frequencies. Further, PDT.sub.H and PDT.sub.L may be different from each other because the high and low nibbles may have different PD values.
[0141] As illustrated in
[0142]
[0143] Further, the low nibble 0x8 is encoded using the ASM.sub.L table and the dynamic reconfiguration may be performed. In detail, the index (rank) of the 0x8 is 3 in the ASM.sub.L. Then all entries in the ASM.sub.L compare their values with 3 and, if their values are smaller than 3, corresponding bits in the B0.sub.L are set to 1.
[0144] As an exemplary embodiment of parallel encoding and decoding of multiple plain codes, another plain code 0xF1 may be encoded and decoded simultaneously while encoding and decoding the previous plain code 0x28. First, the plain code 0xF1 is divided into two sub-codes (nibbles) 0xF and 0x1. And the high nibble 0xF is encoded with “Copy of ASM.sub.H” table. Here, “Copy of ASM.sub.H” is another associative memory table identical to the ASM.sub.H and, like this, a plurality of ASM.sub.H tables may be used for parallel operations. However, if it is possible to simultaneously encode/decode multiple codes with single ASM.sub.H table, one ASM.sub.H table may be used. After, before, or during encoding the high nibble 0xF, the dynamic reconfiguration may be performed. In detail, the index (rank) of the nibble 0xF is 1 in the “Copy of ASM.sub.H”. Then all entries in the “Copy of ASM.sub.H” compare their values with 1 and, if values are smaller than 1, corresponding bits in the B1.sub.H are set to 1.
[0145] In the same way, the low nibble 0x1 is encoded using “Copy of ASM.sub.L” table. Here, “Copy of ASM.sub.L” is another associative memory table identical to the ASM.sub.L and a plurality of ASM.sub.L tables may be used for parallel operations. However, if it is possible to simultaneously encode/decode two codes with single ASM.sub.L table, one ASM.sub.L table may be used. After, before or during encoding the low nibble 0x1, the dynamic reconfiguration may be performed. In detail, the index (rank) of the nibble 0x1 is 1 in the “Copy of ASM.sub.L”. Then all entries in the “Copy of ASM.sub.L” compare their values with 1 and, if values are smaller than 1, corresponding bits in the B1.sub.L are set to 1.
[0146] Now, the ASM table may be dynamically reconfigured. Referring to
[0147] Finally, 1 and 0 are set to entries for nibbles 0x2 and 0xF in the ASM.sub.H table. This means that ranks of sub-codes 0x2 and 0xF are 1 and 0, respectively. In the same way, 1 and 0 are set to entries for nibbles 0x8 and 0x1 in the ASM.sub.L table. This means that ranks of sub-codes 0x8 and 0x1 are 1 and 0, respectively.
[0148] In the above-described exemplary embodiment, the decoding operation may be performed in the similar way to the encoding operation. A cipher code may be divided into two sub-codes and high and low sub-codes may be simultaneously decoded using DT.sub.H and ASM.sub.H tables and DT.sub.L and ASM.sub.L tables, respectively. Further, like the encoding operation, the decoding may be performed on a plurality of codes in parallel.
[0149] After decoding a cipher code, a plain code may be obtained. Then the dynamic reconfiguration may be performed with the plain code. In particular, the ASM.sub.H and ASM.sub.L tables may be dynamically reconfigured in the same way to the above-described encoding operation.
[0150] In the above-described exemplary embodiment, two codes are simultaneously encoded and decoded. However, the parallel encoding and decoding are not necessarily limited to two codes. Rather, an arbitrary number of codes may be encoded and decoded in parallel. Further, tables may be dynamically reconfigured while encoding and decoding an arbitrary number of codes in parallel.
[0151] In the above-described exemplary embodiment, 8-bit codes are divided into two nibbles of 4-bit unit. However, code size and sub-code size are not fixed to those sizes used in the above-described exemplary embodiment. Rather, arbitrary code and sub-code sizes may be used for encoding and decoding. Also, the dynamic reconfiguration technique can be applied to arbitrary code and sub-code sizes.
[0152] As an exemplary embodiment of the present disclosure, a triple level cell (TLC) flash memory stores three bits per cell and, thus, stores 24 bits (3 bytes) in eight cells. In this case, a 24-bit code may be divided into 8 sub-codes having 3-bit unit size. Or it may be divided into 4 sub-codes having 6-bit unit size. Or it may be divided into 3 sub-codes having 8-bit unit size. Like this, a code may be divided into sub-codes having an arbitrary size and those sub-codes may be encoded and decoded in parallel. Also, the dynamic reconfiguration may be performed simultaneously after, before, or during encoding and decoding operations.
[0153] It will be appreciated that various exemplary embodiments of the present disclosure have been described herein for purposes of illustration, and that various modifications, changes, and substitutions may be made by those skilled in the art without departing from the scope and spirit of the present disclosure. Therefore, the exemplary embodiments of the present disclosure are provided for illustrative purposes only but not intended to limit the technical concept of the present disclosure. The scope of the technical concept of the present disclosure is not limited thereto. The protective scope of the present disclosure should be construed based on the following claims, and all the technical concepts in the equivalent scope thereof should be construed as falling within the scope of the present disclosure.