Storage device and control method thereof

By using multiple cache areas and timing generation modules in storage devices to synchronize data and address mapping tables, the contradiction between improving continuous writing capabilities and data stability of storage devices is solved, achieving high performance and stability. Data storage.

CN118426711BActive Publication Date: 2024-09-06合肥康芯威存储技术有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410895386.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-06
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

When existing storage devices improve continuous writing capabilities and data stability, it is difficult to take into account both, resulting in a contradiction between performance and data stability.

Method used

By introducing multiple cache areas and timing generation modules into the storage device, the cache and synchronization processing of user data and address mapping tables are realized, and timing signals are used to control the interaction of data between different interfaces to ensure continuous writing of data and address mapping tables. of updates.

Benefits of technology

It improves the continuous writing capability and stability of data, ensuring high data stability and storage performance under abnormal conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426711B
    Figure CN118426711B
Patent Text Reader

Abstract

The present invention provides a storage device and a control method thereof, wherein the storage device comprises: a flash memory chip, wherein the flash memory chip stores user data and a first address mapping table, wherein the first address mapping table stores address mapping information of the user data; and a main controller, which is electrically connected to a host and the flash memory chip, wherein the main controller receives read and write instructions and user data from the host through a first type interface, and the main controller exchanges data with the flash memory chip through at least one second type interface; wherein the main controller comprises: a plurality of cache areas, wherein the user data and the first address mapping table are stored in the cache areas before the user data is transferred to the flash memory chip; and a timing generation module, wherein the timing generation module generates a plurality of timing signals simultaneously, and under the control of the timing signals, the first type interface and the second type interface simultaneously exchange data. The present invention provides a storage device and a control method thereof, so as to improve the continuous writing capability of data and improve the data stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a storage device and a control method thereof. Background Art

[0002] Flash memory is a non-volatile storage device that is widely used in the storage field. Storage devices that integrate flash memory and host controllers can provide standard interfaces and manage flash memory, allowing mobile phone manufacturers to focus on other parts of product development and shorten the time to market.

[0003] For the host's read and write instructions, in order to ensure the storage reliability of the flash memory, the main controller will not only respond to the read and write instructions, but also edit the address information of the manipulated flash memory block. In order to improve the storage read and write performance, it is inevitable to put aside other tasks and give priority to the host's read and write instructions to achieve continuous writing of the storage device. Continuous writing capability is a more important performance of storage devices, and the improvement of continuous writing capability is contradictory to the stability of written data. Summary of the invention

[0004] The object of the present invention is to provide a storage device and a control method thereof to improve the continuous writing capability of data and improve the data stability.

[0005] To solve the above technical problems, the present invention is achieved through the following technical solutions:

[0006] The present invention provides a storage device, comprising:

[0007] A flash memory chip, wherein the flash memory chip stores user data and a first address mapping table, wherein the first address mapping table stores address mapping information of the user data; and

[0008] A main controller, electrically connected to the host and the flash memory chip, the main controller receives the read and write instructions of the host and the user data through the first type interface, and the main controller exchanges data with the flash memory chip through at least one second type interface;

[0009] The main controller comprises:

[0010] a plurality of cache areas, in which the user data and the first address mapping table are stored before the user data is transferred to the flash memory chip; and

[0011] A timing generation module, wherein the timing generation module generates multiple timing signals simultaneously, and under the control of the timing signals, the first type interface and the second type interface simultaneously exchange data.

[0012] In one embodiment of the present invention, the main controller includes:

[0013] a first buffer area, wherein an input end of the first buffer area exchanges data with the host through the first type interface;

[0014] a second cache area, wherein an input end of the second cache area is connected to an output end of the first cache area and receives the user data, and an output end of the second cache area exchanges data with the flash memory chip through the second type interface and forms the first address mapping table; and

[0015] A third cache area, wherein the third cache area reads and writes the mapping table with the flash memory chip through the second type interface.

[0016] In one embodiment of the present invention, the timing signal includes a first timing signal. When triggered by the first timing signal, the first cache area receives the user data from the host, and when triggered by the first timing signal, the third cache area reads out the first address mapping table from the flash memory chip.

[0017] In one embodiment of the present invention, the timing signal includes a write process judgment signal. When triggered by the write process judgment signal, the main controller determines whether the third cache area has completed writing to the first address mapping table, wherein when the judgment result of the write process judgment signal is true, the timing generation module sends the first timing signal.

[0018] In one embodiment of the present invention, the timing signal includes a second timing signal. When triggered by the second timing signal, the user data is output from the first cache area to the second cache area, and when triggered by the second timing signal, a second address mapping table is generated in the third cache area, wherein the second address mapping table is a modified first address mapping table or a newly generated first address mapping table, and after the execution process of the first timing signal is completed, the timing generation module sends the second timing signal.

[0019] In one embodiment of the present invention, the timing signal includes a third timing signal. Under the triggering of the third timing signal, the user data is output from the second cache area to the flash memory chip, wherein after the execution process of the second timing signal is completed, the timing generation module sends the third timing signal.

[0020] In one embodiment of the present invention, the timing signal includes a fourth timing signal. Under the triggering of the fourth timing signal, the second address mapping table is transferred from the third cache area to the flash memory chip, wherein after the execution process of the third timing signal is completed, the timing generation module simultaneously sends out the fourth timing signal and the third timing signal.

[0021] In one embodiment of the present invention, the flash memory chip includes at least one second-type interface. When the flash memory chip includes at least two second-type interfaces, the third timing signal and the fourth timing signal occur simultaneously, and the user data and the second address mapping table are transmitted to the flash memory chip through different second-type interfaces. When the flash memory chip includes one second-type interface, the address mapping table and the user data are transmitted to the flash memory chip successively through the second-type interface.

[0022] In one embodiment of the present invention, the main controller includes an address generation module, which automatically generates or receives the logical address of the user data, and generates the second address mapping table according to the logical address and physical address of the user data.

[0023] The present invention provides a control method for a storage device, based on the storage device as described above, comprising the following steps:

[0024] Receive user data transmitted by the host in multiple rounds;

[0025] While receiving the user data, generating or updating an address mapping table for the user data; and

[0026] The user data and the updated address mapping table are written into a flash memory chip.

[0027] As described above, the present invention provides a storage device and a control method thereof, which updates or generates an address mapping table of user data while receiving user data from a host, and realizes the updating and continuous writing of the address mapping table while realizing the continuous writing of user data. The storage device and the control method thereof provided by the present invention still have good data stability when an abnormal state occurs, so the storage device and the control method thereof provided by the present invention have good data storage stability and high data storage performance.

[0028] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0030] Figure 1 FIG. 4 is a schematic diagram of the structure of a storage device in an embodiment of the present invention.

[0031] Figure 2 FIG. 4 is a schematic diagram of the structure of a storage device in another embodiment of the present invention.

[0032] Figure 3 FIG. 4 is a schematic diagram of an address mapping table in an embodiment of the present invention.

[0033] Figure 4 Schematic diagram of the structure of a main controller in one embodiment of the present invention.

[0034] Figure 5 Schematic diagram of a control method in one embodiment of the present invention.

[0035] Figure 6 FIG. 4 is a timing diagram of a control method in an embodiment of the present invention.

[0036] Figure 7 It is a flowchart of a control method in another embodiment of the present invention.

[0037] Figure 8 FIG. 4 is a timing diagram of a control method in another embodiment of the present invention.

[0038] Fig. 9 FIG. 4 is a timing diagram of a control method in another embodiment of the present invention.

[0039] In the figure: 100, host; 200, storage device; 300, main controller; 310, first cache area; 320, second cache area; 330, third cache area; 340, timing generation module; 350, address generation module; 400, flash memory chip; 401, first interface; 402, second interface. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] See also Figure 1 and Figure 2As shown, the storage medium of the storage device 100 provided by the present invention is NAND flash memory, such as SM flash card, CF card, Multi Media Card (MMC), Secure Digital Card (SD card), memory stick and micro hard disk, etc. More specifically, the storage device 100 provided by the present invention is one of embedded Multi Media Card (eMMC), Universal Flash Storage (UFS) and Solid State Drives (SSD). The storage device 100 is electrically connected to the host 200 and receives control instructions from the host 200. In the present invention, the storage device 100 includes a main controller 300 and a flash memory chip 400. The main controller 300 is a chip structure, and the main controller 300 is electrically connected to the host 200 through an interface, and data and instruction transmission is realized through the interface. The main controller 300 is electrically connected to the flash memory chip 400 through an interface, and data transmission is realized through the interface. The data transmitted can be a user file or a system file.

[0042] See also Figures 1 to 3 As shown, in one embodiment of the present invention, the data written into the flash memory chip 400 has a logical address and a physical address, wherein the physical address is the storage location of the written data in the flash memory chip 400, and is related to the specific physical block (block) and physical page (page) of the flash memory chip 400. The logical address is the address assigned to the storage data by the main controller 300, which is a virtual address. When the host 200 issues a write instruction, it transmits the storage data to be written to the main controller 300 through the interface. In this embodiment, the main controller 300 adds a logical address to the storage data to be written, and after writing the storage data into the flash memory chip 400, an address mapping relationship is established between the logical address and the physical address of the write data, thereby generating the address mapping information of the storage data. According to the address mapping information, when the storage data is retrieved, the physical address of the write data is found according to the address mapping information.

[0043] See also Figures 1 to 3 As shown, in one embodiment of the present invention, the address mapping information of the written data is stored in a specific location of the flash memory chip 400 or the main controller 300 in the form of a linked list. The table used to store the address mapping information is an address mapping table. Figure 3 As shown, Figure 3is an example of an address mapping table, where Log1 represents the first logical address, Phy1 represents the first physical address, and the data corresponding to the logical address Log1 is stored in the physical address Phy1. Similarly, the data corresponding to the logical address Logn is stored in the physical address Phyn. It should be noted that the logical address of the user data can have multiple segments. Figure 3 As shown, the logical addresses corresponding to the user data UER1 are the logical address Log1 and the logical address Log2. The address mapping information of all user data is stored in the form of a linked list, thereby forming an address mapping table.

[0044] See also Figure 1 , Figure 2 and Figure 4 As shown, in one embodiment of the present invention, the main controller 300 includes a first cache area 310, a second cache area 320, a third cache area 330, a timing generation module 340 and an address generation module 350. It should be noted that the present embodiment provides three cache areas, which can still maintain good flexibility while realizing synchronous operation, so as to realize synchronous operation between multiple cache areas as much as possible. In other embodiments of the present invention, for example, 2 cache areas may be provided to reduce the data transmission efficiency while reducing resource occupation, and for example, 4 cache areas may be provided to reduce the operation synchronization rate and increase resource occupation while reducing the complexity of data transmission. The three cache areas provided in the present embodiment are the number of cache areas that can better realize the control method and technical effects of the present invention, which can ensure the synchronous realization of multiple operations, low resource occupation and high data transmission efficiency. Among them, the first cache area 310, the second cache area 320 and the third cache area 330 can correspond to different buffers, or they can be multiple areas of the same buffer.

[0045] See also Figure 1 , Figure 2 and Figure 4 As shown, in one embodiment of the present invention, data transmission can be performed between the first cache area 310, the second cache area 320 and the third cache area 330. In this embodiment, a first data transmission channel is set between the first cache area 310 and the second cache area 320. A second data transmission channel is set between the first cache area 310 and the host 200. A third data transmission channel is set between the second cache area 320 and the flash memory chip 400. A fourth data transmission channel is set between the third cache area 330 and the flash memory chip 400. The second data transmission channel is a host interface, and the fourth data transmission channel and the third data transmission channel are flash memory interfaces. The host interface is a first-class interface, and the flash memory interface is a second-class interface.

[0046] See also Figure 1 and Figure 4 As shown, in one embodiment of the present invention, there are two flash memory interfaces, and as shown in FIG. Figure 1 As shown, the flash memory 400 includes a first interface 401 and a second interface 402. In this embodiment, the first interface 401 is a data transmission interface for transmitting user data, and the second interface 402 is a data transmission interface for transmitting an address mapping table. In this embodiment, the flash memory chip 400 exchanges data with the second cache area 320 through the first interface 401, and the flash memory chip 400 exchanges data with the third cache area 330 through the second interface 402. At the same time, the first interface 401 and the second interface 402 can be set to an enabled state at the same time, and data transmission is performed synchronously. The first interface 401 and the second interface 402 are both second-class interfaces.

[0047] See also Figure 2 and Figure 4 As shown, in another embodiment of the present invention, there is one flash memory interface, such as Figure 2 As shown, the flash memory 400 includes a first interface 401. In this embodiment, the first interface 401 is a data transmission interface for transmitting user data and transmitting an address mapping table. The first interface 401 is in an enabled state, and user data or address mapping table transmission is performed at the same time. Specifically, user data is transmitted first to prevent the data from being written into the flash memory chip 400 when an abnormal state occurs, resulting in user data loss, thereby improving the reliability of data storage and reducing the difficulty and resource occupation of data recovery. The first interface 401 is a second-class interface.

[0048] See also Figure 1 and Figure 2 , Figures 4 to 8 As shown, in one embodiment of the present invention, the timing generation module 340 generates multiple timing signals at the same time. Under the control of the timing signals, the first type interface and the second type interface simultaneously interact with each other. The first type interface transmits user data, and the second type interface transmits user data and / or address mapping tables. In this embodiment, the timing generation module 340 generates a first timing signal, a second timing signal, a third timing signal, and a fourth timing signal. Under the triggering of the first timing signal, the main controller 300 executes step S10.

[0049] Step S10: The first buffer area receives user data sent by the host, and at the same time reads the address mapping table from the flash memory chip to the third buffer area.

[0050] See also Figure 1 and Figure 2 , Figures 4 to 8As shown, in one embodiment of the present invention, in step S10, the main controller 200 receives a data write instruction from the host 200, wherein the user data written may be new user data that has never been written, or user data that has been written into the flash memory chip 400. In this embodiment, the main controller 200 enables the first type interface and receives user data through the first type interface. The user data is stored in the first buffer area 310. It should be noted that in this embodiment, a batch of user data is written into the flash memory chip 400 in multiple rounds, and step S10 is the first step of this round of user data writing. In this embodiment, the timing generation module 340 generates a first timing signal. Under the triggering of the first timing signal, the user data is written into the first buffer area 310, and the first address mapping table is read from the flash memory chip 400, and the first address mapping table is stored in the third buffer area 330. At this time, the first type interface and the second type interface, as well as the first buffer area, the third buffer area and the flash memory chip are operated synchronously, and the second buffer area is not called temporarily. After the reception of this round of user data is completed and the address mapping table is fully read, the execution process of the first timing signal ends.

[0051] like Figure 6 and Figure 8 As shown, the duration of step S10 is t 12 and t 22 , where t 12 Indicates the time of the first round of data writing process, t 22 Indicates the time of the second round of data writing process. It should be noted that here t 12 and t 22 It represents the duration of step S10. Specifically, t 12 and t 22 It indicates the process available time for the first buffer area to receive the user data sent by the host and the process of reading the address mapping table from the flash memory chip 30 to the third buffer area, which does not mean that the working time of these two processes is the same. 12 or 22 can be different values, and in the present invention, t 12 and t 22 is the duration of the longer process of the two processes. In another embodiment of the present invention, Fig. 9 As shown, when step S10 includes a determination step, t 12 or 22 The duration of step S10 is still represented, and the starting time point of the process of the first buffer area 310 receiving the user data sent by the host is consistent with the starting time point of the judgment step, and is t 12 or 22 The starting time point.12 or 22 The end time point may be the time point when the first buffer area 310 completes receiving the user data, or the time point when the address mapping table is completely read into the third buffer area 330. 11 is the duration t included in step S10 12 In another embodiment of the present invention and in an embodiment of the present invention, when the determination step and step S10 are independent of each other, t 11 The timing is earlier than t 12 , t 11 The end time point is also t 12 It should be noted that, in the present invention, the duration of the judgment step is t 11 or 21 . Where t 11 Indicates the time of the first round of data writing process, t 21 Indicates the time during which the second round of data writing is in progress.

[0052] See also Figure 1 and Figure 2 , Figures 4 to 8 As shown, in one embodiment of the present invention, in step S10, in the step of receiving host user data in the first buffer area, the logical address of the user data is automatically generated by the address issuing module 350 or directly received from the host 200. After the execution process of the first timing signal is completed, the timing generating module 340 generates a second timing signal. Under the triggering of the second timing signal, the main controller 300 executes step S20.

[0053] Step S20: transfer the user data to the second buffer area, and update the address mapping table in the third buffer area.

[0054] See also Figure 1 and Figure 2 , Figures 4 to 8As shown, in the present invention, in step S20, under the triggering of the second timing signal, the second buffer area 320 receives the current round of user data from the first buffer area 310. In step S20, after the address mapping table is read to the third buffer area 330, the address mapping table is queried to determine whether the current user data is the data that has been written. Specifically, the address mapping table is queried to see whether there is already a logical address that is the same as the user data. If there is a logical address that is the same as the user data, the user data is the data that has been written. If there is no logical address that is the same as the user data, the user data is the newly written data. For the user data that has been written, the address mapping table is updated, the address mapping information corresponding to the original logical address is deleted, and the newly generated address mapping information is added to the address mapping table. For the newly written user data, the newly generated address mapping information is directly added to the address mapping table. The update operation of the above address mapping table is implemented in the third buffer area 330. After the address mapping table is updated and all the user data is transferred to the second buffer area 320, the execution process of the second timing signal ends. It should be noted that, in the present invention, the address mapping table in the flash memory chip 400 is referred to as a first address mapping table, and the address mapping table updated in the third cache area 330 is referred to as a second address mapping table.

[0055] like Figure 6 and Figure 8 As shown, the duration of step S20 is t 13 and t 23 , where t 13 Indicates the time of the first round of data writing process, t 23 It should be noted that, similar to step S10, t 13 and t 23 It represents the duration of step S20. Specifically, t 13 and t 23 It indicates the process available time for the process of transferring user data to the second buffer area 320 and the process of updating the address mapping table in the third buffer area 330, rather than indicating that the working time of the two processes is the same. 13 or 23 can be different values, and in the present invention, t 13 or 23 is the duration of the longer of the two processes.

[0056] See also Figure 1 and Figure 2 , Figures 4 to 8As shown, in the present invention, after the execution process of the second timing signal is completed, the timing generation module 340 generates a third timing signal. Under the triggering of the third timing signal, step S30 is executed. After the execution process of the second timing signal is completed, or after the execution process of the third timing signal is completed, the timing generation module 340 generates a fourth timing signal. Under the triggering of the fourth timing signal, step S40 is executed. In one embodiment of the present invention, when the flash memory chip 400 has two or more second-type interfaces, for example Figure 1 The first interface 401 and the second interface 402 are shown, and the timing generation module 340 generates the third timing signal and the fourth timing signal at the same time, and performs steps S30 and S40 at the same time. When the flash memory chip 400 has a second type interface, such as Figure 2 In the first interface 401 shown, after the execution process of the third timing signal is completed, the timing generation module 340 generates a fourth timing signal. Steps S30 and S40 are as follows.

[0057] Step S30: transferring the user data in the second buffer area to the flash memory chip.

[0058] Step S40: transferring the address mapping table of the third cache area to the flash memory chip.

[0059] See also Figure 1 and Figure 2 , Figures 4 to 8 As shown, in the present invention, in step S30, the user data in the second cache area 320 is transferred to the flash memory chip 400 through the first interface 401. It should be noted that the user data is written to the physical address corresponding to the address mapping table. For the user data that has been written, when the user data is rewritten, the physical address changes, and the user data is written to the new physical address. The user data in the original physical address becomes invalid data, and the invalid data will be deleted when garbage collection is performed. The user data in the new physical address is valid data. In step S40, the address mapping table in the third cache area 330 is transferred to the flash memory chip 400 to prevent the address mapping table from being lost due to abnormal power failure.

[0060] See also Figure 1 and Figure 2 , Figures 4 to 8As shown, in the present invention, the timing signal output by the timing generation module 340 also includes a write process judgment signal. After the execution process of the second timing signal is completed, the timing generation module 340 generates a write process judgment signal. Under the triggering of the write process judgment signal, the main controller 300 determines whether the third cache area 330 has completed writing to the address mapping table. Specifically, the main controller 300 also includes a judgment module 360. The judgment module 360 ​​records the storage data volume in the third cache area 330, and when the storage data volume of the third cache area 330 is 0, the judgment result of the judgment module 360 ​​is true. When the storage data volume of the third cache area 330 is greater than 0, the judgment result of the judgment module 360 ​​is false. In the present invention, when the judgment result of the judgment module 360 ​​is true, the timing generation module 340 generates a first timing signal. In the present invention, the timing generation module 340 generates a write process judgment signal at intervals of a preset time until the timing generation module 340 generates a first timing signal. The present invention does not limit the specific value of the preset time. In the present invention, the generation time of the write process determination signal is an interval time after the execution process of the second timing signal is completed and before the generation of the first timing signal.

[0061] See also Figure 1 and Figure 2 , Figures 4 to 8 As shown, in the present invention, after the address mapping table is transferred to the flash memory chip 400, the main controller 300 immediately starts to execute step S10 under the triggering of the first timing signal. Therefore, the writing of the current round of user data and the writing of the next round of user data are partially nested in step S10 and step S30. For example, in the case of multiple second-class interfaces, when the host 200 transmits user data, the user data and the address mapping table of the user data are also synchronously transmitted to the flash memory chip 400. The data transmission efficiency is extremely high. The whole process is triggered by signals, and the independence of each step is extremely high.

[0062] like Figure 6 and Figure 8 As shown, t 14 represents the duration of step S30, t 15 It is indicated that the duration of step S40. It should be noted that, in one embodiment of the present invention, t 14 and t 15 The starting time point is the same, t 14 and t 15 is the longer duration in step S30 and step S40. In this embodiment, t 14 and t 15 The starting time point and t 21 In another embodiment of the present invention, step S30 is earlier than step S40, t 14 The end time is t15 In this embodiment, t 15 The end time is t 21 The start time point of .

[0063] See also Figure 1 and Figure 2 , Figures 4 to 9 As shown, in other embodiments of the present invention, the first timing signal can trigger the address mapping table to be read from the flash memory chip 400 to the third cache area 330. The step of the first cache area 310 receiving the user data sent by the host 200 can be triggered by the write process judgment signal. After the execution process of the second timing signal is completed, after the write process judgment signal, while executing the judgment step, the step of the first cache area 310 receiving the user data sent by the host 200 is executed. The address mapping table is completely read into the third cache area 330, indicating that the execution process of the first timing signal is completed.

[0064] The present invention provides a storage device and a control method thereof, wherein the storage device includes a flash memory chip and a main controller. In the present invention, user data and a first address mapping table are stored in the flash memory chip, wherein the address mapping information of the user data is stored in the first address mapping table. In the present invention, the main controller is electrically connected to the host and the flash memory chip, the main controller receives the read and write instructions and user data of the host through a first type interface, and the main controller exchanges data with the flash memory chip through at least one second type interface. The main controller includes a plurality of cache areas and a timing generation module. Before the user data is transferred to the flash memory chip, the user data and the first address mapping table are stored in the cache area. The timing generation module generates a plurality of timing signals simultaneously, and under the control of the timing signals, the first type interface and the second type interface simultaneously exchange data. The present invention provides a storage device and a control method thereof to improve the continuous writing capability of data and improve data stability.

[0065] The embodiments of the present invention disclosed above are only used to help illustrate the present invention. The embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A storage device, characterized in that: include: A flash memory chip, wherein the flash memory chip stores user data and a first address mapping table, wherein the first address mapping table stores address mapping information of the user data; as well as A main controller, electrically connected to the host and the flash memory chip, the main controller receives the read and write instructions of the host and the user data through the first type interface, and the main controller exchanges data with the flash memory chip through at least one second type interface; The main controller comprises: a plurality of cache areas, in which the user data and the first address mapping table are stored before the user data is transferred to the flash memory chip, wherein the main controller includes a first cache area, a second cache area, and a third cache area; and A timing generation module, wherein the timing generation module generates a plurality of timing signals simultaneously, and under the control of the timing signals, the first type of interface and the second type of interface simultaneously perform data exchange; The timing signal includes: a first timing signal, under the triggering of the first timing signal, the first buffer area receives the user data from the host, and under the triggering of the first timing signal, the third buffer area reads the first address mapping table from the flash memory chip; a second timing signal, under the triggering of the second timing signal, the user data is output from the first buffer area to the second buffer area, and under the triggering of the second timing signal, a second address mapping table is generated in the third buffer area, wherein the second address mapping table is the modified first address mapping table or the newly generated first address mapping table, wherein after the execution process of the first timing signal is completed, the timing generation module sends the second timing signal; A write process judgment signal, under the triggering of the write process judgment signal, the main controller judges whether the third cache area has completed writing to the address mapping table, wherein the main controller records the storage data volume of the third cache area, and when the storage data volume of the third cache area is zero, the judgment result of the write process judgment signal is true, and when the judgment result of the write process judgment signal is true, the timing generation module sends the first timing signal, wherein the generation time of the write process judgment signal is after the execution process of the second timing signal is completed and within the interval time before the first timing signal is generated; a third timing signal, under the triggering of which the user data is output from the second buffer area to the flash memory chip, wherein after the execution process of the second timing signal is completed, the timing generation module sends the third timing signal; and A fourth timing signal, under the triggering of the fourth timing signal, the second address mapping table is transferred from the third cache area to the flash memory chip, wherein after the execution process of the second timing signal is completed, the timing generation module simultaneously sends out the fourth timing signal and the third timing signal.

2. A storage device according to claim 1, characterized in that: The main controller comprises: a first buffer area, wherein an input end of the first buffer area exchanges data with the host through the first type interface; a second cache area, wherein an input end of the second cache area is connected to an output end of the first cache area and receives the user data, and an output end of the second cache area exchanges data with the flash memory chip through the second type interface; and A third cache area, wherein the third cache area reads and writes the mapping table with the flash memory chip through the second type interface.

3. A storage device according to claim 1, characterized in that: The flash memory chip includes at least one second-type interface. When the flash memory chip includes at least two second-type interfaces, the third timing signal and the fourth timing signal occur simultaneously, and the user data and the second address mapping table are transmitted to the flash memory chip through different second-type interfaces. When the flash memory chip includes one second-type interface, the user data and the address mapping table are transmitted to the flash memory chip successively through the second-type interface.

4. A storage device according to claim 1, characterized in that: The main controller includes an address generation module, which automatically generates or receives a logical address of the user data, and generates the second address mapping table according to the logical address and physical address of the user data.

5. A method for controlling a storage device, based on the storage device according to claim 1, characterized in that: The following steps are involved: Receive user data transmitted by the host in multiple rounds; While receiving the user data, generating or updating an address mapping table of the user data; as well as The user data and the updated address mapping table are written into a flash memory chip.

Citation Information

Patent Citations

  • Flash memory apparatus and data access method for flash memory with reduced data access time

    CN103455440A

  • An apparatus and method for handling cache maintenance operations

    CN112612725A

  • Memory and control method and control system thereof

    CN115407946A

  • Reading / writing method for semiconductor storage device

    JP2011118922A

  • Information storing apparatus having a data prewrite unit

    US6389508B1