Minimising bit flips in memory write operations

By partitioning and permutating data chunks within non-volatile memory systems, the method minimizes bit flips and metadata overhead, improving energy efficiency and durability.

WO2026119395A1PCT designated stage Publication Date: 2026-06-11HUAWEI TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-12-05
Publication Date
2026-06-11

Smart Images

  • Figure EP2024084857_11062026_PF_FP_ABST
    Figure EP2024084857_11062026_PF_FP_ABST
Patent Text Reader

Abstract

In some examples, a method for minimising bit flips in memory write operations comprises partitioning a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits, grouping the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks, permutating the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword, selecting the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword, and writing the selected codeword in the memory.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] MINIMISING BIT FLIPS IN MEMORY WRITE OPERATIONS

[0002] TECHNICAL FIELD

[0003] The present disclosure relates, in general, to minimising bit flips in memory write operations. Aspects of the disclosure relate to optimising data storage arrangements to reduce energy consumption, minimise memory wear, and enhance device lifespan.

[0004] BACKGROUND

[0005] Modem non-volatile memory media, such as phase-change memory (PCM), resistive RAM (RRAM), and spin-transfer torque RAM (STT-RAM), provide persistent data storage without requiring periodic refresh operations, unlike traditional dynamic random-access memory (DRAM). However, these memory types face unique challenges due to the energy-intensive nature of their write operations. Specifically, the energy required to overwrite data is directly proportional to the number of bits that need to change, known as bit flips. Additionally, these memory technologies suffer from significantly lower endurance.

[0006] To mitigate these issues, various techniques have been developed to reduce the number of bit flips required during memory write operations. One such approach, known as Read-Modify-Write, focuses on altering only the bits that differ between the old and new data words. Another method, Flip-n-Write, involves storing the data either in its original or a negated form, depending on which option results in fewer bit flips, and requires an additional bit per word to record whether the data has been negated. Mirroring techniques allow data to be stored in either its original or mirrored form, and this strategy can be combined with other bit-flip reduction methods, such as Flip-n-Write, though it also requires one extra bit per word. More advanced approaches, such as cosets and hybrid cosets, encode data using one of several predefined (or pseudo-random) bit vectors, selecting the encoding that minimises the Hamming distance to the previous data. These methods typically require additional storage overhead, with the size of cosets often necessitating several extra bits per word, depending on the implementation.

[0007] While these existing techniques have shown promise in reducing bit flips, they inherently involve trade-offs. Achieving significant reductions in bit flips often comes at the cost of increased metadata storage requirements and requires additional computation. This balance between bit flip reduction and space overhead remains a key challenge, underscoring the ongoing need for innovative solutions that can deliver improved performance without compromising efficiency.

[0008] SUMMARY

[0009] An objective of the present disclosure is to provide a mechanism for minimising the average number of bit flips needed to overwrite data in memory.

[0010] The foregoing and other objectives are achieved by the features of the independent claims.

[0011] Further implementation forms are apparent from the dependent claims, the description and the Figures.

[0012] A first aspect of the present disclosure provides a method for minimising bit flips in memory write operations, the method comprising partitioning a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits, grouping the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks, permutating the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword, selecting the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword, and writing the selected codeword in the memory.

[0013] The metadata describing the permutation applied to obtain the selected codeword may comprise information describing a permutation index used to reorder the multiple chunks within each partition of the multiple partitions.

[0014] The respective number of bits and the plurality of chunks may be determined based on a media controller architecture, wherein the respective number of bits and the plurality of chunks together define a number of extra bits required to encode the codeword.

[0015] Reading the codeword from the memory may further comprise using the metadata to determine an original order of the chunks within the codeword, thereby obtaining an original data word.

[0016] The step of permutating the chunks within each of the multiple partitions may be performed sequentially or in parallel.

[0017] Selecting the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword may comprise comparing the multiple encoded codewords with a previous codeword stored in the memory, thereby selecting the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword.

[0018] Comparing the multiple encoded codewords with the previous codeword, thereby selecting the encoded codeword that has the smallest Hamming distance to the previous codeword, may comprise, for each of the multiple encoded codewords, comparing the Hamming distance between the previous codeword and each one of: the encoded codeword of the multiple encoded codewords and a negated version of the encoded codeword of the multiple encoded codewords.

[0019] Comparing the multiple encoded codewords with the previous codeword, thereby selecting the encoded codeword that has the smallest Hamming distance to the previous codeword, may comprise, for each of the multiple encoded codewords, comparing the Hamming distance between the previous codeword and each one of: the encoded codeword of the multiple encoded codewords and a mirrored version of the encoded codeword of the multiple encoded codewords.

[0020] Maintaining an extra bit for each chunk of the multiple chunks may further comprise indicating whether the related encoded codeword of the multiple encoded codewords comprises a mirrored and / or negated version of the encoded codeword.

[0021] A second aspect of the present disclosure provides a computer program stored on a non-transitory medium and including code instructions, which, when executed on more or more processors, cause the one or more processors to execute the method described herein.

[0022] A third aspect of the present disclosure provides an apparatus comprising a processor, a memory coupled to the processor, the memory configured to store program code executable by the processor, the program code comprising one or more instructions, whereby to cause the apparatus to partition a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits, group the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks, permutate the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword, select the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword, and write the selected codeword in the memory.

[0023] The metadata describing the permutation applied to obtain the selected codeword may comprise information describing a permutation index used to reorder the multiple chunks within each partition of the multiple partitions. The respective number of bits and the plurality of chunks may be determined based on a media controller architecture of a media controller within the apparatus, wherein the respective number of bits and the plurality of chunks together may define a number of extra bits required to encode the codeword.

[0024] The program code may further comprise one or more instructions to cause the apparatus to read the codeword from the memory and use the metadata to determine an original order of the chunks within the codeword, thereby obtaining an original data word.

[0025] The one or more instructions to cause the apparatus to select the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword may comprise one or more instructions to cause the apparatus to compare the multiple encoded codewords with a previous codeword stored in the memory, thereby selecting the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword.

[0026] These and other aspects of the disclosure will be apparent from the embodiments) described below.

[0027] BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order that the present disclosure may be more readily understood, embodiments of the disclosure will now be described, by way of example, with reference to the accompanying drawings, in which:

[0029] Fig. 1 is a flow chart of a method for minimising bit flips in memory write operations according to an example;

[0030] Fig. 2 is a schematic representation of overwriting a 16-bit word with two 8-bit chunks organised into a single partition comprising 2 chunks according to an example;

[0031] Fig. 3 is a schematic representation of overwriting a 16-bit word with four4-bit chunks organised into two partitions, each comprising 2 chunks, according to an example;

[0032] Fig. 4 is a schematic representation of reading a 64-bit word with eight 8-bit chunks organised into three partitions, each comprising up to 3 chunks, according to an example;

[0033] Fig. 5 is a schematic representation of overwriting a 16-bit word with two 8-bit chunks organised into a single partition comprising 2 chunks, with a flip-n-write optimisation, according to an example; and

[0034] Fig. 6 is a schematic representation of an apparatus according to an example.

[0035] DETAILED DESCRIPTION

[0036] Example embodiments are described below in sufficient detail to enable those of ordinary skill in the art to embody and implement the systems and processes herein described. It is important to understand that embodiments can be provided in many alternate forms and should not be construed as limited to the examples set forth herein.

[0037] Accordingly, while embodiments can be modified in various ways and take on various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. There is no intent to limit to the particular forms disclosed. On the contrary, all modifications, equivalents, and alternatives falling within the scope of the appended claims should be included. Elements of the example embodiments are consistently denoted by the same reference numerals throughout the drawings and detailed description where appropriate. The terminology used herein to describe embodiments is not intended to limit the scope. The articles “a,” “an,” and “the” are singular in that they have a single referent, however the use of the singular form in the present document should not preclude the presence of more than one referent. In other words, elements referred to in the singular can number one or more, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes,” and / or “including,” when used herein, specify the presence of stated features, items, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, items, steps, operations, elements, components, and / or groups thereof.

[0038] Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be interpreted as is customary in the art. It will be further understood that terms in common usage should also be interpreted as is customary in the relevant art and not in an idealized or overly formal sense unless expressly so defined herein.

[0039] Memory technologies such as PCM, RRAM and STT-RAM differ from DRAM by offering persistent data storage that does not require periodic refresh operations. However, these non-volatile memory types face challenges in terms of energy efficiency and durability. The energy required to write data is directly proportional to the number of bit flips needed to overwrite the existing data, and the endurance of these media is significantly lower than that of DRAM. These limitations have prompted the development of various methods to reduce bit flips during write operations.

[0040] Existing techniques, such as flip-n-write or mirroring, offer some improvements but involve trade-offs in terms of metadata space overhead and applicability across workloads. Unlike computationally inexpensive methods like flip-n-write and mirroring, coset-based approaches require significantly more computation per single write. Flip-n-write selectively negates data to minimise bit flips, while mirroring allows data to be stored in normal or reversed formats. More advanced methods, such as partitioning and encoding data based on predefined (or pseudo-random) configurations, attempt to strike a balance between bit flip reduction and metadata requirements. However, these solutions are often constrained by the trade-off between achieving significant bit flip reductions and maintaining efficiency.

[0041] The present disclosure addresses these challenges by introducing a novel mechanism to minimise bit flips during memory write operations while maintaining computational efficiency and requiring modest space for metadata. The method partitions data words into smaller chunks and reorders them within partitions based on a permutation that reduces the total Hamming distance between the new and old codewords. Metadata describing the applied permutation is stored alongside the data to ensure the original data word can be reconstructed during read operations.

[0042] This approach not only reduces the energy required for write operations but also decreases wear on the memory medium, extending its lifespan. Furthermore, the reduced energy demands can enhance memory bandwidth, making the system more efficient overall. The disclosure can also integrate seamlessly with existing optimisations, such as flip-n-write or mirroring, providing flexibility in balancing performance and resource constraints. By enabling a reduction in bit flips of up to 20% with less than 10% overhead for metadata storage, the disclosure provides a significant advancement over baseline solutions. Its ability to operate across a range of workloads and integrate with other techniques ensures broad applicability and addresses the critical need for improved efficiency and durability in non-volatile memory systems.

[0043] Examples in the present disclosure can be provided as methods, systems or machine-readable instructions, such as any combination of software, hardware, firmware or the like. Such machine-readable instructions may be included on a computer readable storage medium (including but not limited to disc storage, CD-ROM, optical storage, etc.) having computer readable program codes therein or thereon.

[0044] The present disclosure is described with reference to flow charts and / or block diagrams of the method, devices and systems according to examples of the present disclosure. Although the flow diagrams described above show a specific order of execution, the order of execution may differ from that which is depicted. Blocks described in relation to one flow chart may be combined with those of another flow chart. In some examples, some blocks of the flow diagrams may not be necessary and / or additional blocks may be added. It shall be understood that each flow and / or block in the flow charts and / or block diagrams, as well as combinations of the flows and / or diagrams in the flow charts and / or block diagrams can be realized by machine readable instructions.

[0045] The machine-readable instructions may, for example, be executed by a machine such as a general-purpose computer, user equipment such as a smart device, e.g., a smart phone, a special purpose computer, an embedded processor or processors of other programmable data processing devices to realize the functions described in the description and diagrams. In particular, a processor or processing apparatus may execute the machine-readable instructions. Thus, modules of apparatus (for example, a module implementing a comparator unit, or a firewall structure and so on) may be implemented by a processor executing machine readable instructions stored in a memory, or a processor operating in accordance with instructions embedded in logic circuitry. The term 'processor' is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate set etc. The methods and modules may all be performed by a single processor or divided amongst several processors.

[0046] Such machine-readable instructions may also be stored in a computer readable storage that can guide the computer or other programmable data processing devices to operate in a specific mode. For example, the instructions may be provided on a non- transitory computer readable storage medium encoded with instructions, executable by a processor.

[0047] Fig. 1 is a flow chart of a method for minimising bit flips in memory write operations according to an example. The method comprises, in block 101, partitioning a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits. The respective number of bits in each chunk may be determined based on the media controller architecture and may vary depending on the physical address ranges or specific workloads handled by the memory. Partitioning the data word into chunks may enable flexibility in processing smaller subsets of the word, thereby facilitating targeted optimisation of bit flips. The number of chunks created from a data word may also affect the granularity of the subsequent encoding and may influence the overall efficiency of the process.

[0048] In block 102, the method comprises grouping the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks. The grouping of chunks into partitions may be performed in a way that allows non-consecutive chunks to be included in the same partition. This grouping may depend on predefined configurations that are optimised for specific memory architectures or workload patterns. The partitions may act as discrete units for the encoding process, enabling independent permutations within each partition. Additionally, the configuration used for grouping may be stored as metadata, allowing the partitions to be reconstructed during read operations.

[0049] In block 103, the method comprises permutating the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword. The permutations applied to the chunks within each partition may correspond to one or more predefined or dynamically generated patterns, depending on the desired trade-off between computational complexity and encoding effectiveness. The metadata describing the permutation may include a permutation index or similar identifier that allows the original chunk order to be reconstructed. The process of generating multiple encoded codewords may involve evaluating multiple permutations and encoding results to determine their respective bit flip impacts. The permutations may be performed sequentially or in parallel, depending on the media controller’s processing capabilities.

[0050] The method comprises, in block 104, selecting the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword. As used herein, the term "Hamming distance" may refer to the number of bit positions in which two codewords differ. This metric may be used to quantify the number of bit flips required to overwrite the old codeword with the new one. The selection process may involve comparing the Hamming distances of all encoded codewords, including the impact of flipping bits associated with metadata, and choosing the one that minimises the overall energy cost and wear on the memory. The selection step may further incorporate additional optimisation criteria, such as workload-specific priorities or system-level energy constraints.

[0051] The method comprises, in block 105, writing the selected codeword to memory. The process of writing the selected codeword to memory may include storing the metadata alongside the encoded codeword to facilitate reconstruction during subsequent read operations. The writing process may also involve updating auxiliary metadata, such as counters or flags used for wear levelling or optimisation tracking. In some implementations, the selected codeword may be written using techniques that further reduce bit flips, such as flip-n-write or mirroring, where applicable.

[0052] To aid understanding of the disclosure, reference will now be made to Fig. 2. Fig. 2 is a schematic representation of overwriting a 16-bit word with two 8-bit chunks organised into a single partition comprising 2 chunks according to an example.

[0053] Fig. 2 is a schematic representation of overwriting a 16-bit word with two 8-bit chunks organised into a single partition comprising two chunks according to an example. The data word to be overwritten may comprise an old codeword 201, which is shown divided into two chunks, a first chunk 212 and a second chunk 213. A new word 204, intended to overwrite the old codeword, is similarly divided into a first chunk 202 and a second chunk 203. The old codeword 201 and the new word 204 may be represented as sequences of bits for clarity, where differences between corresponding bits of the old and new words indicate bit flips that need to occur during the write process.

[0054] In this example, the partition comprising two chunks may allow for two possible permutations 205, 206 of the chunks. The first permutation 205 represents the unmodified arrangement of the chunks, while the second permutation 206 represents an alternative arrangement in which the order of the first chunk 202 of the new codeword and the second chunk 203 of the new codeword is swapped. In contrast, the arrangement of the first chunk 212 and the second chunk 213 of the old codeword 212 remains unchanged. These permutations may be evaluated to determine which results in fewer bit flips when compared to the old codeword.

[0055] The bit differences between the old codeword 201 and the new word 202 under the first permutation 205 are shown as 8 different bits for the words; the skilled person would appreciate that, for codewords, 9 bits are different. In contrast, under the second permutation 206, there are only 6 different bits. The permutation with the smallest number of bit flips (in this case, the second permutation 206) may be selected for writing to memory. By reducing the number of bit flips required for overwriting the codeword, the energy consumption and the wear on the memory medium can be reduced.

[0056] An extra metadata bit 207 may be introduced to indicate which permutation has been applied. This metadata bit 207 may be stored alongside the data in memory, enabling the recovery of the original order of chunks when the word is read back. The metadata may also contain other critical information, such as error detection codes, to ensure data integrity.

[0057] Fig. 3 is a schematic representation of overwriting a 16-bit word with four 4-bit chunks organised into two partitions, each comprising 2 chunks, according to an example. The data word to be overwritten is represented as an old codeword, indicated as reference numeral 301. The old codeword 301 is divided into four chunks: first chunk 312, second chunk 313, third chunk 314, fourth chunk 315. These chunks are grouped into two partitions, a first partition 307 and a second partition 308, containing two chunks. The first partition 307 comprises the first chunk 302 and the second chunk 303, while the second partition 308 comprises the third chunk 304 and the fourth chunk 305. A new word to overwrite the old codeword 301 is represented as reference numeral 306, which is also divided into four corresponding chunks - first chunk 302, second chunk 303, third chunk 304 and the fourth chunk 305. For the first partition 307, two possible permutations of its chunks are shown. The first permutation for the first partition 307 is represented as reference numeral 309 and represents the original order of the chunks, where the first chunk 302 and the second chunk 303 remain in their initial positions. When comparing the new word 306 with the old codeword 301 using this permutation, four different bits are observed (including the metadata bit). In the second permutation 310, the order of the first chunk 302 and the second chunk 303 is swapped. Order of the chunks 312-315 of the old codeword 301 remains unchanged. This rearrangement results in three different bits when comparing the new word 306 with the old codeword 301. Thus, the second permutation 310 is selected for the first partition because it minimises the number of bit flips.

[0058] Similarly, for the second partition 308, two possible permutations are shown. The first permutation for the second partition is represented as reference numeral 311 and retains the original order of the third chunk 304 and the fourth chunk 305. Comparing the new word 306 with the old codeword 301 using this permutation results in two different bits. In the second permutation for the second partition 308, represented as reference numeral 312, the order of the third chunk 304 and the fourth chunk 305 is swapped, which results in seven different bits (including the metadata bit). Since the first permutation 311 results in fewer bit flips, it is selected for the second partition 308.

[0059] Once the optimal permutations for both partitions are determined, the new word 306 is written to memory in the permuted order. Metadata bits are stored alongside the word to indicate which permutation was applied to each partition. These metadata bits, shown as binary values, are represented as reference numeral 313. They allow the original order of the chunks to be reconstructed when the word is read back from memory. In this example, a total of two bits are written to memory for metadata, representing the two permutation indices. The final written word in memory, including both the permuted new word and the metadata, is represented as reference numeral 314.

[0060] Fig. 4 is a schematic representation of reading a 64-bit word with eight 8-bit chunks organised into three partitions, each comprising up to 3 chunks, according to an example. In particular, the first two partitions comprise 3 chunks, whereas the last partition comprises 2 chunks. The 64-bit word to be read from memory is represented as the old codeword, identified by reference numeral 401. The old codeword is divided into eight chunks, each 8 bits in size, referred to as a first chunk 402, second chunk 403, third chunk 404, fourth chunk 405, fifth chunk 406, sixth chunk 407, seventh chunk 408, and eighth chunk 409. These chunks are grouped into three partitions - first partition 410, second partition 411, third partition 412. The first partition 410 comprises the first chunk 402, the second chunk 403 and the third chunk 404; the second partition 411 comprises the fourth chunk 405, the fifth chunk 406 and the sixth chunk 407; the third partition 412 comprises the seventh chunk 408 and the eighth chunk 409.

[0061] A table of possible permutations is presented in the figure, referenced as 413. The table includes six possible permutations for any three chunks in a partition, represented as combinations (a, b, c), (b, a, c), (c, a, b), (a, c, b), (b, c, a), and (c, b, a). For a partition comprising 2 chunks a single metadata bit is sufficient to encode which of the two possible permutations is used. Each permutation is associated with a unique encoding using three bits. For example, permutation (a, b, c) is encoded as 000, while (c, b, a) is encoded as 101. This encoding is critical for metadata stored alongside the word to describe the specific reordering of chunks in each partition.

[0062] The old codeword recovered, also represented as 401, illustrates the process of reconstructing the original order of bits in the word using the metadata stored alongside it. Metadata stored in memory, shown in binary format and identified as 414, specifies the permutation indices for each partition. For example, the metadata 100 indicates that the permutation (b, c, a) was applied to the first partition 410 during the write process.

[0063] During the reading process, the stored metadata is used to decode the permutation for each partition and reorder the chunks back into their original sequence. In the first partition 410, metadata 100 corresponds to the (b, c, a) permutation, which dictates how the second chunk 403, the third chunk 404 and the first chunk 402 are rearranged to their original order. Similarly, metadata bits for the second partition 411 and the third partition 412 are applied to reverse the permutations for their respective chunks; as the partition only comprises 2 chunks, a different encoding scheme may be used. The final result of the reading process is the reconstructed 64-bit word, where all chunks are restored to their original positions. This process ensures that the original data word is accurately retrieved from memory without any loss or corruption.

[0064] Fig. 5 is a schematic representation of overwriting a 16-bit word with two 8-bit chunks organized into a single partition comprising two chunks, employing a flip-and-write optimization technique, according to an example. The 16-bit word to be overwritten is represented as the old codeword 501. The old codeword is divided into two 8-bit chunks, i.e., a first chunk 513 and a second chunk 514. Similarly, the 16-bit word to be written to memory is represented as the new codeword 502, which is also divided into two 8-bit chunks (first chunk 503 and second chunk 504).

[0065] Importantly, in the example of Fig. 5, negation metadata bits, identified by reference numeral 507, are used to indicate whether the chunks of the old codeword are stored in their negated form, while the permutation metadata bit, identified by reference numeral 508, are used to indicate whether the chunks of the old codeword are stored in their original order or swapped.

[0066] As discussed in relation to Fig. 1 , the method comprises calculating the Hamming distance between each configuration of the new codeword and the old codeword, taking into account the possible negation and permutation of chunks. The Hamming distance calculations, identified collectively by reference numeral 509, may determine the configuration of the new codeword that results in the smallest total number of bit flips, including the flips required to write the metadata bits. After determining the optimal configuration, the new codeword may be written to memory in the configuration requiring the fewest bit flips. The resulting representation 510 includes the new codeword along with metadata describing the negation and permutation applied.

[0067] Fig. 6 is a schematic representation of an apparatus according to an example. The apparatus 600 may comprise a processor 603, and a memory 605 coupled to the processor 603 and configured to store instructions or program code 607, executable by the processor 603. The apparatus 600 may comprise the program code 607 arranged to cause the apparatus to perform the method described herein.

[0068] According to an example, machine-readable instructions can be loaded onto a computer or other programmable data processing devices, so that the computer or other programmable data processing devices perform a series of operations to produce computer-implemented processing, thus the instructions executed on the computer or other programmable devices provide an operation for realizing functions specified by flow(s) in the flow charts and / or block(s) in the block diagrams.

[0069] Further, the teachings herein may be implemented in the form of a computer or software product, such as a non-transitory machine-readable storage medium, the computer software or product being stored in a storage medium and comprising a plurality of instructions, e.g., machine readable instructions, for making a computer device implement the methods recited in the examples of the present disclosure.

[0070] In some examples, some methods can be performed in a cloud-computing or network-based environment. Cloud-computing environments may provide various services and applications via the Internet. These cloud-based services (e.g., software as a service, platform as a service, infrastructure as a service, etc.) may be accessible through a web browser or other remote interface of the user equipment for example. Various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment.

[0071] While various embodiments have been described and / or illustrated herein in the context of fully functional computing systems, one or more of these exemplary embodiments may be distributed as a program product in a variety of forms, regardless of the particular type of computer-readable-storage media used to actually carry out the distribution. The embodiments disclosed herein may also be implemented using software modules that perform certain tasks. These software modules may include script, batch, or other executable files that may be stored on a computer-readable storage medium or in a computing system. In some embodiments, these software modules may configure a computing system to perform one or more of the exemplary embodiments disclosed herein. In addition, one or more of the modules described herein may transform data, physical devices, and / or representations of physical devices from one form to another.

[0072] The preceding description has been provided to enable others skilled in the art to best utilize various aspects of the exemplary embodiments disclosed herein. This exemplary description is not intended to be exhaustive or to be limited to any precise form disclosed. Many modifications and variations are possible without departing from the spirit and scope of the instant disclosure. The embodiments disclosed herein should be considered in all respects illustrative and not restrictive. Reference should be made to the appended claims and their equivalents in determining the scope of the instant disclosure.

Claims

CLAIMS1. A method for minimising bit flips in memory write operations, the method comprising: partitioning a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits (101); grouping the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks (102); permutating the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword (103); selecting the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword (104); and writing the selected codeword in the memory (105).

2. The method of claim 1, wherein the metadata describing the permutation applied to obtain the selected codeword comprises information describing a permutation index used to reorder the multiple chunks within each partition of the multiple partitions.

3. The method of claim 2, wherein the respective number of bits and the plurality of chunks are determined based on a media controller architecture, wherein the respective number of bits and the plurality of chunks together define a number of extra bits required to encode the codeword.

4. The method of any one of claims 1 to 3, further comprising: reading the codeword from the memory; and using the metadata to determine an original order of the chunks within the codeword, whereby to obtain an original data word.

5. The method of any one of claims 1 to 4, wherein the step of permutating the chunks within each of the multiple partitions (103) is performed sequentially or in parallel.

6. The method of any one of claims 1 to 5, wherein selecting the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword (104) comprises comparing the multiple encoded codewords with a previous codeword stored in the memory, whereby to select the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword.

7. The method of claim 6, wherein comparing the multiple encoded codewords with the previous codeword, whereby to select the encoded codeword that has the smallest Hamming distance to the previous codeword comprises: for each of the multiple encoded codewords, comparing the Hamming distance between the previous codeword and each one of: the encoded codeword of the multiple encoded codewords and a negated version of the encoded codeword of the multiple encoded codewords.

8. The method of claim 6 or 7, wherein comparing the multiple encoded codewords with the previous codeword, whereby to select the encoded codeword that has the smallest Hamming distance to the previous codeword comprises: for each of the multiple encoded codewords, comparing the Hamming distance between the previous codeword and each one of: the encoded codeword of the multiple encoded codeword and a mirrored version of the encoded codeword of the multiple encoded codewords.

9. The method of claim 7 or 8, further comprising maintaining an extra bit for each chunk of the multiple chunks, whereby to indicate whether the related encoded codeword of the multiple encoded codewords comprises a mirrored and / or negated version of the encoded codeword.

10. A computer program stored on a non-transitory medium and including code instructions, which, when executed on more or more processors, cause the one or more processors to execute the method of any of claims 1 to 9.

11. An apparatus (600) comprising: a processor (603); a memory (605) coupled to the processor (603), the memory (605) configured to store program code (607) executable by the processor (603), the program code (607) comprising one or more instructions, whereby to cause the apparatus (600) to: partition a data word to be written into a memory into multiple chunks, wherein each chunk comprises a respective number of bits; group the multiple chunks into multiple partitions, wherein each of the multiple partitions comprises a plurality of the multiple chunks; permutate the chunks within each of the multiple partitions, whereby to obtain multiple encoded codewords, wherein each of the multiple encoded codewords comprises metadata describing a permutation applied to the partition in order to obtain the codeword; select the encoded codeword of the multiple encoded codewords that has a smallest Hamming distance to the previous codeword; and write the selected codeword in the memory.

12. The apparatus of claim 11, wherein the metadata describing the permutation applied to obtain the selected codeword comprises information describing a permutation index used to reorder the multiple chunks within each partition of the multiple partitions.

13. The apparatus of claim 12, wherein the respective number of bits and the plurality of chunks are determined based on a media controller architecture of a media controller within the apparatus, wherein the respective number of bits and the plurality of chunks together define a number of extra bits required to encode the codeword.

14. The apparatus of any one of claims 11 to 13, wherein the program code (607) further comprises one or more instructions, whereby to cause the apparatus (600) to: read the codeword from the memory; and use the metadata to determine an original order of the chunks within the codeword, whereby to obtain an original data word.

15. The apparatus of any one of claims 11 to 14, wherein the one or more instructions, whereby to cause the apparatus to select the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword comprise one or more instructions, whereby to cause the apparatus to: compare the multiple encoded codewords with a previous codeword stored in the memory, whereby to select the encoded codeword of the multiple encoded codewords that has the smallest Hamming distance to the previous codeword.

Citation Information

Patent Citations

  • Systems for and methods of extending lifetime of non-volatile memory

    US20150248325A1

  • Method of data management for a bitwise programmable non-volatile memory, and corresponding device

    US20220334720A1