[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0057] It is to be understood that, when used in this specification and the appended claims, the terms "comprising" and "comprising" indicate the presence of the described features, integers, steps, operations, elements and/or components, but do not exclude one or The presence or addition of a number of other features, integers, steps, operations, elements, components, and/or sets thereof.
[0058] It is also to be understood that the terminology used in this specification of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly dictates otherwise.
[0059] It should further be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items .
[0060] see figure 2 , figure 2 This is a schematic flowchart of a multi-particle adaptive initialization method provided by an embodiment of the present invention. The multi-grain adaptive initialization method is applied to a solid-state hard disk. When the solid-state hard disk is powered on and initialized, the solid-state hard disk performs a multi-granular adaptive initialization method to realize the power-on initialization of different granules.
[0061] figure 2 It is a schematic flowchart of a multi-particle adaptive initialization method provided by an embodiment of the present invention. like figure 2 As shown, the method includes the following steps S110 to S140.
[0062] S110. Set the master control mode to an asynchronous mode.
[0063] After the FFh command and the 70h command are sent, the particle may be in synchronous or asynchronous mode. If the particle is in sync mode, the master and particle modes match, and the initialization is successful. If the particle is in the asynchronous mode, the master mode is the synchronous mode, and the master and particle modes do not match. Depend on Figure 5 and Image 6 As shown, in the asynchronous mode, the particle DQ[7:0] will send data out when RE# is low; while in the switching time mode, data will be sent out when RE# is asynchronous, as long as the frequency is low enough, the master control It is possible to interact using async mode and granular's async mode.
[0064] In the initialization phase, no matter what mode the particle is in, use the asynchronous mode for initialization, use the same set of codes and products compatible with different particles or different batches of the same particle, to improve the compatibility of the entire power-on initialization process and realize SSD multi-particle It is self-adaptive, no need to modify the configuration of the firmware, and the compatibility is strong.
[0065] S120, initialize the particles in an asynchronous mode.
[0066] In this embodiment, the main control is kept in the asynchronous mode and the frequency of the main control operating the NAND flash memory is less than 20MHz, preferably, the main control is kept in the asynchronous mode and the frequency of the main control operating the NAND flash memory is 10MHz
[0067] Keep the master in asynchronous mode and the master operates the NAND flash at a frequency of 10MHz; the particles may have Async (ie asynchronous serial)/Legacy/Toggle (ie the flash interface based on dynamic random access memory)/NV-DDR (ie non-volatile DDR interface)/NV-DDR2 (ie non-volatile DDR2 interface) mode, Legacy is a name for Toshiba particles, which has the meaning of asynchronous serial, Async/Legacy mode corresponds to SDR ( Asynchronous random, Synchronous Dynamicrandom) timing mode, Toggle/NV-DDR/NV-DDR2 mode corresponds to asynchronous timing mode. On the basis of analyzing the particle timing mode, in the particle initialization stage, the main control is kept in the asynchronous mode and the frequency of the main control operating NAND flash memory is controlled below 20MHz, generally 10MHz.
[0068] In one embodiment, as image 3 As shown, the above-mentioned step S120 may include:
[0069] S121, reset the particle according to the FFh command sent by the master;
[0070] S122, delay the setting time for the main control;
[0071] S123, judging whether the reset of the particles is completed;
[0072] If not, return to S122;
[0073] S124, if yes, send the 70h command to query the particle status by the master using the asynchronous mode;
[0074] S125, determine whether the particle state is a ready state;
[0075] If yes, then enter the S130;
[0076] If not, return to S124.
[0077] In this process, the difference from the prior art is that the 70h command is used to query the particle status in asynchronous mode. Regardless of whether the particle is in synchronous mode or asynchronous mode, data can be exchanged with the master to achieve the purpose of querying the particle ID.
[0078] S130. Obtain the particle ID.
[0079] In this embodiment, the particle ID is read according to the read ID command using the 00h address sent by the master.
[0080] S140. Switch the particle mode according to the particle ID.
[0081] In one embodiment, as Figure 4 As shown, the above-mentioned step S140 may include steps S141-S142.
[0082] S141. Obtain the particle manufacturer and product model according to the particle ID;
[0083] S142, switch the mode and the timing mode according to the method specified in the manual of the product model of the particle.
[0084] If it is a Micron particle, use the method specified in the Micron particle manual to switch the mode and timing mode; if it is a Toshiba particle, use the method specified in the Toshiba particle manual to switch the mode and timing mode.
[0085] The above-mentioned multi-particle adaptive initialization method, by setting the mode of the main control to asynchronous mode, and initializing the particles in this mode, and keeping the main control in the asynchronous mode and the frequency of the main control operating the NAND flash memory is less than 20MHz, to ensure that no matter what. No matter what mode the particle is in, it is initialized in asynchronous mode. It uses the same code and is compatible with products of different particles or different batches of the same particle to realize the self-adaptation of multiple SSDs without modifying the configuration of the firmware, and has strong compatibility.
[0086] Figure 7 It is a schematic block diagram of a multi-particle adaptive initialization apparatus 300 provided by an embodiment of the present invention. like Figure 7 As shown, corresponding to the above multi-particle adaptive initialization method, the present invention further provides a multi-particle adaptive initialization device 300 .
[0087] see Figure 7 , the multi-particle adaptive initialization device 300 includes:
[0088] a mode setting unit 301, configured to set the master mode to an asynchronous mode;
[0089] an initialization unit 302, configured to initialize the particles in an asynchronous mode;
[0090] The ID obtaining unit 303 is used to obtain the particle ID;
[0091] The switching unit 304 is configured to switch the particle mode according to the particle ID.
[0092] In one embodiment, as Figure 8 As shown, the initialization unit 302 includes:
[0093] The reset subunit 3021 is used to reset the particles according to the FFh command sent by the master;
[0094] The delay subunit 3022 is used to delay the setting time for the main control;
[0095] The reset judgment subunit 3023 is used to judge whether the reset of the particles is completed;
[0096] The query sending subunit 3024 is used to send the 70h command to query the particle status by the master using the asynchronous mode;
[0097] The preparation judgment subunit 3025 is used for judging whether the particle state is the ready state.
[0098] In one embodiment, as Figure 9 As shown, the switching unit 304 includes:
[0099] The information acquisition subunit 3041 is used to acquire the particle manufacturer and product model according to the particle ID;
[0100] The mode switching subunit 3042 is used to switch the mode and the timing mode according to the mode specified in the manual of the product model of the particle.
[0101] It should be noted that those skilled in the art can clearly understand that, for the specific implementation process of the above-mentioned multi-particle adaptive initialization device 300 and each unit, reference may be made to the corresponding descriptions in the foregoing method embodiments. For the convenience and brevity of description, It is not repeated here.
[0102] The above-mentioned multi-particle adaptive initialization apparatus 300 can be implemented in the form of a computer program, and the computer program can be Figure 10 run on the computer equipment shown.
[0103] see Figure 10 , Figure 10 It is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 is a server.
[0104] see Figure 10 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory may include a non-volatile storage medium 503 and an internal memory 504.
[0105] The nonvolatile storage medium 503 can store an operating system 5031 and a computer program 5032 . The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a multi-particle adaptive initialization method.
[0106] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0107] The internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a multi-granular adaptive initialization method.
[0108] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that, Figure 10 The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more than those shown in the figure. More or fewer components, or some components are combined, or have a different arrangement of components.
[0109] Wherein, the processor 502 is used to run the computer program 5032 stored in the memory to realize the following steps:
[0110] Set the master mode to asynchronous mode;
[0111] Use asynchronous mode to initialize particles;
[0112] Get particle ID;
[0113] Toggle particle mode based on particle ID.
[0114] In an embodiment, when the processor 502 implements the step of initializing particles in an asynchronous mode, the processor 502 specifically implements the following steps:
[0115] Reset the particle according to the FFh command sent by the master;
[0116] Delay setting time for the main control;
[0117] Determine whether the particles are reset;
[0118]If not, return to the delay setting time for the main control;
[0119] If so, the master will use the asynchronous mode to send the 70h command to query the particle status;
[0120] Determine whether the particle state is ready;
[0121] If yes, then enter the obtaining particle ID;
[0122] If not, return to using the asynchronous mode to send the 70h command to query the particle status.
[0123] In an embodiment, when the processor 502 implements the step of initializing particles in an asynchronous mode, the processor 502 specifically implements the following steps:
[0124] Keep the master in asynchronous mode and the master operates the NAND flash at a frequency of less than 20MHz.
[0125] In one embodiment, the processor 502 specifically implements the following steps when implementing the step of obtaining the particle ID:
[0126] Read the particle ID according to the read ID command sent by the master using the 00h address.
[0127] In an embodiment, when implementing the step of switching the particle mode according to the particle ID, the processor 502 specifically implements the following steps:
[0128] Obtain the particle manufacturer and product model according to the particle ID;
[0129] Switch between modes and timing modes as specified in the manual for the product model of the pellet.
[0130] It should be understood that, in this embodiment of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. Wherein, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like.
[0131] It can be understood by those skilled in the art that all or part of the processes in the methods for implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the above-described method embodiments.
[0132] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by the processor, the processor executes the following steps:
[0133] Set the master mode to asynchronous mode;
[0134] Use asynchronous mode to initialize particles;
[0135] Get particle ID;
[0136] Toggle particle mode based on particle ID.
[0137] In one embodiment, when the processor executes the computer program to implement the step of initializing particles in an asynchronous mode, the processor specifically implements the following steps:
[0138] Reset the particle according to the FFh command sent by the master;
[0139] Delay setting time for the main control;
[0140] Determine whether the particles are reset;
[0141] If not, return to the delay setting time for the main control;
[0142] If so, the master will use the asynchronous mode to send the 70h command to query the particle status;
[0143] Determine whether the particle state is ready;
[0144] If yes, then enter the obtaining particle ID;
[0145] If not, return to using the asynchronous mode to send the 70h command to query the particle status.
[0146] In one embodiment, when the processor executes the computer program to implement the step of initializing particles in an asynchronous mode, the processor specifically implements the following steps:
[0147] Keep the master in asynchronous mode and the master operates the NAND flash at a frequency of less than 20MHz.
[0148] In one embodiment, when the processor executes the computer program to implement the step of obtaining the particle ID, the processor specifically implements the following steps:
[0149] Read the particle ID according to the read ID command sent by the master using the 00h address.
[0150] In an embodiment, when the processor executes the computer program to implement the step of switching the particle mode according to the particle ID, the processor specifically implements the following steps:
[0151] Obtain the particle manufacturer and product model according to the particle ID;
[0152] Switch between modes and timing modes as specified in the manual for the product model of the pellet.
[0153] The storage medium may be various computer-readable storage media that can store program codes, such as a U disk, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk.
[0154] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
[0155] In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and other division methods may be used in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
[0156] The steps in the method of the embodiment of the present invention may be adjusted, combined and deleted in sequence according to actual needs. Units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
[0157] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or a part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0158] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed by the present invention. Modifications or substitutions should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.