MEMORY SYSTEM AND CONTROL METHOD THEREOF
The memory system optimizes parity generation by determining a smaller subset of data for parity after writing a collective amount, reducing memory requirements and improving efficiency.
Patent Information
- Application Number
- JP2021043664
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-17
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-03-17
AI Technical Summary
Existing memory systems require a significant amount of memory for parity generation, which increases cost and power consumption.
A memory system that determines a smaller subset of data for parity generation after completing data write operations, reducing the memory required for parity storage by generating parity only after a collective amount of data is written, and using pipeline processing for efficient parity generation.
Reduces the memory size needed for parity generation, lowering costs and power consumption while maintaining performance by optimizing parity generation conditions.
Smart Images

Figure 0007566673000001 
Figure 0007566673000002 
Figure 0007566673000003
Abstract
Description
[Technical field]
[0001] The present embodiment relates to a memory system and a control method thereof. [Background technology]
[0002] Systems including nonvolatile memories are known. The memory system writes data to the nonvolatile memory and reads data from the nonvolatile memory. An error may occur in the data read from the nonvolatile memory. For this reason, parity may be used to detect and correct the error that has occurred. The parity is generated when data is written to the nonvolatile memory. A memory other than the nonvolatile memory may be used for calculations related to the generation of the parity. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] US Patent Application Publication No. 2015 / 194984 [Patent Document 2] US Patent Application Publication No. 2016 / 34227 [Patent Document 3] US Patent Application Publication No. 2017 / 24276 Summary of the Invention [Problem to be solved by the invention]
[0004] The present embodiment provides a memory system capable of reducing the size of the memory used to generate parity and a control method thereof. [Means for solving the problem]
[0005] According to the present embodiment, the memory system includes a non-volatile memory and a controller. The controller controls the non-volatile memory. The controller transmits data to the non-volatile memory. The first amount Write the data, determining a second amount of data that is included in the first amount of data and is subject to parity generation, the second amount of data being less than the first amount; After the write is complete, The second amount Data is read from non-volatile memory and The second amount Parity corresponding to the data is generated, and the generated parity is written to memory for storing parity. [Brief description of the drawings]
[0006] [Figure 1] 1 is a block diagram showing an example of the configuration of a memory system according to a first embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of the configuration of a memory according to the first embodiment. [Diagram 3] FIG. 4 is a diagram showing an example of the configuration of a portion of a block. [Figure 4] FIG. 2 is a diagram showing an example of a relationship between blocks and planes in a memory according to the first embodiment. [Diagram 5] FIG. 2 is a diagram showing an example of a frame configuration according to the first embodiment. [Figure 6] FIG. 2 is a diagram showing an example of a logical block and a parity storage unit according to the first embodiment. [Figure 7] 11 is a flowchart showing an example of a frame write process and a parity generation process according to the first embodiment. [Figure 8] FIG. 11 is a diagram showing an example of garbage collection processing according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] Each embodiment will be described below with reference to the drawings. In the following description, the same reference numerals are used for substantially or substantially the same functions and components, and duplicated descriptions will be provided only when necessary. The numerical values and the number of components described in the present embodiment are examples and can be changed as appropriate.
[0008] (First embodiment) FIG. 1 is a block diagram showing an example of the configuration of a memory system 1 according to the first embodiment.
[0009] The memory system 1 is, for example, a solid state drive (SSD). The memory system 1 may be any of various types of storage devices, such as a universal flash storage (UFS) device, a universal serial bus (USB) memory, a memory card, a hybrid storage system including a hard disk drive and an SSD, etc. The memory system 1 is capable of communicating with a host device (for example, an external information processing device) 2.
[0010] The memory system 1 includes a non-volatile memory device 3 and a controller 4 .
[0011] The nonvolatile storage device 3 includes nonvolatile memories NM00 to NM33. When there is no need to distinguish between the memories NM00 to NM33 below, each of the nonvolatile memories NM00 to NM33 will also be simply referred to as memory NM.
[0012] Each of the memories NM00 to NM33 may be a non-volatile semiconductor memory having a storage section with a two-dimensional or three-dimensional structure. Each of the memories NM00 to NM33 may be a memory chip.
[0013] Specifically, the memories NM00 to NM33 may be, for example, a NAND flash memory, or may be, for example, any of a NOR flash memory, a Magnetoresistive Random Access Memory (MRAM), a Phasechange Random Access Memory (PRAM), a Resistive Random Access Memory (ReRAM), and a Ferroelectric Random Access Memory (FeRAM).
[0014] The memories NM00 to NM33 are grouped into banks Bk0, Bk1, Bk2, and Bk3. In the following, when there is no need to distinguish between the banks Bk0 to Bk3, they will simply be referred to as banks Bk.
[0015] Bank Bk0 corresponds to memories NM00, NM10, NM20, and NM30. Bank Bk1 corresponds to memories NM01, NM11, NM21, and NM31. Bank Bk2 corresponds to memories NM02, NM12, NM22, and NM32. Bank Bk3 corresponds to memories NM03, NM13, NM23, and NM33.
[0016] Furthermore, the memories NM00 to NM33 are grouped into channels Ch0, Ch1, Ch2, and Ch3.
[0017] Each of the memories NM00 to NM03 is connected to the bus Bu0. The memories NM00 to NM03 correspond to the channel Ch0.
[0018] Each of the memories NM10 to NM13 is connected to the bus Bu1. The memories NM10 to NM13 correspond to the channel Ch1.
[0019] Each of the memories NM20 to NM23 is connected to the bus Bu2. The memories NM20 to NM23 correspond to the channel Ch2.
[0020] Each of the memories NM30 to NM33 is connected to the bus Bu3. The memories NM30 to NM33 correspond to the channel Ch3.
[0021] Each of the memories NM00 to NM33 includes a plane PL0 and a plane PL1. The controller 4 can write or read data in parallel to the plane PL0 and the plane PL1 included in a certain memory NM. Hereinafter, when there is no need to distinguish between the planes PL0 and PL1, they will simply be referred to as planes PL.
[0022] The controller 4 executes control over the memories NM00-NM33 in accordance with commands received from the host device 2. Furthermore, the controller 4 executes control over the memories NM00-NM33 as background processing even if it does not receive commands from the host device 2. More specifically, the controller 4 controls writing of data to the nonvolatile storage device 3 and controls reading of data from the nonvolatile storage device 3.
[0023] The controller 4, for example, executes control for garbage collection of the memories NM00 to NM33 included in the nonvolatile storage device 3. Garbage collection is, for example, a process of collectively relocating (or rewriting) data that is arranged (or stored) in a garbage collection source block in the memories NM00 to NM33 to a garbage collection destination block, and invalidating the data in the garbage collection source block. Note that garbage collection may also be expressed as compaction.
[0024] In the first embodiment, in a data write process, the controller 4 writes data to the non-volatile memory device 3, and after the write is completed, reads the written data from the non-volatile memory device 3, generates parity corresponding to the read data, and writes the generated parity in a non-volatile state to a memory for storing parity, such as the non-volatile memory device 3.
[0025] In a data read process, the controller 4 executes error detection and error correction on the data read from the nonvolatile storage device 3 by using the parity corresponding to the read data. In this read process, the controller 4 may read the parity corresponding to the read data from the nonvolatile storage device 3.
[0026] The controller 4 includes a host interface unit 5, memory interface units MI0 to MI3, a memory unit 6, a processor 7, and an error correction unit 8. The host interface unit 5, memory interface units MI0 to MI3, memory unit 6, processor 7, and error correction unit 8 can transmit or receive data, information, signals, commands, requests, messages, instructions, and responses to or from each other via a bus 11.
[0027] The host interface unit 5 is a circuit that complies with a predetermined standard. The host interface unit 5 receives data, information, signals, commands, requests, messages, instructions, responses, etc. from the host device 2. The host interface unit 5 also transmits data, information, signals, commands, requests, messages, instructions, responses, etc. to the host device 2.
[0028] The specified standard may be, for example, the NVMe (registered trademark) (Non-Volatile Memory Express) standard, the PCIe (registered trademark) (Peripheral Component Interconnect Express) standard, the SATA (Serial Advanced Technology Attachment) standard, or the SAS (Serial Attached Small Computer System Interface) standard.
[0029] The memory interface units MI0 to MI3 correspond to the channels Ch0 to Ch3, respectively. The memory interface units MI0 to MI3 are circuits for transmitting and receiving data, information, signals, commands, requests, messages, instructions, responses, and the like to and from the memories NM00 to NM03. The memory interface unit MI0 writes or reads the memories NM00 to NM03, the memory interface unit MI1 writes or reads the memories NM10 to NM13, the memory interface unit MI2 writes or reads the memories NM20 to NM23, and the memory interface unit MI3 writes or reads the memories NM30 to NM33 in parallel with each other. In other words, the controller 4 can write or read in parallel with respect to a plurality of channels Ch0 to Ch3. In the following, for simplification, the memory interface units MI0 to MI3 may be omitted in the description. The number of channels and the number of memory interfaces may not be three, but may be one, two, four or more.
[0030] The memory unit 6 stores, for example, firmware FW and an address translation table AT. The memory unit 6 also includes a parity storage unit 10 that is used, for example, as a working unit to generate parity. The memory unit 6 may be, for example, an SRAM (Static Random Access Memory). The memory unit 6 may also be, for example, a combination of a DRAM (Dynamic random access memory) and an SRAM. The memory unit 6 may be arranged outside the controller 4 instead of inside it.
[0031] Furthermore, the memory unit 6 may store the generated parity in a non-volatile state.
[0032] The firmware FW is an example of software executed by the processor 7. The firmware FW includes, for example, code and data. The firmware FW is executed by the processor 7 to control the host interface unit 5, the memory interface units MI0 to MI3, the memory unit 6, and the error correction unit 8.
[0033] In the first embodiment, the firmware FW causes the processor 7 to realize functions 71 to 75, for example.
[0034] The function 71 detects that a predetermined amount (first amount) of first data has been written to the non-volatile storage device 3. Alternatively, the function 71 may detect that the first data has been written up to a predetermined position in the non-volatile storage device 3. Here, the amount of data may mean, for example, the size of the data. Also, the amount of data may mean the number of pieces of data having a predetermined size.
[0035] The function 72 detects a memory size available for use as the parity storage unit 10 when a predetermined amount of first data has been written to the nonvolatile storage device 3, and determines (or selects) data included in the first data for which writing has been completed and to be read as a parity generation target based on the detected memory size. Here, the parity generation target is data used when generating parity. Alternatively, the function 72 may determine data included in the first data for which writing has been completed and to be read as a parity generation target when the first data has been written up to a predetermined position in the nonvolatile storage device 3.
[0036] The function 73 reads, from the non-volatile storage device 3, the data determined as the data for which parity is to be generated.
[0037] The function 74 uses the error correction unit 8 and the parity storage unit 10 to generate parity corresponding to the read data.
[0038] The function 75 writes the generated parity in a non-volatile state to a memory for storing parity, such as the memory unit 6, the non-volatile storage device 3, or another non-volatile memory (not shown).
[0039] The address translation table AT associates the logical address of the data stored in the memories NM00 to NM33 with a physical address that specifies the location where the data is stored. The address translation table AT may also be called a look-up table. The logical address may be, for example, LBA (Logical Block Addressing). The physical address may be, for example, PBA (Physical Block Addressing).
[0040] The error correction unit 8 is a circuit that executes an error detection process and an error correction process using, for example, ECC (Error Correcting Code) or the like. More specifically, the error correction unit 8 generates parity corresponding to data while using the parity storage unit 10 in accordance with the control executed by the processor 7. Also, the error correction unit 8 detects and corrects errors in the read data based on the data read from the memories NM00 to NM33 and the parity corresponding to the data in accordance with the control executed by the processor 7. The error correction unit 8 may be provided, for example, in the processor 7. Also, the error correction unit 8 may be provided in each of the memory interface units MI0 to MI3.
[0041] The processor 7 executes various controls in accordance with the firmware FW.
[0042] The processor 7 is, for example, any one of various processing devices such as a central processing unit (CPU), a micro-processing unit (MPU), a digital signal processor (DSP), or a graphics processing unit (GPU).
[0043] The processor 7 reads the firmware FW and the address translation table AT from at least one of the memories NM00 to NM33 via at least one of the memory interface units MI0 to MI3, for example, at the time of starting up the memory system 1. Then, the processor 7 stores the firmware FW and the address translation table AT in the memory unit 6.
[0044] For example, before the memory system 1 is stopped, the processor 7 writes the address translation table AT stored in the memory unit 6 to at least one of the memories NM00 to NM33 via at least one of the memory interface units MI0 to MI3.
[0045] In the first embodiment, the processor 7 executes garbage collection on at least one of the memories NM00 to NM33 via at least one of the memory interface units MI0 to MI3.
[0046] For example, the processor 7 realizes the above functions 71 to 75 in accordance with the firmware FW during data write processing. Specifically, the processor 7 writes data to the nonvolatile storage device 3 during data write processing. The processor 7 also reads the written data from the nonvolatile storage device 3. The processor 7 further generates parity corresponding to the read data using the parity storage unit 10 and the error correction unit 8. The processor 7 then writes the generated parity to the memory unit 6, the nonvolatile storage device 3, or another nonvolatile memory not shown.
[0047] For example, during data read processing, the processor 7 reads data from the nonvolatile storage device 3. The processor 7 also reads parity corresponding to the read data from the memory unit 6, the nonvolatile storage device 3, or another nonvolatile memory (not shown). The processor 7 then uses the read parity and the error correction unit 8 to determine whether or not the read data contains an error, and corrects the error if the read data contains an error.
[0048] Next, the configuration of the memory NM00 according to the first embodiment will be described in detail with reference to Figures 2 to 5. It should be noted that the memories NM01 to NM33 have the same configuration as the memory NM00.
[0049] FIG. 2 is a diagram showing an example of the configuration of the memory NM00 according to the first embodiment.
[0050] The memory NM00 includes a memory cell array. The memory cell array includes a plurality of nonvolatile memory cell transistors. Each of the plurality of nonvolatile memory cell transistors is associated with a word line and a bit line. The memory NM00 includes a plurality of blocks B0 to Bn, each including a set of a plurality of nonvolatile memory cell transistors.
[0051] Each of the blocks B0 to Bn of the memory NM00 includes a plurality of string units SU0 to SUk. Each of the string units SU0 to SUk includes a plurality of NAND strings (hereinafter, referred to as strings) Str. In each string Str, a plurality of memory cell transistors are connected in series.
[0052] In the following, when there is no distinction between blocks B0 to Bn, they are referred to as block B. When there is no distinction between string units SU0 to SUm, they are referred to as string units SU. The number of blocks n+1 in memory NM00 and the number of string units k+1 in one block B are arbitrary.
[0053] Fig. 3 is a diagram showing an example of the configuration of a portion of the block B. In Fig. 3, a portion of four string units SU0 to SU3 out of the plurality of string units SU0 to SUk provided in the block B is shown.
[0054] A plurality of configurations similar to a portion of block B as shown in Fig. 3 are provided in the depth direction of the paper. As described above, block B includes, for example, k+1 string units SU0 to SUk. Each of string units SU0 to SUk includes a plurality of strings Str and bit lines BL in the depth direction of the paper of Fig. 3. More specifically, Fig. 3 shows one string Str connected to a bit line BL among the plurality of strings included in string unit SU0, one string Str connected to the bit line BL among the plurality of strings included in string unit SU1, one string Str connected to the bit line BL among the plurality of strings included in string unit SU2, and one string Str connected to the bit line BL among the plurality of strings included in string unit SU3.
[0055] Each of the strings Str includes, for example, 48 memory cell transistors MT0 to MT47 and select transistors ST1 and ST2. Each of the memory cell transistors MT0 to MT47 includes a stack gate including a control gate and a charge storage layer, and stores data in a non-volatile manner. The number of memory cell transistors MT0 to MT47 is not limited to 48, and may be 8, 16, 32, 64, 128, etc., and is not limited to this number. Hereinafter, when there is no need to distinguish between the memory cell transistors MT0 to MT47, they will be simply referred to as memory cell transistors MT.
[0056] A plurality of memory cell transistors MT are arranged so as to be connected in series between one ends of the current paths of the select transistors ST1 and ST2.
[0057] The gates of the select transistors ST1 of the strings Str included in each of the string units SU0 to SU3 are connected to the select gate lines SGD0 to SGD3, respectively. The gates of the select transistors ST2 of the strings Str included in each of the string units SU0 to SU3 are connected to the select gate lines SGS0 to SGS3, respectively. In contrast, the control gates of the memory cell transistors MT0 to MT47 in the same block B are commonly connected to the word lines WL0 to WL47, respectively. In the following, when the select gate lines SGD0 to SGD3 are not differentiated, each of the select gate lines SGD0 to SGD3 is also simply referred to as the select gate line SGD. When the select gate lines SGS0 to SGS3 are not differentiated, each of the select gate lines SGS0 to SGS3 is also simply referred to as the select gate line SGS. When the word lines WL0 to WL47 are not differentiated, each of the word lines WL is also simply referred to as the word line WL.
[0058] The word lines WL0 to WL47 are commonly connected among multiple string units SU0 to SU3 in the same block B, whereas the select gate lines SGD, SGS are independent for each string unit SU0 to SU3 even within the same block B. However, the select gate lines SGS0 to SGS3 may be commonly connected among the string units SU0 to SU3.
[0059] 3, the other ends of the current paths of the select transistors ST1 arranged in each of the multiple strings Str arranged in the memory cell array are commonly connected to one of the multiple bit lines BL provided in the block B. In addition, the other ends of the current paths of the select transistors ST2 arranged in each of the multiple strings Str are commonly connected to a source line SL.
[0060] Data in memory cell transistors MT in the same block B is erased collectively. In contrast, data is read and written collectively from multiple memory cell transistors MT commonly connected to any word line WL in any string unit SU in any block B. Such a unit of data that is read and written collectively is called a "page."
[0061] FIG. 4 is a diagram showing an example of the relationship between blocks B0 to Bn and planes PL0 and PL1 in the memory NM00 according to the first embodiment.
[0062] The memory NM00 includes multiple (for example, two) planes PL0 and PL1. The plane PL0 includes blocks B0, B2, ..., Bn-1 and a page register PR0. The plane PL1 includes blocks B1, B3, ..., Bn and a page register PR1. In FIG. 5, block B2 will be described as a representative, but blocks B0, B1, B3 to Bn are similar to block B2.
[0063] The block B2 includes a plurality of pages. The block B2 includes a plurality of word lines WL0 to WLm and a plurality of memory cell transistors MT connected to the plurality of word lines WL0 to WLm, respectively.
[0064] In the first embodiment, one memory cell transistor MT is a triple level cell (TLC) capable of storing 3-bit information. Note that the memory cell transistor MT may be a single level cell (SLC) capable of storing 1-bit information, a multi level cell (MLC) capable of storing 2-bit information, a quad level cell (QLC) capable of storing 4-bit information, or a quad level cell (QLC) capable of storing 5-bit information or more.
[0065] Hereinafter, a group of memory cell transistors MT selected collectively during data write and read operations will be referred to as a "memory cell group."
[0066] In one string unit SU, a plurality of memory cell transistors MT connected to the word line WL0 correspond to the memory cell group MCG0. Similarly, in one string unit SU, a plurality of memory cell transistors MT connected to the word lines WL1 to WLm correspond to the memory cell groups MCG1 to MCGm, respectively. The 3-bit data stored in the TLC is, from the lowest to the highest, a lower bit, a middle bit, and an upper bit.
[0067] In the memory cell group MCG0, a set of lower bits is a lower page, a set of middle bits is a middle page, and a set of upper bits is an upper page. Each of the memory groups MCG1 to MCGm includes a lower page, a middle page, and an upper page, similar to the memory cell group MCG0.
[0068] The operation of generating parity according to the first embodiment will be described below.
[0069] FIG. 5 is a diagram showing an example of the configuration of frames A to X according to the first embodiment.
[0070] In the first embodiment, a frame is, for example, a unit including data for generating one parity. In the following description, a frame is described as a unit of data for generating parity, and also as the data itself.
[0071] Frame A is divided into a plurality of subframes A-1 to A-8. Error correction unit 8 generates parity PA for frame A.
[0072] Each of the frames B to X is divided into eight subframes B-1 to B-8, ..., X-1 to X-8, similar to the frame A. The error correction unit 8 generates parities PB to PX for each of the frames B to X.
[0073] In the following, when the parities PA to PX are not distinguished, they are referred to as parity P#.
[0074] It is assumed that the subframes A-1 to A-8, ..., X-1 to X-8 have the same size. It is assumed that the parities PA to PX have the same size as the subframes A-1 to A-8, ..., X-1 to X-8. It is noted that the number of subframes constituting one frame can be changed as appropriate.
[0075] FIG. 6 is a diagram showing an example of a logical block LB and a parity storage unit 10 according to the first embodiment.
[0076] FIG. 6 illustrates an example in which there are four or more word lines WL, the number of banks Bk is four, and four strings Str are associated with one word line WL. Also, an example is illustrated in which the type of memory cell transistors MT in the logic block LB is TLC. However, in the first embodiment, the number of word lines WL, the number of banks Bk, the number of strings Str associated with the word lines WL, the number of planes PL, and the type of memory cell transistors MT can be appropriately changed according to the characteristics of the memories NM00 to NM33, etc. A plurality of blocks B included in the logic block LB belong to the plane PL0 or the plane PL1. FIG. 6 illustrates a portion of the word lines WL0 to WLm corresponding to the word lines WL0 to WL3, and omits a portion corresponding to the word lines WL4 to WLm.
[0077] FIG. 6 illustrates a state in which frames A to X are written to word lines WL0 to WL3.
[0078] In Fig. 6, four strings Str0 to Str3 are associated with each of the word lines WL0 to WL3 in the vertical direction. Furthermore, three pages (lower page / middle page / upper page) are associated with each of the strings Str0 to Str3 in the vertical direction. In this way, one word line WL corresponds to four strings Str0 to Str3. One string Str corresponds to three pages.
[0079] In FIG. 6, four banks Bk0 to Bk3 are arranged in the horizontal direction.
[0080] In a logical block LB having such a configuration of word lines WL, strings Str, pages, and banks Bk, four subframes each belonging to 12 different frames (i.e., 48 subframes) are written to one word line WL.
[0081] The processor 7 determines the allocation of frames for which parity generation is performed in parallel according to the characteristics of the memories NM00 to NM33. In the case of Fig. 6, the processor 7 determines to allocate 24 frames A to X to two word lines, and executes parity generation in parallel for the 24 frames A to X. The characteristics of the memories NM00 to NM33 may be, for example, an error mode when data stored in the memories NM00 to NM33 is read, or a physical characteristic according to the storage location in the memories NM00 to NM33.
[0082] The processor 7 writes frames A to X to the logical block LB in ascending order of word line numbers from the smallest to the largest among the word lines WL0 to WLm, for example, across two word lines WL.
[0083] Specifically, the processor 7 writes subframes A-1 to A-4, B-1 to B-4, and C-1 to C-4 to string Str0 of word line WL0 and banks Bk0 to Bk3. Next, the processor 7 writes subframes D-1 to D-4, E-1 to E-4, and F-1 to F-4 to string Str1 of word line WL0 and banks Bk0 to Bk3. Next, the processor 7 writes subframes G-1 to G-4, H-1 to H-4, and I-1 to I-4 to string Str2 of word line WL0 and banks Bk0 to Bk3. Next, the processor 7 writes subframes J-1 to J-4, K-1 to K-4, and L-1 to L-4 to string Str3 of word line WL0 and banks Bk0 to Bk3.
[0084] Next, the processor 7 writes subframes M-1 to M-4, N-1 to N-4, and O-1 to O-4 to the string Str0 of the word line WL1 and the banks Bk0 to Bk3. Next, the processor 7 writes subframes P-1 to P-4, Q-1 to Q-4, and R-1 to R-4 to the string Str1 of the word line WL1 and the banks Bk0 to Bk3. Next, the processor 7 writes subframes S-1 to S-4, T-1 to T-4, and U-1 to U-4 to the string Str2 of the word line WL1 and the banks Bk0 to Bk3. Next, the processor 7 writes subframes V-1 to V-4, W-1 to W-4, and X-1 to X-4 to the string Str3 of the word line WL1 and the banks Bk0 to Bk3.
[0085] Then, following the same procedure as for word lines WL0 and WL1 above, processor 7 writes subframes A-5 to A-8, ..., L5-L8 to each string Str0 to Str3 and bank Bk0 to Bk3 of word line WL2, and then writes subframes M-5 to M-8, ..., X-5 to X-8 to each string Str0 to Str3 and bank Bk0 to Bk3 of word line WL3.
[0086] In other words, in the first embodiment, writing is performed serially on a plurality of word lines WL, and writing is performed serially on a plurality of strings Str in one word line WL.
[0087] The process of determining (selecting) the number of parallel frames to be read and the location of the frames to be read when calculating parity may be expressed as "framing."
[0088] When the processor 7 completes writing up to the bank Bk3 of the word lines WL2 and WL3, that is, up to the position LC in FIG. 6, for example, it becomes possible to generate the parities PA to PX for the frames A to X, respectively.
[0089] The processor 7 judges whether the write state for the block LB satisfies the parity generation condition. The parity generation condition may be, for example, that a predetermined amount (e.g., data size of frames A to X or more) of data is written to the block LB, that a write up to a predetermined position LC of the block LB is completed, that a write up to a predetermined position written after the position LC of the block LB is completed, or that a write up to the end of the block LB (e.g., bank Bk3 of word line WLm) is completed.
[0090] When the write state of the block LB satisfies the parity generation condition, the processor 7 detects the memory size available for the parity storage unit 10 based on the state of the memory unit 6 and the like. Then, the processor 7 determines the frame that has been written to the block LB and is to be read to generate parity based on the detected memory size. FIG. 6 illustrates a case where frame A is determined as the target for generating parity. However, other frames B to X may be determined as the target for generating parity. At least two of frames A to X may be determined as the target for generating parity.
[0091] The processor 7 reads the frame A determined as the parity generation target from the block LB. The processor 7 generates the parity PA for the read frame A using the error correction unit 8 and the parity storage unit 10, and writes the generated parity PA in a non-volatile state. The generated parity PA may be written, for example, to the memory unit 6, the non-volatile storage device 3, or another non-volatile memory.
[0092] FIG. 7 is a flowchart illustrating an example of a frame write process and a parity generation process according to the first embodiment.
[0093] In S701, the processor 7 executes writing of a frame to the logical block LB.
[0094] In S702, the processor 7 determines whether or not a predetermined amount (first amount) of frames has been written to the logical block LB.
[0095] If a predetermined amount of frames have not been written to the logical block LB (No in S702), the process proceeds to S701.
[0096] When a predetermined amount of frames have been written to the logical block LB (Yes in S702), in S703, the processor 7 determines a second amount of frames to be read to generate the parity P#, which are included in the predetermined amount of frames already written to the logical block LB, based on the state of the memory unit 6 (e.g., the memory size available for generating the parity P#). Here, the second amount is assumed to be less than the above-mentioned predetermined amount (first amount).
[0097] In S704, after the processor 7 has completed writing the predetermined amount of frames, it executes reading the determined second amount of frames from the logical block LB.
[0098] In S705, the processor 7 uses the error correction unit 8 and the parity storage unit 10 to generate parity P# corresponding to the second amount of frames that have been read.
[0099] In S706, the processor 7 writes the generated parity P# in a non-volatile state, for example, to the memory unit 6, the non-volatile storage device 3, or another non-volatile memory.
[0100] In S707, the processor 7 determines whether or not there is a frame waiting for parity generation.
[0101] If there are frames waiting for parity generation (Yes in S707), the process moves to S703. In S703, the processor 7 determines a third amount of frames to be read to generate new parity, which are included in the predetermined amount of frames already written to the logical block LB, based on the state of the memory unit 6, etc. Then, the same processes as those from S704 described above are repeated.
[0102] If there is no frame waiting for parity generation (No in S707), in S708, the processor 7 determines whether or not to end the writing of frames.
[0103] If the write is not to be ended (No in S708), the process proceeds to S701.
[0104] If writing is to be ended (Yes in S708), the process ends.
[0105] The process of determining the parallel number of frames to be read to generate parity is described below.
[0106] For example, consider a case where the memory system 1 reads frame A with a parallel number of 1 after frames A to X are written to a logical block LB, and generates parity PA of the read frame A.
[0107] In this case, the memory size required to generate the parity PA is the parity size for one frame.
[0108] Processor 7 first secures parity storage unit 10 with a parity size for one frame, and reads a plurality of subframes A-1 to A-8 included in one frame A. Processor 7 uses the secured parity storage unit 10 to generate parity PA corresponding to frame A, and makes the generated parity PA nonvolatile.
[0109] Processor 7 then reads a plurality of subframes B-1 to B-8 included in one frame B. Processor 7 uses parity storage unit 10 having a parity size for one frame to generate parity PB corresponding to frame B, and makes the generated parity PB nonvolatile.
[0110] Similarly, the processor 7 executes the same process for each frame from frame C to frame X. That is, the processor 7 uses the parity storage unit 10 with a parity size for one frame to generate parity PC to parity PX for each frame, and sequentially makes parity PC to parity PX nonvolatile for each frame.
[0111] Even while processor 7 is reading frames A to X and generating parities PA to PX, processor 7 continues write processing of frames after frame X. In other words, processor 7 executes, by pipeline processing, the write processing of frames written after frames A to X and the processing for generating parities PA to PX corresponding to frames A to X.
[0112] The processor 7 determines the number of parallel operations based on the memory size that can be used as the parity storage unit 10 to generate the parity P#.
[0113] For example, when the memory size that can be used for generating parity P# is large, the processor 7 can increase the number of parallel operations.
[0114] For example, when the memory size that can be used to generate parity P# is small, the processor 7 can reduce the number of parallel processes.
[0115] The processor 7 may determine the number of parallelism according to a table that associates the memory size that can be used to generate the parity P# with the number of parallelism. Alternatively, the processor 7 may determine the number of parallelism using a formula that calculates the number of parallelism from the memory size that can be used to generate the parity P#.
[0116] As in the first embodiment, by determining and changing the number of parallel operations for reading frames and generating parity P#, the memory size of the parity storage unit 10 used to generate parity P# can be determined and changed.
[0117] The effect of the memory system 1 according to the first embodiment will be described by comparing the memory system 1 according to the first embodiment described above with a memory system of a comparative example using FIG.
[0118] The memory system of the comparative example writes a plurality of frames A to X to a logical block LB, and generates a plurality of parities PA to PX corresponding to the plurality of frames A to X using a parity storage unit of the comparative example.
[0119] Then, when writing to block LB is completed up to position LC, the memory system of the comparative example makes the multiple parities PA to PX for the multiple frames A to X non-volatile.
[0120] The memory system of the comparative example writes a frame to string Str0 of word line WL0, and then writes a frame to string Str1 of word line WL0, and repeats the same process. The memory system of the comparative example executes a process for generating parity at the same time as writing. In the memory system of the comparative example, the number of frames for which parity generation is executed in parallel is, for example, 24. In this case, the memory system of the comparative example needs to secure a parity storage unit having a memory size for a plurality of parities PA to PX. For this reason, the parity storage unit of the comparative example needs to have a memory size of (parity size per frame) x 24. If the size of parity P# is q kibibytes and the number of frames written in parallel is r, the parity storage unit of the comparative example used to generate parities PA to PX needs to have a memory size of q x r kibibytes. For example, when q = 32 and r = 24, a memory size of 768 kibibytes is secured as the parity storage unit of the comparative example. The memory size available for the parity storage unit of the comparative example is affected by the usage amount of the memory unit 6. The memory size of the parity storage unit in the comparative example is preferably as small as possible since it affects the cost and power consumption of the memory system in the comparative example.
[0121] As described above, the memory system of the comparative example generates parity using the parity storage unit of the comparative example in parallel with writing of frames to the logical block LB. The memory system of the comparative example determines whether the parity corresponding to the frames written in parallel is complete, and if the parity is complete, makes each of the parities written in the parity storage unit of the comparative example non-volatile.
[0122] In such a memory system of the comparative example, as the number of frames written in parallel increases, the memory size of the parity storage unit of the comparative example used to generate parity also increases.
[0123] In contrast, in the memory system 1 according to the first embodiment, after a collective amount (first amount) of frames A to X are written to the logical block LB, parity is generated. After frames A to X are written, the memory system 1 reads frames of a parallel number (second amount) for which parity is to be generated from the logical block LB, with the parallel number corresponding to the memory size available for generating the parity. Then, the memory system 1 generates parity using the parity storage unit 10 of a memory size corresponding to the read second amount of frames, and writes the generated parity in a non-volatile state to the memory unit 6, the non-volatile storage device 3, and other non-volatile memories.
[0124] In the memory system 1 according to the first embodiment, the number of parallel parity generation frames read from the logical block LB during parity generation is reduced, making it possible to reduce the memory size used for parity generation more than in the memory system of the comparative example. Therefore, in the memory system 1 according to the first embodiment, it is possible to reduce costs and power consumption more than in the memory system of the comparative example.
[0125] In the first embodiment, parity is not generated while writing frames, but at least one frame for which parity is generated is determined after a predetermined amount or a predetermined position is written, and the determined at least one frame is read from the logical block LB, and parity corresponding to the at least one frame is generated. Therefore, in the first embodiment, parity generation can be started under conditions suitable for generating parity. Also, in the first embodiment, the number of parities generated in parallel is set to be less than the number of parallel frame write processes, so that the memory size used for generating parity can be set to be small. For example, when parity is generated for each frame, the size of the memory used for generating parity may be one parity size.
[0126] In the first embodiment, the write process of the frame written after frames A to X and the generation of parities PA to PX corresponding to frames A to X are executed by pipeline processing. This makes it possible to suppress a decrease in performance of the processor 7.
[0127] In the first embodiment, parity generation can be repeated until there are no more frames waiting for parity generation.
[0128] When the characteristics of the memories NM00 to NM33 change, the configuration of the frames written to the logical blocks LB may also change. In the first embodiment, even if the frame configuration changes, the parallel number of frames for generating parity is determined according to the memory size available for generating parity, and parity can be flexibly generated according to the determined parallel number.
[0129] Second Embodiment In the second embodiment, a case will be described in which the parity generation according to the first embodiment is used in garbage collection processing.
[0130] FIG. 8 is a diagram illustrating an example of garbage collection processing according to the second embodiment.
[0131] By executing the garbage collection process, the processor 7 collectively relocates data that is fragmentarily allocated in the garbage collection source blocks SB1 to SBp in the memories NM00 to NM33 to the garbage collection destination block DB, and invalidates the data in the garbage collection source blocks SB1 to SBp. In Fig. 8, p is 2 or more. The number of garbage collection destination blocks DB is less than the number of the garbage collection source blocks SB1 to SBp.
[0132] The processor 7 executes the parity generation process described in the first embodiment above when writing data in relocation to the garbage collection destination block DB.
[0133] Specifically, in the garbage collection process, the processor 7 reads data from the garbage collection source blocks SB1 to SBp, and writes the data read from the garbage collection source blocks SB1 to SBp to the garbage collection destination block DB. After the processor 7 completes writing to the garbage collection destination block DB, it reads the written data from the garbage collection destination block DB. The processor 7 generates parity corresponding to the data read from the garbage collection destination block DB, and makes the generated parity nonvolatile.
[0134] As shown in FIG. 8, suppose that a failure such as a power cut off of the memory system 1 occurs while data is being written to the garbage collection destination block DB, and parity is not generated.
[0135] In such a case, the processor 7 invalidates the data stored in the garbage collection destination block DB where data writing has progressed only halfway. The processor 7 moves data from the garbage collection source blocks SB1 to SBp to another garbage collection destination block ADB, invalidates the data stored in the garbage collection source blocks SB1 to SBp, and generates parity. Alternatively, the processor 7 erases the data stored in the garbage collection destination block DB where data writing has progressed only halfway. The processor 7 again starts moving data from the garbage collection source blocks SB1 to SBp to the garbage collection destination block DB, invalidates the data stored in the garbage collection source blocks SB1 to SBp, and generates parity.
[0136] In the second embodiment described above, it is possible to reduce the memory size of the parity storage unit 10 used to generate parity during garbage collection processing.
[0137] In the second embodiment, the garbage collection source block SB is used like a backup. This makes it possible to resume garbage collection if a failure occurs during garbage collection, thereby improving the reliability of the memory system 1.
[0138] In the second embodiment, the parity generation according to the first embodiment is described as being used in garbage collection. However, the parity generation according to the first embodiment may be performed during other background processes performed in the memory system 1, such as refresh or wear leveling.
[0139] In the second embodiment, the processor 7 may execute parity generation as performed in the memory system of the comparative example during a write process that is not a background process such as garbage collection, refresh, or wear leveling. The write process that is not a background process includes, for example, a process of writing data in accordance with a write command from the host device 2.
[0140] Specifically, the processor 7 may write data to be written to the non-volatile storage device 3 during a write process that is not a background process, and start generating (or calculating) parity corresponding to the data to be written before the writing of the data to be written is completed, and write the generated parity corresponding to the data to be written to a memory for saving parity. In this case, appropriate parity generation can be executed according to the type of write process.
[0141] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0142] 1...memory system, 2...host device, 3...non-volatile storage device, 4...controller, 5...host interface unit, 6...memory unit, 7...processor, 71-75...functions, 8...error correction unit, 10,13...parity storage unit, NM00-NM33...memory, AT...address conversion table, FW...firmware, A-X...frames, A-1-X-8...subframes, PA-PX...parity, SB1,SB2...garbage collection source block, DB...garbage collection destination block, ADB...another garbage collection destination block
Claims
1. A non-volatile memory; A controller for controlling the non-volatile memory, The controller: Writing a first amount of data to the non-volatile memory; determining a second amount of data that is included in the first amount of data and is subject to parity generation, the second amount being less than the first amount; after the writing of the first amount of data is completed, reading the second amount of data from the non-volatile memory; generating parity corresponding to the second amount of data read; The memory system writes the generated parity to a memory for storing parity.
2. The controller further comprises: writing first data to a predetermined location in the non-volatile memory; determining second data that is included in the first data, is a target for parity generation, and is smaller than the first data; After the writing of the first data is completed, the second data is read from the non-volatile memory; generating a second parity corresponding to the second data read; 2. The memory system of claim 1, further comprising: a memory for storing said parity, and wherein said second parity is written to said memory for storing said parity.
3. 2. The memory system of claim 1, wherein the controller determines the second amount of data based on an available memory size for generating the parity.
4. 2. The memory system of claim 1, wherein the controller writes the parity corresponding to the second amount of data to the memory for storing parity, and then determines data of the first amount of data that is different from the second amount of data as a target for generating new parity.
5. 5. A memory system according to claim 1, wherein the controller executes a write process of other data to be written to the non-volatile memory after the first amount of data and a process for generating the parity corresponding to the second amount of data by pipeline processing.
6. The controller, in a garbage collection process, reading data from a garbage collection source block of the non-volatile memory; writing the data read from the garbage collection source block to a garbage collection destination block of the non-volatile memory; After the writing to the garbage collection destination block is completed, the written data is read from the garbage collection destination block; generating the parity corresponding to the data read from the garbage collection destination block; 6. The memory system according to claim 1, wherein the generated parity is written to the memory for storing the parity.
7. 7. The memory system of claim 6, wherein the controller writes data to be written to the non-volatile memory during a write process that is not garbage collection, starts generating parity corresponding to the data to be written before the writing of the data to be written is completed, and writes the generated parity corresponding to the data to be written to the memory for storing parity.
8. A method for controlling a memory system having a non-volatile memory, comprising: writing a first amount of data to the non-volatile memory; determining a second amount of data included in the first amount of data and subject to parity generation, the second amount being less than the first amount; reading the second amount of data from the non-volatile memory after writing the first amount of data is completed; and generating parity corresponding to the second amount of data read; and writing the generated parity to a memory for storing parity.
9. A non-volatile memory; A controller for controlling the non-volatile memory, The controller: Writing data to the non-volatile memory; After the writing is completed, the written data is read from the non-volatile memory; generating parity corresponding to the read data; The generated parity is written to a memory for storing parity. In the garbage collection process, the controller: reading data from a garbage collection source block of the non-volatile memory; writing the data read from the garbage collection source block to a garbage collection destination block of the non-volatile memory; After the writing to the garbage collection destination block is completed, the written data is read from the garbage collection destination block; generating the parity corresponding to the data read from the garbage collection destination block; A memory system that writes the generated parity to a memory for storing the parity.
10. A method for controlling a memory system having a non-volatile memory, comprising: writing data to the non-volatile memory; After the writing is completed, reading the written data from the non-volatile memory; generating parity corresponding to the read data; and writing the generated parity to a memory for storing parity. In the garbage collection process, reading data from a garbage collection source block of the non-volatile memory; writing the data read from the garbage collection source block to a garbage collection destination block of the non-volatile memory; After the writing to the garbage collection destination block is completed, the written data is read from the garbage collection destination block; generating the parity corresponding to the data read from the garbage collection destination block; A control method for writing the generated parity to a memory for storing the parity.
Citation Information
Patent Citations
Raid initialization method and raid initialization program
JP2008257360A
Semiconductor recording device and control method of semiconductor recording device
JP2011134307A
Storage control device and storage control program
JP2019049856A
Memory system, control method thereof and program
JP2019053415A
Memory system
JP2019168897A
