Method for optimizing flash memory chip and related apparatus

Optimizing selected NFI bus channels in flash memory chips by adjusting reference voltages and DQS timing addresses reliability issues, improving data accuracy and performance without disconnecting the disk.

JP2025141971APending Publication Date: 2025-09-29HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025103940
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-02-26
Filing Date
2025-06-19
Publication Date
2025-09-29

AI Technical Summary

Technical Problem

Increasing the bus rate of the nonvolatile flash interface (NFI) in flash memory chips leads to reduced bus link reliability and data loss due to decreased ideal data width, and data retransmissions exacerbate read and write performance issues.

Method used

Optimize selected channels in the NFI bus by determining optimization parameters through margin tests and adjusting read/write reference voltages and DQS timing to align timing margins and reduce errors without disconnecting the disk.

Benefits of technology

Improves memory performance by reducing transmission errors and maintaining normal operation of other channels, enhancing data accuracy and reliability in flash memory chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025141971000001_ABST
    Figure 2025141971000001_ABST
Patent Text Reader

Abstract

To provide a method for optimizing a flash memory chip and a related apparatus.SOLUTION: According to a method, some channels in a nonvolatile flash interface NFI bus of a flash memory chip may be suspended in a service running process of the flash memory chip. To-be-optimized channels that are to be optimized are determined from the suspended channels. An optimization parameter of each to-be-optimized channel is determined based on training data of each to-be-optimized channel. Each to-be-optimized channel is optimized based on the optimization parameter of each to-be-optimized channel. In the foregoing technical solution, some channels in the NFI bus can be optimized in the normal running process of the flash memory chip. In other words, the other channels can maintain a normal working state. In this way, the NFI bus channel can be optimized without disk disconnection.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 202110220794.2, entitled "METHOD FOR OPTIMIZING FLASH MEMORY CHIP AND RELATED APPARATUS," filed with the China Patent Office on February 26, 2021, which is incorporated herein by reference in its entirety.

[0002] This application relates to the field of storage technology, and in particular to a method and related apparatus for optimizing flash memory chips. [Background technology]

[0003] Flash memory chips with high read / write (input / output, I / O) speeds usually provide a better user experience. Increasing the bus rate of the nonvolatile flash interface (NAND flash interface, NFI) is an effective way to improve the I / O rate. However, as the NFI bus rate increases, the ideal data width decreases accordingly. This results in reduced bus link reliability and can lead to failures such as data loss.

[0004] The solution to a single-bit error on a single channel of the NFI bus is to retransmit the data on the channel where the bit error occurred. However, as the number of NFI bus channels increases, the probability of a single-bit error increases accordingly. In addition, data retransmissions severely impact the read and write performance of flash memory chips, resulting in a poor user experience. Summary of the Invention [Means for solving the problem]

[0005] Embodiments of the present application provide a method for optimizing flash memory chips and related devices so that several channels in an NFI bus can be optimized without disk disconnection.

[0006] According to a first aspect, an embodiment of the present application provides a method for optimizing a flash memory chip, the method including: in a service execution process of the flash memory chip, pausing N channels in a nonvolatile flash interface NFI bus of the flash memory chip, where N is an integer greater than or equal to 1 and less than or equal to a total number of channels in the NFI bus; determining at least one optimization target channel from the N channels; determining optimization parameters for each optimization target channel based on training data for each optimization target channel among the at least one optimization target channel; and optimizing each optimization target channel based on the optimization parameters for each optimization target channel.

[0007] In the above technical solution, some channels in the NFI bus can be optimized during the normal operation of the flash memory chip. In other words, other channels can maintain normal operation. In this way, the NFI bus channels can be optimized without disconnecting the disk.

[0008] Referring to the first aspect, in a possible implementation form of the first aspect, the step of determining at least one channel to be optimized from the N channels includes the steps of: performing a margin test on the nth channel among the N channels to obtain a margin for the nth channel, where n is an integer from 1 to N in sequence; determining whether the margin of the nth channel satisfies margin conditions, where the margin conditions include at least one of a timing margin condition and a voltage margin condition; and determining that the nth channel belongs to the channels to be optimized if the margin of the nth channel does not satisfy the margin conditions.

[0009] In the above technical solution, the channels that need to be optimized may be determined to prepare for subsequent optimization.

[0010] Referring to the first aspect, in a possible implementation of the first aspect, the optimization parameters include a read optimization voltage and a write optimization voltage, and the training data for each optimization target channel includes K read margins and K write margins for each optimization target channel, where K is a positive integer greater than 1; and the step of determining the optimization parameters for each optimization target channel based on the training data of each optimization target channel in the at least one optimization target channel includes the steps of determining an average value of the K read margins as the read optimization voltage; and determining an average value of the K write margins as the write optimization voltage.

[0011] The read reference voltage of the channel may be optimized using the determined read optimization parameter. Correspondingly, the write reference voltage of the channel may be optimized using the determined write optimization parameter. By optimizing the read reference voltage and the write reference voltage, the probability of errors in transmission between the flash memory controller and the NAND flash chips can be reduced, and memory performance can be improved.

[0012] Referring to the first aspect, in a possible implementation of the first aspect, the K read margins are K read timing margins, the K write margins are K write timing margins, the K read timing margins correspond one-to-one to the K voltage levels, and the K write timing margins correspond one-to-one to the K voltage levels; the read optimization voltage is determined by using the following formula:

number

number

[0013] Referring to the first aspect, in a possible implementation of the first aspect, the K read margins are K read voltage margins, the K write margins are K write voltage margins, the K read voltage margins correspond one-to-one to the K data strobe signal DQS delay levels, and the K write voltage margins correspond one-to-one to the K DQS delay levels; the read optimization voltage is the arithmetic mean value of the K read voltage margins; and the write optimization voltage is the arithmetic mean value of the K write voltage margins.

[0014] Referring to the first aspect, in a possible implementation of the first aspect, the optimization parameters include read-optimized DQS timing optimization parameters and write-optimized DQS timing optimization parameters, the training data of each optimization target channel includes read direction training data and write direction training data, and determining the optimization parameters of each optimization target channel based on the training data of each optimization target channel in the at least one optimization target channel includes determining the read-optimized DQS timing optimization parameters based on the read direction training data, where the read direction training data includes a left boundary and a right boundary obtained by the read direction timing training, The method includes the steps of: using the optimized DQS timing optimization parameter to adjust the DQS delay line to a first center position, the first center position being an average value of the left and right boundaries obtained by the read direction timing training; and determining a write-optimized DQS timing optimization parameter based on write direction training data, the write direction training data including the left and right boundaries obtained by the write direction timing training; and using the write-optimized DQS timing optimization parameter to adjust the DQS delay line to a second center position, the second center position being an average value of the left and right boundaries obtained by the write direction timing training.

[0015] In the above solution, the timing margin can be optimized by adjusting the position of the delay line of the DQS signal to enable the timing margin effective width of the signal at the receiving end to be maximized and the setup time margin and hold time margin to be maximized, thereby meeting the specification requirements and avoiding data loss caused by bit errors during data read / write.

[0016] According to a second aspect, an embodiment of the present application provides an electronic device, the electronic device including a unit configured to implement the first aspect or any one of the possible implementation forms of the first aspect.

[0017] According to a third aspect, an embodiment of the present application provides a solid state disk including an SSD controller, the SSD controller coupled to a flash memory via a non-volatile flash interface bus, the SSD controller coupled to the memory and further configured to read and execute instructions and / or program code in the memory to implement the first aspect or any one of the possible implementations of the first aspect.

[0018] According to a fourth aspect, an embodiment of the present application provides a chip system, the chip system including a logic circuit, the logic circuit coupled to an input / output interface and configured to transmit data via the input / output interface to perform the first aspect or any one of the possible implementations of the first aspect.

[0019] According to a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing program code that, when executed on a computer, enables the computer to perform the first aspect or any one of the possible implementations of the first aspect.

[0020] According to a sixth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising computer program code that, when executed on a computer, enables the computer to perform the first aspect or any one of the possible implementations of the first aspect. [Brief explanation of the drawings]

[0021] [Figure 1] 1 is a schematic diagram of a possible application scenario according to an embodiment of the present application; [Figure 2] 1 is a schematic diagram of a flash memory controller and a NAND flash chip. [Figure 3] FIG. 1 is a schematic diagram of DQS-N and DQS-P. [Figure 4] FIG. 10 is a schematic diagram of a write reference voltage. [Figure 5] FIG. 2 is a schematic diagram of a NAND flash chip in the electronic device shown in FIG. 1. [Figure 6] 1 is a schematic flowchart of a method for optimizing a flash memory chip according to an embodiment of the present application. [Figure 7] FIG. 1 is a schematic diagram of the connections between a flash memory controller and the die. [Figure 8] 1 is a flowchart of a timing margin test. [Figure 9] FIG. 1 is a schematic diagram of a flash memory controller. [Figure 10] 1 is a schematic flowchart of a voltage margin test. [Figure 11] 1 is a schematic flow chart of voltage margin optimization according to an embodiment of the present application; [Figure 12] 1 is a schematic flow chart of timing margin optimization according to an embodiment of the present application; [Figure 13] 1 is a schematic flowchart of a method for optimizing a flash memory chip according to an embodiment of the present application. [Figure 14] 1 is a schematic block diagram of the structure of an electronic device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0022] The technical solutions of the present application are described below with reference to the accompanying drawings.

[0023] In this application, "at least one" means one or more, and "multiple" means two or more. The term "and / or" describes a relationship of association for describing related objects and indicates that three relationships may exist. For example, A and / or B refers to the following three cases: when only A is present, when both A and B are present, and when only B is present. Each of A and B may be singular or plural. The character " / " generally indicates an "or" relationship between related objects. "At least one of" or similar expressions refers to any combination of these, including any combination of singular or plural items. For example, "at least one of" a, b, or c may refer to a, b, c, ab, ac, bc, or abc, where a, b, and c may be singular or plural.

[0024] In order to help those skilled in the art better understand the technical solution of the present application, an application scenario and some related concepts involved in the technical solution of the present application are first described.

[0025] 1 is a schematic diagram of a possible application scenario according to an embodiment of the present application. As shown in FIG. 1, a solid-state disk (SSD) 100 includes an SSD controller 110 and a NAND flash memory (NAND flash) 130.

[0026] The SSD controller 110 includes a host interface controller 111, a processor 112, and a flash memory controller 113. The host interface controller 111, the processor 112, and the flash memory controller 113 are connected via a bus 114. It may be understood that in addition to the host interface controller 111, the processor 112, and the flash memory controller 113 shown in FIG. 1 , the SSD controller may further include other modules, such as a cache controller and an error correcting code (ECC) module.

[0027] The host interface controller is sometimes called the front end. The front end is the interface responsible for communication between the host and the SSD. Commands and data are transmitted to and from the SSD via a front end bus. The host may be a computer, a mobile phone, a base station, a trip computer (sometimes called an electronic control unit, or ECU), etc. The front end interface may be a peripheral component interconnect express (PCIe) interface, a mini serial advanced technology attachment (mSATA) interface, an M.2 (also called next generation form factor, or NGFF) interface, or another user-defined interface.

[0028] The processor 112 may include one or more central processing unit (CPU) cores. The processor 112 is responsible for functions such as calculations and system scheduling. In addition to the CPU cores, the processor 112 may further include several peripheral modules, such as a universal asynchronous receiver / transmitter (UART), a general-purpose input / output (GPIO) module, a temperature sensor, and a timer.

[0029] The flash memory controller 113 is responsible for managing writing data to or reading data from the NAND flash 130. The flash memory controller 113 is connected to the NAND flash 130 via the NFI bus 120.

[0030] The flash memory controller 113 will be described below with reference to FIG.

[0031] 2 is a schematic diagram of a flash memory controller and a NAND flash chip. The NAND flash 130 shown in FIG. 1 includes multiple NAND flash chips. The NAND flash chip 131 shown in FIG. 2 may be any one of the multiple NAND flash chips included in the NAND flash 130.

[0032] 2, the flash memory controller 113 is connected to the NAND flash chip 131 via the NFI bus 120. The NFI bus 120 includes a plurality of data signal lines (e.g., data signal lines L0 to L7 in FIG. 2) and a plurality of timing signals (e.g., timing signal lines LS-P and LS-N in FIG. 1).

[0033] Data signal lines L0 to L7 may transmit eight data signals (DQ) in parallel. For example, data signal line L0 may transmit DQ0, data signal line L1 may transmit DQ1, ..., and data signal line L7 may transmit DQ7. It should be understood that DQ is a periodic digital signal and therefore can carry data. For example, DQ may transmit one bit of data in one cycle. In a low electrical level cycle, one bit of data "0" may be transmitted, and in a high electrical level cycle, one bit of data "1" may be transmitted. Data signal lines L0 to L7 may transmit eight DQs in parallel. Therefore, a total of eight bits of data are transmitted via data signal lines L0 to L7 in one cycle.

[0034] It should be understood that because DQ is a digital signal, a receiving end of DQ must correctly distinguish the cycle of DQ via a clock signal having the same cycle as DQ in order to correctly identify the electrical level state of DQ and correctly acquire the data carried by DQ. In consideration of this, NFI bus 120 may further include timing signal lines LS-N and LS-P. Timing signal lines LS-N and LS-P may carry a data strobe signal (DQS).

[0035] Specifically, timing signal line LS-N may carry DQS-N, and timing signal line LS-P may carry DQS-P. DQS-N and DQS-P are phase-inverted signals. For example, DQS-N and DQS-P may be shown in FIG. 3. DQS includes DQS-N and DQS-P. DQS may be used as a clock signal corresponding to DQ, have the same transmission and receiving ends as DQ, and trigger the receiving end of DQ to identify the electrical level state of DQ. For ease of explanation, in this embodiment of the present application, DQS is used to represent DQS-N and DQS-P.

[0036] It should be noted that bidirectional data transmission between the flash memory controller 113 and the NAND flash chip 131 may be implemented via the NFI bus 120. For example, in a process in which the flash memory controller 113 writes data to the NAND flash chip 131, the flash memory controller 113 may be used as a transmitting end of DQS and DQ, and the NAND flash chip 131 may be used as a receiving end of DQS and DQ. In a process in which the flash memory controller 113 reads data from the NAND flash chip 131, the NAND flash chip 131 may be used as a transmitting end of DQS and DQ, and the flash memory controller 113 may be used as a receiving end of DQS and DQ.

[0037] For ease of description, in the following embodiments of the present application, write DQ and write DQS are respectively used to represent the DQ and DQS sent by the flash memory controller 113 to the NAND flash chip 131 in the process of the flash memory controller 113 writing data to the NAND flash chip 131; read DQ and read DQS are respectively used to represent the DQ and DQS sent by the NAND flash chip 131 to the flash memory controller 113 in the process of the flash memory controller 113 reading data from the NAND flash chip 131. The write DQ includes write DQ0 to write DQ7, and the read DQ includes read DQ0 to read DQ7.

[0038] Specific implementations of writing data and reading data will be described separately below.

[0039] Scenario 1: The flash memory controller 113 writes data to the NAND flash chip 131.

[0040] The processor 110 may call the flash memory controller 113 to write data to the NAND flash chip 131. For a specific implementation of calling the flash memory controller 113 by the processor 110, please refer to the prior art, which is not limited in this embodiment of the present application.

[0041] When called by the processor 112, the flash memory controller 113 may write data to the NAND flash chip 131. Specifically, the flash memory controller 113 may send write DQ0 to write DQ7 to the NAND flash chip 131 via data signal lines L0 to L7. The write DQ0 to write DQ7 sent by the flash memory controller 113 may carry target write data that needs to be written to the NAND flash chip 131.

[0042] In the process of the flash memory controller 113 writing data to the NAND flash chip 131, the flash memory controller 113 further sends a write DQS to the NAND flash chip 131. The write DQS may trigger the NAND flash chip 131 to identify the electrical level states of write DQ0 to write DQ7. The NAND flash chip 131 may store the data carried by write DQ0 to write DQ7 based on the identified electrical level states, thereby implementing the writing of data to the NAND flash chip 131.

[0043] Generally, in the write DQS transmitted by the flash memory controller 113 to the NAND flash chip 131, the cross point (shown in FIG. 3) between write DQS-N and write DQS-P may be used as a trigger point to trigger the NAND flash chip 131 to identify the electrical level states of the write DQs. That is, when the NAND flash chip 131 determines that the received write DQS is at the cross point, the NAND flash chip 131 may identify the current electrical level states of write DQ0 to write DQ7, so that the target write data carried by write DQ0 to write DQ7 may be written to the NAND flash chip 131.

[0044] For example, if the target write data is 11010011 and corresponds to the same cross point in write DQS, the data carried by write DQ0 to write DQ7 in this case is as follows: write DQ0 may carry a "1", write DQ1 may carry a "1", write DQ2 may carry a "0", write DQ3 may carry a "1", write DQ4 may carry a "0", write DQ5 may carry a "0", write DQ6 may carry a "1", and write DQ7 may carry a "1".

[0045] If the NAND flash chip 131 determines that the received write DQS is at the cross point, the NAND flash chip 131 may identify the received electrical level states of write DQ0-write DQ7. In the above example, write DQ0 is at a high electrical level (carrying a "1"), write DQ1 is at a high electrical level (carrying a "1"), write DQ2 is at a low electrical level (carrying a "0"), write DQ3 is at a high electrical level (carrying a "1"), write DQ4 is at a low electrical level (carrying a "0"), write DQ5 is at a low electrical level (carrying a "0"), write DQ6 is at a high electrical level (carrying a "1"), and write DQ7 is at a high electrical level (carrying a "1"). The NAND flash chip 131 may store the target write data "11010011" based on the identified electrical level states of write DQ0-write DQ7.

[0046] Scenario 2: The flash memory controller 113 reads data from the NAND flash chip 131.

[0047] The processor 110 may call the flash memory controller 113 to read data from the NAND flash chip 131. For a specific implementation of calling the flash memory controller 113 by the processor 110, please refer to the prior art, which is not limited in this embodiment of the present application.

[0048] The flash memory controller 113 may be invoked by the processor 110 to instruct the NAND flash chip 131 to send target read data to the flash memory controller 113, so that the flash memory controller 113 reads the target read data in the NAND flash chip 131. For a specific implementation of instructing the NAND flash chip 131 by the flash memory controller 113, please refer to the prior art, which is not limited in this embodiment of the present application.

[0049] The NAND flash chip 131 may transmit read DQ0 to read DQ7 to the flash memory controller 113 via data signal lines L0 to L7. Read DQ0 to read DQ7 may carry target read data transmitted to the flash memory controller 113. When the NAND flash chip 131 transmits read DQ0 to read DQ7 to the flash memory controller 113, the NAND flash chip 131 also transmits read DQS to the flash memory controller 113. The flash memory controller 113 may identify the electrical level states of read DQ0 to read DQ7 based on the read DQS, and obtain the target read data carried by read DQ0 to read DQ7 based on the identified electrical level state to read data from the NAND flash chip 131.

[0050] The specific implementation of the read DQS and read DQ0-read DQ7 is similar to that of the aforementioned scenario 1. The details will not be described again here. The difference is that in the read DQS transmitted by the NAND flash chip 131 to the flash memory controller 113, the midpoint between two adjacent cross points can generally be used as a trigger point to trigger the flash memory controller 113 to identify the electrical level states of read DQ0-read DQ7. In other words, when the NAND flash chip 131 determines that the received read DQS is at the midpoint, the flash memory controller 113 may identify the current electrical level states of read DQ0-read DQ7 to obtain the target read data carried by read DQ0-read DQ7.

[0051] From the above scenario 1 and the above scenario 2, it can be learned that whether data can be transmitted accurately between the flash memory controller 113 and the NAND flash chip 131 is closely related to whether the relative timing positions of DQS and DQ transmitted in the same direction are aligned. The DQS and DQ transmitted in the same direction may be understood as read DQS and read DQ, or may be understood as write DQS and write DQ.

[0052] The write DQS and write DQ shown in FIG. 3 are used as an example. The write DQ may be any one of write DQ0 to write DQ7. A crossing point of the write DQS is used as a trigger point, and the write DQ cycle corresponding to the crossing point is the write DQ cycle in which the time at which the crossing point occurs falls. As can be seen from FIG. 3, the trigger point (crossing point) of the write DQS may divide the write DQ cycle corresponding to the trigger point into two parts, the part before the trigger point being a setup time, and the part after the trigger point being a hold time. It is assumed that the start time of any write DQ cycle received by the NAND flash chip 131 is t1, the end time of the write DQ cycle is t2, and the time between t1 and t2 when the write DQS received by the NAND flash chip 131 becomes the trigger point is t0. In this case, the period between t1 and t0 may be referred to as the setup time, and the period between t0 and t2 may be referred to as the hold time.

[0053] The setup time of the write DQ is sufficient, which helps improve the accuracy of data transmission. Specifically, because the write DQ is a digital signal, the electrical level state of the write DQ is usually variable, that is, the write DQ can be at a low electrical level or a high electrical level in any cycle. Between two adjacent cycles, the electrical level state of the write DQ can remain unchanged, or can change from a low electrical level to a high electrical level, or can change from a high electrical level to a low electrical level.

[0054] Generally, the high and low electrical levels are relative to a reference voltage. That is, when the electrical level of the write DQ is lower than the reference voltage, the write DQ is at a low electrical level; or, when the electrical level of the write DQ is higher than the reference voltage, the write DQ is at a high electrical level. When the electrical level state of the write DQ changes, it usually takes a certain delay to complete the electrical level state switch. For example, as shown in FIG. 3, at tmin and tmax, the electrical level of the write DQ reaches the reference voltage.

[0055] An example is used in which a low electrical level in the previous cycle is switched to a high electrical level in the current cycle. If the setup time is insufficient, for example, when t0 is between t1 and tmin, the electrical level of the write DQ at t0 may not fully rise to a high electrical level greater than the reference voltage. In this case, the NAND flash chip 131 may erroneously consider the write DQ to be at a low electrical level in the current cycle. That is, the write DQ in the current cycle should be at a high electrical level, but because t0 is between t1 and tmin and the electrical level does not fully rise to a value greater than the reference voltage, it is erroneously identified as a low electrical level. As a result, an error occurs in the data written to the NAND flash chip 131. Therefore, to ensure the accuracy of data transmission between the flash memory controller 113 and the NAND flash chip 131, it is necessary to ensure that the setup time is sufficiently long.

[0056] The hold time of the write DQ is sufficient, which also helps improve the accuracy of data transmission. Specifically, the NAND flash chip 131 requires a specific delay to identify the electrical level state of the write DQ. For example, a high electrical level in the current cycle is switched to a low electrical level in the next cycle. At t0, the NAND flash chip 131 begins to identify the electrical level state of the write DQ. If the hold time is insufficient, for example, if t0 is between tmax and t2, when the NAND flash chip 131 identifies the electrical level state of the write DQ, the electrical level of the write DQ may be lower than the reference voltage (the write DQ will be at a low electrical level in the next cycle). This causes the NAND flash chip 131 to erroneously identify the electrical level of the current cycle as a low electrical level, resulting in an error in the data written to the NAND flash chip 131. In other words, the electrical level of the write DQ in the current cycle should be a high electrical level, but because t0 is between tmax and t2 and the electrical level is lower than the reference voltage, it is erroneously considered to be a low electrical level. Therefore, to ensure the accuracy of data transmission between the flash memory controller 113 and the NAND flash chip 131, it is necessary to ensure that the hold time is sufficiently long.

[0057] In conclusion, both the hold time and setup time of the write DQ need to have a relatively long duration in order to improve the accuracy of data transmission between the flash memory controller 113 and the NAND flash chip 131. If the duration of the hold time or setup time of the write DQ is insufficient, the accuracy of data transmission between the flash memory controller 113 and the NAND flash chip 131 will be reduced and the bit error rate will be increased.

[0058] Generally, the reference voltage in the flash memory controller 113 is the same as the reference voltage in the NAND flash chip 131. That is, with respect to the write DQS and write DQ shown in FIG. 3, the time interval between tmin and t1 may be referred to as the minimum setup time applicable to the NAND flash chip 131, and the time interval between tmax and t2 may be referred to as the minimum hold time applicable to the memory chip t2.

[0059] In a write DQ cycle, the difference between the setup time of the write DQS and the minimum setup time applicable to the NAND flash chip 131 may be referred to as the timing margin of the write DQ setup time, and the difference between the hold time of the write DQS and the minimum hold time applicable to the NAND flash chip 131 may be referred to as the timing margin of the write DQ hold time. The minimum value of the timing margin of the setup time and the timing margin of the hold time of the write DQ may be understood as the timing margin of the write DQ. For example, in FIG. 3, the timing margin of the write DQ is the minimum value of the difference between t1 and tmin and the difference between tmax and t2.

[0060] Generally, the time interval between tmin and tmax is primarily determined by the performance of the NAND flash chip 131. In other words, for the flash memory controller 113, the setup time and hold time requirements of the chip are determined by the chip's performance and cannot be adjusted. The timing margin may be adjusted to an optimal value through timing training. Through timing training, the flash memory controller 113 can adjust the time t0 corresponding to the crossing point of the write DQS to an intermediate position between tmin and tmax, i.e., a position where the timing margin of the setup time of the write DQ is equal to the timing margin of the hold time. Therefore, the timing margin of the write DQ may be allowed to reach its maximum value, and the accuracy of data transmission from the flash memory controller 113 to the NAND flash chip 131 can be optimized in terms of the timing margin.

[0061] For the same reason, in the process of the flash memory controller 113 reading data from the NAND flash chip 131, the difference between the hold time of the read DQ sent by the NAND flash chip 131 to the flash memory controller 113 and the minimum hold time applicable to the flash memory controller 113 may also be referred to as the timing margin of the read DQ hold time. The difference between the setup time of the read DQ and the minimum setup time applicable to the flash memory controller 113 may also be referred to as the timing margin of the read DQ setup time. The timing margin of the read DQ may be understood as the minimum value of the timing margin of the hold time and the timing margin of the setup time of the read DQ. If the timing margin of the hold time of the read DQ sent by the NAND flash chip 131 to the flash memory controller 113 is equal to the timing margin of the setup time, the timing margin of the read DQ may be allowed to reach its maximum value. In this case, the accuracy of data transmission from the NAND flash chip 131 to the flash memory controller 113 may be optimized in terms of the timing margin.

[0062] To improve the timing margins of read DQ and write DQ and improve the accuracy of data transmission between the flash memory controller 113 and the NAND flash chip 131, the relative timing positions of DQ and DQS transmitted in the same direction usually need to be aligned, a process often referred to as memory training.

[0063] In this embodiment of the present application, "aligned" can be understood as, for DQS and DQ transmitted in the same direction, the timing margin of the hold time of DQ is equal to the timing margin of the setup time, or the timing margin of the hold time of DQ is not significantly different from the timing margin of the setup time, thereby DQ has a relatively sufficient timing margin of the hold time and a relatively sufficient timing margin of the setup time. The timing margin of the setup time of DQ is relative to the minimum setup time applicable to the receiving end, and similarly, the timing margin of the hold time of DQ is relative to the minimum hold time applicable to the receiving end. That is, "aligned" may allow the setup time of DQ to be equal to or greater than the minimum setup time applicable to the receiving end, and may allow the hold time of DQ to be equal to or greater than the minimum hold time applicable to the receiving end.

[0064] The receiving end may be a NAND flash chip 131 or a flash memory controller 113. The minimum setup time and minimum hold time applicable to the receiving end may be obtained based on factors such as the structure and performance of the receiving end. If the setup time of DQ is less than the minimum setup time applicable to the receiving end, or if the hold time of DQ is less than the minimum hold time applicable to the receiving end, the receiving end cannot correctly identify the data carried by DQ.

[0065] In addition, the aforementioned high and low electrical levels are determined by comparing with a reference voltage. As shown in Figure 4, starting from t0, the write electrical level is higher than the write reference voltage Vref, in this case, the NAND flash chip 131 may determine that the write electrical level is a high electrical level and determine that the written data is 1; starting from t1, the write electrical level is lower than the write reference voltage Vref, in this case, the NAND flash chip 131 may determine that the write electrical level is a low electrical level and determine that the written data is 0; starting from t2, the write electrical level is higher than the write reference voltage Vref, in this case, the NAND flash chip 131 may determine that the write electrical level is a high electrical level and determine that the written data is 1.

[0066] It is assumed that the write reference voltage Vref is greater than the maximum value of the write electrical level (i.e., V1 shown in FIG. 4), and the NAND flash chip 131 regards the write electrical level as a low electrical level. In this case, the NAND flash chip 131 determines that all written data are 0. Alternatively, it is assumed that the write reference voltage Vref is less than the minimum value of the write electrical level (i.e., V2 shown in FIG. 4), and the NAND flash chip 131 regards the write electrical level as a high electrical level. In this case, the NAND flash chip 131 determines that all written data are 1.

[0067] The voltage margin in the write direction is the difference between the reference voltage and the write electrical level. As shown in Figure 4, the difference between Vref and V2 is the voltage margin in the write direction.

[0068] For the same reason, in the process of the flash memory controller 113 reading data from the NAND flash chip 131, the difference between the reference voltage and the read electrical level is the voltage margin in the read direction.

[0069] FIG. 5 is a schematic diagram of a NAND flash chip in the electronic device shown in FIG.

[0070] Flash memory can be classified into NOR flash and NAND flash. Compared to NOR flash, NANO flash has advantages such as large capacity, low cost, and fast read / write speeds, making it widely used. Currently, NAND flash is sometimes used in solid-state disks (SSDs), secure digital (SD) cards, add-in cards (AIDs), and the like. NAND flash is also sometimes used as a storage medium in electronic devices such as mobile phones and tablet computers.

[0071] The structure of NAND flash can be divided into, in descending order, devices, targets, dies, planes, blocks, pages, and cells.

[0072] The NAND flash chip 131 shown in Figure 5 is a device. A device is a packaged NAND flash cell and may also be called a package, a flash memory chip, a NAND flash chip, etc. One storage device (e.g., SSD) may include one or more devices, and one device may include one or more targets. One target may include one or more dies.

[0073] For example, the NAND flash chip 131 shown in Figure 5 includes two targets: target 510 and target 520. Each target includes four dies: target 510 includes die 511, die 512, die 513, and die 514, and target 520 includes die 521, die 522, die 523, and die 524.

[0074] A die is sometimes called a logical unit (LUN). A die may contain one or more planes. Each plane may contain a number of block pages, each block page may contain a number of page pages, and each page may contain a number of cells.

[0075] The number of flash memory channels directly reflects the simultaneous read / write capabilities of the solid-state disk. One channel may have one or more dies. Each device supports one or more channels.

[0076] For example, the NAND flash chip 131 shown in Figure 5 further includes an input / output interface 501, a channel 502, a channel 503, a channel 504, and a channel 505. The channel 502 is connected to the die 511 and the die 512, the channel 503 is connected to the die 513 and the die 514, the channel 504 is connected to the die 521 and the die 522, and the channel 505 is connected to the die 523 and the die 524.

[0077] The input / output interface 501 of the NAND flash chip 131 is connected to the flash memory controller via an NFI bus, receives commands from the flash memory controller, and may read data stored in the NAND flash chip 131, write data to the NAND flash chip 131, delete data from the NAND flash chip 131, etc. based on the received commands. For example, if a read command received by the NAND flash chip 131 is to read data stored in the die 511, the data stored in the die 511 may be read via the channel 502, and then the read data may be sent to the flash memory controller. As another example, if a write command received by the NAND flash chip 131 is to write data to the die 524, the data may be written to the die 524 via the channel 505.

[0078] The data interface of the NAND flash chip is not limited in this embodiment of the present application and may be SDR, NV-DDR, NV-DDR2, or NV-DDR3.

[0079] The ideal data width of the NFI bus refers to the time occupied for a single data transmission in an ideal transmission environment. An ideal transmission environment means that transmission loss is not taken into account during data transmission. For example, if the transmission rate of the NFI bus is 400 million times per second (MT / s), the time occupied by each data transmission is 1 / 400×10 8 seconds, i.e., the ideal data width corresponding to each time data transmission is 2.5 ns.

[0080] The ideal data width of the NFI bus is related to the performance, capacity, and speed specifications of the flash memory chip. The transmission rate of the NFI bus is correlated with the ideal data width of the NFI bus. Therefore, as the transmission rate of the NFI bus increases, the ideal data width of the NFI bus decreases accordingly. For example, if the transmission rate of the NFI bus is 400 MT / s, the ideal data width of the NFI bus is 2.5 ns; if the transmission rate of the NFI bus is 800 MT / s, the ideal data width of the NFI bus is 1.25 ns; if the transmission rate of the NFI bus is 1,200 MT / s, the ideal data width of the NFI bus is 0.83 ns; or if the transmission rate of the NFI bus is 1,600 MT / s, the ideal data width of the NFI bus is 0.625 ns.

[0081] As shown in Figure 3, the difference between t2 and t1 is the effective data width. The smaller the ideal data width of the NFI bus, the smaller the difference between t2 and t1. Correspondingly, the difference between t1 and tmin and the difference between tmax and t2 also decrease accordingly. This reduces the timing margin. In addition, in the actual data transmission process, the data transmitted by the transmitting end at the ideal data width is attenuated through the transmission channel, reducing the data width actually received by the receiving end. This makes the NFI bus more susceptible to external factors such as temperature and voltage. This can result in reliability issues in the NFI bus channel, leading to data transmission problems, such as bit errors during data transmission.

[0082] The concepts of effective width and margin effective width will be explained below.

[0083] The effective width may be defined as the signal width at which data of an ideal width at the transmitting end is actually acquired by the receiving end after it arrives at the receiving end after being attenuated when passing through a transmission channel. The margin effective width is the signal width at which preset data is correctly sampled by the receiving end after it is transmitted to the receiving end at the ideal signal width at the transmitting end. When compared with the effective width, the margin effective width eliminates the time remaining after the data setup time and data hold time.

[0084] For example, if a total of n bits can be transmitted in a DQS cycle, and the transmission rate is 400 Mbps, i.e., 4×108 bits are transmitted per second, the time required to transmit each bit is 1 s / (4×108)=2.5 ns, i.e., the ideal signal width corresponding to each bit is 2.5 ns. After the signal reaches the receiving end through the transmission channel, the ideal signal width is reduced, and the effective signal width actually received correctly by the receiving end is 2 ns.

[0085] Here, bps is the unit of bit rate, which is the rate at which a signal (represented by digital binary bits) is processed or transmitted by a system (device, radio wave, or wire), i.e., the amount of data processed or transmitted per unit time. The unit is "bits per second" (bit / s or bps). Bit rate can be used to indicate connection speed, transmission speed, channel capacity, maximum throughput, digital bandwidth capacity, etc. in the field of communications. In this application, bit rate can be used to indicate the bus rate for transmission between a controller and NAND flash.

[0086] In addition, the "margin effective width" may also be referred to as the effective width of the timing margin. This is equivalent to the aforementioned "timing margin," with the only difference being that the concept of the "margin effective width" is defined in this application to measure the "timing margin." Here, "margin" can be translated into English as "margin," and "margin" in this application may refer to the "margin effective width." Therefore, unless otherwise specified, the timing margin in this embodiment of the application can be understood as the effective width of the timing margin.

[0087] An embodiment of the present application provides a method for optimizing a flash memory chip, by which voltage margins and timing margins are optimized in the service execution process of the flash memory chip, so as to reduce the data transmission bit error rate and improve the reliability of the flash memory chip.

[0088] The technical solution of the present application can be applied to a device provided with a NAND flash chip, provided that the device has the structure shown in Figure 2. In other words, in addition to the SSD shown in Figure 1, the basic solution of the present application may also be applied to other devices that communicate with a NAND flash chip via an NFI bus, such as an add-in card (AIC), a secure digital memory card (SD card), and an electronic device that uses a NAND flash chip as a storage medium (e.g., a mobile phone, a tablet computer, a digital camera, or an ECU).

[0089] FIG. 6 is a schematic flowchart of a method for optimizing a flash memory chip according to an embodiment of the present application.

[0090] As shown in FIG. 6, after completing power-on initialization, timing training, and voltage training, the flash memory chip begins a service execution phase (i.e., it may read data stored in the flash memory chip, write data to the flash memory chip, delete data from the flash memory chip, etc.). In the service execution process, it is determined whether a trigger condition is met; if the trigger condition is not met, monitoring continues; if the trigger condition is met, one or more channels of the flash memory chip are selected and paused; and after the die of the selected passband changes to an idle state, a margin test is performed on the selected channels to determine whether the margin of the selected channels meets the requirements. If the margin of the selected channels does not meet the requirements, the channels may be optimized; or, if the margin of the selected channels meets the requirements, it is determined whether margin testing has been performed on all channels of the flash memory chip. If "No," margin testing continues to be performed on the remaining channels; or, if margin testing has been performed on all channels, it continues to monitor whether the trigger condition is met.

[0091] In the following, with reference to the NAND flash chip 131 shown in FIG. 5, a schematic flowchart of the method for optimizing a flash memory chip according to this embodiment of the present application shown in FIG. 6 will be described.

[0092] It is assumed that the NAND flash chip 131 is powered on at time t0, power-on initialization is completed at time t1, and timing training and voltage training are completed at time t2. In this case, from time t2, the NAND flash chip 131 may be considered to be in a service execution phase. In other words, from time t2, read / write operations may be performed on the NAND flash chip 131, or data in the NAND flash chip 131 may be erased.

[0093] In some embodiments, operating environment data may be monitored, and whether a trigger condition is met is determined based on the monitored operating environment data. The operating environment data may include temperature and / or humidity. Temperature monitoring may be implemented using a temperature sensor, and humidity monitoring may be implemented using a humidity sensor.

[0094] For example, an upper temperature limit may be set, and if the monitored temperature is greater than the upper temperature limit, the trigger condition may be determined to be met. As another example, an upper temperature limit and a lower temperature limit may be set, and if the monitored temperature is greater than the upper temperature limit or less than the lower temperature limit, the trigger condition may be determined to be met.

[0095] As another example, a temperature upper limit and a humidity upper limit may be set. If both the monitored temperature and the monitored humidity simultaneously meet their corresponding upper limits (i.e., the temperature meets the temperature upper limit and the humidity meets the humidity upper limit), the trigger condition may be determined to be met. If at least one of the monitored temperature and the monitored humidity does not meet its corresponding upper limit (e.g., the temperature is greater than the temperature upper limit but the humidity is less than the humidity upper limit), the trigger condition may be determined not to be met.

[0096] The temperature compared to the temperature threshold may be a real-time temperature monitored by a temperature sensor or an average temperature value over a period of time. Similarly, the humidity compared to the humidity threshold may be a real-time humidity monitored by a humidity sensor or an average humidity value over a period of time.

[0097] In some other embodiments, operating parameters of the NAND flash chip 131 may be monitored, and whether the trigger condition is met is determined based on the monitored operating parameters. The operating parameters may include one or more of an operating voltage, a data transmission amount, a current state of a channel, etc. The operating voltage may be an operating voltage of the NAND flash chip 131 or an interface voltage for transmitting data.

[0098] For example, a data transmission amount lower limit may be set, and if the data transmission amount of the NAND flash chip 131 is less than the data transmission amount lower limit, it may be determined that the trigger condition is met.

[0099] As another example, if it is determined that the NAND flash chip 131 has idle channels or the number of idle channels is greater than a preset number, it may be determined that the trigger condition is met.

[0100] In some other embodiments, a timer may be set. If the timer expires, it may be determined that the trigger condition is met. Additionally, the timer may be restarted after all channels have completed margin testing.

[0101] In some other embodiments, multiple operating environment data, operating parameters, or timers may be monitored simultaneously to determine if a trigger condition is met.

[0102] In some embodiments, a trigger condition may be determined to be met only when multiple monitored data simultaneously satisfy corresponding conditions. For example, the temperature of a storage device and a timer are simultaneously monitored. If the temperature of the storage device is greater than a preset upper limit temperature and the timer has expired, the trigger condition may be determined to be met; or, if the temperature of the storage device is greater than a preset upper limit temperature but the timer has not expired, the trigger condition may be determined not to be met.

[0103] In some other embodiments, the trigger condition may be determined to be met when any one of the multiple monitored data satisfies a corresponding condition. For example, the temperature of the storage device and a timer are simultaneously monitored. If the temperature of the storage device is greater than a preset upper limit temperature and / or the timer has expired, the trigger condition may be determined to be met; or if the temperature of the storage device is less than a preset upper limit temperature and the timer has not expired, the trigger condition may be determined not to be met.

[0104] When a trigger condition is met, one or more channels may be selected to be paused.

[0105] In some embodiments, the pause channel may be selected randomly.

[0106] In some other embodiments, the pause channel may be selected based on the data traffic of the channel. For example, an idle channel may be selected first, followed by a channel performing a service read / write. In another example, a channel with a relatively low data traffic may be selected first, followed by a channel with a relatively high data service flow.

[0107] If the number of selected paused channels is less than the total number of channels, the unselected channels continue to operate normally.

[0108] 5 are assumed to be selected to be suspended, in which case normal read / write operations may be performed on die 521-die 524 via channel 504 and channel 505.

[0109] After channel 502 and channel 503 are paused, the states of die corresponding to channel 502 and channel 503 may be changed to idle. It is assumed that the states of die 511 and die 512 may change to idle, and margin testing may be performed on channel 502. After margin testing is performed on channel 502, margin testing may be performed on channel 503 if die 513 and die 514 are in idle states.

[0110] Margin testing can be categorized into timing margin testing and voltage margin testing. Channel 502 is used as an example to explain margin testing.

[0111] In some embodiments, performing a margin test on channel 502 may include performing a timing margin test only on channel 502. In this case, if channel 502 passes the timing margin test, it may be determined that channel 502 does not need to be optimized; or, if channel 502 does not pass the timing margin test, it may be determined that channel 502 is a target channel for optimization.

[0112] In some other embodiments, performing a margin test on channel 502 may involve performing a voltage margin test only on channel 502. In this case, if channel 502 passes the voltage margin test, it may be determined that channel 502 does not need to be optimized; or, if channel 502 does not pass the voltage margin test, it may be determined that channel 502 is a target channel for optimization.

[0113] In some other embodiments, performing margin testing on the channel 502 may include performing timing margin testing and voltage margin testing on the channel 502.

[0114] If both timing margin testing and voltage margin testing are performed on a channel 502, whether the channel 502 passes the margin testing may be determined in several ways.

[0115] For example, in one implementation, the channel 502 may be determined to have passed the margin test only if both tests pass. In other words, if the channel 502 does not pass the timing margin test or if the channel 502 does not pass the voltage margin test, the channel 502 may be determined to have failed the margin test.

[0116] As another example, in another implementation, a channel 502 may be determined to have passed the margin test if one of the other margin tests passes. In other words, a channel 502 may be determined to have passed the margin test if either the channel 502 passes the timing margin test or the channel 502 passes the voltage margin test. In this case, the two margin tests may be performed in sequence. If the first margin test performed passes, the other margin test may not be performed. For example, a timing margin test may be performed on the channel 502 first. If the channel 502 passes the timing margin test, the channel 502 may be directly determined to have passed the margin test, and there is no need to continue performing a voltage margin test on the channel 502. If the channel 502 does not pass the timing margin test, a voltage margin test is performed on the channel 502. If the channel 502 passes the voltage margin test, the channel 502 may be determined to have passed the margin test. If the channel 502 does not pass the voltage margin test, the channel 502 may be determined to have failed the margin test.

[0117] The timing margin test and the voltage margin test will be described below with reference to FIGS.

[0118] Figure 7 is a schematic diagram of the connection between the flash memory controller and the die. The input / output interface 701 shown in Figure 7 is the input / output interface of the flash memory controller. The input / output interface 703 shown in Figure 7 is the input / output interface of the die.

[0119] 7, the input / output interface 701 includes a voltage divider module 702. The voltage divider module 702 may implement a timing margin test.

[0120] 8 is a flowchart of the timing margin test. It is assumed that the voltage dividing module 702 may set N levels of reference voltage Vref (N is a positive integer equal to or greater than 2). The N levels of voltage are designated as V1, V2, ..., and V N It may be expressed as:

[0121] 801: Set the Vref level to V1.

[0122] 802: The current level of Vref is V N Determines whether the current level of Vref is less than or equal to the maximum level of the reference voltage, V N If so, the subsequent steps of the timing margin test continue to be performed.

[0123] 803: Write test data to NAND flash chip.

[0124] Optionally, the test data may be written to the NAND flash chip at a relatively low rate, which can reduce the probability of errors during writing. For example, Table 1 shows the correspondence between NFI bus operating modes and rates in this embodiment of the present application. Different operating modes correspond to different bus rates.

[0125] [Table 1]

[0126] For example, the bus rate corresponding to the NV-DDR operating mode is 40 to 200 million bits per second (Mbps), and the low rate corresponding to the NV-DDR operating mode may be 40 Mbps or 48 Mbps.

[0127] The data written to the NAND flash chip may be data that is prone to transmission errors, such as 0x5AA55AA5 or 0xA55AA55A. The test data may be written to a cache register of the NAND flash chip. Writing the test data to the cache register of the NAND flash chip instead of another deeper area (e.g., a data register or a NAND flash array) may reduce the probability of errors occurring during data transmission within the NAND flash chip.

[0128] 804: A read direction timing margin test is performed and the effective width of the read direction timing margin is recorded.

[0129] After the test data is written to the NAND flash chip, the test data written in step 803 may be read. In the test data reading process, the write direction effective eye width of the DQ signal is recorded to obtain the current level read direction timing margin effective width Trx1.

[0130] 805: A write direction timing margin test is performed and the effective width of the write direction timing margin is recorded.

[0131] After the read direction timing margin test is completed, test data is written at a normal rate to perform a write direction timing margin test. During the test data writing process, the write direction effective eye width of the DQ signal is recorded to obtain the current level write direction timing margin effective width Ttx1.

[0132] 806: Change the Vref level to the next level, i.e., Vref=V n+1 and continues to perform the read direction timing margin test and the write direction timing margin test to sequentially obtain N levels of read direction timing effective widths and N levels of write direction timing effective widths.

[0133] After the N levels of read direction timing effective widths and the N levels of write direction timing effective widths are obtained, it may be determined whether the timing margin test has passed based on the N levels of read direction timing effective widths and the N levels of write direction timing effective widths. For ease of explanation, the N levels of read direction timing effective widths may be referred to as N read timing effective widths, and the N levels of write direction timing effective widths may be referred to as N write timing effective widths.

[0134] In some embodiments, a channel may be considered to have passed the timing margin test if both the N read timing pay widths and the N write timing pay widths pass the timing margin test. In other words, a channel may be considered to have failed the timing margin test if either the N read timing pay widths or the N write timing pay widths do not pass the margin test.

[0135] In some embodiments, the read direction timing effective widths of the N levels each correspond to a threshold range. For example, the read direction timing effective widths of the N levels are assumed to be Trx1, Trx2, ..., and TrxN, respectively. The threshold range of Trx1 is [Th1_Trx1, Th2_Trx1], the threshold range of Trx2 is [Th1_Trx2, Th2_Trx2], ..., and the threshold range of TrxN is [Th1_TrxN, Th2_TrxN]. If the read direction timing effective width of a level is within the corresponding threshold range, the read direction timing effective width of this level may be considered to pass the timing margin test. Similarly, the write direction timing effective widths of the N levels each correspond to a threshold range. For example, the write direction timing effective widths of the N levels are assumed to be Ttx1, Ttx2, ..., and TtxN, respectively. The threshold range of Ttx1 is [Th1_Ttx1, Th2_Ttx1], the threshold range of Ttx2 is [Th1_Ttx2, Th2_Ttx2], ..., and the threshold range of TrxN is [Th1_TtxN, Th2_TtxN]. If the write direction timing effective width of a certain level is within the corresponding threshold range, the write direction timing effective width of this level may be considered to pass the timing margin test.

[0136] In some other embodiments, the read direction timing effective widths of the N levels each have a lower limit value. If the read direction timing effective width of a level exceeds the lower limit value corresponding to that level, the read direction timing effective width at that level may be considered to have passed the timing margin test. Similarly, the write direction timing effective widths of the N levels each have a lower limit value. If the write direction timing effective width of a level exceeds the lower limit value corresponding to that level, the write direction timing effective width at that level may be considered to have passed the timing margin test.

[0137] In some other embodiments, a channel may be considered to pass the timing margin test if the level at which it passes the timing margin test exceeds a preset ratio.

[0138] In some embodiments, the level ratios of the passed margin test in the read direction and the write direction are counted separately. The two level ratios are compared with a preset ratio separately. If both of the two level ratios exceed the preset ratio, the channel may be considered to have passed the timing margin test.

[0139] For example, it is assumed that the preset ratio is 50%, a read direction timing margin width of 75% level passes the timing margin test, and a write direction timing margin width of 90% level passes the timing margin test, in which case the channel may be considered to have passed the timing margin test.

[0140] As another example, assume that the preset ratio is 50%, a read direction timing pay width of 75% level passes the timing margin test, and a write direction timing pay width of 40% level passes the timing margin test, in which case the channel may be deemed to have failed the timing margin test.

[0141] In some other embodiments, the ratio of the total levels that pass the timing margin test may be counted. If the ratio of the total levels exceeds a preset ratio, the channel may be considered to have passed the timing margin test. Otherwise, the channel is considered to have failed the timing margin test.

[0142] For example, assume that N=10, the preset ratio is 50%, three levels of read direction timing valid widths pass the timing margin test, and eight levels of write direction timing valid widths pass the timing margin test. The ratio of the total levels that pass the timing margin test is (3+8) / (10+10)=11 / 20. It can be learned that the ratio of the total levels that pass the timing margin test is greater than 50%. Therefore, the channel may be considered to pass the timing margin test.

[0143] In some other embodiments, two preset thresholds may be set, and the two preset thresholds may be referred to as preset timing threshold 1 and preset timing threshold 2, respectively. After the N read timing valid widths and the N write timing valid widths are determined, a maximum value of the N read timing valid widths (which may be represented by Max_rx) and a maximum value of the N write timing valid widths (which may be represented by Max_tx) may be determined. If Max_rx is less than or equal to preset timing threshold 1 and Max_tx is less than or equal to preset timing threshold 2, the channel may be considered to have passed the timing margin test. If Max_rx is greater than preset timing threshold 1 or Max_tx is greater than preset timing threshold 2, the channel may be considered to have failed the timing margin test.

[0144] In some other embodiments, a maximum value of the N read timing valid widths and the N write timing valid widths may be determined, and if the maximum value is less than or equal to a preset threshold, the channel may be deemed to have passed the timing margin test; or if the maximum value is greater than the preset threshold, the channel may be deemed to have failed the timing margin test.

[0145] In the aforementioned embodiment, the maximum value of the timing bandwidth is compared with a preset threshold value. In some other embodiments, an average value of the timing bandwidth may be further determined, and whether the channel passes the timing margin test is determined by comparing the determined average value with a preset threshold value.

[0146] For example, in some embodiments, an average value of N read timing valid widths (which may be represented by Avg_rx) and an average value of N write timing valid widths (which may be represented by Avg_tx) may be counted. If Avg_rx is less than or equal to a preset threshold (which may be referred to as preset timing threshold 3) and Avg_tx is less than or equal to another preset threshold (which may be referred to as preset timing threshold 4), the channel may be deemed to have passed the timing margin test; alternatively, if Avg_rx is greater than preset timing threshold 3 or Avg_tx is greater than preset timing threshold 4, the channel may be deemed to have failed the timing margin test.

[0147] In some other embodiments, the average value of the N read timing valid widths and the N write timing valid widths may be counted. If the average value is less than or equal to a preset threshold, the channel may be deemed to have passed the timing margin test; or if the average value is greater than the preset threshold, the channel may be deemed to have failed the timing margin test.

[0148] 9 is a schematic diagram of a flash memory controller. Voltage margin testing may be implemented via a delay locked loop (DLL) and a delay line (DL) in a DLL / DL module in the flash memory controller shown in FIG.

[0149] 10 is a schematic flow chart of the voltage margin test. It is assumed that the DLL / DL module shown in FIG. 10 can set the number of DQS delay levels to N (N is a positive integer equal to or greater than 2). The N levels of delay are denoted as T1, T2, ..., and T N may be expressed by

[0150] 1001: Set the initial level of DQS delay to T1.

[0151] 1002: The current level of DQS delay is T N Determines whether the current level of DQS delay is less than or equal to the maximum delay level T N If so, the subsequent steps of the voltage margin test continue.

[0152] 1003: Write test data to NAND flash chip.

[0153] Similar to the timing margin testing process of Figure 8, the test data may also be written to the NAND flash chip at a relatively slow rate. The test data may also be prone to errors. The location of the written test data may be a cache register within the NAND flash chip.

[0154] 1004: A read direction timing margin test is performed and the read direction voltage margin is recorded.

[0155] After the test data is written into the NAND flash chip, the written test data may be read. In the test data reading process, the high electrical level Vrx1h and the low electrical level Vrx1l in the read direction of the current level are obtained, and the sum of Vrx1h and Vrx1l is determined as the voltage margin Vrx1 in the read direction of the current level.

[0156] 1005: Perform write direction timing margin test and record write direction voltage margin.

[0157] In the test data write process, the high electrical level Vtx1h and the low electrical level Vtx1l in the write direction of the current level are obtained, and the sum of Vtx1h and Vtx1l is determined as the voltage margin Vtx1 in the write direction of the current level.

[0158] 1006: Set the DQS delay level to the next level, i.e., T n+1 and continues to perform the read direction voltage margin test and the write direction voltage margin test to sequentially obtain N levels of read direction voltage margins and N levels of write direction voltage margins.

[0159] After the N levels of read direction voltage margins and the N levels of write direction voltage margins are obtained, it may be determined whether the voltage margin test has passed based on the N levels of read direction voltage margins and the N levels of write direction voltage margins. For ease of explanation, the N levels of read direction voltage margins may be referred to as N read voltage margins, and the N levels of write direction voltage margins may be referred to as N write voltage margins.

[0160] The manner in which a channel determines whether it passes the voltage margin test is similar to the manner in which a channel determines whether it passes the timing margin test.

[0161] For example, in some embodiments, each voltage margin may have a corresponding threshold range, and if both the N read voltage margins and the N write voltage margins are within the corresponding threshold ranges, the channel may be determined to have passed the voltage margin test; or if the voltage margins are not within the corresponding threshold ranges, the channel may be determined to have failed the margin test.

[0162] As another example, in some embodiments, the maximum of the N read voltage margins may be compared to a preset threshold, and the maximum of the N write voltage margins may be compared to a preset threshold, and based on the comparison results, it is determined whether the channel passes the margin test.

[0163] As another example, in some other embodiments, the threshold value may be compared to an average value of the voltage margin.

[0164] For a specific implementation of determining whether a channel passes a voltage margin test, please refer to the description of determining whether a channel passes a timing margin test, and for the sake of brevity, the details will not be described again here.

[0165] It is assumed that channel 502 passes the margin test and channel 503 does not pass the margin test. In this case, channel 503 may be determined to be the channel to be optimized. In this case, channel 502 does not need to be optimized, but channel 503 does. The channel optimization process will be described below with reference to Figures 11 and 12.

[0166] Channel optimization may be categorized into voltage margin optimization and timing margin optimization.

[0167] In some embodiments, both voltage margin optimization and timing margin optimization may be performed on the channel being optimized (eg, channel 503).

[0168] In some other embodiments, only voltage margin optimization or only timing margin optimization may be performed for the channel being optimized (eg, channel 503).

[0169] For example, if channel 503 passes the voltage margin test but does not pass the timing margin test, timing margin optimization may be performed on channel 503 .

[0170] In another example, if channel 503 passes the timing margin test but does not pass the voltage margin test, voltage margin optimization may be performed on channel 503 .

[0171] FIG. 11 is a schematic flow chart of voltage margin optimization according to an embodiment of the present application.

[0172] 1101: Obtain K read margins and K write margins, where the K read margins correspond one-to-one to the K levels, the K write margins correspond one-to-one to the K levels, and K is a positive integer greater than 1.

[0173] As described above, in the process of performing a timing margin test, timing margin effective widths in the read direction of N voltage levels and timing margin effective widths in the write direction of N levels may be extracted.

[0174] In some embodiments, K voltage levels (K is a positive integer greater than 1 and less than N) and read direction timing margin effective widths and write direction timing margin effective widths corresponding to the K voltage levels may be selected from the N voltage levels. The selected K voltage levels are the K levels in step 1101, the read direction timing margin effective widths corresponding to the K voltage levels are the K read margins in step 1101, and the write direction timing margin effective widths corresponding to the K voltage levels are the K write margins in step 1101.

[0175] There may be multiple methods for selecting K voltage levels from the N voltage levels. For example, the K voltage levels may be selected randomly. As another example, the K voltage levels corresponding to the largest K read direction timing margin effective widths among the read direction timing margin effective widths may be selected, where K may be a preset value or a positive integer calculated based on a preset ratio. As another example, the K voltage levels corresponding to the largest K write direction timing margin effective widths among the write direction timing margin effective widths may be selected, where K may be a preset value or a positive integer calculated based on a preset ratio.

[0176] In some other embodiments, the K levels may be the same as the N voltage levels. In other words, the N voltage levels obtained in the timing margin test and the read direction timing margin effective width and write direction timing margin effective width of each voltage level may be directly used in step 1101. In this case, the value of K is the same as the value of N.

[0177] If the K levels are K voltage levels, the K read margins may also be referred to as K read timing margins, and the K write margins may also be referred to as K write timing margins.

[0178] As described above, in the process of performing a voltage margin test, the read direction voltage margin and the write direction voltage margin for the N DQS delay levels may be obtained.

[0179] Similarly, in some embodiments, K DQS delay levels (K is a positive integer greater than 1 and less than N) and read direction voltage margins and write direction voltage margins corresponding to the K DQS delay levels may be selected from the N DQS delay levels. The selected K DQS delay levels are the K levels of step 1101, the read direction voltage margins corresponding to the K DQS delay levels are the K read margins of step 1101, and the write direction voltage margins corresponding to the K DQS delay levels are the K write margins of step 1101.

[0180] There may be multiple ways to select the K DQS delay levels from the N DQS delay levels. For example, the K DQS delay levels may be selected randomly. As another example, the K voltage levels corresponding to the largest K read direction voltage margins among the read direction voltage margins may be selected, where K may be a preset value or a positive integer calculated based on a preset ratio. As another example, the K voltage levels corresponding to the largest K write direction voltage margins may be selected, where K may be a preset value or a positive integer calculated based on a preset ratio.

[0181] In some other embodiments, the K levels may be the same as the N DQS delay levels. In other words, the N DQS delay levels and the read direction voltage margin and write direction voltage margin of each DQS delay level obtained in the voltage margin test may be directly used in step 1101. In this case, the value of K is the same as the value of N.

[0182] If the K levels are K DQS delay levels, the K read margins may also be referred to as K read voltage margins, and the K write margins may also be referred to as K write voltage margins.

[0183] 1102: Determine optimization parameters based on the K read margins and K write margins obtained in step 1101.

[0184] A read optimization voltage may be determined based on the K read margins, and a write / read voltage may be determined based on the K write margins.

[0185] For example, the read optimization voltage may be determined by using the following formula:

number

[0186] The write optimization voltage may be determined by using the following formula:

number

[0187] As another example, the read optimization voltage may be the arithmetic mean of the K read direction voltage margins, ie, the read optimization voltage may be determined by using the following formula:

number

[0188] The write optimization voltage may be the arithmetic mean of the K write direction voltage margins, ie, the optimization voltage may be determined by using the following formula:

number

[0189] In the above-described embodiment, the process of determining the read and write optimized voltages uses all of the read and write margins determined in step 1101. In some other embodiments, the process of determining the read and write optimized voltages may use some of the read and write margins determined in step 1101. For example, after the maximum read margin, the minimum read margin, the maximum write margin, and the minimum write margin are eliminated, the remaining read margins are averaged to obtain the read optimized voltage, and the remaining write margins are averaged to obtain the write voltage margin.

[0190] In the above embodiment, the read reference voltage and the write reference voltage can be optimized to reduce the probability of errors in the transmission between the flash memory controller and the NAND flash chips, and improve the storage performance.

[0191] FIG. 12 is a schematic flow chart of timing margin optimization according to one embodiment of the present application.

[0192] 1201: Write test data to NAND flash chip.

[0193] Similar to the timing margin testing process of Figure 8, the test data may also be written to the NAND flash chip at a relatively slow rate. The test data may also be prone to errors. The location of the written test data may be a cache register within the NAND flash chip.

[0194] 1202: Obtain the effective width of the timing margin of DQ.

[0195] 1203: Determine a left boundary (L_Boundary) and a right boundary (R_Boundary) based on the timing margin effective width, where the left boundary is the maximum value of the minimum values ​​of the timing margin effective widths of all DQs, and the right boundary is the minimum value of the maximum values ​​of all corresponding timing margin effective widths when all DQs are aligned with the left boundary.

[0196] 1204: Calculate a first center position based on the left and right boundaries. During training of the read data, the first center position is the center of the minimum margin effective width obtained after all DQs are aligned.

[0197] The first centering position is the average of the left and right boundaries, ie, Centering=-(L_Boundary-R_Boundary) / 2.

[0198] 1205: The delay line DL of the DQS is adjusted to a first center position so that the edge of the DQS signal is positioned at the center point of the margin effective width of the DQ.

[0199] In addition, the method further includes the steps of assigning a delay line DL value corresponding to the first center position to a DQS register; and assigning a DL value of each DQ to a corresponding DQ register, where the DL value of each DQ is a value obtained by converting a length that needs to be adjusted to align each DQ with an edge of the DQS into a scale unit corresponding to the DQ.

[0200] Optionally, the scale of the DQS is different from the scale of the DQ. Specifically, the DQS signal has a relatively large number of scale values. For example, there are a total of 1024 tap numbers, and the time represented by the unit scale is determined by the DQS cycle, i.e., the DQS cycle measured by the DLL is divided into 1024. The DQ signal has a relatively small number of scale values. For example, there are a total of 20 tap numbers, and the time represented by the unit scale is fixed (determined by the precision of the hardware circuit). Furthermore, the scale unit may be set to 5 ps, 10 ps, ​​20 ps, ​​etc.

[0201] The parameters used to adjust the DQS delay line to the first center position may be referred to as read-optimized DQS timing optimization parameters.

[0202] 1206: Perform write direction margin timing training to obtain a second center position. During the write data training, the second center position is the center of the minimum margin effective width obtained after all DQs are aligned.

[0203] After the read direction training is completed, the pre-set or custom data is written at a normal rate, and then a read command is sent to read the data just written, and write direction timing training is performed.

[0204] The written preset data or custom data may be the same as or different from the preset data in the read direction, which is not limited in this embodiment of the present application.

[0205] After the write direction training is completed, the delay line DL corresponding to the second center position is assigned to the DQS register, and the DL value of each DQ is assigned to the corresponding DQ register. The DL value of each DQ is obtained by converting the length that needs to be adjusted to align each DQ with the edge of the DQS into a scale unit corresponding to the DQ.

[0206] The parameters used to adjust the DQS delay line to the second center position may be referred to as write-optimized DQS timing optimization parameters.

[0207] In the above method, training data is written at a low rate, and then a read command is sent to read the training data, thereby performing read direction timing training. A first center position of the read training direction is determined using the values ​​of the left and right boundaries of the DQ margin effective width on the NFI bus, and the delay line of the DQ signal on the controller side is automatically adjusted to maximize the timing margin effective width of all DQ signals, adjust the delay line of the DQS signal to the first center position, and position the DQS signal edge at the optimal sampling point of the DQ signal. Further, custom data is written at a normal rate, a read command is sent to read the just-written data, and then write direction timing training is performed to determine a second center position. Then, the delay line of the DQ signal on the controller is automatically adjusted to maximize the margin effective width of all received DQ signals, and the controller adjusts the delay line of the DQS signal to the second center position, so that the edge of the DQS signal received by the NAND flash receiving end is positioned at the optimal sampling point of the DQ signal. In conclusion, in the above solution, the timing margin can be optimized by adjusting the position of the delay line of the DQS signal to enable the timing margin effective width of the signal at the receiving end to be maximized, and the setup time margin and hold time margin to be maximized, thereby meeting the specification requirements and avoiding data loss caused by bit errors during data read / write.

[0208] The left and right bounds may be determined in one of three specific implementations:

[0209] Method 1: The left and right boundaries are determined based on a preset boundary range [a, b].

[0210] Method 2: The left and right boundaries are determined by using 1 / 4 of the DQS cycle as the starting position and adjusting the DQS position left or right.

[0211] Method 3: The left and right boundaries are determined by gradually adjusting the DQS position from left to right from the initial scale value.

[0212] FIG. 13 is a schematic flowchart of a method for optimizing a flash memory chip according to an embodiment of the present application.

[0213] 1301: In a service execution process of a flash memory chip, suspend N channels in a nonvolatile flash interface NFI bus of the flash memory chip, where N is an integer greater than or equal to 1 and less than or equal to the total number of channels in the NFI bus.

[0214] 1302: Determine at least one channel to be optimized from the N channels.

[0215] 1303: Determine an optimization parameter for each optimization target channel based on training data for each optimization target channel in the at least one optimization target channel.

[0216] 1304: Optimize each optimization target channel based on the optimization parameters of each optimization target channel.

[0217] For specific implementations of determining the optimization target channel and optimizing the parameters, please refer to the above-mentioned embodiments, and for the sake of brevity, the details will not be described again here.

[0218] In the above technical solution, during the execution process of the flash memory chip, some channels among the multiple channels are selected for detection and optimization. In other words, other channels in the NFI bus are in normal operation. Therefore, the channel parameters can be optimized without disconnecting the disk. The margin determination specification may be less dependent on the physical environment and operating state, and the margin determination specification may be further compressed, thereby reserving more margin for the interface link and supporting higher data rates.

[0219] 14 is a schematic block diagram of the structure of an electronic device according to an embodiment of the present application. The electronic device 1400 shown in FIG. 14 may be the SSD 100 shown in FIG. 1, the SSD controller 110 shown in FIG. 1, or the flash memory controller 113 shown in FIG. 1.

[0220] The processing unit 1401 is configured to suspend N channels in a non-volatile flash interface NFI bus of the flash memory chip in a service execution process of the flash memory chip, where N is an integer greater than or equal to 1 and less than or equal to the total number of channels in the NFI bus.

[0221] The determining unit 1402 is configured to determine at least one channel to be optimized from the N channels.

[0222] The determining unit 1402 is further configured to determine, based on training data of each optimization target channel in the at least one optimization target channel, an optimization parameter for each optimization target channel.

[0223] The optimization unit 1403 is configured to optimize each optimization target channel based on the optimization parameters of each optimization target channel.

[0224] Please refer to the above embodiments for the specific functions and beneficial effects of the processing unit 1401, the determining unit 1402, and the optimizing unit 1403. For the sake of brevity, the details will not be described again.

[0225] An embodiment of the present application further provides a chip system, which includes a logic circuit, coupled to an input / output interface and configured to transmit data through the input / output interface to perform the method described in the above embodiment.

[0226] The chip system may be the flash memory controller 113 shown in FIG. 1, or may be the SSD controller 110 shown in FIG.

[0227] An embodiment of the present application further provides an SSD, which includes the aforementioned chip system.

[0228] An embodiment of the present application further provides a computer-readable medium, which stores computer program code, and when the program code is executed on a computer, enables the computer to perform the method of the aforementioned embodiment.

[0229] In implementation, the steps in the aforementioned method can be implemented by using hardware integrated logic circuits in a processor or by using instructions in the form of software. The steps of the method disclosed with reference to the embodiments of the present application may be directly performed by a hardware processor, or may be performed by using a combination of hardware and software modules in a processor. The software modules may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the aforementioned method in combination with the hardware of the processor. To avoid repetition, details will not be described again in this specification.

[0230] It should be noted that the processor in the embodiments of the present application may be an integrated circuit chip and have signal processing capabilities. During implementation, the steps in the aforementioned method embodiments can be implemented by using hardware integrated logic circuits in the processor or by using instructions in the form of software. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the methods disclosed with reference to the embodiments of the present application may be directly performed and achieved by a hardware decoding processor, or may be performed and achieved by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads information in the memory and completes the aforementioned method steps in combination with the processor's hardware.

[0231] It can be understood that the memory in the embodiments of the present application may be volatile memory or nonvolatile memory, or may include volatile memory and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example and not limitation, several forms of RAM may be used, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), and direct rambus dynamic random access memory (direct rambus RAM, DR RAM). It should be noted that memory in the systems and methods described herein includes, but is not limited to, these and any other suitable types of memory.

[0232] According to the methods provided in the embodiments of the present application, the present application further provides a computer program product, which includes computer program code, and when the computer program code is executed on a computer, enables the computer to perform the methods shown in the foregoing embodiments.

[0233] Those skilled in the art may recognize that, in combination with the examples described in the embodiments disclosed herein, the units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether a function is implemented by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may implement the described functions using different methods for each specific application, but such implementation should not be considered as going beyond the scope of this application.

[0234] It will be clearly understood by those skilled in the art that for the purpose of convenience, the detailed operating processes of the aforementioned systems, devices and units should refer to the corresponding processes of the aforementioned method embodiments, and the details will not be described again here.

[0235] In some embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the described device embodiments are merely examples. For example, the division into units is merely a logical division of function, and other divisions may be used in actual implementation. For example, multiple units or components may be combined or integrated into other systems, or some features may be omitted or not implemented. In addition, shown or described mutual couplings or direct couplings or communication connections may be implemented via some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.

[0236] The units described as separate parts may or may not be physically separate, and the parts presented as units may or may not be physical units, and may be located in one location or distributed across multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0237] In addition, the functional units of the embodiments of the present application may be integrated into one processing unit, and each of the units may exist physically alone, or two or more units may be integrated into one unit.

[0238] When a function is implemented in the form of a software functional unit and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application as an essential part, the portion contributing to the prior art, or part of the technical solution may be implemented in the form of a software product. The software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0239] The above description is merely a specific implementation of the present application and is not intended to limit the scope of protection of the present application. Any variations or substitutions that can be easily thought up by those skilled in the art within the technical scope disclosed in the present application shall fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Explanation of symbols]

[0240] 1 Timing thresholds, scenarios, and methods 2 Timing thresholds, scenarios, and methods 3 Timing threshold,method 4 Timing Threshold 100 Solid State Disks, SSD 110 processor, SSD controller 111 Host Interface Controller 112 processors 113 Flash Memory Controller 114 Bus 120 NFI Bus 130 NAND flash memory 131 NAND flash chips 501 Input / Output Interface 502 Channel 503 Channel 504 Channel 505 Channel 510 target 511 die 512 die 513 die 514 die 520 target 521 die 522 die 523 die 524 die 701 Input / Output Interface 702 Voltage Divider Module 703 Input / Output Interface 1400 Electronic Devices 1401 Processing Unit 1402 Decision Unit 1403 Optimization Unit

Claims

1. 1. A method for optimizing a flash memory chip, comprising: In a service execution process of the flash memory chip, suspending N channels in a nonvolatile flash interface NFI bus of the flash memory chip, where N is an integer greater than or equal to 1 and less than or equal to the total number of channels in the NFI bus; determining at least one channel to be optimized from the N channels; determining an optimization parameter for each optimization target channel based on training data for each optimization target channel in the at least one optimization target channel; optimizing each optimization target channel based on the optimization parameters for each optimization target channel; A method comprising:

2. The step of determining at least one optimization target channel from the N channels comprises: performing a margin test on an n-th channel of the N channels to obtain a margin for the n-th channel, where n is an integer number ranging from 1 to N in sequence; determining whether the margin of the nth channel meets a margin condition, the margin condition including at least one of a timing margin condition and a voltage margin condition; determining that the nth channel belongs to the optimization target channel if the margin of the nth channel does not satisfy the margin condition; 2. The method of claim 1, comprising:

3. the optimization parameters include a read optimization voltage and a write optimization voltage, and the training data for each optimization target channel includes K read margins and K write margins for each optimization target channel, where K is a positive integer greater than 1; and determining an optimization parameter for each optimization target channel based on training data for each optimization target channel in the at least one optimization target channel; determining an average value of the K read margins as the read optimization voltage; determining an average value of the K write margins as the write optimization voltage; 3. The method of claim 2, comprising:

4. the K read margins are K read timing margins, the K write margins are K write timing margins, the K read timing margins correspond one-to-one to the K voltage levels, and the K write timing margins correspond one-to-one to the K voltage levels; The read optimization voltage is determined by using the following formula: [Equation 1] where Vrx_best represents the read optimization voltage, Vk represents the kth voltage level among the K voltage levels, Trx1 represents the kth read timing margin among the K read timing margins, and k=1, ..., K; and The write optimization voltage is determined by using the following formula: [Equation 2] 4. The method of claim 3, wherein Vtx_best represents the write optimization voltage, Vk represents the kth voltage level of the K voltage levels, and Ttx1 represents the kth write timing margin of the K write timing margins.

5. the K read margins are K read voltage margins, the K write margins are K write voltage margins, the K read voltage margins correspond one-to-one to the K data strobe signal DQS delay levels, and the K write voltage margins correspond one-to-one to the K DQS delay levels; the read optimization voltage is the arithmetic mean of the K read voltage margins; and The method of claim 3 , wherein the write optimization voltage is an arithmetic mean value of the K write voltage margins.

6. the optimization parameters include read-optimized DQS timing optimization parameters and write-optimized DQS timing optimization parameters, and the training data for each optimization target channel includes read direction training data and write direction training data, and the step of determining the optimization parameters for each optimization target channel based on the training data for each optimization target channel in the at least one optimization target channel includes: determining the read-optimized DQS timing optimization parameters based on the read direction training data, where the read direction training data includes a left boundary and a right boundary obtained by read direction timing training, and the read-optimized DQS timing optimization parameters are used to adjust a DQS delay line to a first center position, where the first center position is an average value of the left boundary and the right boundary obtained by the read direction timing training; determining the write-optimized DQS timing optimization parameter based on the write direction training data, the write direction training data including a left boundary and a right boundary obtained by write direction timing training, the write-optimized DQS timing optimization parameter being used to adjust the delay line of the DQS to a second center position, the second center position being an average value of the left boundary and the right boundary obtained by the write direction timing training; 6. The method of any one of claims 1 to 5, comprising:

7. a processing unit configured to suspend N channels in a non-volatile flash interface (NFI) bus of the flash memory chip in a process of performing service on the flash memory chip, where N is an integer greater than or equal to 1 and less than or equal to a total number of channels in the NFI bus; a determining unit configured to determine at least one optimization target channel from the N channels, and determining an optimization parameter for each optimization target channel based on training data for each optimization target channel in the at least one optimization target channel. A decision unit; an optimization unit configured to optimize each optimization target channel based on the optimization parameters of each optimization target channel; An electronic device comprising:

8. The decision unit: performing a margin test on an n-th channel of the N channels to obtain a margin for the n-th channel, where n is an integer from 1 to N in sequence; determining whether the margin of the nth channel meets a margin condition, the margin condition including at least one of a timing margin condition and a voltage margin condition; and If the margin of the nth channel does not satisfy the margin condition, the nth channel is determined to belong to the optimization target channel.

8. The electronic device of claim 7, specifically configured to:

9. the optimization parameters include a read optimization voltage and a write optimization voltage, and the training data for each optimization target channel includes K read margins and K write margins for each optimization target channel, where K is a positive integer greater than 1; and The decision unit: determining an average value of the K read margins as the read optimization voltage; and The average value of the K write margins is determined as the write optimization voltage.

9. The electronic device of claim 8, specifically configured to:

10. the K read margins are K read timing margins, the K write margins are K write timing margins, the K read timing margins correspond one-to-one to the K voltage levels, and the K write timing margins correspond one-to-one to the K voltage levels; The determining unit is particularly configured to determine the read optimization voltage by using the following formula: [Equation 3] where Vrx_best represents the read optimization voltage, Vk represents the kth voltage level among the K voltage levels, Trx1 represents the kth read timing margin among the K read timing margins, and k=1, ..., K; and The determining unit is particularly configured to determine the write optimization voltage by using the following formula: [Equation 4] 10. The electronic device of claim 9, wherein Vtx_best represents the write optimization voltage, Vk represents the kth voltage level of the K voltage levels, and Ttx1 represents the kth write timing margin of the K write timing margins.

11. the K read margins are K read voltage margins, the K write margins are K write voltage margins, the K read voltage margins correspond one-to-one to the K data strobe signal DQS delay levels, and the K write voltage margins correspond one-to-one to the K DQS delay levels; and 10. The electronic device of claim 9, wherein the determining unit is particularly configured to determine an arithmetic mean value of the K read voltage margins as the read-optimized voltage, and to determine an arithmetic mean value of the K write voltage margins as the write-optimized voltage.

12. The optimization parameters include a read-optimized DQS timing optimization parameter and a write-optimized DQS timing optimization parameter, and the training data of each optimization target channel includes a read direction training data and a write direction training data, and the determining unit: determining the read-optimized DQS timing optimization parameters based on the read direction training data, the read direction training data including a left boundary and a right boundary obtained by read direction timing training, the read-optimized DQS timing optimization parameters being used to adjust a DQS delay line to a first center position, the first center position being an average value of the left boundary and the right boundary obtained by the read direction timing training; determining the write-optimized DQS timing optimization parameter based on the write direction training data, wherein the write direction training data includes a left boundary and a right boundary obtained by write direction timing training, and the write-optimized DQS timing optimization parameter is used to adjust the delay line of the DQS to a second center position, wherein the second center position is an average value of the left boundary and the right boundary obtained by the write direction timing training; 12. An electronic device according to any one of claims 7 to 11, specifically adapted to:

13. 7. A solid state disk SSD comprising an SSD controller, wherein the SSD controller is coupled to a flash memory via a non-volatile flash interface NFI bus, and the SSD controller is coupled to a memory and further configured to read and execute instructions and / or program code in the memory in order to perform the method of any one of claims 1 to 6.

14. A chip system comprising a logic circuit, the logic circuit coupled to an input / output interface and configured to transmit data via the input / output interface to perform the method of any one of claims 1 to 6.

15. 7. A computer readable storage medium storing program code, which when executed on a computer enables the computer to perform the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Control circuit and method for testing memory elements

    JP2014517964A

  • Information processing device, and memory test method

    WO2014068739A1