IP Library Granted Patent US 12681665
Granted Patent B2
US 12681665 · App. 18/399,521 · Granted Jul 14, 2026

Operation method of memory controller, memory controller and memory system

Inventor: Zhongchen Huo (Wuhan, CN)
Assignee: Yangtze Memory Technologies Co., Ltd.
G06F3/0658G06F3/0619G06F3/0679
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12681665
App. No.
18/399,521
Granted
Jul 14, 2026
Kind
B2
Abstract

The present disclosure provides methods of operating a memory controller, memory controllers and memory systems, which relate to the field of memory technologies. An example method includes: in response to receiving a training instruction, at least one processor generates a plurality of control parameter sets randomly, the control parameter sets being used to adjust a size of an eye diagram for signal transmission between a memory controller and a memory. Fitness of the plurality of control parameter sets is determined. The plurality of control parameter sets are updated iteratively using a genetic algorithm until an iteration stop condition is satisfied. After the iteration is stopped, a control parameter set with the greatest fitness among the plurality of control parameter sets obtained in the latest iterative update is determined as a target control parameter set.

Claims (110)

1 . A method for operating a memory controller, the memory controller being coupled to a memory and comprising at least one processor, wherein the method comprises:

in response to the at least one processor receiving a training instruction, generating a plurality of control parameter sets randomly, the plurality of control parameter sets being used to adjust signal transmission between the memory controller and the memory;

determining fitness of the plurality of control parameter sets, comprising:

configuring the memory controller and the memory based on the plurality of control parameter sets;

adjusting phases of a rising edge and a falling edge of a data strobe signal (DQs) repeatedly; and

sending a read instruction to the memory and determining a value range of the phases of the rising edge and the falling edge of the DQs for which valid data is read; and

determining, as the fitness of the plurality of control parameter sets, an area of an eye diagram enclosed by the value range of the phases of the rising edge and the falling edge of the DQs for which the valid data is read in a coordinate system, wherein a horizontal axis of the coordinate system is the phase of the rising edge of the DQs, and a vertical axis of the coordinate system is the phase of the falling edge of the DQs;

updating the plurality of control parameter sets iteratively using a genetic algorithm until an iteration stop condition is satisfied; and

after the iteration is stopped, determining, as a target control parameter set, a control parameter set with the greatest fitness among the plurality of control parameter sets obtained in the latest iterative update.

2 . The method of claim 1 , further comprising, before the determining fitness of the plurality of control parameter sets:

removing a control parameter set that fails to meet a preset requirement from the plurality of control parameter sets.

3 . The method of claim 1 , wherein the updating the plurality of control parameter sets iteratively using a genetic algorithm comprises:

selecting a plurality of control parameter sets on which a crossover operation is to be performed based on the fitness of the plurality of control parameter sets; and

performing a genetic crossover on two control parameter sets among the plurality of control parameter sets on which the crossover operation is to be performed using the genetic algorithm.

4 . The method of claim 3 , wherein the updating the plurality of control parameter sets iteratively using a genetic algorithm further comprises:

performing a genetic mutation on the plurality of control parameter sets on which the crossover operation has been performed using the genetic algorithm.

5 . The method of claim 4 , wherein the plurality of control parameter sets comprise a plurality of control parameters, and the performing a genetic mutation on the plurality of control parameter sets on which the crossover operation has been performed using the genetic algorithm comprises:

for one of the plurality of control parameter sets on which the crossover operation has been performed, replacing a random control parameter in the control parameter set with another value in a value set of the control parameter according to a set mutation probability.

6 . The method of claim 3 , wherein the selecting a plurality of control parameter sets on which a crossover operation is to be performed based on the fitness of the plurality of control parameter sets comprises:

determining a probability of each of the plurality of control parameter sets being selected, the probability of being selected being a ratio of the fitness of the control parameter set to a sum of the fitness of the plurality of control parameter sets;

setting a random number between 0 and 100%; and

selecting, as the control parameter set on which the crossover operation is to be performed, the control parameter set whose probability of being selected is greater than the random number.

7 . The method of claim 3 , wherein the plurality of control parameter sets comprise a plurality of control parameters, and the performing a genetic crossover on any two control parameter sets among the plurality of control parameter sets on which the crossover operation is to be performed using the genetic algorithm comprises:

selecting a starting position and an interchange length randomly for any two of the plurality of control parameter sets on which the crossover operation is to be performed; and

interchanging a part of the control parameters of the two of the plurality of control parameter sets on which the crossover operation is to be performed to generate the plurality of control parameter sets on which the crossover operation has been performed.

8 . The method of claim 1 , wherein the iteration stop condition comprises:

the fitness of the plurality of control parameter sets reaches a set value, or

a total number of filtered plurality of control parameter sets reaches a first preset number, wherein the first preset number satisfies:

n

=

t

2

k

·

(

l

/

v

)

·

m

wherein n is the first preset number, t is a calibration time length specified in a specification, l is a length of bytes transmitted, v is a rate of a bus, k is an average of the number of times values of phases of a rising edge and a falling edge of a data strobe signal (DQs) are adjusted, and m is a number of channels of the memory.

9 . The method of claim 1 , wherein the plurality of control parameter sets comprise a plurality of control parameters, and the method further comprises, before the generating a plurality of control parameter sets randomly:

obtaining the control parameters and a value set of the control parameters, wherein the value set of the control parameters comprises a plurality of values of the control parameters; and

encoding the value set of the control parameters.

10 . A memory controller, comprising:

a flash memory interface circuit coupled to a memory; and

at least one processor coupled to the flash memory interface circuit, wherein the at least one processor is configured to:

in response to receiving a training instruction, generate a plurality of control parameter sets randomly, the plurality of control parameter sets being used to adjust signal transmission between the memory controller and the memory;

determine fitness of the plurality of control parameter sets, comprising:

configuring the memory controller and the memory based on the plurality of control parameter sets;

adjusting phases of a rising edge and a falling edge of a data strobe signal (DQs) repeatedly; and

sending a read instruction to the memory and determining a value range of the phases of the rising edge and the falling edge of the DQs for which valid data is read; and

determining, as the fitness of the plurality of control parameter sets, an area of an eye diagram enclosed by the value range of the phases of the rising edge and the falling edge of the DQs for which the valid data is read in a coordinate system, wherein a horizontal axis of the coordinate system is the phase of the rising edge of the DQs, and a vertical axis of the coordinate system is the phase of the falling edge of the DQs;

update the plurality of control parameter sets iteratively using a genetic algorithm until an iteration stop condition is satisfied; and

after the iteration is stopped, determine, as a target control parameter set, a control parameter set with the greatest fitness among the plurality of control parameter sets obtained in the latest iterative update.

11 . The memory controller of claim 10 , wherein the at least one processor is further configured to:

before the determining fitness of the plurality of control parameter sets, remove a control parameter set that fails to meet a preset requirement from the plurality of control parameter sets.

12 . The memory controller of claim 10 , wherein the at least one processor is configured to:

select a plurality of control parameter sets on which a crossover operation is to be performed based on the fitness of the plurality of control parameter sets; and

perform a genetic crossover on any two control parameter sets among the plurality of control parameter sets on which the crossover operation is to be performed using the genetic algorithm.

13 . The memory controller of claim 12 , wherein the at least one processor is further configured to:

perform a genetic mutation on the plurality of control parameter sets on which the crossover operation has been performed using the genetic algorithm.

14 . The memory controller of claim 12 , wherein the at least one processor is configured to:

determine a probability of each of the plurality of control parameter sets being selected, the probability of being selected being a ratio of the fitness of the control parameter set to a sum of the fitness of the plurality of control parameter sets;

set a random number between 0 and 100%; and

select, as the control parameter set on which the crossover operation is to be performed, the control parameter set whose probability of being selected is greater than the random number.

15 . The memory controller of claim 10 , wherein the iteration stop condition comprises:

the fitness of the plurality of control parameter sets reaches a set value, or

a total number of filtered control parameter sets reaches a first preset number, wherein the first preset number satisfies:

n

=

t

2

k

·

(

l

/

v

)

·

m

wherein n is the first preset number, t is a calibration time length specified in a specification, l is a length of bytes transmitted, v is a rate of a bus, k is an average of the number of times values of phases of a rising edge and a falling edge of a data strobe signal (DQs) are adjusted, and m is a number of channels of the memory.

16 . The memory controller of claim 10 , wherein the plurality of control parameter sets comprise a plurality of control parameters, and the method further comprises, before the generating a plurality of control parameter sets randomly:

obtaining the control parameters and a value set of the control parameters, wherein the value set of the control parameters comprises a plurality of values of the control parameters; and

encoding the value set of the control parameters.

17 . A memory system, comprising:

a memory; and

a memory controller connected to the memory via a flash memory interface circuit, wherein the memory controller comprises:

the flash memory interface circuit coupled to the memory; and

at least one processor coupled to the flash memory interface circuit, wherein the at least one processor is configured to:

in response to receiving a training instruction, generate a plurality of control parameter sets randomly, the plurality of control parameter sets being used to adjust signal transmission between the memory controller and the memory;

determine fitness of the plurality of control parameter sets, comprising:

configuring the memory controller and the memory based on the plurality of control parameter sets;

adjusting phases of a rising edge and a falling edge of a data strobe signal (DQs) repeatedly; and

sending a read instruction to the memory and determining a value range of the phases of the rising edge and the falling edge of the DQs for which the valid data is read; and

determining, as the fitness of the plurality of control parameter sets, an area of an eye diagram enclosed by the value range of the phases of the rising edge and the falling edge of the DQs for which the valid data is read in a coordinate system, wherein a horizontal axis of the coordinate system is the phase of the rising edge of the DQs, and a vertical axis of the coordinate system is the phase of the falling edge of the DQs;

update the plurality of control parameter sets iteratively using a genetic algorithm until an iteration stop condition is satisfied; and

after the iteration is stopped, determine, as a target control parameter set, a control parameter set with the greatest fitness among the plurality of control parameter sets obtained in the latest iterative update.

18 . The memory system of claim 17 , wherein the at least one processor is configured to:

before the determining fitness of the plurality of control parameter sets, removing a control parameter set that fails to meet a preset requirement from the plurality of control parameter sets.

19 . The memory system of claim 17 , wherein the plurality of control parameter sets comprise a plurality of control parameters, and the method further comprises, before the generating a plurality of control parameter sets randomly:

obtaining the control parameters and a value set of the control parameters, wherein the value set of the control parameters comprises a plurality of values of the control parameters; and

encoding the value set of the control parameters.

20 . The memory system of claim 17 , wherein the at least one processor is configured to:

select a plurality of control parameter sets on which a crossover operation is to be performed based on the fitness of the plurality of control parameter sets; and

perform a genetic crossover on any two control parameter sets among the plurality of control parameter sets on which the crossover operation is to be performed using the genetic algorithm.