A memory and a method for accelerating the boot time thereof
By optimizing the processing of cache area and mapping information in memory, the problem of limited improvement in the boot performance of the storage device is solved, and a faster boot process and improved efficiency are achieved.
Patent Information
- Application Number
- CN202411203852.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The boot performance of existing storage devices cannot be further improved, mainly due to the upper limit of the hardware structure and firmware algorithm of the main controller, which leads to a long boot time.
By introducing a cache unit and a central processing unit in the memory, the storage space of the write cache area is reduced, and the mapping information of the logical address and physical address required during the boot phase is written to the system block and table area. In the block, optimize the boot process.
It effectively reduces the table reading time during the boot stage, improves the memory boot efficiency and performance, and realizes a faster boot process.
Smart Images

Figure CN118708263B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of static storage technology, and in particular to a memory and a method for accelerating the boot time thereof. Background Art
[0002] In the storage field, boot time is one of the important performance indicators of storage devices. The industry usually optimizes the reconstruction algorithm of storage devices or improves the read and write performance of storage devices to achieve the purpose of optimizing boot performance. However, the hardware structure or firmware (FW) algorithm of the main controller in the storage device has an upper limit, which makes it impossible to further improve the boot performance of the storage device. Therefore, there is room for improvement. Summary of the invention
[0003] The present invention provides a memory and a method for accelerating the boot time thereof, so as to solve the technical problem in the prior art that the boot performance of a storage device cannot be further improved.
[0004] The present invention provides a memory, comprising:
[0005] A flash memory, comprising a system block and a table block, wherein the system block and the table block are blocks that cannot be accessed by a user;
[0006] A main controller is electrically connected to the flash memory, and the main controller includes:
[0007] A cache unit, including a read cache area and a write cache area;
[0008] A central processing unit, used for writing the logical address to be accessed during the memory startup phase into the system block, and then writing the mapping information between the logical address to be accessed during the memory startup phase and the physical address into the table block;
[0009] Wherein, during the startup phase of the memory, the central processing unit reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area;
[0010] The central processing unit also obtains the startup information at the physical address corresponding to the mapping information to complete the startup of the memory.
[0011] In one embodiment of the present invention, after the memory completes the boot process, the central processing unit restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
[0012] In one embodiment of the present invention, during the startup phase of the memory, the host sends a startup acceleration mode instruction to the memory, and when the memory is in the startup acceleration mode, the central processing unit reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area, obtains the startup information at the physical address corresponding to the mapping information, and completes the startup of the memory;
[0013] After the memory completes the boot process, the host sends a normal mode instruction to the memory. When the memory is in normal mode, the central processing unit restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
[0014] In one embodiment of the present invention, after the image file of the host is updated and upgraded, the image file is overwritten into the memory, the central processing unit updates the mapping information of the logical address and the physical address that need to be accessed in the boot phase of the memory, and updates the mapping information in the table block;
[0015] During the memory startup phase, the central processing unit loads the updated mapping information into the read buffer area, obtains the startup information on the physical address corresponding to the updated mapping information, and completes the startup of the memory.
[0016] In one embodiment of the present invention, when the memory is in an idle state, or after the host sends a power-off instruction to the memory, in the static random access unit of the controller, the central processing unit updates the mapping information of the logical address and the physical address that need to be accessed during the power-on phase of the memory, and updates the mapping information in the table block.
[0017] The present invention also provides a method for accelerating the boot time of a memory, comprising:
[0018] Writing the logical address that needs to be accessed during the startup phase of the memory into a system block of the flash memory, wherein the system block is a block that cannot be accessed by a user;
[0019] Writing the mapping information between the logical address and the physical address that needs to be accessed during the boot-up phase of the memory into a table block of the flash memory, wherein the table block is a block that cannot be accessed by a user;
[0020] In the startup phase of the memory, reducing the storage space of the write cache area, adding the reduced storage space of the write cache area to the read cache area, and loading the mapping information into the read cache area;
[0021] The startup information at the physical address corresponding to the mapping information is obtained to complete the startup of the memory.
[0022] In one embodiment of the present invention, the step of reducing the storage space of the write cache area, adding the reduced storage space of the write cache area to the read cache area, and loading the mapping information into the read cache area during the memory startup phase includes:
[0023] During the booting phase of the memory, the host sends a booting acceleration mode instruction to the memory;
[0024] In the boot acceleration mode, the memory reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area.
[0025] In one embodiment of the present invention, the step of obtaining the boot information at the physical address corresponding to the mapping information and completing the step of booting the memory includes:
[0026] After the memory completes the boot process, the host sends a normal mode instruction to the memory;
[0027] In a normal mode, the memory restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
[0028] In one embodiment of the present invention, the step of obtaining the boot information at the physical address corresponding to the mapping information and completing the step of booting the memory includes:
[0029] After the image file of the host is updated, the image file is overwritten into the memory, the mapping information of the logical address and the physical address to be accessed during the boot phase of the memory is updated, and the mapping information in the table block is updated;
[0030] During the memory startup phase, the updated mapping information is loaded into the read cache area, startup information at a physical address corresponding to the updated mapping information is obtained, and the memory startup is completed.
[0031] In one embodiment of the present invention, when the memory is in an idle state, or after the host sends a power-off command to the memory, the mapping information of the logical address and the physical address that needs to be accessed during the power-on phase of the memory is updated in the static random access unit, and the mapping information in the table block is updated.
[0032] Beneficial effects of the present invention: The present invention proposes a method for accelerating a memory and its boot-up time, which reduces the table reading time during the boot-up phase and improves the boot-up efficiency of the memory based on the characteristic that the memory reads more and writes less during the boot-up phase. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] 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.
[0034] Figure 1 A schematic diagram of the structure of a memory provided by an embodiment of the present invention.
[0035] Figure 2 A schematic diagram of the distribution of blocks in a memory provided by an embodiment of the present invention.
[0036] Figure 3 A schematic diagram of the distribution of system blocks provided in accordance with an embodiment of the present invention.
[0037] Figure 4 A schematic diagram of the distribution of table blocks provided by an embodiment of the present invention.
[0038] Figure 5 A schematic diagram of the steps of a method for accelerating the boot time of a memory provided by an embodiment of the present invention.
[0039] Figure 6 An embodiment of the present invention provides Figure 4 Schematic diagram of step S40 in FIG.
[0040] Figure 7 An embodiment of the present invention provides Figure 4 Schematic diagram of steps after step S40 in FIG.
[0041] Figure 8 Another embodiment of the present invention provides Figure 4 Schematic diagram of steps after step S40 in FIG.
[0042] Description of Figure Numbers
[0043] 10. Host; 20. Memory; 30. Main controller; 31. Central processing unit; 32. Cache unit; 33. Static random access memory unit; 40. Flash memory; 41. Block; 42. Page; 410. System area; 411. User area; 4100. System block; 4101. Acceleration logic address page; 4110. Table block; 4111. Acceleration mapping page. DETAILED DESCRIPTION
[0044] 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.
[0045] 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.
[0046] 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.
[0047] See also Figures 1 to 8 The present invention proposes a method for accelerating a memory and its boot time, which can be applied to storage devices such as eMMC (Embedded Multi Media Card), SSD (Solid State Disk), and UFS (Univeral Flash Storage). Under the premise that the hardware resources of the memory 20 are limited, the present invention can reduce the table reading time during the boot phase based on the characteristics of the memory 20 that the memory 20 reads more and writes less during the boot phase, thereby improving the boot efficiency of the memory 20, thereby further improving the boot performance and service life of the memory 20. The following is a detailed description through specific embodiments.
[0048] See also Figure 1 In one embodiment of the present invention, a memory 20 is provided, and a bus interface is provided on the memory 20. The memory 20 is electrically connected to the host 10 through the bus interface. The host 10 can write host data and send instructions to the memory 20, or the host 10 can read host data and receive instructions from the memory 20. The host 10 can be a communication device such as a personal computer (PC), a tablet computer (Pad), a mobile phone (Cell Phone), etc.
[0049] See also Figure 1 In one embodiment of the present invention, the memory 20 may include a main controller 30 and a flash memory 40. Among them, the flash memory 40 is a non-volatile memory, which is usually used to store host data and system programs. The main controller 30 is mainly used to operate and manage the flash memory 40, and the main controller 30 also provides functions such as cache, memory array and interleave. The main controller 30 is electrically connected to the flash memory 40. The main controller 30 can control many functions of the flash memory 40, such as bad fast management, wear leveling, error checking and correction (ECC, Error Checking and Correcting), etc. The main controller 30 can greatly improve the read, write and move operation performance of the host data in the flash memory 40.
[0050] See also Figure 1 In one embodiment of the present invention, a flash memory interface is provided on the main controller 30 inside the memory 20, and the main controller 30 is electrically connected to the flash memory 40 through the flash memory interface. The main controller 30 may include a central processing unit (CPU) 31 and a cache unit (Cache) 32. The central processing unit 31 is the computing core and control core of the memory 20, and the cache unit 32 acts as a cache during data transmission to speed up data transmission.
[0051] Specifically, the cache unit 32 may include a read cache area and a write cache area. The storage space of the write cache area may be used to cache the host data written by the host 10 to the flash memory 40 first, and when the storage space of the write cache area is full, the host data in the write cache area may be written to the flash memory 40 at one time. The storage space of the read cache area may be used to cache the host data read by the host 10 from the flash memory 40 first, and when the storage space of the read cache area is full, the host data in the read cache area may be read out to the host 10 at one time.
[0052] See also Figure 1In one embodiment of the present invention, the flash memory 40 may include a plurality of blocks 41. The blocks 41 may be used to store a data mapping table and host data written by the host 10. A block 41 may also include a plurality of pages 42. The data mapping table stores the mapping information of the logical address and the physical address of the host data. The logical address refers to the relative address used in the user program, also known as the virtual address. The logical address is generated by the central processing unit 31 and is used to access the data in the flash memory 40. The physical address is the actual address in the flash memory 40, also known as the real address. By using the logical address to query the mapping information in the data mapping table, the corresponding physical address can be found, and then the host data at the corresponding physical address in the flash memory 40 can be read, written, moved, etc.
[0053] Specifically, the static random access memory (SRAM) 33 in the main controller 30 can be used to store temporary data for program operation, so the data mapping table is stored in the static random access memory for convenient and fast access. In addition, the data mapping table can be stored in the flash memory 40 to prevent data loss after the storage device 20 is powered off, and the central processing unit 31 can also periodically update the data mapping table in the flash memory 40.
[0054] See also Figure 1 and Figure 2 In one embodiment of the present invention, the flash memory 40 may include a system area 410 and a user area 411. The system area 410 is used to store firmware (FW, Fire Ware). The user area 411 is used to store a data mapping table and host data written by the host 10. The host 10 is used to read, write and erase the host data in the user area 411.
[0055] Specifically, the system area 410 may include a firmware code configuration area, a bad block table and a bad block free area, a system block setting area, a system block pointer area, a boot area, and an encryption area. The system area 410 is a block 41 that cannot be accessed by the user, and the flash memory particles of the system area 410 are single-level cell storage (SLC). The user area 411 may include a boot area and an encryption area, and a regular user area. The user area 411 is a block 41 that can be accessed by the user, and the flash memory particles of the user area 411 are single-level cell storage (SLC), double-level cell storage (MLC), and triple-level cell storage (TLC).
[0056] See also Figure 1 , Figure 2 and Figure 3In one embodiment of the present invention, the host 10 may burn the image file (img) to the memory 20 in two stages, namely a pre-processing mode and a burning mode.
[0057] Specifically, Figure 3 As shown, the pre-processing mode means that before the host 10 formally performs programming on the memory 20, the host 10 sends a development command (Vendor CMD) to the memory 20, and the central processing unit 31 writes the logical address that the memory 20 needs to access during the boot phase into the system block 4100 of the system area 410. For example, the system block 4100 is provided with an accelerated logic address page 4101, and the accelerated logic address page 4101 stores the logical address that the memory 20 needs to access during the boot phase.
[0058] Specifically, the burning mode means that the host 10 executes burning of the image file, that is, the host 10 burns the image file into the memory 20. The image file (img) can be used to store data such as operating system, application program, data backup, etc. The image file is burned into the memory 20 to perform operations such as system installation, software deployment or data recovery.
[0059] Specifically, Figure 4 As shown, after the host 10 burns the image file to the memory 20, when the memory 20 enters the idle state, the central processing unit 31 writes the mapping information of the logical address and the physical address that the memory 20 needs to access during the boot phase into the table block 4110 of the system area 410. For example, the table block 4110 is provided with an acceleration mapping page 4111, and the acceleration mapping page 4111 stores the mapping information of the logical address and the physical address that the memory 20 needs to access during the boot phase.
[0060] See also Figure 1 , Figure 2 , Figure 3 and Figure 4 In one embodiment of the present invention, during the power-on phase of the memory 20, in the cache unit 32, the central processing unit 31 reduces the storage space of the write cache area, and adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information of the logical address and the physical address that needs to be accessed during the power-on phase of the memory 20 into the read cache area of the cache unit 32, obtains the power-on information on the physical address corresponding to the above mapping information, and completes the power-on of the memory 20.
[0061] Specifically, during the booting process of the memory 20, since the host 10 has the characteristic of reading more and writing less to the memory 20, in the cache unit 32, the central processing unit 31 reduces the storage space of the write cache area, and adds the reduced storage space of the write cache area to the read cache area. Since in the cache unit 32, the storage space of the read cache area is increased and the storage space of the write cache area is reduced, the central processing unit 31 can load more mapping information about the logical address and the physical address that needs to be accessed during the booting stage of the memory 20 into the read cache area of the cache unit 32, so as to improve the booting performance of the memory 20.
[0062] Specifically, after the host 10 sends a power-on command to the memory 20, the memory 20 enters the power-on stage. In the power-on stage of the memory 20, the central processing unit 31 loads the mapping information of the logical address and the physical address that the memory 20 needs to access in the power-on stage into the read cache area of the cache unit 32. Afterwards, the central processing unit 31 can obtain the physical address corresponding to the mapping information according to the mapping information in the read cache area, and can further obtain the power-on information on the corresponding physical address to complete the power-on of the memory 20.
[0063] It can be seen that during the boot process of the memory 20, the host 10 has the characteristic of more reading and less writing to the memory 20. In the prior art, during the boot phase of the memory 20, for the mapping information that needs to be obtained during the boot phase of the memory 20, the memory 20 needs to perform a large number of operations such as reading and querying in the flash memory 40, resulting in a slow boot of the memory 20. In this embodiment, the logical address that needs to be accessed during the boot phase of the memory 20 is stored in the system block 4100, and the mapping information of the logical address and the physical address that needs to be accessed during the boot phase of the memory 20 is stored in the table block 4110. In this embodiment, by separately recording the mapping information that needs to be obtained during the boot phase of the memory 20, the above-mentioned mapping information can be quickly obtained during the boot phase of the memory 20, thereby realizing a fast boot of the memory 20.
[0064] See also Figure 1 In one embodiment of the present invention, after the memory 20 completes the boot process, in the cache unit 32, the central processing unit 31 restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes. That is, after the memory 20 is powered on, the memory 20 no longer has the characteristic of more reading and less writing. In order to ensure the read and write performance of the memory 20, the storage space of the read cache area and the storage space of the write cache area can be restored to their initial sizes in the cache unit 32.
[0065] See also Figure 1In one embodiment of the present invention, during the booting stage of the memory 20, the storage space of the read cache area is increased and the storage space of the write cache area is reduced in the cache unit 32, so that the memory 20 can achieve fast booting, and this stage can be defined as the booting acceleration mode of the memory 20. After the memory 20 completes the booting process, the storage space of the read cache area and the storage space of the write cache area are restored to the initial size in the cache unit 32, so that the memory 20 achieves a normal working state, and this stage can be defined as the normal mode of the memory 20.
[0066] Specifically, during the boot-up phase of the memory 20, the host 10 sends a boot-up acceleration mode instruction to the memory 20. When the memory 20 is in the boot-up acceleration mode, the central processing unit 31 increases the storage space of the read cache area and reduces the storage space of the write cache area in the cache unit 32. The mapping information of the logical address and the physical address that needs to be accessed during the boot-up phase of the memory 20 is loaded into the read cache area, the boot information on the physical address corresponding to the mapping information is obtained, and the boot-up of the memory 20 is completed.
[0067] Specifically, after the memory 20 completes the boot process, the host 10 sends a normal mode instruction to the memory 20. When the memory 20 is in normal mode, the central processing unit 31 restores the storage space of the read cache area and the storage space of the write cache area in the cache unit 32 to their initial sizes.
[0068] See also Figure 1 In one embodiment of the present invention, after the image file of the host 10 is updated and upgraded, the image file is overwritten to the memory 20, and the central processing unit 31 updates the mapping information of the logical address and the physical address that need to be accessed during the booting phase of the memory 20, and updates the mapping information in the table block 4110. During the booting phase of the memory 20, the central processing unit 31 loads the updated mapping information into the read buffer area, obtains the booting information on the physical address corresponding to the updated mapping information, and completes the booting of the memory 20.
[0069] Specifically, after the image file of the host 10 is updated and upgraded, after the image file is overwritten to the memory 20, there is a situation where the logical address that needs to be accessed during the startup phase of the memory 20 does not change, but the physical address associated with the logical address that needs to be accessed during the startup phase of the memory 20 changes. Or there is a situation where the logical address that needs to be accessed during the startup phase of the memory 20 changes, and the physical address associated with the logical address that needs to be accessed during the startup phase of the memory 20 also changes. That is, the mapping information between the logical address that needs to be accessed during the startup phase of the memory 20 and the physical address has changed. At this time, the mapping information between the logical address that needs to be accessed during the startup phase of the memory 20 and the physical address needs to be updated. In the static random access unit 33 of the main controller 30, the central processing unit 31 can update the mapping information between the logical address that needs to be accessed during the startup phase of the memory 20 and the physical address, and update the mapping information in the table block 4110.
[0070] Specifically, after the mapping information of the logical address and the physical address that needs to be accessed during the power-on phase of the memory 20 is updated and the mapping information in the table block 4110 is updated, during the power-on phase of the memory 20, the central processing unit 31 loads the updated mapping information into the read cache area, obtains the power-on information on the physical address corresponding to the updated mapping information, and completes the power-on of the memory 20.
[0071] See also Figure 1 In one embodiment of the present invention, when the memory 20 is in an idle state, or after the host 10 sends a power-off command to the memory 20, the central processing unit 31 can update the mapping information of the logical address and the physical address that need to be accessed during the power-on phase of the memory 20 in the static random access unit 33 of the main controller 30, and update the mapping information in the table block 4110.
[0072] Specifically, if the mapping information of the logical address and the physical address that need to be accessed in the boot phase is updated during the reading and writing process of the memory 20, the reading and writing performance of the memory 20 will be reduced. Therefore, in order to ensure the reading and writing performance of the memory 20 during the reading and writing process, the central processing unit 31 can update the mapping information of the logical address and the physical address that need to be accessed in the boot phase of the memory 20 in the static random access unit 33 of the main controller 30 when the memory 20 is in an idle state, and update the mapping information in the table block 4110.
[0073] Specifically, in the memory 20, the mapping information of some logical addresses and physical addresses will be stored in the static random access memory (SRAM) of the main controller 30. However, since the static random access memory is a volatile memory, the data will be lost after power failure. Therefore, in order to save the mapping information of some logical addresses and physical addresses in the static random access memory, after the host 10 sends a power-off instruction to the memory 20, in the static random access unit 33 of the main controller 30, the central processing unit 31 updates the mapping information of the logical addresses and physical addresses that need to be accessed during the power-on phase of the memory 20, and updates the mapping information in the table block 4110.
[0074] Under other necessary conditions, in order to save the mapping information of some logical addresses and physical addresses in the static random access storage unit, the central processing unit 31 can update the mapping information of the logical addresses and physical addresses that need to be accessed during the power-on phase of the memory 20 in the static random access unit 33 of the main controller 30, and update the mapping information in the table block 4110.
[0075] See also Figure 5 In one embodiment of the present invention, a method for accelerating the boot time of a memory is proposed, comprising the following steps.
[0076] Step S10: write the logical address that needs to be accessed during the memory startup phase into the system block of the flash memory, where the system block is a block that cannot be accessed by the user.
[0077] Step S20, writing the mapping information between the logical address and the physical address that needs to be accessed during the memory startup phase into the table block of the flash memory, where the table block is a block that can be accessed by the user.
[0078] Step S30: During the startup phase of the memory, the storage space of the write cache area is reduced, and the reduced storage space of the write cache area is added to the read cache area, and the mapping information is loaded into the read cache area.
[0079] Step S40: Obtain the startup information on the physical address corresponding to the mapping information, and complete the startup of the memory.
[0080] The following is a detailed description through specific embodiments.
[0081] Step S10: write the logical address that needs to be accessed during the memory startup phase into the system block of the flash memory, where the system block is a block that cannot be accessed by the user.
[0082] In one embodiment of the present invention, Figure 3As shown, before the host 10 formally performs programming on the memory 20, the host 10 sends a development command (Vendor CMD) to the memory 20, and the central processing unit 31 writes the logical address that the memory 20 needs to access during the boot phase into the system block 4100 of the system area 410. For example, the system block 4100 is provided with an accelerated logic address page 4101, and the accelerated logic address page 4101 stores the logical address that the memory 20 needs to access during the boot phase.
[0083] In one embodiment of the present invention, the image file is burned into the memory 20. The burning mode means that the host 10 executes the burning of the image file, that is, the host 10 burns the image file into the memory 20. The image file (img) can be used to store data such as operating system, application program, data backup, etc. The image file is burned into the memory 20 to facilitate system installation, software deployment or data recovery.
[0084] Step S20, writing the mapping information between the logical address and the physical address that needs to be accessed during the memory startup phase into the table block of the flash memory, where the table block is a block that can be accessed by the user.
[0085] In one embodiment of the present invention, Figure 4 As shown, after the host 10 burns the image file to the memory 20, when the memory 20 enters the idle state, the central processing unit 31 writes the mapping information of the logical address and the physical address that the memory 20 needs to access during the boot phase into the table block 4110 of the system area 410. For example, the table block 4110 is provided with an acceleration mapping page 4111, and the acceleration mapping page 4111 stores the mapping information of the logical address and the physical address that the memory 20 needs to access during the boot phase.
[0086] Step S30: During the startup phase of the memory, the storage space of the write cache area is reduced, and the reduced storage space of the write cache area is added to the read cache area, and the mapping information is loaded into the read cache area.
[0087] In one embodiment of the present invention, during the booting process of the memory 20, since the host 10 has the characteristic of reading more and writing less to the memory 20, the central processing unit 31 increases the space of the read cache area and reduces the space of the write cache area in the cache unit 32. Since the space of the read cache area is increased and the space of the write cache area is reduced in the cache unit 32, the central processing unit 31 can load more mapping information about the logical address and the physical address that needs to be accessed during the booting stage of the memory 20 into the read cache area of the cache unit 32 to improve the booting performance of the memory 20.
[0088] Step S40: Obtain the startup information on the physical address corresponding to the mapping information, and complete the startup of the memory.
[0089] In one embodiment of the present invention, after the host 10 sends a power-on command to the memory 20, the memory 20 enters the power-on stage. In the power-on stage of the memory 20, the central processing unit 31 loads the mapping information of the logical address and the physical address that the memory 20 needs to access in the power-on stage into the read cache area of the cache unit 32. Afterwards, the central processing unit 31 can obtain the physical address corresponding to the mapping information according to the mapping information in the read cache area, and can further obtain the power-on information on the corresponding physical address to complete the power-on of the memory 20.
[0090] See also Figure 6 In one embodiment of the present invention, step S40 may include step S410 and step S420. Step S410 may be represented as the host 10 sending a startup acceleration mode instruction to the memory 20 during the startup phase of the memory 20. Step S420 may be represented as the memory 20 reducing the storage space of the write cache area in the startup acceleration mode, adding the reduced storage space of the write cache area to the read cache area, and loading the mapping information into the read cache area.
[0091] Specifically, during the booting stage of the memory 20, the space of the read cache area is increased and the space of the write cache area is reduced in the cache unit 32, so that the memory 20 can achieve fast booting, and this stage can be defined as the booting acceleration mode of the memory 20. After the memory 20 completes the booting process, the space of the read cache area and the space of the write cache area are restored to the initial size in the cache unit 32, so that the memory 20 achieves a normal working state, and this stage can be defined as the normal mode of the memory 20.
[0092] Specifically, during the boot-up phase of the memory 20, the host 10 sends a boot-up acceleration mode instruction to the memory 20. When the memory 20 is in the boot-up acceleration mode, the central processing unit 31 increases the space of the read cache area and reduces the space of the write cache area in the cache unit 32, and loads the mapping information of the logical address and the physical address that needs to be accessed during the boot-up phase of the memory 20 into the read cache area, obtains the boot information on the physical address corresponding to the mapping information, and completes the boot-up of the memory 20.
[0093] See also Figure 7 In one embodiment of the present invention, step S40 may include step S510 and step S520. Step S510 may be represented as the host 10 sending a normal mode instruction to the memory 20 after the memory 20 completes the boot process. Step S520 may be represented as the memory 20, in the normal mode, restoring the storage space of the read cache area and the storage space of the write cache area to the initial size.
[0094] Specifically, after the memory 20 completes the boot process, the host 10 sends a normal mode instruction to the memory 20. When the memory 20 is in normal mode, the central processing unit 31 restores the storage space of the read cache area and the storage space of the write cache area in the cache unit 32 to their initial sizes.
[0095] See also Figure 8 In one embodiment of the present invention, step S40 further includes step S610 and step S620. Step S610 can be represented as after the image file of the host 10 is updated and upgraded, the image file is overwritten to the memory 20, the mapping information of the logical address and the physical address to be accessed during the booting phase of the memory 20 is updated, and the mapping information in the table block 4110 is updated. Step S620 can be represented as during the booting phase of the memory 20, the updated mapping information is loaded into the read buffer area, the booting information on the physical address corresponding to the updated mapping information is obtained, and the booting of the memory 20 is completed.
[0096] Specifically, after the image file of the host 10 is updated and upgraded, after the image file is overwritten to the memory 20, there is a situation where the logical address that needs to be accessed during the startup phase of the memory 20 does not change, but the physical address associated with the logical address that needs to be accessed during the startup phase of the memory 20 changes. Or there is a situation where the logical address that needs to be accessed during the startup phase of the memory 20 changes, and the physical address associated with the logical address that needs to be accessed during the startup phase of the memory 20 also changes. That is, the mapping information between the logical address that needs to be accessed during the startup phase of the memory 20 and the physical address has changed. At this time, the mapping information between the logical address that needs to be accessed during the startup phase of the memory 20 and the physical address needs to be updated, that is, the mapping information in the table block 4110 is updated.
[0097] Specifically, after the mapping information of the logical address and the physical address that needs to be accessed during the power-on phase of the memory 20 is updated and the mapping information in the table block 4110 is updated, during the power-on phase of the memory 20, the central processing unit 31 loads the updated mapping information into the read cache area, obtains the power-on information on the physical address corresponding to the updated mapping information, and completes the power-on of the memory 20.
[0098] See also Figure 8 In one embodiment of the present invention, when the memory 20 is in an idle state, or after the host 10 sends a power-off command to the memory 20, the mapping information of the logical address and the physical address that need to be accessed during the power-on phase of the memory 20 is updated in the static random access unit 33, and the mapping information in the table block 4110 is updated.
[0099] Specifically, if the mapping information between the logical address and the physical address that needs to be accessed during the power-on phase is updated during the reading and writing process of the memory 20, the reading and writing performance of the memory 20 will be reduced. Therefore, in order to ensure the reading and writing performance of the memory 20 during the reading and writing process, the mapping information between the logical address and the physical address that needs to be accessed during the power-on phase of the memory 20 can be updated in the static random access unit 33 when the memory 20 is in an idle state, and the mapping information in the table block 4110 is updated.
[0100] Specifically, in the memory 20, the mapping information of some logical addresses and physical addresses will be stored in the static random access memory (SRAM) of the main controller 30. However, since the static random access memory is a volatile memory, the data will be lost after power failure. Therefore, in order to save the mapping information of some logical addresses and physical addresses in the static random access memory, after the host 10 sends a power-off instruction to the memory 20, the mapping information of the logical addresses and physical addresses that need to be accessed during the power-on phase of the memory 20 can be updated in the static random access unit 33, and the mapping information in the table block 4110 can be updated.
[0101] In summary, the present invention proposes a method for accelerating a memory and its boot-up time, which reduces the table reading time during the boot-up phase and improves the boot-up efficiency of the memory based on the characteristic that the memory reads more and writes less during the boot-up phase.
[0102] 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 memory, It is characterized in that include: A flash memory, comprising a system block and a table block, wherein the system block is a block that cannot be accessed by a user, and the table block is a block that can be accessed by a user; A main controller is electrically connected to the flash memory, and the main controller includes: A cache unit, including a read cache area and a write cache area; A central processing unit, used for writing the logical address to be accessed during the memory startup phase into the system block, and then writing the mapping information between the logical address to be accessed during the memory startup phase and the physical address into the table block; Wherein, during the startup phase of the memory, the central processing unit reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area; The central processing unit also obtains the startup information at the physical address corresponding to the mapping information to complete the startup of the memory.
2. The memory according to claim 1, It is characterized in that After the memory completes the boot process, the central processing unit restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
3. The memory according to claim 2, It is characterized in that During the startup phase of the memory, the host sends a startup acceleration mode instruction to the memory. When the memory is in the startup acceleration mode, the central processing unit reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area, obtains the startup information on the physical address corresponding to the mapping information, and completes the startup of the memory; After the memory completes the boot process, the host sends a normal mode instruction to the memory. When the memory is in normal mode, the central processing unit restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
4. The memory according to claim 1, It is characterized in that After the image file of the host is updated, the image file is overwritten into the memory, the central processing unit updates the mapping information of the logical address and the physical address that need to be accessed in the boot phase of the memory, and updates the mapping information in the table block; During the memory startup phase, the central processing unit loads the updated mapping information into the read buffer area, obtains the startup information on the physical address corresponding to the updated mapping information, and completes the startup of the memory.
5. The memory according to claim 4, It is characterized in that When the memory is in an idle state, or after the host sends a power-off instruction to the memory, in the static random access unit of the controller, the central processing unit updates the mapping information of the logical address and the physical address that need to be accessed during the power-on phase of the memory, and updates the mapping information in the table block.
6. A method for accelerating the boot time of a memory, It is characterized in that include: Writing the logical address that needs to be accessed during the memory startup phase into the system block of the flash memory, wherein the system block is a block that cannot be accessed by a user; Writing the mapping information between the logical address and the physical address that needs to be accessed during the boot-up phase of the memory into a table block of the flash memory, wherein the table block is a block that can be accessed by the user; In the startup phase of the memory, reducing the storage space of the write cache area, adding the reduced storage space of the write cache area to the read cache area, and loading the mapping information into the read cache area; The startup information at the physical address corresponding to the mapping information is obtained to complete the startup of the memory.
7. The method for accelerating the boot time of a memory according to claim 6, It is characterized in that The step of reducing the storage space of the write cache area during the memory startup phase, adding the reduced storage space of the write cache area to the read cache area, and loading the mapping information into the read cache area comprises: During the startup phase of the memory, the host sends a startup acceleration mode instruction to the memory; In the startup acceleration mode, the memory reduces the storage space of the write cache area, adds the reduced storage space of the write cache area to the read cache area, and loads the mapping information into the read cache area.
8. The method for accelerating the boot time of a memory according to claim 6, It is characterized in that After the step of obtaining the boot information at the physical address corresponding to the mapping information and completing the booting of the memory, the method further comprises: After the memory completes the boot process, the host sends a normal mode instruction to the memory; In a normal mode, the memory restores the storage space of the read cache area and the storage space of the write cache area to their initial sizes.
9. The method for accelerating the boot time of a memory according to claim 6, It is characterized in that After the step of obtaining the boot information at the physical address corresponding to the mapping information and completing the booting of the memory, the method further comprises: After the image file of the host is updated, the image file is overwritten into the memory, the mapping information of the logical address and the physical address to be accessed during the boot phase of the memory is updated, and the mapping information in the table block is updated; During the memory startup phase, the updated mapping information is loaded into the read cache area, startup information at a physical address corresponding to the updated mapping information is obtained, and the memory startup is completed.
10. The method for accelerating the boot time of a memory according to claim 9, It is characterized in that When the memory is in an idle state, or after the host sends a power-off command to the memory, the mapping information of the logical address and the physical address to be accessed during the power-on phase of the memory is updated in the static random access unit, and the mapping information in the table block is updated.
Citation Information
Patent Citations
Application starting acceleration method, electronic equipment and storage medium
CN117707639A
Method, device and equipment for increasing startup speed and medium
CN118276952A
