IP Library › Granted Patent US 11,036,646
Granted Patent B2
US 11,036,646 · App. 16/560,033 · Granted Jun 15, 2021

Data storage device and method of writing logical-to-physical mapping table thereof

Inventors: Che-Wei Hsu (Taichung, TW); Hui-Ping Ku (Zhubei, TW)
Assignee: SILICON MOTION, INC.
G06F12/1009G06F2212/7201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,036,646
App. No.
16/560,033
Granted
Jun 15, 2021
Kind
B2
Abstract

A data storage device is provided. The data storage device includes: a flash memory, a dynamic random access memory (DRAM), and a memory controller. The flash memory stores a logical-to-physical mapping (L2P) table that is divided into a plurality of group-mapping tables. The memory controller receives a host command from a host, wherein the host command includes one or more pieces of data and one or more corresponding logical addresses. The memory controller writes the data of the host command into active blocks of the flash memory. In response to the memory controller changing the active blocks into unsaved data blocks and a number of the unsaved data blocks being greater than or equal to an unsaved data block count threshold, the memory controller segmentally updates mapping relationships of the data in the unsaved data blocks, and writes the updated group-mapping tables into the flash memory.

Claims (27)

1. A data storage device, comprising:

a flash memory, configured to store a logical-to-physical mapping (L2P) table, wherein the L2P table is divided into a plurality of group-mapping tables;

a dynamic random access memory (DRAM), configured to store the group-mapping tables; and

a memory controller, configured to receive a host command from a host, wherein the host command comprises one or more pieces of data and one or more corresponding logical addresses,

wherein the memory controller writes the pieces of data of the host command into a plurality of active blocks of the flash memory;

wherein in response to the memory controller changing the active blocks into a plurality of unsaved data blocks and an unsaved data block count of the plurality of unsaved data blocks being greater than or equal to an unsaved data block count threshold, the memory controller updates mapping relationships of the data in the plurality of unsaved data blocks in segments into the group-mapping tables, and writes the updated group-mapping tables into the flash memory.

2. The data storage device as claimed in claim 1 , wherein the memory controller calculates a predetermined unsaved data block count capable of being rebuilt during power recovery of the data storage device according to a predefined time for the data storage device to enter a ready status, wherein the unsaved data block count threshold is half of the predetermined unsaved data block count.

3. The data storage device as claimed in claim 2 , wherein when the memory controller is to write a specific data block including the data of the host command into a physical block of the flash memory, the memory controller increases the unsaved data block count by a corresponding count value according to a type of specific data block and physical block.

4. The data storage device as claimed in claim 3 , wherein the type of specific data block and physical block comprises single-level cells (SLCs), multi-level cells (MLCs), triple-level cells (TLCs), and quadruple-level cells (QLCs), and the count value corresponding to the SLCs, MLCs, TLCs, and QLCs are 1, 2, 3, and 4, respectively.

5. The data storage device as claimed in claim 1 , wherein the memory controller obtains a data scheduling ratio by dividing a first number of a plurality of logical pages in each data block composed of the data of the host command by a second number of group-mapping tables corresponding to the logical pages of each data block, and a size of each group-mapping table equals that of each logical page.

6. The data storage device as claimed in claim 5 , wherein when the memory controller is to write the updated group-mapping tables into the flash memory, the memory controller copies the group-mapping table corresponding to each data block to be stored to obtain backup group-mapping tables corresponding to each data block to be stored.

7. The data storage device as claimed in claim 6 , wherein every time that the memory controller has written the first number of logical pages to the active blocks of the flash memory, the memory controller writes the backup group-mapping table corresponding to the first number of logical pages into the flash memory.

8. A method of writing a logical-to-physical mapping (L2P) table, for use in a data storage device, wherein the data storage device comprises a flash memory and a dynamic random access memory (DRAM), and the flash memory stores the L2P table that is divided into a plurality of group-mapping tables, the method comprising:

receive a host command from a host, wherein the host command comprises one or more pieces of data and one or more corresponding logical addresses;

writing the pieces of data of the host command into a plurality of active blocks of the flash memory; and

in response to the active blocks being changed into a plurality of unsaved data blocks and a unsaved data block count of the plurality of unsaved data blocks being greater than or equal to an unsaved data block count threshold, segmentally updating mapping relationships of the data in the plurality of unsaved data blocks into the group-mapping tables, and writing the updated group-mapping tables into the flash memory.

9. The method as claimed in claim 8 , further comprising:

calculating a predetermined unsaved data block count capable of being rebuilt during power recovery of the data storage device according to a predefined time limit for the data storage device to enter a ready status, wherein the unsaved data block count threshold is half of the predetermined unsaved data block count.

10. The method as claimed in claim 9 , further comprising:

when a specific data block including the data of the host command is to be written into a physical block of the flash memory, increasing the unsaved data block count by a corresponding count value according to a type of specific data block and physical block.

11. The method as claimed in claim 10 , wherein the type of specific data block and physical block comprises single-level cells (SLCs), multi-level cells (MLCs), triple-level cells (TLCs), and quadruple-level cells (QLCs), and the count value corresponding to the SLCs, MLCs, TLCs, and QLCs are 1, 2, 3, and 4, respectively.

12. The method as claimed in claim 8 , further comprising:

obtaining a data scheduling ratio by dividing a first number of a plurality of logical pages in each data block composed of the data of the host command by a second number of the group-mapping tables corresponding to the logical pages of each data block, and a size of each group-mapping table equals that of each logical page.

13. The method as claimed in claim 12 , further comprising:

when the updated group-mapping tables are to be written into the flash memory, copying the group-mapping table corresponding to each data block to be stored to obtain backup group-mapping tables corresponding to each data block to be stored.

14. The method as claimed in claim 13 , further comprising:

every time that the first number of logical pages has been written into the active blocks of the flash memory, writing the backup group-mapping table corresponding to the first number of logical pages into the flash memory.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 4, 2019
From: HSU, CHE-WEI; KU, HUI-PING
To: SILICON MOTION, INC.
Reel/Frame 050261/0847 →
Priority Claims (1)
TW 108126306 · Jul 25, 2019 · national
Continuity (2)
Provisional Application 62731137 · Sep 14, 2018
Related Publication 20200089620A1 · Mar 19, 2020
Cited By (2)
US 12,399,823 US 12,748,693