Memory management method and memory controller
By using a piecewise fitting dual-mapping prediction model, the problem of predicting the asymmetric distribution of threshold voltage in flash memory is solved, thereby improving the accuracy and reliability of memory management.
Patent Information
- Application Number
- CN202511793091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-03
AI Technical Summary
In the prior art, the assumption based on a single-peak Gaussian distribution cannot accurately describe the asymmetric shape of the threshold voltage in flash memory, resulting in suboptimal read reference voltage setting and inaccurate bit error rate prediction, which affects the reliability and durability of the storage device.
A dual-mapping prediction model based on piecewise fitting is adopted. The first mapping relationship is established to capture the macroscopic statistical characteristics of the threshold voltage distribution, and the second mapping relationship is established to characterize the asymmetric morphology. The prediction model is constructed to improve the prediction accuracy of the tail part of the distribution.
It enables accurate prediction of threshold voltage distribution under arbitrary storage parameter conditions, improving the precision of memory management and the accuracy and overall reliability of data reading from storage devices.
Smart Images

Figure CN121597592A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of storage technology, and in particular to a memory management method and memory controller for threshold voltage distribution. Background Technology
[0002] Flash memory, especially NAND flash memory, is widely used in various electronic devices due to its advantages such as non-volatility, high density, and low power consumption. In flash memory, data is represented by storing different amounts of charge in the floating gate of the memory cell, and the level of the threshold voltage (Vth) corresponding to the amount of charge represents different storage states. The memory controller determines the threshold voltage of the memory cell by applying a specific read reference voltage, thereby reading the data stored therein.
[0003] In practical memory modules, even when all memory cells are programmed to the same state, their respective threshold voltages are not single, fixed values, but rather form a statistical distribution around a central value. Accurate modeling of this threshold voltage distribution is fundamental to achieving efficient and reliable flash memory management. Current technologies typically model the threshold voltage distribution based on the assumption of a unimodal Gaussian distribution. This method calculates the mean (μ) and standard deviation (σ) of the distribution and uses a Gaussian probability density function to construct the entire distribution model. However, this idealized model has several serious drawbacks in practical applications: the symmetric Gaussian model cannot accurately describe the asymmetric shape of the actual threshold voltage distribution. Management strategies based on this inaccurate model often lead to suboptimal read reference voltage settings and inaccurate bit error rate predictions, thereby increasing the burden on the ECC engine and affecting the overall reliability and durability of the memory device. Summary of the Invention
[0004] In view of this, this disclosure provides a memory management method and a memory controller, which establishes a prediction model based on a piecewise fitting dual mapping relationship to achieve accurate prediction of threshold voltage distribution under arbitrary storage parameters. In particular, it improves the prediction accuracy of the tail portion of the distribution and can solve the technical problem that existing modeling methods cannot accurately fit the actual threshold voltage distribution with asymmetric shape. In particular, the prediction accuracy of the tail portion is insufficient.
[0005] This disclosure provides one or more embodiments of a memory management method applied to a memory controller, which controls a storage device configured with a memory module, the memory module including multiple storage units. The method includes: establishing a first mapping relationship between the statistical characteristics of each training threshold voltage distribution and its corresponding training storage parameter set; establishing a second mapping relationship between each training storage parameter set and its corresponding fitting parameter set, wherein the fitting parameter set is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training storage parameter set; constructing a prediction model based on the first and second mapping relationships; obtaining a target storage parameter set; generating a predicted threshold voltage distribution corresponding to the target storage parameter set using the prediction model; and performing at least one memory management operation on the multiple storage units based on the predicted threshold voltage distribution.
[0006] This disclosure provides a memory controller in one or more embodiments for controlling a storage device configured with a memory module, the memory module including multiple storage cells. The memory controller includes: a memory interface control circuit electrically connected to the memory module; and a processor electrically connected to the memory interface control circuit. The processor is configured to: establish a first mapping relationship between statistical characteristics of each training threshold voltage distribution and a corresponding training storage parameter set; establish a second mapping relationship between each training storage parameter set and its corresponding fitting parameter set, wherein the fitting parameter set is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training storage parameter set; construct a prediction model based on the first and second mapping relationships; obtain a target storage parameter set; generate a predicted threshold voltage distribution corresponding to the target storage parameter set using the prediction model; and perform at least one memory management operation on the multiple storage cells based on the predicted threshold voltage distribution.
[0007] Based on the above, the memory management method and memory controller provided in this disclosure can obtain a prediction model that structurally decomposes the prediction of threshold voltage distribution into two core parts: a prediction of basic statistical characteristics characterized by a first mapping relationship, and a prediction of asymmetric morphology characterized by a second mapping relationship. Compared with traditional methods that attempt to fit the entire complex distribution with a single function, this dual-mapping structure allows for specialized and refined modeling of different attributes of the distribution. Specifically, the first mapping relationship can accurately capture the overall trend of the mean and standard deviation as a function of memory parameter sets (e.g., programming height parameter and programming time parameter), while the second mapping relationship focuses on characterizing the more complex asymmetric shape caused by physical effects. This modular modeling approach results in a more accurate prediction model that can generate / predict a threshold voltage distribution that more closely resembles the actual shape. Attached Figure Description
[0008] Figure 1 This is a block diagram illustrating a host system and storage device according to an embodiment of the present disclosure;
[0009] Figure 2 This is a flowchart illustrating a memory management method according to an embodiment of the present disclosure;
[0010] Figure 3 This is a schematic diagram showing a comparison between the existing Gaussian model and the actual threshold voltage distribution;
[0011] Figure 4 This is a schematic diagram of a piecewise asymmetric fitting method according to an embodiment of the present disclosure;
[0012] Figure 5A and Figure 5B It is a graph showing the average position (mean) and standard deviation of the threshold voltage distribution as a function of the programming time parameter under a fixed programming height parameter, according to an embodiment of the present disclosure.
[0013] Figure 6A and Figure 6B It is a graph showing the average position (mean) and standard deviation of the threshold voltage distribution as a function of the programming height parameter under a fixed programming time parameter, according to an embodiment of the present disclosure.
[0014] Figure 7 This is a comparison diagram of the threshold voltage distribution in a conventional coordinate system and a logarithmic coordinate system, according to an embodiment of the present disclosure;
[0015] Figure 8 This is a comparison chart of the fitting method shown in an embodiment of the present disclosure and the traditional Gaussian fitting method;
[0016] Figure 9 This is a detailed flowchart of a prediction model acquisition method according to an embodiment of the present disclosure;
[0017] Figure 10A , Figure 10B and Figure 10C This is a detailed timing diagram of a prediction model acquisition and application method according to an embodiment of the present disclosure. Detailed Implementation
[0018] Reference will now be made in detail to exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Wherever possible, the same component reference numerals are used in the drawings and description to denote the same or similar parts.
[0019] Figure 1 This is a block diagram illustrating a host system and storage device according to an embodiment of the present disclosure.
[0020] Please refer to Figure 1The host system 10 is, for example, a personal computer, a laptop computer, or a server. The host system 10 includes a processor 110 (also called a second processor), host memory 120 (also called host RAM), and a data transfer interface circuit 130. In this embodiment, the processor 110 is coupled (also called electrically connected) to the host memory 120 and the data transfer interface circuit 130. In another embodiment, the processor 110, host memory 120, and data transfer interface circuit 130 are electrically connected to each other via a system bus. In this embodiment, the processor 110, host memory 120, and data transfer interface circuit 130 may be located on the motherboard of the host system 10.
[0021] The storage device 20 includes a memory controller 210, a memory module 220 (also known as a rewritable non-volatile memory module), and a connection interface circuit 230. The memory controller 210 includes a processor 211 (also known as a first processor), a data management circuit 212, a memory interface control circuit 213, and a buffer memory 214.
[0022] In this embodiment, the host system 10 is electrically connected to the storage device 20 via a data transmission interface circuit 130 and a connection interface circuit 230 to perform data access operations. For example, the host system 10 can store data to or read data from the storage device 20 via the data transmission interface circuit 130.
[0023] In this embodiment, the number of data transmission interface circuits 130 can be one or more. Through the data transmission interface circuits 130, the motherboard can be electrically connected to the storage device 20 via wired or wireless means. The storage device 20 can be, for example, a USB flash drive, memory card, solid-state drive (SSD), or wireless storage device. The wireless storage device can be, for example, a Near Field Communication (NFC) storage device, a WiFi storage device, a Bluetooth storage device, or a Bluetooth Low Energy storage device (e.g., iBeacon), or other storage devices based on various wireless communication technologies. Furthermore, the motherboard can also be electrically connected via the system bus to various I / O devices such as a Global Positioning System (GPS) module, network interface card, wireless transmission device, keyboard, screen, and speaker.
[0024] In this embodiment, the data transmission interface circuit 130 and the connection interface circuit 230 are interface circuits compatible with the Peripheral Component Interconnect Express (PCI Express) standard. Furthermore, data transmission between the data transmission interface circuit 130 and the connection interface circuit 230 utilizes the Non-Volatile Memory Express (NVMe) communication protocol.
[0025] In another embodiment, the connection interface circuit 230 may be packaged in a chip with the memory controller 210, or the connection interface circuit 230 may be disposed outside a chip containing the memory controller 210.
[0026] In this embodiment, the host memory 120 is used to temporarily store instructions or data executed by the processor 110. In this embodiment, the host memory 120 may be Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), etc. However, it should be understood that this disclosure is not limited to this, and the host memory 120 may also be other suitable memories.
[0027] The memory controller 210 executes multiple logic gates or control instructions implemented in hardware or firmware, and performs corresponding data writing, data reading, and data erasure operations in the memory module 220 according to the instructions of the host system 10. Specifically, the memory controller 210 implements a memory management method provided in this disclosure, which acquires and utilizes a high-precision prediction model to predict the threshold voltage distribution of multiple memory cells in the memory module 220, particularly improving the prediction accuracy of the distribution tail portion. Based on this prediction result, memory management operations are performed to improve the data reading accuracy and overall reliability of the storage device 20.
[0028] More specifically, the processor 211 in the memory controller 210 is hardware with computing capabilities, used to control the overall operation of the memory controller 210. Specifically, the processor 211 is configured to execute the memory management method provided in this disclosure. In one embodiment, the processor 211 is configured to: obtain a prediction model based on multiple training threshold voltage distributions of multiple training memory parameter groups, wherein the prediction model includes: a first mapping relationship established between the statistical characteristics (e.g., mean and standard deviation) of each training threshold voltage distribution and the corresponding training memory parameter group; and a second mapping relationship established between each training memory parameter group and a corresponding fitting parameter group, wherein the fitting parameter group is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training memory parameter group with its shape features. Next, the processor 211 obtains a target memory parameter group and generates a corresponding predicted threshold voltage distribution using the prediction model. Finally, the processor 211 performs at least one memory management operation on multiple memory cells based on the predicted threshold voltage distribution.
[0029] It is worth mentioning that, in this embodiment, the processor 110 and the processor 211 are, for example, a central processing unit (CPU), a microprocessor, or other programmable processing units (microprocessor), digital signal processor (DSP), programmable controller, application specific integrated circuits (ASIC), programmable logic device (PLD), or other similar circuit components, and this disclosure is not limited thereto.
[0030] In this embodiment, as described above, the memory controller 210 further includes a data management circuit 212 and a memory interface control circuit 213. It should be noted that the operations performed by each component of the memory controller 210 can also be considered as operations performed by the memory controller 210 itself.
[0031] The data management circuit 212 is electrically connected to the processor 211, the memory interface control circuit 213, and the connection interface circuit 230. The data management circuit 212 receives instructions from the processor 211 to perform data transmission. For example, it reads data from the host system 10 (e.g., host memory 120) via the connection interface circuit 230 and writes the read data into the memory module 220 via the memory interface control circuit 213. Alternatively, it performs a read operation according to a read instruction from the host system 10, reading data from one or more physical units of the memory module 220 via the memory interface control circuit 213 and writing the read data into the host system 10 via the connection interface circuit 230.
[0032] In another embodiment, the data management circuit 212 may also be integrated into the processor 211. The memory interface control circuit 213 is used to receive instructions from the processor 211 and, in conjunction with the data management circuit 212, to perform physical operations such as writing (also known as programming), reading, or erasing on the memory module 220.
[0033] Furthermore, data to be written to memory module 220 is converted into a format acceptable to memory module 220 via memory interface control circuit 213. Specifically, if processor 211 needs to access memory module 220, processor 211 transmits a corresponding instruction sequence to memory interface control circuit 213 to instruct memory interface control circuit 213 to perform the corresponding operation. For example, these instruction sequences may include write instruction sequences indicating the writing of data, read instruction sequences indicating the reading of data, erase instruction sequences indicating the erasure of data, and corresponding instruction sequences for indicating various memory operations. These instruction sequences may include one or more signals, or data on the bus. These signals or data may include instruction codes or program codes. For example, a read instruction sequence may include information such as the read identification code, memory address, and physical address.
[0034] Furthermore, the memory controller 210 establishes a logical-to-physical address mapping table and a physical-to-logical address mapping table to record the mapping relationship between the logical addresses of logical units (e.g., logical blocks, logical pages) and the physical addresses (physical addresses) of physical units (e.g., physical erase units / physical blocks, physical pages) configured for the memory module 220. In other words, the memory controller 210 can use the logical-to-physical address mapping table (also called the logical-to-physical mapping table) to find the physical unit mapped to a logical unit (e.g., find the physical page mapped to a logical page; find the physical address mapped to a logical address), and the memory controller 210 can use the physical-to-logical address mapping table (also called the physical-to-logical mapping table) to find the logical unit mapped to a physical unit (e.g., find the logical page mapped to a physical page; find the logical address mapped to a physical address).
[0035] The buffer memory 214 is electrically connected to the processor 211 and is used to temporarily store data and instructions from the host system 10, data from the memory module 220, and various system data for managing the storage device 20.
[0036] In the embodiments of this disclosure, the core purpose of the buffer memory 214 is to provide data storage and computation space for the memory management method of this disclosure. Specifically, the processor 211 uses the buffer memory 214 to store various data or information related to the method, such as: raw data of multiple training threshold voltage distributions, meta-datasets generated during shape feature fitting (containing multiple sets of fitting parameter sets), and the finally obtained prediction model (e.g., storing the final model coefficients constituting the first mapping relationship and the second mapping relationship). When performing prediction, the buffer memory 214 can also be used to temporarily store the target storage parameter set and the generated prediction threshold voltage distribution data.
[0037] Memory module 220 is electrically connected to memory controller 210 (specifically memory interface control circuit 213) and is used to store user data sent by host system 10. Memory module 220 includes multiple physical blocks, each physical block consisting of multiple physical pages, and each physical page containing multiple memory cells. Each memory cell has a threshold voltage when programmed to a specific state. However, due to manufacturing variations, losses from repeated programming / erasing cycles, and physical effects such as charge dissipation over time, the threshold voltages of a large number of memory cells form an asymmetric statistical distribution, especially exhibiting a tail on the low-voltage side of the distribution. In particular, during incremental step pulse programming (ISPP) of the memory cells, the shape of this threshold voltage distribution dynamically and non-linearly evolves as programming pulses are applied step by step.
[0038] Figure 3 This is a schematic diagram showing a comparison between the existing Gaussian model and the actual threshold voltage distribution.
[0039] Reference Figure 3 , Figure 3 The horizontal axis represents the threshold voltage (Vth, also known as the critical voltage), and the vertical axis represents the number of memory cells. As shown in the figure, the solid curve represents the actual threshold voltage distribution formed by a large number of memory cells under specific operating conditions, and this distribution exhibits an asymmetric shape extending towards the low voltage side. The dashed curve represents the result of fitting this actual distribution using a traditional single-peak Gaussian model.
[0040] from Figure 3 As can be clearly seen, due to the inherent asymmetry of the actual threshold voltage distribution, the traditional Gaussian model, as a strictly symmetrical model, cannot perfectly match the actual distribution curve. This is because, firstly, due to tunneling effects, charge discharge, and the accumulated losses from program / erase (P / E) cycles, the actual threshold voltage distribution exhibits a significant asymmetry, which the strictly symmetrical Gaussian model cannot accurately describe. Secondly, this mismatch is particularly pronounced in the tail portion of the distribution. The memory cells in the tail portion, whose threshold voltages are closest to their neighboring states, are the main source of read errors. The traditional Gaussian model exhibits a large fitting error in this region, as shown by the dashed circle in the attached figure. Since these tail portion of the memory cells is the main source of read errors, the inaccurate prediction of the traditional Gaussian model in this region directly leads to the memory controller's inability to accurately assess the bit error rate, thus affecting its ability to formulate optimal memory management strategies, such as setting the read reference voltage or planning error correction code operations.
[0041] The method disclosed herein uses processor 211 to accurately model and predict the dynamic evolution of this complex threshold voltage distribution during the programming process. This ensures accurate evaluation and management of the programming results of the memory cells under various programming conditions (e.g., different programming intensities and different programming stages), thereby improving the programming efficiency and data write quality of the memory device 20. Specific modeling methods and prediction processes will be described in detail in subsequent embodiments.
[0042] Figure 2 This is a flowchart illustrating a memory management method according to an embodiment of the present disclosure.
[0043] Reference Figure 2 In one embodiment, in step S210, the processor 211 establishes a first mapping relationship based on the statistical characteristics (e.g., mean and standard deviation) of each training threshold voltage distribution and the corresponding training storage parameter set. This first mapping relationship aims to capture the overall pattern of changes in the macroscopic statistical characteristics of the threshold voltage distribution with operating conditions.
[0044] Next, in step S220, the processor 211 establishes a second mapping relationship based on each training stored parameter set and its corresponding fitting parameter set. The fitting parameter set is obtained by segmenting and fitting the shape features of the training threshold voltage distribution corresponding to the training stored parameter set. This second mapping relationship aims to capture the detailed asymmetric shape of the threshold voltage distribution as it changes with operating conditions.
[0045] Subsequently, in step S230, the processor 211, based on the first and second mapping relationships established in steps S210 and S220, jointly constructs a complete prediction model that can be used for real-time prediction. This prediction model can be stored in the firmware of the memory controller 210 or in the buffer memory 214.
[0046] The prediction model is a structured data model comprising two core components: a first mapping relationship and a second mapping relationship. The first mapping relationship is established between the statistical characteristics of each training threshold voltage distribution and its corresponding training stored parameter set. The second mapping relationship is established between each training stored parameter set and its corresponding fitted parameter set, where the fitted parameter set is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training stored parameter set with its shape features.
[0047] In one embodiment, the process of acquiring multiple training storage parameter sets and corresponding multiple training threshold voltage distributions can be performed during the factory calibration phase of the storage device 20 or in a specific maintenance mode.
[0048] Specifically, processor 211 can be configured to: First, select multiple word lines at the same location in different memory blocks of memory module 220 to reduce the impact of physical differences between different word lines. Next, processor 211 applies multiple preset, different sets of training storage parameters (e.g., different combinations of programming height and programming time parameters) to each word line. After applying each set of training storage parameters, processor 211 scans multiple memory cells on the corresponding word line to measure and record their threshold voltages, thereby obtaining the corresponding training threshold voltage distribution under that parameter set. By traversing all preset sets of training storage parameters, the corresponding training threshold voltage distribution can be obtained, which together serve as complete training data for obtaining the prediction model.
[0049] In one embodiment, the set of storage parameters that influence the threshold voltage distribution pattern mainly consists of two key physical dimensions. The first dimension is the programming height parameter, which is directly related to the intensity of the programming operation performed on the storage cell.
[0050] Specifically, a higher programming height parameter typically corresponds to a higher programming pulse voltage, which results in a higher initial mean position for the threshold voltage distribution.
[0051] The second dimension is the programming time parameter, which quantifies the stage of evolution during the Incremental Step Pulse Programming (ISPP) operation. Specifically, a smaller programming time parameter corresponds to the initial stage of the programming operation, where only a few programming pulses are applied; while a larger programming time parameter corresponds to the later stage of the programming operation. (See reference...) Figure 5A As the programming time parameter increases, the cumulative programming energy received by the memory cell increases, thus the mean of its threshold voltage distribution gradually rises and eventually saturates as it approaches the target programming voltage. Therefore, both the training memory parameter set used to obtain the prediction model and the target memory parameter set used for real-time prediction can be defined by a combination of a programming height parameter and a programming time parameter, thereby comprehensively characterizing the operating conditions and states of the memory cell at different programming stages.
[0052] In one embodiment of this disclosure, in order to mathematically characterize the macroscopic properties of a training threshold voltage distribution, processor 211 calculates its key statistical features.
[0053] Specifically, statistical characteristics may include the mean and standard deviation. The mean (μ) represents the central location or equilibrium point of the distribution, physically corresponding to the arithmetic mean of the threshold voltages of a large number of memory cells. The standard deviation (σ) quantifies the dispersion or width of the distribution, physically corresponding to the average deviation of the threshold voltage values of each memory cell from its mean.
[0054] By acquiring these two core statistical features, the processor 211 can provide basic, quantified input data for establishing the first mapping relationship, thereby simplifying a complex original distribution containing massive amounts of data points into two key values that can summarize its main characteristics.
[0055] Having clarified the definition of statistical characteristics, the following details the method for generating predictive models, especially the two core components: the process of establishing the first and second mapping relationships.
[0056] In one embodiment of this disclosure, the process of obtaining the prediction model may be accomplished by processor 211 executing a series of structured steps.
[0057] First, to establish the initial mapping relationship, processor 211 collects the mean, standard deviation, and corresponding training stored parameter sets of all training samples, and establishes a mathematical relationship between the mean and standard deviation and the corresponding training stored parameter sets based on these data points. This step aims to capture the overall pattern of how the macroscopic statistical characteristics of the distribution change with operating conditions.
[0058] Furthermore, to construct the second mapping relationship, the processor 211 performs a feature extraction process for each of the multiple training threshold voltage distributions. This process begins by dividing the training threshold voltage distribution into at least two distribution segments based on the mean of the distribution. Subsequently, the processor 211 performs shape feature fitting on each of the at least two distribution segments, with the aim of finding an optimal mathematical function to describe the curve shape of each distribution segment, thereby obtaining a set of fitting parameters that can accurately quantify the shape.
[0059] Finally, after performing the above feature extraction process on all training samples, the processor 211 collects all acquired sets of fitted parameters. Based on this data, the processor 211 further establishes a second mapping relationship between the multiple training stored parameter sets and the multiple sets of fitted parameter sets. By sequentially executing these steps, the processor 211 finally obtains a complete prediction model containing the first and second mapping relationships. This model can respond to any set of input parameters and output a complete and high-precision predicted threshold voltage distribution.
[0060] Figure 4 This is a schematic diagram of a piecewise asymmetric fitting method according to an embodiment of the present disclosure. The diagram visually illustrates the specific process of piecewise and shape feature fitting for a single training threshold voltage distribution in the aforementioned feature extraction process.
[0061] Reference Figure 4 , Figure 4 The horizontal axis represents the threshold voltage, and the vertical axis represents the logarithmic value of the number of storage units. To improve the fitting accuracy of the tail portion of the distribution, in this embodiment, the processor 211 performs a logarithmic coordinate transformation on the training threshold voltage distribution. In the logarithmic coordinate system, the low-probability region that was originally compressed in the linear coordinate system is expanded, so that the tail portion receives greater weight in the fitting process.
[0062] Next, the processor 211 performs shape feature fitting on the two segments respectively. Specifically, the processor 211 fits the measured data of the first distribution segment to obtain a first fitting curve FC1 corresponding to the shape feature fitting; and independently fits the measured data of the second distribution segment to obtain a second fitting curve FC2 corresponding to the shape feature fitting. In one embodiment, the first distribution segment corresponds to the region to the left of the mean, which is more susceptible to tunneling effects due to the presence of under-programmed memory cells, making it prone to tailing; the second distribution segment corresponds to the region to the right of the mean.
[0063] like Figure 4 As shown, the two curves fitted by the method of this disclosure (represented by solid lines) closely match the measured data points (represented by dots), while the curve fitted by the traditional Gaussian model (represented by dashed lines) shows a significant deviation from the measured data.
[0064] By employing this piecewise independent fitting method, this disclosure solves the problem that traditional single Gaussian models cannot accurately describe the asymmetry of distributions. For example... Figure 4 As shown, in the left tail region of the distribution, the deviation between the fitting curve of the method disclosed in this paper and the measured data is significantly smaller than that of the traditional Gaussian model.
[0065] Figure 9 This is a detailed flowchart of a prediction model acquisition method according to an embodiment of the present disclosure.
[0066] In one embodiment, reference is made to Figure 9 As shown, the memory management method provided in this disclosure predicts the threshold voltage distribution of flash memory by establishing a two-stage mapping relationship. The processor 211 first establishes a first mapping relationship between statistical features and storage parameters through training data, and then establishes a second mapping relationship between the fitted parameter set and storage parameters through piecewise fitting, ultimately forming a complete prediction model.
[0067] like Figure 9 As shown, the process of building the prediction model begins with the acquisition of training data. In step S910, the processor 211 acquires multiple sets of training stored parameters and their corresponding training threshold voltage distributions.
[0068] Specifically, eight sets of programming height parameters (e.g., H=80, 90, 100, 110, 120, 130, 140, 150) and 32 sets of programming time parameters (e.g., T=0 to 31) can be selected to form a combination of 256 training storage parameter sets. To reduce the impact of programming and erasing interference, when obtaining the training threshold voltage distribution corresponding to each training storage parameter set, word lines at the same position in different storage blocks are selected for programming operations.
[0069] In step S920, processor 211 calculates the statistical characteristics, including mean and standard deviation, for each training threshold voltage distribution. These statistical characteristics reflect the central tendency and dispersion of the threshold voltages of all involved memory cells under specific programming conditions. Processor 211 calculates the statistical characteristics of each training threshold voltage distribution by analyzing 256 (e.g., 8) By calculating the statistical features of the 32 (256) training samples, a complete training dataset can be obtained, providing a data foundation for establishing subsequent mapping relationships.
[0070] In step S930, the processor 211 establishes a first mapping relationship between the mean and standard deviation of the training threshold voltage distribution and the corresponding training storage parameter group based on the acquired training data.
[0071] To construct a mathematical model that accurately reflects physical reality, it is first necessary to analyze the inherent laws governing the variation of these statistical characteristics with the stored parameter set. The following utilizes... Figure 5A , Figure 5B , Figure 6A , Figure 6B To explain the relevant details.
[0072] Figure 5A and Figure 5B It is a graph showing the average position (mean) and standard deviation of the threshold voltage distribution as a function of the programming time parameter under a fixed programming height parameter, according to an embodiment of the present disclosure. Figure 6A and Figure 6B It is a graph showing the average position (mean) and standard deviation of the threshold voltage distribution as a function of the programming height parameter under a fixed programming time parameter, according to an embodiment of the present disclosure.
[0073] Reference Figure 5A and Figure 5BThe figure shows the trends of the mean and standard deviation as a function of the programming time parameter, under the condition of fixed programming height parameters. To clearly illustrate this trend, three representative programming height parameters are selected in the figure: low programming height (height parameter 80), medium programming height (height parameter 120), and high programming height (height parameter 150).
[0074] Reference Figure 5A This diagram illustrates the variation in the average position (mean) of the threshold voltage distribution. It is clearly observed that for all three programming height parameters, the mean exhibits a non-linear growth with increasing programming time parameters. Specifically, in the initial stage with smaller programming time parameters (e.g., 0 to 10), the mean grows rapidly; however, as the programming time parameter further increases, the slope of the curve gradually decreases, indicating that the growth of the mean tends to saturate. This characteristic of "rapid growth followed by plateauing" is a typical exponential growth law, reflecting the physical process during programming operations where the charge in the memory cell accumulates as programming evolves and eventually approaches a steady state.
[0075] Reference Figure 5B This illustrates the variation in the standard deviation of the threshold voltage distribution. Unlike the significant variation in the mean, the standard deviation curves show a relatively flat trend across all three programming time parameters. While there are slight fluctuations and a small increase in the initial stage, the overall variation in standard deviation with programming time parameters is small. This reveals an important physical phenomenon: the programming time parameters primarily affect the central location of the threshold voltage distribution, while having little effect on the dispersion or width of the distribution.
[0076] Reference Figure 6A and Figure 6B The figure shows the trends of mean and standard deviation with programming height parameter under the condition of fixed programming time parameters (labeled as "width parameter" in the figure). To clearly illustrate this trend, three representative programming time parameters are selected in the figure: the initial time (width parameter 0), the intermediate time (width parameter 15), and the later time (width parameter 30).
[0077] Reference Figure 6A This illustrates the variation in the average location (mean) of the threshold voltage distribution. It is clearly observed that for all three programming time parameters, the mean exhibits an approximately linear increasing trend with the programming height parameter. This indicates a direct positive correlation between the intensity of the programming operation and the center location of the final threshold voltage.
[0078] Reference Figure 6BThe figure illustrates the variation in the standard deviation of the threshold voltage distribution. It shows that the standard deviation increases with the increase of the programming height parameter. The technical reason for this phenomenon is that different memory cells on a word line, due to differences in their microscopic physical structure, do not respond to programming operations with exactly the same degree (i.e., programming difficulty / ease). When the programming height parameter is low, this difference between cells is not significant; however, as the programming height parameter increases, the threshold voltage difference between cells that program faster and slower is significantly amplified, leading to an increase in the dispersion of the overall threshold voltage distribution, i.e., an increase in the standard deviation.
[0079] based on Figures 5A to 6B The experimental patterns revealed indicate that the processor 211 establishes a first mapping relationship to describe the functional relationship between the programming height parameter, the programming time parameter, and the statistical characteristics of the threshold voltage distribution.
[0080] Specifically, in one embodiment, the processor 211 uses a nonlinear least squares method to establish the functional relationship between the programming height parameter H, the programming time parameter T, and the mean μ as formula (1), and to establish the functional relationship between the programming height parameter H, the programming time parameter T, and the standard deviation σ as formula (2).
[0081] More specifically, in a particular embodiment, the first mapping relationship describing the mean (μ) and the training stored parameter set (H, T) can be represented by the following formula (1):
[0082] (1)
[0083] Where μ is the mean value of the threshold voltage distribution, H is the programming height parameter, and T is the programming time parameter. The right side of formula (1) consists of two parts: the first part "( The first part, “”, represents the initial mean position when the programming time parameter T is zero, and it includes both linear and exponential terms related to the programming height H; the second part, “( The expression represents the magnitude of the mean's evolution with respect to the programming time parameter T, which is itself complexly influenced by the programming height H. The entire expression is expressed through an exponentially decaying term with respect to the programming time parameter T. This is used to model the physical process in which the mean increases over time and tends to saturate. The a, b, c, d, e, f, g, h, i, j, k, l contained in formula (1) are the first mapping coefficients, and their specific values can be determined by performing nonlinear least squares fitting on the training data.
[0084] In one embodiment, the specific values of the first mapping coefficients of this set are shown in Table 1.
[0085] Table 1
[0086]
[0087] In the same embodiment, the first mapping relationship describing the standard deviation (σ) and the training stored parameter set (H, T) can be represented by the following formula (2):
[0088] (2)
[0089] Where H is the programming height parameter. This formula mainly reflects the trend of the standard deviation increasing with the programming height H, while including an exponential term to correct for nonlinear effects. Since the experimental observation shows that the programming time parameter T has a relatively small impact on the standard deviation, the model can be simplified to a form that does not include the programming time parameter T. The a, b, c, and d included in formula (2) are another set of first mapping coefficients, which can also be determined by fitting the training data.
[0090] In one embodiment, the specific values of the first mapping coefficients of this set are shown in Table 2.
[0091] Table 2
[0092]
[0093] Back Figure 9 In step S930, the processor 211 establishes a first mapping relationship between the mean and standard deviation of the training threshold voltage distribution and the corresponding training storage parameter set based on the acquired training data. This first mapping relationship adopts a combination of exponential and polynomial terms, which can accurately describe the influence of the programming height parameter and the programming time parameter on the statistical characteristics of the threshold voltage distribution.
[0094] Specifically, the first mapping relationship between the mean and the training storage parameter set can be expressed as a composite function containing exponential decay and linear terms. This function reflects the physical process that as programming time increases, the cell threshold voltage gradually approaches the programming voltage and eventually stabilizes. This first mapping relationship contains 12 first mapping coefficients. Through the combination of these first mapping coefficients, the combined influence of the programming height parameter and the programming time parameter on the mean can be accurately described. The first mapping relationship between the standard deviation and the training storage parameter set adopts a relatively simplified function form, mainly reflecting the trend of increasing with programming height. This relationship contains 4 first mapping coefficients. This is because the increase in programming height amplifies the differences in programming results between different storage cells, while the influence of the programming time parameter on the standard deviation is relatively small. By performing nonlinear least squares fitting on 256 sets of training data, the specific values of the first mapping coefficients in the first mapping relationship can be determined.
[0095] After establishing the initial mapping relationship, the method enters the piecewise fitting stage. For example... Figure 9 As shown in step S940, for each training threshold voltage distribution, processor 211 first performs a data coordinate transformation operation.
[0096] This coordinate transformation includes two aspects:
[0097] (1) Standardization of the horizontal axis: The threshold voltage x is transformed into a standardized coordinate (x-μ) / σ, where μ is the mean of the training threshold voltage distribution and σ is the corresponding standard deviation. This standardization process normalizes different training samples to a uniform scale, improving the stability of the fit.
[0098] (2) Logarithmic transformation of the ordinate: The number of storage cells is transformed logarithmically. Since the tail portion of the threshold voltage distribution has few data points, fitting in a linear coordinate system will lead to insufficient attention to the tail region by the fitting algorithm. Logarithmic transformation increases the fitting weight of the tail portion, thereby improving the prediction accuracy of the asymmetric tail portion. This coordinate transformation takes into account the asymmetric distribution characteristics of flash memory cells caused by the tunneling effect.
[0099] Figure 7 This is a comparison diagram of the threshold voltage distribution in a conventional coordinate system and a logarithmic coordinate system, according to an embodiment of the present disclosure.
[0100] Reference Figure 7 It uses a specific training sample (programming height parameter = 80, programming time parameter = 31) as an example to intuitively demonstrate the effect of logarithmic transformation. Figure 7 The upper part shows the original training threshold voltage distribution in a conventional linear coordinate system, which exhibits a typical Gaussian-like distribution. Figure 7 The lower half of the diagram shows the results after performing a logarithmic transformation on the ordinate of the same set of data. It is clear that in the linear coordinate system, the number of storage units in the tail portion is small, and its distribution details are difficult to observe. For example, in the region where the threshold voltage is below -50 mV, the number of storage units is approximately 10. In the logarithmic coordinate system, the ordinate values of this region are magnified, making the distribution trend of the tail portion clearly visible and facilitating accurate fitting. This transformation allows the second-order polynomial fitting performed by the processor 211 to simultaneously consider both the main body and the tail portion of the distribution, thereby improving the overall fitting accuracy.
[0101] Back Figure 9After completing the coordinate transformation, in step S950, the processor 211 divides the training threshold voltage distribution into at least two distribution segments based on the mean. These at least two distribution segments include a first distribution segment and a second distribution segment bounded by the mean, where the first distribution segment corresponds to the region to the left of the mean, and the second distribution segment corresponds to the region to the right of the mean. Since the tunneling effect is mainly reflected in under-programmed memory cells, the first distribution segment usually exhibits a more pronounced tailing characteristic.
[0102] In step S960, processor 211 performs shape feature fitting on at least two distribution segments respectively. The shape feature fitting for each of the at least two distribution segments is performed using functions with different parameters to fully reflect the asymmetry characteristics on both sides of the distribution.
[0103] In one specific embodiment, the shape feature fitting employs a second-order polynomial function. This function, in a standardized and logarithmic coordinate system after coordinate transformation, can be represented by the following formula (3):
[0104] (3)
[0105] Where z is the standardized threshold voltage, calculated as z = (x-μ) / σ; x is the original threshold voltage value; μ is the mean of the training threshold voltage distribution; σ is the corresponding standard deviation; y is the number of storage units after logarithmic transformation; and A, B, and C are the fitting parameters to be determined. The choice of this function form is based on the approximately parabolic characteristics of the threshold voltage distribution in logarithmic coordinates.
[0106] The processor 211 obtains a first set of fitting parameters (A_L, B_L, C_L) by fitting data points in a first distribution segment (e.g., z<0); and independently obtains a second set of fitting parameters (A_R, B_R, C_R) by fitting data points in a second distribution segment (e.g., z>0). The set of these two sets of fitting parameters together constitutes the complete shape features of the training sample.
[0107] It should be noted that, due to the differences in the physical mechanisms of the two distribution segments, the curve of the first segment function represented by the first segment function and the curve of the second segment function represented by the second segment function are not forced to be continuous at the mean (e.g., they may have discontinuous gaps or non-smooth connections). Compared with forced continuity constraints, this design can achieve higher fitting accuracy for the tailing part.
[0108] In step S970, processor 211 determines whether there are any unprocessed training stored parameter sets and training threshold voltage distributions. If the determination result is "yes", it returns to step S910 to continue processing the next training sample; if the determination result is "no", it proceeds to step S980 to establish the second mapping relationship. Through this cyclical processing, segmented fitting can be completed for all 256 training samples to obtain the corresponding multiple sets of fitting parameter sets.
[0109] In step S980, the processor 211 establishes a second mapping relationship between the multiple training and stored parameter sets and the multiple fitted parameter sets based on the acquired multiple sets of fitted parameter sets. The second mapping relationship is established by performing parameter mapping fitting on the multiple sets of fitted parameter sets.
[0110] In one specific embodiment, the parameter mapping fitting employs a second-order multivariate polynomial function. This function describes the relationship between each fitting parameter (such as A_L, B_L, C_L, A_R, B_R, C_R) and the training stored parameter set (H, T), and can be expressed by the following formula (4):
[0111] (4)
[0112] Where y represents a fitting parameter (such as A_L or B_R, etc.), H is the programming height parameter, and T is the programming time parameter. a, b, c, d, e, f are the second mapping coefficients determined through the parameter mapping fitting process. For example, in order to establish a mapping relationship for predicting the fitting parameter A_L, the processor 211 substitutes the (H, T, A_L) data points of all training samples into formula (4) for fitting to solve for a set of exclusive second mapping coefficients. By performing this process on all six fitting parameters (A_L, B_L, C_L, A_R, B_R, C_R) respectively, a complete second mapping relationship can be established.
[0113] That is, for the three fitting parameters A_L, B_L, and C_L on the left, performing parameter mapping fitting yields three sets of second mapping coefficients; similarly, for the three fitting parameters A_R, B_R, and C_R on the right, performing parameter mapping fitting yields another three sets of second mapping coefficients. These coefficients can be estimated from the 256 sets of training data using multiple linear regression or least squares.
[0114] In a specific example, processor 211 performed multiple linear regression on 256 sets of training data and obtained the second mapping coefficients shown in Tables 3 and 4. Table 3 records 36 mapping coefficients between the three fitting parameters (A_L, B_L, C_L) of the first distribution segment and the training stored parameter set, while Table 4 records the corresponding 36 mapping coefficients of the fitting parameters (A_R, B_R, C_R) of the second distribution segment.
[0115] Table 3
[0116]
[0117] Table 4
[0118]
[0119] In one embodiment, the fitting process for determining the specific values of the first and second mapping coefficients can be implemented by the processor 211 executing preset firmware code. This firmware code may contain program modules based on numerical optimization algorithms, such as the least squares method. Specifically, the processor 211 can call the least squares fitting function, taking the training data as input and the corresponding mathematical model (such as formulas (1), (2), or (4)) as the objective function. Through iterative optimization, the sum of squared residuals between the objective function and the training data is minimized, thereby solving for the optimal coefficient values. During the fitting process, the initial values of all coefficients can be set to 1, and no boundary constraints can be set to allow the algorithm to find the optimal solution in the widest possible solution space. In another embodiment, the above fitting process can also be completed offline on an external system (e.g., a computer running a Python scientific computing library), and then the calculated final model coefficients are stored in the memory controller 210.
[0120] In step S990, processor 211 records the first mapping relationship and the second mapping relationship to complete the establishment of the prediction model. This prediction model, by combining the first and second mapping relationships, forms an analytical expression from any target stored parameter set to the complete predicted threshold voltage distribution. When prediction is needed for new programming conditions, processor 211 can first use the first mapping relationship to calculate the predicted mean and predicted standard deviation under that condition, and then use the second mapping relationship to calculate each fitting parameter in the corresponding predicted fitting parameter set. Finally, based on these fitting parameters, processor 211 generates the complete predicted threshold voltage distribution curve in a standardized logarithmic coordinate system.
[0121] Figure 8 This is a comparison chart of the effects of the fitting method shown in an embodiment of this disclosure and the traditional Gaussian fitting method.
[0122] Reference Figure 8For example, suppose processor 211 selects two representative training threshold voltage distributions with a programming height parameter of 150 for comparative analysis, corresponding to programming time parameters of 0 and 20 respectively, to show the difference in the fit of the fitting curve to the measured data under different time conditions.
[0123] Specifically, in Figure 8 In the first comparative experiment shown above, processor 211 processes a training threshold voltage distribution with a programming height parameter of 150 and a programming time parameter of 0. The distribution has a mean of 335.85 and a standard deviation of 26.9. Processor 211 first performs a conventional Gaussian fitting method, constructing a single Gaussian distribution curve based on the mean and standard deviation. Then, processor 211 performs the piecewise fitting method of this disclosure, dividing the distribution into a first distribution segment and a second distribution segment with the mean of 335.85 as the boundary. For the first distribution segment, processor 211 performs shape feature fitting in a logarithmic coordinate system, obtaining the fitted curve on the left with a coefficient of determination (R²) of 0.9559. For the second distribution segment, processor 211 performs the corresponding shape feature fitting, obtaining the fitted curve on the right with a coefficient of determination (R²) of 0.9346. In contrast, the conventional Gaussian fitted curve (shown as a dashed line) has a coefficient of determination (R²) of only 0.7721. It should be noted that from... Figure 8 As can be seen, after fitting, the fitted curves on the left and right are discontinuous at the mean.
[0124] Furthermore, in Figure 8 In the second comparative experiment shown below, processor 211 processes a training threshold voltage distribution with a programming height parameter of 150 and a programming time parameter of 20. This distribution exhibits more complex morphological characteristics. The mean of this distribution increases to 476.09, while the standard deviation remains at 26.9, reflecting the influence of the programming time parameter on the position of the threshold voltage distribution. Processor 211 also performs a comparison of two fitting methods. Using the piecewise fitting method, the fitting curve on the left achieves a fitting accuracy of R²=0.9468, and the fitting curve on the right achieves a fitting accuracy of R²=0.9630. The traditional Gaussian fitting curve (shown as a dashed line) has a coefficient of determination R² of 0.7172 under this condition, which is further reduced compared to the first comparative experiment, indicating that the fitting effect of the traditional method decreases as the programming time parameter increases. However, it is worth noting that the coefficients of determination R² of the left and right fitting curves provided by this method do not decrease significantly, maintaining stable fitting quality.
[0125] Furthermore, processor 211 can calculate the overall goodness-of-fit index for the complete 256 training samples. Experimental data show that the piecewise fitting method of this disclosure achieves a coefficient of determination of 0.9466 for the overall goodness of fit, while the coefficient of determination of the traditional Gaussian method is 0.9175. More importantly, in the evaluation of the fitting accuracy of the tail portion, the method of this disclosure achieves a coefficient of determination of 0.9274, while the traditional method is only 0.7498, that is, the fitting accuracy of the tail portion is improved by 23.7%, as shown in Table 5 below.
[0126] Table 5
[0127]
[0128] from Figure 8 The comparison results show that the piecewise fitting method of this disclosure exhibits higher fitting accuracy in the left-side tail region of the threshold voltage distribution. Specifically, in the threshold voltage range of 200mV to 250mV (corresponding to... Figure 8 (upper part) and the 350mV to 400mV range (corresponding to) Figure 8 (Lower part) The deviation between the piecewise fitted curve and the original data points is significantly smaller than that of the Gaussian fitted curve. This improvement in fitting accuracy stems from the technical solution adopted in this disclosure: by fitting in a logarithmic coordinate system, the weight of the tailing part of the data points is increased; by segmenting, different fitting parameters are allowed on the left and right sides, which more accurately reflects the asymmetric distribution characteristics caused by the tunneling effect; by not forcing a continuity constraint at the mean, greater freedom is provided for the independent optimization of each distribution segment.
[0129] Based on these comparative experimental results, processor 211 confirms the technical advantages of the prediction model provided in this disclosure when processing the threshold voltage distribution of actual flash memory. This prediction model not only provides higher fitting accuracy in a statistical sense, but more importantly, it improves prediction accuracy in the critical region of the "tail," which affects data reliability, thus providing a more reliable data foundation for subsequent memory management operations.
[0130] Back Figure 2 Next, in step S240, the processor 211 acquires the target storage parameter set. The target storage parameter set can be issued by the host system 10 or generated automatically by the memory controller 210 based on its current management tasks (e.g., performing read operations, evaluating data retention status, etc.). The target storage parameter set defines the operational conditions that the processor 211 currently needs to predict. In one embodiment, both the training storage parameter set and the target storage parameter set include a programming height parameter and a programming time parameter. The programming height parameter corresponds to the intensity of the programming operation performed on multiple storage cells in the memory module 220, while the programming time parameter corresponds to an evolutionary stage in the programming operation process.
[0131] Subsequently, in step S250, the processor 211 generates the corresponding predicted threshold voltage distribution based on the prediction model and the target storage parameter group obtained in step S240.
[0132] In one embodiment, this step is specifically executed as follows: First, the processor 211 uses a first mapping relationship and substitutes the target stored parameter set to calculate the predicted statistical characteristics (e.g., predicted mean and predicted standard deviation). Second, the processor 211 uses a second mapping relationship and substitutes the target stored parameter set to calculate a set of predicted fitting parameters. Finally, based on the calculated predicted statistical characteristics and the predicted fitting parameter set, the processor 211 jointly generates the final and complete predicted threshold voltage distribution.
[0133] Finally, in step S260, processor 211 performs at least one memory management operation on multiple memory cells in memory module 220 based on the predicted threshold voltage distribution generated in step S250, which better reflects the actual state of the memory cells, in order to improve the reliability and performance of the memory device.
[0134] Since the predicted threshold voltage distribution can reflect the actual state of the memory cell, the management operations performed based on this prediction result can implement corresponding management strategies according to the predicted physical condition of the memory cell. In one embodiment, at least one memory management operation may include: optimizing programming operation parameters; predicting the dispersion of programming results; optimizing the readback voltage for programming verification; or providing channel information of the programming state for the soft-decision decoding process.
[0135] Specifically, in one embodiment, the memory management operation is "optimizing the readback voltage for program verification". When the processor 211 completes a programming operation on a target physical page in the memory module 220 and needs to immediately perform a program verification readback, it first obtains the target storage parameter set corresponding to the programming operation (e.g., the programming height parameter used in the programming and the programming time parameter corresponding to the end of the programming operation). Next, the processor 211 generates a predicted threshold voltage distribution of the current storage state of the target physical page using the prediction model of this disclosure. Subsequently, the processor 211 analyzes the distribution boundary between the predicted distribution and adjacent states, calculates the voltage value that can most reliably distinguish between the two states, and determines this voltage value as the optimal readback reference voltage. Finally, the processor 211 instructs the memory interface control circuit 213 to use this optimal voltage to perform the program verification readback operation, thereby improving the accuracy of the programming result verification.
[0136] In another embodiment, memory management operations involve "providing channel information of the programming state for the soft-decision decoding process." In some applications requiring immediate high-reliability verification of programmed data, the processor 211 does not simply determine the read voltage as "0" or "1" when performing programming verification readback. Instead, the processor 211 first acquires the corresponding target memory parameter set and generates a predicted threshold voltage distribution for all possible memory states at the time of programming completion. When a threshold voltage Vx is sensed for a memory cell, the processor 211 calculates the probability that Vx belongs to two adjacent memory states based on the predicted distribution, and generates a log-likelihood ratio (LLR) as soft information. This soft information is then passed to the ECC engine for soft-decision decoding, which significantly improves the error correction capability for errors that may occur during the programming process.
[0137] In another embodiment, the memory management operation is "optimizing programming operation parameters." Before performing a programming operation, the processor 211 can perform pre-simulation using the predictive model of this disclosure to select the optimal programming strategy. Specifically, the processor 211 can set a target threshold voltage and, for multiple candidate sets of memory parameters (i.e., combinations of programming height and programming time parameters), invoke the predictive model to generate their respective predicted threshold voltage distributions. Subsequently, the processor 211 can evaluate the characteristics of each predicted distribution, such as how close its mean is to the target threshold voltage, the size of its standard deviation, etc. Finally, the processor 211 can select the parameter combination that can achieve the target threshold voltage in the shortest programming time, with the least overprogramming risk and the best distribution compactness to perform the actual programming operation. This model-based pre-simulation can improve the efficiency of programming operations and the initial quality of written data.
[0138] In another embodiment, the memory management operation is "predicting the dispersion of the programming result". During or immediately after a programming operation, the processor 211 can use the currently known programming height parameters and programming time parameters as the target storage parameter set, call the prediction model to generate a predicted threshold voltage distribution, and extract the predicted standard deviation from it. This predicted standard deviation directly reflects the dispersion of the data distribution after programming. If the processor 211 determines that the predicted standard deviation exceeds a preset quality threshold, it can be considered that the quality of this programming operation is poor. Accordingly, the processor 211 can immediately trigger a remedial measure, such as marking the entity page as a "weak" page and prioritizing its reorganization in subsequent garbage collection, or directly scheduling a data rewrite after the programming operation to ensure that all stored data meets reliability requirements.
[0139] Figure 10A , Figure 10B and Figure 10CThis is a detailed timing diagram of a prediction model acquisition and application method according to an embodiment of the present disclosure.
[0140] Reference Figure 10A The diagram illustrates a detailed timing diagram of the first stage of the prediction model acquisition method of this disclosure: "training data acquisition and establishment of the first mapping relationship". In this embodiment, the functions of the memory controller 210 can be divided into multiple functional modules to perform the tasks of the first stage, including the prediction control module 1010, the data acquisition module 1020, and the first mapping relationship generation module 1030 (the processor 211 can execute these program modules to implement the corresponding functions).
[0141] In steps S1011 and S1012, the prediction control module 1010 sets multiple sets of stored parameters for training. For example, eight sets of discrete programming height parameters (H, e.g., from 80 to 150) and 32 sets of discrete programming time parameters (T, e.g., from 0 to 31) can be set, thus forming a combination of 256 training stored parameter sets. These parameters are passed to the data acquisition module 1020 to guide it in data acquisition.
[0142] Next, the data acquisition module 1020 performs a loop of data acquisition and feature extraction for each training storage parameter set. In step S1013, to reduce process deviations caused by different physical locations, the data acquisition module 1020 selects word lines with the same location as programming targets in different storage blocks. In step S1014, the data acquisition module 1020 applies the training storage parameter set corresponding to the current loop to the selected word line and then scans the storage cells on that word line to obtain the training threshold voltage distribution under that parameter set. In step S1015, the data acquisition module 1020 calculates the obtained training threshold voltage distribution to extract its key statistical features, namely the mean μ and standard deviation σ.
[0143] After completing the data acquisition and calculation of all training stored parameter groups, in step S1016, the data acquisition module 1020 provides the complete training dataset containing all training stored parameter groups and their corresponding statistical features to the first mapping relationship generation module 1030.
[0144] Next, the first mapping relationship generation module 1030 establishes the mapping relationship based on the received dataset. In step S1017, this module establishes the first mapping relationship between the mean and the training stored parameter set, for example, by fitting formula (1). In step S1018, this module independently establishes the first mapping relationship between the standard deviation and the training stored parameter set, for example, by fitting formula (2). These two mapping relationships together constitute the first part of the prediction model.
[0145] Reference Figure 10B The diagram illustrates a detailed timeline of the second stage, "piecewise fitting and establishment of the second mapping relationship," in the prediction model acquisition method of this disclosure. This second stage is mainly completed collaboratively by the first mapping relationship generation module 1030 and the second mapping relationship generation module 1040.
[0146] The second stage process may begin at step S1021, in which the second mapping relationship generation module 1040 receives raw data of multiple training threshold voltage distributions from the data acquisition module 1020 and receives mean information corresponding to each distribution from the first mapping relationship generation module 1030 to assist in piecewise fitting.
[0147] Next, the second mapping generation module 1040 performs a loop feature extraction process for each of the multiple training threshold voltage distributions. In step S1022, the module transforms the currently processed training threshold voltage distribution to a standardized coordinate system. In a preferred embodiment, this coordinate system may be further logarithmically oriented to enhance the accuracy of subsequent fitting of the tail portion.
[0148] In step S1023, the second mapping relationship generation module 1040 divides the training threshold voltage distribution into at least two distribution segments based on the mean value, such as a first distribution segment and a second distribution segment with the mean value as the boundary.
[0149] Subsequently, in steps S1024 and S1025, the second mapping relationship generation module 1040 independently performs shape feature fitting on the two distribution segments respectively. For example, by fitting the data of the first distribution segment (e.g., using formula (3)), a first set of fitting parameters is obtained; and by independently fitting the data of the second distribution segment, a second set of fitting parameters is obtained. Since the fitting is independent, the parameters of the two sets of fitting parameters can be different, thereby adapting to the asymmetry of the actual threshold voltage distribution.
[0150] In one specific embodiment, the shape feature fitting process further includes: first, calculating the mean and standard deviation corresponding to the current training threshold voltage distribution; then, transforming the original data of the distribution to a standardized coordinate system, and then performing the fitting. The horizontal coordinate of the standardized coordinate system can be defined by (x - mean) / standard deviation, where x is the original threshold voltage value.
[0151] After completing the iterative processing of all training samples, in step S1026, the second mapping relationship generation module 1040 performs parameter mapping fitting (e.g., using formula (4)) based on the multiple sets of fitting parameter groups corresponding to all the acquired training samples, in order to establish a second mapping relationship between multiple training stored parameter groups and multiple sets of fitting parameter groups. Specifically, this step regards each fitting parameter (e.g., A_L, B_L, C_L, etc.) as a dependent variable and the corresponding stored parameter group (H, T) as an independent variable, and calculates the final model coefficients (i.e., the second mapping coefficients) used to describe the mathematical relationship between them through surface fitting.
[0152] Reference Figure 10C It shows a detailed timeline diagram of the third and fourth stages of predictive model building, namely "complete predictive model building" and "prediction and application".
[0153] In the third stage, in step S1031, the second mapping relationship generation module 1040 provides its established second mapping relationship, together with the first mapping relationship established by the first mapping relationship generation module 1030, to the prediction model 1050. In step S1032, the prediction model 1050 (e.g., a data structure managed by the processor 211 in the buffer memory 214) records the first mapping relationship and the second mapping relationship. The set of these two (e.g., by combining the model coefficients corresponding to formulas (1), (2), and (4)) together constitutes a complete prediction model that can be used for real-time prediction.
[0154] Next, in the fourth stage, the established prediction model can be used to predict the threshold voltage distribution in real time. This fourth stage begins in step S1041, where the prediction control module 1010 obtains a target stored parameter set and passes it to the prediction model 1050 to request prediction. Then, the prediction model 1050 (executed by the processor 211) performs a series of calculation steps. In step S1042, the processor 211 uses a first mapping relationship (e.g., formulas (1) and (2)) and calculates the prediction mean and prediction standard deviation based on the target stored parameter set. In parallel or serially, in step S1043, the processor 211 uses a second mapping relationship (e.g., formula (4)) and calculates a set of prediction fitting parameters based on the same target stored parameter set. Subsequently, in step S1044, the processor 211 generates the final predicted threshold voltage distribution based on the prediction mean, prediction standard deviation, and prediction fitting parameter set obtained in the preceding steps, using a mathematical model such as formula (3). Finally, in step S1045, the generated predicted threshold voltage distribution is returned to the prediction control module 1010 for subsequent memory management operations.
[0155] In summary, referring to Figures 10A to 10CThe complete process shown in this disclosure, through a structured, phased modeling method, yields a predictive model that closely reflects real-world conditions. First, through systematic analysis of a large amount of training data, this method establishes a first mapping relationship to describe the macroscopic statistical characteristics of the distribution and a second mapping relationship to characterize the microscopic asymmetric morphology of the distribution. Subsequently, in the application phase, the model can resolve any input target stored parameter set into a complete predicted threshold voltage distribution that reflects the true physical effects.
[0156] It is worth noting that although the above embodiments use two distribution segments as examples, this disclosure is not limited thereto. For example, in other embodiments, the number of distribution segments can be preset according to needs (but at least two distribution segments).
[0157] For example, in another embodiment, processor 211 is configured to divide the training threshold voltage distribution into three distribution segments to further improve the modeling accuracy of the distribution pattern. (See also...) Figure 4 Based on the principle of piecewise fitting, the processor 211 sets two dividing points according to the statistical characteristics of the training threshold voltage distribution, dividing the distribution into a first distribution segment, a second distribution segment, and a third distribution segment.
[0158] Specifically, processor 211 first calculates the mean μ and standard deviation σ of the training threshold voltage distribution. Then, processor 211 sets the first boundary point as μ-k1σ and the second boundary point as μ+k2σ, where k1 and k2 are preset boundary coefficients. The first distribution segment corresponds to the left-hand tail region where the threshold voltage is less than the first boundary point, the second distribution segment corresponds to the central main region between the two boundary points, and the third distribution segment corresponds to the right-hand region where the threshold voltage is greater than the second boundary point. In a normalized logarithmic coordinate system, these three segments exhibit different curve characteristics, reflecting the differences in their respective physical mechanisms.
[0159] Processor 211 performs shape feature fitting on the three distribution segments respectively. For the first distribution segment, processor 211 obtains a first set of fitting parameters (A_L, B_L, C_L); for the second distribution segment, processor 211 obtains a second set of fitting parameters (A_M, B_M, C_M); and for the third distribution segment, processor 211 obtains a third set of fitting parameters (A_R, B_R, C_R). These nine fitting parameters together describe the complete threshold voltage distribution shape. Similar to the two-segment division scheme, the three fitting curves are not forced to be continuous at the boundary points, allowing each segment to independently optimize its fitting parameters based on its data characteristics.
[0160] In establishing the second mapping relationship, processor 211 needs to process the mapping between nine fitted parameters and the training stored parameter set. Processor 211 performs parameter mapping fitting for each fitted parameter, using a second-order multivariate polynomial function to establish its relationship with the programmed height parameter H and the programmed time parameter T. By performing regression analysis on the nine sets of fitted parameters for all training samples, processor 211 obtains 54 second mapping coefficients (9 parameters × 6 coefficients / parameter).
[0161] In one embodiment, the values of the boundary coefficients k1 and k2 can be adjusted according to the memory type. For single-level cell (SLC) memory, k1 can be set to 0.8 and k2 can be set to 0.8; for multi-level cell (MLC) or three-level cell (TLC) memory, since their threshold voltage window is narrower, k1 and k2 can be reduced to 0.5 accordingly to ensure that the central segment contains enough data points for fitting.
[0162] When processor 211 needs to generate the predicted threshold voltage distribution, it first uses a first mapping relationship to calculate the predicted mean and predicted standard deviation, thereby determining the positions of the two predicted boundary points. Next, processor 211 uses a second mapping relationship to calculate nine prediction fitting parameters. Based on these parameters, processor 211 constructs corresponding fitting curves for the three distribution segments, ultimately combining them to form a complete predicted threshold voltage distribution.
[0163] By dividing the data into three segments, the processor 211 independently fits the central main segment, the left tail segment, and the right segment, better adapting to the asymmetric characteristics of the threshold voltage distribution. This segmented refinement strategy allows the processor 211 to provide a more accurate prediction basis for different memory management operations. Particularly during soft decoding, the high-precision modeling of the central segment directly improves the accuracy of the log-likelihood ratio calculation. For example, for MLC or TLC memory modules and above, a three-segment or more segmentation scheme can be used to further improve modeling accuracy. Furthermore, the parametric design of the prediction model allows it to adapt to changes in device characteristics at different process nodes or manufacturing batches through simple coefficient updates, without requiring a complete redesign of the modeling framework.
[0164] It should be understood that the aforementioned 8 sets of programming height parameters and 32 sets of programming time parameters (a total of 256 training storage parameter sets) are merely an exemplary embodiment of this disclosure, intended to illustrate the feasibility of this disclosure, and not to limit the scope of protection of this disclosure in any way. Those skilled in the art can flexibly select the number and distribution of training storage parameter sets according to actual needs, the characteristics of the memory module, and the requirements for model accuracy. For example, in application scenarios with higher requirements for model accuracy, more combinations of programming height parameters and programming time parameters (e.g., 16x64 sets) can be selected to obtain richer training data; while in scenarios with higher requirements for model building speed, the number of samples can be appropriately reduced (e.g., 5x10 sets), as long as the selected sample points can sufficiently cover the target operating range and reflect the main changing trend of the threshold voltage distribution.
[0165] On the other hand, in other embodiments, the storage parameter set is not limited to the programming height parameter and the storage programming time parameter. To further improve the accuracy of the prediction model, the storage parameter set can be expanded to include more physical state dimensions. Specifically, in addition to the programming height parameter and the programming time parameter, the training storage parameter set and the target storage parameter set may also include word line position indicators and / or erase / programming cycle count values.
[0166] Word line position indicators are used to characterize the relative physical location of the word line containing the memory cell within a memory block (e.g., distinguished as "edge word line" or "middle word line"), in order to model differences in physical characteristics caused by edge effects of manufacturing processes. Erase / program cycle count values directly quantify the physical wear or aging degree accumulated by the memory cell due to repeated use.
[0167] In this embodiment, the process of obtaining the predictive model will involve collecting training data under broader conditions, such as performing scans on memory blocks with different aging levels (different P / E cycles) and at different word line positions on these blocks, respectively, for different combinations of programming height and programming time parameters. The resulting first and second mapping relationships will be higher-dimensional mathematical models that can respond to more complete state inputs, including word line positions and P / E cycles.
[0168] When performing prediction, processor 211 can construct a high-dimensional target memory parameter set based on the specific word line location of the target data and the current P / E cycle of its memory block, along with the target programming height and time. By calling this more refined prediction model, processor 211 can generate a predicted threshold voltage distribution that highly matches the actual physical state of the target memory cell, thereby enabling subsequent memory management operations (such as optimizing programming operation parameters, predicting the dispersion of programming results, optimizing the readback voltage for programming verification, and providing channel information of the programming state for the soft-decision decoding process) to achieve greater accuracy.
[0169] This embodiment also provides a computer program product, including computer-readable code or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is executed in a processor, the processor performs the steps of the memory management method described above. This computer program product can be implemented specifically through hardware, firmware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied as a computer storage medium; in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0170] In summary, the memory management method provided in this disclosure solves the problem that traditional models cannot accurately fit asymmetric threshold voltage distributions by establishing a prediction model composed of a first mapping relationship and a second mapping relationship. This method, through modeling the mean and standard deviation, combined with independent piecewise fitting on both sides of the distribution, achieves a determination coefficient R² of 0.9466 for the overall shape of the predicted threshold voltage distribution and an R² of 0.9274 for the tail portion, representing improvements of approximately 3.2% and 23.7% respectively compared to the traditional Gaussian method.
[0171] Based on this prediction model, the memory controller can perform memory management operations such as optimizing programming operation parameters, predicting the dispersion of programming results, optimizing the readback voltage for programming verification, and providing channel information of programming status for the soft-decision decoding process.
[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and not to limit them; although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.
Claims
1. A memory management method applied to a memory controller, the memory controller being used to control a storage device configured with a memory module, the memory module comprising a plurality of memory cells, characterized in that, The method includes: A first mapping relationship is established based on the statistical characteristics of each training threshold voltage distribution and the corresponding training storage parameter group; A second mapping relationship is established based on each training storage parameter group and its corresponding fitting parameter group, wherein the fitting parameter group is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training storage parameter group with shape features; Based on the first mapping relationship and the second mapping relationship, a prediction model is constructed; Obtain the target storage parameter group; The prediction model generates a predicted threshold voltage distribution corresponding to the target storage parameter set; and Based on the predicted threshold voltage distribution, at least one memory management operation is performed on the plurality of memory cells.
2. The memory management method according to claim 1, characterized in that, The training storage parameter set and the target storage parameter set include: The programming height parameter corresponds to the intensity of the programming operation performed on the plurality of memory cells; and Programming time parameters, which are an evolutionary stage in the programming operation process.
3. The memory management method according to claim 1, characterized in that, The statistical features are the mean and standard deviation of the training threshold voltage distribution.
4. The memory management method according to claim 3, characterized in that, The method for constructing a prediction model based on the first mapping relationship and the second mapping relationship includes: Establish a first mapping relationship between the mean and standard deviation of the training threshold voltage distribution and the corresponding training storage parameter set, wherein the first mapping relationship includes a combination of exponential function terms and polynomial terms; For each of the plurality of training threshold voltage distributions, Based on the mean of the training threshold voltage distribution, the training threshold voltage distribution is divided into at least two distribution segments, wherein the at least two distribution segments include: a first distribution segment and a second distribution segment bounded by the mean; and The shape features are fitted to each of the at least two distribution segments to obtain a set of fitting parameters characterizing the distribution curves corresponding to the at least two distribution segments; and Based on multiple sets of fitting parameter sets, a second mapping relationship is established between multiple sets of training and storage parameter sets and the multiple sets of fitting parameter sets.
5. The memory management method according to claim 4, characterized in that, The step of generating the predicted threshold voltage distribution corresponding to the target storage parameter set through the prediction model includes: Using the first mapping relationship, the predicted mean and predicted standard deviation are calculated based on the target storage parameter set; Using the second mapping relationship, a set of prediction fitting parameters is calculated based on the target stored parameter set; and The predicted threshold voltage distribution is generated based on the predicted mean, the predicted standard deviation, and the predicted fitting parameter set.
6. The memory management method according to claim 4, characterized in that, The shape feature fitting also includes: Calculate the mean and standard deviation corresponding to the training threshold voltage distribution; and The training threshold voltage distribution is transformed to a standardized coordinate system for shape feature fitting.
7. The memory management method according to claim 4, characterized in that, The second mapping relationship is established by performing parameter mapping fitting on multiple sets of the fitting parameter groups, wherein the parameter mapping fitting adopts a second-order multivariate polynomial function.
8. The memory management method according to claim 6, characterized in that, The standardized coordinate system is set as a logarithmic coordinate system to increase the fitting weight of the tail portion in the training threshold voltage distribution.
9. The memory management method according to claim 4, characterized in that, The method for fitting the shape features of each of the at least two distribution segments includes: The shape feature fitting is performed using a first segment function corresponding to the first distribution segment and a second segment function corresponding to the second distribution segment, respectively. The shape feature fitting uses a second-order polynomial function, and the curves of the first segment function and the second segment function are not forced to be continuous at the mean.
10. The memory management method according to claim 2, characterized in that, The acquisition of the multiple training storage parameter sets includes: Selecting multiple word lines at the same location in different memory blocks of the memory module; and Different combinations of programming height and programming time parameters are applied to the multiple word lines respectively. To obtain the distribution of the multiple training threshold voltages.
11. The memory management method according to claim 1, characterized in that, The at least one memory management operation includes at least one of the following: Optimize programming operation parameters; Predict the dispersion of programming results; Optimize the readback voltage for programming verification; and Provides channel information for the programming state of the soft-decision decoding process.
12. A memory controller for controlling a storage device configured with a memory module, the memory module comprising a plurality of memory cells, characterized in that, The memory controller includes: A memory interface control circuit, for electrically connecting to the memory module; and A processor, electrically connected to the memory interface control circuit, wherein the processor is configured to: A first mapping relationship is established based on the statistical characteristics of each training threshold voltage distribution and the corresponding training storage parameter group; A second mapping relationship is established based on each training storage parameter group and its corresponding fitting parameter group, wherein the fitting parameter group is obtained by segmenting and fitting the training threshold voltage distribution corresponding to the training storage parameter group with shape features; Based on the first mapping relationship and the second mapping relationship, a prediction model is constructed; Obtain the target storage parameter group; The prediction model generates a predicted threshold voltage distribution corresponding to the target storage parameter set; and Based on the predicted threshold voltage distribution, at least one memory management operation is performed on the plurality of memory cells.
13. The memory controller according to claim 12, characterized in that, The training storage parameter set and the target storage parameter set include: The programming height parameter corresponds to the intensity of the programming operation performed on the plurality of memory cells; and Programming time parameters, which are an evolutionary stage in the programming operation process.
14. The memory controller according to claim 12, characterized in that, The statistical features are the mean and standard deviation of the training threshold voltage distribution.
15. The memory controller according to claim 14, characterized in that, The processor is also configured to: Establish a first mapping relationship between the mean and standard deviation of the training threshold voltage distribution and the corresponding training storage parameter set, wherein the first mapping relationship includes a combination of exponential function terms and polynomial terms; For each of the plurality of training threshold voltage distributions, Based on the mean of the training threshold voltage distribution, the training threshold voltage distribution is divided into at least two distribution segments, wherein the at least two distribution segments include: a first distribution segment and a second distribution segment bounded by the mean; and The shape features are fitted to each of the at least two distribution segments to obtain a set of fitting parameters characterizing the distribution curves corresponding to the at least two distribution segments; and Based on multiple sets of fitting parameter sets, a second mapping relationship is established between multiple sets of training and storage parameter sets and the multiple sets of fitting parameter sets.
16. The memory controller according to claim 15, characterized in that, In the operation of generating the predicted threshold voltage distribution corresponding to the target storage parameter set through the predicted model, the processor is configured to: Using the first mapping relationship, the predicted mean and predicted standard deviation are calculated based on the target storage parameter set; Using the second mapping relationship, a set of prediction fitting parameters is calculated based on the target storage parameter set; as well as The predicted threshold voltage distribution is generated based on the predicted mean, the predicted standard deviation, and the predicted fitting parameter set.
17. The memory controller according to claim 15, characterized in that, In performing the shape feature fitting operation, the processor is also configured to... Calculate the mean and standard deviation corresponding to the training threshold voltage distribution; and The training threshold voltage distribution is transformed to a standardized coordinate system for shape feature fitting.
18. The memory controller according to claim 15, characterized in that, The processor is also configured to establish the second mapping relationship by performing parameter mapping fitting on multiple sets of the fitting parameter sets, wherein the parameter mapping fitting employs a second-order multivariate polynomial function.
19. The memory controller according to claim 17, characterized in that, The standardized coordinate system is set as a logarithmic coordinate system to increase the fitting weight of the tail portion in the training threshold voltage distribution.
20. The memory controller according to claim 15, characterized in that, In the operation of fitting the shape features to the at least two distribution segments respectively, the processor is further configured to: The shape feature fitting is performed using a first segment function corresponding to the first distribution segment and a second segment function corresponding to the second distribution segment, respectively. The shape feature fitting uses a second-order polynomial function, and the curves of the first segment function represented by the first segment function and the second segment function represented by the second segment function are not forced to be continuous at the mean.
21. The memory controller according to claim 13, characterized in that, The processor is further configured to acquire the plurality of training storage parameter sets by: Selecting multiple word lines at the same location in different memory blocks of the memory module; and Different combinations of programming height and programming time parameters are applied to the multiple word lines to obtain the multiple training threshold voltage distributions.
22. The memory controller according to claim 12, characterized in that, The at least one memory management operation includes at least one of the following: Optimize programming operation parameters; Predict the dispersion of programming results; Optimize the readback voltage for programming verification; and Provides channel information for the programming state of the soft-decision decoding process.