Storage device, storage device identification code and definition method thereof

By adding read commands of the data reliable storage mode to the storage device identification code, the compatibility and efficiency problems of ROM boot program in the prior art are solved, and the direct acquisition of SLC mode and compatibility of future flash memory products are achieved.

CN118689406BActive Publication Date: 2024-11-26ARTMEM TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411170797.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-26
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

In the prior art, when the ROM boot program of the main control chip is compatible with the SLC mode command method of each manufacturer, it needs to enumerate the traversal identification code and command table, resulting in the increase in the program size and the increase in the boot time overhead, and it is not compatible with unregistered Identification code, may fail in booting.

Method used

By adding special byte data to the storage device identification code, including reading commands in the data reliably stored mode, the ROM bootloader can directly obtain operation commands in the SLC mode, reduce the program size and improve efficiency, and support future flash memory products in compatibility. .

Benefits of technology

It realizes a reading method of directly obtaining data reliable storage mode after obtaining the storage device identification code, which reduces the size and boot time overhead of the ROM boot program, and improves compatibility with future flash memory products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689406B_ABST
    Figure CN118689406B_ABST
Patent Text Reader

Abstract

The present invention discloses a storage device, a storage device identification code and a definition method thereof, and relates to the technical field of storage devices. The output timing of the storage device identification code includes: a command, an address, a plurality of output byte data, and special byte data, and the content of the special byte data includes a read command for entering a data reliable storage mode of a storage medium. The storage device identification code according to an embodiment of the present invention is added with a special byte data in the output timing of the identification code, and the content of the special byte data includes a read command for causing a flash memory to enter a data reliable storage mode, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, thereby reducing the size of the ROM boot program and improving the efficiency of obtaining the data reliable output mode command.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage devices, and in particular to a storage device, a storage device identification code and a definition method thereof. Background Art

[0002] The current ROM boot program of the main control chip mainly adopts the idea of ​​enumeration traversal when being compatible with the SLC mode command methods of various manufacturers. By counting the information of the flash memory products to be supported, mainly including: identification code (ID) and SLC mode entry / exit command, an SLC mode operation command table (identification code-data reliable output mode command table) based on the identification code as the index is established. The schematic diagram is shown in Figure 1 shown.

[0003] Before entering SLC mode, the bootloader first reads the flash memory identification code, then searches the SLC mode operation command table based on the identification code to obtain the corresponding SLC mode entry command (the command acquisition process is as follows: Figure 2 As shown), the main control chip then sends a command to make the data block in the flash memory enter SLC mode, and then reads the data from the agreed location (the overall process is as follows Figure 3 as shown).

[0004] With this solution, since different flash memory products have different SLC mode entry command methods, it is necessary to use the identification code that uniquely corresponds to the product to distinguish and select the corresponding SLC mode command. Under such restrictions, it is not conducive to the design and use of the ROM boot program because: (1) it must fully include all flash memory identification codes and SLC mode entry command methods that need to be supported, which increases the size of the ROM program; (2) during the boot process, the identification code must be used to search before the SLC mode entry command method can be obtained, which increases the boot time overhead; (3) if an unregistered identification code is encountered, the SLC mode entry command method cannot be found, and the boot may fail. Summary of the invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a storage device, a storage device identification code and a definition method thereof, wherein the identification code has its own command, and the ROM boot program does not need to save and query the identification code-data reliable output mode command table.

[0006] In the first aspect, according to the storage device identification code of an embodiment of the present invention, the output timing of the storage device identification code includes: a command, an address, a number of output byte data, and special byte data, and the content of the special byte data includes a read command for entering a data reliable storage mode of the storage medium.

[0007] According to some embodiments of the present invention, the special byte data is located at the end of the output timing of the storage device identification code.

[0008] According to the storage device identification code of the embodiment of the present invention, at least the following beneficial effects are achieved: by adding a special byte data in the output timing of the identification code, and the content of the special byte data includes a read command that causes the flash memory to enter the data reliable storage mode, so that after obtaining the storage device identification code, the special byte data can be obtained, thereby obtaining an operation command that causes the flash memory to enter the SLC mode, and in the SLC mode, the data stored in the flash memory is read. Therefore, the present application adds a reading method corresponding to the data reliable storage mode of the storage device to the storage device identification code, so that after obtaining the storage device identification code, the reading method of the data reliable storage mode of the device can be obtained, and the reading method is further used to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, reducing the size of the ROM boot program and improving the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode uniform, the ROM boot program can also be compatible with future flash memory products.

[0009] In a second aspect, a storage device identification code according to an embodiment of the present invention includes:

[0010] A first identification code, wherein an output timing sequence of the first identification code includes: a command, an address, a plurality of first output byte data, and special byte data;

[0011] A second identification code, the output timing of the second identification code includes: a command, a new address and multiple second output byte data; the content of the special byte data includes a special command, and the special command represents a read command group for entering a data reliable storage mode of a storage medium obtained from the second identification code; the content of multiple second output byte data includes a read command group for entering a data reliable storage mode of the storage medium.

[0012] According to some embodiments of the present invention, among multiple second output byte data, the content of one of the second output byte data represents the number of commands in the read command group, and the content of each of the remaining second output byte data represents one of the read commands in the read command group.

[0013] The storage device identification code according to the embodiment of the present invention has at least the following beneficial effects: one byte output is expanded in the output timing of the existing flash memory identification code as the first identification code, and a second identification code of a new address is expanded as the second identification code, wherein the special byte data of the first identification code includes a special command, and the special command is used to indicate that the read command for causing the flash memory to enter the data reliable storage mode cannot be expressed by only one byte, and the read command group for causing the flash memory to enter the data reliable storage mode needs to be obtained from the second identification code. The second identification code includes multiple second output byte data, and the read commands of multiple bytes are included in these second output byte data, thereby forming a read command group, and the read command group of the second identification code causes the flash memory to enter the data reliable storage mode, thereby reading the data of the flash memory. Therefore, the present application expands a byte output on the basis of the existing identification code to form a first identification code, and expands an identification code of a new address as a second identification code, and obtains a reading method of the data reliable storage mode of the device through the cooperation of the first identification code and the second identification code, and further uses the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, which reduces the size of the ROM boot program and improves the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0014] In a third aspect, according to a method for defining a storage device identification code according to an embodiment of the present invention, based on the identification code, the output timing of the identification code includes: a command, an address, and a plurality of output byte data; the definition method includes the following steps:

[0015] At a preset position of the output timing of the identification code, special byte data is added to form a storage device identification code; the content of the special byte data includes a read command for entering a data reliable storage mode of a storage medium.

[0016] According to some embodiments of the present invention, the definition method further comprises the following steps:

[0017] Obtaining the storage device identification code;

[0018] Acquire a read command for entering a data reliable storage mode of the storage medium according to the special byte data of the storage device identification code;

[0019] According to the read command, the storage medium is caused to enter the data reliable storage mode, and data is read from the storage medium in the data reliable storage mode.

[0020] The method for defining a storage device identification code according to an embodiment of the present invention has at least the following beneficial effects: by adding a special byte data in the output timing of the identification code, and the content of the special byte data includes a read command that causes the flash memory to enter a data reliable storage mode, thus, after obtaining the storage device identification code, the special byte data can be obtained, thereby obtaining an operation command that causes the flash memory to enter an SLC mode, and in the SLC mode, reading the data stored in the flash memory. Therefore, the present application adds a reading method corresponding to the data reliable storage mode of the storage device to the storage device identification code, thereby realizing that after obtaining the storage device identification code, a reading method for the data reliable storage mode of the device can be obtained, and further using the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, thereby reducing the size of the ROM boot program and improving the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0021] In a fourth aspect, according to a method for defining a storage device identification code according to an embodiment of the present invention, based on the identification code, the output timing of the identification code includes: a command, an address, and a plurality of first output byte data; the definition method includes the following steps:

[0022] Adding special byte data at a preset position of the output timing of the identification code to form a first identification code;

[0023] A second identification code is created, wherein the output timing of the second identification code includes: a command, a new address, and a plurality of second output byte data; the content of the special byte data includes a special command, wherein the special command represents a read command group for entering a data reliable storage mode of a storage medium obtained from the second identification code, and the content of the plurality of second output byte data includes a read command group for entering a data reliable storage mode of the storage medium.

[0024] According to some embodiments of the present invention, the definition method further comprises the following steps:

[0025] obtaining the first identification code;

[0026] Acquire the second identification code according to the special byte data of the first identification code;

[0027] Obtaining a read command group for entering a data reliable storage mode of the storage medium according to the plurality of the second output byte data of the second identification code;

[0028] According to the read command group, the storage medium is caused to enter the data reliable storage mode, and data is read from the storage medium in the data reliable storage mode.

[0029] The method for defining a storage device identification code according to an embodiment of the present invention has at least the following beneficial effects: a byte output is expanded in the output timing of the existing flash memory identification code as the first identification code, and a second identification code of a new address is expanded as the second identification code, wherein the special byte data of the first identification code includes a special command, and the special command is used to indicate that the read command for causing the flash memory to enter the data reliable storage mode cannot be expressed by only one byte, and the read command group for causing the flash memory to enter the data reliable storage mode needs to be obtained from the second identification code. The second identification code includes multiple second output byte data, and the second output byte data includes multiple bytes of read commands, thereby forming a read command group, and the read command group of the second identification code causes the flash memory to enter the data reliable storage mode, thereby reading the data of the flash memory. Therefore, the present application expands a byte output on the basis of the existing identification code to form a first identification code, and expands an identification code of a new address as a second identification code, and obtains a reading method of the data reliable storage mode of the device through the cooperation of the first identification code and the second identification code, and further uses the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, which reduces the size of the ROM boot program and improves the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0030] In a fifth aspect, a storage device according to an embodiment of the present invention includes the storage device identification code described in the above-mentioned first aspect embodiment or second aspect embodiment.

[0031] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0033] Figure 1 It is a structural schematic diagram of an identification code-data reliable output mode command table in the prior art;

[0034] Figure 2 It is a schematic diagram of the recognition principle of the identification code in the prior art;

[0035] Figure 3 A schematic diagram of the identification process of an identification code in the prior art;

[0036] Figure 4 It is a schematic diagram of the structure of a storage device;

[0037] Figure 5 It is a schematic diagram of the structure of the identification code in the prior art;

[0038] Figure 6 A schematic diagram of the structure of a storage device identification code according to an embodiment of the present invention;

[0039] Figure 7 A schematic diagram of the structure of a storage device identification code according to another embodiment of the present invention;

[0040] Figure 8 A flowchart of a method for defining a storage device identification code according to an embodiment of the present invention;

[0041] Fig. 9 This is a flowchart of a method for defining a storage device identification code according to another embodiment of the present invention. DETAILED DESCRIPTION

[0042] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0043] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0044] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0045] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0046] SLC: Single Level Cell, single-layer storage unit.

[0047] MLC: Multi-level cell.

[0048] TLC: Trinary-Level Cell, three-layer storage unit.

[0049] QLC: Quad-Level Cell, four-layer storage unit.

[0050] NAND Flash is a non-volatile data storage device that does not lose data when power is off. Compared with other non-volatile storage, such as NOR Flash, it has the characteristics of large support capacity and high interface speed. It is the current mainstream data storage medium.

[0051] After years of technological development and product iteration, NAND Flash memory has gradually increased in capacity and interface speed. With the emergence of technologies such as SLC / MLC / TLC / QLC, 2D plane / 3D stacking structure, the storage capacity per unit area has increased, and the cost per unit storage capacity has gradually decreased, but at the same time, the data reliability of flash memory has also gradually decreased. Generally speaking, since the SLC structure only stores one bit of data in a single storage unit (cell), it has better data reliability than MLC / TLC / QLC, which stores multiple bits of data in one storage unit. In order to improve the data reliability of MLC / TLC / QLC products, these products usually provide SLC mode, which can be entered through a specific command method. After entering the SLC mode, data will be written to the storage unit in SLC mode, and one storage unit will only store one bit of data, so the reliability of the data can be improved. Since one storage unit can only store one bit of data after entering the SLC mode, it can be seen that the improvement in reliability is achieved by sacrificing storage capacity. There is no unified command method for entering and exiting the SLC mode in the industry, and they are all different. Even different products from the same manufacturer support different command methods, which brings many inconveniences to the compatible use of flash memory.

[0052] NAND Flash is widely used due to its large capacity and fast speed, such as smart phones, tablet computers, desktop computers, data center servers, etc. In embedded applications such as smart phones and tablet computers, in addition to storing user data, NAND Flash also stores software data required for system operation, such as startup information, operating system, application software installation program, etc. The most important of these data is the startup information and operating system boot-related data. Once damaged or lost, the system will not be able to start, and the entire product will lose its functions and cannot be used. The composition and startup process of the system are as follows: Figure 4 As shown in the figure, after the system is powered on, the processor of the main control chip will first execute the boot program solidified in the ROM inside the chip, and read the system startup information from the external flash memory medium. The startup information here is actually a boot program for obtaining the subsequent level of startup information; if the read startup information is correct, the main control chip processor jumps the program pointer to this startup information and executes the program to obtain the subsequent level of startup information. This process is repeated until all the information is successfully loaded from the flash memory and the system is fully operational.

[0053] During the boot process, the most important thing is to correctly obtain the first-level boot information, because the boot program of this level of information is solidified in the ROM of the chip. ROM is a read-only memory, and once the chip is manufactured, it cannot be changed. If there is a defect in the ROM and the boot cannot be achieved, the chip can only be re-produced, which brings great time, economic and other costs. Therefore, the design of the program in the ROM needs to be as robust as possible and compatible with various scenarios in chip applications to avoid unnecessary modifications.

[0054] Due to the characteristics of flash memory, the data stored in it may have different degrees of errors due to factors such as ambient temperature, storage time, and degree of wear. When the number of errors reaches a certain level and exceeds the error correction capability of the main control chip, the data may be lost. As mentioned above, in order to ensure the data reliability of the first-level startup information stored in the flash memory as much as possible and to ensure that the error level of the data obtained by the boot program in the ROM of the main control chip is within the correctable range, this part of key information is usually written into the flash memory in SLC mode. Correspondingly, the boot program in the ROM also needs to use SLC mode when obtaining data from the flash memory.

[0055] Usually, the ROM boot program of a main control chip needs to be compatible with the mainstream flash memory products of various manufacturers at present and in the future, so that the main control chip has the good ability to flexibly match the flash memory medium and provide good technical response capabilities for the entire product during the changes in the supply and demand of the flash memory market. However, the differences in the command methods of various flash memory manufacturers to enter the SLC mode have brought great obstacles to the compatible design of the ROM boot program of the main control chip. In addition, the chip area is a direct reflection of the chip cost. The larger the size of the boot program, the larger the area of ​​the ROM that stores the boot program, which will also indirectly affect the cost of the chip. Therefore, the design of the ROM boot program should be as simple as possible.

[0056] The current ROM boot program of the main control chip mainly adopts the idea of ​​enumeration traversal when being compatible with the SLC mode command methods of various manufacturers. By counting the information of the flash memory products to be supported, mainly including: identification code (ID) and SLC mode entry / exit command, an SLC mode operation command table (identification code-data reliable output mode command table) based on the identification code as the index is established. The schematic diagram is shown in Figure 1 shown.

[0057] Before entering SLC mode, the bootloader first reads the identification code of the flash memory, then searches the SLC mode operation command table according to the identification code to obtain the corresponding SLC mode entry command (the command acquisition process is as follows Figure 2 As shown), the main control chip then sends a command to make the data block in the flash memory enter SLC mode, and then reads the data from the agreed location (the overall process is as follows Figure 3 as shown).

[0058] With this solution, since different flash memory products have different SLC mode entry command methods, it is necessary to use the identification code that uniquely corresponds to the product to distinguish and select the corresponding SLC mode command. Under such restrictions, it is not conducive to the design and use of the ROM boot program because: (1) it must fully include all flash memory identification codes and SLC mode entry command methods that need to be supported, which increases the size of the ROM program; (2) during the boot process, the identification code must be used to search before the SLC mode entry command method can be obtained, which increases the boot time overhead; (3) if an unregistered identification code is encountered, the SLC mode entry command method cannot be found, and the boot may fail.

[0059] To this end, the embodiment of the present invention provides a storage device, a storage device identification code and a definition method thereof, by adding a reading method corresponding to the data reliable storage mode of the storage device to the storage device identification code, or by expanding a byte output on the basis of the existing identification code to form a first identification code, and expanding an identification code of a new address as a second identification code, and obtaining a reading method of the data reliable storage mode of the device through the cooperation of the first identification code and the second identification code, and further using the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, reducing the size of the ROM boot program and improving the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0060] The following describes in detail the storage device identification code, the storage device code definition method and the storage device according to the embodiments of the present invention in conjunction with the accompanying drawings.

[0061] In a first aspect, an embodiment of the present invention provides a storage device identification code, such as Figure 6 As shown, the output timing of the storage device identification code includes: command, address, several output byte data, and special byte data, and the content of the special byte data includes a read command for entering the data reliable storage mode of the storage medium (NAND Flash).

[0062] It should be noted that the storage device identification code refers to the ID of the storage device, which is an identification code that uniquely corresponds to the product. The data reliable storage mode refers to the mode or method determined by the storage device manufacturer. The data stored in this mode or method has the best reliability and can minimize the impact of factors that affect data reliability, such as temperature, voltage, storage time, and wear. Common data reliable storage modes may include SLC mode (pseudo SLC, pSLC, that is, pseudo SLC, is a technology that changes MLC / TLC to SLC. MLC / TLC can be controlled to enter pSCL mode through instructions. When storing, only 1 bit of data is stored in each cell of MLC / TLC, so that MLC / TLC has the performance of SLC and the cost-effectiveness of MLC / TLC), Firmware SLC mode, etc. Different flash memory products may have different definitions. The reading method corresponding to the data reliable storage mode refers to the method required to obtain the data stored in the data reliable storage mode. Commonly, if the data is written in the SLC mode, a command must be sent to make the flash memory enter the SLC mode before the data can be read. That is, the flash memory is put into the data reliable storage mode (SLC mode) through an operation command, and then the data is read from the flash memory. The operation command that makes the flash memory enter the SLC mode is the corresponding reading method.

[0063] The definition and output timing of the existing flash memory identification code (ID) are as follows Figure 5 As shown in the figure, this timing is defined in the ONFI protocol (a set of open standards of NandFlash) and the flash product manuals of various manufacturers and is the same. The output timing of the flash identification code includes command, address, and several output bytes of data. In this output timing, the command is usually 0x90, and the address can usually support values ​​such as 0x00, 0x20, and 0x40; the data output from the flash memory is usually 6 bytes, and its data content is related to the address, which can represent the manufacturer-defined ID, ONFI ID, and JEDEC ID. Among them, the ID corresponding to the 0x00 address is the most widely used and can uniquely represent the flash product type. Its content includes the manufacturer ID, flash internal structure information, error correction requirements, and other necessary information for using flash memory.

[0064] In order to realize the reading method corresponding to the data reliable storage mode directly obtained by the identification code without establishing an SLC mode operation command table (identification code-data reliable output mode command table) based on the identification code as an index, in this application, Figure 5 and Figure 6As shown, the storage identification code of the present application adds one byte (i.e., special byte data) based on the output timing of the default flash memory identification code, and outputs the special byte data at a specific position. The content of the special byte data includes a read command for entering the data reliable storage mode of the storage medium. Through the read command, the data stored in the flash memory in the data reliable storage mode can be read. A specific example of a storage identification code is as follows Figure 6 As shown, it includes a command, an address, a number of output byte data (output byte data 1-6), and special byte data (output byte data 7), and the content of the special byte data includes a read command for entering the data reliable storage mode of the storage medium. In this example, the special byte data is added at the end of the default flash memory identification code. It should be noted that the special byte data can also be added to other positions of the flash memory identification code, such as being set after the address.

[0065] Since the identification code corresponding to the address 0x00 is the most widely used and can uniquely represent the flash memory product type, its content includes the manufacturer ID, flash memory internal structure information, error correction requirements, and other necessary information for using flash memory, therefore, in this example, the address of the storage device identification code can be 0x00, so as to distinguish the product type.

[0066] According to the storage device identification code of the embodiment of the present application, by adding a special byte data in the output timing of the identification code, and the content of the special byte data includes a read command that causes the flash memory to enter the data reliable storage mode, so that when the storage device identification code is obtained, the special byte data can be obtained, thereby obtaining the operation command that causes the flash memory to enter the SLC mode, and in the SLC mode, the data stored in the flash memory is read. Therefore, the present application adds a reading method corresponding to the data reliable storage mode of the storage device to the storage device identification code, so that after obtaining the storage device identification code, the reading method of the data reliable storage mode of the device can be obtained, and the reading method is further used to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, which reduces the size of the ROM boot program and improves the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0067] In a second aspect, an embodiment of the present invention provides a storage device identification code, such as Figure 7As shown, the storage device identification code includes a first identification code and a second identification code, the output timing of the first identification code includes: command, address, a plurality of first output byte data (output byte data 1-6), and special byte data (output byte data 7); the output timing of the second identification code includes: command, new address and a plurality of second output byte data (output byte data 1'-7'); the content of the special byte data includes a special command, and the special command represents a read command group for obtaining a data reliable storage mode for entering the storage medium from the second identification code; the content of the plurality of second output byte data includes a read command group for entering the data reliable storage mode for entering the storage medium.

[0068] It should be noted that if the read mode of the data reliable storage mode cannot be implemented by a one-byte command, but needs to be implemented by a read command of multiple bytes, the storage device identification code described in the first aspect embodiment above cannot be used. To this end, in this example, another storage device identification code is proposed, which is formed by the cooperation of a first identification code and a second identification code. Among them, the structure of the first identification code is similar to the structure of the storage device identification code described in the first aspect embodiment, both of which are based on the output timing of the default flash memory identification code, adding a byte as special byte data, and outputting the special byte data at a specific position. The difference is that the special byte data of the first identification code does not include a read command for entering the data reliable storage mode of the storage medium, but includes a special command. The special command is used to indicate that the read command that causes the flash memory to enter the data reliable storage mode of the storage medium cannot be represented by only one byte. On this basis, a second identification code based on different addresses and a corresponding parsing method are added. In the second identification code, its address is different from the address of the first identification code, and the second identification code includes a plurality of second output byte data, in which a plurality of bytes of read commands are included, thereby constituting a read command group. Through the read command group of the second identification code, the flash memory enters a data reliable storage mode, thereby reading the data of the flash memory. It should be noted that all the second output byte data may constitute the read command group, or part of the second output byte data may constitute the read command group. A possible embodiment is: the content of one of the second output byte data represents the number of commands of the read command group, and the content of each of the remaining second output byte data represents one of the read commands of the read command group. Specifically, assuming that the output byte data 1' represents that the number of commands of the read command group entering the data reliable storage mode is 6, the output byte data 2'-7' corresponds to the 6 read commands, and the read command group is constituted by the output byte data 2'-7'.

[0069] According to the storage device identification code of the embodiment of the present application, a byte output is expanded in the output timing of the existing flash memory identification code as the first identification code, and a second identification code of a new address is expanded to add a special byte data, wherein the special byte data of the first identification code includes a special command, and the special command is used to indicate that the read command for causing the flash memory to enter the data reliable storage mode cannot be expressed by only one byte, and it is necessary to obtain the read command group for causing the flash memory to enter the data reliable storage mode from the second identification code. The second identification code includes multiple second output byte data, and these second output byte data include multiple bytes of read commands, thereby forming a read command group, and through the read command group of the second identification code, the flash memory enters the data output mode of the data reliable storage mode, thereby reading the data of the flash memory. Therefore, the present application expands a byte output on the basis of the existing identification code to form a first identification code, and expands an identification code of a new address as a second identification code, and obtains a reading method of the data reliable storage mode of the device through the cooperation of the first identification code and the second identification code, and further uses the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, which reduces the size of the ROM boot program and improves the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0070] In a third aspect, the embodiment of the present application further proposes a method for defining a storage device identification code, based on the identification code, the output timing of the identification code includes: a command, an address and a plurality of output byte data; the definition method includes the following steps:

[0071] Step S100: adding special byte data at a preset position of the output timing of the identification code to form a storage device identification code; the content of the special byte data includes a read command for entering a data reliable storage mode of the storage medium.

[0072] Specifically, the definition and output timing of the existing identification code are as follows: Figure 5As shown in the figure, this timing is defined in the ONFI protocol (a set of open standards of NandFlash) and the flash product manuals of various manufacturers and is the same. The output timing of the identification code includes command, address, and several output bytes of data. In this output timing, the command is usually 0x90, and the address can usually support values ​​such as 0x00, 0x20, and 0x40; the data output from the flash memory is usually 6 bytes, and its data content is related to the address, which can represent the manufacturer-defined ID, ONFI ID, and JEDEC ID. Among them, the ID corresponding to the 0x00 address is the most widely used and can uniquely represent the flash product type. Its content includes the manufacturer ID, flash internal structure information, error correction requirements, and other necessary information for using flash memory.

[0073] In order to realize the reading method corresponding to the data reliable storage mode directly obtained by the identification code without establishing an SLC mode operation command table (identification code-data reliable output mode command table) based on the identification code as an index, in this application, Figure 6 As shown, the storage identification code of the present application adds one byte (i.e., special byte data) based on the output timing of the existing identification code, and outputs the special byte data at a specific position. The content of the special byte data includes a read command for entering the data reliable storage mode. Through the read command, the data stored in the flash memory in the data reliable storage mode can be read. A specific example of a storage identification code is as follows Figure 6 As shown, it includes a command, an address, a number of output byte data (output byte data 1-6), and special byte data (output byte data 7), and the content of the special byte data includes a read command to enter the data reliable storage mode. In this example, the special byte data is added at the end of the default flash memory identification code. It should be noted that the special byte data can also be added to other positions of the flash memory identification code, such as being set after the address.

[0074] Furthermore, in this embodiment, the method for defining a storage device identification code further includes the following steps:

[0075] Step S200: Obtaining a storage device identification code;

[0076] Step S300: obtaining a read command for entering a data reliable storage mode of a storage medium according to the special byte data of the storage device identification code;

[0077] Step S400: according to the read command, the storage medium is caused to enter a data reliable storage mode of the storage medium, and data is read from the storage medium in the data reliable storage mode.

[0078] According to the definition method of the storage device identification code of the embodiment of the present application, by adding a special byte data in the output timing of the identification code, and the content of the special byte data includes a read command that causes the flash memory to enter the data reliable storage mode, so that when the storage device identification code is obtained, the special byte data can be obtained, thereby obtaining the operation command that causes the flash memory to enter the SLC mode, and in the SLC mode, the data stored in the flash memory is read. Therefore, the present application adds a reading method corresponding to the data reliable storage mode of the storage device to the storage device identification code, so that after obtaining the storage device identification code, the reading method of the data reliable storage mode of the device can be obtained, and the reading method is further used to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, reducing the size of the ROM boot program and improving the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0079] In a fourth aspect, the embodiment of the present application further proposes another method for defining a storage device identification code, based on the identification code, the output timing of the identification code includes: a command, an address and a plurality of first output byte data; the definition method includes the following steps:

[0080] Step S500: adding special byte data at a preset position of the output timing of the identification code to form a first identification code;

[0081] Step S600: Create a second identification code, the output timing of the second identification code includes: a command, a new address and multiple second output byte data; the content of the special byte data includes a special command, the special command represents a read command group for entering a data reliable storage mode of the storage medium obtained from the second identification code, and the content of the multiple second output byte data includes a read command group for entering a data reliable storage mode.

[0082] It should be noted that if the read mode of the data reliable storage mode cannot be implemented by a one-byte command, but needs to be implemented by a multiple-byte operation command, the storage device identification code needs to be formed by the first identification code and the second identification code. Among them, the structure of the first identification code is similar to the structure of the storage device identification code described in the first aspect of the embodiment. On the basis of the output timing of the default flash memory identification code, one byte is added as special byte data, and the special byte data is output at a specific position. The difference is that the special byte data of the first identification code does not include a read command to enter the data reliable storage mode, but includes a special command. The special command is used to indicate that the read command that makes the flash memory enter the data reliable storage mode cannot be represented by only one byte. On this basis, a second identification code based on different addresses and a corresponding parsing method are added. In the second identification code, its address is different from the address of the first identification code, and the second identification code includes multiple second output byte data, in which multiple bytes of operation commands are included, thereby forming an operation command group. Through the operation command group of the second identification code, the flash memory enters the data reliable storage mode, thereby reading the data of the flash memory. It should be noted that all of the second output byte data may constitute a read command group, or part of the second output byte data may constitute a read command group. A possible embodiment is: the content of one of the second output byte data represents the number of commands in the read command group, and the content of each of the remaining second output byte data represents one of the read commands in the read command group. Specifically, assuming that the output byte data 1' represents that the number of commands in the read command group entering the data reliable storage mode is 6, the output byte data 2'-7' corresponds to the 6 read commands, and the read command group is formed by the output byte data 2'-7'.

[0083] Furthermore, in this embodiment, the method for defining a storage device identification code further includes the following steps:

[0084] Step S700: Obtain a first identification code;

[0085] Step S800: Obtaining a second identification code according to the special byte data of the first identification code;

[0086] Step S900: obtaining a read command group for entering a data reliable storage mode of a storage medium according to a plurality of second output byte data of a second identification code;

[0087] Step S1000: according to the read command group, the storage medium is made to enter a data reliable storage mode, and data is read from the storage medium in the data reliable storage mode.

[0088] According to the method for defining the storage device identification code of the embodiment of the present application, a byte output is expanded in the output timing of the existing flash memory identification code as the first identification code, and a second identification code of a new address is expanded to add a special byte data, wherein the special byte data of the first identification code includes a special command, and the special command is used to indicate that the read command for causing the flash memory to enter the data reliable storage mode cannot be expressed by only one byte, and it is necessary to obtain the read command group for causing the flash memory to enter the data reliable storage mode from the second identification code. The second identification code includes multiple second output byte data, and these second output byte data include multiple bytes of read commands, thereby forming a read command group, and the read command group of the second identification code causes the flash memory to enter the data output mode of the data reliable storage mode, thereby reading the data of the flash memory. Therefore, the present application expands a byte output on the basis of the existing identification code to form a first identification code, and expands an identification code of a new address as a second identification code, and obtains a reading method of the data reliable storage mode of the device through the cooperation of the first identification code and the second identification code, and further uses the reading method to obtain the data stored in the storage device, so that the ROM boot program no longer needs to save and query the identification code-data reliable output mode command table, which reduces the size of the ROM boot program and improves the efficiency of obtaining the data reliable output mode command. At the same time, since the identification code itself carries a command, while keeping the output mode unified and unchanged, the ROM boot program can also be compatible with future flash memory products.

[0089] On the other hand, an embodiment of the present invention further proposes a storage device, which includes the storage device identification code of the above-mentioned first aspect embodiment or second aspect embodiment.

[0090] Some aspects of the present disclosure are described above with reference to the block diagram and flow chart of the system, method, system and / or computer program product according to the exemplary embodiments.It should be understood that the combination of one or more blocks in the block diagram and the flow chart and the blocks in the block diagram and the flow chart can be realized by executing computer executable program instructions respectively.Equally, according to some embodiments, some blocks in the block diagram and the flow chart may not need to be executed in the order shown, or may not need to be executed in full.In addition, additional components and / or operations beyond those components and / or operations shown in the blocks in the block diagram and the flow chart may be present in certain embodiments.

[0091] Therefore, the blocks in the block diagrams and flow charts support the combination of devices for performing the specified functions, the combination of elements or steps for performing the specified functions, and the program instruction devices for performing the specified functions. It should also be understood that each block in the block diagrams and flow charts and the combination of blocks in the block diagrams and flow charts can be implemented by a special-purpose hardware computer system or a combination of special-purpose hardware and computer instructions that performs a specific function, element or step.

[0092] The program modules, applications, etc. described herein may include one or more software components, including, for example, software objects, methods, data structures, etc. Each such software component may include computer-executable instructions that, in response to execution, cause at least a portion of the functionality described herein (e.g., one or more operations of the illustrative methods described herein) to be performed.

[0093] Software components can be encoded with any of various programming languages. An exemplary programming language can be a low-level programming language, such as an assembly language associated with a specific hardware architecture and / or an operating system platform. The software component comprising assembly language instructions may need to be converted to executable machine code by an assembler before being executed by hardware architecture and / or platform. Another exemplary programming language can be a higher-level programming language, which can be transplanted across multiple architectures. The software component comprising a higher-level programming language may need to be converted to an intermediate representation by an interpreter or a compiler before execution. Other examples of programming languages ​​include but are not limited to macro languages, shells or command languages, job control languages, scripting languages, database queries or search languages ​​or report writing languages. In one or more exemplary embodiments, the software component comprising the instruction of one of the above-mentioned programming language examples can be directly executed by an operating system or other software components, without first being converted into another form.

[0094] Software components may be stored as files or other data storage structures. Software components of similar type or related functions may be stored together, such as in a specific directory, folder, or library. Software components may be static (e.g., preset or fixed) or dynamic (e.g., created or modified at execution time).

[0095] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present invention.

Claims

1. A storage device identification code, characterized in that: include: A first identification code, wherein an output timing sequence of the first identification code includes: a command, an address, a plurality of first output byte data, and special byte data; A second identification code, the output timing of the second identification code includes: a command, a new address and multiple second output byte data; the content of the special byte data includes a special command, and the special command represents a read command group for entering a data reliable storage mode of a storage medium obtained from the second identification code; the content of multiple second output byte data includes a read command group for entering a data reliable storage mode of the storage medium.

2. The storage device identification code according to claim 1, characterized in that: Among the plurality of second output byte data, the content of one of the second output byte data represents the number of commands in the read command group, and the content of each of the remaining second output byte data represents one of the read commands in the read command group.

3. A method for defining a storage device identification code, characterized in that: Based on the identification code, the output timing of the identification code includes: a command, an address and a plurality of first output byte data; the definition method includes the following steps: Adding special byte data at a preset position of the output timing of the identification code to form a first identification code; A second identification code is created, wherein the output timing of the second identification code includes: a command, a new address, and a plurality of second output byte data; the content of the special byte data includes a special command, wherein the special command represents a read command group for entering a data reliable storage mode of a storage medium obtained from the second identification code, and the content of the plurality of second output byte data includes a read command group for entering a data reliable storage mode of the storage medium.

4. The method for defining a storage device identification code according to claim 3, characterized in that: The definition method further comprises the following steps: obtaining the first identification code; Acquire the second identification code according to the special byte data of the first identification code; Obtaining a read command group for entering a data reliable storage mode of the storage medium according to the plurality of the second output byte data of the second identification code; According to the read command group, the storage medium is caused to enter the data reliable storage mode, and data is read from the storage medium in the data reliable storage mode.

5. A storage device, characterized in that: include: A storage device identification code as claimed in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Method and device for reconfiguration of reliability data in flash eeprom storage pages

    CN101558452A

  • Flash device, data storage system and method for transmitting special command to flash device

    CN101814009A

  • System and method for setting access and modification for synchronous serial interface NAND

    CN101828175A

  • Large data read techniques

    CN113841128A

  • Computer-readable storage medium, and reliable command configuration method and device

    CN113918081A