Storage device including non-volatile memory device and operation method thereof

By generating and using check data to restore the mapping table in the non-volatile memory device, the delay problem caused by the unexpected loss of the mapping table in the non-volatile memory device is solved, and the performance and reliability of the storage device are improved.

CN111198655BActive Publication Date: 2024-09-20SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911093271.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-16
Filing Date
2019-11-08
Publication Date
2024-09-20
Estimated Expiration
2039-11-08

AI Technical Summary

Technical Problem

In non-volatile memory devices, unexpected loss of the mapping table (such as sudden power outage) causes delays in restoring the mapping, affecting the performance of the storage device.

Method used

By generating and using parity data in non-volatile memory devices, the memory controller restores the mapping table based on the parity data in unexpected situations, reducing the time of the recovery process.

Benefits of technology

It effectively reduces the time required to restore mapping, improves the performance and reliability of storage devices, and avoids performance degradation caused by mapping recovery delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111198655B_ABST
    Figure CN111198655B_ABST
Patent Text Reader

Abstract

A storage device includes a nonvolatile memory device and a memory controller. After writing first data at a first page, the memory controller writes second data at a second page. The memory controller generates first verification data corresponding to the first data and second verification data corresponding to the second data. The memory controller recovers a first physical address and a second physical address and a first logical address and a second logical address based on the second verification data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the priority of Korean Patent Application No. 10-2018-0141638 filed in the Korean Intellectual Property Office on November 16, 2018, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to a device for storing data, and more particularly to a storage device including a nonvolatile memory device and an operating method thereof. Background Art

[0004] Storage devices such as solid-state drives (SSDs) or universal flash storage (UFS) include nonvolatile memory devices. Since nonvolatile memory devices retain the data stored therein when power is lost, nonvolatile memory devices can be used to store data for a long time. Such storage devices can be used as main storage devices in various electronic devices (e.g., computers, smart phones, smart tablets, etc.).

[0005] In order to perform various operations on a non-volatile memory device, a storage device generally converts a logical address provided by a host into a physical address available in the non-volatile memory device. A mapping table can be used to perform the operation of converting a logical address into a physical address. However, it may happen that before updating the mapping table in the non-volatile memory device, the mapping table may be erased from a volatile memory (e.g., a buffer memory) included in the storage device due to an unexpected situation (e.g., a sudden power failure (SPO)). In this case, the mapping table must be restored. However, the operation of restoring the mapping table will delay various subsequent operations, including, for example, a write operation, a read operation, an erase operation, etc. Therefore, it is necessary to prevent the delay caused by the operation of restoring the mapping table. Summary of the invention

[0006] Embodiments of the inventive concept provide a storage device including a nonvolatile memory device and an operating method thereof, whereby the storage device reduces a time required to restore a mapping indicating a relationship between a logical address and a physical address of data in the nonvolatile memory device.

[0007] An embodiment of the present invention provides a storage device including a non-volatile memory device and a memory controller. The non-volatile memory device includes a memory area, the memory area including a first page corresponding to a first physical address and a second page corresponding to a second physical address. After writing first data at the first page based on a first write command corresponding to the first logical address, the memory controller writes second data at the second page based on a second write command corresponding to the second logical address. The memory controller generates first verification data corresponding to the first data and second verification data corresponding to the second data. The memory controller recovers the first physical address and the second physical address and the first logical address and the second logical address based on the second verification data.

[0008] Embodiments of the present invention also provide an operation method of a storage device including a memory controller and a non-volatile memory device. The method includes: based on a first write command corresponding to a reference address, the memory controller writes first data at a first page of the non-volatile memory device; based on a second write command corresponding to a target address, the memory controller writes second data at a second page of the non-volatile memory device; and based on the continuity between the target address and an address corresponding to a third write command before the target address, and based on the difference between the reference address and the target address, the memory controller generates target verification data corresponding to the second data.

[0009] An embodiment of the inventive concept also provides an operating method of a storage device, including: writing data to a memory area including a plurality of pages in order of physical page numbers; generating check data corresponding to each of the plurality of pages; reading a last page of the storage data in the plurality of pages; and restoring a portion of a map indicating a physical page number corresponding to a logical page number based on the check data corresponding to the last page in the generated check data. The check data includes an offset value between a physical page number of a reference page in the plurality of pages and a physical page number corresponding to the check data.

[0010] An embodiment of the inventive concept also provides a storage device, including: a nonvolatile memory device including a memory area of ​​a plurality of pages in a physical page number order; and a memory controller configured to write data into the plurality of pages, generate check data corresponding to each of the plurality of pages, and write the check data into the plurality of pages. The check data of a corresponding page of the plurality of pages includes an offset value between a physical page number of a reference page of the plurality of pages and the physical page number of the corresponding page.

[0011] An embodiment of the inventive concept additionally provides a storage device, including: a nonvolatile memory device including a memory area having a plurality of pages in a physical page number order; and a memory controller configured to: write first data at a first page among the plurality of pages based on a first write command corresponding to a reference address, write second data at a second page among the plurality of pages based on a second write command corresponding to a target address, and generate target verification data corresponding to the second data. The target verification data includes sequential data and offset data, the sequential data being generated based on the continuity between the target address and an address corresponding to a third write command preceding the target address, and the offset data being generated based on the difference between the reference address and the target address. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other objects and features of the present inventive concept will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.

[0013] Figure 1 A block diagram of a memory device according to an embodiment of the inventive concept is shown.

[0014] Figure 2 Shows Figure 1 A block diagram of a memory controller.

[0015] Figure 3 Shows Figure 1 A block diagram of a nonvolatile memory device.

[0016] Figure 4 Shows Figure 1 A flowchart of a method for operating a storage device.

[0017] Figure 5 Shown based on Figure 4 Schematic diagram of the mapping operation to write data.

[0018] Figure 6 shows that writing to Figure 5 An exemplary diagram of data in a first memory block.

[0019] Figure 7 shows that writing to Figure 5 An exemplary diagram of data in a second memory block.

[0020] Figure 8 Shows Figure 6 or Figure 7 A flowchart of an operating method for a storage device for generating verification data.

[0021] Fig. 9 Shown is the Figure 8A flowchart of an operation method of restoring a mapped storage device using verification data generated by an operation.

[0022] Fig.10 The case where data is written non-sequentially (e.g. Figure 6 Schematic diagram of the process of restoring the mapping in the case of (in the example).

[0023] Fig.11 The case where data is written sequentially (eg Figure 7 Schematic diagram of the process of restoring the mapping in the case of (in the example). DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the inventive concept will be described clearly and in detail with reference to the accompanying drawings to the extent that those having ordinary skill in the art can implement the embodiments of the inventive concept.

[0025] As common in the field of the present invention, embodiments can be described and illustrated according to the blocks that perform the described functions.These blocks, which may be referred to herein as units or modules, are physically implemented by analog and / or digital circuits such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hard-wired circuits, and may be optionally driven by firmware and / or software.For example, the circuit may be embodied in one or more semiconductor chips, or may be embodied on substrate supports such as printed circuit boards.The circuit constituting the block may be implemented by dedicated hardware or by a processor (e.g., one or more programmed microprocessors and associated circuits), or by a combination of dedicated hardware for performing some functions of the block and a processor for performing other functions of the block.Without departing from the scope of the present invention, each block of the embodiment may be physically divided into two or more interactive and discrete blocks.Similarly, without departing from the scope of the present invention, the block of the embodiment may be physically combined into more complex blocks.

[0026] Figure 1 FIG. 1 is a block diagram of a storage device according to an embodiment of the inventive concept. Figure 1 , the storage device 100 includes a memory controller 110 and a non-volatile memory device 120. The storage device 100 may be implemented in the form of, for example, a solid state drive (SSD), a memory card, an embedded multimedia card (eMMC), or a universal flash memory (UFS), but is not limited thereto.

[0027] The memory controller 110 may control the nonvolatile memory device 120 under the control of an external device (not shown) such as a host. For example, in response to an external request, the memory controller 110 may write data “DATA” into the nonvolatile memory device 120, or may read data “DATA” stored in the nonvolatile memory device 120. To this end, the memory controller 110 may send an address ADDR, a command CMD, and a control signal CTRL to the nonvolatile memory device 120.

[0028] The memory controller 110 can perform the above operations by using the buffer memory ( Figure 1 The memory controller 110 may manage the storage device 100 by using a memory controller (not shown). For example, the memory controller 110 may temporarily store data to be written to the nonvolatile memory device 120 or data read from the nonvolatile memory device 120 in the buffer memory. For example, the memory controller 110 may store metadata required for managing the nonvolatile memory device 120 in the buffer memory. For example, the memory controller 110 may store a mapping for converting a logical address into a physical address in the buffer memory so that operations such as a write operation, a read operation, and an erase operation are performed on the nonvolatile memory device 120.

[0029] The memory controller 110 drives a flash translation layer (FTL) 130. The flash translation layer 130 may define a correspondence between a logical address provided from a host and a physical address of the nonvolatile memory device 120. For example, the correspondence between the logical address and the physical address may be managed by using a mapping table. In addition, the flash translation layer 130 may perform maintenance operations such as a garbage collection operation, a read recovery operation, a data recovery operation, and a data backup operation.

[0030] In addition, the memory controller 110 drives a write verification manager 140. In a write operation associated with the non-volatile memory device 120, the write verification manager 140 may manage write data to be written into a storage space identified by an address of the non-volatile memory device 120. The write verification manager 140 may generate verification data to be stored at a specified page together with the write data. The verification data may include data provided to identify the write data after an unexpected situation occurs (e.g., a mapping of a mapping table is lost). For example, the unexpected situation may be a situation such as a sudden power failure, in which case power is not supplied to the storage device 100, and thus the mapping stored in the buffer memory (not shown) is erased.

[0031] The write verification manager 140 can generate verification data by verifying the sequentiality of the logical addresses and physical addresses corresponding to the write data. The sequentiality can be determined by the correlation between the address for the current write operation (e.g., the logical page number and the physical page number) and the address for the past write operation (e.g., the write operation most recently performed before the current write operation). The verification data can reflect the correlation, and the trend or history of the past write operation and the current write operation can be reflected in the verification data. The write verification manager 140 can be implemented by hardware (e.g., one or more application specific integrated circuits (ASICs) or one or more field programmable gate arrays (FPGAs)), or can be implemented by firmware, software, or a combination thereof. The verification data will be described more fully below.

[0032] The memory controller 110 may restore the erased mapping based on the verification data. For example, the operation of restoring the mapping may be performed by the flash translation layer 130. The memory controller 110 may predict the address based on the sequentiality of the address reflected in the verification data according to the past write operation and the address corresponding to the verification data. For example, the memory controller 110 may restore the addresses corresponding to multiple pages based on the verification data corresponding to one page. The mapping recovery operation will be described more fully below.

[0033] The nonvolatile memory device 120 may operate under the control of the memory controller 110. For example, the nonvolatile memory device 120 may receive an address ADDR, a command CMD, and a control signal CTRL. The nonvolatile memory device 120 may store data "DATA" in a space corresponding to the address ADDR, or may transmit data "DATA" corresponding to the address ADDR to the memory controller 110.

[0034] The nonvolatile memory device 120 may include, for example, a flash memory, a phase change random access memory (PRAM), a ferroelectric RAM (FeRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), or the like.

[0035] Figure 2 Shows Figure 1 A block diagram of the memory controller. Figure 2 , the memory controller 110 includes a processor 111, a buffer memory 112, a host interface 113, an error correction code (ECC) engine (ie, an error correction code unit) 114, a memory interface 115, and a bus 116. For ease of description, reference will be made to Figure 1 Reference numerals / symbol pairs Figure 2 Give a description.

[0036] The processor 111 may control the overall operation of the memory controller 110 and may perform logic operations. The processor 111 may communicate with an external host through the host interface 113 and may communicate with the nonvolatile memory device 120 through the memory interface 115. The processor 111 may control the memory device 100 by using the buffer memory 112.

[0037] The processor 111 can drive Figure 1 The flash translation layer 130 and the write verification manager 140 of the non-volatile memory device 120 may perform a conversion of a logical address into a physical address, and may perform a write operation on a memory area corresponding to the address ADDR in the non-volatile memory device 120. When executing the write verification manager 140, the processor 111 may generate verification data. When executing the flash translation layer 130, the processor 111 may restore a mapping erased from the buffer memory 112 through the verification data. The verification data refers to data generated by a correlation between an address for a current write operation and an address for a past write operation.

[0038] The buffer memory 112 may store codes or commands executed by the memory controller 110. The buffer memory 112 may store data processed by the memory controller 110. Software (or firmware) for controlling the memory controller 110 may be loaded onto the buffer memory 112. For example, in the case where the write verification manager 140 is implemented by firmware, the write verification manager 140 may be loaded onto the buffer memory 112 and may be executed by the processor 111. However, the inventive concept is not limited thereto, and the write verification manager 140 may be implemented, for example, by hardware (e.g., one or more application specific integrated circuits (ASICs) or one or more field programmable gate arrays (FPGAs)). The buffer memory 112 may be connected to the reference 110. Figure 1 The buffer memory 112 may be, for example, a random access memory (RAM), such as a static RAM (SRAM).

[0039] The host interface 113 may be configured to communicate with a host device under the control of the processor 111. The host interface 113 may be configured to communicate according to any of a variety of communication protocols, such as a universal serial bus (USB), a serial AT attachment (SATA), a small computer system interface (SCSI), a serial attached SCSI (SAS), a high-speed inter-chip (HSIC), a peripheral component interconnect (PCI), PCI Express (PCIe), a non-volatile memory express (NVMe), a universal flash memory (UFS), a secure digital (SD) card, a multimedia card (MMC), an embedded MMC (eMMC), a dual in-line memory module (DIMM), a registered DIMM (RDIMM), a load-reduced DIMM (LRDIMM), and the like.

[0040] The error correction code engine 114 may generate an error correction code for data to be stored in the nonvolatile memory device 120. The error correction code engine 114 may detect an error of the data "DATA" read from the nonvolatile memory device 120 based on the error correction code and may correct the detected error.

[0041] The memory interface 115 is configured to communicate with the nonvolatile memory device 120 under the control of the processor 111. For example, the memory interface 115 may transmit a command CMD, an address ADDR, and data “DATA” to the nonvolatile memory device 120 through an input / output channel. For example, the memory interface 115 may exchange control signals with the nonvolatile memory device 120 through a control channel.

[0042] The bus 116 provides a communication channel between the components of the memory controller 110. The processor 111, the buffer memory 112, the host interface 113, the error correction code engine 114, and the memory interface 115 may exchange data with each other through the bus 116. The bus 116 may be configured to support various types of communication formats used in the memory controller 110.

[0043] Figure 3 Shows Figure 1 A block diagram of a nonvolatile memory device. Figure 3 The nonvolatile memory device 120 includes a memory cell array 121, an address decoder 122, a page buffer circuit 123, a data input / output (I / O) circuit 124, and a control logic circuit 125. For ease of description, reference will be made to Figure 1 Reference numerals / symbol pairs Figure 3 Give a description.

[0044] The memory cell array 121 includes a plurality of memory blocks BLK1, BLK2, BLK3 to BLKi. For example, each of the plurality of memory blocks BLK1 to BLKi includes a plurality of pages. A write operation and a read operation can be performed for each page. An erase operation can be performed for each memory block. That is, a write operation and a read operation can be performed in units of pages, and an erase operation can be performed in units of blocks. The memory cell array 121 is connected to an address decoder 122 via a word line WL or a select line (not shown), and is connected to a page buffer circuit 123 via a bit line BL. One page can be connected to one word line. A plurality of memory blocks BLK1 to BLKi can be distinguished according to the operating characteristics or structural characteristics of the nonvolatile memory device 120.

[0045] The address decoder 122 may be configured to decode the address ADDR received from the memory controller 110. Here, the address ADDR may be a physical address converted by the flash translation layer 130. The address decoder 122 may select at least one of the word lines WL based on the decoded address ADDR and may drive the selected word line.

[0046] The page buffer circuit 123 may operate as a write driver or a sense amplifier according to an operation mode. During a write operation, the page buffer circuit 123 may provide a bit line voltage corresponding to write data to a bit line BL of the memory cell array 121. During a read operation, the page buffer circuit 123 may sense data stored in a selected memory cell through the bit line BL.

[0047] During a write operation, the data input / output circuit 124 provides data "DATA" provided from the memory controller 110 through the data line DL to the page buffer circuit 123. During a read operation, the data input / output circuit 124 receives data "DATA" from the page buffer circuit 123 through the data line DL. The data input / output circuit 124 may output the received data "DATA" to the memory controller 110.

[0048] The control logic circuit 125 may control the address decoder 122, the page buffer circuit 123, and the data input / output circuit 124 in response to the command CMD and the control signal CTRL provided from the memory controller 110. A write operation, a read operation, or an erase operation of the nonvolatile memory device 120 may be performed based on the command CMD under the control of the control logic circuit 125.

[0049] Figure 4 Shows Figure 1 A flowchart of a method for operating a storage device. Figure 4A flowchart associated with an operation of restoring a mapping in the event that a mapping formed by a write operation of the storage device 100 is lost is shown. Figure 4 The operation can be done by Figure 1 The memory controller 110 and the non-volatile memory device 120 included in the storage device 100 are executed. For ease of description, reference will be made to Figure 1 Reference numerals / symbols are used to describe Figure 4 .

[0050] In operation S110, the memory controller 110 performs a write operation corresponding to the write command. The flash translation layer 130 may convert a logical address corresponding to the write command into a physical address used in the nonvolatile memory device 120. The memory controller 110 may write data at a page corresponding to the physical address. To this end, the memory controller 110 may provide the nonvolatile memory device 120 with data, a physical address, and a write command.

[0051] While performing the write operation, the write verification manager 140 of the memory controller 110 generates verification data. The verification data may be associated with data written before the data written in operation S110. However, the inventive concept is not limited thereto, as the verification data may be associated with the data written in operation S110. The verification data may be written to a page corresponding to a physical address provided together with the write data corresponding to the write command.

[0052] In operation S120, the memory controller 110 updates the mapping in the buffer memory (e.g., the buffer memory of the memory controller 110). The mapping may be implemented as a mapping table for converting a logical address into a physical address. A plurality of physical addresses P1, P2 to Pj corresponding to a plurality of logical addresses L1, L2 to Lj, respectively, may be recorded in the mapping table. The physical address corresponding to the logical address may be changed according to the write operation of operation S110. The memory controller 110 may write the change of the relationship between the logical address and the physical address into the buffer memory.

[0053] In operation S130, the memory controller 110 determines whether an unexpected situation has occurred in the storage device 100. The memory controller 110 may determine an unexpected situation. The unexpected situation may, for example, mean a situation where a mapping stored in the buffer memory is erased or a mapping is not updated in the buffer memory. For example, the unexpected situation may be a sudden power failure in which power is not supplied to the storage device 100. In this case, data stored in the buffer memory may be erased, the buffer memory including a volatile memory such as an SRAM. However, the inventive concept is not limited thereto. For example, the unexpected situation may be a situation in which a mapping updated in the buffer memory is not stored or is erased due to a system pause or a system crash.

[0054] The mapping stored in the buffer memory may be stored in the nonvolatile memory device 120 so that it can be managed even in an unexpected situation. However, in the case of writing mapping information into the nonvolatile memory device 120, where the mapping information is changed whenever a write operation is requested / performed, an operation delay may occur, thereby reducing the performance of the storage device 100. Therefore, after continuously updating the changed mapping information in the buffer memory of the memory controller 110 at a faster speed than the nonvolatile memory device 120, the memory controller 110 may write the mapping information stored in the buffer memory to the nonvolatile memory device 120 during the flushing period. In this case, the number of times the nonvolatile memory device 120 is accessed to update the mapping is reduced, and the speed of the write operation is increased. The flushing period may be defined as a period during which the mapping information managed in the buffer memory is updated to the nonvolatile memory device 120. When an unexpected situation occurs before the mapping stored in the buffer memory is written to the nonvolatile memory device 120 (Yes in S130), operation S140 is performed. When no unexpected situation occurs (No in S130 ), operation S150 is performed.

[0055] In operation S140, the memory controller 110 recovers the mapping that is not updated in the buffer memory. To this end, the memory controller 110 may read the check data stored in the non-volatile memory device 120. The memory controller 110 may recover at least a portion of the mapping based on the check data. The memory controller 110 may predict a plurality of logical addresses and a plurality of physical addresses corresponding to the data written before operation S110, and a logical address and a physical address corresponding to the check data. Here, the plurality of logical addresses and the plurality of physical addresses may be calculated assuming that the address corresponding to the check data is sequential with the previous address.

[0056] In operation S150, the memory controller 110 updates the restored mapping into the nonvolatile memory device 120. The memory controller 110 may write the restored mapping information into the nonvolatile memory device 120 during the flushing period. In this case, even if an unexpected situation such as a sudden power failure occurs, the operation of the storage device 100 can be easily performed by reading the mapping from the nonvolatile memory device 120.

[0057] Figure 5 Shown based on Figure 4 A diagram of the operation of writing data using the mapping. Figure 5 , the logical address is converted into a physical address through the (first) mapping M1, and the data is written into the first memory block BLK1 or the second memory block BLK2. The first memory block BLK1 and the second memory block BLK2 are included in the reference Figures 1 to 4 The non-volatile memory device 120 is described.

[0058] Mapping M1 includes information related to a logical block number LBN, a physical block number PBN, a logical page number LPN, and a physical page number PPN. The logical block number LBN may be associated with block information of a logical address provided from a host along with a write command and write data. The physical block number PBN may be associated with block information of a physical address used in the nonvolatile memory device 120. The logical page number LPN may be associated with page information of a logical address. The physical page number PPN may be associated with page information of a physical address.

[0059] For ease of description, it is assumed that a first physical block number having a value of "1" corresponds to a first memory block BLK1, and a second physical block number having a value of "2" corresponds to a second memory block BLK2. In addition, it is assumed that a first physical page number, a second physical page number, a third physical page number, and a fourth physical page number having values ​​of "1", "2", "3", and "4", respectively, correspond to a first page PG1, a second page PG2, a third page PG3, and a fourth page PG4, respectively.

[0060] Assume that the first memory block BLK1 is a memory area where data is written non-sequentially (or randomly). The first data corresponding to the first logical block number and the first logical page number are written to the first page PG1 of the first memory block BLK1. The second data corresponding to the first logical block number and the second logical page number are written to the second page PG2 of the first memory block BLK1. The third data corresponding to the first logical block number and the third logical page number are written to the third page PG3 of the first memory block BLK1. The fourth data corresponding to the first logical block number and the second logical page number are written to the fourth page PG4 of the first memory block BLK1. In this case, the physical page number corresponding to the second logical page number changes from "2" to "4". The second page PG2 of the first memory block BLK1 may be an invalid page.

[0061] Assume that the second memory block BLK2 is a memory area where data is written sequentially. The first data corresponding to the second logical block number and the first logical page number is written to the first page PG1 of the second memory block BLK2. The second data corresponding to the second logical block number and the second logical page number is written to the second page PG2 of the second memory block BLK2. The third data corresponding to the second logical block number and the third logical page number is written to the third page PG3 of the second memory block BLK2. The fourth data corresponding to the second logical block number and the fourth logical page number is written to the fourth page PG4 of the second memory block BLK2. The first page PG1 to the fourth page PG4 of the second memory block BLK2 can be valid pages.

[0062] Next, the operation of the storage device in the case of non-sequentially writing data (eg, Figure 5 The operation of the storage device in the case of sequentially writing data (for example, a write operation of the first memory block BLK1) and the operation of the storage device in the case of sequentially writing data (for example, Figure 5 (a write operation of the second memory block BLK2).

[0063] Figure 6 shows that writing to Figure 5 An exemplary diagram of data in a first memory block. Figure 6 , the data partially written to the first to fifth pages PG1 to PG5 are shown in FIG. 1. The write data and the verification data are written to the corresponding pages PG1 to PG5. Although the fifth page PG5 of the first memory block BLK1 is not in Figure 5 , but a description will be given under the condition that the first memory block BLK1 also includes the fifth page PG5.

[0064] The write data may be data provided from the host so as to be stored at the first page PG1 to the fifth page PG5, respectively, based on the write command and the logical address. The first page PG1 to the fifth page PG5 store the first write data WD1 to the fifth write data WD5, respectively. The write data is stored at a portion of the page. Each of the first page PG1 to the fifth page PG5 may include a spare area in which the write data is not stored.

[0065] The check data may be stored in the spare area of ​​each of the first to fifth pages PG1 to PG5. Since the check data is stored in the spare area of ​​the nonvolatile memory device 120, the check data is not lost when the mapping is lost due to an unexpected situation. Figure 1 The write verification manager 140 generates the verification data, and the memory controller 110 can read the verification data to recover the lost mapping.

[0066] Verification data corresponding to the first write data WD1 may be stored in the second page PG2. Figure 6 As shown in FIG. 1 , the verification data corresponding to the first write data WD1 can be generated while the second write data WD2 is written. In the case where the verification data corresponding to the first write data WD1 is stored to the first page PG1 instead, the write operation associated with the first page PG1 can be delayed until the verification data is generated. However, according to Figure 6 In the embodiment, while writing the second write data WD2, the verification data corresponding to the first write data WD1 is generated and then stored in the second page PG2, thereby reducing the delay of the write operation. Similarly, the verification data corresponding to the second write data WD2 to the fourth write data WD4 can be stored in the third page PG3 to the fifth page PG5 respectively.

[0067] The verification data may include sequence data Seq. The sequence data Seq may be generated based on the sequentiality of the logic addresses corresponding to the verification data. Figure 1 The write verification manager 140 may determine the sequentiality of the logical address and the physical address corresponding to the write data, and may generate the value of the sequence data Seq. In the case where the logical address and the physical address have sequentiality, the sequence data Seq may have a sequential identification value SE. If there is no sequentiality, the sequence data Seq may have a non-sequential identification value NSE. For example, the sequential identification value SE may be "1", and the non-sequential identification value NSE may be "0". However, the inventive concept is not limited thereto.

[0068] For details, refer to Figure 5 and Figure 6, since there is no page before the first page PG1, the sequence data stored at the second page PG2 has a non-sequential identification value NSE. Since the logical address and physical address of the second page PG2 are "2", and the logical address and physical address of the first page PG1 are "1", the sequence data stored at the third page PG3 has a sequential identification value SE. Since the logical address and physical address of the third page PG3 are "3", and the logical address and physical address of the second page PG2 are "2", the sequence data stored at the fourth page PG4 has a sequential identification value SE. Since the logical address of the fourth page PG4 is "2", and the logical address of the third page PG3 is "3", the sequence data stored at the fifth page PG5 has a non-sequential identification value NSE.

[0069] The sequence data Seq may be used to determine a reference address. Hereinafter, a logical address of a page having a non-sequential identification value NSE is defined as a reference logical address, or in other words, a reference address. Later, in an operation of restoring the mapping, the memory controller 110 may read the last page that last stored data and the page before the page storing the non-sequential identification value NSE, and may skip reading the remaining pages.

[0070] The verification data may include offset data Offset. The offset data may be generated based on a difference between a logical address corresponding to the write data and a reference logical address. Figure 1 The write verification manager 140 can determine the value of the offset data. Figure 5 and Figure 6 , since the reference logical address (i.e., reference address) corresponding to the first write data WD1 to the third write data WD3 is "1" (because the first page PG1 has the non-sequential identification value NSE in this case), the offset data stored at the second page PG2 to the fourth page PG4, respectively, have values ​​of "0" to "2". In addition, since the reference logical address corresponding to the fourth write data WD4 is "2", the offset data stored at the fifth page PG5 may have a value of "0". In this case, the addresses of the second page PG2 and the third page PG3 may be characterized as target addresses, and the verification data of the second page PG2 and the third page PG3 may be characterized as target verification data, respectively.

[0071] The offset data can be used to determine the pages to be skipped in the operation of restoring the mapping. That is, the offset data can be used to determine the pages that can be skipped and do not need to be read during the operation of restoring the mapping. The number of pages to be skipped can correspond to the value of the offset data. For example, in order to restore the mapping, in the case of reading the fifth page PG5, since the value of the offset data is "0", the fourth page PG4 can be read without skipping the page. In the case of reading the fourth page PG4, since the value of the offset data is "2", the second page PG2 and the third page PG3 can be skipped. In the case of reading the fourth page PG4, it can be predicted that the third logical address is 3, the second logical address is "2" obtained by subtracting "1" from "3", and the first logical address is "1" obtained by subtracting "2" from "3".

[0072] The verification data may include an address ADDR. Here, the address ADDR may be a logical address. In detail, the address ADDR may be a logical page number. For example, in the case of reading the fifth page PG5, it is difficult to predict the logical page number corresponding to the physical page number having the value "4" only by using the offset data "0". Therefore, in order to calculate the logical address of the non-sequential read data, the address ADDR may be included in the verification data. However, the inventive concept is not limited thereto. For example, the verification data may include data for predicting a non-sequential logical address instead of the address ADDR.

[0073] In an embodiment, the check data stored at the first page PG1 may not be marked but may have a specified value. For example, the sequence data Seq may have a non-sequential identification value NSE (eg, "0"), and the value of the offset data may be "0".

[0074] Figure 7 shows that writing to Figure 5 An exemplary diagram of data in a second memory block. Figure 7 2 shows data sequentially written to the first to fifth pages PG1 to PG5. Each of the first to fifth pages PG1 to PG5 may include write data and verification data. Figure 5 , but a description will be given under the condition that the second memory block BLK2 also includes the fifth page PG5.

[0075] and Figure 6 Similarly, the first to fifth pages PG1 to PG5 store the first to fifth write data WD1 to WD5, respectively. Verification data corresponding to the first to fourth write data WD1 to WD4 may be stored in the second to fifth pages PG2 to PG5, respectively. Verification data may be stored in a spare area of ​​each of the first to fifth pages PG1 to PG5.

[0076] The verification data may include sequence data Seq. The sequence data Seq may be generated based on the sequentiality of the logical address corresponding to the verification data. Since there is no page before the first page PG1, the sequence data stored at the second page PG2 may have a non-sequential identification value NSE. Since the data is written to the second memory block BLK2 in the order of the logical page number LPN and the physical page number PPN, the sequence data Seq stored at each page in the third page PG3 to the fifth page PG5 has a sequential identification value SE.

[0077] The verification data may include offset data Offset. The offset data may be generated based on a difference between a logical address corresponding to the write data and a reference logical address. Since the data is written to the second memory block BLK2 in the order of the logical page number LPN and the physical page number PPN, the offset data stored at the second page PG2 to the fifth page PG5, respectively, may have values ​​of "0" to "3".

[0078] In the case of performing a sequential write operation, the check data may not include an address. In the case where the write data is written sequentially in the order of the address, the logical page number may be predicted based on the offset data. Since the correlation between the value of the offset data and the logical address is uniform across all pages, the logical page number may be predicted based on the offset data. In an embodiment, the check data stored at the first page PG1 may not be marked, but may be as follows: Figure 6 That has the specified value.

[0079] Figure 8 Shows Figure 6 or Figure 7 A flowchart of an operating method for a storage device for generating verification data. Figure 8 The operation can be done by Figure 1 The write verification manager 140 included in the memory controller 110 is executed. Figure 6 and Figure 7 As described above, after writing the write data corresponding to the verification data into the nonvolatile memory device 120, and during processing of the next write data provided from the host, the execution Figure 8 For ease of description, reference will be made to Figure 1 Reference numerals / symbol pairs Figure 8 Give a description.

[0080] In operation S210, the write verification manager 140 determines the sequentiality of the addresses corresponding to the write data. The write verification manager 140 may compare the address corresponding to the data written immediately before the write data (hereinafter referred to as the "first address") with the address corresponding to the write data currently written (hereinafter referred to as the "second address"). For example, the first address may include a first logical page number and a first physical page number. The second address may include a second logical page number and a second physical page number. In the case where the second physical page number sequentially follows the first physical page number and the second logical page number sequentially follows the first logical page number, the write verification manager 140 may determine that the address has continuity.

[0081] In operation S210, the write verification manager 140 generates sequence data corresponding to the write data based on the result of determining continuity. If the address is determined to have continuity, the sequence data may have a sequential identification value. If the address is determined to have no continuity, the sequence data may have a non-sequential identification value.

[0082] In operation S220, the write verification manager 140 calculates an offset of an address corresponding to the write data. The offset data may be a difference between a logical address (i.e., a logical page number) corresponding to the write data and a reference logical address (i.e., a reference logical page address). The reference logical address may be a logical address of the write data having a non-sequential identification value in operation S210. The write verification manager 140 may generate offset data having a value obtained by an offset calculation operation. For example, after writing the write data corresponding to the reference logical address, the write verification manager 140 may generate offset data by accumulating the offset value plus "1" each time the write data is provided from the host.

[0083] In operation S230, the write verification manager 140 generates verification data. The verification data may include the sequence data generated in operation S210 and the offset data generated in operation S220. However, the inventive concept is not limited thereto. For example, if necessary, the write verification manager 140 may also include a logical address in the verification data. In addition, if necessary, the verification data corresponding to the specific write data may include a logical address instead of the offset data. The generated verification data may be stored in a spare area of ​​the non-volatile memory device 120 together with the write data in the next write operation.

[0084] Fig. 9 Shown is the Figure 8 A flowchart of an operation method of restoring a mapped storage device using verification data generated by an operation. Fig. 9 The operation can be done by Figure 1 The memory controller 110 performs. For example, Fig. 9The operations may be performed by flash translation layer 130 included in memory controller 110 . Fig. 9 can be considered as a detailed description Figure 4 For ease of description, reference will be made to Figure 1 Reference numerals / symbol pairs Fig. 9 Give a description.

[0085] In operation S310, the memory controller 110 reads the last valid page. The last valid page may be a page to which data is last written among a plurality of pages included in a memory area (or a memory block). For example, the last valid page may be a page with a maximum physical page number among pages to which data is written. In the case where a mapping is lost due to a sudden power failure, it may be difficult for the memory controller 110 to immediately detect the last valid page. For example, the memory controller 110 may detect the last valid page by binary search, but is not limited thereto.

[0086] In operation S320, the memory controller 110 recovers the mapping data based on the check data stored at the last valid page. The mapping data may include a logical address and a physical address of at least one of the multiple pages. The address to be recovered by the memory controller 110 may be determined based on the value of the offset data included in the check data. That is, the address corresponding to at least one page may be recovered based on the offset data value. For example, in the case where the offset data value is "0", only the address corresponding to the last valid page may be recovered. As another example, in the case where the offset data value is "2", the address corresponding to the last valid page and the address corresponding to two additional pages may be recovered.

[0087] In operation S330, the memory controller 110 determines whether the read page is a page with continuity. The memory controller 110 may determine the continuity of the read page based on the offset data value or the sequence data. For example, in the case where the offset data value is "0" or the sequence data has a non-sequential identification value, the memory controller 110 may determine that the read page does not have continuity. As another example, in the case where the offset data value is greater than "0" or the sequence data has a sequential identification value, the memory controller 110 may determine that the read page has continuity. When it is determined that the read page has continuity (yes in S330), operation S340 is performed. When it is determined that the read page does not have continuity (no in S330), operation S350 is performed.

[0088] In operation S340, the memory controller 110 skips at least one page based on the offset data. Here, the direction of the skip is the reverse (backward) direction starting from the address. For example, in the case where the offset data value is "2", two pages corresponding to two previous addresses can be skipped starting from the read page. In operation S320, since the address of the skipped page is restored, it is not necessary to read the skipped page in order to restore the mapping. Therefore, compared with the case where all pages are read to restore the mapping, the time spent to restore the mapping is reduced.

[0089] In operation S350, the memory controller 110 determines whether the mapping data associated with all pages is restored based on the result of reading the page or skipping the page. For example, the memory controller 110 may determine whether to read or skip the first page as the page with the smallest physical address. When the first page is read or skipped (Yes in S350), operation S360 is performed. For example, when the page read in operation S310 is the first page, operation S360 is performed. As another example, when the first page is skipped in operation S340, operation S360 is performed.

[0090] When the first page is not read and not skipped (No in S350), operation S310 is performed. For example, when the page read in operation S310 does not have continuity and is not the first page, operations S310 to S350 are performed again. For example, when the page determined to be skipped in operation S340 is not the first page, operations S310 to S350 are performed again. In the case of performing operation S310 again, the memory controller 110 may read the last valid page relative to the page before the read page or relative to the page that is not skipped.

[0091] In operation S360, the memory controller 110 generates a map that is erased due to an unexpected situation (e.g., a sudden power failure). All map data corresponding to valid pages can be restored through operations S310 to S350. The memory controller 110 can reflect or input all restored map data to the map. For example, the memory controller 110 can record the restored map data in the form of a mapping table. The generated map can be written to the non-volatile memory device 120 during the flushing period.

[0092] Fig.10 The case where data is written non-sequentially (e.g. Figure 6 For ease of description, reference will be made to Fig. 9 The operation describes the process of restoring the mapping.

[0093] It is assumed that the memory area (or memory block) includes the first page PG1 to the sixteenth page PG16. In addition, it is assumed that data is pre-written at the first page PG1 to the tenth page PG10. As described above, in the case where the verification data is written to the next page, the data can be written to the first page PG1 to the eleventh page PG11. However, for the convenience of description, Fig.10 This condition is omitted in . It is assumed that the offset data Offset and the address ADDR marked at each page of the first page PG1 to the tenth page PG10 correspond to the marked page. That is, for example, the verification data generated for the first page PG1 includes the offset data "0" and the address ADDR "1". Here, the address ADDR means a logical address (for example, a logical page number).

[0094] refer to Fig.10 and Fig. 9 In operation S310, the last valid page is read. The last valid page is the tenth page PG10. In an embodiment, the last valid page can be detected by binary search. In this case, the memory controller 110 can confirm the tenth page PG10 as the last valid page by determining that the eighth page PG8 is a valid page, determining that the twelfth page PG12 is an invalid page, determining that the tenth page PG10 is a valid page, and determining that the eleventh page PG11 is an invalid page.

[0095] refer to Fig.10 and Fig. 9 In operation S320, a portion of the mapping is restored, and Fig.10 is shown as the first recovery map RM1. The offset value of the tenth page PG10 is "2", and its logical address is "5". Therefore, the memory controller 110 can link the physical page number "10" corresponding to the tenth page PG10 to the logical page number "5". Since the offset value is "2", the memory controller 110 can predict that the logical page number "4" is linked to the physical page number "9", and the logical page number "3" is linked to the physical page number "8". Therefore, the eighth page PG8 and the ninth page PG9 are skipped based on the offset value "2". In other words, the portion of the mapping corresponding to the eighth page PG8 and the ninth page PG9 can be determined by the offset value based on the last valid page PG10, so the eighth page PG8 and the ninth page PG9 are not read.

[0096] As a result of the skip, the seventh page PG7 is read. The offset value of the seventh page PG7 is "6", and its logical address is "7". Therefore, the memory controller 110 can link the physical page number "7" to the logical page number "7". Since the offset value is "6", generally speaking, the logical page number "1" to the logical page number "6" can be linked to the physical page number "1" to the physical page number "6" respectively in a one-to-one correspondence. However, since the physical page numbers associated with the logical page numbers "3" to the logical page number "5" have been restored, the recovery of the logical page numbers "3" to the logical page number "5" is omitted. The reason is that due to the eighth page PG8 to the tenth page PG10, the third page PG3 to the fifth page PG5 are considered to be invalid pages. Therefore, according to the read operation of the seventh page PG7, the physical page numbers such as Fig.10 The mapping of the second restoration map RM2 shown in .

[0097] The mapping may be restored by reading the tenth page PG10 and the seventh page PG7. Therefore, the mapping may be restored in a shorter time than the time in which the mapping is restored by sequentially reading the first to tenth pages PG1 to PG10.

[0098] Fig.11 The case where data is written sequentially (eg Figure 7 Schematic diagram of the process of restoring the mapping in the case of Fig.10 In that case, it is assumed that the memory area (or memory block) includes the first page PG1 to the sixteenth page PG16. It is assumed that the offset data Offset and the address ADDR marked at each of the first page PG1 to the tenth page PG10 correspond to the marked page. Here, the address ADDR means a logical address (eg, a logical page number).

[0099] refer to Fig.11 , read the last valid page. The last valid page is the tenth page PG10. In an embodiment, the last valid page can be detected by binary search, which refers to Fig.10 Described.

[0100] Recovering such as Fig.11The mapping of the recovery map RM shown in . The offset value of the tenth page PG10 is "9", and its logical address is "10". In the case of sequentially writing data, the offset data and the logical address have a uniform correlation. Therefore, the memory controller 110 can link the physical page number "10" corresponding to the tenth page PG10 to the logical page number "10". Since the offset value is "9", the logical page number "1" to the logical page number "9" can be linked to the physical page number "1" to the physical page number "9" respectively in a one-to-one correspondence. The first page PG1 to the ninth page PG9 are skipped based on the offset value "9". In other words, the portion of the mapping corresponding to the first page PG1 to the ninth page PG9 can be determined by the offset value based on the last valid page PG10, so the first page PG1 to the ninth page PG9 are not read. Since the first page PG1 ( Fig. 9 The result in S350 is yes), so the recovery mapping RM is confirmed.

[0101] Since the mapping is restored by reading the tenth page PG10 without reading other additional pages, the mapping can be restored in a shorter time than the time in which the mapping is restored by sequentially reading the first to tenth pages PG10 .

[0102] According to an embodiment of the inventive concept, a memory device including a nonvolatile memory device and an operating method thereof can reduce the time required to restore a mapping by reading check data stored at certain pages of the nonvolatile memory device and restoring a mapping associated with a memory region.

[0103] While the inventive concepts have been described with reference to exemplary embodiments thereof, it will be apparent to those skilled in the art that various changes and modifications may be made thereto without departing from the spirit and scope of the inventive concepts as described in the appended claims.

Claims

1. A storage device, include: A nonvolatile memory device comprising a memory region including a first page corresponding to a first physical address and a second page corresponding to a second physical address; as well as Memory controller; wherein, after writing the first data at the first page based on a first write command corresponding to the first logical address, the memory controller is configured to: write the second data at the second page based on a second write command corresponding to the second logical address, and generate first verification data corresponding to the first data and second verification data corresponding to the second data, The memory controller is further configured to restore the first physical address and the second physical address and the first logical address and the second logical address based on the second verification data, Wherein, the second verification data includes: Sequence data has a value based on continuity between the first logical address and the second logical address.

2. The storage device according to claim 1, in, When the second physical address is a physical address subsequent to the first physical address and the second logical address is a logical address subsequent to the first logical address, the sequence data is generated to have a sequence identification value.

3. The storage device according to claim 1, in, When a third write command received before the first write command corresponds to a third logical address before the first logical address, the first verification data is generated to include sequence data having a sequential identification value; and when the third write command does not correspond to the third logical address, the first verification data is generated to include sequence data having a non-sequential identification value.

4. The storage device according to claim 1, in, The second check data includes offset data having a value based on a difference between a reference logical address and the second logical address.

5. The storage device according to claim 4, in, An address to be restored by the second verification data is determined based on a value of the offset data.

6. The storage device according to claim 1, in, The memory controller is configured to write the first verification data together with the second data to the second page based on the second write command.

7. The storage device according to claim 1, in, The memory controller is configured to write the first verification data and the second verification data to different pages of the memory area respectively; as well as After recovering the first physical address and the second physical address and the first logical address and the second logical address based on the second verification data, the memory controller is further configured to skip reading the first verification data after reading the second verification data from the memory area.

8. The storage device according to claim 1, in, The memory controller is configured to write the first verification data and the second verification data to different pages of the memory area respectively; as well as Wherein, after recovering the mapping including the first physical address and the second physical address and the first logical address and the second logical address based on the second verification data, the memory controller is also configured to read the last page corresponding to the last logical address from multiple valid pages of write data of the memory area, and then read the page storing the first verification data.

9. The storage device according to claim 8, in, The memory controller is configured to detect the last page through a binary search after restoring the mapping.

10. The storage device according to claim 1, in, When a mapping including the first and second physical addresses and the first and second logical addresses is erased in response to a power-off of the memory device, the memory controller is configured to restore the mapping.

11. A method for operating a storage device, the storage device comprising a memory controller and a non-volatile memory device, the method include: Based on a first write command corresponding to a reference address, the memory controller writes first data at a first page of the nonvolatile memory device; Based on a second write command corresponding to a target address, the memory controller writes second data at a second page of the nonvolatile memory device; as well as Target verification data corresponding to the second data is generated by the memory controller based on continuity between the target address and an address corresponding to a third write command preceding the target address and based on a difference between the reference address and the target address.

12. The method according to claim 11, in, Generating the target verification data includes: generating sequence data corresponding to the second data based on the continuity; and Offset data corresponding to the second data is generated based on the difference.

13. The method according to claim 11, in, A difference between the reference address and an address corresponding to a fourth write command preceding the reference address is different from a difference between the reference address and an address corresponding to a fifth write command following the reference address.

14. The method according to claim 11, further comprising: include: After writing the second data at the second page, third data and the target verification data are written to a third page of the nonvolatile memory device based on a fourth write command.

15. The method according to claim 11, further comprising: include: restoring a mapping by determining the reference address and the target address erased from a buffer memory based on the target check data; as well as The restored map is written to the non-volatile memory device.

16. A method for operating a storage device, the method include: Writing data into a memory area including a plurality of pages in order of physical page numbers; generating check data corresponding to each of the plurality of pages; reading a last page storing data among the plurality of pages; as well as restoring a portion of a mapping indicating a physical page number corresponding to a logical page number of a page of the plurality of pages based on parity data corresponding to the last page in the generated parity data, The verification data includes an offset value between a physical page number of a reference page among the plurality of pages and a physical page number corresponding to the verification data.

17. The method according to claim 16, in, Restoring a portion of the mapping includes determining mapping information corresponding to pages of the plurality of pages in an order from the last page to the reference page while decreasing the offset value.

18. The method according to claim 16, further comprising: include: At least another portion of the mapping is restored based on parity data of the generated parity data corresponding to a page of the plurality of pages that sequentially precedes the reference page.

19. The method according to claim 18, in, Restoring another portion of the mapping includes skipping determining the physical page number corresponding to the target logical page number when determining the physical page number corresponding to the target logical page number in restoring the portion of the mapping.