This application claims foreign priority under 35 U.S.C. §119 to Korean Patent Application No. P2007-0012198 (Atty. Dkt. ID-200610-028), filed on Feb. 6, 2007, in the Korean Intellectual Property Office, the disclosure of which is incorporated by reference herein in its entirety.
The present disclosure generally relates to flash memory systems. More particularly, the present disclosure relates to flash memory systems with mapping tables.
Emerging portable electronic devices, such as computers, digital cameras, digital music players, cellular telephones, personal data assistants, and the like, have made increasing use of flash memories, particularly flash cards. A flash card may be a SSD, SD card, MMC, Memory Stick, or an embedded card such as moviNAND, GBNAND, iNAND and the like.
Hosts generally communicate with flash memories using a flash translation layer (“FTL”). The FTL may include firmware stored in a controller or a flash memory. The FTL is generally used to effectively manage the flash card.
An address mapping operation is a function of the FTL, which receives a logical address (“LA”) from the host and then translates the received LA into a physical address (“PA”), The PA is the address that is actually used to store data within the flash memory and to retrieve data from the flash memory.
An address mapping table may be used to facilitate the address conversion. The table may be stored in the flash memory, and loaded into a buffer within a controller, for example. Logical addresses and corresponding physical addresses are correlated within the table. The size of the table is dependant upon a defined mapping unit. The larger the table size, the greater the required buffer size. Typical mapping units include blocks, which are generally the size of erase units, or pages, which are generally the size of read/write units.
There are several mapping methods usable in correspondence with various mapping units. In a page mapping method, a mapping table is commonly sized for page units. That is, a logical page of data addresses is converted into a corresponding physical page. Here, one memory block may include several tens or hundreds of pages. Unfortunately, this method requires mapping tables of dramatically larger sizes than a block mapping method, for example.
In a block mapping method, a mapping table is commonly sized for block units. Here, pages must be written in sequential order within a block. Unfortunately, a large number of merge operations are required in order to create a free block when using such a method.
These and other issues are addressed by a system and method for memory mapping. Exemplary embodiments are provided.
An exemplary method of memory mapping includes receiving write data for a logical unit number from a host, determining which of a plurality of data block groups comprises the logical unit number, and storing the write data in any unfilled log unit of a log block group corresponding to the determined data block group.
Another exemplary method further includes receiving a write request for a second logical unit number from the host, and storing the second logical unit number in association with a second physical unit number in the log block of the log block group.
An exemplary memory mapping system includes input means for receiving write data for a logical unit number from a host, mapping means for determining which of a plurality of data block groups comprises the logical unit number, and memory means for storing the write data in any unfilled log unit of a log block group corresponding to the determined data block group.
An exemplary memory mapping system includes at least one logical unit to physical unit map table, a plurality of data unit groups in signal communication with the at least one map table, and a plurality of log unit groups, each associated with a corresponding one of the plurality of data unit groups, wherein updated data for any data unit within one of the plurality of data unit groups is stored in any log unit within the corresponding one of the plurality of log unit groups.
The present disclosure will be further understood from the following description of exemplary embodiments, which is to be read in connection with the accompanying drawings.
The present disclosure provides a system and method for memory mapping in accordance with the following exemplary figures, in which:
As shown in
Turning to
The flash card 220 includes a controller 230 in signal communication with a flash memory 250. The host 210 communicates with the flash memory 250 using a flash translation layer (“FTL”), which may include logic and/or firmware used to effectively manage the card 220. The FTL may be stored or implemented in the controller 230 or in the flash memory 250.
The controller 230 includes a host interface 231 in signal communication with a controller bus 232, a flash interface 233 in signal communication with the controller bus 232, a buffer memory 235 in signal communication with the controller bus 232, a CPU 237 in signal communication with the controller bus 232, and a ROM 239 in signal communication with the controller bus 232.
In operation, an address mapping operation is a function of the FTL, which receives a logical address (“LA”) from the host 210, and then translates the received LA into a physical address (“PA”). The PA is the address that is actually used to store data within the flash memory 250. An address mapping table may be used to facilitate the LA to PA address conversion. Logical addresses and corresponding physical addresses are correlated within the table. The table may be stored in the flash memory 250 and loaded to the buffer 235 within the controller 230. The size of the table is dependant upon a defined mapping unit.
Turning now to
The flash memory 330 includes a data region 331, which here includes data blocks having physical block numbers (“PBN”) 100, 101, 102, 103104, 105, 206, 303, . . . , 900, 901, 902 and 903. The flash memory 330 also includes a log region 332, which here includes log blocks having PIBNs 300, 400 and 500. The flash memory 330 further includes a free region 333, which here includes free blocks 600, 601, 602 and 603. In addition, the flash memory 330 includes a meta region 334.
In operation, a hybrid mapping method may be used for mapping addresses in flash card systems, for example. In the hybrid mapping method, the mapping table may correlate logical addresses with physical addresses for both page units and block units. When the hybrid mapping method is used for page mapping of log blocks and block mapping of data blocks, the size of table and the number of merge operations may each be reduced.
When performing a write operation, for example, page data to be stored in a designated data block is first stored in an assigned log block. If there are no free blocks to be used as the log block, the FTL performs a merge operation. In the merge operation, page data in the log block and page data in the data block corresponding to the log block are stored or copied into a new data block. The mapping information changed during the operations is stored in a meta block. The log block and the old data block may be safely erased once the contents are assigned to other blocks.
As shown in
This method uses many page copy and block erase operations Assuming that one block consists of four pages, four page copy operations and two block erase operations are required per one merge operation. Further, this method has low page use rates within log blocks. The log block 300 uses only three pages out of 4 pages before it is converted to a free block by merge. The many copy and erase operations for frequent merge operations, and the low page usage rates, lead to a decrease in the overall performance of the card system.
Turning to
The flash memory 530 includes a data region 531, which here includes data blocks having physical block numbers (“PBN”) 100, 101, 102, 103, 104, 105, 206, 303, . . . , 900, 901, 902 and 903. The data blocks are distributed among data block groups. The flash memory 530 also includes a log region 532, which here includes log blocks having PBNs 300, 400 and 500. The log blocks are distributed among log block groups. The flash memory 530 further includes a free region 533, which here includes free blocks 600, 601, 602 and 603. In addition, the flash memory 530 includes a meta region 534.
In operation, a log block group (“LBG”) is assigned to a data block group (“DBG”) in a group mapping method. The LBG and DBG include a plurality of log blocks and a plurality of data blocks, respectively. Here, LBG1 consists of log blocks 300 and 4001 and is assigned to DBG1. DBG1 consists of data blocks 100, 101, 102 and 103. Thus, data programmed to data blocks 100-103 is first programmed to log block 300 or 400. Each log block within a LBG can be assigned to any or all data blocks within an assigned DBG. The number of blocks within each DBG or LBG is variable. By the group mapping method, the number of merge operations may be reduced, and the average page use rate within log blocks may be improved.
Turning now to
Thus, PBN300 of LBG1 has PPNs 1200-1203 correlated with LPNs 3, 4, 11 and 12, respectively. PBN400 of LBG1 has PPNs 1600-1601 correlated with LPNs 13 and 14, respectively, LBGS is correlated with DBG1. PBN100 of DBG1 has PPNs 1-4 correlated with LPNs 0-3. PBN101 of DBG1 has PPNs 1-4 correlated with LPNs 4-7. PBN102 of DBG1 has PPNs 1-4 correlated with LPNs 8-11. PBN103 of DBG1 has PPNs 1-4 correlated with LPNs 12-15.
In addition, PBN500 of LBG2 has PPNs 2000-2003 correlated with LPNs 17-20, respectively, LBG2 is correlated with DBG2. PBN104 of DPG2 has PPNs 1-4 correlated with LPNs 16-19. PBN105 of PBG2 has PPNs 1-4 correlated with LPNs 20-23. PBN206 of DPG2 has PPNs 1-4 correlated with LPNs 24-27. PBN303 of DBG2 has PPNs 1-4 correlated with LPNs 28-31.
Thus, the block mapping table 610 converts a logical block number (“LBN”) to a physical block number (“PBN”). The group mapping table 620 has mapping information between each DPG and PBNs of log blocks corresponding to the DBG. The page mapping table 630 has mapping information among each DGB, LPNs and corresponding PPNs.
In operation of this exemplary group mapping embodiment, write requests for LPNs 3 and 4 are received from the host. The FTL assigns a log block 300 from the free blocks and creates LBG1 corresponding to DBG1. The FTL enrolls the log block 300 in the group mapping table. The log block 300 may be assigned to all data blocks within the DPG1. Here. LPNs 0-15 can be stored in the log block 300. LPNs 3 and 4 are stored in PPNs 1200 and 1201 of the log block 300. The mapping information is stored in the page mapping table.
Next, write requests for LPNs 11-14 are received from the host. LPNs 11 and 12 are stored in PPNs 1202 and 1203 of the previously assigned log block 300. The page mapping table 630 is updated according to the new mapping information.
A new log block 400 is additionally assigned to the LBG1 to store LPNs 13 and 14. The FTL enrolls the log block 400 in the group mapping table 620. LPNs 13 and 14 are stored in PPNs 1600 and 1601 of the log block 400, and the PMT 630 is updated. Write requests arrive for LPNs 17-20 from the host.
The LPNs 17-20 cannot be stored in the log block 400 because they don't belong to DBG1. The FTL assigns a new log block 500 from the free blocks, and creates LBG2 corresponding to DBG2. The FTL enrolls the log block 500 in the group mapping table 620. The LPNs 16-31 can be stored in the log block 500. LPNs 17-20 are stored in PPNs 2000-2001 of the log block 500, and the PMT 630 is updated.
The page use rates of log blocks improve using the group mapping method. This in contrast to conventional methods in which the log block 300 might use only one page, such as PPN 1200, for example. In the present embodiment, the log block 300 uses all pages, such as PPN 1200-1203, because one log block is assigned to all data blocks within a data block group. In addition, the number of merge operations is reduced in correspondence with the higher page use rates of the log blocks. Further, the number of copy and erase operations is reduced, and system performance improves.
As shown in
The user data area 720 includes data blocks 722-726. A data block 725 includes logical page numbers 0, 1, 2 and 3. In operation, a merge operation combines the data block 725 with the write buffer block 719 to form a new data block 726. Here, the new data block 726 includes logical page numbers 0, 1′, 2 and 3′.
Turning to
In operation, logical page number (“LPN”) 1 initially corresponds to physical page number (“PPN”) 2. New PPN 5 is written in the flash memory 870, and the table 810 is updated to associate LPN 1 with PPN 5. This may be referred to as out-of-place mapping. An updating page may be written to a different location of a new block. A page map table update uses a relatively large map table size as overhead. For example, a 128 KB map table is used for a 128 MB NAND flash memory.
Turning now to
In operation, physical page number (“PPN”) 2 is updated as PPN 2′ in the flash memory 970. This may be referred to as in-place mapping. Here, the updating page is written to the same location of a new block and the block map table is updated. There is copy overhead during write operation when an out-of-place page update causes a block copy operation.
As shown in
The page map table 1010 includes logical page numbers 1030 and corresponding physical page numbers 1050. The block map table 1020 includes logical block numbers 1040 and corresponding physical block numbers 1060. A logical block number 1032 is used to look up the corresponding physical block number.
In operation, a logical block number 1032 is used to look up the corresponding physical block number in the block mapping table 1020, or a logical page number 1052 is used to look up the corresponding physical page number in the page mapping table 1010.
For example, page mapping may be used for a write buffer or log block, while block mapping may be used for a data block. When a logical page number 1 initially corresponds with a physical page number 2 in the log block 1070, the page map table 1010 may be updated to switch logical page number 1 to correspond to physical page number 4. The block map table may be updated when the log block 1070 is used to write to the data block 1080.
Turning to
Turning now to
As shown in
Turning to
Turning now to
The physical block and page numbers correspond to physical blocks 1570-1573 and their pages within a physical storage device or flash memory. Here, a physical block number such as 101 from the block map table 1520 points to a physical block 1570, and physical page numbers such as 1, 0, 2 and 3 from the page map table 1510 point to physical pages within the block 1570. The blocks and pages that are directly indicated in the map tables are primary units, and each primary unit may have one additional log unit associated with it to record updates. Thus, primary blocks 1570 and 1571 may be associated with log blocks 1572 and 1573, respectively. That is, each map table entry may correspond with one or two physical units.
As shown in
The physical block and page numbers correspond to physical blocks 1670-1675 and their pages within a physical storage device or flash memory. Here, a physical block number such as 101 from the block map table 1620 points to a physical block 1670, and physical page numbers such as 1, 0, 2 and 3 from the page map table 1610 point to physical pages within the block 1670. The blocks and pages that are directly indicated in the map tables are primary units, and each primary unit may have up to N additional log units associated with it to record updates. Thus, primary block 1671 may be associated with log blocks 1673, 1675 . . . . That is, each mapping table entry may correspond with from one to N physical units. The 1:N mapping structure 1600 uses a delayed merge of the log blocks with the data blocks.
Turning to
The physical block and page numbers correspond to physical blocks 1769-1775 and their pages within a physical storage device or flash memory. Here, a physical block number such as 101 from the block map table 1720 points to a physical block 1770, and physical page numbers such as 1, 0, 2 and 3 from the page map table 1710 point to physical pages within the block 1770. The blocks and pages that are directly indicated in the map tables are primary units, and each primary unit may be associated with up to K additional chained or grouped log units to record updates. The additional chained or grouped log units may be shared by up to N primary units. In addition, there may be up to M distinct chains or groups of additional log units. Thus, primary blocks 1771 and 1772, which here have physical block numbers 0 and 1 respectively, may both be associated with chained or grouped log blocks 1783 and 1785. In addition, primary blocks 1769 and 1770, which here have physical block numbers 101 and 102, respectively, may both be associated with log block 1780, for example. The N:M+K mapping structure 1700 uses associativity of the log blocks among the data blocks as well as a delayed merge of the log blocks with the data blocks. Here, N is the number of whole user data blocks, M is the number of write buffer or log blocks, and K is the maximum number of delayed merge or log blocks in a log block group (“LBG”), which may be dynamically controlled. A data block group (“DBG”) is associated with each LBG. In this example, each DBG includes two data blocks, but a DOB may include any number of data blocks in alternate embodiments.
A memory “block” is generally the size of an erase unit, and a memory “page” is generally the size of a read/write unit. It shall be understood by those of ordinary skill in the pertinent art that alternate embodiments may use alternate memory unit, block and/or page sizes, which are not limited to those described in the exemplary embodiments. Sectors or other units of arbitrary size may be used in lieu of the units, blocks and/or pages described herein. In hybrid mapping embodiments, for example, it may be preferable to use page mapping for the write buffer or log units, and to use block mapping for the data units, but alternate embodiments may use two or more alternate sized mapping units.
Although illustrative embodiments have been described herein with reference to the accompanying drawings, it is to be understood that the present disclosure is not limited to those precise embodiments, and that various other changes and modifications may be effected therein by those of ordinary skill in the pertinent art without departing from the scope or spirit of the present disclosure. All such changes and modifications are intended to be included within the scope of the present disclosure as set forth in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
P2007-0012198 | Feb 2007 | KR | national |