A method for increasing the capacity of Flash chip
By establishing a public good page template mapping relationship with large capacity and stability in the Flash chip, the problem of low capacity caused by different good page templates in each block is solved, the effective capacity of NandFlash is improved, the data reading and storage time is saved, and the data storage time is reduced. Control costs.
Patent Information
- Application Number
- CN202110247493.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-05
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-03-05
AI Technical Summary
The good page template BPM in each block in the existing flash chip is different, resulting in the common good page template CBPM being too small, resulting in the problem of low effective capacity.
By scanning and detecting all blocks, a certain block obtained based on the criteria of large capacity and stability is used as the public good page template CBPM. The mapping relationship between the current block good page template BPM and the public good page template CBPM is established to form a smaller than Equivalent to a 32-byte mapping table to increase the capacity of the Flash chip and eliminate the need to read multiple tables during storage, saving data reading and storage time.
It is realized that even if the good page template BPM of each block is different, a larger common good page template CBPM can be obtained, which increases the available capacity of NandFlash, reduces management overhead, and controls the main control cost while ensuring performance.
Smart Images

Figure CN113051191B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Flash chips, and in particular to a method for increasing the capacity of a Flash chip. Background Art
[0002] FLASH chip is a widely used storage material that can quickly store and erase data, such as solid-state hard drives.
[0003] At present, each valid block of a FLASH chip has a page template. The good page template of each block is referred to as BPM (Block Page Mask). The BPM of n blocks is counted, and the common good page template of n blocks is obtained based on the maximum capacity and stability as the standard, referred to as CBPM (Common Block Page Mask). Generally, the more similar the BPM is and the larger the CBPM is, the larger the capacity of the FLASH chip is; conversely, the smaller the capacity of the FLASH chip is.
[0004] With respect to the above-mentioned related technologies, the inventors believe that there is a defect that the good page template BPM in each block of the FLASH chip is different and the public good page CBPM is too small, resulting in a low effective capacity of the FLASH chip. Summary of the invention
[0005] In order to solve the problem that the good page template BPM in each block of the FLASH chip is different and the public good page CBPM is too small, resulting in low effective capacity of the FLASH chip, the present application provides a method for increasing the capacity of the Flash chip.
[0006] A method for increasing the capacity of a Flash chip provided in this application adopts the following technical solution:
[0007] A method for increasing the capacity of a Flash chip, comprising:
[0008] By scanning and detecting all blocks, a block with large capacity and stability is obtained as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established to improve the Flash chip capacity.
[0009] By adopting the above technical solution, all blocks are scanned and detected, and a block obtained with large capacity and stability as the standard is used as a public good page template CBPM, and a mapping relationship between the current block good page template BPM and the public good page template CBPM is established, so that even if the good page template BPM of each block is different, a larger public good page template CBPM can be obtained, and the available capacity of NandFlash is finally improved; and in this application, a block in the Flash chip is used as the public good page template CBPM, and only a total mapping table needs to be established to restore the state of each block during specific storage, without reading and processing multiple tables, thereby saving data reading and storage time.
[0010] Preferably, when establishing the mapping relationship, the position of the bad page in the current block relative to the bad page in the common good page template CBPM and the position of the good page template in each block that is not in the common good page template are recorded.
[0011] By adopting the above technical solution, it is possible to adapt to the current mainstream flash memory management algorithm, so that the available capacity of NandFlash can be increased, and the impact on the mainstream algorithm is very small. The current USB 2.0 firmware architecture is managed based on CBPM. In this architecture, if the setting method of this application is not adopted, the change will be relatively large to deal with the problem of CBPM being too small, and special mass production tools are required. In addition, through the above technical solution of this application, a large amount of NandFlash management overhead is reduced.
[0012] Preferably, by scanning and detecting all blocks, a certain block obtained with large capacity and stability as the standard is used as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established to form a mapping table, and the number of bytes in the mapping table is less than or equal to 32 bytes. In this way, the main control cost can be better controlled under the premise of ensuring performance. When the number of bytes in the mapping table is greater than 32 bytes, it means that more pages with differences are allowed, resulting in reduced stability of the storage device. In addition, when the number of bytes in the mapping table is greater than 32 bytes, the occupied RAM space will increase when it is used, resulting in an increase in the main control cost.
[0013] Preferably, the first two bytes of the mapping table correspond to the address of each block in the Flash chip, and the following two bytes map the position of the bad page in the current block relative to the bad page in the common good page template CBPM, as well as the position of the good page template in each block that is not in the common good page template.
[0014] By adopting the above technical solution, each block information has a mapping table that includes both the block address and the difference between the current BPM and CBPM. It only needs to expand the original storage space of the block address by two bytes without establishing a new table, thereby further saving data reading and storage time.
[0015] In the aforementioned method of increasing the Flash chip capacity, the Flash chip capacity is calculated using the following formula:
[0016] Valid Capacity = n*m*Kbyte
[0017] Among them, Valid Capacity indicates the real capacity of the Flash chip, n indicates the number of good blocks in the Flash chip, m indicates the number of good page templates in the CBPM, and Kbyte indicates the byte size of each page.
[0018] By adopting the above technical solution, the real capacity of NandFlash can be calculated. By adopting the above technical solution, the number of good pages in the common good page template CBPM is increased, thereby ultimately increasing the real capacity of NandFlash.
[0019] In summary, the present application includes at least one of the following beneficial technical effects:
[0020] 1. By scanning and detecting all blocks, a block with large capacity and stability as the standard is obtained as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established, so that even if the good page template BPM of each block is different, a larger common good page template CBPM can be obtained, and the available capacity of NandFlash is finally improved; and in this application, a block in the Flash chip is used as the common good page template CBPM, and only a total mapping table needs to be established to restore the state of each block during specific storage, without reading and processing multiple tables, thereby saving data reading and storage time.
[0021] 2. In this application, the number of bytes of the mapping table is less than or equal to 32 bytes, so that the main control cost can be better controlled under the premise of ensuring performance. When the number of bytes of the mapping table is greater than 32 bytes, it means that more pages with differences are allowed, resulting in reduced stability of the storage device. In addition, when the number of bytes of the mapping table is greater than 32 bytes, the occupied RAM space will increase when it is used, resulting in increased main control costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1This is a schematic diagram of the CBPM to BPM mapping in the embodiment of the present application.
[0023] Figure 2 It is a block diagram of NandFlash in two cases in the experimental example. DETAILED DESCRIPTION
[0024] The following is combined with Figure 1-2 This application is described in further detail.
[0025] The present application embodiment discloses a method for increasing the capacity of a Flash chip. A method for increasing the capacity of a Flash chip includes:
[0026] By scanning and detecting all blocks, a block with large capacity and stability is obtained as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established to improve the Flash chip capacity.
[0027] Optionally, when establishing a mapping relationship, the position of the bad page in the current block relative to the bad page in the common good page template CBPM and the position of the good page template in each block that is not in the common good page template are recorded.
[0028] Optionally, by scanning and detecting all blocks, a block with large capacity and stability is obtained as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established to form a mapping table, and the number of bytes in the mapping table is less than or equal to 32 bytes.
[0029] Optional, such as Figure 1 As shown, the first two bytes of the mapping table correspond to the address of each block in the Flash chip, and the following two bytes map the position of the bad page in the current block relative to the bad page in the common good page template CBPM and the position of the good page template in each block that is not in the common good page template.
[0030] Optionally, the Flash chip capacity is calculated using the following formula:
[0031] Valid Capacity = n*m*Kbyte
[0032] Among them, Valid Capacity indicates the real capacity of the Flash chip, n indicates the number of good blocks in the Flash chip, m indicates the number of good page templates in the CBPM, and Kbyte indicates the byte size of each page.
[0033] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
[0034] Experimental example:
[0035] Assume that NandFlash exists as Figure 2 There are two situations:
[0036] Case 1:
[0037] The BPM of Block0 is 0, 2, 3, ... (M-1)
[0038] The BPM of Block1 is 0, 2, 3, ... (M-1)
[0039] The BPM of Block(N-1) is also 0, 2, 3, ... (M-1)
[0040] Therefore, CBPM is: 0, 2, 3, … (M-1);
[0041] The actual capacity of NandFlash is:
[0042] Valid Capacity = n*m*Kbyte
[0043] Among them, the number of good blocks in the Flash chip is n=N, and the number of good page templates in the CBPM is m=M-1 (the first page is a bad page, so it is M-1).
[0044] From the above content, we can know that in Case 1, the bad page in each block is the first page, and the bad page position is the same (that is, the BPM is the same), so the final CBPM is large and the effective capacity of NandFlash is large.
[0045] Case 2:
[0046] The BPM of Block0 is 1, 2, 3, ... (M-1)
[0047] The BPM of Block1 is 0, 2, 3, ... (M-1)
[0048] The BPM of Block2 is 0, 1, 3, ... (M-1)
[0049] The BPM of Block(N-1) is 0,1,2,3,…,(N / M-1)
[0050] Therefore: CBPM is 0 and the actual capacity of NandFlash is 0.
[0051] From this we can see that in Case 2, if there is still one page error in each block, but the page positions are not fixed, then each BPM is different, and the resulting CBPM is very small, which ultimately leads to a very small effective capacity of NandFlash.
[0052] The method of the present application can effectively solve the problem of Case 2 where the BPM is different and the CBPM is too small, resulting in low effective capacity.
[0053] In Case 2, if the BPM of Block 0 is used as the CBPM, a mapping table is established between the current block good page template BPM and the common good page template CBPM. The information of each block in the established mapping table is shown in Table 1.
[0054] Table 1
[0055]
[0056] According to the real capacity formula of NandFlash:
[0057] Valid Capacity = n*m*Kbyte
[0058] At this time, the number of good blocks in the Flash chip n=N, the number of good page templates in the CBPM m=M-1, and the effective capacity is the same as Case 1, thereby greatly improving the effective capacity of NandFlash.
[0059] Assuming that the BPM of Block0 is still used as the CBPM, a mapping relationship table is established between the current block good page template BPM and the public good page template CBPM. At this time, the bad pages of Block0 are 0 and 1, and the bad pages of Block1 are 2 and 3; then in the corresponding mapping table, the mapping part corresponding to Block1 records: 2 0 3 1. And so on.
[0060] Usually, the block address of each block in the Flash chip is represented by 2 bytes. In this application, each block can be represented by 32 bytes, the first 2 bytes represent the block address, and the last 30 bytes record the mapping relationship between CBPM and BPM. Each 2 bytes represents the difference of a page.
Claims
1. A method for increasing the capacity of a Flash chip, characterized in that: include: By scanning and detecting all blocks, taking a certain block as a common good page template CBPM, and establishing a mapping relationship between the current block's good page template BPM and the common good page template CBPM, the Flash chip capacity can be improved; wherein, all the blocks have a bad page, and the positions of the bad pages are completely different; when establishing the mapping relationship, the position of the bad page in the current block relative to the bad page in the common good page template CBPM and the position of the good page template in each block that is not in the common good page template are recorded.
2. The method for increasing the capacity of a Flash chip according to claim 1, characterized in that: By scanning and detecting all blocks, a certain block is used as a common good page template CBPM, and a mapping relationship between the current block good page template BPM and the common good page template CBPM is established to form a mapping table, wherein the number of bytes of the mapping table is less than or equal to 32 bytes.
3. The method for increasing the capacity of a Flash chip according to claim 2, characterized in that: The first two bytes of the mapping table correspond to the address of each block in the Flash chip, and the following two bytes map the position of the bad page in the current block relative to the bad page in the common good page template CBPM and the position of the good page template in each block that is not in the common good page template.
4. The method for increasing the capacity of a Flash chip according to any one of claims 1 to 3, characterized in that: The Flash chip capacity is calculated using the following formula: Valid Capacity = n*m*Kbyte Among them, Valid Capacity indicates the real capacity of the Flash chip, n indicates the number of good blocks in the Flash chip, m indicates the number of good page templates in the CBPM, and Kbyte indicates the byte size of each page.
Citation Information
Patent Citations
Large-capacity Flash chip space management method
CN104317732A
Method for reducing memory resource occupation of mapping tables in hybrid mapping algorithm
CN106354658A
3D Nand Flash scanning detection method and system
CN107481764A
Methods for managing blocks in flash memories
US20090271567A1
Online Systems and Methods for Advancing Information Organization Sharing and Collective Action
US20160188201A1
