A method for determining access parameters when reading and writing memory based on a main controller

By constructing fitness function and genetic algorithm to optimize access parameters of Nand Flash memory, the problem that access parameters cannot adapt to dynamic environment changes is solved, and the accuracy and stability of data acquisition are improved.

CN120196289BActive Publication Date: 2025-08-26LEIZHISHU SYST TECH (XIAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510676904.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-26
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

In the prior art, the access parameter setting of Nand Flash memory relies on manual experience or fixed rules, and cannot adapt to changes in the dynamic environment, resulting in high read error rate and low data acquisition accuracy.

Method used

By constructing a fitness function, combining the performance indicators and environmental parameters of the memory, the access parameters are optimized, including time and voltage parameters, and the optimization is carried out, and the access parameters are dynamically adjusted to adapt to different environments.

Benefits of technology

It improves the accuracy of the master controller's slave memory sampling data, reduces the read error rate and write unsuccessful rate, improves signal stability, and adapts to dynamic environment changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196289B_ABST
    Figure CN120196289B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for determining access parameters when a main controller reads and writes to a memory, relating to the technical field of electronic device storage. A fitness function is constructed based on the memory's performance indicators and environmental parameters. In response to an access parameter optimization request, the access parameters are optimized with the maximum fitness function value as the goal, and the access parameter value that meets preset convergence conditions is determined as the target access parameter value. The fitness function value is obtained by the main controller performing read and write tests on the memory based on the optimized access parameters each time. The target access parameter value is used as the access parameter value when the main controller performs read and write operations on the memory. This method can find the optimal access parameters, thereby improving the accuracy of the main controller sampling data from the memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic device storage technology, and in particular to a method for determining access parameters when a main controller reads and writes to a memory. Background Art

[0002] Nand Flash memory, a core component of non-volatile storage technology, is widely used in solid-state storage devices. Its data acquisition process relies on the coordinated hardware and software between the host controller and the Nand Flash memory, requiring specific timing and voltage parameters to complete data reading and writing.

[0003] However, the setting of access parameters in the existing technology usually relies on manual experience or fixed rules. However, since the electrical characteristics of NandFlash memory are easily affected by temperature, electromagnetic interference and voltage fluctuations, fixed parameters are difficult to adapt to dynamic environmental changes, resulting in increased read error rates. In addition, due to differences in manufacturing processes, the optimal access parameters of NandFlash memories from different manufacturers vary significantly. Traditional methods cannot adapt quickly, resulting in low data collection accuracy.

[0004] Therefore, there is an urgent need in the prior art for a method that can dynamically optimize access parameters of a main controller when reading and writing to a memory, so as to improve the accuracy of data sampling by the main controller from the memory. Summary of the Invention

[0005] Based on this, it is necessary to provide a method for determining access parameters when the main controller reads and writes to the memory to address the above technical problems. This method can find the optimal access parameters, thereby improving the accuracy of the main controller sampling data from the memory.

[0006] The present invention adopts the following technical solutions:

[0007] The present invention provides a method for determining access parameters when a main controller reads and writes to a memory, comprising:

[0008] Construct a fitness function based on the performance indicators of the memory and environmental parameters;

[0009] In response to an access parameter optimization request, the access parameter is optimized with the maximum fitness function value as the goal, and the access parameter value that meets the preset convergence condition is determined as the target access parameter value; the fitness function value is obtained by the main controller based on the performance index value and environmental parameter value obtained by performing a read and write test on the memory according to the access parameter optimized each time;

[0010] The target access parameter value is used as the access parameter value when the host controller performs read and write operations on the memory.

[0011] Optionally, the performance indicators include a read error rate, a write failure rate, and signal stability.

[0012] Optionally, the environmental parameters include temperature; the fitness function F for:

[0013] ;

[0014] ;

[0015] in, Indicates the read error rate, Indicates the write failure rate. Indicates signal stability, are weight coefficients, represents the temperature compensation factor, represents the temperature sensitivity coefficient, T Indicates temperature, Indicates the reference temperature.

[0016] Optionally, optimizing the access parameter with the goal of maximizing the fitness function value and determining the access parameter value that meets a preset convergence condition as the target access parameter value includes:

[0017] Get the initial access parameter value;

[0018] Binary-encode the initial access parameter value to obtain a binary access parameter value;

[0019] Taking the maximum value of the fitness function as the goal, the binary access parameter value is iteratively updated through the genetic algorithm, and the binary access parameter value that meets the preset convergence condition is determined as the target binary access parameter value;

[0020] The target binary access parameter value is decoded, and the decoded access parameter value is environmentally compensated to obtain the target access parameter value.

[0021] Optionally, the access parameter includes a time parameter and a voltage parameter, and the time parameter and the voltage parameter of the memory are independently encoded; the initial access parameter value is binary-encoded to obtain a binary access parameter value, including:

[0022] Binary encoding is performed on the initial time parameter value and the initial voltage parameter value to obtain a binary time parameter value and a binary voltage parameter value;

[0023] The binary time parameter value and the binary voltage parameter value are combined to obtain a binary access parameter value.

[0024] Optionally, performing environmental compensation on the decoded access parameter value to obtain a target access parameter value includes:

[0025] Get the temperature and voltage ripple in the current environment;

[0026] Determining a temperature compensation factor according to the temperature and the reference temperature, and determining a voltage compensation factor according to the voltage ripple and the voltage ripple weight coefficient;

[0027] The product of the temperature compensation factor and the decoded time parameter value is determined as the target time, and the product of the voltage compensation factor and the decoded voltage parameter value is determined as the target voltage.

[0028] Optionally, the voltage compensation factor is calculated as:

[0029] ;

[0030] in, represents the voltage compensation factor, represents the voltage ripple weight coefficient, Indicates voltage ripple.

[0031] Optionally, the method further includes:

[0032] In the process of optimizing the access parameters, the corresponding fitness function values ​​are calculated in parallel through the field programmable gate array FPGA.

[0033] The present invention provides a device for determining access parameters when a main controller reads and writes to a memory, comprising:

[0034] A building module, used to build a fitness function based on the performance indicators of the memory and environmental parameters;

[0035] An optimization module is used to respond to access parameter optimization requests, optimize the access parameters with the goal of maximizing the fitness function value, and determine the access parameter value that meets the preset convergence conditions as the target access parameter value; the fitness function value is obtained by the main controller based on the performance index value and environmental parameter value obtained by performing read and write tests on the memory according to the access parameters optimized each time; the target access parameter value is used as the access parameter value when the main controller performs read and write operations on the memory.

[0036] The present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for determining access parameters when a main controller reads and writes to a memory is implemented.

[0037] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for determining access parameters when a main controller reads and writes the memory is implemented.

[0038] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:

[0039] The performance indicators of the main controller when reading and writing data from the memory can quantify the performance of the main controller when reading and writing data to the memory. In actual applications, environmental factors such as temperature, humidity, and electromagnetic interference may affect the sampling process and, in turn, system performance. Therefore, incorporating performance indicators and environmental factors into the evaluation system and constructing a fitness function based on the memory's performance indicators and environmental parameters can make the fitness function more comprehensive and accurate in reflecting the comprehensive performance of the access parameters in the actual environment. In this way, various practical factors can be taken into account during the optimization process to find the optimal access parameters, thereby improving the accuracy of the main controller's sampling of data from the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0041] Figure 1 A flow chart of a method for determining access parameters when a main controller reads and writes to a memory provided by the present invention;

[0042] Figure 2 A schematic diagram of a flow chart of a genetic algorithm provided by the present invention;

[0043] Figure 3 A schematic diagram of a computer device provided by the present invention that implements a method for determining access parameters when a main controller reads and writes to a memory. DETAILED DESCRIPTION

[0044] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] The technical solutions provided by various embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] Figure 1 The present invention is a flowchart of a method for determining access parameters when a main controller reads and writes to a memory, which specifically includes the following steps:

[0047] S101: Construct a fitness function based on the performance indicators and environmental parameters of the memory.

[0048] The memory may be a Nand Flash memory.

[0049] Optionally, the performance indicators include read error rate, write failure rate, and signal stability;

[0050] Construct the initial fitness function based on the performance index, the initial fitness function F for:

[0051] (1);

[0052] in, represents the read error rate, Indicates the write failure rate. Indicates signal stability, are all weight coefficients.

[0053] Nand Flash memory performance must be compatible with both read reliability and write efficiency. Linearly weighted addition of these indicators balances these objectives within a unified metric, making normalization easier. It reflects the comprehensive performance of the parameter combination in "reading", "writing" and "signal stability".

[0054] High temperature may cause the transistor leakage current of the memory to increase and the timing parameters to shift. Therefore, the environmental parameters can be introduced into the initial fitness function to obtain the fitness function.

[0055] Optionally, the environmental parameters include temperature; the fitness function F for:

[0056] (2);

[0057] (3);

[0058] in, represents the temperature compensation factor, represents the temperature sensitivity coefficient, , T Indicates temperature, Indicates the reference temperature (can be 25°C). It can be determined according to actual needs, for example, . Weight coefficient The linkage adjustment should meet the requirements of multi-objective balance, environmental coupling effect, dynamic priority allocation, and weight constraint mechanism.

[0059] S102, in response to the access parameter optimization request, the access parameters are optimized with the maximum fitness function value as the goal, and the access parameter value that meets the preset convergence condition is determined as the target access parameter value; the target access parameter value is used as the access parameter value when the main controller performs read and write operations on the memory; the fitness function value is obtained by the main controller performing read and write tests on the memory according to the performance index value and environmental parameter value.

[0060] For newly produced memory, an access parameter optimization request is sent to the server, an access parameter optimization process is executed, a target access parameter value is determined, and the target access parameter value is determined as the access parameter value when the main controller reads and writes the memory.

[0061] Alternatively, during the use of the memory, if the read error rate or write failure rate of the memory is greater than a preset threshold, an access parameter optimization request is sent to the server, an access parameter optimization process is executed, a target access parameter value is determined, and the target access parameter value is determined as the access parameter value when the main controller reads and writes the memory.

[0062] In one embodiment, with the goal of maximizing the fitness function value, the access parameter is optimized, and the access parameter value that meets the preset convergence condition is determined as the target access parameter, including: obtaining an initial access parameter value; binary-encoding the initial access parameter value to obtain a binary access parameter value; with the goal of maximizing the fitness function value, iteratively updating the binary access parameter value through a genetic algorithm, and determining the binary access parameter value that meets the preset convergence condition as the target binary access parameter value; decoding the target binary access parameter value, and performing environmental compensation on the decoded access parameter value to obtain the target access parameter value.

[0063] Among them, the main controller's access parameters to the memory include time parameters and voltage parameters. As the core component of non-volatile storage technology, the performance of Nand Flash memory directly depends on the precise configuration of the time parameters and voltage parameters of the sampling point. These parameters determine the timing accuracy and signal stability of data reading and writing. Time parameters usually include signal setup time ( tSU ), signal holding time (tHD ), access time ( tACC ), reserve charging time ( tPRE ), programming time ( tPROG ) and timing jitter ( Jitter ), etc. Voltage parameters usually include reading voltage ( ), programming voltage ( ) and pass voltage ( ).

[0064] The initial access parameter values ​​of the main controller to the memory, ie, the initial time parameter value and the initial voltage parameter value, may be determined in a randomized manner.

[0065] The time parameters and voltage parameters of the memory are independently encoded; the initial access parameter value is binary-encoded to obtain a binary access parameter value, including: binary-encoding the initial time parameter value and the initial voltage parameter value respectively to obtain a binary time parameter value and a binary voltage parameter value; and combining the binary time parameter value and the binary voltage parameter value to obtain a binary access parameter value.

[0066] Specifically, the initial time parameter value and the initial voltage parameter value are encoded as binary chromosomes respectively. For example, if the time range is (10~100ns), voltage range (1.8~3.3V), each parameter is converted into a binary string according to the accuracy requirement (such as time step 1ns, voltage step 0.1V), and the specific encoding method is shown in formulas (4)-(6).

[0067] (4);

[0068] (5);

[0069] in, Represents a binary time parameter value, Indicates the minimum value of the time parameter, t Indicates the actual value of the time parameter; Represents the binary voltage parameter value, Indicates the actual value of the voltage parameter, Indicates the minimum value of the voltage parameter, Represents the floor function and converts its value to binary.

[0070] Formulas (4) and (5) can be used to binary encode the initial time parameter value and the initial voltage parameter value respectively to obtain a binary time parameter value and a binary voltage parameter value.

[0071] The time parameter and voltage parameter are encoded independently to avoid coupling interference between parameters. For example, the time parameter uses 6 bits of binary (covering 10~100ns), the voltage parameter uses 4 bits of binary (covering 3.0~5.0V), and the total chromosome length is 10 bits. The binary access parameter value can have multiple values, which is determined by the pre-set population size of the genetic algorithm. Each binary access parameter value is a binary string. n The digits represent the time parameter, followed by m Bits represent voltage parameters, and the length of the binary string is m + n .

[0072] The binary access parameter is used as the initial population of the genetic algorithm. The population size can be set according to demand. The initial access parameter value is determined according to the population size, and then the binary access parameter value is obtained; then, with the maximum fitness function value as the goal, the binary access parameter is optimized through the genetic algorithm, and the binary access parameter value that meets the preset convergence condition is determined as the target binary access parameter value. The specific steps include: setting the maximum number of iterations (such as 100), crossover probability (0.8), mutation probability (0.05) and parameter range; performing memory (Nand Flash) read and write tests on each individual (binary access parameter value), calculating its fitness function value, and arranging it in descending order, and then performing genetic (selection, crossover and mutation) operations to generate a new generation of population until the convergence condition is met, and the binary access parameter value that meets the preset convergence condition is determined as the target binary access parameter value.

[0073] The convergence condition is: the fitness function value of the best individual changes less than the change threshold (such as 1%) for 10 consecutive generations, or the maximum number of iterations is reached, or the error rate is lower than the threshold (such as ), the optimization is terminated.

[0074] Specifically, the selection operation includes: adopting a tournament selection strategy to select the top 10% of individuals in fitness from the population as elites, and the rest are selected through roulette wheel selection to ensure the transmission of excellent genes.

[0075] The crossover operation involves performing a single-point crossover on the selected parent individuals, exchanging chromosome segments. For example, parent chromosomes 001101|1100 and 110010|0011 are crossed at the delimiter to generate offspring 001101|0011 and 110010|1100, allowing for the exploration of optimal parameter combinations.

[0076] Mutation operations include: randomly flipping a chromosome bit with a probability of 5% (such as changing "0" to "1"), or randomly perturbing the voltage parameter range (such as ±0.2 V) to prevent the algorithm from falling into local optimality.

[0077] Decode the target binary access parameter value into target time and target voltage. The calculation formula for time decoding is:

[0078] (6);

[0079] in, is the decoded time parameter value, is the minimum value of the time parameter, is the target binary time parameter value, is the time step, fixed at 1ns.

[0080] The calculation formula for voltage decoding is:

[0081] (7);

[0082] in, is the decoded voltage parameter value, is the minimum value of the time parameter, is the target binary voltage parameter value, is the voltage step size, fixed at 0.1V.

[0083] Optionally, the decoded access parameter value is subjected to environmental compensation to obtain a target access parameter value, including: obtaining the temperature and voltage ripple in the current environment; determining a temperature compensation factor based on the temperature and a reference temperature, and determining a voltage compensation factor based on the voltage ripple and a voltage ripple weight coefficient; determining the target time as the product of the temperature compensation factor and the decoded time parameter value, and determining the target voltage as the product of the voltage compensation factor and the decoded voltage parameter value.

[0084] High temperatures can increase transistor leakage current and shift timing parameters (tPROG, tPRE). Voltage ripple can cause signal level instability and increase timing jitter. Therefore, temperature and voltage compensation factors are introduced.

[0085] The temperature compensation factor can be calculated according to formula (3), and the voltage compensation factor is calculated as follows:

[0086] (8);

[0087] in, represents the voltage compensation factor, represents the voltage ripple weight coefficient, =0.1, Indicates voltage ripple.

[0088] The temperature sensor and voltage detection module can obtain environmental parameters (such as temperature) in real time. , voltage ripple ), dynamic calculation of compensation factor , and correct the decoded access parameter value, such as:

[0089] (9);

[0090] (10);

[0091] in, is the target time, is the target voltage.

[0092] Optionally, during the optimization of memory access parameters, the corresponding fitness function values ​​are calculated in parallel using a field-programmable gate array (FPGA). Leveraging the FPGA's parallel computing capabilities, the fitness evaluation process can be hardware-accelerated, shortening the time required for a single iteration. Tests have shown that hardware acceleration improves algorithm efficiency by approximately 40%.

[0093] In one embodiment, a temperature sensor and voltage monitoring module collect environmental data in real time and dynamically adjust the parameter search range. For example, in high-temperature environments, the voltage range can be automatically narrowed (e.g., 1.8-3.3V) to reduce the risk of transistor leakage.

[0094] In one embodiment, the electrical signals of Nand Flash (such as ALE signal level and I / O port timing) are collected in real time through the hardware interface layer and fed back to the algorithm layer. If environmental changes are detected (such as temperature increase causing voltage drift), the process of determining the access parameters when reading and writing the memory based on the main controller is triggered, the compensation factor in the fitness function is updated, and the population is regenerated.

[0095] After obtaining the target time and target voltage (e.g., target time 35ns, target voltage 2V), and storing them in the local database, the parameters are synchronized to the main controller through the hardware interface, updating the Nand Flash driver configuration to achieve real-time optimization.

[0096] In a specific embodiment, this embodiment uses a certain model of Nand Flash chip (model: YMTC-128G) as the test object. To address the problem of increased data read error rate in a high temperature environment (85°C), the method provided by the present invention for determining access parameters when reading and writing memory based on the main controller is adopted to dynamically adjust the time and voltage parameters of the sampling point to verify the effectiveness and environmental adaptability of the method.

[0097] (1) Hardware and software configuration

[0098] Nand Flash memory: YMTC-128G (storage capacity 128GB, page size 16KB, block size 2MB).

[0099] Main control chip: ARM Cortex-A53 processor with integrated Nand Flash controller.

[0100] Test platform:

[0101] Temperature control module: can adjust the ambient temperature (-20°C~100°C).

[0102] Voltage disturbance generator: simulates power supply ripple (fluctuation range ±5%).

[0103] Data acquisition card: records the I / O signal timing and level of Nand Flash in real time.

[0104] (2) Parameter settings

[0105] Genetic algorithm parameters: Population size: 50 individuals, maximum number of iterations: 100, crossover probability: 0.8, mutation probability: 0.05. Sampling time range: 10–100 ns. Sampling voltage range: 1.5–3.3 V.

[0106] Encoding method:

[0107] 1. Time parameter: 6-bit binary code, covering 10~100 ns (step size 1 ns).

[0108] 2. Voltage parameter: 4-bit binary code, covering 1.5~3.3 V (step size 0.1 V).

[0109] 3. Total chromosome length: 10 bits.

[0110] (3) Optimization process, which combines the core steps of the genetic algorithm with the hardware characteristics of Nand Flash and describes in detail the complete process from parameter initialization to final optimization, such as Figure 2 As shown, the details are as follows:

[0111] 1. Initialization phase: Startup process: Start the algorithm and set global parameters. Parameter settings include setting NandFlash initialization access parameters and setting the genetic generation counter: Gem = 0 (records the current number of iterations, with a maximum value of 100).

[0112] Access parameter encoding: Time parameters (10-100 ns) are encoded using 6-bit binary code with a step size of 1 ns. For example, a time of 50 ns is encoded as 00110010. Voltage parameters (1.5-3.3 V) are encoded using 4-bit binary code with a step size of 0.1 V. For example, a voltage of 2.8 V is encoded as 10101100. The total chromosome length is 10 bits (6 bits for time + 4 bits for voltage).

[0113] Initial population generation: 50 individuals are randomly generated, each of which is a binary combination of time-voltage parameters.

[0114] 2. Convergence judgment

[0115] Condition 1: The optimal fitness function value changes by less than 1% for 10 consecutive generations (convergence stability).

[0116] Condition 2: Reach the maximum number of iterations ( Gem = 100).

[0117] Condition 3: The data read error rate is lower than the preset threshold (such as ).

[0118] If any of the conditions are met (Y): output the current optimal parameter combination and end the process. If not met (N): enter the fitness evaluation stage.

[0119] 3. Fitness evaluation

[0120] Hardware testing and data acquisition: Parameter decoding is performed on each individual, and then the decoded access parameter values ​​are environmentally compensated to obtain the target voltage and target time.

[0121] Driver configuration: Set the target time through the hardware interface and target voltage Write to the Nand Flash controller to ensure that the parameters match the current environment.

[0122] Multi-index performance testing: read error rate, write failure rate, and signal stability.

[0123] Read error rate: Send a read command sequence to continuously read 10,000 pages of data. Count the number of uncorrectable bit errors based on ECC (error correction code) checksums to calculate the read error rate:

[0124] (11).

[0125] Write failure rate: Execute programming operations to write random data to a specified block, verify the integrity of the written data through readback, and count the percentage of pages that were unsuccessfully written, i.e., the write failure rate. .

[0126] (12).

[0127] Signal stability: Use a high-speed data acquisition card to capture I / O signal timing and analyze timing jitter ( Jiteer ) as the signal stability.

[0128] Real-time fitness calculation: Combining the environmental compensation factor and the test results, the fitness function value is dynamically calculated using formula (2).

[0129] 4. The process of genetic operation cycle is as follows:

[0130]

[0131] Population reset: When i = M When , all operations of the current generation are completed, a new generation of population is generated, and convergence judgment is performed.

[0132] 5. Environmental feedback mechanism: real-time monitoring and dynamic parameter adjustment.

[0133] The core of the environmental feedback mechanism lies in real-time monitoring of dynamically changing environmental parameters (such as temperature and voltage ripple) and dynamically coupling them with memory performance indicators (read error rate, write failure rate, and signal stability). This allows adaptive adjustment of the fitness function's weight coefficients, compensation factors, and parameter search range, ensuring that the optimization process always targets the local optimum for the current environment. The following lists some common physical characteristics encountered during Nand Flash usage.

[0134] The impact of temperature on Nand Flash memory mainly includes threshold voltage drift and timing parameter offset. High temperatures (e.g., >60°C) increase the probability of voltage drift, causing thermal excitation effects in semiconductors, leading to electrons in the floating structure of the memory cell escaping through the oxide layer (leakage), affecting the read error rate. Temperature changes can also cause Nand Flash timing parameter offset. At high temperatures, transistor switching speeds slow down, and signal settling time ( ), hold time ( ) and other key timing parameters deviate from the standard value. The deviation of timing parameters will lead to the stability of signal edges. decline.

[0135] The impact of voltage ripple on Nand memory mainly includes signal level fluctuation and decreased programming / erase efficiency. ) will be coupled to the I / O interface and internal circuit of the memory chip through the power distribution, causing instantaneous fluctuations in the power supply voltage. This may cause the rise / fall time of the signal edge to be unstable due to power fluctuations, directly affecting the signal stability. At the same time, voltage offset may cause misjudgment of the state of the storage unit, affecting The programming / erasing of NAND Flash memory cells is caused by high voltage injection or extraction of floating electrons. Voltage ripple will cause the charge injection amount to deviate from the expected value. Insufficient charge injection may cause programming failure and affect .

[0136] Based on the physical characteristics of Nand Flash in different environments, we adopt a physical model-driven fusion dynamic programming adjustment approach. We use the physical impact of voltage and temperature on memory performance to adjust the fitness function in real time using predefined rules. (The feedback function can be adjusted based on the characteristics of interest in different usage scenarios.)

[0137] If the voltage ripple fluctuates , taking the voltage fluctuation threshold as the priority object, the following formula is used to update the weight coefficient:

[0138] (13);

[0139] (14);

[0140] (15);

[0141] in, is the difference between the voltage ripple collected at the current moment and the voltage ripple collected at the previous moment, are the updated weight coefficients respectively, and the updated weight coefficients can be used to solve the fitness function value.

[0142] If the voltage ripple fluctuates ,temperature When the temperature is higher than 60℃, the weight coefficient is updated using the following formula:

[0143] (16);

[0144] (17);

[0145] (18).

[0146] If the voltage ripple fluctuates ,temperature When the temperature is below 0℃, the weight coefficient is updated using the following formula:

[0147] (19);

[0148] (20);

[0149] (twenty one).

[0150] Adjust the weight increment or decrement according to the environment calculation. The lower limit of single weight is 0.05 to prevent a certain target from being completely ineffective. High temperature can easily lead to increased memory leakage current and timing parameter offset (signal establishment time extension), thereby reducing signal stability. The adjustment direction is to improve (The weight coefficient of signal stability is increased) to compensate for the timing offset caused by memory leakage current; at the same time, improve (weight coefficient of write failure rate) and reduce (representing the weight coefficient of the read error rate) to avoid imbalance in read and write performance.

[0151] If the voltage ripple When the voltage offset is too high, it may cause the state of the storage unit to be misjudged. It is necessary to prioritize the impact of voltage fluctuations to ensure data accuracy. (Enhanced Error Correction Priority) Improvement (to ensure data reading accuracy) and (Temporarily weakens write and stability targets) to reduce error rates.

[0152] The purposes of multi-parameter adjustment include: multi-objective adjustment, where different environments have different impacts; dynamic coupling of environmental factors, where the impacts on different performance indicators are non-independent; dynamic priority allocation, targeting different environments, and limited adjustment of variables with greater impact.

[0153] 6. Termination and result output include output target access parameters, hardware synchronization and data storage.

[0154] Output optimal parameters: for example, target time 38 ns, target voltage 2.3 V, and fitness function value 0.95. Hardware synchronization: Write the optimized parameters to the main control chip driver to improve Nand Flash performance in real time.

[0155] Data storage: Record parameters, fitness curves and environmental data to a local database for subsequent analysis.

[0156] This invention uses layered encoding and dynamic decoding to independently encode time and voltage, avoiding parameter interference. It also incorporates environmental compensation factors during decoding. It constructs a fitness function based on read error rate, write failure rate, and signal stability, achieving multi-objective optimization through weight distribution. Furthermore, it implements hardware collaborative optimization: real-time environmental data collection and dynamic adjustment of algorithm parameters to improve robustness. Finally, a hybrid genetic strategy: elite retention, roulette wheel selection, and single-point crossover, balancing convergence speed and global search capability.

[0157] When applying the method for determining access parameters when the main controller reads and writes to the memory provided by the present invention, it is not necessary to Figure 1 The steps are executed in the order shown. The specific execution order of the steps can be determined according to needs, and the present invention does not limit this.

[0158] The above is a method for determining access parameters when a main controller reads and writes to a memory provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding device for determining access parameters when a main controller reads and writes to a memory, the device comprising:

[0159] A building module, used to build a fitness function based on the performance indicators of the memory and environmental parameters;

[0160] An optimization module is used to respond to access parameter optimization requests, optimize the access parameters of the memory with the goal of maximizing the fitness function value, and determine the access parameter value that meets the preset convergence conditions as the target access parameter value; the fitness function value is obtained by the main controller based on the performance index value and environmental parameter value obtained by performing read and write tests on the memory according to the access parameters optimized each time; the target access parameter value is used as the access parameter value when the main controller performs read and write operations on the memory.

[0161] Regarding the specific limitations of the device for determining access parameters when the main controller reads and writes to the memory, please refer to the limitations of the method for determining access parameters when the main controller reads and writes to the memory above, and will not be repeated here. The various modules in the above-mentioned device for determining access parameters when the main controller reads and writes to the memory can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above-mentioned modules.

[0162] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provided is a method for determining access parameters when a main controller reads and writes memory.

[0163] The present invention also provides Figure 3 The structural diagram of the computer equipment shown in FIG. Figure 3 As shown in the figure, at the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Provided is a method for determining access parameters when a main controller reads and writes memory.

[0164] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes in the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0165] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.

Claims

1. A method for determining access parameters when a main controller reads and writes to a memory, characterized in that: include: A fitness function is constructed based on the performance indicators and environmental parameters of the memory; the performance indicators include read error rate, write failure rate and signal stability; the environmental parameters include temperature; the fitness function Fienes is: C T =1+k T ·(T-T ref ); Among them, E read represents the read error rate, S write represents the write failure rate, σ signal Indicates signal stability, α, β, and γ are weight coefficients, and C T represents the temperature compensation factor, k T represents the temperature sensitivity coefficient, T represents temperature, T ref Indicates the reference temperature; In response to an access parameter optimization request, the access parameter is optimized with the maximum fitness function value as the goal, and the access parameter value that meets the preset convergence condition is determined as the target access parameter value; the fitness function value is obtained by the main controller based on the performance index value and environmental parameter value obtained by performing a read and write test on the memory according to the access parameter optimized each time; The target access parameter value is used as the access parameter value when the main controller performs read and write operations on the memory.

2. The method according to claim 1, characterized in that With the goal of maximizing the fitness function value, the access parameter is optimized and the access parameter value that meets the preset convergence conditions is determined as the target access parameter value, including: Get the initial access parameter value; Binary-encode the initial access parameter value to obtain a binary access parameter value; Taking the maximum value of the fitness function as the goal, the binary access parameter value is iteratively updated through the genetic algorithm, and the binary access parameter value that meets the preset convergence condition is determined as the target binary access parameter value; The target binary access parameter value is decoded, and the decoded access parameter value is environmentally compensated to obtain the target access parameter value.

3. The method according to claim 2, characterized in that The access parameters include time parameters and voltage parameters. The time parameters and voltage parameters of the memory are independently encoded. The initial access parameter value is binary-encoded to obtain a binary access parameter value, including: Binary encoding is performed on the initial time parameter value and the initial voltage parameter value to obtain a binary time parameter value and a binary voltage parameter value; The binary time parameter value and the binary voltage parameter value are combined to obtain a binary access parameter value.

4. The method according to claim 3, characterized in that Perform environmental compensation on the decoded access parameter value to obtain the target access parameter value, including: Get the temperature and voltage ripple in the current environment; Determining a temperature compensation factor according to the temperature and the reference temperature, and determining a voltage compensation factor according to the voltage ripple and the voltage ripple weight coefficient; The product of the temperature compensation factor and the decoded time parameter value is determined as the target time, and the product of the voltage compensation factor and the decoded voltage parameter value is determined as the target voltage.

5. The method according to claim 4, characterized in that The calculation formula of the voltage compensation factor is: Among them, C v represents the voltage compensation factor, k v Represents the voltage ripple weight coefficient, Δ ripple Indicates voltage ripple.

6. The method according to claim 1, characterized in that The method further comprises: In the process of optimizing the access parameters, the corresponding fitness function values ​​are calculated in parallel through the field programmable gate array FPGA.

Citation Information

Patent Citations

  • Strategy generation method and device, equipment and storage medium

    CN117149561A

  • Performance optimization method for Ceph cache system based on persistent memory

    CN119473151A