A storage device and data reading method thereof

By introducing a temperature warning module into the storage device, monitoring and adjusting the position of the sampling window, the data error problem caused by the sampling window drift during temperature changes in the storage device is solved, and the rapid adaptation and stable startup of the storage device at different ambient temperatures is achieved.

CN119127326BActive Publication Date: 2025-03-14合肥康芯威存储技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411620930.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-14
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

When the temperature and voltage of existing storage devices change, the sampling window of NAND DQS will drift, resulting in data sampling errors, the system cannot be used normally, and the boot process is cumbersome, which affects the boot time of the storage device.

Method used

Design a storage device, including a main controller, a universal serial bus module, a flash block, a temperature sensor and a temperature warning module. The temperature change is monitored through the temperature sensor. When the temperature difference exceeds the preset threshold, the temperature warning module triggers the risk warning function, adjusts the left and right boundaries of the virtual sampling, and recalculates the actual intermediate sampling point position to optimize the rising edge position of the clock signal.

Benefits of technology

It realizes automatic adaptation of storage devices at different ambient temperatures, quickly switch to optimal parameters, so that the storage devices can be used stably during the boot process, reduce the boot time, avoid data transmission errors caused by temperature changes, and improve the reliability and stability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127326B_ABST
    Figure CN119127326B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of static storage technology, and specifically relates to a storage device and a data reading method thereof, wherein the storage device comprises: a main controller, a universal serial bus module, a flash memory block, a temperature sensor, and a temperature warning module, which are electrically connected between the universal serial bus module and the main controller; wherein, during the data transmission process between a host and the storage device, the main controller is used to send an instruction to the temperature warning module when the temperature difference in the storage device exceeds a preset temperature threshold value, so as to trigger its risk warning function: the temperature warning module reads data according to the corresponding position mapped on the clock signal based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary of the data reading, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary, as well as the position of the actual middle sampling point according to the comparison result of the data, so that the host adjusts the rising edge position of the clock signal according to the new actual middle sampling point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of static storage, and in particular relates to a storage device and a data reading method thereof. Background Art

[0002] With the widespread application of storage devices in terminal products such as TVs, set-top boxes, tablets and mobile phones, the requirements for the performance and reliability of storage devices are becoming higher and higher. The most important thing is to ensure that the data stored in the storage device is stable and reliable. Most of the existing storage device startup solutions follow the JEDEC (Joint Electron Device Engineering Council) protocol specifications. At room temperature, the host tunes a set of parameters and configures the storage device accordingly. However, due to the PVT (Process, Voltage, Temperature) effect of semiconductors, the sampling window of the back-end NAND DQS (clock data) will drift with the change of temperature and voltage, resulting in data sampling errors and the system cannot be used normally. At present, most practices are to try to debug from low speed to high speed step by step according to temperature changes. The whole process is very slow and is not compatible with different platforms and ambient temperature application scenarios. The speed-up process needs to be run once during each startup process to start the storage device. The steps are complicated and the process is lengthy, which affects the startup time of the storage device. Summary of the invention

[0003] In view of the shortcomings of the prior art mentioned above, the present invention provides a storage device and a data reading method thereof, which solves the problem of the storage device automatically adapting to different host terminal products and usage scenarios under different ambient temperatures. It can quickly switch to the optimal parameters, so that the storage device can be used stably during the boot process and reduce the boot time.

[0004] To achieve the above-mentioned purpose and other related purposes, the present invention provides a storage device, comprising: a main controller, a universal serial bus module, for data transmission between the host and the host; a flash memory block, electrically connected to the main controller, for storing data written by the host; a temperature sensor, electrically connected to the main controller, for monitoring temperature changes in the storage device; a temperature warning module, electrically connected between the universal serial bus module and the main controller, for risk warning according to temperature changes, and correspondingly adjusting the position of the actual intermediate sampling point of data reading; wherein, during the data transmission process between the host and the storage device, the main controller The device is used to send an instruction to the temperature warning module when the temperature difference in the storage device exceeds a preset temperature threshold to trigger its risk warning function; after starting the risk warning function, the temperature warning module reads data based on the actual middle sampling point, virtual sampling left boundary, and virtual sampling right boundary of the data reading, according to the corresponding position mapped on the clock signal, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data, and adjusts the position of the actual middle sampling point according to the new virtual sampling left boundary and / or the new virtual sampling right boundary, so as to adjust the rising edge position of the clock signal according to the new actual middle sampling point.

[0005] In one embodiment of the present invention, the temperature warning module reads data according to the corresponding positions on the clock signal based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary of the data reading, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data, including: when the data read at the virtual sampling left boundary is inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the position of the virtual sampling left boundary; when the data read at the virtual sampling right boundary is inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the position of the virtual sampling right boundary; when the data read at the virtual sampling left boundary and the virtual sampling right boundary are inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the position of the virtual sampling left boundary and the virtual sampling right boundary.

[0006] In one embodiment of the present invention, the temperature warning module readjusts the position of the virtual sampling left boundary, including: the temperature warning module obtains the calibration position where the first read data is consistent with the data read from the actual middle sampling point from the corresponding clock signal in the direction from the virtual sampling left boundary to the virtual sampling right boundary, and uses it as the new virtual sampling left boundary.

[0007] In one embodiment of the present invention, the temperature warning module readjusts the position of the virtual sampling right boundary, including: the temperature warning module obtains the calibration position where the first read data is consistent with the data read from the actual middle sampling point from the corresponding clock signal in the direction from the virtual sampling right boundary to the virtual sampling left boundary, and uses it as the new virtual sampling right boundary.

[0008] In one embodiment of the present invention, the temperature warning module readjusts the positions of the virtual sampling left boundary and the virtual sampling right boundary, including: the temperature warning module obtains the first calibration position and the second calibration position of the first position where the first read data is consistent with the data read from the actual intermediate sampling point from the corresponding clock signal, respectively, in the direction from the virtual sampling left boundary to the virtual sampling right boundary and in the direction from the virtual sampling right boundary to the virtual sampling left boundary, and respectively uses them as the new virtual sampling left boundary and the new virtual sampling right boundary.

[0009] In one embodiment of the present invention, the temperature warning module obtains the clock signal between the virtual sampling left boundary and the virtual sampling right boundary, and divides the clock signal into several calibration positions for reading data.

[0010] In one embodiment of the present invention, the temperature warning module calculates the new actual intermediate sampling point according to the following formula and updates it accordingly:

[0011]

[0012] in, represents the virtual sampling left boundary, represents the distance between the left boundary of the virtual sampling and the left boundary of the new virtual sampling, and can be 0. represents the virtual sampling right boundary, represents the distance between the right boundary of the virtual sampling and the right boundary of the new virtual sampling, and can be 0. Represents the new actual intermediate sampling point.

[0013] In one embodiment of the present invention, when the host is powered on for the first time and performs a Tuning operation, it is used to obtain an initial actual middle sampling point, and set an initial virtual sampling left boundary and a virtual sampling right boundary based on the initial actual middle sampling point, and store the initial actual middle sampling point, the initial virtual sampling left boundary, and the initial virtual sampling right boundary in the temperature warning module.

[0014] In one embodiment of the present invention, the temperature warning module is further used to send instructions to the host according to the new actual intermediate sampling point, so that it adjusts the rising edge position of the clock signal accordingly.

[0015] A data reading method for a storage device comprises: when receiving an instruction sent by a main controller, based on an actual middle sampling point, a virtual sampling left boundary, and a virtual sampling right boundary of data reading, reading data according to their corresponding positions on a clock signal; adjusting the position of a virtual sampling left boundary and / or a virtual sampling right boundary according to a comparison result of data read at the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary; adjusting the position of the actual middle sampling point according to a new virtual sampling left boundary and / or a new virtual sampling right boundary, and sending an instruction to a host according to the new actual middle sampling point, so that it adjusts the rising edge position of a clock signal according to the new actual middle sampling point.

[0016] The present invention provides a storage device, which, by adding a temperature early warning module, can identify the drift direction of a sampling window according to a small change in temperature, and adjust the position of an actual intermediate sampling point in real time to optimize the rising edge position of a clock signal, so as to achieve early warning, effectively avoid data transmission errors caused by large temperature changes, ensure reliable and stable data transmission, and reduce time waste and inefficiency caused by repeated tuning of the host. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of the structure of a specific embodiment of a terminal product provided by the present invention;

[0019] Figure 2 A schematic structural diagram of a specific embodiment of a storage device provided by the present invention;

[0020] Figure 3 A schematic diagram of a specific embodiment of the sampling window provided by the present invention at normal temperature;

[0021] Figure 4 A schematic diagram of a specific embodiment of the sampling window provided by the present invention when the temperature changes;

[0022] Figure 5 A schematic diagram of another specific embodiment of the sampling window provided by the present invention when the temperature changes;

[0023] Figure 6A schematic diagram of another specific embodiment of the sampling window provided by the present invention when the temperature changes;

[0024] Figure 7 The present invention provides a flow chart of a method for reading data from a storage device according to a specific embodiment of the present invention.

[0025] Reference Numbers

[0026] 10. Terminal product; 11. Central processing unit; 12. Power module; 13. Chip test socket; 14. Dynamic random access memory; 15. Universal serial bus; 20. Storage device; 21. Main controller; 22. Universal serial bus module; 23. Flash memory block; 24. Temperature sensor; 25. Temperature warning module. DETAILED DESCRIPTION

[0027] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0028] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0029] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0030] See also Figures 1 to 7The present invention proposes a storage device and a data reading method thereof, which can be applied to storage devices such as eMMC (Embedded Multi Media Card), SSD (Solid State Disk), and UFS (Univeral Flash Storage). In the case of rapid changes in the external environment, the present invention can automatically adjust the position of the Sampling Point according to temperature changes through the adaptive function of the storage device, thereby adjusting the rising edge position of the clock signal, thereby avoiding temperature changes that cause the sampling window of the NAND DQS in the storage device to drift, thereby causing the storage device to read the written data incorrectly, and ensuring stable and efficient data transmission.

[0031] The terminal product 10 is first described in detail below through a specific embodiment.

[0032] See also Figure 1 In one embodiment of the present invention, a terminal product 10 is provided with a central processing unit 11, a power module 12, a chip test socket 13, a dynamic random access memory 14 and a universal serial bus 15.

[0033] Specifically, the chip test socket 13 can be used to install a storage device, and the storage device is provided with a bus interface or pins. The storage device is electrically connected to the chip test socket 13 through the bus interface or pins, that is, an electrical connection is achieved between the storage device and the terminal product 10.

[0034] The central processing unit (CPU) 11 is the computing core and control core of the terminal product 10. The central processing unit 11 is used to write host data and send instructions to the storage device. For example, different read and write commands and host data of different lengths can be sent to the storage device for testing, or the terminal product 10 can read host data and receive instructions from the storage device. The power module 12 can be used to power the central processing unit 11 and the storage device on the chip test socket 13. It can be understood that the central processing unit is the host mentioned in this application.

[0035] The dynamic random access memory (DRAM) 14 stores the operating space of the system software in the entire terminal product 10. The universal serial bus 15 can communicate with a host computer such as a personal computer (PC), a tablet computer (Pad), a mobile phone (Cell Phone), etc. The terminal product 10 can download the image file (SOC Image) system program through the universal serial bus 15, and the terminal product 10 can also upload the test data of the storage device to the host computer through the universal serial bus 15.

[0036] Usually, after the terminal product 10 is powered on, the central processing unit 11 will initialize the storage device and perform tuning operations on CLK (clock) and CMD (command line program) to find the optimal configuration parameters and ensure that the signals sent by the central processing unit 11 to the storage device when sending CMD and DATA (data) are complete and correct. The entire tuning operation will take a long time, which will affect the boot speed and usage efficiency. If a large range of temperature changes during the subsequent data transmission process between the terminal product 10 and the storage device, and the tuning parameters are not adjusted in time, it will cause data transmission errors, resulting in system crashes.

[0037] Therefore, the present application will trigger the temperature warning mechanism based on the Tuning parameters captured at normal temperature and in combination with the internal temperature sensing of the storage device. When the temperature changes rapidly during the data transmission between the terminal product 10 and the storage device, the temperature warning mechanism of the storage device can update the prediction in real time according to the temperature change, thereby adjusting the Tuning parameters, and then notifying the terminal product 10 to adaptively adjust the clock signal. This can avoid the Tuning action every time the temperature changes, and can also adjust the Tuning parameters according to the temperature change to save time, thereby achieving the purpose of stabilizing the operation of the terminal product 10.

[0038] Example 1

[0039] See also Figure 2 In one embodiment of the present invention, the storage device 20 includes a main controller 21 and a universal serial bus module 22, which are electrically connected to the universal serial bus 15 of the terminal product 10, and are used to transmit data with the terminal product 10, for example, the terminal product 10 writes data to the storage device 20 through the universal serial bus module 22, or reads data stored in the storage device 20 through the universal serial bus module 22. In addition, the interface protocol between the storage device 20 and the terminal product 10 includes but is not limited to Clock, CMD, DS, DATA0~DATA7, Rest, etc., and no excessive restrictions are made on this.

[0040] The flash memory block 23 is electrically connected to the main controller 21 and is a non-volatile memory, which is usually used to store host data and system programs. The main controller 21 is mainly used to operate and manage the flash memory block 23, such as bad block management, wear leveling, error checking and correction (ECC), etc. The main controller 21 can greatly improve the performance of reading, writing and moving host data in the flash memory block 23.

[0041] The temperature sensor 24 is electrically connected to the main controller to detect temperature changes in the storage device 20 and provide real-time feedback to the main controller to achieve temperature monitoring.

[0042] The temperature warning module 25 is electrically connected between the main controller 21 and the universal serial bus module 22 to implement the temperature warning mechanism of the present application. Specifically, during the data transmission process between the terminal product 10 and the storage device 20, for example, during the process of the terminal product 10 writing data to the storage device 20, when the main controller 21 detects through the temperature sensor 24 that the temperature in the storage device has changed, for example, the temperature difference exceeds a certain temperature threshold, the main controller 21 can send an instruction to the temperature warning module 25 to trigger its risk warning function. Further, after the temperature warning module 25 starts the risk warning function, based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary stored therein, the data is read according to the corresponding position mapped on the clock signal, and the data read at the three positions are compared to see if they are consistent, and then it is determined whether the sampling window has begun to drift.

[0043] It should be noted here that the written data is usually read at the rising edge of the clock signal to ensure that the data is read correctly and stored in the flash memory block 23. The actual middle sampling point is a parameter set according to the rising edge position of the clock signal, and the virtual sampling left boundary and the virtual sampling right boundary are parameters set on the left and right sides of the actual middle sampling point according to the size of the sampling window. It can be understood that at normal temperature, the middle value of the sampling window corresponds to the position of the actual middle sampling point, so that data can be read at the rising edge position of the clock signal. At the same time, since the sampling window is within the area between the virtual sampling left boundary and the virtual sampling right boundary, that is, within this area, the data read from the mapping position including the virtual sampling left boundary and the virtual sampling right boundary are usually accurate, but when the temperature changes, the sampling window will drift, especially when the temperature changes greatly, the drift of the sampling window will be large. If the data is still read according to the current sampling window, it may cause data reading errors. For example, when the temperature difference exceeds a certain value, the sampling window has deviated to the left side of the virtual sampling left boundary, or the right side of the virtual sampling right boundary, then the correct data cannot be read through the sampling window at this time.

[0044] Therefore, in order to achieve early warning of temperature, this embodiment can set a relatively small temperature threshold to trigger the risk warning function. For example, when the temperature difference exceeds 30 degrees, the sampling window may drift seriously, resulting in the inability to read correct data. In this regard, a relatively small temperature threshold, such as three degrees or five degrees, can be set to trigger the risk warning function.

[0045] Under the above conditions, the temperature warning module 25 reads data at the corresponding positions of the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary mapped to the clock signal, and performs comparison:

[0046] When the data read at the virtual sampling left boundary is inconsistent with the data read at the actual middle sampling point, it can be considered that the data read at the virtual sampling left boundary is wrong, that is, the sampling window has drifted to the right, and the position of the virtual sampling left boundary needs to be readjusted.

[0047] When the data read at the virtual sampling right boundary is inconsistent with the data read at the actual middle sampling point, it can be considered that the data read at the virtual sampling right boundary is wrong, that is, the sampling window has drifted to the left, and the position of the virtual sampling right boundary needs to be readjusted.

[0048] When the data read at the virtual sampling left boundary and the virtual sampling right boundary are inconsistent with the data read at the actual middle sampling point, it can be considered that the data read at the virtual sampling left boundary and the virtual sampling right boundary are both wrong, that is, the sampling window is clamped inward, the window range is reduced, and the positions of the virtual sampling left boundary and the virtual sampling right boundary need to be readjusted.

[0049] It can be understood here that, under the temperature change corresponding to the preset temperature threshold, the drift of the sampling window will not be large. Even if the sampling window has deviated from the original position, it can at least ensure that the data read at the actual middle sampling point is accurate, and then it can be used to determine whether the data read at the virtual sampling left boundary and the virtual sampling right boundary is correct, and then identify the drift direction of the sampling window. It can also be understood that during the data transmission process, and under the premise of ensuring that the data read by the sampling window at the actual middle sampling point is still accurate, the drift direction of the sampling window is identified according to the small change in temperature, and the position of the actual middle sampling point is adjusted in real time to optimize the rising edge position of the clock signal, which can effectively avoid data transmission errors caused by large temperature changes, thereby achieving early warning of the temperature of the storage device 20 and ensuring stable data transmission between the terminal product 10 and the storage device 20.

[0050] In a specific embodiment, if Figure 3As shown, at normal temperature, the sampling window has not drifted normally, so the data read at the virtual sampling left boundary Left-T, the virtual sampling right boundary Right-T, and the actual middle sampling point Sampling Point are consistent, for example, all are 5.

[0051] Further, refer to Figure 4 When the temperature inside the storage device increases, the entire sampling window starts to move right, then the data read at the virtual sampling left boundary Left-T may be wrong, and thus inconsistent with the data read at the actual middle sampling point Sampling Point. Although the data read at the actual middle sampling point Sampling Point is still correct at this time, it is necessary to adjust the position of the virtual sampling left boundary Left-T, and then adjust the position of the actual middle sampling point Sampling Point based on it.

[0052] refer to Figure 5 When the temperature inside the storage device decreases, the entire sampling window starts to move left. At this time, the data read at the virtual sampling right boundary Right-T will be wrong, and thus inconsistent with the data read at the actual middle sampling point Sampling Point. Although the data read at the actual middle sampling point Sampling Point is still correct, the position of the virtual sampling right boundary Right-T needs to be adjusted, and then the position of the actual middle sampling point Sampling Point is adjusted accordingly.

[0053] refer to Figure 6 When the temperature in the storage device rises or falls rapidly in a cyclic change, the entire sampling window begins to clamp inward, that is, the window shrinks, then the data read at the virtual sampling left boundary Left-T and the virtual sampling right boundary Right-T will be wrong. Although the data read at the actual middle sampling point Sampling Point is still correct at this time, the virtual sampling left boundary Left-T and the virtual sampling right boundary Right-T need to be adjusted, and then the position of the actual middle sampling point Sampling Point is adjusted based on them.

[0054] Finally, the rising edge position of the clock signal is adjusted according to the new actual intermediate sampling point Sampling Point to adapt to the sampling window drift caused by temperature changes and ensure reliable and stable data transmission. Figure 3 , Refclk in 4, 5, and 6 is a reference clock, that is, the clock signal described in this embodiment.

[0055] It should also be added that when the data read from the virtual sampling left boundary and the virtual sampling right boundary are consistent with the data read from the actual middle sampling point, it means that the sampling window may not have drifted, or the drift amount is not large. Accordingly, there is no need to adjust the position of the virtual sampling left boundary, the virtual sampling right boundary, and the actual middle sampling point, that is, there is no need to adjust the rising edge position of the clock signal.

[0056] Further, when the sampling window drifts, the temperature warning module 25 may adjust the virtual sampling left boundary and / or the virtual sampling right boundary in the following manner.

[0057] Specifically, when the virtual sampling left boundary needs to be adjusted, the temperature warning module 25 reads data at each calibration position in turn in the direction from the virtual sampling left boundary to the virtual sampling right boundary, that is, from left to right, until the calibration position where the first read data is consistent with the data read at the actual middle sampling point is obtained, and it is used as the new virtual sampling left boundary. For example, based on the current position of the virtual sampling left boundary, data is read at the first calibration position on its right side, and it is determined whether it is consistent with the data read at the actual middle sampling point: if it is consistent, the calibration position is used as the new virtual sampling left boundary; if it is inconsistent, the data is continued to be read at the second calibration position until the data read at a certain calibration position is consistent with the data read at the actual middle sampling point.

[0058] It should be noted that the temperature warning module 25 obtains a number of calibration positions that can be used to read data by equally dividing the clock signal between the virtual sampling left boundary and the virtual sampling right boundary, and then can identify the offset required for the virtual sampling left boundary one by one in sequence to adapt to the drift of the sampling window. It can be seen that the offset of the virtual sampling left boundary can be accurately adjusted by the above method to obtain a new virtual sampling left boundary.

[0059] In addition, when the set temperature threshold is relatively large and the drift of the corresponding sampling window may also be relatively large, the data can be read at different calibration positions at intervals of two or three. For example, based on the current position of the left boundary of the virtual sampling, the data is read at the first calibration position on its right side, and it is determined whether it is consistent with the data read at the actual middle sampling point: if it is consistent, the calibration position is used as the new left boundary of the virtual sampling; if it is inconsistent, the data is read at the fourth calibration position. If it is consistent, the data can be returned to the third calibration position to read the data. If it is inconsistent, it means that the fourth calibration position is the first calibration position that is consistent with the data read at the actual middle sampling point. If it is consistent, the data can be returned to the third calibration position to read the data and repeat the above steps. Of course, if the data read at the fourth calibration position is inconsistent with the data read at the actual middle sampling point, the data can be read at the seventh calibration position. Similarly, the above steps are repeated until the first calibration position where the data read at the actual middle sampling point is inconsistent is found. It can be seen that when the drift of the sampling window is large, the above method can be used to find the first calibration position where the data read at the actual middle sampling point is inconsistent. Without departing from the spirit of the present invention, the modifications and improvements made to the embodiments of the present invention by those skilled in the art still fall within the scope of the invention application of the present invention.

[0060] When the virtual sampling right boundary needs to be adjusted, the temperature warning module 25 reads data at each calibration position in turn in the direction from the virtual sampling right boundary to the virtual sampling left boundary, that is, from right to left, until the calibration position where the first read data is consistent with the data read at the actual middle sampling point is obtained, and it is used as the new virtual sampling right boundary. Similarly, data can also be read at different calibration positions at intervals of two or three.

[0061] When the virtual sampling left boundary and the virtual sampling right boundary need to be adjusted, the temperature warning module 25 obtains the first first calibration position and the second calibration position that are consistent with the data read at the actual middle sampling point according to the above method, respectively, from left to right and from right to left. It can be understood that it is necessary to obtain the first calibration position that is consistent with the data read at the actual middle sampling point from two directions, and therefore, obtain the first calibration position and the second calibration position respectively.

[0062] Based on the above, after obtaining a new virtual sampling left boundary and / or a new virtual sampling right boundary, the actual middle sampling point can be adjusted accordingly. The specific formula can be referred to as follows:

[0063] ,

[0064] in, represents the virtual sampling left boundary, Indicates the distance between the left boundary of the virtual sampling and the left boundary of the new virtual sampling, and can be 0. represents the virtual sampling right boundary, Indicates the distance between the right boundary of the virtual sampling and the right boundary of the new virtual sampling, and can be 0. Represents the new actual intermediate sampling point.

[0065] It can be understood that by equally dividing the clock signal between the virtual sampling left boundary and the virtual sampling right boundary to obtain a number of calibration positions that can be used to read data, the spacing between the virtual sampling left boundary and the new virtual sampling left boundary, as well as the spacing between the virtual sampling right boundary and the new virtual sampling right boundary can be calculated according to the calibration position at which the new virtual sampling left boundary / virtual sampling right boundary is located. Of course, when only the virtual sampling left boundary is adjusted, that is, corresponding to is 0; when only the right edge of the virtual sampling is adjusted, it corresponds to is 0.

[0066] In addition, it can be understood that the virtual sampling left boundary, the virtual sampling right boundary, and the actual middle sampling point are stored in the temperature warning module 25. When a new virtual sampling left boundary, or a virtual sampling right boundary, or an actual middle sampling point is obtained, the original virtual sampling left boundary, or a virtual sampling right boundary, or an actual middle sampling point is replaced accordingly so as to perform a temperature warning next time.

[0067] Finally, the temperature warning module 25 can send instructions to the host based on the new actual intermediate sampling point, so that the host adjusts the rising edge position of the clock signal according to the new actual intermediate sampling point, thereby adapting to the sampling window drift caused by temperature changes.

[0068] It should also be added that when the host is powered on for the first time and performs the Tuning operation, it can be used to obtain the initial actual intermediate sampling point, and the initial virtual sampling left boundary and virtual sampling right boundary are set according to it, and stored in the temperature warning module 25. In addition, during the data transmission process, if the temperature warning module 25 does not start the risk warning function, the data transmitted by the universal serial bus module 22 can be directly forwarded to the main controller 21 for processing.

[0069] In addition, the storage device 20 includes but is not limited to the above, for example, it also includes a read-only memory (ROM) that works in a non-destructive read mode and can only read but not write information. Once the information is written, it is fixed, and even if the power is cut off, the information will not be lost, so it is also called a fixed memory. The data stored in the ROM is usually written before being loaded into the whole machine, and can only be read during the operation of the whole machine, unlike the random access memory that can quickly and conveniently rewrite the storage content. The data stored in the ROM is stable, and the stored data will not change after power failure. It has a simple structure and is easy to use, so it is often used to store various fixed programs and data. Random Access Memory (RAM) is an internal memory that directly exchanges data with the CPU. It can be read and written at any time (except when refreshed), and the speed is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. When working, RAM can write (store) or read (remove) information from any specified address at any time. The biggest difference between it and ROM is the volatility of data, that is, once the power is cut off, the stored data will be lost. RAM is used in computers and digital systems to temporarily store programs, data and intermediate results. As well as cache modules, etc., there are no excessive restrictions on this. Without departing from the spirit of the present invention, modifications and improvements made to the embodiments of the present invention by those skilled in the art still fall within the scope of the invention patent application of the present invention.

[0070] It can be seen that the storage device implemented in this embodiment can solve the needs of quickly adapting and using the best Tuning sampling parameters in complex application scenarios with various rapid temperature changes, as well as the problems of slow startup time of existing processes, and lengthy repetition of the startup process from low-speed to high-speed processes. In addition, only one Tuning is required, and the storage device will subsequently autonomously identify temperature changes and adaptively adjust, reducing the time waste and inefficiency caused by repeated Tuning of the host.

[0071] Example 2

[0072] See also Figure 7 As shown, this embodiment also provides a data reading method of a storage device, comprising:

[0073] Step S100, when receiving the instruction sent by the main controller, based on the actual middle sampling point of data reading, the virtual sampling left boundary, and the virtual sampling right boundary, data is read according to their corresponding positions on the clock signal.

[0074] Step S200, adjusting the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data read from the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary.

[0075] Step S300, adjusting the position of the actual middle sampling point according to the new virtual sampling left boundary and / or the new virtual sampling right boundary, and sending an instruction to the host according to the new actual middle sampling point, so that it adjusts the rising edge position of the clock signal according to the new actual middle sampling point.

[0076] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the protection scope of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this patent.

[0077] In summary, the present invention provides a storage device, which, by adding a temperature warning module, can identify the drift direction of the sampling window according to small changes in temperature, and adjust the position of the actual intermediate sampling point in real time to optimize the rising edge position of the clock signal to achieve early warning, which can effectively avoid data transmission errors caused by large temperature changes, ensure reliable and stable data transmission, and reduce the time waste and inefficiency caused by repeated tuning of the host.

[0078] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

Claims

1. A storage device, characterized in that: include: Main controller, Universal serial bus module, used for data transmission with the host; A flash memory block, electrically connected to the main controller, for storing data written by the host; a temperature sensor, electrically connected to the main controller, for monitoring temperature changes in the storage device; A temperature warning module, electrically connected between the USB module and the main controller, for providing risk warning according to temperature changes and adjusting the position of the actual intermediate sampling point of data reading accordingly; Wherein, during the data transmission process between the host and the storage device, the main controller is used to send an instruction to the temperature warning module when the temperature difference in the storage device exceeds a preset temperature threshold, so as to trigger its risk warning function; After the risk warning function is started, the temperature warning module reads data according to the corresponding positions mapped on the clock signal based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary of the data reading, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data, and adjusts the position of the actual middle sampling point according to the new virtual sampling left boundary and / or the new virtual sampling right boundary, so that the host adjusts the rising edge position of the clock signal according to the new actual middle sampling point; The actual middle sampling point is a parameter set according to the rising edge position of the clock signal, and the virtual sampling left boundary and the virtual sampling right boundary are parameters set on the left and right sides of the actual middle sampling point according to the size of the sampling window; The temperature warning module adjusts the position of the virtual sampling left boundary, including: the temperature warning module obtains the calibration position where the first read data is consistent with the data read from the actual middle sampling point from the corresponding clock signal in the direction from the virtual sampling left boundary to the virtual sampling right boundary, and uses it as the new virtual sampling left boundary; The temperature warning module adjusts the position of the virtual sampling right boundary, including: the temperature warning module obtains the calibration position where the first read data is consistent with the data read from the actual middle sampling point from the corresponding clock signal in the direction from the virtual sampling right boundary to the virtual sampling left boundary, and uses it as the new virtual sampling right boundary.

2. The storage device according to claim 1, characterized in that The temperature warning module reads data according to the corresponding positions on the clock signal based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary of the data reading, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data, including: When the data read at the virtual sampling left boundary is inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the position of the virtual sampling left boundary; When the data read at the virtual sampling right boundary is inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the position of the virtual sampling right boundary; When the data read at the virtual sampling left boundary and the virtual sampling right boundary are inconsistent with the data read at the actual middle sampling point, the temperature warning module readjusts the positions of the virtual sampling left boundary and the virtual sampling right boundary.

3. The storage device according to claim 1 or 2, characterized in that: The temperature warning module adjusts the positions of the virtual sampling left boundary and the virtual sampling right boundary, including: The temperature warning module obtains the first calibration position and the second calibration position of the first position where the first read data is consistent with the data read from the actual intermediate sampling point from the corresponding clock signal, respectively, in the direction from the virtual sampling left boundary to the virtual sampling right boundary and in the direction from the virtual sampling right boundary to the virtual sampling left boundary, and respectively uses them as the new virtual sampling left boundary and the new virtual sampling right boundary.

4. The storage device according to claim 3, characterized in that: The temperature warning module obtains the clock signal between the virtual sampling left boundary and the virtual sampling right boundary, and divides the clock signal into several calibration positions for reading data.

5. The storage device according to claim 1, characterized in that: The temperature warning module calculates the new actual intermediate sampling point according to the following formula and updates it accordingly: T=(Right T -y-(Left T -x)) / 2 Among them, Left T represents the left boundary of the virtual sampling, x represents the distance between the left boundary of the virtual sampling and the left boundary of the new virtual sampling, and can be 0, Right T represents the virtual sampling right boundary, y represents the distance between the virtual sampling right boundary and the new virtual sampling right boundary and may be 0, and T represents the new actual middle sampling point.

6. The storage device according to claim 1, characterized in that: When the host is powered on for the first time and performs the Tuning operation, it is used to obtain the initial actual middle sampling point, and set the initial virtual sampling left boundary and the virtual sampling right boundary based on it, and store the initial actual middle sampling point, the initial virtual sampling left boundary, and the initial virtual sampling right boundary in the temperature warning module.

7. The storage device according to claim 1, characterized in that: The temperature warning module reads data according to the corresponding positions on the clock signal based on the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary of the data reading, and adjusts the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data, and also includes: When the data read at the virtual sampling left boundary and the virtual sampling right boundary are consistent with the data read at the actual middle sampling point, the temperature warning module does not adjust the virtual sampling left boundary and the virtual sampling right boundary.

8. A method for reading data from a storage device, characterized in that: The storage device according to any one of claims 1 to 7 comprises: When receiving the instruction sent by the main controller, based on the actual middle sampling point of data reading, the virtual sampling left boundary, and the virtual sampling right boundary, the data is read according to the corresponding position on the clock signal; Adjusting the position of the virtual sampling left boundary and / or the virtual sampling right boundary according to the comparison result of the data read from the actual middle sampling point, the virtual sampling left boundary, and the virtual sampling right boundary; The position of the actual middle sampling point is adjusted according to the new virtual sampling left boundary and / or the new virtual sampling right boundary, and an instruction is sent to the host according to the new actual middle sampling point to adjust the rising edge position of the clock signal according to the new actual middle sampling point.

Citation Information

Patent Citations

  • Data processing method and device, program product, computer equipment and medium

    CN115145354A

  • Antenna sampling compensation method and device and phased array planar antenna

    CN115842251A