Apparatus and method for processing different types of data in a memory system
By managing user blocks and meta blocks based on logical addresses in the memory system, the problems of high FTL program code complexity and ineffective resource utilization in the existing technology are solved, and unified processing of different types of data and efficient resource utilization are achieved.
Patent Information
- Application Number
- CN201911285168.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-18
- Filing Date
- 2019-12-13
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-12-13
AI Technical Summary
When existing memory systems process different types of data, the FTL program code is highly complex and inconvenient to operate, making it difficult to achieve efficient resource utilization.
Adopt an integrated approach based on logical addresses to manage user blocks and meta-blocks. User data and meta-data are stored in different storage blocks through the controller, and merge operations are performed through logical address mapping to reduce program code overlap and improve resource utilization. efficiency.
It reduces the complexity and overlap of FTL program codes, realizes unified processing of different types of data, and improves the resource allocation and usage efficiency of the memory system.
Smart Images

Figure CN111831578B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of Korean Patent Application No. 10-2019-0045679, filed on April 18, 2019, which is hereby incorporated by reference in its entirety. Technical Field
[0003] Various embodiments relate to a memory system and an operating method thereof, and more particularly, to a memory system and an operating method thereof capable of processing data stored in a plurality of memory blocks in the memory system regardless of data types. Background Art
[0004] The computer environment paradigm has shifted to ubiquitous computing systems that can be used anywhere, anytime. As a result, the use of portable electronic devices such as mobile phones, digital cameras, and notebook computers has grown rapidly. These portable electronic devices typically use a memory system having one or more memory devices to store data. The memory system can be used as a primary storage device or an auxiliary storage device of the portable electronic device.
[0005] Memory systems have no moving parts and therefore provide excellent stability, durability, high information access speed, and low power consumption. Examples of memory systems having these advantages include Universal Serial Bus (USB) memory devices, memory cards with various interfaces, and solid-state drives (SSDs). Summary of the invention
[0006] Various embodiments relate to a memory system capable of managing both a user block and a metablock in an integrated manner based on a logical address, and an operating method thereof.
[0007] In addition, various embodiments relate to a memory system and an operating method thereof which can control user data using a first logical address used in a host or a computing device and can control metadata by assigning a second logical address not used in the host or the computing device.
[0008] It should be understood that the technical objectives to be achieved by the present disclosure are not limited to the above-mentioned technical objectives, and for ordinary technicians in the field to which the present disclosure belongs, other technical objectives not mentioned herein will be obvious through the following description.
[0009] In an embodiment, a memory system may include: a nonvolatile memory including a plurality of memory blocks, each memory block including a plurality of pages; and a controller adapted to control a nonvolatile memory device to store user data received from a host in a first block among the memory blocks, generate metadata corresponding to the storage of the user data, and store the metadata in a second block among the memory blocks. The controller may map a first logical address used in the host to a physical address of the first block, and may map a second logical address not used in the host to a physical address of the second block, the first logical address and the second logical address being consecutive.
[0010] The controller may share a range of first logical addresses with the host, may select a first block among the memory blocks in response to the first logical address received from the host, and may map a physical address of the selected first block to the first logical address.
[0011] The controller can set a range of a second logical address, which does not overlap with the range of the first logical address and is continuous with the range of the first logical address; and when generating metadata, the controller can select a second block among the storage blocks in response to the second logical address, and can map the physical address of the selected second block to the second logical address.
[0012] The controller may move valid data of a first source block corresponding to a first logical address to a first target block corresponding to the first logical address, and may move valid data of a second source block corresponding to a second logical address to a second target block corresponding to the second logical address.
[0013] The controller can set a reference logical address to identify the first logical address and the second logical address; and the controller can select a pre-source block corresponding to a predetermined condition for a merge operation among the storage blocks, can compare the logical address of the pre-source block with the reference logical address, and can identify the pre-source block as one of the first source block and the second source block based on the comparison result.
[0014] When a free block among the storage blocks is selected as a pre-target block, the controller can identify the pre-target block as a first target block by mapping the physical address of the pre-target block to a first logical address, and can identify the pre-target block as a second target block by mapping the physical address of the pre-target block to a second logical block.
[0015] When an open block among the storage blocks is selected as a pre-target block, the controller can identify the pre-target block corresponding to the first logical address as the first target block by comparing the logical address of the pre-target block with the reference logical address, and can identify the pre-target block corresponding to the second logical address as the second target block.
[0016] The controller may set a specific value greater than a maximum value of a range of the first logical address as a minimum value of a range of the second logical address, and may set the specific value as a value of the reference logical address.
[0017] The controller may set a specific value, which is smaller than a minimum value of a range of the first logical address, as a maximum value of a range of the second logical address, and may set the specific value as a value of the reference logical address.
[0018] When the predetermined condition is whether the number of valid pages is less than or equal to a reference number, the controller may select the pre-source block to perform garbage collection as a merge operation; when the predetermined condition is whether the read count is less than or equal to a first reference count, the controller may select the pre-source block to perform read recycling as a merge operation; and when the predetermined condition is whether the program / erase cycle count is greater than or equal to a second reference count, the controller may select the pre-source block to perform wear leveling as a merge operation.
[0019] In an embodiment, a method of operating a memory system, the memory system includes a non-volatile memory device, the non-volatile memory device includes multiple storage blocks, each storage block includes multiple pages; the method may include: storing user data received from a host in a first block among the storage blocks, the physical address of the first block is mapped to a first logical address used in the host; generating metadata corresponding to the storage of the user data; and storing the metadata in a second block among the storage blocks, the physical address of the second block is mapped to a second logical address not used in the host; the first logical address and the second logical address are consecutive.
[0020] Storing the user data may include: sharing a range of first logical addresses with the host; and selecting a first block among the storage blocks in response to the first logical address received from the host, and mapping a physical address of the selected first block to the first logical address.
[0021] Storing metadata may include: setting a range of a second logical address, which range of the second logical address does not overlap with the range of the first logical address and is continuous with the range of the first logical address; and when generating metadata, selecting a second block among the storage blocks in response to the second logical address, and mapping the physical address of the selected second block to the second logical address.
[0022] The method may also include: selecting a source block and a target block among the storage blocks to perform a merge operation of moving valid data of the source block to the target block; wherein selecting the source block and the target block includes: when selecting a first source block corresponding to a first logical address, selecting a first target block corresponding to the first logical address, and moving valid data of the first source block to the first target block; and when selecting a second source block corresponding to a second logical address, selecting a second target block corresponding to the second logical address, and moving valid data of the second source block to the second target block.
[0023] Selecting a source block and a target block may include: setting a reference logical address to identify a first logical address and a second logical address; selecting a source block corresponding to a predetermined condition for a merge operation among storage blocks; comparing the logical address of a pre-source block selected in a pre-selection step with the reference logical address; and identifying the pre-source block as one of the first source block and the second source block based on the comparison result.
[0024] When a free block among the storage blocks is selected as a pre-target block, selecting the source block and the target block may further include: identifying the pre-target block as a first target block by mapping the logical address of the pre-target block to a first logical address; and identifying the pre-target block as a second target block by mapping the physical address of the pre-target block to a second logical address.
[0025] When an open block among the storage blocks is selected as a pre-target block, selecting the source block and the target block may further include: comparing the logical address of the pre-target block with the reference logical address; identifying the pre-target block corresponding to the first logical address as a first target block based on the comparison result; and identifying the pre-target block corresponding to the second logical address as a second target block based on the comparison result.
[0026] Setting the reference logical address may include setting a specific value greater than a maximum value of a range of the first logical address as a minimum value of a range of the second logical address, and setting the specific value as a value of the reference logical address.
[0027] The setting of the reference logical address may include setting a specific value smaller than a minimum value of a range of the first logical address as a maximum value of a range of the second logical address, and setting the specific value as a value of the reference logical address.
[0028] Selecting a pre-source block may include: when a predetermined condition is whether the number of valid pages is less than or equal to a reference number, selecting the pre-source block to perform garbage collection as a merge operation; when a predetermined condition is whether a read count is less than or equal to a first reference count, selecting the pre-source block to perform read recycling as a merge operation; and when a predetermined condition is whether a program / erase cycle count is greater than or equal to a second reference count, selecting the pre-source block to perform wear leveling as a merge operation.
[0029] In an embodiment, a memory system may include: a memory device including a plurality of storage blocks, the memory device including a first group of blocks and a second group of blocks; a controller adapted to: receive normal data and a first logical address associated with the normal data from a host; store the normal data in a first block among the first group of blocks, the first block having a first physical address mapped to the first logical address; generate metadata for the normal data in a second block among the second group of blocks; store the metadata in a second block among the second group of blocks, the second block having a second physical address mapped to a virtual logical address; and perform garbage collection operations on the first group of blocks and the second group of blocks.
[0030] The effects of the device and operation method according to the embodiments of the present disclosure are as follows:
[0031] In a memory system according to an embodiment of the present disclosure, when schemes for processing user data input from a host or a computing device and metadata generated in the memory system according to the storage of the user data are different from each other, in order to reduce the overlap and complexity of the FTL (Flash Translation Layer) program code, basically the same scheme is used to process different types of data, thereby reducing the overlap and complexity of the FTL program code and easily implementing debugging.
[0032] In addition, in the memory system according to the embodiment of the present disclosure, because the user blocks for storing user data input from the host or the computing device are managed by the first logical addresses used in the host or the computing device, and the meta blocks for storing metadata generated in the memory system according to the storage of the user data are managed by the second logical addresses that are not used in the host or the computing device, the operation of managing the user blocks and the meta blocks in an integrated manner based on the logical addresses can have no impact on the operation of the host or the computing device.
[0033] Furthermore, in the memory system according to the embodiment of the present disclosure, since the operations to be performed in the memory system do not need to be performed separately in different schemes according to the type of data, not only can the margin of the operations to be performed in the memory system be easily determined, but also the efficiency of allocating and using resources in the memory system can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a diagram illustrating an operation of managing user blocks and meta blocks in an integrated manner according to an embodiment of the present disclosure.
[0035] Figure 2 The present invention is a diagram showing a data processing system including a memory system according to an embodiment of the present disclosure.
[0036] Figure 3The diagram is a diagram showing a controller in a memory system according to an embodiment of the present disclosure.
[0037] Figure 4 A diagram illustrating a data processing operation to be performed on a memory device in a memory system according to an embodiment of the present disclosure.
[0038] Figure 5 The diagram is a diagram illustrating an operation of managing user blocks and metablocks in an integrated manner based on logical addresses according to an embodiment of the present disclosure.
[0039] Figure 6 A diagram illustrating a merge operation of a memory system according to an embodiment of the present disclosure.
[0040] Figure 7 The flowchart is a flowchart showing a first operation in a merge operation performed in a memory system according to an embodiment of the present disclosure.
[0041] Figure 8 The flowchart is a flowchart showing a second operation in a merge operation performed in a memory system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] The various embodiments will be described in more detail below with reference to the accompanying drawings. However, the present invention can be implemented in different forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure will be thorough and complete, and will fully convey the scope of the present invention to those skilled in the art. Throughout the present disclosure, in the various drawings and embodiments of the present invention, the same reference numerals refer to the same parts.
[0043] It should be understood that the drawings are simplified representations of the described devices and may not include well-known details in order to avoid obscuring aspects of the present invention.
[0044] It should also be noted that features presented in one embodiment may be used with one or more features of another embodiment without departing from the scope of the present invention.
[0045] Figure 1 A diagram illustrating an operation of managing user blocks and meta blocks in an integrated manner according to an embodiment of the present disclosure.
[0046] Reference Figure 1 , the data processing system 100 may include a host 102 and a memory system 110 that may interoperate. The host 102 may be a computing device that may be implemented in the form of a mobile device, a computer, or a server. The memory system 110 may receive a command from the host 102, and may store or output data corresponding to the received command.
[0047] The memory system 110 may have a storage space that may include a nonvolatile memory unit. For example, the memory system 110 may be implemented in the form of a flash memory or a solid state drive (SSD).
[0048] In order to store the data requested by the host 102, the memory system 110 may perform a mapping operation to connect the file system used by the host 102 with the storage space including the non-volatile memory unit. The address of the data according to the file system used by the host 102 may be referred to as a logical address or a logical block address. The address of the data in the storage space including the non-volatile memory unit may be referred to as a physical address or a physical block address. When the host 102 sends the logical address together with the write command and the data to the memory system 110, the memory system 110 may search for the storage space for storing the data, may map the physical address of the searched storage space using the logical address, and may program the data into the searched storage space. When the host 102 sends the logical address together with the read command to the memory system 110, the memory system 110 may search for the physical address mapped to the logical address, and may output the data stored in the searched physical address to the host 102.
[0049] The memory system 110 may include a controller 130 and a non-volatile memory device 150. The non-volatile memory device 150 may include a plurality of memory blocks, including memory blocks BLOCK<0:9>, BLOCK<10:19>, BLOCK<20:29>, BLOCK<30:39>, and BLOCK<40:49>. The controller 130 may include a flash translation layer (FTL) component 40 and a memory 144.
[0050] The host 102 may manage the user data NORMAL_DATA by using the first logical address LBA1. The controller 130 may use the first block among the memory blocks BLOCK<0:9> to BLOCK<40:49> in the memory device 150 to store the user data NORMAL_DATA received from the host 102. The controller 130 may map the first logical address LBA1 to the physical address PBA1 of the first block.
[0051] The controller 130 may generate metadata META_DATA corresponding to the storage of the user data NORMAL_DATA. That is, the controller 130 may generate metadata META_DATA corresponding to storing the user data NORMAL_DATA in the first block. The controller 130 may use a second block among the storage blocks BLOCK<0:9> to BLOCK<40:49> that does not overlap with the first block to store the metadata META_DATA. The controller 130 may map a second logical address LBA2 that is not used in the host 102 to a physical address PBA2 of the second block.
[0052] The following operations may be performed by the flash translation layer component 40: an operation of generating metadata META_DATA by mapping the first logical address LBA1 to the physical address PBA1 of the first block, and an operation of generating metadata META_DATA by mapping the second logical address LBA2 to the physical address PBA2 of the second block. That is, the operation of generating metadata META_DATA by mapping the logical address and the physical address may be performed by the flash translation layer component 40.
[0053] User data NORMAL_DATA transferred between the host 102 and the memory system 110 may be temporarily stored in the memory 144 of the controller 130 separately from being stored in the nonvolatile memory device 150. Metadata META_DATA corresponding to the storage of the user data NORMAL_DATA from the host 102 is generated by the controller 130 and may be temporarily stored in the memory 144 of the controller 130 separately from being stored in the nonvolatile memory device 150.
[0054] The data size that can be stored in the memory system 110 is usually predetermined during the process of manufacturing the memory system 110. For example, the data size that can be stored in the memory system 110 can be determined as 512GByte or 1TByte. For example, when the host 102 is connected to the memory system 110, the data size that can be stored in the memory system 110 can be shared with the host 102. The host 102 can determine the range of the first logical address LBA1 according to the storable data size of the memory system 110. The memory system 110 can share the range of the first logical address LBA1 with the host 102. That is, the range of the first logical address LBA1 determined by the host 102 can be shared with the memory system 110, and the memory system 110 can determine the range of the second logical address LBA2 by referring to the range of the first logical address LBA1. The range of the second logical address LBA2 may not overlap with the range of the first logical address LBA1 and may be continuous with the range of the first logical address LBA1. The host 102 may not know whether the second logical address LBA2 is used in the memory system 110.
[0055] It is not predefined which memory block is selected as the first block and which memory block is selected as the second block among the memory blocks BLOCK<0:9> to BLOCK<40:49> in the memory device 150. That is, the controller 130 may select any one of the memory blocks BLOCK<0:9> to BLOCK<40:49> as the first block, and may select any other one of the memory blocks BLOCK<0:9> to BLOCK<40:49> as the second block.
[0056] This is because the time when the controller 130 selects the first block among the memory blocks BLOCK<0:9> to BLOCK<40:49> may correspond to the time when the user data NORMAL_DATA and the first logical address LBA1 are received from the host 102. Similarly, the time when the controller 130 selects the second block among the memory blocks BLOCK<0:9> to BLOCK<40:49> may correspond to the time when the controller 130 generates the metadata META_DATA.
[0057] The controller 130 may select at least one first block among the storage blocks BLOCK<0:9> to BLOCK<40:49> in response to the first logical address LBA1 inputted together with the user data NORMAL_DATA from the host 102. Further, the controller 130 may map the first logical address LBA1 to the physical address of the selected first block. Alternatively, a plurality of first blocks may be selected among the storage blocks BLOCK<0:9> to BLOCK<40:49>, and may vary according to the size of the user data NORMAL_DATA.
[0058] Further, when generating metadata META_DATA, the controller 130 may determine a second logical address LBA2 corresponding to the metadata META_DATA by referring to the range of the first logical address LBA1. In response to the second logical address LBA2 corresponding to the metadata META_DATA, the controller 130 may select at least one second block from among the storage blocks BLOCK<0:9> to BLOCK<40:49>. Further, the controller 130 may map the second logical address LBA2 corresponding to the metadata META_DATA to a physical address of the selected second block. According to the size of the metadata META_DATA, one or more second blocks may be selected from among the storage blocks BLOCK<0:9> to BLOCK<40:49>.
[0059] Figure 2 FIG. 1 is a diagram showing a data processing system 100 including a memory system 110 according to an embodiment of the present disclosure.
[0060] Reference Figure 2 , data processing system 100 may include a host 102 coupled to a memory system 110 .
[0061] The host 102 may include electronic devices, for example, portable electronic devices such as mobile phones, MP3 players, and laptop computers, or non-portable electronic devices such as desktop computers, game consoles, televisions (TVs), and projectors, ie, wired and wireless electronic devices.
[0062] The host 102 may include at least one operating system (OS) for managing and controlling the functions and operations of the host 102, and using the data processing system 100 or the memory system 110 to provide interoperability between the host 102 and the user. The operating system may support functions and operations corresponding to the user's purpose of use and the use of the operating system. For example, according to the mobility of the host 102, the operating system may be classified into a general operating system and a mobile operating system. In addition, according to the user's use environment, the general operating system may be classified into a personal operating system and an enterprise operating system. For example, the personal operating system is characterized by supporting service provision functions for ordinary users, and may include Window and Chrome; while the enterprise operating system is characterized by ensuring and providing high performance, and may include Windows Server, Linux, and Unix. In addition, the mobile operating system is characterized by supporting mobile service provision functions and system energy saving functions for users, and may include Android, iOS, Windows Mobile, etc. The host 102 may include multiple operating systems, and may execute the operating system to use the memory system 110 to perform operations corresponding to user requests. The host 102 may send multiple commands corresponding to user requests to the memory system 110, so that the memory system 110 may perform operations corresponding to the commands, that is, operations corresponding to the user requests.
[0063] The memory system 110 may operate in response to a request of the host 102, and specifically, may store data to be accessed by the host 102. The memory system 110 may be used as a main memory device or an auxiliary memory device of the host 102. The memory system 110 may be implemented as one of various types of storage devices according to a host interface protocol connected to the host 102. For example, the memory system 110 may be implemented as one of a solid state drive (SSD), a multimedia card in the form of MMC, an embedded MMC (eMMC), a reduced size MMC (RS-MMC) and a micro MMC, a secure digital card in the form of SD, mini SD and micro SD, a universal serial bus (USB) storage device, a universal flash memory (UFS) device, a compact flash (CF) card, a smart media card, or a memory stick.
[0064] The storage device implementing the memory system 110 can be implemented by a volatile storage device such as a dynamic random access memory (DRAM) and a static random access memory (SRAM), or by a non-volatile memory device such as a read-only memory (ROM), a mask ROM (MROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a ferroelectric random access memory (FRAM), a phase change RAM (PRAM), a magnetic RAM (MRAM) and / or a resistive RAM (RRAM).
[0065] The memory system 110 may include a memory device 150 that may store data to be accessed by the host 102 , and a controller 130 that may control storage of data in the memory device 150 .
[0066] The controller 130 and the memory device 150 may be integrated into one semiconductor device to configure an SSD. When the memory system 110 is used as an SSD, the operation speed of the host 102 connected to the memory system 110 may be increased. In another embodiment, the controller 130 and the memory device 150 may be integrated into one semiconductor device to configure a memory card such as a PC card (e.g., a Personal Computer Memory Card International Association (PCMCIA) card), a Compact Flash card (CF), a Smart Media Card (e.g., SM and SMC), a Memory Stick, a Multimedia Card (e.g., MMC, RS-MMC, and Micro MMC), a Secure Digital (SD) card (e.g., SD, Mini SD, Micro SD, and SDHC), and / or a Universal Flash Storage (UFS).
[0067] In another embodiment, the memory system 110 may configure a computer, an ultra mobile PC (UMPC), a workstation, a netbook, a personal digital assistant (PDA), a portable computer, a web tablet, a tablet computer, a wireless phone, a mobile phone, a smart phone, an e-book, a portable multimedia player (PMP), a portable game console, a navigation device, a black box, a digital camera, a digital multimedia broadcasting (DMB) player, a 3D TV, a smart TV, a digital audio recorder, a digital audio player, a digital photo recorder, a digital photo player, a digital video recorder, a digital video player, a storage device configuring a data center, a device capable of sending and receiving information in a wireless environment, one of various electronic devices configuring a home network, one of various electronic devices configuring a computer network, one of various electronic devices configuring a telematics network, a radio frequency identification (RFID) device, or one of various components configuring a computing system.
[0068] Even without power supply, the memory device 150 can retain the stored data. Specifically, the memory device 150 can store data provided from the host 102 through a write operation, and provide the stored data to the host 102 through a read operation. The memory device 150 may include a plurality of memory blocks 152, 154, and 156. Each of the memory blocks 152, 154, and 156 may include a plurality of pages, the plurality of pages including P <0> To P <4> . Including P <0> To P <4> Each of the pages may include multiple memory cells. Storage blocks 152, 154, and 156 include page buffers for caching data to be input / output in units of pages. Memory device 150 may include multiple planes, each of which includes some of the multiple storage blocks 152, 154, and 156. Memory device 150 may include multiple memory dies, each of which includes one or more of the multiple planes. Memory device 150 may be a non-volatile memory device, such as a flash memory. The flash memory may have a three-dimensional (3D) stacked structure.
[0069] The controller 130 may control the memory device 150 in response to a request from the host 102. For example, the controller 130 may provide data read from the memory device 150 to the host 102, and may store data provided from the host 102 in the memory device 150. To this end, the controller 130 may control operations of the memory device 150, such as a read operation, a write operation, a program operation, and an erase operation.
[0070] The controller 130 may include a host interface 132 , a processor 134 , an error correction code (ECC) component 138 , a power management unit (PMU) 140 , a memory interface 142 , and a memory 144 .
[0071] The host interface 132 may process commands and data of the host 102. The host interface 132 may be configured to communicate with the host 102 through at least one of various interface protocols such as Universal Serial Bus (USB), Multimedia Card (MMC), Peripheral Component Interconnect Express (PCI-e or PCIe), Serial Attached SCSI (SAS), Serial Advanced Technology Attachment (SATA), Parallel Advanced Technology Attachment (PATA), Small Computer System Interface (SCSI), Enhanced Small Disk Interface (ESDI), Electronics Integrated Drive (IDE), and Mobile Industry Processor Interface (MIPI). The host interface 132 may be driven by firmware called a host interface layer (HIL), which is an area that exchanges data with the host 102.
[0072] The ECC component 138 may detect and correct errors included in the data read from the memory device 150. In other words, the ECC component 138 may perform an error correction decoding process on the data read from the memory device 150 using the ECC code used during the ECC encoding process. According to the result of the error correction decoding process, the ECC component 138 may output a signal, such as an error correction success / failure signal. When the number of error bit numbers is greater than the threshold value of the correctable error bit, the ECC component 138 may not correct the error bit, but may output an error correction failure signal.
[0073] The ECC component 138 can perform error correction by coded modulation such as low density parity check (LDPC) code, Bose-Chaudhuri-Hocquenghem (BCH) code, turbo code, Reed-Solomon (RS) code, convolutional code, recursive systematic code (RSC), trellis coded modulation (TCM) and block coded modulation (BCM). However, the ECC component 138 is not limited to these correction techniques. Likewise, the ECC component 138 may include all circuits, modules, systems or devices for suitable error correction.
[0074] The PMU 140 may provide and manage power to the controller 130 .
[0075] The memory interface 142 may be used as a memory / storage interface that may perform an interface connection between the controller 130 and the memory device 150. The memory interface 142 may allow the controller 130 to control the memory device 150 in response to a request from the host 102. The memory interface 142 may generate a control signal for the memory device 150, and may process data under the control of the processor 134. When the memory device 150 is a flash memory, particularly when the memory device 150 is a NAND flash memory, the memory interface 142 may be a NAND flash controller (NFC). The memory interface 142 may support an interface, such as an operation of a NAND flash interface, which may process commands and data between the controller 130 and the memory device 150. Specifically, the memory interface 142 may process data input / output between the controller 130 and the memory device 150. The memory interface 142 may be driven by firmware called a flash interface layer (FIL), which is an area for exchanging data with the memory device 150.
[0076] As a working memory of the memory system 110 and the controller 130, the memory 144 may store data for driving the memory system 110 and the controller 130. During a process in which the controller 130 controls the memory device 150 in response to a request from the host 102, the memory 144 may temporarily store the user data NORMAL_DATA read from the memory device 150 before providing the user data NORMAL_DATA to the host 102. In addition, before storing the user data NORMAL_DATA provided from the host 102 in the memory device 150, the controller 130 may temporarily store the user data NORMAL_DATA in the memory 144. When the controller 130 controls read, write, program, and erase operations of the memory device 150, data NORMAL_DATA and META_DATA to be transmitted or generated between the controller 130 and the memory device 150 in the memory system 110 may be stored in the memory 144. For example, the memory 144 may store metadata META_DATA required to perform data write and read operations between the host 102 and the memory device 150 and user data NORMAL_DATA when data write and read operations are performed. In order to perform such data storage, the memory 144 may include a program memory, a data memory, a write buffer / cache, a read buffer / cache, a data buffer / cache, and a mapping buffer / cache.
[0077] The memory 144 may be implemented by a volatile memory. For example, the memory 144 may be implemented by a static random access memory (SRAM) or a dynamic random access memory (DRAM). As shown, the memory 144 may be present inside the controller 130. Alternatively, unlike what is shown in the drawings, the memory 144 may be present outside the controller 130. The memory 144 may be implemented as an external volatile memory, wherein data from the controller 130 is input to the external volatile memory and data from the external volatile memory is output to the controller 130 through a separate memory interface.
[0078] The processor 134 may control the overall operation of the memory system 110. Specifically, the processor 134 may control a programming operation or a reading operation of the memory device 150 in response to a write request or a read request from the host 102. The processor 134 may drive firmware called a flash translation layer (FTL) to control the general operation of the memory system 110. The processor 134 may be implemented by a microprocessor or a central processing unit (CPU).
[0079] For example, the controller 130 may perform an operation requested from the host 102 in the memory device 150. That is, the controller 130 may perform a command operation corresponding to a command received from the host 102 using the memory device 150 through the processor 134. The controller 130 may perform a foreground operation as a command operation corresponding to a command received from the host 102. For example, the controller 130 may perform a program operation corresponding to a write command, a read operation corresponding to a read command, an erase operation corresponding to an erase command, or a parameter setting operation corresponding to a set parameter command or a set feature command as a setting command.
[0080] The controller 130 may also perform background operations of the memory device 150 through the processor 134. The background operations of the memory device 150 may include operations of copying data stored in a memory block among the memory blocks 152, 154, and 156 of the memory device 150 to another memory block, such as a garbage collection (GC) operation.
[0081] To control the garbage collection operation as a background operation of the memory device 150 , the processor 134 may include a merge operation control circuit 196 .
[0082] The background operation of the memory device 150 may include an operation of exchanging the memory blocks 152, 154, and 156 of the memory device 150, or data stored in the memory blocks 152, 154, and 156, such as a wear leveling (WL) operation and a read reclaim (RR) operation. In addition, the background operation of the memory device 150 may include an operation of storing the mapping data stored in the controller 130 into the memory blocks 152, 154, and 156 of the memory device 150, such as a mapping clearing operation; and a bad block management operation of the memory device 150, that is, a bad block management operation of checking and processing bad blocks among the multiple memory blocks 152, 154, and 156 of the memory device 150.
[0083] Here, operations of copying, exchanging, moving or merging storage blocks 152, 154 and 156 or data stored in storage blocks 152, 154 and 156, such as garbage collection operations, wear leveling operations and read reclaim operations, can be defined as merge operations. The processor 134 of the controller 130 may include a merge operation control circuit 196 for controlling the merge operation.
[0084] In the processor 134, a management component (not shown) for performing bad block management of the memory device 150 may be included. The management component may check bad blocks among the plurality of storage blocks 152, 154, and 156 in the memory device 150, and then may perform bad block management to treat the checked bad blocks as bad blocks. When the memory device 150 is a flash memory (e.g., a NAND flash memory), due to the characteristics of the NAND flash memory, a programming failure may occur when a write operation (programming operation) is performed. The management component may treat the storage block in which programming failure has occurred as a bad block, and may write the data of the programming failure into a new storage block.
[0085] A program operation, a read operation, and an erase operation of the controller 130 will be described below.
[0086] First, the controller 130 may store the program data NORMAL_DATA corresponding to the program command received from the host 102 in the buffer / cache in the memory 144. Subsequently, the controller 130 may store the data NORMAL_DATA stored in the buffer / cache in the memory device 150 in the memory blocks 152, 154, and 156. That is, when a write command is received from the host 102, the controller 130 may perform a program operation corresponding to the write command. At this time, the controller 130 may store the data NORMAL_DATA corresponding to the write command in at least one of the memory blocks 152, 154, and 156 of the memory device 150 (e.g., an empty memory block, an open memory block, or a free memory block in which an erase operation is performed among the memory blocks). In addition, the controller 130 may update the mapping data META_DATA corresponding to the programming operation to the memory device 150. Subsequently, the controller 130 may store the updated mapping data META_DATA in the memory blocks 152, 154, and 156 in the memory device 150. That is, the controller 130 can store the logical / physical (logical to physical, L2P) address information (or L2P mapping) and the physical / logical (physical to logical, P2L) address information (or P2L mapping) of the user data NORMAL_DATA stored in the storage block in the form of a mapping table or a mapping list in an empty storage block, an open storage block, or a free storage block among the storage blocks of the memory device 150.
[0087] When receiving a read command from the host 102, the controller 130 may read the data NORMAL_DATA corresponding to the read command from the memory device 150 by checking the mapping data META_DATA of the data NORMAL_DATA corresponding to the read command. Further, the controller 130 may store the read data NORMAL_DATA in a buffer / cache in the memory 144 of the controller 130, and then may provide the data NORMAL_DATA stored in the buffer / cache to the host 102.
[0088] When receiving an erase command from the host 102, the controller 130 may perform an erase operation of checking a storage block corresponding to the erase command and erasing data stored in the checked storage block. Further, the erase operation may include updating mapping data META_DATA corresponding to the erased data, and then storing the updated mapping data META_DATA in the storage blocks 152, 154, and 156 included in the memory device 150.
[0089] In the mapping data, there are logical / physical (logical to physical, L2P) information and physical / logical (physical to logical, P2L) information of data stored in a memory block corresponding to a program operation.
[0090] The data corresponding to the command may include user data NORMAL_DATA and metadata META_DATA generated by the controller 130 corresponding to the storage of the user data NORMAL_DATA. The metadata META_DATA may include mapping data corresponding to the user data NORMAL_DATA stored in the memory device 150, generated by the controller 130. In addition, the metadata META_DATA may include information about the command data NORMAL_DATA corresponding to the command received from the host 102, information about the command operation corresponding to the command, information about the storage block in the memory device 150 on which the command operation is to be performed, and information about mapping data corresponding to the command operation. In other words, the metadata META_DATA may include information and data for the command operation in addition to the user data NORMAL_DATA corresponding to the command received from the host 102. As described above, the metadata META_DATA may be generated by the controller 130. The processor 134 of the controller 130 may include a metadata generation circuit 198 for generating the metadata META_DATA.
[0091] The user data NORMAL_DATA to be stored in the memory device 150 may be divided in units of segments having a predetermined size. The predetermined size may be the same as the minimum data size required for the memory system 110 to interoperate with the host 102. According to an embodiment, the data segment size as a unit of the user data NORMAL_DATA may be determined corresponding to the configuration and control method in the memory device 150. When the data segment of the user data NORMAL_DATA is stored in a storage block of the memory device 150, the controller 130 may generate or update a mapping address corresponding to the stored data segment. When the controller 130 generates a meta segment, each of which is a unit of metadata META_DATA, and the metadata META_DATA includes a mapping address (e.g., a logical / physical (L2P) segment and a physical / logical (P2L) segment of a mapping segment as mapping data), or when a mapping segment stored in a storage block is loaded into the memory 144 and then updated, the mapping segment may be stored in the storage block of the memory device 150.
[0092] Figure 3 FIG. 1 is a diagram showing a controller 130 in a memory system according to an embodiment of the present disclosure.
[0093] Although not in Figure 3 , but the flash translation layer (FTL) component 40 may include Figure 2 The ECC component 138 of the controller 130 may be implemented by a separate module, circuit, or firmware in the controller 130 according to an embodiment.
[0094] Reference Figure 3 , a host interface (I / F) 132 may manage commands and data received from the host 102. By way of example and not limitation, the host interface 132 may include a cache manager 52, an event queue 54, and a command queue 56. The command queue 56 may sequentially store commands and data, and output the commands and data to the cache manager 52 in the order in which the commands and data were stored in the command queue 56. The cache manager 52 may classify, manage, or adjust the commands and data transferred from the command queue 56. The event queue 54 may sequentially send events for processing commands and data received from the cache manager 52.
[0095] The memory system 110 may receive multiple commands and / or data having the same characteristics, or may receive multiple commands and / or data having different characteristics after being mixed or intermingled. For example, the memory system 110 receives multiple commands for reading data (i.e., read commands), or alternately receives multiple commands for reading data (i.e., read commands) and for programming data (i.e., write commands). The host interface 132 may sequentially store the commands and data received from the host 102 to the command queue 56. Thereafter, the host interface 132 may estimate or predict which type of operation the controller 130 will perform based on the characteristics of the commands and data. The host interface 132 may determine the processing order and priority of the commands and data based on the characteristics of the commands and data. Based on the characteristics of the commands and data, the cache manager 52 may determine to store the commands and data in the memory 144, or to pass the commands and data to the flash translation layer component 40. Event queue 54 receives events input from cache manager 52 to be internally executed and processed by memory system 110 or controller 130 in response to commands and data, and delivers the events to flash translation layer component 40 in the order in which they were received.
[0096] In an embodiment, the flash translation layer component 40 may include a state manager (SM) 42, a mapping manager (MM) 44, a host request manager (HRM) 46, and a block manager (BM) 48. The host request manager 46 may manage events input from the event queue 54. The mapping manager 44 may process or control mapping data. The state manager 42 may perform merging operations such as garbage collection (GC), wear leveling (WL), or read reclamation (RR). The block manager 48 may execute commands or instructions on blocks in the memory device 150.
[0097] By way of example and not limitation, the host request manager 46 may use the mapping manager 44 and the block manager 48 to handle or process requests based on read and program commands and events delivered from the host interface 132. The host request manager 46 may send a query request to the mapping data manager 44 to determine the physical address corresponding to the logical address input with the event. The host request manager 46 may send a read request with a physical address to the memory interface (I / F) 142 to process the read request (or handle the event). On the other hand, the host request manager 46 may send a programming request (or a write request) to the block manager 48 to program data to a specific free page (i.e., a page without data) in the memory device 150. Further, the host request manager 46 may send a mapping update request corresponding to the programming request to the mapping manager 44 to update items related to the programming data in the mapping information. The mapping information may indicate a mapping relationship between a logical address and a physical address.
[0098] The block manager 48 may convert the program requests passed from the host request manager 46, the mapping data manager 44, and / or the status manager 42 into flash program requests for the memory device 150 to manage the flash memory blocks in the memory device 150. In order to maximize or enhance the programming or writing performance of the memory system 110, the block manager 48 may collect the program requests and send the flash program requests for multi-plane and single-shot programming operations to the memory interface 142. The block manager 48 may send several flash program requests to the memory interface 142 to enhance or maximize the parallel processing of the multi-channel and multi-directional flash memory controller.
[0099] The block manager 48 may manage the blocks in the memory device 150 according to the number of valid pages. Further, when a free block is needed, the block manager 48 may select and erase a block without a valid page. Still further, when it is determined that garbage collection is needed, the block manager 48 may select a block including the least or lowest number of valid pages. The state manager 42 may perform garbage collection to move valid data to an empty block and erase blocks that used to contain valid data so that the block manager 48 may have enough free blocks (i.e., empty blocks without data). If the block manager 48 may provide the state manager 42 with information related to the block to be erased, the state manager 42 may check all flash memory pages in the block to be erased to determine whether each page is valid. For example, to determine the validity of each page, the state manager 42 may identify a logical address stored in an out-of-band (OOB) area of each page. To determine whether each page is valid, the state manager 42 may compare the physical address of the page with the physical address mapped to the logical address obtained from the query request. The state manager 42 sends a program request to the block manager 48 for each valid page. When the programming operation is complete, the mapping table may be updated by an update of mapping manager 44 .
[0100] The mapping manager 44 may manage a logical to physical mapping table. The mapping manager 44 may process requests such as queries and updates generated by the host request manager 46 or the state manager 42. The mapping manager 44 may store the entire mapping table in the memory device 150 and cache mapping entries according to the storage capacity of the memory 144. When a mapping cache miss occurs when processing a query or update request, the mapping manager 44 may send a read request to the memory interface 142 to load the relevant mapping table stored in the memory device 150. When the number of dirty cache blocks exceeds a certain threshold, the mapping manager 44 may send a program request to the block manager 48 to form a clean cache block, and the dirty mapping table may be stored in the memory device 150.
[0101] When garbage collection is performed, the state manager 42 copies the valid page to the free block, and the host request manager 46 can program the latest version of the data for the page of the same logical address and issue an update request immediately. When the state manager 42 requests a mapping update in a state where the copy of the valid page is not completed normally, the mapping manager 44 may not perform a mapping update (i.e., an update of the mapping table). This is because if the state manager 42 requests an update of the mapping and the valid page copy is completed later, a mapping request with old physical information is issued. As long as the latest mapping table still points to the old physical address, the mapping manager 44 can perform a mapping update to ensure accuracy.
[0102] In an embodiment, at least one of the block manager 48, the mapping manager 44, and the state manager 42 may include the above Figure 1 and Figure 2 In and below Figure 6 The merge operation control circuit 196 and metadata generation circuit 198 described in.
[0103] The memory device 150 may include a plurality of memory blocks. According to the number of bits that can be stored or represented in one memory cell of the memory block, each of the plurality of memory blocks may be implemented as any one of various types such as: a single-level cell (SLC) memory block and a multi-level cell (MLC) memory block. The SLC memory block may include a plurality of pages implemented by each memory cell storing one bit of data. The SLC memory block may have high performance and high durability for data input and output (I / O) operations. The MLC memory block may include a plurality of pages implemented by each memory cell storing multi-bit data (e.g., two or more bits). In the same space, the MLC memory block may have a larger storage capacity than the SLC memory block. In terms of storage capacity, the MLC memory block may be highly integrated. In an embodiment, the memory device 150 may be implemented with an MLC memory block, such as an MLC memory block, a three-level cell (TLC) memory block, a four-level cell (QLC) memory block, or a combination thereof. The MLC memory block may include a plurality of pages implemented by each memory cell capable of storing 2 bits of data. The three-level cell memory block may include a plurality of pages implemented by each memory cell capable of storing 3 bits of data. A four-level cell memory block may include multiple pages implemented by memory cells each capable of storing 4 bits of data. In another embodiment, the memory device 150 may be implemented using a block including multiple pages implemented by memory cells each capable of storing 5 or more bits of data.
[0104] In an embodiment, the memory device 150 is implemented as a non-volatile memory such as a flash memory, such as a NAND flash memory and a NOR flash memory. However, the memory device 150 may be implemented by at least one of a phase change random access memory (PCRAM), a ferroelectric random access memory (FRAM), and a spin transfer torque magnetic random access memory (STT-RAM or STT-MRAM).
[0105] Figure 4 FIG. 1 is a diagram illustrating a data processing operation on a memory device in a memory system according to an embodiment.
[0106] Reference Figure 4 , the controller 130 may receive a program command, program data, and a logical address from the host 102. In response to the program command, the controller 130 may program and store the program data into a plurality of pages in the memory blocks 552 to 584 of the memory device 150.
[0107] The controller 130 may generate and update metadata of the programming data, and may program and store the metadata in the storage blocks 552 to 584 of the memory device 150. The metadata may include logical / physical (L2P) information and physical / logical (P2L) information of the programming data stored in the storage blocks 552 to 584. In addition, the metadata may include information about command data corresponding to a command received from the host 102, information about a command operation corresponding to the command, information about a storage block of the memory device 150 on which the command operation is to be performed, and information about mapping data corresponding to the command operation. In other words, the metadata may include all the remaining information and data corresponding to the command received from the host 102 except for the programming data.
[0108] Logical / physical (L2P) information and physical / logical (P2L) information represent information that the controller 130 maps a physical address corresponding to a logical address in response to a program command. The physical address may be an address corresponding to a physical storage space of the memory device 150 where program data received from the host 102 is to be stored.
[0109] The controller 130 may store mapping information between logical addresses and physical addresses, that is, logical / physical (L2P) information and physical / logical (P2L) information, in at least one of the memory blocks 522 to 584 of the memory device 150. At least one memory block that may store the logical / physical (L2P) information and the physical / logical (P2L) information may be referred to as a system block.
[0110] For example, the controller 130 caches and buffers the program data corresponding to the program command in the first buffer 510 in the memory 144 of the controller 130. That is, the controller 130 may store the data segment 512 of the user data in the first buffer 510 as a data buffer / cache. Thereafter, the controller 130 programs and stores the data segment 512 stored in the first buffer 510 into the pages in the memory blocks 552 to 584 of the memory device 150.
[0111] Since the data segment 512 of the program data is programmed and stored in the pages in the memory blocks 552 to 584 of the memory device 150, the controller 130 may generate the L2P segment 522 and the P2L segment 524 as metadata, and may store them in the second buffer 520 in the memory 144 of the controller 130. In the second buffer 520 of the memory 144 of the controller 130, the L2P segment 522 and the P2L segment 524 may be stored in the form of a list. Subsequently, the controller 130 may program and store the L2P segment 522 and the P2L segment 524 stored in the second buffer 520 in the pages in the memory blocks 552 to 584 of the memory device 150 through a map clear operation.
[0112] The controller 130 may receive a read command and a logical address from the host 102. In response to the read command, the controller 130 may read the L2P segment 522 and the P2L segment 524 corresponding to the logical address from the memory device 150 and load them into the second buffer 520. Subsequently, the controller 130 checks the physical address of the memory device 150 corresponding to the logical address from the L2P segment 522 and the P2L segment 524 loaded in the second buffer 520, reads the data segment 512 of the user data from the storage location known by the check, that is, a specific page of a specific storage block among the storage blocks 552 to 584, stores the data segment 512 into the first buffer 510, and may provide the data segment 512 to the host 102.
[0113] As described above, whenever a read command and a logical address are received from the host 102, the controller 130 may read the L2P segment 522 and the P2L segment 524 corresponding to the logical address and load them into the second buffer 520. Frequently repeating the operation of loading the L2P segment 522 and the P2L segment 524 in this manner may result in a decrease in the performance of the read operation.
[0114] Since the controller 130 can load a larger number of L2P segments 522 and P2L segments 524 from the memory device 150 at one time, a single operation of loading L2P segments 522 and P2L segments 524 can process a larger number of read commands. Therefore, the read performance of the memory system 110 can be improved.
[0115] The L2P segment can be optimized to search for a physical address corresponding to a specific logical address. Therefore, in a read operation, the L2P segment can be efficiently used to search for a physical address to be mapped to a logical address input from the host 102.
[0116] The P2L segment 524 may be optimized for programming operations. When receiving a programming command, programming data, and a logical address from the host 102, the controller 130 may need to quickly allocate a storage space in the memory device 150 for storing the programming data. In this regard, the controller 130 may load a list of available physical addresses into the second buffer 520 in advance. Therefore, when receiving a programming command, programming data, and a logical address from the host 102, the controller 130 may quickly search the list of available physical addresses loaded in the second buffer 520. Further, the controller 130 may map the physical address of the programming data using the logical address, and then the programming data may be stored in the storage space corresponding to the physical address. At this time, the P2L segment 524 may be generated and temporarily stored in the second buffer 520. The P2L segment 524 stored in the second buffer 520 may be stored in the memory device 150 through a mapping clearing operation.
[0117] Figure 5 The diagram is a diagram illustrating an operation of managing user blocks and metablocks in an integrated manner based on logical addresses according to an embodiment of the present disclosure.
[0118] Reference Figures 1 to 5 , the controller 130 of the memory system 110 may use the first block 1ST_BLOCK among the memory blocks BLOCK<0:9> to BLOCK<40:49> in the memory device 150 to store the user data NORMAL_DATA input from the host 102. The controller 130 may map the first logical address LBA1 to the physical address PBA1 of the first block 1ST_BLOCK.
[0119] The controller 130 may store metadata META_DATA using a second block 2ND_BLOCK not overlapping the first block 1ST_BLOCK among the memory blocks BLOCK<0:9> to BLOCK<40:49>. The controller 130 may map a second logical address LBA2 not used in the host 102 to a physical address PBA2 of the second block 2ND_BLOCK.
[0120] The memory system 110 may share the range of the first logical address LBA1 with the host 102. That is, the range of the first logical address LBA1 determined by the host 102 may be shared with the memory system 110, and the memory system 110 may determine the range of the second logical address LBA2 by referring to the range of the first logical address LBA1. The range of the second logical address LBA2 may not overlap with the range of the first logical address LBA1. The host 102 may not know whether the second logical address LBA2 is used in the memory system 110.
[0121] Reference Figure 5 , the range of the first logical address LBA1 can be set to 0x00000000 to 0x01DC1800. The range of the second logical address LBA2 can be set to 0x02000000 to 0x02020000. That is, the range of the first logical address LBA1 and the range of the second logical address LBA2 can be set not to overlap each other.
[0122] The controller 130 may set a reference logical address value to distinguish between the first logical address LBA1 and the second logical address LBA2. For example, when the range of the first logical address LBA1 is smaller than the range of the second logical address LBA2, the controller 130 may set a specific value greater than the maximum value in the range of the first logical address LBA1 to the minimum value in the range of the second logical address LBA2, and may set the specific value to the reference logical address value. For example, the reference logical address value may be set to 0x02000000, a logical address having a value greater than or equal to 0x02000000 as the reference logical address value may be the second logical address LBA2, and a logical address having a value less than 0x02000000 as the reference logical address value may be the first logical address LBA1. Optionally, the range of the first logical address LBA1 may be greater than the range of the second logical address LBA2. In this case, the controller 130 may set a specific value less than the minimum value in the range of the first logical address LBA1 to the maximum value in the range of the second logical address LBA2, and may set the specific value to the reference logical address value.
[0123] The first block 1ST_BLOCK may include a boot block for storing boot data, a user block for storing user data, a playback protection memory block (RPMB) for storing security data, and an enhancement block for storing enhancement data. The second block 2ND_BLOCK may include a mapping block for storing mapping data, a history block for storing history data, and a block status table (BST) for storing block status information.
[0124] Figure 6 A diagram illustrating a merge operation of a memory system according to an embodiment of the present disclosure.
[0125] Reference Figure 6 , the merge operation can be performed by the memory system 110 itself without receiving a command from the host 102. Optionally, the merge operation can be performed in the memory system 110 in response to a merge operation command (not shown) received from the host 102. The controller 130 of the memory system 110 can read data from at least one source block 40_1 of the memory device 150, and can store the data in the memory 144 of the controller 130. Further, the controller 130 can program the data into at least one target block 40_2 in the memory device 150. The at least one source block 40_1 may include a block that can no longer be programmed with data. In an embodiment, the memory 144 may be set outside the controller 130 and interoperate with the controller 130.
[0126] The merge operation control circuit 196 of the controller 130 may self-start to perform the merge operation by checking the status of the memory device 150 , or may perform the merge operation in response to a merge operation command received from the host 102 .
[0127] The merge operation performed by the merge operation control circuit 196 will be described in detail below.
[0128] The merge operation control circuit 196 may select at least one of the plurality of storage blocks in the memory device 150 as the source block 40_1. In addition, the merge operation control circuit 196 may select at least one of the plurality of storage blocks in the memory device 150 as the target block 40_2. The merge operation control circuit 196 may search and extract valid data in the source block 40_1, and may move the valid data to the target block 40_2. Data in the source block 40_1 that is determined to be no longer valid may be discarded (i.e., may not be moved to the target block 40_2). If the valid data stored in the source block 40_1 is moved to the target block 40_2, the controller 130 no longer considers that the specific source block 40_1 has valid data. Thereafter, if new data needs to be programmed into the source block 40_1, all data stored in the source block 40_1 may be erased.
[0129] In an embodiment, the controller 130 may use the memory 144 to temporarily store valid data selected during the merge operation until the valid data is programmed into the target block 40_2 .
[0130] Reference Figures 1 to 6 , a plurality of memory blocks BLOCK<0:9> to BLOCK<40:49> in the memory device 150 may be divided into a first block 1ST_BLOCK corresponding to a first logical address LBA1 and a second block 2ND_BLOCK corresponding to a second logical address LBA2.
[0131] The controller 130 may store the user data NORMAL_DATA in the first block 1ST_BLOCK, and may store the metadata META_DATA in the second block 2ND_BLOCK.
[0132] In an embodiment, when the pre-source block selected for the merge operation among the storage blocks corresponds to the first logical address LBA1, the merge operation control circuit 196 of the controller 130 may identify the pre-source block as a first source block. The merge operation control circuit 196 may collect valid data in at least one first source block, and may move the collected valid data to at least one first target block corresponding to the first logical address LBA1. In other words, the merge operation control circuit 196 may cause a merge operation of moving user data NORMAL_DATA between the first source block and the first target block corresponding to the first logical address LBA1 to be performed. When the pre-source block selected for the merge operation among the storage blocks corresponds to the second logical address LBA2, the merge operation control circuit 196 may identify the pre-source block as a second source block. The merge operation control circuit 196 may collect valid data in the second source block, and may move the collected valid data to the second target block corresponding to the second logical address LBA2. In other words, the merge operation control circuit 196 may cause a merge operation of moving metadata META_DATA between the second source block and the second target block corresponding to the second logical address LBA2 to be performed.
[0133] In each storage block, data can be programmed sequentially from the first page to the last page. If no page in the corresponding block is programmed with data, the corresponding block is a free block. The physical address of the free block may not be mapped to any logical address. If at least one data is programmed in the corresponding block and new data can be additionally programmed into the corresponding block, the corresponding block is an open block. The physical address of the open block can be mapped to a specific logical address. If data is programmed in the last page of the corresponding block and new data can no longer be programmed into the corresponding block, the corresponding block may be a closed block. The physical address of the closed block can be mapped to a specific logical address.
[0134] In an embodiment, the merge operation control circuit 196 may select a source block 40_1 corresponding to a predetermined condition as a pre-source block among closed blocks and open blocks in a storage block. Further, when the pre-source block corresponds to a first logical address LBA1, the merge operation control circuit 196 may identify the pre-source block as a first source block, or when the pre-source block corresponds to a second logical address LBA2, the merge operation control circuit 196 may identify the pre-source block as a second source block.
[0135] The merge operation control circuit 196 can select the target block 40_2 as the pre-target block among the open blocks and the free blocks in the storage block. In detail, when the free block not mapped to the logical address is selected as the pre-target block, the merge operation control circuit 196 can identify the pre-target block as the first target block by matching the logical address of the pre-target block with the first logical address LBA1, or can identify the pre-target block as the second target block by matching the logical address of the pre-target block with the second logical address LBA2. When the open block mapped to the logical address is selected as the pre-target block, when the pre-target block corresponds to the first logical address LBA1, the merge operation control circuit 196 can identify the pre-target block as the first target block, or when the pre-target block corresponds to the second logical address LBA2, the merge operation control circuit 196 can identify the pre-target block as the second target block.
[0136] The merge operation may be any one of a garbage collection operation, a read recovery operation, and a wear leveling operation. The predetermined condition of the merge operation control circuit 196 may be changed according to which operation the merge operation is. When the merge operation is a garbage collection operation, the merge operation control circuit 196 may select at least one source block 40_1 from the storage block by determining whether the number of valid pages is less than or equal to the reference number according to the predetermined condition. When the merge operation is a read recovery operation, the merge operation control circuit 196 may select at least one source block 40_1 from the storage block by determining whether the read count is less than or equal to the reference count according to the predetermined condition. When the merge operation is a wear leveling operation, the merge operation control circuit 196 may select at least one source block 40_1 from the storage block by determining whether the program / erase cycle count is greater than or equal to the reference count according to the predetermined condition.
[0137] Figure 7 The flowchart is a flowchart showing a first operation in a merge operation performed in a memory system according to an embodiment of the present disclosure.
[0138] Reference Figures 1 to 7 , it can be seen how the controller 130 of the memory system 110 selects a source block for performing a merge operation.
[0139] exist Figure 7 In the embodiment, the controller 130 may check whether a merge operation needs to be performed (S10).
[0140] When the merge operation does not need to be performed (“No” in step S10 ), the operation of selecting the source block may not be performed.
[0141] When it is necessary to perform a merge operation ("Yes" in step S10), a block corresponding to a predetermined condition may be selected from among multiple storage blocks as a pre-source block (S20). For example, when the merge operation is a garbage collection operation, a block whose number of valid pages is less than or equal to a reference number may be selected from among multiple storage blocks as a pre-source block. When the merge operation is a read recovery operation, a block whose read count is less than or equal to a reference count may be selected from among multiple storage blocks as a pre-source block. When the merge operation is a wear leveling operation, a block whose program / erase cycle count is greater than or equal to a reference count may be selected from among multiple storage blocks as a pre-source block.
[0142] After a pre-source block is selected among the memory blocks, a value of a logical address LBA corresponding to the pre-source block may be compared with a value of a reference logical address ( S30 ).
[0143] When it is checked that the pre-source block corresponds to the first logical address LBA1 (corresponding to LBA1 in S30 ), the pre-source block may be identified as a first source block ( S40 ).
[0144] When the pre-source block is identified as the first source block, the following operations may be performed: an operation of selecting a target block to move valid data of the first source block to the target block, and a merging operation of moving valid data of the first source block to the selected target block (S60). Figure 8 Describes the operation of selecting a target block and the execution of a merge operation.
[0145] When it is checked that the pre-source block corresponds to the second logical address LBA2 (corresponding to LBA2 in S30), the pre-source block may be identified as a second source block (S50).
[0146] When the pre-source block is identified as the second source block, the following operations may be performed: an operation of selecting a target block to move valid data of the second source block to the target block, and a merging operation of moving valid data of the second source block to the selected target block (S60). Figure 8 Describes the operation of selecting a target block and the execution of a merge operation.
[0147] Figure 8 The flowchart is a flowchart showing a second operation in a merge operation performed in a memory system according to an embodiment of the present disclosure.
[0148] Reference Figures 1 to 8 , it can be seen how the controller 130 of the memory system 110 selects a target block for performing a merge operation.
[0149] As mentioned above Figure 7As described above, after performing step S20, step S30 and step S40, or after performing step S20, step S30 and step S50, the operation of selecting a target block for performing a merge operation may be performed by the controller 130. Step S20 may include selecting a pre-source block for performing a merge operation. Steps S30 and S40 may include: when the pre-source block corresponds to the first logical address LBA1, identifying the pre-source block as a first source block. Steps S30 and S50 may include: when the pre-source block corresponds to the second logical address LBA2, identifying the pre-source block as a second source block.
[0150] exist Figure 8 In the embodiment, the controller 130 can determine which block among the open block and the free block is selected as the pre-target block for performing the merge operation (T10). Before selecting the open block as the pre-target block, the open block can be in a state matching any one of the first logical address LBA1 and the second logical address LBA2. That is to say, in the case of the open block, new data can be additionally programmed in a state where data has already been stored. Therefore, before selecting the open block as the pre-target block, in the process of programming the data stored in the corresponding open block, the corresponding open block may have been in a state matching any one of the first logical address LBA1 and the second logical address LBA2. Because the free block can be selected as the pre-target block in a state where no data is stored, when the free block is selected as the pre-target block, the free block can be in a state where no logical address is matched.
[0151] When a free block is selected as a pre-target block (free block in step T10 ), it may be checked which block of the first source block and the second source block has valid data to be moved to the pre-target block ( T20 ).
[0152] When the pre-source block is the first source block corresponding to the first logical address LBA1 ( Figure 7 In the case where the pre-source block is the second source block corresponding to the second logical address LBA2 ( Figure 7 S50) may correspond to a situation where valid data of the second source block is to be moved to the pre-target block.
[0153] When the valid data of the first source block is to be moved to the pre-target block (the first source block in step T20), the pre-target block can be matched with the first logical address LBA1 to be identified as the first target block (T30). Subsequently, the valid data of the first source block can be moved to the first target block, and the merge operation can be completed (T60).
[0154] When the valid data of the second source block is to be moved to the pre-target block (the second source block in step T20), the pre-target block can be matched with the second logical address LBA2 to be identified as the second target block (T40). Subsequently, the valid data of the second source block can be moved to the second target block, and the merge operation can be completed (T70).
[0155] When an open block is selected as a pre-target block (open block in step T10), after the pre-target block is selected from among storage blocks, the value of the logical address LBA corresponding to the pre-target block may be compared with the value of the reference logical address (T50).
[0156] As a result of comparing the value of the logical address LBA corresponding to the pre-target block with the value of the reference logical address, when the pre-target block is checked as the first target block corresponding to the first logical address LBA1 (corresponding to LBA1 in step T50), valid data of the first source block can be selected and the valid data of the first source block can be moved to the first target block, and the merge operation (T60) can be completed.
[0157] As a result of comparing the value of the logical address LBA corresponding to the pre-target block with the value of the reference logical address, when the pre-target block is checked as a second target block corresponding to the second logical address LBA2 (corresponding to LBA2 in step T50), valid data of the second source block can be selected and moved to the second target block, and the merge operation (T70) can be completed.
[0158] As described above, when it is necessary to move both the valid data of the first source block and the valid data of the second source block to the target block, by selecting the first target block as a free block or an open block and selecting the second target block as a free block or an open block, the valid data of the first source block can be moved to the first target block, and the valid data of the second source block can be moved to the second target block.
[0159] In the memory system 110, user blocks for storing user data from the host 102 and meta blocks for storing metadata generated by the memory system 110 according to the storage of the user data can be managed in an integrated manner based on logical addresses. Therefore, the overlap and complexity of the program code of the flash translation layer (FTL) for controlling the operations of the user blocks and meta blocks in the memory system 110 can be reduced, and debugging can be easily implemented.
[0160] Furthermore, in the memory system 110, a user block for storing user data from the host 102 may be managed by a first logical address used in the host 102, and a metablock for storing metadata generated by the memory system 110 according to the storage of the user data may be managed by a second logical address not used in the host 102. Therefore, the host may not be aware that the memory system 110 manages not only the user block but also the metablock in an integrated manner based on the logical address. Therefore, the operation of the memory system 110 that manages the user block and the metablock in an integrated manner based on the logical address does not have any influence on the operation of the host 102.
[0161] Although various embodiments have been described for illustrative purposes, it will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.
Claims
1. A memory system, comprising: A non-volatile memory device comprising a plurality of memory blocks, each of the plurality of memory blocks comprising a plurality of pages; as well as a controller that controls the nonvolatile memory device to store user data received from a host in a first block among the storage blocks, generate metadata corresponding to the storage of the user data, and store the metadata in a second block among the storage blocks; wherein the controller maps a first logical address used in the host to a physical address of the first block, and maps a second logical address not used in the host to a physical address of the second block, the first logical address and the second logical address being consecutive, The controller shares the range of the first logical address with the host, selects the first block among the storage blocks in response to the first logical address received from the host, and maps a physical address of the selected first block to the first logical address.
2. The memory system according to claim 1, wherein the controller sets a range of the second logical address, the range of the second logical address does not overlap with the range of the first logical address and is continuous with the range of the first logical address; and Wherein, when generating the metadata, the controller selects the second block among the storage blocks in response to the second logical address, and maps a physical address of the selected second block to the second logical address.
3. The memory system of claim 2 , wherein the controller moves valid data of a first source block corresponding to the first logical address to a first target block corresponding to the first logical address, and moves valid data of a second source block corresponding to the second logical address to a second target block corresponding to the second logical address.
4. The memory system according to claim 3, wherein the controller sets a reference logical address to identify the first logical address and the second logical address; and The controller selects a pre-source block corresponding to a predetermined condition for a merge operation among the storage blocks, compares a logical address of the pre-source block with the reference logical address, and identifies the pre-source block as one of the first source block and the second source block according to the comparison result.
5. A memory system according to claim 4, wherein when a free block among the storage blocks is selected as a pre-target block, the controller identifies the pre-target block as the first target block by mapping the physical address of the pre-target block to the first logical address, and identifies the pre-target block as the second target block by mapping the physical address of the pre-target block to the second logical address.
6. A memory system according to claim 4, wherein when an open block among the storage blocks is selected as a pre-target block, the controller identifies the pre-target block corresponding to the first logical address as the first target block by comparing the logical address of the pre-target block with the reference logical address, and identifies the pre-target block corresponding to the second logical address as the second target block. 7 . The memory system of claim 6 , wherein the controller sets a specific value greater than a maximum value of a range of the first logical address as a minimum value of a range of the second logical address, and sets the specific value as a value of the reference logical address.
8. The memory system of claim 6, wherein the controller sets a specific value smaller than a minimum value of a range of the first logical address as a maximum value of a range of the second logical address, and sets the specific value as a value of the reference logical address.
9. The memory system according to claim 4, wherein when the predetermined condition is whether the number of valid pages is less than or equal to a reference number, the controller selects the pre-source block to perform garbage collection as a merge operation; wherein when the predetermined condition is whether the read count is less than or equal to the first reference count, the controller selects the pre-source block to perform read recycling as the merge operation; and When the predetermined condition is whether the program / erase cycle count is greater than or equal to a second reference count, the controller selects the pre-source block to perform wear leveling as the merge operation.
10. A method of operating a memory system, the memory system comprising a non-volatile memory device, the non-volatile memory device comprising a plurality of memory blocks, each of the plurality of memory blocks comprising a plurality of pages; the method comprising: storing user data received from a host in a first block among the storage blocks, wherein a physical address of the first block is mapped to a first logical address used in the host; generating metadata corresponding to the storage of the user data; and storing the metadata in a second block among the storage blocks, a physical address of the second block being mapped to a second logical address not used in the host; wherein the first logical address and the second logical address are consecutive, Wherein storing the user data comprises: sharing the range of the first logical address with the host; as well as The first block is selected among the stored blocks in response to a first logical address received from the host, and a physical address of the selected first block is mapped to the first logical address.
11. The method of claim 10, wherein storing the metadata comprises: Setting a range of the second logical address, wherein the range of the second logical address does not overlap with the range of the first logical address and is continuous with the range of the first logical address; as well as When the metadata is generated, the second block is selected among the storage blocks in response to the second logical address, and a physical address of the selected second block is mapped to the second logical address.
12. The method according to claim 11, further comprising: Selecting a source block and a target block among the storage blocks to perform a merge operation of moving valid data of the source block to the target block; Wherein selecting the source block and the target block comprises: When a first source block corresponding to the first logical address is selected, a first target block corresponding to the first logical address is selected, and valid data of the first source block is moved to the first target block; as well as When a second source block corresponding to the second logical address is selected, a second target block corresponding to the second logical address is selected, and valid data of the second source block is moved to the second target block.
13. The method of claim 12, wherein selecting the source block and the target block comprises: setting a reference logical address to identify the first logical address and the second logical address; selecting a source block corresponding to a predetermined condition for the merge operation among the storage blocks; comparing the logical address of the pre-source block selected in the pre-selection step with the reference logical address; as well as The pre-source block is identified as one of the first source block and the second source block according to the comparison result.
14. The method according to claim 13, wherein when a free block among the storage blocks is selected as a pre-target block, selecting the source block and the target block further comprises: identifying the pre-target block as the first target block by mapping the physical address of the pre-target block to the first logical address; as well as The pre-target block is identified as the second target block by mapping the physical address of the pre-target block to the second logical address.
15. The method according to claim 13, wherein when an open block among the storage blocks is selected as a pre-target block, selecting the source block and the target block further comprises: comparing the logical address of the pre-target block with the reference logical address; Based on the comparison result, identifying a pre-target block corresponding to the first logical address as the first target block; as well as Based on the comparison result, a pre-target block corresponding to the second logical address is identified as the second target block.
16. The method according to claim 15, wherein setting the reference logical address comprises: A specific value greater than a maximum value of a range of the first logical address is set as a minimum value of a range of the second logical address, and the specific value is set as a value of the reference logical address.
17. The method according to claim 15, wherein setting the reference logical address comprises: A specific value smaller than a minimum value of a range of the first logical address is set as a maximum value of a range of the second logical address, and the specific value is set as a value of the reference logical address.
18. The method of claim 13, wherein selecting the pre-source block comprises: When the predetermined condition is whether the number of valid pages is less than or equal to a reference number, selecting the pre-source block to perform garbage collection as a merge operation; When the predetermined condition is whether the read count is less than or equal to the first reference count, selecting the pre-source block to perform read recycling as the merge operation; and When the predetermined condition is whether the program / erase cycle count is greater than or equal to a second reference count, the pre-source block is selected to perform wear leveling as the merge operation.
Citation Information
Patent Citations
Method for Providing Augmented Reality Service and Apparatus Thereof
KR1020190045679A
Memory system and operating method thereof
CN106708757A
Memory system and operating method thereof
CN107622018A
Methods of utilizing address mapping table to manage data access of storage medium without physically accessing storage medium and related storage controllers thereof
US20110119455A1
Memory system and control method
US20170199687A1
