Storage device with compressed FTL table
By setting up the FTL cache in the control component of the solid-state storage device and using the front-end processing unit to calculate the storage address, boundary-aligned compressed storage of FTL entries is achieved, solving the problem of excessive FTL table space occupation, improving access performance and reducing cost.
Patent Information
- Application Number
- CN201810360299.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-04-20
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2038-04-20
AI Technical Summary
As the capacity of solid-state storage devices increases, the number of entries in the FTL table increases, resulting in a significant increase in the memory space required to store the FTL table, increasing the cost of solid-state storage devices, and affecting access performance.
By setting up the FTL cache in the control component, frequently accessed FTL entries are moved from the external memory to the FTL cache, and the front-end processing unit is used to calculate the storage address of the FTL entries, thereby realizing compressed storage aligned according to the access unit boundary and reducing Storage space occupied.
It effectively saves the memory space occupied by FTL tables, improves access performance, and reduces the cost of solid-state storage devices.
Smart Images

Figure CN110389904B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a solid-state storage device, and more particularly to using a compressed FTL table in a solid-state storage device. Background Art
[0002] Figure 1 The block diagram of the solid-state storage device of the prior art is shown. The solid-state storage device 102 is coupled with the host to provide storage capacity for the host. The host and the solid-state storage device 102 can be coupled in a variety of ways, including but not limited to connecting the host and the solid-state storage device 102 through, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe), NVMe (NVM Express), Ethernet, Fiber Channel, wireless communication network, etc. The host can be an information processing device that can communicate with the storage device in the above manner, such as a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, etc. The storage device 102 includes an interface 103 , a control component 104 , one or more NVM chips 105 , and a DRAM (Dynamic Random Access Memory) 110 .
[0003] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), etc. are common NVMs.
[0004] The interface 103 may be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, etc.
[0005] The control component 104 is used to control data transmission between the interface 103, the NVM chip 105 and the DRAM 110, and is also used for storage management, mapping of host logical addresses to flash physical addresses, erase leveling, bad block management, etc. The control component 104 can be implemented in a variety of ways, such as software, hardware, firmware, or a combination thereof. For example, the control component 104 can be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control component 104 can also include a processor or a controller, in which software is executed to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 can also be coupled to the DRAM 110 and can access the data of the DRAM 110. The data of the FTL table and / or cached IO commands can be stored in the DRAM.
[0006] The control component 104 includes a flash memory interface controller (or medium interface controller, flash memory channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner that complies with the interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI" and the like.
[0007] In a solid-state storage device, the FTL (Flash Translation Layer) is used to maintain the mapping information from the logical address to the physical address. The logical address constitutes the storage space of the solid-state storage device perceived by the upper-layer software such as the operating system. The physical address is the address used to access the physical storage unit of the solid-state storage device. In the related art, the address mapping can also be implemented using the intermediate address form. For example, the logical address is mapped to the intermediate address, and then the intermediate address is further mapped to the physical address.
[0008] The table structure that stores the mapping information from logical addresses to physical addresses is called an FTL table. The FTL table is an important metadata in a solid-state storage device. Usually, the data items of the FTL table record the address mapping relationship in units of data pages in the solid-state storage device.
[0009] The FTL table includes multiple FTL entries (or table entries). In one case, each FTL entry records the correspondence between a logical page address and a physical page. In another case, each FTL entry records the correspondence between multiple consecutive logical page addresses and multiple consecutive physical pages. In another case, each FTL entry records the correspondence between a logical block address and a physical block address. In still another case, the FTL entry records the mapping relationship between the logical block address and the physical block address, and / or the mapping relationship between the logical page address and the physical page address.
[0010] The improved FTL algorithm and its application in solid-state storage devices are disclosed in "DFTL: A Flash Translation Layer Employing Demand-based Selective Caching of Page-level Address Mappings", the full text of which can be obtained from http: / / www.cse.psu.edu / ~buu1 / papers / ps / dftl-asplos09.pdf. The Chinese patent application with application number 2017113473632 (the invention name is "Address conversion method and device for large-capacity solid-state storage device") provides an FTL table suitable for large-capacity solid-state storage devices and its use. Summary of the invention
[0011] With the increase of the capacity of solid-state storage devices, for example, a solid-state storage device with a capacity of 4TB, the FTL table includes 10^9 entries, resulting in a large amount of memory space consumed by storing FTL in the solid-state storage device. To ensure the performance of accessing the FTL table, the FTL table is generally stored in a DRAM memory such as a DDR interface. Setting a DRAM memory sufficient to store the FTL table in the solid-state storage device also increases the cost of the solid-state storage device. It is necessary to save the memory space occupied by the FTL table.
[0012] According to the first aspect of the present application, a first storage device according to the first aspect of the present application is provided, comprising: an external memory and a control component, wherein the front-end processing unit of the control component moves a memory access unit accommodating an FTL entry corresponding to an accessed logical address from the external memory to the FTL cache of the control component, and moves a memory access unit accommodating an FTL entry corresponding to an accessed logical address in the memory access unit moved to the FTL cache to the front-end processing unit to use the FTL entry; wherein the storage unit is aligned according to the boundary of the memory access unit, and the boundary of the FTL entry is not always aligned with the boundary of the storage unit.
[0013] According to the first storage device of the first aspect of the present application, the memory access unit is a minimum unit for transmitting data between the external memory and the control component.
[0014] According to the first or second storage device of the first aspect of the present application, the memory access unit is a memory row.
[0015] According to one of the first to third storage devices of the first aspect of the present application, the storage unit is a minimum unit of data transmission between the front-end processing unit and the FTL cache.
[0016] According to one of the first to fourth storage devices of the first aspect of the present application, the front-end processing unit calculates the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table, and moves the memory access unit from the external memory to the FTL cache according to the storage address.
[0017] According to the fifth storage device of the first aspect of the present application, the front-end processing unit calculates m*se / sl to obtain the integer part dl of the quotient, and obtains the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sl is the size of the memory access unit in bits.
[0018] According to the sixth storage device of the first aspect of the present application, for a memory access unit with a size of 64 bytes, the front-end processing unit discards or right-shifts the lower 9 bits of m*se to obtain the calculation result of m*se / sl.
[0019] According to the sixth or seventh storage device of the first aspect of the present application, the front-end processing unit calculates m*se / sl to obtain the integer part rl of the remainder, and obtains the distance of the starting address of the FTL entry corresponding to the accessed logical address in the memory access unit in the FTL cache relative to the starting address of the memory access unit through the integer part rl of the remainder.
[0020] According to the eighth storage device of the first aspect of the present application, for a memory access unit with a size of 64 bytes, the front-end processing unit uses the lower 9 bits of m*se as the integer part rl of the remainder of m*se / sl.
[0021] According to the eighth or ninth storage device of the first aspect of the present application, the front-end processing unit calculates (sl-rl), and if the result of (sl-rl) is less than se, the front-end processing unit moves the memory access unit that accommodates the starting address of the FTL entry corresponding to the accessed logical address and the memory access unit after the memory access unit to the FTL cache.
[0022] According to the fifth storage device of the first aspect of the present application, the front-end processing unit calculates m*se / sm / sml to obtain the integer part dl of the quotient, and obtains the storage address of the access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, sm is the size of the storage unit in bits, and sml is the size of the access unit in storage units.
[0023] According to one of the fifth to eleventh storage devices of the first aspect of the present application, the front-end processing unit calculates a memory access unit that accommodates the end address of the FTL entry corresponding to the accessed logical address, and if the memory access unit that accommodates the end address is the same as the memory access unit that accommodates the storage address, then the memory access unit that accommodates the storage address can fully accommodate the FTL entry.
[0024] According to the twelfth storage device of the first aspect of the present application, the front-end processing unit calculates m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address in the FTL table, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, and se is the size of the FTL entry in bits.
[0025] According to the first storage device of the first aspect of the present application, the front-end processing unit calculates the storage address of the storage unit that contains the FTL entry corresponding to the accessed logical address and moves it to the memory access unit in the FTL cache relative to the starting address of the FTL table, and moves the storage unit from the memory access unit in the FTL cache to the front-end processing unit according to the storage address.
[0026] According to the fourteenth storage device of the first aspect of the present application, the front-end processing unit calculates m*se / sm to obtain the integer part dm of the quotient, and obtains the storage address through the integer part dm of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sm is the size of the storage unit in bits.
[0027] According to the fifteenth storage device of the first aspect of the present application, for a storage unit whose size is a 32-bit double word, the front-end processing unit discards or right-shifts the lower 5 bits of m*se to obtain the calculation result of m*se / sm.
[0028] According to the fourteenth or fifteenth storage device of the first aspect of the present application, the front-end processing unit calculates the integer part rm of the remainder obtained by m*se / sm, and obtains the distance of the starting address of the FTL entry corresponding to the accessed logical address in the storage unit relative to the starting address of the storage unit through the integer part rm of the remainder.
[0029] According to the seventeenth storage device of the first aspect of the present application, for a storage unit of a 32-bit double word size, the front-end processing unit uses the lower 5 bits of m*se as the integer part rm of the remainder m*se / sm.
[0030] According to the seventeenth or eighteenth storage device of the first aspect of the present application, the front-end processing unit calculates (sm-rm), and if the result of (sm-rm) is less than se, the front-end processing unit moves the storage unit containing the starting address of the FTL entry corresponding to the accessed logical address and the storage unit after the storage unit to the front-end processing unit.
[0031] According to one of the fourteenth to nineteenth storage devices of the first aspect of the present application, the front-end processing unit calculates a storage unit that accommodates the end address of the FTL entry corresponding to the accessed logical address, and if the storage unit that accommodates the end address is the same as the storage unit that accommodates the storage address, then the storage unit that accommodates the storage address can completely accommodate the FTL entry.
[0032] According to the twentieth storage device of the first aspect of the present application, the front-end processing unit calculates m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address in the FTL table.
[0033] According to the twenty-first storage device of the first aspect of the present application, the front-end processing unit obtains the storage unit and the memory access unit accommodating from FTL entry m to FTL entry m+n according to the starting address and the ending address of the FTL entries corresponding to the n consecutive logical addresses being accessed.
[0034] According to the twenty-second storage device of the first aspect of the present application, the starting address of the FTL entry in the FTL table in bits is m*se, and the ending address of the FTL entry m+n in the FTL table in bits is (m+n)*se+se-1.
[0035] According to one of the first to twenty-third storage devices of the first aspect of the present application, in response to the memory access unit being loaded into the FTL cache, the front-end processing unit records the logical address of the FTL entry accommodated by the memory access unit loaded into the FTL cache.
[0036] According to the twenty-fourth storage device of the first aspect of the present application, the front-end processing unit compares the logical address to be accessed with the recorded logical address of the FTL entry contained in the access unit moved to the FTL cache, and if the logical address to be accessed is within the range of the recorded logical addresses of the FTL entries contained in the cached access unit, the FTL entry corresponding to the logical address to be accessed is obtained from the FTL cache.
[0037] According to the twenty-fourth storage device of the first aspect of the present application, the front-end processing unit calculates a first logical address corresponding to a first FTL entry at a starting address of a memory access unit loaded into an FTL cache, and determines whether the memory access unit completely accommodates the first FTL entry; the front-end processing unit calculates a second logical address corresponding to a second FTL entry at an end address of the memory access unit, and determines whether the memory access unit completely accommodates the second FTL entry; the front-end processing unit records the FTL entries completely accommodated by the memory access unit.
[0038] According to the twenty-sixth storage device of the first aspect of the present application, the front-end processing unit calculates l1*sl / se, and the integer part de of the quotient indicates the first logical address corresponding to the first FTL entry located at the starting address of the memory access unit, wherein l1 is the number of memory access units stored before the memory access unit l1 among multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
[0039] According to the twenty-seventh storage device of the first aspect of the present application, the front-end processing unit calculates l1*sl / se to obtain the integer part re of the remainder of the quotient, and if re is 0, the memory access unit completely accommodates the first FTL entry.
[0040] The twenty-sixth storage device according to the first aspect of the present application, wherein the front-end processing unit calculates (l1*sl+sl-1) / se, and the integer part of the obtained quotient indicates the second logical address corresponding to the second FTL entry located at the end address of the access unit, wherein l1 is the number of access units stored before the access unit l1 among multiple access units storing the FTL table, sl is the size of the access unit in bits, and se is the size of the FTL entry in bits.
[0041] According to the twenty-ninth storage device of the first aspect of the present application, wherein the front-end processing unit calculates the integer part ree of the remainder obtained by (l1*sl+sl-1) / se, if ree is se-1, then the memory access unit l1 completely accommodates the second FTL entry.
[0042] According to the twenty-seventh or twenty-eighth storage device of the first aspect of the present application, the front-end processing unit transforms the calculation of I1*sl / se into the calculation of (l1*sl*2^j / se) / (2^j), where j is a larger integer that is easy to calculate.
[0043] According to the twenty-seventh or twenty-eighth storage device of the first aspect of the present application, the front-end processing unit converts the division calculation in l1*sl / se into multiplication and subtraction operations by calculating re=l1*sl-de*se.
[0044] The twenty-fifth storage device according to the first aspect of the present application, wherein the front-end processing unit calculates the difference d in bits from the starting address of the FTL entry corresponding to the accessed logical address to the starting address of the memory access unit, and the integer part of the quotient obtained by d / se indicates the number of FTL entries that are completely accommodated in the memory access unit before the FTL entry; the front-end processing unit calculates the difference a in bits from the end address of the FTL entry corresponding to the accessed logical address to the end address of the memory access unit, and the integer part of the quotient obtained by a / se indicates the number of FTL entries that are completely accommodated in the memory access unit after the FTL entry; and records the logical addresses of the FTL entries that are completely accommodated before the FTL entry to the FTL entries that are completely accommodated after the FTL entry in the memory access unit; wherein se is the size of the FTL entry in bits.
[0045] The first storage device according to the first aspect of the present application further includes: a host interface coupled to the front-end processing unit, wherein the host interface is used to exchange commands and data with a host.
[0046] The first storage device according to the first aspect of the present application further includes: a media interface for accessing the NVM chip.
[0047] According to the first storage device of the first aspect of the present application, the size of the FTL entry is different from an integer multiple of the storage unit size.
[0048] According to the first storage device of the first aspect of the present application, the FTL cache is a memory inside the control component.
[0049] According to the second aspect of the present application, a first method for accessing FTL table entries according to the second aspect of the present application is provided, comprising the following steps: obtaining a logical address accessed by an IO command; calculating a memory access unit in an external memory that accommodates an FTL entry corresponding to the accessed logical address based on the logical address accessed by the IO command, and loading the memory access unit into a cache; calculating an address of a storage unit in the memory access unit that accommodates an FTL entry corresponding to the accessed logical address based on the logical address accessed by the IO command; and obtaining the storage unit from the cache based on the address of the storage unit in the memory access unit to use the FTL entry.
[0050] According to the first method for accessing FTL table entries of the second aspect of the present application, the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table is calculated, and the memory access unit is moved from the external memory to the cache according to the storage address.
[0051] According to the second method for accessing FTL table entries of the second aspect of the present application, m*se / sl is calculated to obtain the integer part dl of the quotient, and the storage address of the memory access unit accommodating the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table is obtained through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sl is the size of the memory access unit in bits.
[0052] According to the third method for accessing FTL table entries of the second aspect of the present application, for a memory access unit of 64 bytes, the lower 9 bits of m*se are discarded or right-shifted to obtain the calculation result of m*se / sl.
[0053] According to the second or third method for accessing FTL table entries of the second aspect of the present application, m*se / sl is calculated to obtain the integer part rl of the remainder, and the integer part rl of the remainder is used to obtain the distance of the starting address of the FTL entry corresponding to the accessed logical address in the memory access unit in the FTL cache relative to the starting address of the memory access unit.
[0054] According to the fifth method for accessing FTL table entries of the second aspect of the present application, for a memory access unit of size 64 bytes, the lower 9 bits of m*se are used as the integer part rl of the remainder of m*se / sl.
[0055] According to the fifth or sixth method for accessing FTL table entries of the second aspect of the present application, (sl-rl) is calculated. If the result of (sl-rl) is less than se, the memory access unit containing the starting address of the FTL entry corresponding to the accessed logical address and the memory access unit after the memory access unit are moved to the cache.
[0056] According to the first method for accessing FTL table entries of the second aspect of the present application, m*se / sm / sml is calculated to obtain the integer part dl of the quotient, and the storage address of the access memory unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table is obtained through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, sm is the size of the storage unit in bits, and sml is the size of the access memory unit in storage units.
[0057] According to one of the first to eighth methods for accessing FTL table entries of the second aspect of the present application, a memory access unit accommodating the end address of the FTL entry corresponding to the accessed logical address is calculated, and if the memory access unit accommodating the end address is the same as the memory access unit accommodating the storage address, then the memory access unit accommodating the storage address can completely accommodate the FTL entry.
[0058] According to the ninth method for accessing FTL table entries of the second aspect of the present application, m*se+se-1 is calculated to obtain the end address of the FTL entry corresponding to the accessed logical address.
[0059] According to the first method for accessing FTL table entries of the second aspect of the present application, a first storage address of a storage unit containing an FTL entry corresponding to the accessed logical address in the access unit moved to the cache is calculated relative to the starting address of the FTL table, and the storage unit is obtained from the cache according to the first storage address to use the FTL entry.
[0060] According to the eleventh method for accessing FTL table entries of the second aspect of the present application, m*se / sm is calculated to obtain the integer part dm of the quotient, and the storage address is obtained through the integer part dm of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sm is the size of the storage unit in bits.
[0061] According to the twelfth method for accessing FTL table entries of the second aspect of the present application, for a storage unit of a 32-bit double word size, the lower 5 bits of m*se are discarded or right-shifted to obtain the calculation result of m*se / sm.
[0062] According to the eleventh or twelfth method for accessing FTL table entries of the second aspect of the present application, the integer part rm of the remainder obtained by calculating m*se / sm is used to obtain the distance of the starting address of the FTL entry corresponding to the accessed logical address in the storage unit relative to the starting address of the storage unit.
[0063] According to the fourteenth method for accessing FTL table entries of the second aspect of the present application, for a storage unit of size 32-bit double word, the lower 5 bits of m*se are used as the integer part rm of the remainder of m*se / sm.
[0064] According to the fourteenth or fifteenth method for accessing an FTL table entry of the second aspect of the present application, (sm-rm) is calculated, and if the result of (sm-rm) is less than se, a storage unit containing the starting address of the FTL entry corresponding to the accessed logical address and the storage unit after the storage unit are obtained from the cache to use the FTL entry.
[0065] According to one of the eleventh to sixteenth methods for accessing FTL table entries of the second aspect of the present application, a storage unit accommodating the end address of the FTL entry corresponding to the accessed logical address is calculated, and if the storage unit accommodating the end address is the same as the storage unit accommodating the storage address, then the storage unit accommodating the storage address can completely accommodate the FTL entry.
[0066] According to the seventeenth method for accessing FTL table entries of the second aspect of the present application, m*se+se-1 is calculated to obtain the end address of the FTL entry corresponding to the logical address being accessed.
[0067] According to the eighteenth method for accessing FTL table entries of the second aspect of the present application, storage units and access units accommodating from FTL entry m to FTL entry m+n are obtained based on the starting address and ending address of the FTL entries corresponding to the n consecutive logical addresses being accessed.
[0068] According to the nineteenth method for accessing FTL table entries in the second aspect of the present application, the starting address m*se of the FTL entry in the FTL table is measured in bits, and the ending address (m+n)*se+se-1 of the FTL entry m+n in the FTL table is measured in bits.
[0069] According to the first method for accessing FTL table entries in the second aspect of the present application, after the memory access unit is loaded into the cache, the logical address of the FTL entry contained in the cached memory access unit is recorded; the method also includes: comparing the logical address to be accessed by the IO command with the recorded logical address of the FTL entry contained in the cached memory access unit, if the logical address to be accessed by the IO command is within the range of the recorded logical addresses of the FTL entries contained in the cached memory access unit, then obtaining the FTL entry corresponding to the logical address to be accessed by the IO command from the cache.
[0070] According to the twenty-first method for accessing FTL table entries of the second aspect of the present application, in response to loading a memory access unit into a cache, a first logical address corresponding to a first FTL entry located at a starting address of the memory access unit is calculated; it is determined whether the memory access unit completely accommodates the first FTL entry; a second logical address corresponding to a second FTL entry located at an ending address of the memory access unit is calculated; it is determined whether the memory access unit completely accommodates the second FTL entry; and the FTL entries completely accommodated by the memory access unit are recorded.
[0071] According to the twenty-second method for accessing FTL table entries of the second aspect of the present application, l1*sl / se is calculated, and the integer part de of the quotient indicates the first logical address corresponding to the first FTL entry located at the starting address of the access memory unit, wherein l1 is the number of access memory units stored before the access memory unit l1 among multiple access memory units storing the FTL table, sl is the size of the access memory unit in bits, and se is the size of the FTL entry in bits.
[0072] According to the twenty-second or twenty-third method for accessing FTL table entries of the second aspect of the present application, l1*sl / se is calculated to obtain the integer part re of the remainder of the quotient, if re is 0, then the access memory unit l1 completely accommodates the first FTL entry, wherein l1 is the number of access memory units stored before the access memory unit l1 among multiple access memory units storing the FTL table, sl is the size of the access memory unit in bits, and se is the size of the FTL entry in bits.
[0073] According to the twenty-second method for accessing FTL table entries of the second aspect of the present application, (l1*sl+sl-1) / se is calculated, and the integer part of the quotient obtained indicates the second logical address corresponding to the second FTL entry located at the end address of the access memory unit l1, wherein l1 is the number of access memory units stored before the access memory unit l1 among multiple access memory units storing the FTL table, sl is the size of the access memory unit in bits, and se is the size of the FTL entry in bits.
[0074] According to the twenty-fifth method for accessing FTL table entries of the second aspect of the present application, the integer part ree of the remainder obtained by calculating (l1*sl+sl-1) / se, if ree is se-1, then the access memory unit l1 completely accommodates the second FTL entry, wherein l1 is the number of access memory units stored before the access memory unit l1 among multiple access memory units storing the FTL table, sl is the size of the access memory unit in bits, and se is the size of the FTL entry in bits.
[0075] According to the twenty-third or twenty-fourth method for accessing FTL table entries of the second aspect of the present application, l1*sl / se is transformed into (l1*sl*2^j / se) / (2^j), where j is a relatively large integer that is easy to calculate.
[0076] According to the twenty-fifth or twenty-sixth method for accessing FTL table entries of the second aspect of the present application, the division calculation in l1*sl / se is converted into multiplication and subtraction operations through re=l1*sl-de*se.
[0077] According to the twenty-first method for accessing FTL table entries of the second aspect of the present application, in response to loading a memory access unit into a cache, the difference d in bits from the starting address of the FTL entry corresponding to the accessed logical address to the starting address of the memory access unit is calculated, and the integer part of the quotient obtained by d / se indicates the number of FTL entries completely accommodated in the memory access unit before the FTL entry; the difference a in bits from the end address of the FTL entry corresponding to the accessed logical address to the end address of the memory access unit is calculated, and the integer part of the quotient obtained by a / se indicates the number of FTL entries completely accommodated in the memory access unit after the FTL entry; the logical addresses of the FTL entries completely accommodated before the FTL entry to the FTL entries completely accommodated after the FTL entry in the memory access unit are recorded; wherein se is the size of the FTL entry in bits.
[0078] According to the third aspect of the present application, a first program including program code according to the third aspect of the present application is provided. When loaded into a host and executed on the host, the program enables a processor of the host to execute any of the above-described methods for accessing an FTL table entry.
[0079] The present application achieves the purpose of compressing the storage of FTL entries in a form in which the boundaries of the storage units are aligned with the boundaries of the memory access units, and the boundaries of the FTL entries are not always aligned with the boundaries of the storage units, thereby saving the space of the storage device occupied by the FTL table. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0081] Figure 1 A block diagram showing a prior art solid state storage device;
[0082] Figure 2 A block diagram of a solid-state storage device according to an embodiment of the present application is shown;
[0083] Figure 3 A schematic diagram of storing FTL entries in a compressed form in an external memory according to an embodiment of the present application is shown;
[0084] Figure 4 A flowchart of accessing FTL entries stored in compressed form in an external memory according to an embodiment of the present application is shown;
[0085] Figure 5 A schematic diagram of an FTL entry in an FTL cache unit according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0086] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0087] Figure 2 The block diagram of the solid-state storage device according to the embodiment of the present application is shown. The control component 104 of the solid-state storage device includes a host interface 210 , a front-end processing unit 260 , a back-end processing unit 270 and a media interface 220 for accessing the NVM chip 105 .
[0088] The host interface 210 is used to exchange commands and data with the host. In one example, the host and the storage device communicate via the NVMe / PCIe protocol, the host interface 210 processes the PCIe protocol data packet, extracts the NVMe protocol command, and returns the processing result of the NVMe protocol command to the host.
[0089] The front-end processing unit 260 is coupled to the host interface 210, and is used to receive an IO command sent by the host to the storage device. For a read IO command, the front-end processing unit 260 queries the FTL table to obtain a physical address corresponding to the logical address according to the logical address accessed by the IO command, and instructs the back-end processing unit 270 to read data from the NVM chip 105 through the media interface 220 according to the physical address. For a write IO command, the front-end processing unit 260 allocates a physical address to the IO command, instructs the back-end processing unit 270 to write the data to be written by the write IO command to the allocated physical address of the NVM chip 105 through the media interface, and the front-end processing unit 260 also updates the FTL table with the allocated physical address.
[0090] The control unit 104 is also coupled to an external memory (eg, a DRAM having a DDR interface) 110. Part of the space of the external memory 110 is used to store the FTL. Figure 2 1 shows that a plurality of entries (FTL entry 0, FTL entry 1, FTL entry 2, FTL entry 3, ..., FTL entry m, FTL entry m+1, FTL entry m+2, FTL entry m+3, etc.) of the FTL table are stored in the external memory 110. The FTL entry has a specified size, for example, 30 bits, and is used to describe the physical addresses of 10^9 or 2^30 physical storage units on the NVM chip.
[0091] The external memory 110 has a large access delay. To improve the FTL table access performance, the control unit also includes an FTL cache 262. The FTL cache 262 is a memory inside the control unit and has a low access delay. The front-end processing unit 260 caches the FTL entries obtained from the external memory 110 in the FTL cache 262, and uses the FTL entries in the FTL cache 262 during the processing of the IO command.
[0092] For FTL entries with a size of, for example, 30 bits, in the prior art, a 4-byte storage unit is used to store the FTL entries in an external memory. Generally, 4 bytes constitute a double word (DWORD), and accessing the external memory in a 4-byte size is well supported by the prior art.
[0093] However, using a double word size (32 bits) storage unit to store FTL entries (30 bits) wastes 2 bits in the storage unit. When there are, for example, 10^9 or 2^30 FTL entries, the total wasted storage space exceeds 100MB.
[0094] Continue to view Figure 2, data transmission between the external memory 110 and the control unit is performed in memory rows. As an example, the memory row size is 64 bytes, which is determined by the data width of the bus and / or memory controller used by the control unit to access the external memory. The memory row is the minimum data size for data transmission between the external memory 110 and the control unit.
[0095] It will be appreciated that the FTL entries may have other sizes, such as 29 bits, 31 bits, 32 bits, 34 bits or even larger or smaller.
[0096] Figure 3 A schematic diagram of storing FTL entries in a compressed form in an external memory according to an embodiment of the present application is shown.
[0097] The memory access unit is the smallest unit for transferring data between the external memory and the control unit, for example, a memory row. The memory access unit includes a plurality of memory cells, the memory cells have a size of, for example, a double word, and is a front-end processing unit 260 of the control unit (see also Figure 2 ) is the smallest unit of data transfer between the FTL cache and the access memory unit. The storage unit is aligned to the boundary of the access memory unit, so the starting address of the access memory unit is always the starting address of the storage unit, and the ending address of the access memory unit is always the ending address of the storage unit. There is no storage unit that spans two access memory units.
[0098] according to Figure 3 In an embodiment, the size of the FTL entry is smaller than the storage unit, for example, 30 bits. Multiple FTL entries of the FTL table are closely arranged (also referred to as compressed storage) in the storage unit, the end of one FTL entry (for example, FTL entry 0) is adjacent to the beginning of the next FTL entry (for example, FTL entry 1), and there is no unoccupied storage space between the two FTL entries. Since the size of the FTL entry is smaller than the size of the storage unit, the boundaries of the FTL entry and the storage unit are not always aligned, and accordingly, the boundaries of the FTL entry and the access unit are not always aligned. For example, the starting address of FTL entry 0 is aligned with the starting address of the storage unit, while the starting address of FTL entry 1 is located 30 bits away from the starting address of storage unit 0 (2 bits away from the starting address of storage unit 1), and the starting address of FTL entry 2 is located 28 bits away from the starting address of storage unit 1.
[0099] For example, Figure 3 In the figure, point C is the boundary between memory access unit L0 and memory access unit L1, and is also the boundary of the storage unit. Point A is the boundary of the storage unit, but not the boundary of the memory access unit, nor the boundary of the FTL entry. Point B is the boundary of the FTL entry, but not the boundary of the memory access unit, nor the boundary of the storage unit.
[0100] The solid-state storage device indicates the logical address to be accessed in the IO command of the host interface. The logical address corresponds to the FTL entry. For example, the FTL entry uniquely determined by the value of the logical address records the physical address for the NVM storage chip corresponding to the logical address.
[0101] To access the FTL entry corresponding to a certain logical address m (eg, FTL entry m, where m is 0 or a positive integer), the front-end processing unit 260 (see also Figure 2 ) moves the memory access unit L1 in the external memory 110 that accommodates the FTL entry m to the FTL cache 262. The front-end processing unit also identifies which storage unit in the memory access unit L1 moved to the FTL cache 262 accommodates the FTL entry to be accessed.
[0102] According to an embodiment of the present application, a memory access unit (L1) accommodating a specified FTL entry m in the external memory 110 is determined, so as to move the memory access unit L1 from the external memory 110 to the FTL cache 262. And a storage unit k (and possible storage unit k+1) accommodating a specified FTL entry m in the memory access unit L1 is also determined, so as to move the FTL entry m from the FTL cache 262 to the front-end processing unit 260.
[0103] As an example, the IO command indicates that the logical address m is to be accessed, and the FTL entry m records the physical address corresponding to the logical address m. In the FTL table, m FTL entries (FTL entry 0 to FTL entry m-1) are stored before the FTL entry m, so that relative to the starting address of the FTL table, the starting address of the FTL entry m in the FTL table is m*se in bits, where se represents the size (number of bits) of the FTL entry (for example, 30). The size of the storage unit in bits is recorded as sm (for example, 32-bit double words). The size of the memory access unit in bits is recorded as sl (for example, 64 bytes (512 bits)).
[0104] Calculate m*se / sm, and the integer part of the quotient (denoted as dm) indicates the storage unit k (see Figure 3 ) is the storage address relative to the start address of the FTL table. Optionally, for a storage unit of 32-bit double words, the lower 5 bits of m*se are discarded (e.g., the higher bits except the lower 5 bits are retained, or shifted right by 5 bits) to obtain the calculation result of m*se / sm. Replacing the division operation with bit operation will significantly improve the calculation speed.
[0105] Calculate m*se / sm, and the integer part of the remainder (denoted as rm) indicates the starting address of FTL entry m in storage unit k (see Figure 3) is the distance from the starting address of storage unit k. Optionally, for a storage unit of size 32-bit double word, the lower 5 bits of m*se are used as rm.
[0106] Further, if (sm-rm) is less than se, it means that storage unit k cannot completely accommodate FTL entry m, and thus part of FTL entry m is stored in storage unit k+1.
[0107] The integer part of the quotient obtained by calculating m*se / sl (denoted as dl) indicates the memory access unit l (see Figure 3 ) is a storage address relative to the start address of the FTL table. Optionally, for a memory access unit of 64 bytes, the lower 9 bits of m*se are discarded (for example, the higher bits except the lower 9 bits are retained, or shifted right by 9 bits) to obtain the calculation result of m*se / sl.
[0108] Optionally, the size of the memory access unit in terms of storage units is denoted as sml (e.g., each memory access unit accommodates 16 storage units). The integer part of the quotient obtained by calculating m*se / sm / sml (denoted as dl) indicates the memory access unit l1 (see Figure 3 ) is the storage address relative to the start address of the FTL table.
[0109] Calculate m*se / sl, and the integer part of the remainder (denoted as rl) indicates the starting address of FTL entry m in memory access unit l1 (see Figure 3 ) is the distance from the starting address of the memory access unit l1. Optionally, for a memory access unit of size 64 bytes, the lower 9 bits of m*se are used as rl.
[0110] Further, if (sl-rl) is less than se, it means that the memory access unit l1 cannot completely accommodate the FTL entry m, and thus part of the FTL entry m is stored by the memory access unit l2.
[0111] In an optional embodiment, m*se is the starting address of FTL entry m in the FTL table in bits, and the ending address of FTL entry m in the FTL table in bits is obtained by (m*se+se-1). In a similar manner, a storage unit and a memory access unit that accommodate the ending address (m*se+se-1) of FTL entry m in the FTL table in bits are obtained. By identifying whether the storage unit / memory access unit is the same as storage unit k / memory access unit l1, it is identified whether storage unit k can completely accommodate FTL entry m, and whether memory access unit l1 can completely accommodate FTL entry m.
[0112] In a still optional implementation, the IO command accesses a plurality of consecutive logical addresses, the starting logical address is m, and the ending logical address is m+n. m*se is the starting address of FTL entry m in the FTL table in bits, and the ending address of FTL entry m+n in the FTL table in bits is obtained by ((m+n)*se+se-1). Then, the storage unit and the memory access unit accommodating from FTL entry m to FTL entry m+n are obtained.
[0113] Figure 4 A flowchart of accessing FTL entries stored in compressed form in an external memory according to an embodiment of the present application is shown.
[0114] Step S410, the front-end processing unit (see also Figure 2 , the front-end processing unit 260 receives the IO command and obtains the logical address accessed by the IO command. The logical address accessed by the IO command may be one or more. For the purpose of clarity, the IO command accessing one logical address is used as an example to describe Figure 4 Demonstrated embodiment.
[0115] Step S420, the memory access unit l1 (and possible memory access unit l2) in the external memory 110 that contains the FTL entry corresponding to the accessed logical address m is calculated according to the logical address accessed by the IO command. Step S430, the memory access unit l1 (and possible memory access unit l2) is read out from the external memory 110 to load the memory access unit l1 (and possible memory access unit l2) into the FTL cache 262. Step S440, the front-end processing unit 260 also calculates the address of the storage unit (storage unit mm and possible storage unit mm+1) of the FTL entry m corresponding to the accessed logical address contained in the memory access unit l1 (and possible memory access unit l2) according to the logical address accessed by the IO command.
[0116] Step S450, the front-end processing unit obtains storage unit mm (and possible storage unit mm+1) from the FTL cache 262 according to the address of storage unit mm (and possible storage unit mm+1) in the memory access unit l1 (and possible memory access unit l2) to use the FTL entry m.
[0117] Figure 5 A schematic diagram of an FTL entry in an FTL cache unit according to an embodiment of the present application is shown.
[0118] Figure 5 The FTL cache shown is filled with memory access units including FTL entries, as the execution Figure 4 For the purpose of clarity, the FTL entry m is accommodated by a single storage unit and access unit.
[0119] Along with the FTL entry m being transferred to the FTL cache 262, multiple other FTL entries adjacent to the FTL entry m and contained in the same memory access unit l1 (FTL entry m-1, FTL entry m+1, and part of the FTL entry m-2 and part of the FTL entry m+2) are all transferred to the FTL cache 262.
[0120] Figure 5 In the example, the portion of FTL entry m-2 and the portion of FTL entry m+2 are located outside the memory access unit l1 and are not Figure 4 The displayed method is loaded into the FTL cache 262 .
[0121] In addition to the FTL entry m loaded according to the logical address m of the IO command, other FTL entries are also stored in the FTL cache 262. These other FTL entries can be fully utilized. If the IO command received by the front-end processing unit 260 next accesses the FTL entry (FTL entry m-1 to FTL entry m+1) existing in the FTL cache 262, it is not necessary to read the FTL entry from the external memory 110 again, but directly access the FTL entry from the FTL cache 262, thereby speeding up the processing of the IO command by shortening the acquisition time of the FTL entry.
[0122] In order to use these other FTL entries in the FTL cache 262, it is necessary to know the logical addresses corresponding to these other FTL entries. That is, relative to the starting address of the FTL table, the starting address of the access unit l1 in the FTL cache 262 in bits is l1*sl, where l1 is the number of the access unit l1 in the multiple access units storing the FTL table (starting from 0).
[0123] Calculate l1*sl / se, and the integer part of the quotient (denoted as de) indicates the FTL entry m-2 located at the starting address of the access unit l1 (see Figure 5 ) corresponds to the logical address (m-2). Calculate l1*sl / se, and the integer part of the remainder (denoted as re) indicates the distance (in bits) between the starting address of the access unit l1 and the starting address of the FTL entry m-2. If re is 0, it means that the access unit l1 completely accommodates the FTL entry m-2. If re is greater than 0, it means that the access unit l1 does not completely accommodate the FTL entry m-2.
[0124] Similarly, (l1*sl+sl-1) / se is calculated, and the integer part of the quotient indicates the FTL entry m+2 located at the end address of the access unit l1 (see Figure 5) corresponds to the logical address (m+2). Calculate (l1*sl+sl-1) / se, and the integer part of the remainder (denoted as ree) indicates the distance (in bits) between the end address of the access unit l1 and the start address of the FTL entry m+2. If ree is se-1, it means that the access unit l1 completely accommodates the FTL entry m+2. If ree is less than se-1, it means that the access unit l1 does not completely accommodate the FTL entry m+2.
[0125] Division calculations are time-consuming. In an optional embodiment, the division calculation in l1*sl / se is converted into multiplication and shift operations to speed up the process of obtaining the quotient (de) and remainder (re) of l1*sl / se. For example, l1*sl / se is transformed into (l1*sl*2^j / se) / (2^j), where j is a larger integer that can be easily calculated by the front-end processing unit 260, for example, 20 to 30. Thus, l1*sl / se is transformed into a calculation of l1*sl multiplied by (2^j / se) and then divided by (2^j). Since j is a known specified value (for example, a value in the range of 20 to 30), (2^j / se) is also a known value that can be calculated (denoted as A). To facilitate processing by the front-end processing unit 260, the integer part of (2^j / se) is taken as A and the decimal part is discarded. The front-end processing unit calculates l1*sl multiplied by A. The calculation of division by (2^j) is converted into a right shift operation of j bits. Thus, the front-end processing unit 260 calculates l1*sl multiplied by A and right shifts the result by j bits to obtain the quotient (de) of l1*sl / se. The original calculation process of division by se is replaced by one multiplication (multiplication by A) and one shift (right shift by j bits).
[0126] Further, the remainder re = l1*sl-de*se. According to the obtained quotient (de), the remainder (re) can be obtained by multiplication and subtraction. Further, the positive integer se is decomposed into the sum of one or more powers of 2 (for example, 30 = 2^4 + 2^3 + 2^2 + 2^1). Let se = 2^a1 + 2^a2 + ... + 2^ai (where ai is a positive integer), then de*se = de*(2^a1 + 2^a2 + ... + 2^ai) = de*2^a1 + de*2^a2 + ... + de*2^ai. And de*2^ai can be obtained by shifting de to the left ai times, thereby converting the multiplication operation into a left shift operation and an addition operation. As another example, 30 = (2^4-1)*2, so de*30 = (de*2^4-de)*2, and thus the value of de*30 is obtained by subtracting de from the result of shifting de to the left by 4 bits, and then shifting the result to the left by 1 bit.
[0127] Based on the teachings of the above disclosed scheme, a person skilled in the art will be aware of a variety of ways to determine all completely accommodated FTL entries in the access memory unit l1. For example, the difference in bits between the starting address of FTL entry m and the starting address of the access memory unit l1 is calculated (denoted as d), and the integer part of the quotient obtained by d / se indicates how many FTL entries are completely accommodated in the access memory unit l1 before the FTL entry m. The sequence numbers of these entries are before the sequence number of FTL entry m and are adjacent to the sequence number of FTL entry m. Similarly, determine how many FTL entries are completely accommodated in the access memory unit l1 after the FTL entry m.
[0128] Still optionally, based on the known starting address of the first fully contained FTL entry in the access unit l1, all FTL entries fully contained in the access unit l1 can be conveniently determined according to the size of the access unit l1 (sl) and the size of the FTL entry (se).
[0129] The first FTL entry completely contained in the access unit l1 in the FTL cache 262 is recorded as (start_e), and the last FTL entry completely contained in the access unit l1 in the FTL cache 262 is recorded as (end_e). All FTL entries between the FTL entry (start_e) and the FTL entry (end_e) are completely contained in the FTL cache 262. The front-end processing unit 260 records the logical address range (from start_e to end_e) corresponding to the FTL entry (start_e) and the FTL entry (end_e). Then, in response to receiving the logical address to be accessed by the IO command, the front-end processing unit 260 determines whether the required FTL entry already exists in the FTL cache 262 by comparing whether the logical address to be accessed by the IO command belongs to the logical address range (from start_e to end_e). For the FTL entry already existing in the FTL cache 262, the front-end processing unit 260 obtains the FTL entry from the FTL cache 262 without accessing the external memory 110.
[0130] In one embodiment, for a write IO command, the physical address recorded in the FTL entry corresponding to the logical address of the write command is updated to the new physical address assigned to the write IO command. The front-end processing unit 260 updates the FTL entry in the FTL cache 262, and writes the memory access unit in the FTL cache 262 containing the updated FTL entry back to the external memory 110.
[0131] The embodiment of the present application also provides a program including program code. When the program is loaded into a host and executed on the host, the program enables the processor of the host to execute one of the methods according to the embodiment of the present application provided above.
[0132] It should be understood that each block of the block diagram and the flow chart and the combination of blocks of the block diagram and the flow chart can be implemented by various means including computer program instructions, respectively. These computer program instructions can be loaded onto a general-purpose computer, a special-purpose computer or other programmable data control device to produce a machine, so that the instructions executed on the computer or other programmable data control device create a device for implementing the functions specified in one or more flow chart blocks.
[0133] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data control device to function in a particular manner, so that the instructions stored in the computer readable memory can be used to manufacture an article of manufacture including computer readable instructions for implementing the functions specified in one or more flowchart blocks. The computer program instructions may also be loaded onto a computer or other programmable data control device to cause a series of operations to be performed on the computer or other programmable data control device, thereby producing a computer-implemented process, and the instructions executed on the computer or other programmable data control device provide operations for implementing the functions specified in one or more flowchart blocks.
[0134] Thus, the blocks of the block diagrams and flow charts support a combination of means for performing a specified function, a combination of operations for performing a specified function, and a combination of program instruction means for performing a specified function. It should also be understood that each block of the block diagrams and flow charts and the combination of blocks of the block diagrams and flow charts can be implemented by a hardware-based special-purpose computer system that performs the specified function or operation, or by a combination of special-purpose hardware and computer instructions.
[0135] Although the present invention has been described with reference to examples, this is for illustrative purposes only and is not intended to limit the present application, and changes, additions and / or deletions to the embodiments may be made without departing from the scope of the present application.
[0136] Those skilled in the art to which these embodiments relate and who benefit from the teachings presented in the above description and associated drawings will recognize many modifications and other embodiments of the present application described herein. Therefore, it should be understood that the present application is not limited to the specific embodiments disclosed, and modifications and other embodiments are intended to be included within the scope of the appended claims. Although specific terms are employed herein, they are used only in a general and descriptive sense and are not used for the purpose of limitation.
Claims
1. A storage device, comprising: An external memory and a control component, wherein the front-end processing unit of the control component moves a memory access unit containing an FTL entry corresponding to an accessed logical address from the external memory to an FTL cache of the control component, wherein the front-end processing unit calculates a storage address of the storage unit containing the FTL entry corresponding to the accessed logical address moved to the FTL cache relative to a starting address of an FTL table, and according to the storage address, moves the storage unit containing the FTL entry corresponding to the accessed logical address moved to the FTL cache from the memory access unit in the FTL cache to the front-end processing unit to use the FTL entry; wherein the storage unit is aligned according to the boundary of the memory access unit, and the boundary of the FTL entry is not always aligned with the boundary of the storage unit.
2. The storage device according to claim 1, wherein: The memory access unit is the smallest unit for transmitting data between the external memory and the control component.
3. The storage device according to claim 1 or 2, wherein: The memory access unit is a memory row.
4. The storage device according to claim 1 or 2, wherein: The storage unit is the smallest unit for data transmission between the front-end processing unit and the FTL cache.
5. The storage device according to claim 1 or 2, wherein: The front-end processing unit calculates the storage address of the memory access unit accommodating the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table, and moves the memory access unit from the external memory to the FTL cache according to the storage address.
6. The storage device according to claim 5, wherein: The front-end processing unit calculates m*se / sl to obtain the integer part dl of the quotient, and obtains the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sl is the size of the memory access unit in bits.
7. The storage device according to claim 6, wherein: For a memory access unit with a size of 64 bytes, the front-end processing unit discards or right-shifts the lower 9 bits of m*se to obtain the calculation result of m*se / sl.
8. The storage device according to claim 6, wherein: The front-end processing unit calculates m*se / sl to obtain the integer part rl of the remainder, and obtains the distance of the starting address of the FTL entry corresponding to the accessed logical address in the memory access unit in the FTL cache relative to the starting address of the memory access unit through the integer part rl of the remainder.
9. The storage device according to claim 8, wherein: For a memory access unit with a size of 64 bytes, the front-end processing unit uses the lower 9 bits of m*se as the integer part rl of the remainder of m*se / sl.
10. The storage device according to claim 8, wherein: The front-end processing unit calculates (sl-rl). If the result of (sl-rl) is less than se, the front-end processing unit moves the memory access unit that contains the FTL entry start address corresponding to the accessed logical address and the memory access unit after the memory access unit to the FTL cache.
11. The storage device according to claim 5, wherein: The front-end processing unit calculates m*se / sm / sml to obtain the integer part dl of the quotient, and obtains the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table through the integer part dl of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, sm is the size of the storage unit in bits, and sml is the size of the memory access unit in storage units.
12. The storage device according to claim 5, wherein: The front-end processing unit calculates the memory access unit that accommodates the end address of the FTL entry corresponding to the accessed logical address. If the memory access unit that accommodates the end address is the same as the memory access unit that accommodates the storage address, the memory access unit that accommodates the storage address can completely accommodate the FTL entry.
13. The storage device according to claim 12, wherein: The front-end processing unit calculates m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address in the FTL table, where m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, and se is the size of the FTL entry in bits.
14. The storage device according to claim 1 or 2, wherein: The front-end processing unit calculates m*se / sm to obtain the integer part dm of the quotient, and obtains the storage address through the integer part dm of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sm is the size of the storage unit in bits.
15. The storage device according to claim 14, wherein: For a storage unit whose size is a 32-bit double word, the front-end processing unit discards or right-shifts the lower 5 bits of m*se to obtain the calculation result of m*se / sm.
16. The storage device according to claim 14, wherein: The front-end processing unit calculates the integer part rm of the remainder obtained by m*se / sm, and obtains the distance of the start address of the FTL entry corresponding to the accessed logical address in the storage unit relative to the start address of the storage unit through the integer part rm of the remainder.
17. The storage device according to claim 16, wherein: For a storage unit whose size is a 32-bit double word, the front-end processing unit uses the lower 5 bits of m*se as the integer part rm of the remainder m*se / sm.
18. The storage device according to claim 16, wherein: The front-end processing unit calculates (sm-rm). If the result of (sm-rm) is less than se, the front-end processing unit moves the storage unit containing the starting address of the FTL entry corresponding to the accessed logical address and the storage unit after the storage unit to the front-end processing unit.
19. The storage device according to claim 1 or 2, wherein: The front-end processing unit calculates the storage unit that accommodates the end address of the FTL entry corresponding to the accessed logical address. If the storage unit that accommodates the end address is the same as the storage unit that accommodates the storage address, the storage unit that accommodates the storage address can completely accommodate the FTL entry.
20. The storage device according to claim 19, wherein: The front-end processing unit calculates m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address in the FTL table.
21. The storage device according to claim 20, wherein: The front-end processing unit obtains the storage unit and the memory access unit accommodating from FTL entry m to FTL entry m+n according to the start address and the end address of the FTL entry corresponding to the n consecutive logical addresses being accessed.
22. The storage device according to claim 21, wherein: The starting address of the FTL entry in the FTL table in bits is m*se, and the ending address of the FTL entry m+n in the FTL table in bits is (m+n)*se+se-1.
23. The storage device according to claim 1 or 2, wherein: In response to the memory access unit being loaded into the FTL cache, the front-end processing unit records the logical address of the FTL entry accommodated by the memory access unit loaded into the FTL cache.
24. The storage device according to claim 23, wherein: The front-end processing unit compares the logical address to be accessed with the recorded logical address of the FTL entry contained in the access unit moved to the FTL cache. If the logical address to be accessed is within the range of the recorded logical addresses of the FTL entry contained in the cached access unit, the FTL entry corresponding to the logical address to be accessed is obtained from the FTL cache.
25. The storage device according to claim 23, wherein: The front-end processing unit calculates a first logical address corresponding to a first FTL entry at a starting address of a memory access unit loaded into the FTL cache, and determines whether the memory access unit can completely accommodate the first FTL entry; the front-end processing unit calculates a second logical address corresponding to a second FTL entry at a tail address of the memory access unit, and determines whether the memory access unit can completely accommodate the second FTL entry; the front-end processing unit records the FTL entries completely accommodated by the memory access unit.
26. The storage device according to claim 25, wherein: The front-end processing unit calculates l 1*sl / se, and the integer part de of the quotient indicates the first logical address corresponding to the first FTL entry located at the starting address of the memory access unit, wherein l 1 is the number of memory access units stored before the memory access unit l 1 among the multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
27. The storage device according to claim 26, wherein: The front-end processing unit calculates l 1*sl / se to obtain an integer part re of the remainder of the quotient. If re is 0, the memory access unit completely accommodates the first FTL entry.
28. The storage device according to claim 25, wherein: The front-end processing unit calculates (l 1*sl+sl-1) / se, and the integer part of the obtained quotient indicates the second logical address corresponding to the second FTL entry located at the end address of the memory access unit, wherein l 1 is the number of memory access units stored before the memory access unit l 1 among the multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
29. The storage device according to claim 28, wherein: The front-end processing unit calculates the integer part ree of the remainder obtained by (l 1*sl+sl-1) / se. If ree is se-1, the memory access unit l 1 completely accommodates the second FTL entry.
30. The storage device according to claim 26, wherein: The front-end processing unit transforms the calculation of l 1*sl / se into the calculation of (l 1*sl*2^j / se) / (2^j), where j is a relatively large integer that is easy to calculate.
31. The storage device according to claim 26, wherein: in, The front-end processing unit converts the division calculation in l 1*sl / se into multiplication and subtraction operations by calculating re=l 1*sl-de*se.
32. The storage device according to claim 24, wherein: The front-end processing unit calculates the difference d in bits between the start address of the FTL entry corresponding to the accessed logical address and the start address of the memory access unit, and the integer part of the quotient obtained by d / se indicates the number of FTL entries completely accommodated before the FTL entry in the memory access unit; the front-end processing unit calculates the difference a in bits between the end address of the FTL entry corresponding to the accessed logical address and the end address of the memory access unit, and the integer part of the quotient obtained by a / se indicates the number of FTL entries completely accommodated after the FTL entry in the memory access unit; The logical addresses of the FTL entry completely accommodated before the FTL entry to the FTL entry completely accommodated after the FTL entry in the access unit are recorded; wherein se is the size of the FTL entry in bits.
33. The storage device according to claim 1 or 2, further comprising: A host interface coupled to the front-end processing unit, wherein the host interface is used to exchange commands and data with a host.
34. The storage device according to claim 1 or 2, further comprising: Media interface for accessing NVM chips.
35. The storage device according to claim 1 or 2, wherein: The size of the FTL entry is different from an integer multiple of the storage unit size.
36. The storage device according to claim 1 or 2, wherein: The FTL cache is a memory inside the control component.
37. A method for accessing an FTL table entry, comprising the steps of: Get the logical address accessed by the IO command; Calculating a memory access unit in an external memory that accommodates an FTL entry corresponding to the accessed logical address according to the logical address accessed by the IO command, and loading the memory access unit into a cache; Calculate, according to the logical address accessed by the IO command, a first storage address of a storage unit that accommodates the FTL entry corresponding to the accessed logical address in the access unit moved to the cache relative to the start address of the FTL table; According to the first storage address of the storage unit in the memory access unit relative to the starting address of the FTL table, the storage unit that contains the FTL entry corresponding to the accessed logical address is moved to the memory access unit in the cache and the storage unit is obtained from the memory access unit in the cache to use the FTL entry; wherein the storage unit is aligned according to the boundary of the memory access unit, and the boundary of the FTL entry is not always aligned with the boundary of the storage unit.
38. The method for accessing an FTL table entry according to claim 37, wherein: The storage address of the memory access unit accommodating the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table is calculated, and the memory access unit is moved from the external memory to the cache according to the storage address.
39. The method for accessing an FTL table entry according to claim 38, wherein: Calculate m*se / sl to obtain the integer part dl of the quotient, and use the integer part dl of the quotient to obtain the storage address of the memory access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sl is the size of the memory access unit in bits.
40. The method for accessing an FTL table entry according to claim 39, wherein: For a memory access unit of 64 bytes, the lower 9 bits of m*se are discarded or right-shifted to obtain the calculation result of m*se / sl.
41. The method for accessing an FTL table entry according to claim 38 or 39, wherein: Calculate m*se / sl to obtain the integer part rl of the remainder, and use the integer part rl of the remainder to obtain the distance of the starting address of the FTL entry corresponding to the accessed logical address in the memory access unit in the FTL cache relative to the starting address of the memory access unit.
42. The method for accessing an FTL table entry according to claim 41, wherein: For a memory access unit of 64 bytes, the lower 9 bits of m*se are used as the integer part rl of the remainder of m*se / sl.
43. The method for accessing an FTL table entry according to claim 41, wherein: (sl-rl) is calculated. If the result of (sl-rl) is less than se, the memory access unit accommodating the start address of the FTL entry corresponding to the accessed logical address and the memory access unit next to the memory access unit are moved to the cache.
44. The method for accessing an FTL table entry according to claim 37, wherein: Calculate m*se / sm / sml to obtain the integer part dl of the quotient, and use the integer part dl of the quotient to obtain the storage address of the access unit that accommodates the FTL entry corresponding to the accessed logical address relative to the starting address of the FTL table, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, sm is the size of the storage unit in bits, and sml is the size of the access unit in storage units.
45. The method for accessing an FTL table entry according to claim 44, wherein: The memory access unit accommodating the end address of the FTL entry corresponding to the accessed logical address is calculated. If the memory access unit accommodating the end address is the same as the memory access unit accommodating the storage address, the memory access unit accommodating the storage address can completely accommodate the FTL entry.
46. The method for accessing an FTL table entry according to claim 45, wherein: Calculate m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address.
47. The method for accessing an FTL table entry according to claim 37, wherein: Calculate m*se / sm to obtain the integer part dm of the quotient, and obtain the storage address through the integer part dm of the quotient, wherein m is the number of FTL entries stored before the FTL entry corresponding to the accessed logical address in the FTL table, se is the size of the FTL entry in bits, and sm is the size of the storage unit in bits.
48. The method for accessing an FTL table entry according to claim 47, wherein: For a storage unit of 32-bit double word size, the lower 5 bits of m*se are discarded or right-shifted to obtain the calculation result of m*se / sm.
49. The method for accessing an FTL table entry according to claim 47, wherein: The integer part rm of the remainder obtained by calculating m*se / sm is used to obtain the distance of the start address of the FTL entry corresponding to the accessed logical address in the storage unit relative to the start address of the storage unit.
50. The method for accessing an FTL table entry according to claim 49, wherein: For a storage unit whose size is 32-bit double word, the lower 5 bits of m*se are used as the integer part rm of the remainder of m*se / sm.
51. The method for accessing an FTL table entry according to claim 49, wherein: (sm-rm) is calculated. If the result of (sm-rm) is less than se, the storage unit accommodating the start address of the FTL entry corresponding to the accessed logical address and the storage unit after the storage unit are obtained from the cache to use the FTL entry.
52. The method for accessing an FTL table entry according to claim 47, wherein: A storage unit accommodating an end address of an FTL entry corresponding to the accessed logical address is calculated. If the storage unit accommodating the end address is the same as the storage unit accommodating the storage address, the storage unit accommodating the storage address can completely accommodate the FTL entry.
53. The method for accessing an FTL table entry according to claim 52, wherein: Calculate m*se+se-1 to obtain the end address of the FTL entry corresponding to the accessed logical address.
54. The method for accessing an FTL table entry according to claim 53, wherein: The storage unit and the memory access unit accommodating from FTL entry m to FTL entry m+n are obtained according to the start address and the end address of the FTL entry corresponding to the n consecutive logical addresses being accessed.
55. The method for accessing an FTL table entry according to claim 54, wherein: The starting address m*se of the FTL entry in the FTL table in bits, and the ending address (m+n)*se+se-1 of the FTL entry m+n in the FTL table in bits.
56. The method for accessing an FTL table entry according to claim 37, wherein: After the memory access unit is loaded into the cache, the logical address of the FTL entry contained in the cached memory access unit is recorded; the method also includes: comparing the logical address to be accessed by the IO command with the recorded logical address of the FTL entry contained in the cached memory access unit, if the logical address to be accessed by the IO command is within the range of the recorded logical addresses of the FTL entry contained in the cached memory access unit, then obtaining the FTL entry corresponding to the logical address to be accessed by the IO command from the cache.
57. The method for accessing an FTL table entry according to claim 56, wherein: In response to loading the memory access unit into the cache, calculating a first logical address corresponding to the first FTL entry at a start address of the memory access unit; Determining whether the memory access unit completely accommodates the first FTL entry; Calculating a second logical address corresponding to a second FTL entry at the end address of the access unit; Determining whether the memory access unit completely accommodates the second FTL entry; Records the FTL entries that are completely contained in the access unit.
58. The method for accessing an FTL table entry according to claim 57, wherein: Calculate l 1*sl / se, and the integer part de of the quotient indicates the first logical address corresponding to the first FTL entry located at the starting address of the memory access unit, wherein l 1 is the number of memory access units stored before the memory access unit l 1 among the multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
59. The method for accessing an FTL table entry according to claim 57, wherein: Calculate l 1*sl / se to obtain the integer part re of the remainder of the quotient. If re is 0, the memory access unit l 1 completely accommodates the first FTL entry, wherein l 1 is the number of memory access units stored before the memory access unit l 1 among the multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
60. The method for accessing an FTL table entry according to claim 57, wherein: Calculate (l 1*sl+sl-1) / se, and the integer part of the quotient indicates the second logical address corresponding to the second FTL entry located at the end address of the access unit l 1, wherein l 1 is the number of access units stored before the access unit l 1 among the multiple access units storing the FTL table, sl is the size of the access unit in bits, and se is the size of the FTL entry in bits.
61. The method for accessing an FTL table entry according to claim 60, wherein: Calculate the integer part ree of the remainder obtained by (l 1*sl+sl-1) / se. If ree is se-1, the memory access unit l 1 completely accommodates the second FTL entry, wherein l1 is the number of memory access units stored before the memory access unit l 1 in the multiple memory access units storing the FTL table, sl is the size of the memory access unit in bits, and se is the size of the FTL entry in bits.
62. The method for accessing an FTL table entry according to claim 58 or 59, wherein: in, Transform l 1*sl / se into (l 1*sl*2^j / se) / (2^j), where j is a relatively large integer that is easy to calculate.
63. The method for accessing an FTL table entry according to claim 60, wherein: By re=l 1*sl-de*se, the division calculation in l1*sl / se is converted into multiplication and subtraction operations.
64. The method for accessing an FTL table entry according to claim 56 or 57, wherein: In response to loading the memory access unit into the cache, calculating the difference d in bits between the start address of the FTL entry corresponding to the accessed logical address and the start address of the memory access unit, d / se, the integer part of the quotient indicating the number of FTL entries completely accommodated in the memory access unit before the FTL entry; Calculate the difference a in bits between the end address of the FTL entry corresponding to the accessed logical address and the end address of the access unit, and the integer part of the quotient obtained by a / se indicates the number of FTL entries completely accommodated after the FTL entry in the access unit; Recording the logical addresses of the FTL entry completely accommodated before the FTL entry to the FTL entry completely accommodated after the FTL entry in the access unit; where se is the size of the FTL entry in bits.
