Optimal probability distribution constraint code construction method suitable for ReRAM memory

By constructing a constraint code with optimal probability distribution, the distribution of 0 and 1 in the ReRAM memory is adjusted. The encoding matrix is ​​constructed using the Lagrange multiplier method and bit flipping is performed, which solves the problem of the hidden path in the ReRAM memory and improves the accuracy of data reading and the efficiency of signal transmission.

CN120808844AActive Publication Date: 2025-10-17HUAQIAO UNIVERSITY +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510815357.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-10-17
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

ReRAM memory suffers from the problem of hidden path in high-density integration, which leads to current leakage and reduced data reliability during the reading process. Existing polar code encoding schemes have failed to effectively solve the problem of 0.1 distribution in the encoded matrix.

Method used

The optimal probability distribution constraint code construction method is adopted. The coding matrix is ​​constructed by maximizing the information entropy principle, the 0,1 distribution is adjusted by using the Lagrange multiplier method, and bit flipping is performed in rows with weights greater than the threshold to generate the optimal coding matrix to reduce the occurrence of hidden paths.

Benefits of technology

It significantly reduces the occurrence of slip-through paths, improves the data reading accuracy and signal transmission efficiency of ReRAM memory, reduces the probability of recovery errors, and adapts to the characteristics of ReRAM channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808844A_ABST
    Figure CN120808844A_ABST
Patent Text Reader

Abstract

The invention discloses an optimal probability distribution constraint code construction method suitable for a ReRAM memory, and the method comprises the steps: constructing a reversible coding matrix through employing a maximum information entropy principle, adjusting the 0.1 distribution of an original input array through employing the coding matrix, and reducing the number of 1 in the array while guaranteeing that the redundancy is not increased. And processing the current stored data line by line, performing corresponding bit flipping to ensure that the data in each line does not exceed the set weight, and storing the corresponding flag bit at the same time. And finally, outputting a coding matrix, and transmitting the coding matrix through a ReRAM channel model. According to the method, the probability of existence of a hidden path in the whole array can be reduced while less redundancy is ensured, and the probability of error-free decoding of the whole array is increased.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of optimal construction of new memory, and particularly relates to a method for constructing an optimal probability distribution constraint code suitable for a ReRAM memory. BACKGROUND

[0002] ReRAM combines the advantages of traditional random memory and flash memory, and has the characteristics of simple and fast read-write operation, low power consumption and high storage density. The core structure is a cross array composed of memristors, and each memristor unit at the intersection of each row and column can store data, thereby realizing higher storage density on the same chip area. This feature makes ReRAM have great application potential in the fields of non-volatile memory, artificial neural network, chaotic circuit, programmable logic device, and information processing and pattern recognition circuit. However, the high-density integration of ReRAM also brings serious data interference problems, of which the most prominent is the sneak path problem. The sneak path refers to a closed path formed by traversing the logic 1 unit through alternating vertical and horizontal steps in the ReRAM cross array. This path will cause current leakage during the reading process, thereby interfering with the reading result of the target unit and reducing the reliability of the data. In order to solve this problem, a memristor string selector is often used to avoid current interference between different units. However, during the manufacturing and maintenance of the memory, the non-deterministic failure of the selector will bring new problems of inter-array resistance interference, so a more perfect solution is needed to solve the storage non-deterministic problem in the entire array.

[0003] The storage process of ReRAM is realized by changing the resistance value of the memristor in the cross array: in the writing process, logic 0 is programmed as a high resistance value (R0), and logic 1 is programmed as a low resistance value (R1); in the reading process, the resistance state is detected by applying a specific voltage and measuring the current, so as to judge the stored data bit. The existence of the sneak path will significantly affect the accuracy of the reading process. In practice, the sneak path more affects the units stored as 0 in the array. In short, adjusting the proportion of actual data 0,1 stored in the array can affect the occurrence of the sneak path to some extent.

[0004] The use of polar code can correct the errors that have occurred in the entire array transmission, and adjusting the proportion of 0.1 in the entire coding array actual storage can greatly reduce the occurrence of potential paths in the array, thereby reducing errors in the decoding process from the source. In the polar code encoding process, the information bits and frozen bits are combined and then linearly transformed. The frozen bits are usually fixed 0, and the information bits can be any data. If the selection of information bits is uniformly distributed, such as equal probability of 0 and 1, the entire coded codeword will have a certain balance. In fact, the proportion of 0.1 in the coding output of the polar code encoding scheme used at present is generally balanced, that is, fluctuates around 0.5. Constrained coding is an effective method to avoid or reduce potential path interference and other errors in data transmission and storage process by carefully designing coding rules. The constrained coding scheme can ensure fast exchange of data under a certain accuracy. For ReRAM, as a high-speed storage medium, it is necessary to ensure fast exchange of data under a certain accuracy. However, due to the particularity of its structure, the correctness of the readout of the stored data is closely related to the pattern of the stored data caused by the potential path problem, and the switching time of ReRAM obeys the logarithmic normal distribution, and frequent switching may cause more errors. The application of polar code to ReRAM array lacks an effective scheme that considers the distribution of 0.1 in the matrix after coding. SUMMARY

[0005] To solve the above technical problems, the present application provides a method for constructing an optimal probability distribution constrained code suitable for ReRAM memory, which can reduce the occurrence of potential paths and also adapt to the polar code which can still correct errors in the entire channel after the occurrence of potential paths.

[0006] To achieve the above purpose, the present application provides a method for constructing an optimal probability distribution constrained code suitable for ReRAM memory, comprising:

[0007] According to the matrix construction scheme of the maximum information entropy principle, an initial coding matrix is constructed, the distribution of 0 and 1 in the entire transmission array is adjusted, and a coding matrix is obtained;

[0008] According to the coding matrix, the original binary data matrix is multiplied with the coding matrix in the GF(2) domain to generate a latest coding matrix;

[0009] According to the latest coding matrix, the weight of each row of data is counted, and the row with a weight greater than a threshold is flipped to 0.1, and a flag bit is added to record the condition of each row to generate a codeword;

[0010] The codeword is detected, and the detected codeword is decoded to obtain the original input array.

[0011] Optionally, an initial coding matrix is ​​constructed according to a matrix construction scheme based on the principle of maximizing information entropy, and the distribution of 0s and 1s in the entire transmission array is adjusted to obtain the coding matrix, including:

[0012] S1. Model the probability distribution by optimizing the Lagrange multiplier so that the expectations of the rows and columns meet the constraints.

[0013] S2. Input parameters: number of rows, number of columns, row density ratio, column density ratio, learning rate, and initialize the Lagrange multiplier;

[0014] S3. Define the probability of the element as a normalized exponential distribution;

[0015] S4. Adjust λ by gradient ascent i , so that the probability of each row and approximate k = p * n: Adjust u by gradient ascent i , so that the probability of each column and approximate s = q * n: Stop when the multiplier change is less than the threshold or the maximum number of iterations is reached;

[0016] S5. Based on the optimized probability distribution, generate the matrix row by row to ensure that the column density constraint is not violated;

[0017] S6. Initialize the column weight counter w c [j] = 0; for row i, filter the columns that satisfy w_c[j] < qm, based on λ i and u i Compute the unnormalized probabilities of the available columns, normalized to a probability distribution;

[0018] S7, from J i Choose k=p according to the probability distribution * n columns to avoid repeated selection; each time a column is selected, the probability distribution of the remaining columns is updated; the matrix and column weights are updated;

[0019] S8. After all rows are processed, output the matrix X.

[0020] Optionally, a 0.1 flip is performed on rows with weights greater than a threshold:

[0021] S1, traversing the latest encoding matrix row by row;

[0022] SS2. Extract the current row data. For each currently processed row, store all elements of the current row into temporary variables.

[0023] SS3. Extract the data from the temporary variable and calculate the sum of all elements in the current row. If the sum exceeds m / 2, flip the elements, invert all elements in the row, and convert them to double-precision data.

[0024] S4, the row data record flag bit is 1 for 0, 1 flip, and the data flag bit record is 0 without experiencing flip;

[0025] S5, the processed row data is stored in the corresponding row of the new matrix;

[0026] S6, the output result includes two parts, the first part is the processed matrix, used for storing the processed results of all rows; and the second part is a flip mark array, used for recording which rows are flipped due to the number of 1s exceeding half.

[0027] Technical effects of the present application: the present application discloses a kind of optimal probability distribution constraint code construction method suitable for ReRAM memory, based on the constraint code construction system of ReRAM channel, the basic original of construction is maximum entropy principle, coding matrix is constructed using Lagrange multiplier method, and the coding scheme that can adjust the distribution of 0.1 in array as a whole is obtained.After that, for the problem of excessive weight in part of row in array, bit flip scheme is adopted, to ensure that the density of 1 in array after coding is less than the density of 1 in original array.By iteration, the optimal coding scheme is selected, which is more accurate to adapt to the specific characteristics of ReRAM channel, maximizes the possibility of reducing the possibility of potential path in array, while ensuring less redundancy, as far as possible, reduce the probability of error recovery in the whole array, improve the efficiency and quality of signal transmission. BRIEF DESCRIPTION OF DRAWINGS

[0028] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of this application and their

[0029] Figure 1 A flowchart of a kind of optimal probability distribution constraint code construction method suitable for ReRAM memory of the embodiment of the present application is shown in the figure;

[0030] Figure 2 The simulation result schematic diagram of the constraint code construction method suitable for ReRAM of the embodiment of the present application is shown in the figure, and n is 64;

[0031] Figure 3 The simulation result schematic diagram of the constraint code construction method suitable for ReRAM of the embodiment of the present application is shown in the figure, and n is 256. DETAILED DESCRIPTION

[0032] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0033] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] like Figure 1 As shown, this embodiment provides a method for constructing an optimal probability distribution constraint code applicable to ReRAM memory, including:

[0035] S1. Use the matrix construction scheme based on the principle of maximizing information entropy to construct the coding matrix and adjust the distribution of 0 and 1 in the entire transmission array;

[0036] S2. Using the obtained encoding matrix, perform matrix multiplication on the original binary data matrix X and the encoding matrix M in the GF(2) domain to generate the encoding matrix

[0037] S3. Count the weight of each row of data according to the obtained matrix, flip the rows whose weight is greater than the threshold by 0.1, and then add a mark bit to record the situation of each row.

[0038] Considering the influence of the transmission array structure on the whole detection and decoding result, in this example, the marker bit is transmitted separately. The encoded data is sent to the channel for transmission.

[0039] S4. The channel receiving end detects the received codeword and then decodes it to obtain the original input array.

[0040] In the specific implementation, the Lagrange multiplier method is used to construct the encoding matrix, minimizing the proportion of 1s in the original array. This minimizes the occurrence of latent paths while maintaining low computational complexity, improving overall array detection accuracy. A simple hard-decision scheme is used for decoding, reducing decoding latency and making it more suitable for hardware implementation. A dynamic column density balancing algorithm is employed, selecting column allocation through weighted probability sampling to avoid local overcrowding or undercrowding. Row and column constraint tolerances are introduced to allow for small fluctuations to improve generation efficiency.

[0041] More specifically, if Figure 2 As shown, step S1 specifically includes the following steps:

[0042] Iterative optimization phase: By optimizing the Lagrange multiplier (λ, μ), the probability distribution is modeled so that the expectations of the rows and columns meet the constraints.

[0043] Parameter initialization: input parameters: m (number of rows), n (number of columns), p (row density proportion), q (column density proportion), learning rates a, b. And initialize Lagrange multipliers l = 0 (row multiplier), u = 0 (column multiplier).

[0044] Probability modeling: define the probability of element x[i][j] = 1 as a normalized exponential distribution:

[0045]

[0046] where Z is a normalization factor, ensuring that the sum of all probabilities is 1.

[0047] Multiplier update: first row multiplier update: adjust l by gradient ascent i so that the probability sum of each row approaches k = p * n: Then update the column multiplier: similarly adjust u i so that the probability sum of each column approaches s = q * n:

[0048] Stop when the multiplier change is less than a threshold or the maximum number of iterations is reached.

[0049] Then generate the matrix row by row based on the optimized probability distribution, ensuring that the column density constraint is not violated.

[0050] First initialize the column weight counter w c [j] = 0 (record the number of 1s placed in each column).

[0051] Then proceed with row-by-row generation: for the ith row, first determine the available column set J i : filter columns that satisfy w_c[j] < qm.

[0052] Then calculate the probability distribution: based on l i and u i Calculate the unnormalized probability of available columns: Normalize to probability distribution probs.

[0053] Then proceed with non-replacement sampling: select k = p i n columns from J * according to probs, avoiding repeated selection.

[0054] After each column is selected, update the probability distribution of the remaining columns (re-normalize).

[0055] Update the matrix and column weights: set the selected column to 1 and update w c [j] += 1.

[0056] After all the rows are processed, the output matrix X is outputted.

[0057] Step S2, adjust the storage structure of the entire storage array according to the generated weight constraint matrix. At the same time, a dynamic column density balancing algorithm is adopted to select column allocation through weight probability sampling, avoiding local over-dense or over-sparse; a row and column constraint tolerance (such as tolerance = 1e-3) is introduced to allow small fluctuations to improve generation efficiency.

[0058] Step S21, parameter initialization and constraint configuration:

[0059] Set the matrix size m, row density p and column density q, satisfying m*p=n*q, to ensure the compatibility of row and column constraints; at the same time, define the channel noise standard deviation range σ, the selector failure probability P fail, the high and low resistance values r0 and r1.

[0060] Step S2, reversible sparse matrix generation, generate a binary matrix M that satisfies sparsity and reversibility through an iterative optimization algorithm:

[0061] Initialize a random binary matrix, fill it by row to meet the row density p;

[0062] Dynamically exchange row / column elements to balance the column density q, and use weight probability sampling to optimize the distribution;

[0063] Verify the reversibility of the matrix based on the Gaussian elimination method, if it is not reversible, regenerate until the maximum number of attempts is reached.

[0064] Step S3, encoding and channel transmission. Sparse encoding: perform matrix multiplication on the original binary data matrix X and the sparse matrix M in the GF(2) field to generate the encoded matrix Y = XM.

[0065] Channel modeling: resistance model: simulate the hardware transmission characteristics based on r0(high resistance state), r1(low resistance state) and selector failure probability P fail; noise injection: superimpose Gaussian noise N(0,σ 2 to generate the received signal y.

[0066] Step S4, MAP detection: based on the received signal y, use maximum a posteriori probability estimation to estimate the original bit value;

[0067] Sparse decoding: perform GF(2) multiplication operation on the decoded matrix Y' and the sparse inverse matrix M -1 to restore the original data

[0068] Perform simulation experiments to verify the performance of the encoding scheme.

[0069] For example, Figures 2-3As shown, the provided constraint code scheme is superior to the uncoded array in terms of FER. Figure 2 Simulation results of the constraint code construction method suitable for ReRAM with n being 64, Figure 3 Simulation results of the constraint code construction method suitable for ReRAM with n being 256. The performance improvement is attributed to the characteristics of the ReRAM array, and the factor affecting whether the array will have a detection error is the occurrence of a sneak path. The necessary condition for the occurrence of a sneak path requires that the data stored at the position of the selector failure node must be 1, and there is a low resistance storage at the corresponding position. By adjusting the proportion of 1 in the actual array, the possibility of the occurrence of a sneak path in the entire array is reduced, which brings performance gain.

[0070] The application discloses a constraint code construction method suitable for ReRAM memory, and a constraint code construction system based on a ReRAM channel. The basic original for construction is the maximum entropy principle, a Lagrange multiplier method is used to construct an encoding matrix, and an encoding scheme that can adjust the distribution of 0 and 1 in the array as a whole is obtained. Then, for the problem of excessive weight in part of the rows in the array, a bit flipping scheme is adopted to ensure that the density of 1 in the array after encoding is less than the density of 1 in the original array. Through iteration, the optimal encoding scheme is selected to more accurately adapt to the specific characteristics of the ReRAM channel, to maximize the possibility of the occurrence of a sneak path in the array, to reduce the probability of a recovery error in the entire array as much as possible while ensuring a small amount of redundancy, and to improve the efficiency and quality of signal transmission.

[0071] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the application, which should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A method for constructing an optimal probability distribution constraint code suitable for ReRAM memory, characterized in that: include: Construct the initial coding matrix according to the matrix construction scheme based on the principle of maximizing information entropy, adjust the distribution of 0 and 1 in the entire transmission array, and obtain the coding matrix; According to the encoding matrix, performing matrix multiplication on the original binary data matrix and the encoding matrix in the GF(2) domain to generate a latest encoding matrix; The weight of each row of data is counted according to the latest coding matrix, and rows with weights greater than a threshold are flipped by 0.1, and a mark bit is added to record the situation of each row to generate a codeword; The codeword is detected, and the detected codeword is decoded to obtain the original input array.

2. The method for constructing an optimal probability distribution constraint code suitable for ReRAM memory according to claim 1, wherein: The initial coding matrix is ​​constructed according to the matrix construction scheme based on the principle of maximizing information entropy, and the distribution of 0 and 1 in the entire transmission array is adjusted to obtain the coding matrix including: S1. Model the probability distribution by optimizing the Lagrange multiplier so that the expectations of the rows and columns meet the constraints. S2. Input parameters: number of rows, number of columns, row density ratio, column density ratio, learning rate, and initialize the Lagrange multiplier; S3. Define the probability of the element as a normalized exponential distribution; S4. Adjust λ by gradient ascent i , so that the probability of each row and approximate k = p * n: Adjust u by gradient ascent i , so that the probability of each column and approximate s = q * n: Stop when the multiplier change is less than the threshold or the maximum number of iterations is reached; S5. Based on the optimized probability distribution, generate the matrix row by row to ensure that the column density constraint is not violated; S6. Initialize the column weight counter w c [j] = 0; for row i, filter the columns that satisfy w_c[j] < qm, based on λ i and u i Compute the unnormalized probabilities of the available columns, normalized to a probability distribution; S7, from J i Choose k=p according to the probability distribution * n columns to avoid repeated selection; each time a column is selected, the probability distribution of the remaining columns is updated; the matrix and column weights are updated; S8. After all rows are processed, output the matrix X.

3. The method for constructing an optimal probability distribution constraint code suitable for ReRAM memory according to claim 1, wherein: A 0.1 flip for rows with weight greater than a threshold consists of: S1, traversing the latest encoding matrix row by row; SS2. Extract the current row data. For each currently processed row, store all elements of the current row into temporary variables. SS3. Extract the data from the temporary variable and calculate the sum of all elements in the current row. If the sum exceeds m / 2, flip the elements, invert all elements in the row, and convert them to double-precision data. S4. For the row data that has been flipped 0,1, the record flag is 1, and the data flag that has not been flipped is 0; S5. Store the processed row data into the corresponding row of the new matrix; S6. The output result includes two parts. The first part is the processed matrix, which is used to store the results of all rows after processing; the second part is the flip mark array, which is used to record which rows are flipped because the number of 1s exceeds half.

Citation Information

Patent Citations

  • SRAM radiation hardening method based on 4-bit adjacent and 3-bit burst error correction codes and memory system

    CN107301881A

  • Processor, and method for generating binarized weights for a neural network

    US20220147792A1