US11614876B2ActiveUtilityA1

Memory device and method for accessing memory device with namespace management

88
Assignee: MACRONIX INT CO LTDPriority: Aug 20, 2021Filed: Aug 20, 2021Granted: Mar 28, 2023
Est. expiryAug 20, 2041(~15.1 yrs left)· nominal 20-yr term from priority
G06F 2212/7204G06F 2212/1056G06F 2212/7208G06F 2212/7201G06F 2212/1024G06F 12/0246G06F 3/0644G06F 3/0688G06F 3/0659G06F 3/0605G06F 3/0679G06F 2212/1044G06F 12/0804G06F 12/1009G06F 3/0604
88
PatentIndex Score
2
Cited by
6
References
25
Claims

Abstract

The invention provides a memory device including a memory array, an internal memory, and a processor. The memory array stores node mapping tables for access data in the memory array. The internal memory includes a namespace table and an index table The processor obtains a data access command from a host device to determine whether a data of the data access command contains one of the NSIDs, assigns the at least one internal NSID to the data of the data access command according to the data access command in response to the data of the data access command that does not contain the namespace identifier, and, the processor manages the data with the internal NSID by the namespace table and the index table.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A memory device, comprising:
 a memory array; 
 an internal memory, including a namespace table, an index table, and a logic-to-physical table, wherein the namespace table includes a plurality of namespace identifiers (NSIDs) and at least one internal NSID; and 
 a processor, coupled to the memory array and the internal memory, 
 wherein the processor is configured to: 
 obtaining a data access command from a host device to determine whether a data of the data access command contains one of the NSIDs; 
 assigning the at least one internal NSID to the data of the data access command according to the data access command in response to the data of the data access command that does not contain the namespace identifier; and 
 managing the data with the NSID and the data with the internal NSID by the namespace table and the index table, 
 wherein the namespace table includes a column of the NSIDs and a column of a start entry and an end entry of the index table, 
 the index table includes entries in a first column, addresses of the memory array for each entry in a second column, and cached indexes of the logic-to-physical table for each entry in a third column, and 
 the logic-to-physical table includes the cached indexes in a first column and the logic-to-physical entries for each of the cached indexes in a second column. 
 
     
     
       2. The memory device according to  claim 1 , wherein the data of the data access command that does not contain the namespace identifier is an image data for the memory device. 
     
     
       3. The memory device according to  claim 2 , wherein the image data is one of firmware code, a boot partition, a replay protected memory block (RPMB), and an out-of-order data compared to user data of the memory array. 
     
     
       4. The memory device according to  claim 1 , wherein the memory array includes a mapping table and a plurality of user data, and the user data contain the NSIDs. 
     
     
       5. The memory device according to  claim 1 , wherein the processor executes the data access command for creating a first NSID to perform steps for:
 updating the start entry and the end entry of the index table in the first column with a creation preset value according to the first NSID in the namespace table, wherein the creation preset value is by command request from the host device; 
 setting a row or rows in the index table pointed by an updated data of the start entry and the end entry of the index table in the namespace table as an invalid state; and 
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       6. The memory device according to  claim 1 , wherein the processor executes the data access command for enlarging a second NSID to perform steps for:
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array; 
 updating the start entry and the end entry of the index table with an enlargement size according to the second NSID in the namespace table, wherein the enlargement size is by command request from the host device and the enlargement size is larger than a size between the original entry and the original end entry of the index table; 
 arranging the entries in the index table according to the enlargement size, wherein an enlargement entry in the index table is set as an invalid state; and 
 flushing the latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       7. The memory device according to  claim 1 , wherein the processor executes the data access command for narrowing a third NSID to perform steps for:
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array; 
 updating the column of the start entry and the end entry of the index table with a narrowed size according to the third NSID in the namespace table, and updating all of the column of the start entry and the end entry of the index table, wherein the narrowed size is by command request from the host device and the narrowed size is smaller than a size between the original entry and the original end entry of the index table; 
 arranging the entries in the index table according to the narrowed size; and 
 flushing the latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       8. The memory device according to  claim 1 , wherein the processor executes the data access command for deleting a fourth NSID to perform steps for:
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array; 
 updating the column of the start entry and the end entry of the index table as an invalid state according to the fourth NSID in the namespace table, and updating all of the column of the start entry and the end entry of the index table; 
 arranging the entries in the index table according to the deleted fourth NSID; and 
 flushing the latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       9. The memory device according to  claim 1 , wherein the processor executes the data access command for writing a user data to a fifth NSID to perform steps for:
 calculating a logical index entry and a logical entry in segment by a logical block address (LBA) of the data access command according to the fifth NSID in the namespace table, wherein the fifth NSID is set by the data access command; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; 
 determining whether the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is in the invalid state or not; 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address in response to the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is not in the invalid state; and 
 writing the user data to the memory array and update address of written memory array to the found logic-to-physical entry in the logic-to-physical table. 
 
     
     
       10. The memory device according to  claim 1 , wherein the processor executes the data access command for writing the data of the data access command that does not contain the namespace identifier to the internal NSID to perform steps for:
 assigning the internal NSID to the image data for allocating the image data to a space of the internal NSID; 
 using the internal NSID to find the space in the memory space with the internal NSID according to the namespace table, the index table, and the logic-to-physical table, and writing the image data into the space in the memory array. 
 
     
     
       11. The memory device according to  claim 1 , wherein the processor executes the data access command for reading a user data to a sixth NSID to perform steps for:
 calculating a logical index entry and a logical entry in segment by a LBA of the data access command according to the sixth NSID in the namespace table; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; 
 determining whether the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is in the invalid state or not; 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address and the logical entry in segment in response to the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is not in the invalid state; and 
 reading the user data to the memory array according to the found logic-to-physical entry in the logic-to-physical table. 
 
     
     
       12. The memory device according to  claim 1 , wherein the processor executes the data access command for rebuild the logical-to-physical table to a stored NSID to perform steps for:
 obtaining a data header information that contains the stored NSID and a LBA; 
 finding the column of the start entry and the end entry of the index table in the namespace table according to the stored NSID; 
 calculating a logical index entry and a logical entry in segment by the LBA of the data access command; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; and 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address and the column of the cached index of the logic-to-physical table, then update data address information to the logic-to-physical entries. 
 
     
     
       13. The memory device according to  claim 1 , wherein the memory array is a flash memory array with a NAND type, a NOR type, or an AND type,
 wherein the internal memory is a dynamic random access memory (DRAM). 
 
     
     
       14. A method for accessing a memory device, wherein the memory device includes a memory array, an index table, and a logic-to-physical table, wherein the memory array includes a mapping table and a plurality of user data, and the user data contain the NSIDs, the method comprising:
 obtaining a data access command from a host device to determine whether a data of the data access command contains one of the NSIDs; 
 assigning the at least one internal NSID to the data of the data access command according to the data access command in response to the data of the data access command that does not contain the namespace identifier; and 
 managing the data with the NSID and the data with the internal NSID by the namespace table and the index table, 
 wherein the namespace table includes a column of the NSIDs and a column of a start entry and an end entry of the index table, 
 the index table includes entries in a first column, addresses of the memory array for each entry in a second column, and cached indexes of the logic-to-physical table for each entry in a third column; 
 the logic-to-physical table includes the cached indexes in a first column and the logic-to-physical entries for each of the cached indexes in a second column. 
 
     
     
       15. The method for accessing the memory device according to  claim 14 , wherein the data of the data access command that does not contain the namespace identifier is an image data for the memory device. 
     
     
       16. The method for accessing the memory device according to  claim 15 , wherein the image data is one of firmware code, a boot partition, a replay protected memory block (RPMB), and an out-of-order data compared to user data of the memory array. 
     
     
       17. The method for accessing the memory device according to  claim 14 , wherein when the data access command for creating a first NSID is executed, the method further includes:
 updating the column of the start entry and the end entry of the index table with a creation preset value according to the first NSID in the namespace table, wherein the creation preset value is by command request from the host device; 
 setting a row or rows in the index table pointed by an updated data of the start entry and the end entry of the index table in the namespace table as an invalid state; and 
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       18. The method for accessing the memory device according to  claim 14 , wherein when the data access command for enlarging a second NSID is executed, the method further includes:
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array; 
 updating the column of the start entry and the end entry of the index table with an enlargement size according to the second NSID in the namespace table, wherein the enlargement size is by command request from the host device and the enlargement size is larger than a size between the original entry and the original end entry of the index table; 
 arranging the entries in the index table according to the enlargement size, wherein an enlargement entry in the index table is set as an invalid state; and 
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       19. The method for accessing the memory device according to  claim 14 , wherein when the data access command for narrowing a third NSID is executed, the method further includes:
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array; 
 updating the column of the start entry and the end entry of the index table with a narrowed size according to the third NSID in the namespace table, and updating all of the column of the start entry and the end entry of the index table, wherein the narrowed size is by command request from the host device and the narrowed size is smaller than a size between the original entry and the original end entry of the index table; 
 arranging the entries in the index table according to the narrowed size; and 
 flushing the latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       20. The method for accessing the memory device according to  claim 14 , wherein when the data access command for deleting a fourth NSID is executed, the method further includes:
 flushing the index table with the memory array; 
 updating the column of the start entry and the end entry of the index table as an invalid state according to the fourth NSID in the namespace table, and updating all of the column of the start entry and the end entry of the index table; 
 arranging the entries in the index table according to the deleted preset NSID; and 
 flushing latest mapping data in the internal memory not store at the memory array yet to the memory array. 
 
     
     
       21. The method for accessing the memory device according to  claim 14 , wherein when the data access command for writing a user data to a fifth NSID is executed, the fifth NSID is set by the data access command, the method further includes:
 calculating a logical index entry and a logical entry in segment by a LBA of the data access command according to the fifth NSID in the namespace table; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; 
 determining whether the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is in the invalid state or not; 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address in response to the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is not in the invalid state; and 
 writing the user data to the memory array and update address of written memory array to the found logic-to-physical entry in the logic-to-physical table. 
 
     
     
       22. The method for accessing the memory device according to  claim 14 , wherein when the data access command for writing the data of the data access command that does not contain the namespace identifier to the internal NSID is executed, the method further includes:
 assigning the internal NSID to the image data for allocating the image data to a space of the internal NSID; 
 using the internal NSID to find the space in the memory space with the internal NSID according to the namespace table, the index table, and the logic-to-physical table, and writing the image data into the space in the memory array. 
 
     
     
       23. The method for accessing the memory device according to  claim 14 , wherein when the data access command for reading a user data to a sixth NSID is executed, the method further includes:
 calculating a logical index entry and a logical entry in segment by a LBA of the data access command; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; 
 determining whether the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is in the invalid state or not; 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address and the logical entry in segment in response to the column of the cached index of the logic-to-physical table in the index table pointed by the physical entry address is not in the invalid state; and 
 reading the user data to the memory array according to the found logic-to-physical entry in the logic-to-physical table. 
 
     
     
       24. The method for accessing the memory device according to  claim 14 , wherein when the data access command for rebuild the logical-to-physical table is executed, the method further includes:
 obtaining a data header information that contains a stored NSID and a LBA in the memory device; 
 finding the column of the start entry and the end entry of the index table in the namespace table according to the stored NSID; 
 calculating a logical index entry and a logical entry in segment by the LBA of the data access command; 
 finding a physical entry address in the index table according to the start entry in the namespace table and the logical index entry; and 
 finding one of the logic-to-physical entries in the logic-to-physical table according to the physical entry address and the column of the cached index of the logic-to-physical table, then updating data address information to the logic-to-physical entries. 
 
     
     
       25. The method for accessing the memory device according to  claim 14 , wherein the memory array is a flash memory array with a NAND type, a NOR type, or an AND type,
 wherein the internal memory is a dynamic random access memory (DRAM).

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.