KR20230166803A - Storage device providing high purge performance and memory block management method thereof - Google Patents

Storage device providing high purge performance and memory block management method thereof Download PDF

Info

Publication number
KR20230166803A
KR20230166803A KR1020220086464A KR20220086464A KR20230166803A KR 20230166803 A KR20230166803 A KR 20230166803A KR 1020220086464 A KR1020220086464 A KR 1020220086464A KR 20220086464 A KR20220086464 A KR 20220086464A KR 20230166803 A KR20230166803 A KR 20230166803A
Authority
KR
South Korea
Prior art keywords
rpmb
block
replay protection
data
blocks
Prior art date
Application number
KR1020220086464A
Other languages
Korean (ko)
Inventor
장영준
오진환
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to US18/124,821 priority Critical patent/US20230384957A1/en
Priority to EP23163934.5A priority patent/EP4287028A1/en
Priority to CN202310395197.2A priority patent/CN117149052A/en
Publication of KR20230166803A publication Critical patent/KR20230166803A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling

Abstract

본 발명에 따른 리플레이 보호 블록 퍼지(RPMB Purge) 명령에 응답하여 퍼지 동작을 수행하는 스토리지 장치는, 적어도 하나의 불휘발성 메모리 장치, 그리고 상기 적어도 하나의 불휘발성 메모리 장치의 데이터 입출력을 제어하며, 리플레이 보호 블록(RPMB) 데이터가 저장되는 상기 적어도 하나의 불휘발성 메모리 장치의 리플레이 보호 블록(RPMB)을 추적하고, 상기 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 가비지 컬렉션을 트리거하는 스토리지 컨트롤러를 포함한다. A storage device that performs a purge operation in response to a replay protection block purge (RPMB Purge) command according to the present invention controls at least one non-volatile memory device and data input/output of the at least one non-volatile memory device, and controls the replay protection block purge (RPMB Purge) command according to the present invention. A storage controller that tracks replay protection blocks (RPMB) of the at least one non-volatile memory device in which protected block (RPMB) data is stored, and triggers garbage collection when the number of replay protected blocks (RPMB) reaches a threshold. do.

Description

높은 퍼지 성능을 제공하는 스토리지 장치 및 그것의 메모리 블록 관리 방법{STORAGE DEVICE PROVIDING HIGH PURGE PERFORMANCE AND MEMORY BLOCK MANAGEMENT METHOD THEREOF}Storage device providing high purge performance and its memory block management method {STORAGE DEVICE PROVIDING HIGH PURGE PERFORMANCE AND MEMORY BLOCK MANAGEMENT METHOD THEREOF}

본 발명은 반도체 메모리 장치에 관한 것으로, 좀 더 구체적으로는 퍼지 성능을 높일 수 있는 스토리지 장치 및 그것의 메모리 블록 관리 방법에 관한 것이다.The present invention relates to a semiconductor memory device, and more specifically, to a storage device capable of increasing purge performance and a memory block management method thereof.

근래에, 스마트폰, 데스크톱 컴퓨터, 랩톱 컴퓨터, 태블릿 PC, 웨어러블 기기와 같은 다양한 모바일 장치나 전자 장치들이 널리 사용되고 있다. 이러한 전자 장치들은 대개 데이터를 저장하기 위한 스토리지 장치를 포함한다. 특히, 이러한 전자 장치들의 대용량화 및 고속화 추세에 따라, 스토리지 장치의 용량을 증가시키고 스토리지 장치의 속도를 향상시키기 위한 많은 노력이 있어 왔다. 이러한 노력의 일환으로, 전자 장치의 호스트 장치와 스토리지 장치 간의 인터페이싱을 수행하기 위한 다양한 규약이 채택되어 왔다.Recently, various mobile devices and electronic devices such as smartphones, desktop computers, laptop computers, tablet PCs, and wearable devices are widely used. These electronic devices usually include storage devices for storing data. In particular, in accordance with the trend of increasing capacity and speed of electronic devices, many efforts have been made to increase the capacity of storage devices and improve the speed of storage devices. As part of this effort, various protocols have been adopted to perform interfacing between host devices and storage devices in electronic devices.

전자 장치에 포함되는 스토리지 장치는 플래시 메모리, PRAM (Phase-change RAM), MRAM (Magnetic RAM), RRAM (Resistive RAM), FRAM (Ferroelectric RAM) 등과 같이 전원 공급이 차단되어도 저장하고 있던 데이터를 유지하는 불휘발성 메모리 장치를 포함할 수 있다. 특히, 몇몇 불휘발성 메모리 장치들은 덮어쓰기가 불가능하며, 보안상 이유로 기존의 데이터를 물리적으로 소거하는 퍼지(Purge) 동작을 수행한다. Storage devices included in electronic devices include flash memory, PRAM (Phase-change RAM), MRAM (Magnetic RAM), RRAM (Resistive RAM), and FRAM (Ferroelectric RAM), which maintain stored data even when the power supply is cut off. It may include a non-volatile memory device. In particular, some non-volatile memory devices cannot be overwritten, and for security reasons, a purge operation is performed to physically erase existing data.

퍼지 동작은 대상이 되는 무효(Invalid) 데이터가 특정되어 있지 않다. 따라서, 일반적인 퍼지 동작은 스토리지 장치에 저장된 모든 무효(Invalid) 데이터에 대한 물리적인 소거를 야기하므로, 스토리지 장치의 성능을 저하시키는 문제점이 있다. 특히, 최근 리플레이 보호 블록(Replay Protected Memory Block: 이하, RPMB)에 대한 퍼지 명령을 제공하는 규약들이 등장하고 있다. 이 경우에도 대상이 되는 특정 RPMB 데이터가 지정되지 않아 모든 무효화된 RPMB 데이터(Invalid RPMB data)에 대한 물리적 소거가 불가피하게 발생한다. 이러한 퍼지 동작의 특성에 의해 RPMB 데이터가 다수의 메모리 블록에 분포되어 있는 경우, 스토리지 장치의 응답이 지연되고 성능의 저하가 발생한다. In the purge operation, the target invalid data is not specified. Accordingly, the general purge operation causes physical erasure of all invalid data stored in the storage device, which has the problem of deteriorating the performance of the storage device. In particular, protocols providing purge instructions for Replay Protected Memory Block (RPMB) have recently emerged. Even in this case, since the specific target RPMB data is not designated, physical deletion of all invalid RPMB data inevitably occurs. Due to the characteristics of this purge operation, when RPMB data is distributed across multiple memory blocks, the response of the storage device is delayed and performance deteriorates.

(1) 미국 등록특허공보 US 10,522,229 (2019.12.31)(1) US Registered Patent Publication US 10,522,229 (2019.12.31) (2) 미국 등록특허공보 US 7,430,136 (2008.09.30)(2) US Registered Patent Publication US 7,430,136 (2008.09.30) (3) 미국 등록특허공보 US 10,996,883(2021.05.04)(3) U.S. Registered Patent Publication US 10,996,883 (2021.05.04)

본 발명의 목적은 리플레이 보호 블록(RPMB) 데이터에 대한 퍼지 성능을 높일 수 있는 스토리지 장치 및 그것의 메모리 블록 관리 방법을 제공하는데 있다. The purpose of the present invention is to provide a storage device and its memory block management method that can increase purge performance for replay protection block (RPMB) data.

상기 목적을 달성하기 위한 본 발명에 따른 리플레이 보호 블록 퍼지(RPMB Purge) 명령에 응답하여 퍼지 동작을 수행하는 스토리지 장치는, 적어도 하나의 불휘발성 메모리 장치, 그리고 상기 적어도 하나의 불휘발성 메모리 장치의 데이터 입출력을 제어하며, 리플레이 보호 블록(RPMB) 데이터가 저장되는 상기 적어도 하나의 불휘발성 메모리 장치의 리플레이 보호 블록(RPMB)을 추적하고, 상기 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 가비지 컬렉션을 트리거하는 스토리지 컨트롤러를 포함하되, 상기 스토리지 컨트롤러는 쓰기 데이터를 프로그램할 로그 블록을 할당할 때, 프리 블록들 중에서 상기 리플레이 보호 블록(RPMB)에 대응하는 메모리 블록에 우선순위를 부여한다.A storage device that performs a purge operation in response to a replay protection block purge (RPMB Purge) command according to the present invention to achieve the above object includes at least one non-volatile memory device and data of the at least one non-volatile memory device. Controls input and output, tracks replay protection blocks (RPMB) of the at least one non-volatile memory device in which RPMB data is stored, and performs garbage collection when the number of replay protection blocks (RPMB) reaches a threshold. It includes a storage controller that triggers, and when allocating a log block for programming write data, the storage controller gives priority to a memory block corresponding to the replay protection block (RPMB) among free blocks.

상기 목적을 달성하기 위한 본 발명에 따른 불휘발성 메모리 장치, 그리고 상기 불휘발성 메모리 장치의 메모리 블록들 중 리플레이 보호 블록(RPMB) 데이터가 저장되는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 가비지 컬렉션을 수행하는 스토리지 컨트롤러를 포함한다.A non-volatile memory device according to the present invention to achieve the above object, and garbage collection when the number of replay protection blocks (RPMB) in which RPMB data is stored among the memory blocks of the non-volatile memory device reaches a threshold. Includes a storage controller that performs:

상기 목적을 달성하기 위한 본 발명에 따른 리플레이 보호 블록 퍼지(RPMB Purge) 명령에 응답하여 퍼지 동작을 수행하는 스토리지 장치의 메모리 블록 관리 방법은, 리플레이 보호 블록(RPMB) 데이터가 저장되는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달했는지 체크하는 단계, 상기 리플레이 보호 블록(RPMB)의 수가 상기 임계치에 도달한 경우, 프리 블록들 중에 무효 RPMB 데이터를 포함하는 어느 하나를 선택하는 단계, 그리고 상기 선택된 어느 하나의 프리 블록에 상기 리플레이 보호 블록(RPMB)들로부터 수집된 유효 데이터를 복사하는 단계를 포함한다. In order to achieve the above object, a memory block management method of a storage device that performs a purge operation in response to a replay protection block purge (RPMB Purge) command according to the present invention includes a replay protection block in which replay protection block (RPMB) data is stored. Checking whether the number of replay protection blocks (RPMB) has reached the threshold, selecting one of the free blocks containing invalid RPMB data when the number of replay protection blocks (RPMB) has reached the threshold, and selecting one of the free blocks (RPMB) containing invalid RPMB data, and the selected one and copying valid data collected from the replay protection blocks (RPMB) to a free block of .

상술한 본 발명의 실시 예에 따른 스토리지 장치는, 리플레이 보호 블록(리플레이 보호 블록(RPMB) 데이터에 대한 퍼지 레이턴시를 줄일 수 있다. 따라서, RPMB 데이터에 대한 퍼지 기능을 지원하는 스토리지 장치의 성능을 획기적으로 높일 수 있다. The storage device according to the embodiment of the present invention described above can reduce the purge latency for replay protection block (RPMB) data. Therefore, the performance of the storage device supporting the purge function for RPMB data is dramatically improved. can be increased.

도 1은 본 발명의 실시 예에 따라 리플레이 보호 블록 퍼지(RPMB Purge) 동작을 수행하도록 구성되는 시스템(1000)을 보여주는 블록도이다.
도 2는 본 발명의 실시 예에 따른 스토리지 장치의 구성을 세부적으로 보여주는 블록도이다.
도 3은 도 2의 스토리지 컨트롤러의 구성을 예시적으로 보여주는 블록도이다.
도 4는 본 발명의 실시 예에 따른 블록 매니저의 동작을 보여주는 도면이다.
도 5는 본 발명의 블록 매니저의 동작을 예시적으로 보여주는 순서도이다.
도 6은 도 5의 S140 단계를 좀더 구체적으로 보여주는 순서도이다.
도 7은 본 발명의 RPMB 퍼지 매니저의 주요 기능을 예시적으로 보여주는 도면이다.
도 8은 본 발명의 RPMB 퍼지 매니저의 리플레이 보호 블록의 수(nRPMB)를 제한하는 동작을 간략히 보여주는 순서도이다.
도 9a 및 도 9b는 리플레이 보호 블록(RPMB)의 수를 제한하지 않는 일반적인 경우의 리플레이 보호 블록(RPMB)의 수가 증가하는 예들이다.
도 10은 본 발명의 실시 예에 따른 리플레이 보호 블록의 수(nRPMB)의 제한을 통해서 RPMB 퍼지 대상의 수가 제어될 수 있음을 보여주는 도면이다.
도 11은 본 발명의 실시 예에 따른 스토리지 컨트롤러의 RPMB 데이터의 쓰기 동작을 간략히 보여주는 순서도이다.
도 12는 본 발명의 효과를 예시적으로 보여주는 그래프이다.
도 13 및 도 14는 백패턴 프로그램 절차를 포함하는 경우의 일반적 퍼지 및 본 발명의 퍼지 동작을 각각 보여주는 도면들이다.
도 15는 도 1의 시스템의 계층적 구조를 예시적으로 보여주는 도면이다.
Figure 1 is a block diagram showing a system 1000 configured to perform a replay protection block purge (RPMB Purge) operation according to an embodiment of the present invention.
Figure 2 is a block diagram showing in detail the configuration of a storage device according to an embodiment of the present invention.
FIG. 3 is a block diagram exemplarily showing the configuration of the storage controller of FIG. 2.
Figure 4 is a diagram showing the operation of a block manager according to an embodiment of the present invention.
Figure 5 is a flowchart exemplarily showing the operation of the block manager of the present invention.
Figure 6 is a flowchart showing step S140 of Figure 5 in more detail.
Figure 7 is a diagram illustrating the main functions of the RPMB fuzzy manager of the present invention.
Figure 8 is a flow chart briefly showing the operation of limiting the number of replay protection blocks (nRPMB) of the RPMB fuzzy manager of the present invention.
9A and 9B are examples of increasing the number of replay protection blocks (RPMB) in a general case where the number of RPMBs is not limited.
Figure 10 is a diagram showing that the number of RPMB purge targets can be controlled by limiting the number of replay protection blocks (nRPMB) according to an embodiment of the present invention.
Figure 11 is a flowchart briefly showing a write operation of RPMB data of a storage controller according to an embodiment of the present invention.
Figure 12 is a graph exemplarily showing the effect of the present invention.
Figures 13 and 14 are diagrams showing a general purge operation and a purge operation according to the present invention when a backpattern program procedure is included, respectively.
FIG. 15 is a diagram illustrating the hierarchical structure of the system of FIG. 1.

앞의 일반적인 설명 및 다음의 상세한 설명 모두 예시적이라는 것이 이해되어야 하며, 청구된 발명의 부가적인 설명이 제공되는 것으로 여겨져야 한다. 참조 부호들이 본 발명의 바람직한 실시 예들에 상세히 표시되어 있으며, 그것의 예들이 참조 도면들에 표시되어 있다. 가능한 어떤 경우에도, 동일한 참조 번호들이 동일한 또는 유사한 부분을 참조하기 위해서 설명 및 도면들에 사용된다.It is to be understood that both the foregoing general description and the following detailed description are exemplary and are to be regarded as providing additional explanation of the claimed invention. Reference signs are indicated in detail in preferred embodiments of the invention, examples of which are indicated in the reference drawings. Wherever possible, the same reference numerals are used in the description and drawings to refer to the same or similar parts.

도 1은 본 발명의 실시 예에 따라 리플레이 보호 블록 퍼지(RPMB Purge) 동작을 수행하도록 구성되는 시스템(1000)을 보여주는 블록도이다. 시스템(1000)은 호스트(1100) 및 스토리지 장치(1200)를 포함할 수 있다. 이하 본 명세서에서, 일반 퍼지(Normal Purge) 동작은 스토리지 장치(1200)에 저장된 무효(Invalid) 데이터 전부를 물리적으로 소거하는 것을 지칭하며, 리플레이 보호 블록 퍼지(RPMB Purge) 동작은 스토리지 장치(1200)에 저장된 무효 데이터 중 RPMB 데이터를 물리적으로 소거하는 것을 지칭한다.Figure 1 is a block diagram showing a system 1000 configured to perform a replay protection block purge (RPMB Purge) operation according to an embodiment of the present invention. System 1000 may include a host 1100 and a storage device 1200. Hereinafter, in this specification, the normal purge operation refers to physically erasing all invalid data stored in the storage device 1200, and the replay protection block purge (RPMB purge) operation refers to physically erasing all invalid data stored in the storage device 1200. This refers to physically erasing RPMB data among invalid data stored in .

호스트(1100)는 시스템(1000)의 제반 동작들을 관리하고 처리할 수 있다. 호스트(1100)는 다양한 산술 연산/논리 연산을 수행할 수 있다. 예를 들어, 호스트(1100)는 하나 이상의 프로세서 코어들을 포함할 수 있다. 호스트(1100)는 FPGA(Field Programmable Gate Arrays)나 ASIC(Application Specific Integrated Circuit)과 같은 전용 회로를 사용하여 구현되거나, 또는 SoC(System on Chip)로 구현될 수 있다. 예를 들어, 호스트(1100)는 범용 프로세서, 전용 프로세서, 또는 애플리케이션 프로세서(Application Processor)를 포함할 수 있다. 호스트(1100)는 프로세서 그 자체이거나, 프로세서를 포함하는 전자 장치 또는 시스템일 수 있다.The host 1100 can manage and process overall operations of the system 1000. The host 1100 can perform various arithmetic/logical operations. For example, host 1100 may include one or more processor cores. The host 1100 may be implemented using a dedicated circuit such as Field Programmable Gate Arrays (FPGA) or Application Specific Integrated Circuit (ASIC), or may be implemented as a System on Chip (SoC). For example, the host 1100 may include a general-purpose processor, a dedicated processor, or an application processor. The host 1100 may be the processor itself or an electronic device or system including a processor.

호스트(1100)는 스토리지 장치(1200)로의 쓰기 요청에 따른 명령어 및 쓰기 데이터를 생성할 수 있다. 나아가, 호스트(1100)는 소거 요청에 따른 언맵(Unmap) 커맨드 및 퍼지 요청 등을 생성할 수 있다. 예를 들어, 쓰기 명령어, 쓰기 데이터, 언맵 명령어, 퍼지 요청 등은 JEDEC에 의해 제안된 인터페이스 규약에 따라 UPIU(UFS Protocol Information Unit)를 포함하는 패킷들(예컨대, CMDw UPIU, DATA UPIU)로 변환/가공될 수 있다. 특히, 호스트(1100)는 보안 기능을 보장하기 위해 인증키와 같은 데이터를 기입할 때, RPMB 로직 유닛 쓰기 요청(RPMB LU Write)을 생성할 수 있다. 더불어, 덮어쓰기를 통해서 무효화된 RPMB 데이터에 대한 퍼지 명령(이하, RPMB 퍼지)을 스토리지 장치(1200)에 제공할 수 있다. The host 1100 may generate a command and write data according to a write request to the storage device 1200. Furthermore, the host 1100 may generate an unmap command and purge request in response to an erase request. For example, write commands, write data, unmap commands, purge requests, etc. are converted into packets containing UPIU (UFS Protocol Information Unit) (e.g., CMDw UPIU, DATA UPIU) according to the interface protocol proposed by JEDEC. It can be processed. In particular, the host 1100 may generate an RPMB logic unit write request (RPMB LU Write) when writing data such as an authentication key to ensure security functions. In addition, a purge command (hereinafter referred to as RPMB purge) for RPMB data invalidated through overwriting may be provided to the storage device 1200.

스토리지 장치(1200)는 스토리지 컨트롤러(1210)와 불휘발성 메모리 장치(1220)를 포함할 수 있다. 스토리지 컨트롤러(1210)는 불휘발성 메모리 장치(1220)에 저장된(또는 저장될) 데이터의 논리 주소와 물리 주소 사이의 대응 관계를 정의하는 맵핑 테이블을 관리할 수 있다. 나아가, 스토리지 컨트롤러(1210)는 호스트(1100)로부터의 RPMB 퍼지 요청에 응답하여 무효화된 RPMB 데이터에 대한 퍼지 동작을 수행할 수 있다. 즉, 스토리지 컨트롤러(1210)는 호스트(1100)로부터의 RPMB 퍼지 요청에 따라 무효화된 RPMB 데이터 영역을 물리적으로 소거할 수 있다.The storage device 1200 may include a storage controller 1210 and a non-volatile memory device 1220. The storage controller 1210 may manage a mapping table that defines a correspondence between logical addresses and physical addresses of data stored (or to be stored) in the non-volatile memory device 1220. Furthermore, the storage controller 1210 may perform a purge operation on invalidated RPMB data in response to an RPMB purge request from the host 1100. That is, the storage controller 1210 may physically erase the invalidated RPMB data area in response to an RPMB purge request from the host 1100.

특히, 스토리지 컨트롤러(1210)는 RPMB 데이터가 저장된 메모리 블록(이하, 리플레이 보호 블록(RPMB))을 추적하는 기능을 갖는다. 좀더 구체적으로, 스토리지 컨트롤러(1210)는 유효한 RPMB 데이터(Valid RPMB data)가 저장된 메모리 블록이나, 논리적으로 소거되어 무효화된 RPMB 데이터(Invalid RPMB data)가 포함된 메모리 블록을 추적하는 기능을 갖는다. 이하에서 유효한 RPMB 데이터(Valid RPMB data)가 저장된 메모리 블록과 무효화된 RPMB 데이터(Invalid RPMB data)가 포함되는 메모리 블록을 통칭하여 리플레이 보호 블록(RPMB)이라 칭하기로 한다. In particular, the storage controller 1210 has a function of tracking a memory block (hereinafter referred to as a replay protection block (RPMB)) in which RPMB data is stored. More specifically, the storage controller 1210 has a function of tracking memory blocks storing valid RPMB data or memory blocks containing invalid RPMB data that have been logically erased. Hereinafter, the memory block storing valid RPMB data and the memory block containing invalid RPMB data will be collectively referred to as a replay protection block (RPMB).

스토리지 컨트롤러(1210)는 리플레이 보호 블록(RPMB)의 수를 특정 개수 이하로 제한할 수 있다. 즉, 추적되는 리플레이 보호 블록(RPMB)의 수가 미리 결정된 임계치에 도달하면, 스토리지 컨트롤러(1210)는 리플레이 보호 블록(RPMB)들에 대한 가비지 컬렉션(Garbage Collection)을 수행한다. 더불어, 스토리지 컨트롤러(1210)는 새로운 로그 블록(Log Block)을 할당해야 할 경우, 프리 블록(Free Block)들 중에서 리플레이 보호 블록(RPMB)에 대응하는 메모리 블록에 우선순위를 부여할 수 있다. 스토리지 컨트롤러(1210)는 리플레이 보호 블록(RPMB)에 대한 가비지 컬렉션 및 로그 블록 할당 우선순위를 관리하여 리플레이 보호 블록(RPMB)의 수를 제한할 수 있다. The storage controller 1210 may limit the number of replay protection blocks (RPMB) to a certain number or less. That is, when the number of tracked replay protection blocks (RPMB) reaches a predetermined threshold, the storage controller 1210 performs garbage collection on the replay protection blocks (RPMB). In addition, when the storage controller 1210 needs to allocate a new log block, priority can be given to the memory block corresponding to the replay protection block (RPMB) among free blocks. The storage controller 1210 may limit the number of replay protection blocks (RPMBs) by managing garbage collection and log block allocation priorities for the RPMBs.

상술된 구성에 의하면, 본 발명의 스토리지 장치(1200)는 리플레이 보호 블록(RPMB)의 수를 미리 결정된 임계치 미만으로 관리할 수 있다. RPMB 퍼지 명령이 들어오는 경우, 리플레이 보호 블록(RPMB)의 수에 따라 퍼지에 소요되는 시간이 증가하는 것으로 알려져 있다. 따라서, 본 발명의 스토리지 장치(1200)에 의해 RPMB 퍼지 요청에 따라 발생하는 성능 저하 또는 레이턴시를 줄일 수 있다.According to the above-described configuration, the storage device 1200 of the present invention can manage the number of replay protection blocks (RPMB) to be less than a predetermined threshold. It is known that when an RPMB purge command is received, the time required for purging increases depending on the number of replay protection blocks (RPMB). Accordingly, performance degradation or latency occurring due to an RPMB purge request can be reduced by the storage device 1200 of the present invention.

도 2는 본 발명의 실시 예에 따른 스토리지 장치의 구성을 세부적으로 보여주는 블록도이다. 도 2를 참조하면, 스토리지 장치(1200)는 스토리지 컨트롤러(1210) 및 불휘발성 메모리 장치(1220)를 포함한다. 예시적으로, 스토리지 컨트롤러(1210) 및 불휘발성 메모리 장치(1220) 각각은 하나의 칩, 하나의 패키지, 또는 하나의 모듈로 제공될 수 있다. 또는, 스토리지 컨트롤러(1210) 및 불휘발성 메모리 장치(1220)는 하나의 칩, 하나의 패키지, 또는 하나의 모듈로 형성되어, 임베디드 메모리, 메모리 카드, 메모리 스틱, 솔리드 스테이트 드라이브(SSD: Solid State Drive) 등과 같은 스토리지로 제공될 수도 있다.Figure 2 is a block diagram showing in detail the configuration of a storage device according to an embodiment of the present invention. Referring to FIG. 2 , the storage device 1200 includes a storage controller 1210 and a non-volatile memory device 1220. By way of example, the storage controller 1210 and the non-volatile memory device 1220 may each be provided as one chip, one package, or one module. Alternatively, the storage controller 1210 and the non-volatile memory device 1220 are formed of one chip, one package, or one module, and can be used as embedded memory, memory card, memory stick, or solid state drive (SSD). ), etc. may be provided as storage.

스토리지 컨트롤러(1210)는 불휘발성 메모리 장치(1220)를 제어하도록 구성될 수 있다. 예를 들어, 스토리지 컨트롤러(1210)는 호스트(1100, 도 1 참조)의 요청에 따라 불휘발성 메모리 장치(1220)에 데이터를 기입하거나 또는 불휘발성 메모리 장치(1220)에 저장된 데이터를 독출할 수 있다. 이러한 불휘발성 메모리 장치(1220)로의 접근을 위하여, 스토리지 컨트롤러(1210)는 명령어, 어드레스, 데이터 그리고 제어 신호를 불휘발성 메모리 장치(1220)에 제공할 수 있다.The storage controller 1210 may be configured to control the non-volatile memory device 1220. For example, the storage controller 1210 may write data to the non-volatile memory device 1220 or read data stored in the non-volatile memory device 1220 at the request of the host 1100 (see FIG. 1). . To access the non-volatile memory device 1220, the storage controller 1210 may provide commands, addresses, data, and control signals to the non-volatile memory device 1220.

특히, 스토리지 컨트롤러(1210)는 본 발명의 실시 예에 따라 리플레이 보호 블록(RPMB)을 추적하고 리플레이 보호 블록(RPMB)의 수를 제한할 수 있다. 이러한 스토리지 컨트롤러(1210)의 기능에 의해, RPMB 퍼지 명령에 따른 리플레이 보호 블록(RPMB)에 대한 가비지 컬렉션이나 백패턴 프로그램으로 인한 성능 저하가 최소화될 수 있다. 이를 위해 스토리지 컨트롤러(1210)는 블록 매니저(1212)와 RPMB 퍼지 매니저(1214)를 포함한다. 블록 매니저(1212)와 RPMB 퍼지 매니저(1214)는 하드웨어로 구현될 수도 있고 펌웨어(Firmware)와 같은 소프트웨어로 구현될 수 있을 것이다.In particular, the storage controller 1210 may track replay protection blocks (RPMBs) and limit the number of replay protection blocks (RPMBs) according to an embodiment of the present invention. Due to this function of the storage controller 1210, performance degradation due to garbage collection or backpattern programs for the replay protection block (RPMB) according to the RPMB purge command can be minimized. For this purpose, the storage controller 1210 includes a block manager 1212 and an RPMB fuzzy manager 1214. The block manager 1212 and the RPMB fuzzy manager 1214 may be implemented as hardware or may be implemented as software such as firmware.

블록 매니저(1212)는 RPMB 데이터가 기입되는 메모리 블록들을 추적하고 관리한다. 예를 들면, 블록 매니저(1212)는 RPMB 데이터의 쓰기 요청(RPMB LU Write)이 발생하면, 쓰기 요청된 로직 유닛(LU) 데이터를 불휘발성 메모리 장치(1220)의 블록 단위 및 페이지 단위로 변환하고 맵핑한다. 그리고 블록 매니저(1212)는 RPMB 데이터가 기입되는 메모리 블록에 RPMB 식별자를 할당한다. 예를 들면, 블록 매니저(1212)는 RPMB 데이터가 기입되는 메모리 블록을 리플레이 보호 블록(RPMB) 식별자에 해당하는 테그(Tag)나 플레그(Flag)를 부여할 수 있다. 또는, 블록 매니저(1212)는 RPMB 데이터가 기입되는 메모리 블록을 맵핑 테이블이나 리스트로 관리할 수 있다. The block manager 1212 tracks and manages memory blocks in which RPMB data is written. For example, when a request to write RPMB data (RPMB LU Write) occurs, the block manager 1212 converts the requested logic unit (LU) data into block and page units of the non-volatile memory device 1220. Mapping. Then, the block manager 1212 allocates an RPMB identifier to the memory block in which the RPMB data is written. For example, the block manager 1212 may assign a tag or flag corresponding to a replay protection block (RPMB) identifier to the memory block in which RPMB data is written. Alternatively, the block manager 1212 may manage the memory block in which RPMB data is written as a mapping table or list.

더불어, 블록 매니저(1212)는 RPMB 데이터 또는 일반 데이터 쓰기 요청이 발행하면, 프리 블록들 중에서 RPMB 식별자를 가진 메모리 블록을 우선적으로 로그 블록(Log Block)으로 할당할 수 있다. 일단, 메모리 블록에 RPMB 식별자가 할당되면, 실질적인 블록 소거(Block Erase)가 발생하기 전까지는 블록 매니저(1212)에 의하여 리플레이 보호 블록(RPMB)으로 추적되고 관리될 것이다.In addition, when a request to write RPMB data or general data is issued, the block manager 1212 may preferentially allocate a memory block with an RPMB identifier among free blocks as a log block. Once an RPMB identifier is assigned to a memory block, it will be tracked and managed as a replay protection block (RPMB) by the block manager 1212 until actual block erase (Block Erase) occurs.

RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)의 수를 관리하기 위한 제반 제어 동작을 수행한다. 그리고 RPMB 퍼지 매니저(1214)는 RPMB 퍼지 명령에 응답하여 리플레이 보호 블록(RPMB)에 대한 물리적 소거를 실행할 수 있다. 여기서, RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)의 수를 관리하기 위한 가비지 컬렉션을 수행할 수 있다. 예를 들면, RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면, 리플레이 보호 블록(RPMB)들 간의 가비지 컬렉션을 수행한다. The RPMB fuzzy manager 1214 performs various control operations to manage the number of replay protection blocks (RPMB). And the RPMB purge manager 1214 may perform physical erasing of the replay protection block (RPMB) in response to the RPMB purge command. Here, the RPMB fuzzy manager 1214 may perform garbage collection to manage the number of replay protection blocks (RPMB). For example, when the number of replay protection blocks (RPMBs) reaches a threshold, the RPMB fuzzy manager 1214 performs garbage collection between replay protection blocks (RPMBs).

가비지 컬렉션에 의해서 무효화된 리플레이 보호 블록(RPMB)은 프리 블록으로 리스트된다. 그러면, 프리 블록 리스트에 포함된 무효화된 리플레이 보호 블록(RPMB)은 블록 매니저(1212)에 의해서 우선적으로 로그 블록으로 할당된다. 로그 블록으로의 할당을 위해 무효화된 리플레이 보호 블록(RPMB)은 물리적으로 소거되고, 백패턴 데이터가 기입될 수도 있을 것이다. 이러한 절차에 의해서, 리플레이 보호 블록(RPMB)의 수는 임계치 미만으로 유지될 수 있다. RPMB 퍼지 명령이 입력되면, 퍼지 대상이 되는 리플레이 보호 블록(RPMB)의 수가 임계치 미만으로 제한되기 때문에 퍼지 동작에 소요되는 시간은 사용자가 설정한 레이턴시 이하로 관리될 수 있다.Replay protected blocks (RPMB) that are invalidated by garbage collection are listed as free blocks. Then, the invalidated replay protection block (RPMB) included in the free block list is preferentially allocated as a log block by the block manager 1212. For allocation to the log block, the invalidated replay protection block (RPMB) may be physically erased and backpattern data may be written. By this procedure, the number of replay protection blocks (RPMB) can be kept below a threshold. When the RPMB purge command is input, the number of replay protection blocks (RPMB) subject to purging is limited to less than a threshold, so the time required for the purge operation can be managed below the latency set by the user.

여기서, 블록 매니저(1212)와 RPMB 퍼지 매니저(1214)는 플래시 변환 계층(Flash Translation Layer: 이하, FTL)의 일부로 구현될 수 있다. 또는, 블록 매니저(1212)와 RPMB 퍼지 매니저(1214)는 플래시 변환 계층(FTL)의 맵핑과 가비지 컬렉션 동작을 상호 보완하는 별도의 장치나 소프트웨어로 구현될 수 있을 것이다.Here, the block manager 1212 and the RPMB fuzzy manager 1214 may be implemented as part of a flash translation layer (FTL). Alternatively, the block manager 1212 and the RPMB fuzzy manager 1214 may be implemented as separate devices or software that complement the mapping and garbage collection operations of the flash translation layer (FTL).

스토리지 컨트롤러(1210)에 포함되는 플래시 변환 계층(FTL)은 호스트(1100)의 파일 시스템(File System)과 불휘발성 메모리 장치(1220) 사이에서 불휘발성 메모리 장치(1220)의 삭제 연산을 감추기 위한 인터페이싱을 제공한다. 플래시 변환 계층(FTL)에 의하여, 쓰기 전 소거(Erase-before-Write) 및 소거 단위와 쓰기 단위의 불일치라는 불휘발성 메모리 장치(1220)의 단점이 보완될 수 있다. 또한, 플래시 변환 계층(FTL)은 호스트(1100)의 파일 시스템(File system)이 생성한 논리 주소(Logical Address)를 불휘발성 메모리 장치(1220)의 물리 주소(Physical Address)로 맵핑(Mapping)시킨다. 이 밖에도 플래시 변환 계층(FTL)은 불휘발성 메모리 장치(1220)의 수명을 관리하기 위한 웨어 레벨링(Wear leveling)이나 데이터 용량을 관리하기 위한 가비지 컬렉션(Garbage collection)에도 관여한다. The flash translation layer (FTL) included in the storage controller 1210 is an interfacing function to hide the delete operation of the non-volatile memory device 1220 between the file system of the host 1100 and the non-volatile memory device 1220. provides. By using the flash translation layer (FTL), the shortcomings of the non-volatile memory device 1220, such as erase-before-write and mismatch between erase units and write units, can be compensated for. In addition, the flash translation layer (FTL) maps the logical address generated by the file system of the host 1100 to the physical address of the non-volatile memory device 1220. . In addition, the flash translation layer (FTL) is also involved in wear leveling to manage the lifespan of the non-volatile memory device 1220 and garbage collection to manage data capacity.

불휘발성 메모리 장치(1220)는 스토리지 컨트롤러(1210)의 제어에 따라 스토리지 컨트롤러(1210)로부터 수신된 데이터를 저장하거나 또는 저장된 데이터를 스토리지 컨트롤러(1210)로 전송할 수 있다. 불휘발성 메모리 장치(1220)는 복수의 메모리 블록들(BLK1~BLKn-1)을 포함할 수 있다. 복수의 메모리 블록들(BLK1~BLKn-1) 각각은 기판에 수직 방향으로 워드 라인 레이어가 적층되는 3차원 메모리 구조를 갖는다. 복수의 메모리 블록들(BLK1~BLKn-1) 각각은 스토리지 컨트롤러(1210)에 의해서 소거 카운트(Erase count)와 같은 웨어 레벨링을 위한 정보를 통해서 관리될 수 있다. The nonvolatile memory device 1220 may store data received from the storage controller 1210 or transmit the stored data to the storage controller 1210 under the control of the storage controller 1210 . The nonvolatile memory device 1220 may include a plurality of memory blocks BLK1 to BLKn-1. Each of the plurality of memory blocks (BLK1 to BLKn-1) has a three-dimensional memory structure in which word line layers are stacked in a vertical direction on the substrate. Each of the plurality of memory blocks (BLK1 to BLKn-1) can be managed by the storage controller 1210 through information for wear leveling, such as an erase count.

이상의 본 발명의 실시 예에 따르면, 스토리지 장치(1200)는 리플레이 보호 블록(RPMB)의 수를 미리 설정된 임계치 이하로 유지할 수 있다. 리플레이 보호 블록(RPMB)의 수가 많을수록 RPBM 퍼지 명령의 실행에 소요되는 시간이 증가하게 된다. 본 발명의 스토리지 장치(1200)는 리플레이 보호 블록(RPMB)의 수를 성능 저하를 최소화할 수 있는 수 이하로 유지할 수 있다. 따라서, 스토리지 장치(1200)는 RPMB 퍼지 명령에 따른 성능 저하를 최소화할 수 있다.According to the above embodiment of the present invention, the storage device 1200 can maintain the number of replay protection blocks (RPMB) below a preset threshold. As the number of replay protection blocks (RPMB) increases, the time required to execute the RPBM purge command increases. The storage device 1200 of the present invention can maintain the number of replay protection blocks (RPMB) below the number that can minimize performance degradation. Accordingly, the storage device 1200 can minimize performance degradation due to the RPMB purge command.

도 3은 도 2의 스토리지 컨트롤러의 구성을 예시적으로 보여주는 블록도이다. 도 3을 참조하면, 본 발명의 스토리지 컨트롤러(1210)는 프로세싱 유닛(1211), 워킹 메모리(1213), 호스트 인터페이스(1215), 그리고 플래시 인터페이스(1217)를 포함한다. 하지만, 스토리지 컨트롤러(1210)의 구성 요소들이 앞서 언급된 구성 요소들에 국한되지 않음은 잘 이해될 것이다. 예를 들면, 스토리지 컨트롤러(1210)는 부팅(Booting) 동작에 필요한 코드 데이터(Code data)를 저장하는 ROM(Read Only Memory)이나 에러 정정 코드 블록(ECC Block) 등을 더 포함할 수도 있다.FIG. 3 is a block diagram exemplarily showing the configuration of the storage controller of FIG. 2. Referring to FIG. 3, the storage controller 1210 of the present invention includes a processing unit 1211, a working memory 1213, a host interface 1215, and a flash interface 1217. However, it will be well understood that the components of the storage controller 1210 are not limited to the components mentioned above. For example, the storage controller 1210 may further include a read only memory (ROM) or an error correction code block (ECC block) that stores code data required for a booting operation.

프로세싱 유닛(1211)은 중앙 처리 장치(Central Processing Unit) 또는 마이크로-프로세서(Micro-processor)를 포함할 수 있다. 프로세싱 유닛(1211)은 스토리지 컨트롤러(1210)를 구동하기 위한 펌웨어(Firmware)를 구동할 수 있다. 특히, 프로세싱 유닛(1211)은 워킹 메모리(1213)에 로드되는 소프트웨어들을 구동할 수 있다. 예를 들면, 프로세싱 유닛(1211)은 블록 매니저(1212)나 RPMB 퍼지 매니저(1214)를 실행할 수 있다. 이밖에, 프로세싱 유닛(1211)은 플래시 변환 계층(FTL)과 같은 스토리지 장치(1200)의 핵심 기능들을 실행할 수 있다. The processing unit 1211 may include a central processing unit or a microprocessor. The processing unit 1211 may drive firmware for driving the storage controller 1210. In particular, the processing unit 1211 can drive software loaded into the working memory 1213. For example, the processing unit 1211 may execute the block manager 1212 or the RPMB purge manager 1214. In addition, the processing unit 1211 may execute core functions of the storage device 1200, such as a flash translation layer (FTL).

워킹 메모리(1213)에는 스토리지 컨트롤러(1210)를 제어하기 위한 소프트웨어(또는, 펌웨어)나 데이터가 로드(Load)된다. 워킹 메모리(1213)에 로드된 소프트웨어 및 데이터는 프로세싱 유닛(1211)에 의해 구동되거나 처리된다. 특히, 본 발명의 실시 예에 따르면, 워킹 메모리(1213)에는 플래시 변환 계층(FTL), 블록 매니저(1212), 그리고 RPMB 퍼지 매니저(1214) 등이 로드될 수 있다. 또는, 블록 매니저(1212)나 RPMB 퍼지 매니저(1214)의 기능을 포함하는 플래시 변환 계층(FTL)이 로드될 수도 있을 것이다. Software (or firmware) or data for controlling the storage controller 1210 is loaded into the working memory 1213. Software and data loaded into the working memory 1213 are driven or processed by the processing unit 1211. In particular, according to an embodiment of the present invention, a flash translation layer (FTL), a block manager 1212, and an RPMB fuzzy manager 1214 may be loaded into the working memory 1213. Alternatively, a flash translation layer (FTL) including the functions of the block manager 1212 or the RPMB fuzzy manager 1214 may be loaded.

프로세싱 유닛(1211)에 의해서 구동되는 블록 매니저(1212)는 RPMB 데이터가 프로그램된 리플레이 보호 블록(RPMB)들을 추적하고 관리한다. 블록 매니저(1212)는 RPMB 쓰기 요청(RPMB LU Write)이 발생하면, 쓰기 요청된 데이터를 불휘발성 메모리 장치(1220)에 기입하고 RPMB 식별자를 사용하여 해당 블록을 관리한다. RPMB 데이터나 일반 데이터의 쓰기 요청이 발생할 때, 쓰기 요청된 데이터를 프로그램할 로그 블록을 할당해야 한다. 이때, 블록 매니저(1212)는 프리 블록들 중에서 RPMB 식별자를 가진 프리 블록을 우선적으로 로그 블록(Log Block)으로 할당할 수 있다. 이때, RPMB 식별자를 가진 프리 블록은 물리적인 소거 이후에 로그 블록으로 제공될 것이다. The block manager 1212 driven by the processing unit 1211 tracks and manages replay protection blocks (RPMBs) in which RPMB data is programmed. When an RPMB write request (RPMB LU Write) occurs, the block manager 1212 writes the requested data to the non-volatile memory device 1220 and manages the corresponding block using the RPMB identifier. When a write request for RPMB data or general data occurs, a log block to program the requested data must be allocated. At this time, the block manager 1212 may preferentially allocate a free block with an RPMB identifier among free blocks as a log block. At this time, the free block with the RPMB identifier will be provided as a log block after physical erasure.

프로세싱 유닛(1211)에 의해서 구동되는 RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)의 수를 관리하기 위한 제반 제어 동작을 수행한다. RPMB 퍼지 매니저(1214)는 RPMB 퍼지 명령에 응답하여 리플레이 보호 블록(RPMB)에 대한 물리적 소거를 실행할 수 있다. RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)들의 수를 임계치 미만으로 관리하기 위한 가비지 컬렉션(Garbage Collection)을 수행할 수 있다. RPMB 퍼지 매니저(1214)는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면, 리플레이 보호 블록(RPMB)들 간의 가비지 컬렉션을 수행한다. 이때, 수집된 유효 데이터가 복사되는 목적지 블록(Destination Block)으로는 무효 데이터만 존재하는 리플레이 보호 블록(RPMB)들 중 어느 하나가 할당될 수 있다. 여기서, 목적지(Destination)의 의미는 가비지 컬렉션 동작에서 수집된 유효 데이터(Valid)가 프로그램되는 메모리 블록을 의미한다. 따라서, 리플레이 보호 블록(RPMB)들에 대한 가비지 컬렉션에 의해서 리플레이 보호 블록(RPMB)의 수는 감소할 수 있고, 임계치 이하로 유지될 수 있다. 이때, RPMB 퍼지 명령이 입력되면, 퍼지 대상이 되는 리플레이 보호 블록(RPMB)의 수가 임계치 이하로 제한되기 때문에 퍼지 동작에 따른 성능 저하는 최소화된다.The RPMB fuzzy manager 1214 driven by the processing unit 1211 performs various control operations to manage the number of replay protection blocks (RPMB). The RPMB purge manager 1214 may perform physical erase of the replay protection block (RPMB) in response to the RPMB purge command. The RPMB fuzzy manager 1214 can perform garbage collection to manage the number of replay protection blocks (RPMB) below a threshold. The RPMB fuzzy manager 1214 performs garbage collection between replay protection blocks (RPMBs) when the number of replay protection blocks (RPMBs) reaches a threshold. At this time, any one of the replay protection blocks (RPMB) in which only invalid data exists may be assigned as the destination block to which the collected valid data is copied. Here, destination means a memory block in which valid data (Valid) collected during the garbage collection operation is programmed. Accordingly, the number of replay protection blocks (RPMBs) can be reduced by garbage collection for the replay protection blocks (RPMBs) and maintained below the threshold. At this time, when the RPMB purge command is input, the performance degradation due to the purge operation is minimized because the number of replay protection blocks (RPMB) subject to purging is limited to below the threshold.

프로세싱 유닛(1211)에 의해서 구동되는 플래시 변환 계층(FTL, 미도시)은, 일반적으로 주소 맵핑(Address mapping), 가비지 컬렉션(Garbage collection), 그리고 웨어 레벨링(Wear leveling)과 같은 기능을 수행한다.The flash translation layer (FTL, not shown) driven by the processing unit 1211 generally performs functions such as address mapping, garbage collection, and wear leveling.

호스트 인터페이스(1215)는 호스트(Host)와 스토리지 컨트롤러(1210) 사이의 인터페이스를 제공한다. 호스트와 스토리지 컨트롤러(1210)는 다양한 표준 인터페이스들(Standardized Interfaces) 중 하나를 통해 연결될 수 있다. 여기에서, 표준 인터페이스들은 ATA(Advanced Technology Attachment), SATA(Serial ATA), e-SATA(external SATA), SCSI(Small Computer Small Interface), SAS(Serial Attached SCSI), PCI(Peripheral component Interconnection), PCIe(PCI Express), USB(Universal Serial Bus), IEEE 1394, UFS(Universal Flash Storage), eMMC(Embedded Multi Media Card), NVMe 등과 같은 다양한 인터페이스 방식들을 포함한다. 본 명세서에서는, 예시적으로 퍼지 명령어(Purge Command)를 지원하는 UFS 인터페이스를 기준으로 본 발명의 이점이 설명될 것이다. The host interface 1215 provides an interface between a host and the storage controller 1210. The host and the storage controller 1210 may be connected through one of various standard interfaces. Here, the standard interfaces are ATA (Advanced Technology Attachment), SATA (Serial ATA), e-SATA (external SATA), SCSI (Small Computer Small Interface), SAS (Serial Attached SCSI), PCI (Peripheral component Interconnection), and PCIe. It includes various interface methods such as (PCI Express), USB (Universal Serial Bus), IEEE 1394, UFS (Universal Flash Storage), eMMC (Embedded Multi Media Card), and NVMe. In this specification, the advantages of the present invention will be explained based on the UFS interface supporting the purge command (Purge Command) as an example.

플래시 인터페이스(1217)는 스토리지 컨트롤러(1210)와 불휘발성 메모리 장치(1220) 사이의 인터페이스를 제공한다. 예를 들면, 프로세싱 유닛(1211)에 의해서 처리된 데이터가 플래시 인터페이스(1217)를 통해 불휘발성 메모리 장치(1220)에 저장된다. 다른 예로써, 불휘발성 메모리 장치(1220)에 저장된 데이터는 플래시 인터페이스(1217)를 통해 스토리지 컨트롤러(1210)와 교환될 수 있다. The flash interface 1217 provides an interface between the storage controller 1210 and the non-volatile memory device 1220. For example, data processed by the processing unit 1211 is stored in the non-volatile memory device 1220 through the flash interface 1217. As another example, data stored in the non-volatile memory device 1220 may be exchanged with the storage controller 1210 through the flash interface 1217.

이상에서 예시적으로 설명된 스토리지 컨트롤러(1210)의 구성들이 설명되었다. 본 발명의 스토리지 컨트롤러(1210)의 기능에 따르면, 리플레이 보호 블록(RPMB)의 수가 임계치 이하로 유지될 수 있다. 따라서, 본 발명의 스토리지 컨트롤러(1210)의 특징에 따라 RPMB 퍼지 명령에 따른 성능 저하가 획기적으로 감소된다. 더불어, 소프트웨어로 구현된 블록 매니저(1212)와 RPMB 퍼지 매니저(1214)는 스토리지 컨트롤러(1210) 내에서 별도의 하드웨어로 구현될 수 있음은 잘 이해될 것이다.Configurations of the storage controller 1210 illustratively described above have been described. According to the function of the storage controller 1210 of the present invention, the number of replay protection blocks (RPMB) can be maintained below a threshold. Therefore, according to the characteristics of the storage controller 1210 of the present invention, performance degradation due to the RPMB purge command is dramatically reduced. In addition, it will be well understood that the block manager 1212 and the RPMB fuzzy manager 1214 implemented as software may be implemented as separate hardware within the storage controller 1210.

도 4는 본 발명의 실시 예에 따른 블록 매니저의 동작을 보여주는 도면이다. 도 4를 참조하면, 블록 매니저(1212)는 RPMB 데이터가 저장된 모든 리플레이 보호 블록(RPMB)을 추적하고, 프리 블록 할당시 프리 블록들 중에서 리플레이 보호 블록(RPMB)을 우선적으로 할당한다. Figure 4 is a diagram showing the operation of a block manager according to an embodiment of the present invention. Referring to FIG. 4, the block manager 1212 tracks all replay protection blocks (RPMB) in which RPMB data is stored, and preferentially allocates a replay protection block (RPMB) among free blocks when allocating free blocks.

블록 매니저(1212)는 RPMB 데이터가 기입되는 메모리 블록들을 추적하고 관리한다. 블록 매니저(1212)는 RPMB 쓰기 요청(RPMB Write)이 발생하면, RPMB 데이터가 프로그램되는 메모리 블록에 RPMB 식별자(1216)를 부여한다. RPMB 식별자(1216)는 어드레스나 데이터에 부가되는 테그(Tag) 형태, 또는 별도로 관리되는 테이블이나 리스트를 통해서 부여될 수 있다. 이하에서는 RPMB 식별자(1216)를 부여받은 메모리 블록을 리플레이 보호 블록(RPMB)이라 칭하기로 한다. 더불어, 프리 블록 풀(Free Block Pool)에 포함되는 리플레이 보호 블록(RPMB)을 가리켜 RPMB 프리 블록이라 칭하기로 한다. The block manager 1212 tracks and manages memory blocks in which RPMB data is written. When an RPMB write request (RPMB Write) occurs, the block manager 1212 assigns an RPMB identifier 1216 to the memory block in which RPMB data is programmed. The RPMB identifier 1216 can be assigned in the form of a tag added to an address or data, or through a separately managed table or list. Hereinafter, the memory block assigned the RPMB identifier 1216 will be referred to as a replay protection block (RPMB). In addition, the replay protection block (RPMB) included in the free block pool will be referred to as the RPMB free block.

블록 매니저(1212)는 일단 RPMB 식별자(1216)를 가진 리플레이 보호 블록(RPMB)이 생성되면, 리플레이 보호 블록(RPMB)이 물리적으로 소거되는 시점까지 추적 및 관리한다. 즉, 블록 매니저(1212)는 가비지 컬렉션이나 데이터의 업데이트에 의해 리플레이 보호 블록(RPMB)에 유효한 데이터(Valid data)가 존재하지 않는 경우에도 RPMB 식별자(1216)를 해제하지 않는다. 더불어, 블록 매니저(1212)는 RPMB 식별자(1216)로 마킹된 리플레이 보호 블록(RPMB)이 논리적으로는 무효화되어 프리 블록(Free Block)으로 관리되는 시점에도 RPMB 식별자(1216)를 해제하지 않는다. 블록 매니저(1212)는 어느 하나의 리플레이 보호 블록(RPMB)이 물리적으로 블록 소거된 이후에 RPMB 식별자(1216)를 해제할 것이다. 결론적으로, 블록 매니저(1212)는 RPMB 데이터가 하나의 페이지라도 기입된 메모리 블록에 대해 블록 소거가 발생하는 시점까지 RPMB 식별자를 부여하여 추적할 수 있다. 도시된 데이터 블록과 프리 블록들 중에서 리플레이 보호 블록(RPMB)은 9개의 블록들(BLK1~BLK6, BLK2, BLK24, BLK26)로 정의될 수 있다. Once the replay protection block (RPMB) with the RPMB identifier 1216 is created, the block manager 1212 tracks and manages the replay protection block (RPMB) until it is physically erased. That is, the block manager 1212 does not release the RPMB identifier 1216 even when valid data does not exist in the replay protection block (RPMB) due to garbage collection or data update. In addition, the block manager 1212 does not release the RPMB identifier 1216 even when the replay protection block (RPMB) marked with the RPMB identifier 1216 is logically invalidated and managed as a free block. The block manager 1212 will release the RPMB identifier 1216 after any one replay protection block (RPMB) is physically block erased. In conclusion, the block manager 1212 can track memory blocks in which even one page of RPMB data is written by assigning an RPMB identifier until block erasure occurs. Among the data blocks and free blocks shown, the replay protection block (RPMB) can be defined as 9 blocks (BLK1 to BLK6, BLK2, BLK24, and BLK26).

더불어, 블록 매니저(1212)는 RPMB 데이터 또는 일반 데이터 쓰기 요청이 발행하면, 프리 블록들 중에서 RPMB 식별자(1216)를 가진 메모리 블록을 우선적으로 로그 블록(Log Block)으로 할당한다. 로그 블록(Log Block)은 데이터를 기입하기 위한 버퍼 영역의 기능을 갖는 메모리 블록이다. 쓰기 요청이 발생하면, 프리 블록들 중에서 어느 하나가 선택되어 블록 소거된 후에 로그 블록으로 할당된다. 그리고 할당된 로그 블록에 쓰기 요청된 데이터가 프로그램된 후에 데이터 블록으로 지정된다. In addition, when a request to write RPMB data or general data is issued, the block manager 1212 preferentially allocates a memory block with the RPMB identifier 1216 among free blocks as a log block. Log Block is a memory block that functions as a buffer area for writing data. When a write request occurs, one of the free blocks is selected and allocated as a log block after the block is erased. And after the data requested to be written to the allocated log block is programmed, it is designated as a data block.

블록 매니저(1212)는 RPMB 데이터 쓰기 요청 또는 일반 데이터 쓰기 요청에 관계없이 프리 블록 풀(Free Block Pool)에 리플레이 보호 블록(RPMB)이 존재하면, 해당 리플레이 보호 블록(RPMB)을 우선적으로 로그 블록으로 할당할 수 있다. 다른 실시 예에서, 블록 매니저(1212)는 RPMB 데이터의 쓰기 요청시에만 프리 블록 풀(Free Block Pool)의 RPMB 프리 블록을 우선적으로 로그 블록으로 할당할 수도 있다. If a replay protection block (RPMB) exists in the free block pool regardless of an RPMB data write request or a general data write request, the block manager 1212 preferentially transfers the replay protection block (RPMB) to the log block. Can be assigned. In another embodiment, the block manager 1212 may preferentially allocate an RPMB free block in the free block pool as a log block only when RPMB data is requested to be written.

이상에서는 블록 매니저(1212)의 리플레이 보호 블록(RPMB)에 대한 추적 기능 및 RPMB 프리 블록을 우선적으로 로그 블록으로 할당하는 기능에 대해 설명하였다. 로그 블록의 할당시에 RPMB 프리 블록에 우선순위를 부여하는 기능에 의해서 불휘발성 메모리 장치(1200) 내에서의 리플레이 보호 블록(RPMB)의 소진 속도가 가속화될 수 있다. 블록 매니저(1212)의 상술한 기능은 후술하게 되는 리플레이 보호 블록(RPMB)의 수를 임계치 이하로 관리할 수 있는 RPMB 퍼지 매니저(1214)의 기능을 지원한다. In the above, the tracking function for the replay protection block (RPMB) of the block manager 1212 and the function of preferentially allocating the RPMB free block as a log block were explained. The exhaustion rate of the replay protection block (RPMB) in the non-volatile memory device 1200 can be accelerated by the function that gives priority to the RPMB free block when allocating the log block. The above-described function of the block manager 1212 supports the function of the RPMB fuzzy manager 1214, which can manage the number of replay protection blocks (RPMB) below a threshold, which will be described later.

도 5는 본 발명의 블록 매니저의 동작을 예시적으로 보여주는 순서도이다. 도 5를 참조하면, 블록 매니저(1212, 도 4 참조)는 RPMB 데이터의 쓰기 요청시에 RPMB 데이터가 프로그램된 메모리 블록을 리플레이 보호 블록(RPMB)으로 지정하고 추적 및 관리할 수 있다.Figure 5 is a flowchart exemplarily showing the operation of the block manager of the present invention. Referring to FIG. 5, when requesting to write RPMB data, the block manager 1212 (see FIG. 4) may designate, track, and manage the memory block in which the RPMB data is programmed as a replay protection block (RPMB).

S110 단계에서, 호스트(1100, 도 1 참조)로부터 스토리지 장치(1200, 도 1 참조)로의 RPMB 데이터의 쓰기 요청이 전달된다. 스토리지 컨트롤러(1210) 또는 스토리지 컨트롤러(1210) 내의 블록 매니저(1212)는 호스트(1100)의 쓰기 요청을 수신하여 명령어 파싱이나 어드레스를 디코딩할 수 있다.In step S110, a request to write RPMB data is transmitted from the host 1100 (see FIG. 1) to the storage device 1200 (see FIG. 1). The storage controller 1210 or the block manager 1212 within the storage controller 1210 may receive a write request from the host 1100 and parse a command or decode an address.

S120 단계에서, 블록 매니저(1212)는 현재 액티브 로그 블록이 존재하는지 판단한다. 여기서, 액티브 로그 블록은 데이터의 프로그램을 위해 선택된 후에 모든 메모리 영역이 데이터로 채워지기 전인 현재 사용 중인 로그 블록을 지칭하기로 한다. 만일, 현재 액티브 로그 블록이 존재하는 경우라면('Yes' 방향), 절차는 S130 단계로 이동한다. 반면, 현재 액티브 로그 블록이 존재하지 않는 경우라면('No' 방향), 절차는 S140 단계로 이동한다. In step S120, the block manager 1212 determines whether a currently active log block exists. Here, the active log block refers to a log block currently in use after being selected for data programming and before all memory areas are filled with data. If an active log block currently exists ('Yes' direction), the procedure moves to step S130. On the other hand, if there is no currently active log block ('No' direction), the procedure moves to step S140.

S130 단계에서, 블록 매니저(1212)는 쓰기 요청된 RPMB 데이터를 액티브 로그 블록에 프로그램한다. 액티브 로그 블록에 RPMB 데이터의 기입이 완료되면, 액티브 로그 블록은 데이터 블록에서 리플레이 보호 블록(RPMB)으로 관리될 것이다. In step S130, the block manager 1212 programs the RPMB data requested to be written into the active log block. Once writing of RPMB data to the active log block is completed, the active log block will be managed as a replay protection block (RPMB) in the data block.

S140 단계에서, 블록 매니저(1212)는 현재 액티브 로그 블록이 존재하지 않기 때문에, 새로운 로그 블록을 할당받아야 한다. 블록 매니저(1212)는 프리 블록 풀(Free Block Pool)에서 어느 하나의 프리 블록을 할당받아 액티브 로그 블록으로 사용할 것이다. 이때, 블록 매니저(1212)는 프리 블록 풀(Free Block Pool)의 RPMB 프리 블록을 우선적으로 로그 블록으로 할당할 수 있다.In step S140, the block manager 1212 must be allocated a new log block because there is currently no active log block. The block manager 1212 will receive a free block from the Free Block Pool and use it as an active log block. At this time, the block manager 1212 may preferentially allocate RPMB free blocks in the free block pool as log blocks.

S150 단계에서, 블록 매니저(1212)는 쓰기 요청된 RPMB 데이터를 새로 할당받은 로그 블록에 프로그램할 것이다. In step S150, the block manager 1212 will program the RPMB data requested to be written into the newly allocated log block.

S160 단계에서, 블록 매니저(1212)는 새로 할당받아 RPMB 데이터를 기입한 로그 블록에 RPMB 식별자를 부여하여 리플레이 보호 블록(RPMB)으로 관리한다. In step S160, the block manager 1212 assigns an RPMB identifier to the newly allocated log block in which RPMB data is written and manages it as a replay protection block (RPMB).

이상에서는 블록 매니저(1212)의 리플레이 보호 블록(RPMB) 지정 및 리플레이 보호 블록(RPMB)의 추적 기능에 대해 간략히 설명하였다. 블록 매니저(1212)는 RPMB 데이터의 쓰기 요청시에 로그 블록에 데이터를 기입한 후에 RPMB 식별자를 부여하여 추적할 수 있다. 이러한 블록 매니저(1212)의 RPMB 식별자를 사용하는 추적 기능은 리플레이 보호 블록(RPMB)이 물리적으로 소거되는 시점까지 지속된다.In the above, the replay protection block (RPMB) designation of the block manager 1212 and the tracking function of the replay protection block (RPMB) are briefly described. When requesting to write RPMB data, the block manager 1212 writes the data to the log block and then assigns an RPMB identifier to track it. The tracking function using the RPMB identifier of the block manager 1212 continues until the replay protection block (RPMB) is physically erased.

도 6은 도 5의 S140 단계를 좀더 구체적으로 보여주는 순서도이다. 도 6을 참조하면, 블록 매니저(1212)는 RPMB 데이터를 기입하기 위한 로그 블록의 할당시에 RPMB 프리 블록을 우선적으로 선택한다.Figure 6 is a flowchart showing step S140 of Figure 5 in more detail. Referring to FIG. 6, the block manager 1212 preferentially selects an RPMB free block when allocating a log block for writing RPMB data.

S141 단계에서, 블록 매니저(1212)는 스토리지 컨트롤러(1210)에 의해 RPMB 데이터를 기입할 새로운 로그 블록(New Log Block)의 할당을 요청받는다. 왜냐하면, RPMB 데이터의 쓰기 요청이 발생한 상황에서 현재 액티브 로그 블록이 존재하지 않기 때문이다. In step S141, the block manager 1212 is requested by the storage controller 1210 to allocate a new log block (New Log Block) in which to write RPMB data. This is because there is currently no active log block when a write request for RPMB data occurs.

S143 단계에서, 블록 매니저(1212)는 프리 블록 풀(Free Block Pool) 또는 프리 블록 리스트에서 RPMB 프리 블록이 존재하는지 체크한다. RPMB 데이터에 대한 접근 및 업데이트가 빈번한 경우에는 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재할 가능성이 높을 것이다. 하지만, RPMB 데이터에 대한 업데이트가 희박한 경우, 프리 블록 풀(Free Block Pool)에는 RPMB 프리 블록이 존재하지 않을 수도 있다. 만일, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하는 경우('Yes' 방향), 절차는 S145 단계로 이동한다. 반면에, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하지 않는 경우('No' 방향), 절차는 S147 단계로 이동한다.In step S143, the block manager 1212 checks whether an RPMB free block exists in the free block pool or free block list. If access to and updates to RPMB data are frequent, there is a high possibility that RPMB free blocks exist in the Free Block Pool. However, if updates to RPMB data are rare, RPMB free blocks may not exist in the free block pool. If an RPMB free block exists in the Free Block Pool ('Yes' direction), the procedure moves to step S145. On the other hand, if there is no RPMB free block in the free block pool ('No' direction), the procedure moves to step S147.

S145 단계에서, 블록 매니저(1212)는 프리 블록 풀(Free Block Pool)에 존재하는 RPMB 프리 블록을 쓰기 요청된 RPMB 데이터를 기입하기 위한 로그 블록으로 할당한다. In step S145, the block manager 1212 allocates an RPMB free block existing in the free block pool as a log block for writing the RPMB data requested to be written.

S147 단계에서, 블록 매니저(1212)는 일반 프리 블록을 쓰기 요청된 RPMB 데이터를 기입하기 위한 로그 블록으로 할당한다. In step S147, the block manager 1212 allocates a general free block as a log block for writing the RPMB data requested to be written.

이상에서는 블록 매니저(1212)의 로그 블록의 할당시에 RPMB 프리 블록에 우선순위를 부여하는 기능이 간략히 설명되었다. 상술한 블록 매니저(1212)의 리플레이 보호 블록(RPMB)의 추적 기능과 RPMB 프리 블록을 우선하여 로그 블록으로 할당하는 기능에 의해서 불휘발성 메모리 장치(1200) 내에서의 리플레이 보호 블록(RPMB)의 수가 제한될 수 있다.In the above, the function of giving priority to the RPMB free block when allocating log blocks of the block manager 1212 has been briefly described. The number of replay protection blocks (RPMB) in the non-volatile memory device 1200 is increased by the tracking function of the replay protection block (RPMB) of the block manager 1212 and the function of allocating RPMB free blocks as log blocks with priority. may be limited.

도 7은 본 발명의 RPMB 퍼지 매니저의 주요 기능을 예시적으로 보여주는 도면이다. 도 7을 참조하면, RPMB 퍼지 매니저(1214)는 리플레이 보호 블록의 수(nRPMB)를 미리 결정된 최대 리플레이 보호 블록 수(nRPMB_Max) 이하로 관리할 수 있다. 이를 위하여 RPMB 퍼지 매니저(1214)는 가비지 컬렉션(GC)을 사용할 수 있다. Figure 7 is a diagram illustrating the main functions of the RPMB fuzzy manager of the present invention. Referring to FIG. 7, the RPMB fuzzy manager 1214 can manage the number of replay protection blocks (nRPMB) below a predetermined maximum number of replay protection blocks (nRPMB_Max). For this purpose, the RPMB fuzzy manager 1214 can use garbage collection (GC).

RPMB 퍼지 매니저(1214)는 RPMB 식별자(1216)가 부여된 리플레이 보호 블록의 수(nRPMB)를 미리 결정된 최대 리플레이 보호 블록 수(nRPMB_Max) 이하로 유지하기 위한 블록 관리 동작을 수행한다. 예를 들어, 최대 리플레이 보호 블록 수(nRPMB_Max)가 '6'에 대응하는 것으로 가정하기로 한다. 그러면, 현재 RPMB 식별자(1216)가 부여된 리플레이 보호 블록(RPMB)은 6개의 메모리 블록들(BLK31~BLK36)에 해당한다. 예를 들면, 유효한 RPMB 데이터가 포함되는 4개의 리플레이 보호 블록들(BLK31, BLK32, BLK33, BLK34)과 무효한 RPMB 데이터가 포함된 2개의 리플레이 보호 블록들(BLK35, BLK36)이 리플레이 보호 블록(RPMB)으로 체크될 수 있다.The RPMB fuzzy manager 1214 performs a block management operation to maintain the number of replay protection blocks (nRPMB) assigned with the RPMB identifier 1216 below the predetermined maximum number of replay protection blocks (nRPMB_Max). For example, it is assumed that the maximum number of replay protection blocks (nRPMB_Max) corresponds to '6'. Then, the replay protection block (RPMB) currently assigned the RPMB identifier 1216 corresponds to six memory blocks (BLK31 to BLK36). For example, four replay protection blocks (BLK31, BLK32, BLK33, BLK34) containing valid RPMB data and two replay protection blocks (BLK35, BLK36) containing invalid RPMB data are included in the replay protection block (RPMB). ) can be checked.

이때, RPMB 퍼지 매니저(1214)는 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)에 도달한 것으로 인식하고, 리플레이 보호 블록들(BLK31~BLK36)에 대한 가비지 컬렉션을 트리거한다. 그러면, 4개의 리플레이 보호 블록들(BLK31, BLK32, BLK33, BLK34)에 남아있는 유효한 RPMB 데이터가 수집되어 로그 블록에 기입될 것이다. 그리고 가비지 컬렉션에 의해서 4개의 리플레이 보호 블록들(BLK31, BLK32, BLK33, BLK34)은 프리 블록으로 전환될 수 있다. 가비지 컬렉션에 의해서 6개의 리플레이 보호 블록들(BLK31~BLK36)은 1개 내지 2개의 리플레이 보호 블록(RPMB)으로 감소될 수 있다. 이후, RPMB 퍼지 명령이 제공되면, RPMB 퍼지 매니저(1214)는 감소된 리플레이 보호 블록(RPMB)들에 대해서만 퍼지 동작을 수행하게 될 것이다.At this time, the RPMB fuzzy manager 1214 recognizes that the number of replay protection blocks (nRPMB) has reached the maximum number of replay protection blocks (nRPMB_Max), and triggers garbage collection for the replay protection blocks (BLK31 to BLK36). Then, the valid RPMB data remaining in the four replay protection blocks (BLK31, BLK32, BLK33, and BLK34) will be collected and written into the log block. And the four replay protection blocks (BLK31, BLK32, BLK33, BLK34) can be converted to free blocks by garbage collection. By garbage collection, six replay protection blocks (BLK31 to BLK36) can be reduced to one or two replay protection blocks (RPMB). Afterwards, when the RPMB purge command is provided, the RPMB purge manager 1214 will perform a purge operation only on the reduced replay protection blocks (RPMB).

이상에서는 RPMB 퍼지 매니저(1214)의 리플레이 보호 블록의 수(nRPMB)를 제한하는 기능에 대해서 간략히 설명하였다. RPMB 퍼지 매니저(1214)에 의한 가비지 컬렉션에 의해서 스토리지 장치(1200) 내의 전체 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max) 이하로 관리될 수 있다. 이를 통해서, RPMB 퍼지 명령에 따른 퍼지 동작의 성능을 향상시킬 수 있다.Above, the function of limiting the number of replay protection blocks (nRPMB) of the RPMB fuzzy manager 1214 was briefly described. The total number of replay protection blocks (nRPMB) in the storage device 1200 may be managed below the maximum number of replay protection blocks (nRPMB_Max) by garbage collection by the RPMB fuzzy manager 1214. Through this, the performance of the purge operation according to the RPMB purge command can be improved.

도 8은 본 발명의 RPMB 퍼지 매니저의 리플레이 보호 블록의 수(nRPMB)를 제한하는 동작을 간략히 보여주는 순서도이다. 도 8을 참조하면, RPMB 퍼지 매니저(1214, 도 7 참조)는 리플레이 보호 블록의 수(nRPMB)를 모니터링하고, 리플레이 보호 블록의 수(nRPMB)를 최대 리플레이 보호 블록 수(nRPMB_Max) 이하로 관리할 수 있다.Figure 8 is a flow chart briefly showing the operation of limiting the number of replay protection blocks (nRPMB) of the RPMB fuzzy manager of the present invention. Referring to FIG. 8, the RPMB fuzzy manager 1214 (see FIG. 7) monitors the number of replay protection blocks (nRPMB) and manages the number of replay protection blocks (nRPMB) below the maximum number of replay protection blocks (nRPMB_Max). You can.

S210 단계에서, RPMB 퍼지 매니저(1214)는 현재 추적되고 있는 리플레이 보호 블록의 수(nRPMB)를 체크한다. 리플레이 보호 블록의 수(nRPMB)는 유효(Valid) 또는 무효(Invalid)에 관계없이 RPMB 데이터를 갖는 제반 리플레이 보호 블록(RPMB)의 카운트 수를 나타낸다. 더불어, 논리적으로 언맵(Un-map) 또는 맵아웃(Map-out)된 프리 블록으로 관리되는 RPMB 프리 블록도 리플레이 보호 블록의 수(nRPMB)에 카운트된다.In step S210, the RPMB fuzzy manager 1214 checks the number of replay protection blocks (nRPMB) that is currently being tracked. The number of replay protection blocks (nRPMB) indicates the count of all replay protection blocks (RPMB) with RPMB data regardless of whether they are valid or invalid. In addition, RPMB free blocks that are logically managed as unmapped or mapped free blocks are also counted in the number of replay protection blocks (nRPMB).

S220 단계에서, RPMB 퍼지 매니저(1214)는 체크된 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)에 도달했는지 판단한다. 만일, 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max) 이상인 것으로 판단되면('Yes' 방향), 절차는 S230 단계로 이동한다. 반면, 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)보다 적은 것으로 판단되면('No' 방향), 절차는 S210 단계로 복귀한다.In step S220, the RPMB fuzzy manager 1214 determines whether the number of currently checked replay protection blocks (nRPMB) has reached the maximum number of replay protection blocks (nRPMB_Max). If it is determined that the current number of replay protection blocks (nRPMB) is greater than the maximum number of replay protection blocks (nRPMB_Max) ('Yes' direction), the procedure moves to step S230. On the other hand, if it is determined that the current number of replay protection blocks (nRPMB) is less than the maximum number of replay protection blocks (nRPMB_Max) ('No' direction), the procedure returns to step S210.

S230 단계에서, RPMB 퍼지 매니저(1214)는 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하는지 체크한다. 만일, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하는 것으로 체크되면('Yes' 방향), 절차는 S240 단계로 이동한다. 반면, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하지 않는 것으로 체크되면('No' 방향), 절차는 S250 단계로 이동한다.In step S230, the RPMB fuzzy manager 1214 checks whether an RPMB free block exists in the free block pool. If it is checked that an RPMB free block exists in the Free Block Pool ('Yes' direction), the procedure moves to step S240. On the other hand, if it is checked that there is no RPMB free block in the Free Block Pool ('No' direction), the procedure moves to step S250.

S240 단계에서, RPMB 퍼지 매니저(1214)는 RPMB 프리 블록을 수집된 유효 RPMB 데이터를 기입하기 위한 목적지 블록(Destination Block)으로 사용하는 가비지 컬렉션을 수행한다. 가비지 컬렉션에 의해서 유효한 RPMB 데이터가 모두 목적지 블록으로 이동되면, 무효한 RPMB 데이터만 남은 리플레이 보호 블록(RPMB)은 프리 블록으로 지정될 것이다. In step S240, the RPMB purge manager 1214 performs garbage collection using the RPMB free block as a destination block for writing the collected valid RPMB data. When all valid RPMB data is moved to the destination block by garbage collection, the replay protection block (RPMB) with only invalid RPMB data remaining will be designated as a free block.

S250 단계에서, RPMB 퍼지 매니저(1214)는 RPMB 프리 블록이 존재하지 않는 상황에서 일반 프리 블록을 가비지 컬렉션을 위한 목적지 블록(Destination Block)으로 할당한다. 그리고 수집된 유효 RPMB 데이터가 일반 프리 블록에 기입되면, 새로운 리플레이 보호 블록(RPMB)이 생성된다. 하지만, 가비지 컬렉션에 의해서 무효한 RPMB 데이터만 남은 리플레이 보호 블록(RPMB)들은 프리 블록으로 지정되고, 물리적 소거 후에는 리플레이 보호 블록(RPMB)에서 해제될 것이다. 따라서, 실질적으로 리플레이 보호 블록(RPMB)의 수는 증가하지 않게 된다.In step S250, the RPMB fuzzy manager 1214 allocates a general free block as a destination block for garbage collection in a situation where an RPMB free block does not exist. And when the collected valid RPMB data is written into the general free block, a new replay protection block (RPMB) is created. However, replay protection blocks (RPMBs) with only invalid RPMB data remaining by garbage collection are designated as free blocks, and will be released from the replay protection blocks (RPMBs) after physical erasure. Therefore, in practice, the number of replay protection blocks (RPMB) does not increase.

이상에서는 RPMB 퍼지 매니저(1214)의 가비지 컬렉션을 활용하여 리플레이 보호 블록의 수(nRPMB)를 최대 리플레이 보호 블록 수(nRPMB_Max) 이하로 관리하는 절차가 간략히 설명되었다. RPMB 퍼지 매니저(1214)와 블록 매니저(1212)의 상호 협조를 통해서 스토리지 장치(1200) 내의 리플레이 보호 블록의 수(nRPMB)가 제한되고, 이는 RPMB 퍼지 성능을 향상시키는 효과로 이어진다. In the above, the procedure for managing the number of replay protection blocks (nRPMB) to less than the maximum number of replay protection blocks (nRPMB_Max) using the garbage collection of the RPMB fuzzy manager 1214 was briefly described. Through mutual cooperation between the RPMB purge manager 1214 and the block manager 1212, the number of replay protection blocks (nRPMB) in the storage device 1200 is limited, which leads to improved RPMB purge performance.

도 9a 및 도 9b는 리플레이 보호 블록(RPMB)의 수를 제한하지 않는 일반적인 경우의 리플레이 보호 블록(RPMB)의 수가 증가하는 예들이 도시되어 있다. 도 9a를 참조하면, 일반적인 RPMB 데이터의 쓰기 요청이 발생하면 리플레이 보호 블록(RPMB)의 수가 증가하게 된다. 9A and 9B show examples of increasing the number of replay protection blocks (RPMB) in a general case where the number of RPMBs is not limited. Referring to FIG. 9A, when a write request for general RPMB data occurs, the number of replay protection blocks (RPMB) increases.

현재 4개의 리플레이 보호 블록들(BLK1, BLK2, BLK3, BLK4)이 존재하고 있다. 4개의 리플레이 보호 블록(RPMB)들 중에는 유효한 RPMB 데이터가 저장된 블록(BLK1, BLK2, BLK4)과 무효한 RPMB 데이터가 저장된 블록(BLK3)이 포함된다. 그리고 5개의 블록들(BLK5, BLK6, BLK7, BLK8, BLK9) 각각에는 유효한 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)가 존재한다. 반면, 메모리 블록(BLK10)에는 모두 무효한 데이터만이 유지되고 있다. 결국, 이러한 상황에서 RPMB 퍼지 명령이 입력되면, 4개의 리플레이 보호 블록(RPMB)들(BLK1, BLK2, BLK3, BLK4)이 RPMB 퍼지 대상(1221)이 된다. There are currently four replay protection blocks (BLK1, BLK2, BLK3, and BLK4). Among the four replay protection blocks (RPMB), there are blocks (BLK1, BLK2, BLK4) storing valid RPMB data and blocks (BLK3) storing invalid RPMB data. And there is valid data (LBA2, LBA3, LBA4, LBA5, LBA6) in each of the five blocks (BLK5, BLK6, BLK7, BLK8, BLK9). On the other hand, only invalid data is maintained in the memory block (BLK10). Ultimately, when the RPMB purge command is input in this situation, four replay protection blocks (RPMB) (BLK1, BLK2, BLK3, BLK4) become the RPMB purge target 1221.

이러한 상황에서, RPMB 데이터(RPMB0)와 일반 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)의 쓰기 요청이 발생할 수 있다. 리플레이 보호 블록(RPMB)에 대한 관리없이 RPMB 데이터(RPMB0)와 일반 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)에 대한 쓰기 동작이 수행될 것이다. 이 경우, 메모리 블록(BLK10)이 로그 블록으로 할당되고, 쓰기 요청된 데이터(RPMB0, LBA2, LBA3, LBA4, LBA5, LBA6)는 메모리 블록(BLK10)에 기입될 수 있다. 그리고 메모리 블록(BLK10)은 업데이트된 RPMB 데이터(RPMB0)가 기입된 상태이기 때문에 새로운 리플레이 보호 블록(RPMB)으로 지정될 것이다. 따라서, RPMB 퍼지 명령이 제공되면, RPMB 퍼지를 수행할 RPMB 퍼지 대상(1221, 1222)은 5개 블록으로 증가한다. In this situation, a write request for RPMB data (RPMB0) and general data (LBA2, LBA3, LBA4, LBA5, LBA6) may occur. Write operations will be performed on RPMB data (RPMB0) and general data (LBA2, LBA3, LBA4, LBA5, LBA6) without management of the replay protection block (RPMB). In this case, the memory block BLK10 is allocated as a log block, and the data requested to be written (RPMB0, LBA2, LBA3, LBA4, LBA5, LBA6) can be written to the memory block BLK10. And the memory block (BLK10) will be designated as a new replay protection block (RPMB) because the updated RPMB data (RPMB0) is written therein. Therefore, when the RPMB purge command is provided, the RPMB purge targets 1221 and 1222 to perform RPMB purge increase to 5 blocks.

도 9b를 참조하면, 현재 4개의 리플레이 보호 블록(RPMB)들(BLK1, BLK2, BLK3, BLK4)이 존재하고 있다. 4개의 리플레이 보호 블록(RPMB)들 중에는 유효한 RPMB 데이터가 저장된 블록(BLK1, BLK2, BLK4)과 무효한 RPMB 데이터가 저장된 블록(BLK3)이 포함된다. 그리고 5개의 블록들(BLK5, BLK6, BLK7, BLK8, BLK9) 각각에는 유효한 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)가 존재한다. 그리고 메모리 블록(BLK10)에는 모두 무효한 데이터만이 유지되고 있다. 결국, 이러한 상황에서 RPMB 퍼지 명령이 입력되면, 4개의 리플레이 보호 블록들(BLK1, BLK2, BLK3, BLK4)이 RPMB 퍼지 대상(1221)이 된다. Referring to FIG. 9B, there are currently four replay protection blocks (RPMB) (BLK1, BLK2, BLK3, and BLK4). Among the four replay protection blocks (RPMB), there are blocks (BLK1, BLK2, BLK4) storing valid RPMB data and blocks (BLK3) storing invalid RPMB data. And there is valid data (LBA2, LBA3, LBA4, LBA5, LBA6) in each of the five blocks (BLK5, BLK6, BLK7, BLK8, BLK9). And only invalid data is maintained in the memory block (BLK10). Ultimately, when the RPMB purge command is input in this situation, the four replay protection blocks (BLK1, BLK2, BLK3, BLK4) become the RPMB purge target 1221.

이러한 상황에서, RPMB 데이터(RPMB0)와 일반 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)의 쓰기 요청이 발생할 수 있다. 이 경우, 리플레이 보호 블록(RPMB)인 메모리 블록(BLK3)이 로그 블록으로 지정되고, 쓰기 요청된 데이터(RPMB0, LBA2, LBA3, LBA4, LBA5, LBA6)가 소거된 메모리 블록(BLK3)에 기입될 수 있다. 그러면, 실질적으로 RPMB 퍼지 대상(1221)은 4개 블록을 유지하게 된다. In this situation, a write request for RPMB data (RPMB0) and general data (LBA2, LBA3, LBA4, LBA5, LBA6) may occur. In this case, the memory block (BLK3), which is the replay protection block (RPMB), is designated as the log block, and the write requested data (RPMB0, LBA2, LBA3, LBA4, LBA5, LBA6) will be written to the erased memory block (BLK3). You can. Then, the RPMB purge target 1221 actually maintains 4 blocks.

여기에, 추가적으로 RPMB 데이터(RPMB1)의 쓰기 요청이 발생하는 것으로 가정하기로 한다. 그러면, RPMB 데이터(RPMB1)를 기입하기 위해서는 메모리 블록(BLK5)이 프리 블록으로 지정되고, 소거된 후에 로그 블록으로 제공될 수 있다. 그리고 RPMB 데이터(RPMB1)가 메모리 블록(BLK5)에 기입된다. 이때, RPMB 퍼지 명령이 제공되면, RPMB 퍼지를 수행할 RPMB 퍼지 대상(1223)은 5개의 메모리 블록(BLK1, BLK2, BLK3, BLK4, BLK5)으로 증가하게 된다. Here, it is assumed that an additional write request for RPMB data (RPMB1) occurs. Then, in order to write the RPMB data (RPMB1), the memory block (BLK5) is designated as a free block, and after being erased, it can be provided as a log block. Then, RPMB data (RPMB1) is written into the memory block (BLK5). At this time, when the RPMB purge command is provided, the RPMB purge target 1223 to perform RPMB purge increases to five memory blocks (BLK1, BLK2, BLK3, BLK4, and BLK5).

이상의 도 9a 및 도 9b의 예들을 통해서 리플레이 보호 블록의 수(nRPMB)를 제한하기 위한 구성이나 기능 없이는 리플레이 보호 블록(RPMB)의 수가 지속적으로 증가하게 됨을 알 수 있다. 이는 RPMB 퍼지 동작의 성능을 현저하게 저하되는 요인으로 작용한다.Through the examples of FIGS. 9A and 9B above, it can be seen that the number of replay protection blocks (RPMB) continues to increase without a configuration or function to limit the number of replay protection blocks (nRPMB). This acts as a factor that significantly reduces the performance of the RPMB purge operation.

도 10은 본 발명의 실시 예에 따른 리플레이 보호 블록의 수(nRPMB)의 제한을 통해서 RPMB 퍼지 대상의 수가 제어될 수 있음을 보여주는 도면이다. 도 10을 참조하면, RPMB 퍼지 매니저(1214)에 의해 제어되는 가비지 컬렉션에 의해 리플레이 보호 블록의 수(nRPMB)의 증가가 억제될 수 있다. 여기서, 최대 리플레이 보호 블록 수(nRPMB_Max)가 4인 것으로 가정하기로 한다. 그리고 초기 조건은 도 9a 또는 도 9b와 동일한 상태를 가정하기로 한다. Figure 10 is a diagram showing that the number of RPMB purge targets can be controlled by limiting the number of replay protection blocks (nRPMB) according to an embodiment of the present invention. Referring to FIG. 10, an increase in the number of replay protection blocks (nRPMB) can be suppressed by garbage collection controlled by the RPMB fuzzy manager 1214. Here, it is assumed that the maximum number of replay protection blocks (nRPMB_Max) is 4. And the initial conditions are assumed to be the same as those in FIG. 9a or 9b.

현재 4개의 리플레이 보호 블록(RPMB)들(BLK1, BLK2, BLK3, BLK4)이 존재하고 있다. 4개의 리플레이 보호 블록(RPMB)들 중에는 유효한 RPMB 데이터가 저장된 블록(BLK1, BLK2, BLK4)과 무효한 RPMB 데이터가 저장된 블록(BLK3)이 포함된다. 그리고 5개의 블록들(BLK5, BLK6, BLK7, BLK8, BLK9) 각각에는 유효한 데이터(LBA2, LBA3, LBA4, LBA5, LBA6)가 존재한다. 그리고 메모리 블록(BLK10)에는 모두 무효한 데이터만이 유지되고 있다. 결국, 이러한 상황에서 RPMB 퍼지 명령이 입력되면, 4개의 리플레이 보호 블록들(BLK1, BLK2, BLK3, BLK4)이 RPMB 퍼지 대상(1221)이 된다. 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)에 대응하는 4로 모니터링될 것이다. 따라서, RPMB 퍼지 매니저(1214)에 의한 본 발명의 가비지 컬렉션(GC)이 트리거될 수 있다.There are currently four replay protection blocks (RPMB) (BLK1, BLK2, BLK3, and BLK4). Among the four replay protection blocks (RPMB), there are blocks (BLK1, BLK2, BLK4) storing valid RPMB data and blocks (BLK3) storing invalid RPMB data. And there is valid data (LBA2, LBA3, LBA4, LBA5, LBA6) in each of the five blocks (BLK5, BLK6, BLK7, BLK8, BLK9). And only invalid data is maintained in the memory block (BLK10). Ultimately, when the RPMB purge command is input in this situation, the four replay protection blocks (BLK1, BLK2, BLK3, BLK4) become the RPMB purge target 1221. The current number of replay protection blocks (nRPMB) will be monitored as 4, corresponding to the maximum number of replay protection blocks (nRPMB_Max). Accordingly, the garbage collection (GC) of the present invention by the RPMB purge manager 1214 can be triggered.

가비지 컬렉션(GC)은 RPMB 퍼지 대상(1221) 내에서 발생할 수 있다. 즉, 메모리 블록(BLK3)이 프리 블록으로 지정되고, 소거된 후에 로그 블록으로 할당될 수 있다. 그리고 로그 블록으로 할당된 메모리 블록(BLK3)에 리플레이 보호 블록들(BLK1, BLK2)에 저장된 유효 데이터(LBA0, RPMB0, RPMB1, RPMB2, RPMB3, RPMB4)가 수집되어 기입된다. 가비지 컬렉션(GC) 이후에도 리플레이 보호 블록(RPMB)의 수는 여전해 4개를 유지하게 된다. 즉, 실질적으로 RPMB 퍼지 대상(1221)은 4개로 유지된다.Garbage collection (GC) may occur within the RPMB purge target 1221. That is, the memory block BLK3 may be designated as a free block, erased, and then allocated as a log block. Then, the valid data (LBA0, RPMB0, RPMB1, RPMB2, RPMB3, RPMB4) stored in the replay protection blocks (BLK1, BLK2) are collected and written into the memory block (BLK3) allocated as the log block. Even after garbage collection (GC), the number of replay protection blocks (RPMB) remains at 4. That is, in reality, the number of RPMB purge targets 1221 is maintained at four.

여기에, 추가적으로 RPMB 데이터(RPMB0)의 쓰기 요청이 발생하는 것으로 가정하기로 한다. 그러면, RPMB 데이터(RPMB0)를 기입하기 위해서는 메모리 블록(BLK1)이 프리 블록으로 지정되고, 소거된 후에 로그 블록으로 제공될 수 있다. 그리고 RPMB 데이터(RPMB0)가 메모리 블록(BLK1)에 기입될 수 있다. 이때, RPMB 퍼지 명령이 제공되면, RPMB 퍼지를 수행할 RPMB 퍼지 대상(1221)인 리플레이 보호 블록의 수(nRPMB)은 여전히 4개를 초과하지 않게 된다. 이는 RPMB 퍼지 대상이 5개로 증가하는 도 9b의 예에 비해 향상된 RPMB 퍼지 성능을 보장할 수 있다.Here, it is assumed that an additional write request for RPMB data (RPMB0) occurs. Then, in order to write the RPMB data (RPMB0), the memory block (BLK1) is designated as a free block, and after being erased, it can be provided as a log block. And RPMB data (RPMB0) may be written to the memory block (BLK1). At this time, when the RPMB purge command is provided, the number of replay protection blocks (nRPMB), which are RPMB purge targets 1221 to perform RPMB purge, still does not exceed 4. This can ensure improved RPMB purge performance compared to the example of FIG. 9b in which the number of RPMB purge targets increases to 5.

이상의 본 발명의 스토리지 컨트롤러(1210)에 의한 리플레이 보호 블록(RPMB)의 추적 및 리플레이 보호 블록의 수(nRPMB)의 제한 기능이 예시적으로 설명되었다. 이러한 본 발명의 기능을 통해서 리플레이 보호 블록(RPMB)의 수는 미리 결정된 최대 리플레이 보호 블록 수(nRPMB_Max) 이하를 유지할 수 있다. The functions of tracking replay protection blocks (RPMB) and limiting the number of replay protection blocks (nRPMB) by the storage controller 1210 of the present invention have been described as examples. Through this function of the present invention, the number of replay protection blocks (RPMB) can be maintained below the predetermined maximum number of replay protection blocks (nRPMB_Max).

도 11은 본 발명의 실시 예에 따른 스토리지 컨트롤러의 RPMB 데이터의 쓰기 동작을 간략히 보여주는 순서도이다. 도 11을 참조하면, 스토리지 컨트롤러(1210, 도 2 참조)는 리플레이 보호 블록(RPMB)의 추적이나 리플레이 보호 블록의 수(nRPMB)를 제한할 수 있다.Figure 11 is a flowchart briefly showing a write operation of RPMB data of a storage controller according to an embodiment of the present invention. Referring to FIG. 11, the storage controller 1210 (see FIG. 2) may track replay protection blocks (RPMB) or limit the number of replay protection blocks (nRPMB).

S310 단계에서, 호스트(1100, 도 1 참조)로부터 스토리지 장치(1200, 도 1 참조)로의 RPMB 쓰기 요청이 전달된다. 스토리지 컨트롤러(1210)는 RPMB 쓰기 요청을 수신한다.In step S310, an RPMB write request is transmitted from the host 1100 (see FIG. 1) to the storage device 1200 (see FIG. 1). The storage controller 1210 receives the RPMB write request.

S320 단계에서, 스토리지 컨트롤러(1210)는 쓰기 요청된 RPMB 데이터를 기입할 액티브 로그 블록이 여유가 있는지 판단한다. 만일, 현재 액티브 로그 블록에 쓰기 요청된 RPMB 데이터를 기입할 충분한 공간이 있다면('No' 방향), 절차는 S380 단계로 이동한다. 하지만, 현재 액티브 로그 블록에 쓰기 요청된 RPMB 데이터를 기입할 충분한 공간이 없다면('Yes' 방향), 절차는 S330 단계로 이동한다.In step S320, the storage controller 1210 determines whether there is enough active log block to write the RPMB data requested to be written. If there is enough space to write the RPMB data requested to be written in the current active log block ('No' direction), the procedure moves to step S380. However, if there is not enough space to write the RPMB data requested to be written in the current active log block ('Yes' direction), the procedure moves to step S330.

S330 단계에서, 스토리지 컨트롤러(1210)는 현재의 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)에 도달했는지 판단한다. 만일, 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max) 이상인 것으로 판단되면('Yes' 방향), 절차는 S340 단계로 이동한다. 반면, 현재 리플레이 보호 블록의 수(nRPMB)가 최대 리플레이 보호 블록 수(nRPMB_Max)보다 적은 것으로 판단되면('No' 방향), 절차는 S350 단계로 복귀한다.In step S330, the storage controller 1210 determines whether the current number of replay protection blocks (nRPMB) has reached the maximum number of replay protection blocks (nRPMB_Max). If it is determined that the current number of replay protection blocks (nRPMB) is greater than the maximum number of replay protection blocks (nRPMB_Max) ('Yes' direction), the procedure moves to step S340. On the other hand, if it is determined that the current number of replay protection blocks (nRPMB) is less than the maximum number of replay protection blocks (nRPMB_Max) ('No' direction), the procedure returns to step S350.

S340 단계에서, 스토리지 컨트롤러(1210)는 현재 추적 및 파악된 리플레이 보호 블록(RPMB)들 내에서 가비지 컬렉션을 수행한다. 즉, 스토리지 컨트롤러(1210)는 리플레이 보호 블록(RPMB)들의 유효 RPMB 페이지들을 복사하기 위한 로그 블록도 RPMB 프리 블록들 중에서 선택할 수 있다. 스토리지 컨트롤러(1210)는 선택된 RPMB 프리 블록을 물리적으로 소거한다. 그리고 스토리지 컨트롤러(1210)는 소거된 RPMB 프리 블록을 로그 블록으로 사용하여 유효 RPMB 페이지들을 수집하여 복사한다. 가비지 컬렉션에 의해서 리플레이 보호 블록(RPMB)들 중에는 무효 RPMB 데이터만 남은 메모리 블록들이 다수 발생하게 된다. 이들 무효한 페이지들만 남은 메모리 블록은 RPMB 프리 블록으로 지정된다.In step S340, the storage controller 1210 performs garbage collection within the currently tracked and identified replay protection blocks (RPMBs). That is, the storage controller 1210 can also select a log block for copying valid RPMB pages of replay protection blocks (RPMBs) from RPMB free blocks. The storage controller 1210 physically erases the selected RPMB free block. Then, the storage controller 1210 uses the erased RPMB free block as a log block to collect and copy valid RPMB pages. Due to garbage collection, many memory blocks with only invalid RPMB data remaining are generated among the replay protection blocks (RPMB). The memory block containing only these invalid pages is designated as an RPMB free block.

S350 단계에서, 스토리지 컨트롤러(1210)는 프리 블록 풀(Free Block Pool)에서 RPMB 프리 블록이 존재하는지 체크한다. 만일, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하는 경우('Yes' 방향), 절차는 S360 단계로 이동한다. 반면, 프리 블록 풀(Free Block Pool)에 RPMB 프리 블록이 존재하지 않는 경우('No' 방향), 절차는 S370 단계로 이동한다. In step S350, the storage controller 1210 checks whether an RPMB free block exists in the free block pool. If an RPMB free block exists in the Free Block Pool ('Yes' direction), the procedure moves to step S360. On the other hand, if there is no RPMB free block in the Free Block Pool ('No' direction), the procedure moves to step S370.

S360 단계에서, 스토리지 컨트롤러(1210)는 프리 블록 풀(Free Block Pool)에 존재하는 RPMB 프리 블록을 로그 블록으로 할당한다. 로그 블록으로 할당된 RPMB 프리 블록은 물리적으로 소거된 후에 S310 단계에서 쓰기 요청된 RPMB 데이터를 위한 로그 블록으로 제공된다.In step S360, the storage controller 1210 allocates an RPMB free block existing in the free block pool as a log block. The RPMB free block allocated as a log block is physically erased and then provided as a log block for the RPMB data requested to be written in step S310.

S370 단계에서, 스토리지 컨트롤러(1210)는 프리 블록 풀(Free Block Pool)에 존재하는 일반 프리 블록을 로그 블록으로 할당한다. 로그 블록으로 할당된 일반 프리 블록(Normal Free Block)은 물리적인 소거 절차를 거쳐 S310 단계에서 쓰기 요청된 RPMB 데이터를 위한 로그 블록으로 제공된다.In step S370, the storage controller 1210 allocates a general free block existing in the free block pool as a log block. The normal free block allocated as a log block goes through a physical erasure procedure and is provided as a log block for the RPMB data requested to be written in step S310.

S380 단계에서, 스토리지 컨트롤러(1210)는 S310 단계에서 쓰기 요청된 RPMB 데이터를 할당된 로그 블록에 프로그램한다. In step S380, the storage controller 1210 programs the RPMB data requested to be written in step S310 into the allocated log block.

이상에서는 스토리지 컨트롤러(1210)의 RPMB 데이터의 쓰기 동작을 위한 가비지 컬렉션이나 로그 블록의 선택 절차가 간략히 설명되었다. 스토리지 컨트롤러(1210)는 RPMB 데이터의 쓰기 요청시에 리플레이 보호 블록(RPMB)들 간의 가비지 컬렉션을 통해 리플레이 보호 블록의 수(nRPMB)를 제한할 수 있다.In the above, the garbage collection or log block selection procedure for the RPMB data write operation of the storage controller 1210 was briefly described. The storage controller 1210 may limit the number of replay protection blocks (nRPMB) through garbage collection between the replay protection blocks (RPMB) when requesting to write RPMB data.

도 12는 본 발명의 효과를 예시적으로 보여주는 그래프이다. 도 12를 참조하면, 스토리지 장치(1200)의 리플레이 보호 블록(RPMB)의 수와 RPMB 퍼지 명령에 따른 퍼지 성능이 반비례하는 형태로 간략히 나타날 수 있다.Figure 12 is a graph exemplarily showing the effect of the present invention. Referring to FIG. 12 , the number of replay protection blocks (RPMB) of the storage device 1200 and purge performance according to the RPMB purge command can be briefly shown as being inversely proportional.

그래프의 가로축은 리플레이 보호 블록의 수(nRPMB)를 나타내고, 그래프의 세로축은 퍼지 성능 또는 퍼지 속도를 나타낸다. 만일, 본 발명의 특징과 같이 리플레이 보호 블록의 수(nRPMB)를 최대 리플레이 보호 블록 수(nRPMB_Max)로 제한하게 된다면, 퍼지 성능은 타깃 퍼지 성능(TPP) 이상을 유지할 수 있게 될 것이다. The horizontal axis of the graph represents the number of replay protection blocks (nRPMB), and the vertical axis of the graph represents purge performance or purge speed. If, as is a feature of the present invention, the number of replay protection blocks (nRPMB) is limited to the maximum number of replay protection blocks (nRPMB_Max), the purge performance will be able to maintain more than the target purge performance (TPP).

도 13 및 도 14는 백패턴 프로그램 절차를 포함하는 경우의 일반적 퍼지 및 본 발명의 퍼지 동작을 각각 보여주는 도면들이다. 도 13은 리플레이 보호 블록의 수(nRPMB)를 제한하지 않은 경우의 퍼지 동작을 보여준다. 도 14는 리플레이 보호 블록의 수(nRPMB)를 제한하는 경우의 퍼지 동작을 보여준다.Figures 13 and 14 are diagrams showing a general purge operation and a purge operation according to the present invention when a backpattern program procedure is included, respectively. Figure 13 shows the purge operation when the number of replay protection blocks (nRPMB) is not limited. Figure 14 shows the purge operation when limiting the number of replay protection blocks (nRPMB).

도 13을 참조하면, RPMB 퍼지 명령이 제공되면 리플레이 보호 블록의 수(nRPMB)가 제한되지 않는 일반적인 경우에는 상대적으로 퍼지 성능의 하락이 발생한다. 먼저, 초기 조건에서는 유효 또는 무효 RPMB 데이터를 가진 9개의 리플레이 보호 블록(BLK1~BLK9)과 무효한 데이터만을 갖는 1개의 일반 블록(BLK10)이 존재하는 것으로 가정하기로 한다. 이때 수행되는 가비지 컬렉션(GC1)에 의해, 유효한 데이터가 존재하지 않는 메모리 블록(BLK10)이 소거되고 로그 블록으로 제공된다. 그리고 5개의 리플레이 보호 블록들(BLK1, BLK2, BLK3, BLK4, BLK5)의 유효 RPMB 데이터가 수집되어 로그 블록으로 제공되는 메모리 블록(BLK10)에 프로그램될 것이다. 그러면, 메모리 블록(BLK10)은 리플레이 보호 블록(RPMB)으로 관리되며, 전체 리플레이 보호 블록(RPMB)의 수는 10개로 증가한다. Referring to FIG. 13, when the RPMB purge command is provided, in a general case where the number of replay protection blocks (nRPMB) is not limited, a relative decrease in purge performance occurs. First, in the initial conditions, it is assumed that there are nine replay protection blocks (BLK1 to BLK9) with valid or invalid RPMB data and one normal block (BLK10) with only invalid data. By the garbage collection (GC1) performed at this time, the memory block (BLK10) in which no valid data exists is erased and provided as a log block. And the valid RPMB data of five replay protection blocks (BLK1, BLK2, BLK3, BLK4, BLK5) will be collected and programmed into the memory block (BLK10) provided as a log block. Then, the memory block (BLK10) is managed as a replay protection block (RPMB), and the total number of replay protection blocks (RPMB) increases to 10.

이어지는 가비지 컬렉션(GC2)에 의해, 나머지 4개의 리플레이 보호 블록(RPMB)들(BLK6, BLK7, BLK8, BLK9)의 유효 RPMB 데이터가 수집되어 소거 후 로그 블록으로 제공되는 메모리 블록(BLK1)에 프로그램될 것이다. 하지만, 여전히 리플레이 보호 블록(RPMB)의 수는 10개로 유지된다. By the subsequent garbage collection (GC2), the valid RPMB data of the remaining four replay protection blocks (RPMB) (BLK6, BLK7, BLK8, BLK9) are collected, erased, and then programmed into the memory block (BLK1) provided as the log block. will be. However, the number of replay protection blocks (RPMB) is still maintained at 10.

이어서, 2회의 가비지 컬렉션을 통해서 확보된 무효 리플레이 보호 블록들(BLK2~BLK9)에 대한 소거 및 백패턴 쓰기 동작이 수행된다. 8개의 무효 리플레이 보호 블록들(BLK2~BLK9)이 소거되고, 이후에 각각의 메모리 블록들에는 백패턴이 프로그램된다. 그리고 백패턴이 프로그램된 8개의 무효 리플레이 보호 블록들(BLK2~BLK9)은 프리 블록으로 관리될 수 있다.Subsequently, erase and backpattern write operations are performed on the invalid replay protection blocks (BLK2 to BLK9) secured through two garbage collections. Eight invalid replay protection blocks (BLK2 to BLK9) are erased, and then a back pattern is programmed in each memory block. And the eight invalid replay protection blocks (BLK2 to BLK9) in which back patterns are programmed can be managed as free blocks.

이상에서는 리플레이 보호 블록의 수(nRPMB)가 제한되지 않고, 동시에 가비지 컬렉션(GC) 동작에서 무효한 상태의 RPMB 프리 블록을 우선적으로 로그 블록으로 활용하지 않는 경우의 RPMB 퍼지 동작이 설명되었다. 이 경우, RPMB 퍼지 명령에 응답하여 가비지 컬렉션을 수행할 때에도 리플레이 보호 블록(RPMB)의 수가 증가하게 된다. 증가된 리플레이 보호 블록(RPMB)들에 대한 소거 및 백패턴 쓰기를 진행하는 경우, 전체적인 퍼지 성능은 감소하게 될 것이 자명하다.In the above, the RPMB purge operation was described when the number of replay protection blocks (nRPMB) is not limited and at the same time, RPMB free blocks in an invalid state are not preferentially used as log blocks in garbage collection (GC) operations. In this case, the number of replay protection blocks (RPMB) increases even when garbage collection is performed in response to the RPMB purge command. It is obvious that when performing erase and back-pattern writing on increased replay protection blocks (RPMB), the overall purge performance will decrease.

도 14를 참조하면, 리플레이 보호 블록의 수(nRPMB)가 제한되며, RPMB 프리 블록을 우선적으로 로그 블록으로 제공하는 본 발명의 스토리지 장치(1200)의 경우에는 도 13의 일반적인 경우보다 퍼지 성능을 향상시킬 수 있다. Referring to FIG. 14, the number of replay protection blocks (nRPMB) is limited, and in the case of the storage device 1200 of the present invention that provides RPMB free blocks preferentially as log blocks, purge performance is improved compared to the general case of FIG. 13. You can do it.

먼저, 초기 조건에서는 유효 또는 무효 RPMB 데이터를 가진 8개의 리플레이 보호 블록(BLK1~BLK8)과 유효 데이터(LBA6)를 가진 블록(BLK9), 그리고 무효한 데이터만을 갖는 1개의 일반 블록(BLK10)이 존재하는 것으로 가정하기로 한다. 이때, 본 발명의 블록 관리 동작에 의해 트리거되는 가비지 컬렉션(GC1)에 의해, 유효한 데이터가 존재하지 않는 메모리 블록(BLK10)이 소거되고 로그 블록으로 제공된다. 그리고 2개의 리플레이 보호 블록들(BLK1, BLK2)의 유효 RPMB 데이터가 수집되어 로그 블록으로 제공되는 메모리 블록(BLK10)에 프로그램될 것이다. 그러면, 메모리 블록(BLK10)은 리플레이 보호 블록(RPMB)으로 지정 및 관리되며, 전체 리플레이 보호 블록의 수(nRPMB)는 9개로 증가한다. First, in the initial conditions, there are eight replay protection blocks (BLK1 to BLK8) with valid or invalid RPMB data, a block (BLK9) with valid data (LBA6), and one normal block (BLK10) with only invalid data. Let's assume that it does. At this time, the memory block BLK10 containing no valid data is erased by the garbage collection GC1 triggered by the block management operation of the present invention and provided as a log block. And the valid RPMB data of the two replay protection blocks (BLK1, BLK2) will be collected and programmed into the memory block (BLK10) provided as a log block. Then, the memory block (BLK10) is designated and managed as a replay protection block (RPMB), and the total number of replay protection blocks (nRPMB) increases to 9.

하지만, 후속되어 발생하는 가비지 컬렉션(GC2)에 의해, 리플레이 보호 블록(BLK4)의 유효 데이터(LBA1)가 수집되어 소거 후 로그 블록으로 제공되는 메모리 블록(BLK1)에 프로그램될 것이다. 그러면, 메모리 블록(BLK1)은 리플레이 보호 블록(RPMB)에서 해제된다. 따라서, 리플레이 보호 블록의 수(nRPMB)는 8개로 감소된다. However, by the subsequent garbage collection (GC2), the valid data (LBA1) of the replay protection block (BLK4) will be collected and erased and then programmed into the memory block (BLK1) provided as a log block. Then, the memory block (BLK1) is released from the replay protection block (RPMB). Accordingly, the number of replay protection blocks (nRPMB) is reduced to 8.

이어서, 2회의 가비지 컬렉션을 통해서 확보된 3개의 무효 리플레이 보호 블록들(BLK2, BLK3, BLK4)에 대한 소거 및 백패턴 쓰기 동작이 수행된다. 3개의 무효 리플레이 보호 블록들(BLK2, BLK3, BLK4)이 블록 소거되고, 이후에 각각의 메모리 블록들에는 백패턴이 프로그램된다. 그리고 백패턴이 프로그램된 3개의 무효 리플레이 보호 블록들(BLK2, BLK3, BLK4)은 리플레이 보호 블록(RPMB)에서 해제되고, 프리 블록으로 관리될 수 있다. 결국, 리플레이 보호 블록의 수(nRPMB)는 5개로 감소된다. Subsequently, erase and backpattern write operations are performed on the three invalid replay protection blocks (BLK2, BLK3, BLK4) secured through two garbage collections. Three invalid replay protection blocks (BLK2, BLK3, BLK4) are block erased, and then a backpattern is programmed into each memory block. And the three invalid replay protection blocks (BLK2, BLK3, BLK4) in which the back pattern is programmed can be released from the replay protection block (RPMB) and managed as free blocks. Ultimately, the number of replay protection blocks (nRPMB) is reduced to 5.

이상에서는 리플레이 보호 블록의 수(nRPMB)를 제한하기 위한 가비지 컬렉션(GC) 및 로그 블록 할당시 무효한 상태의 RPMB 프리 블록을 우선적으로 할당하는 본 발명의 RPMB 퍼지 동작이 설명되었다. 이 경우, 리플레이 보호 블록(RPMB)의 수가 특정 수 이하로 제한될 수 있다. 따라서, RPMB 퍼지 명령이 제공되는 시점에 리플레이 보호 블록(RPMB)들에 대한 소거 및 백패턴 쓰기를 진행하는 경우, 전체적인 퍼지 성능의 향상이 가능하다. Above, the RPMB purge operation of the present invention, which preferentially allocates RPMB free blocks in an invalid state during garbage collection (GC) to limit the number of replay protection blocks (nRPMB) and log block allocation, has been described. In this case, the number of replay protection blocks (RPMB) may be limited to a certain number or less. Therefore, if erasing and backpattern writing are performed on the replay protection blocks (RPMBs) at the time the RPMB purge command is provided, overall purge performance can be improved.

도 15는 도 1의 시스템의 계층적 구조를 예시적으로 보여주는 도면이다. 도 15를 참조하면, 시스템(1000)은 호스트(1100) 및 스토리지 장치(1200)를 포함할 수 있다. 호스트(1100)는 애플리케이션(AP-h), 파일 시스템(FS-h), 장치 관리자(DM-h), UFS 애플리케이션 계층(UAP-h), UFS 전송 프로토콜 계층(UTP-h), 및 UFS 인터커넥트 계층(UIC-h)을 포함할 수 있다. FIG. 15 is a diagram illustrating the hierarchical structure of the system of FIG. 1. Referring to FIG. 15 , system 1000 may include a host 1100 and a storage device 1200. Host 1100 includes application (AP-h), file system (FS-h), device manager (DM-h), UFS application layer (UAP-h), UFS transport protocol layer (UTP-h), and UFS interconnect. May include a layer (UIC-h).

애플리케이션(AP-h)은 호스트(1100)에서 구동되는 다양한 응용 프로그램들, 프로세스들 등을 포함할 수 있다. 파일 시스템(FS-h)은 애플리케이션(AP-h)에 의해 발생하는 다양한 데이터를 조직화하고 관리하도록 구성될 수 있다. The application (AP-h) may include various application programs, processes, etc. running on the host 1100. The file system (FS-h) may be configured to organize and manage various data generated by the application (AP-h).

UFS 애플리케이션 계층(UAP-h)은 호스트(1100) 및 스토리지 장치(1200) 사이의 다양한 커맨드를 지원하도록 구성된다. 예를 들어, UFS 애플리케이션 계층(UAP-h)은 입출력 관리자(IOM-h) 및 UFS 커맨드 셋(USC-h)을 포함할 수 있다. 입출력 스트림 관리자(IOM-h)는 애플리케이션(AP-h) 또는 파일 시스템(FS-h)으로부터의 요청을 관리하도록 구성된다. The UFS application layer (UAP-h) is configured to support various commands between the host 1100 and the storage device 1200. For example, the UFS application layer (UAP-h) may include an input/output manager (IOM-h) and a UFS command set (USC-h). The input/output stream manager (IOM-h) is configured to manage requests from the application (AP-h) or the file system (FS-h).

예시적인 실시 예에서, 입출력 스트림 관리자(IOM-h)는 애플리케이션(AP-h) 또는 파일 시스템(FS-h)으로부터의 입출력의 특성 값을 구분하도록 구성될 수 있다. 입출력 스트림 관리자(IOM-h)는 애플리케이션(AP-h) 또는 파일 시스템(FS-h)으로부터의 요청의 우선 순위를 관리하거나 또는 애플리케이션(AP-h) 또는 파일 시스템(FS-h)으로부터의 요청에 따른 다양한 기능을 지원하도록 구성될 수 있다. In an example embodiment, an input/output stream manager (IOM-h) may be configured to distinguish characteristic values of input/output from an application (AP-h) or a file system (FS-h). The input/output stream manager (IOM-h) manages the priority of requests from the application (AP-h) or the file system (FS-h). It can be configured to support various functions according to.

UFS 커맨드 셋(USC-h)은 호스트(1100) 및 스토리지 장치(1200) 사이에서 지원되는 다양한 커맨드 세트를 지원할 수 있다. 예시적인 실시 예에서, UFS 커맨드 셋(USC-h)은 UFS 전용 커맨드 셋(UFS Native command set) 및 UFS SCSI 커맨드 셋(UFS SCSI command set)을 포함할 수 있다. UFS 커맨드 셋(USC-h)은 애플리케이션(AP-h) 또는 파일 시스템(FS-h)으로부터의 요청에 따라 스토리지 장치(1200)로 전송될 커맨드를 구성할 수 있다. 비록 도면에 도시되지는 않았으나, UFS 애플리케이션 계층(UAP-h)은 커맨드 큐 제어를 위한 커맨드들을 처리하는 태스크 관리자(Task Manager)를 더 포함할 수 있다.UFS command set (USC-h) may support various command sets supported between the host 1100 and the storage device 1200. In an example embodiment, the UFS command set (USC-h) may include a UFS native command set and a UFS SCSI command set. The UFS command set (USC-h) can configure commands to be transmitted to the storage device 1200 according to a request from an application (AP-h) or a file system (FS-h). Although not shown in the figure, the UFS application layer (UAP-h) may further include a task manager that processes commands for command queue control.

장치 관리자(DM-h)는 장치 레벨의 동작들 및 장치 레벨의 구성들을 관리할 수 있다. 예시적인 실시 예에서, 장치 관리자(DM-h)는 스토리지 장치(1200)의 다양한 정보를 설정하거나 확인하기 위한 쿼리 요청을 관리할 수 있다. The device manager (DM-h) can manage device level operations and device level configurations. In an example embodiment, the device manager (DM-h) may manage query requests for setting or checking various information of the storage device 1200.

UFS 전송 프로토콜 계층(UTP-h; UFS Transport Protocol)은 상위 계층을 위한 서비스들을 제공할 수 있다. UFS 전송 프로토콜 계층(UTP-h)은 UFS 애플리케이션 계층(UAP-h)로부터 제공된 커맨드 또는 정보; 또는 장치 관리자(DM-h)로부터 제공된 쿼리 요청을 UPIU(UFS Protocol Information Unit) 형태의 패킷으로 생성할 수 있다. 예시적인 실시 예에서, UFS 전송 프로토콜 계층(UTP-h) 및 장치 관리자(DM-h)는 UDM-SAP(UDM-Service Access Point)를 통해 서로 통신할 수 있다. UFS 전송 프로토콜 계층(UTP-h) 및 UFS 애플리케이션 계층(UAP-h)은 UTP_CMD_SAP 또는 UTP_TM_SAP를 통해 서로 통신할 수 있다. The UFS Transport Protocol layer (UTP-h; UFS Transport Protocol) can provide services for upper layers. The UFS transport protocol layer (UTP-h) includes commands or information provided from the UFS application layer (UAP-h); Alternatively, the query request provided from the device manager (DM-h) can be generated as a packet in UPIU (UFS Protocol Information Unit) format. In an example embodiment, the UFS transport protocol layer (UTP-h) and device manager (DM-h) may communicate with each other via a UDM-Service Access Point (UDM-SAP). The UFS transport protocol layer (UTP-h) and UFS application layer (UAP-h) can communicate with each other via UTP_CMD_SAP or UTP_TM_SAP.

UFS 인터커넥터 계층(UIC-h)은 스토리지 장치(1200)와의 연결을 관리할 수 있다. 예시적인 실시 예에서, UFS 인터커넥터 계층(UIC-h)은 스토리지 장치(1200)의 UFS 인터커넥터 계층(UIC-d)과 물리적으로 연결된 MIPI Unipro 및 MIPI M-PHY 와 같은 하드웨어 구성들을 포함할 수 있다. 예시적인 실시 예에서, UFS 인터커넥터 계층(UIC-h) 및 UFS 전송 프로토콜 계층(UTP-h)은 UIC-SAP를 통해 통신할 수 있고, UFS 인터커넥터 계층(UIC-h) 및 장치 관리자(DM-h)는 UIO-SAP를 통해 통신할 수 있다.The UFS interconnector layer (UIC-h) may manage the connection with the storage device 1200. In an example embodiment, the UFS interconnector layer (UIC-h) may include hardware components such as MIPI Unipro and MIPI M-PHY that are physically connected to the UFS interconnector layer (UIC-d) of storage device 1200. there is. In an example embodiment, the UFS Interconnector Layer (UIC-h) and the UFS Transport Protocol Layer (UTP-h) may communicate over the UIC-SAP, and the UFS Interconnector Layer (UIC-h) and the Device Manager (DM) -h) can communicate via UIO-SAP.

스토리지 장치(1200)는 메모리 영역 관리자(MAM-d), 메모리 영역 속성 관리자(MAPM-d), 장치 관리자(DM-d), UFS 애플리케이션 계층(UAP-d), UFS 전송 프로토콜 계층(UTP-d), 및 UFS 인터커넥트 계층(UIC-d)을 포함할 수 있다. 예시적인 실시 예에서, UFS 애플리케이션 계층(UAP-d), UFS 전송 프로토콜 계층(UTP-d), 및 UFS 인터커넥트 계층(UIC-d)의 구성은 호스트(1100)의 UFS 애플리케이션 계층(UAP-h), UFS 전송 프로토콜 계층(UTP-h), 및 UFS 인터커넥트 계층(UIC-h)과 유사하며, 대응되는 계층들 간 논리적 통신하는 구성으로 이해될 수 있으므로, 이에 대한 상세한 설명은 생략된다.The storage device 1200 includes a memory area manager (MAM-d), a memory area attribute manager (MAPM-d), a device manager (DM-d), a UFS application layer (UAP-d), and a UFS transfer protocol layer (UTP-d). ), and UFS interconnect layer (UIC-d). In an exemplary embodiment, the configuration of the UFS application layer (UAP-d), UFS transport protocol layer (UTP-d), and UFS interconnect layer (UIC-d) is configured to include the UFS application layer (UAP-h) of host 1100. , UFS transport protocol layer (UTP-h), and UFS interconnect layer (UIC-h), and can be understood as a configuration for logical communication between the corresponding layers, so detailed description thereof will be omitted.

스토리지 장치(1200)의 메모리 영역 속성 관리자(MAPM-d)는 호스트(1100)로부터 수신된 쓰기 데이터가 저장될 영역을 지정하고 관리할 수 있다. 예를 들어, 앞서 설명된 바와 같이, 호스트(1100)의 명시적 요청 또는 내부 정책에 따라 호스트(1100)로부터 수신된 쓰기 데이터는 고정된 터보 라이트 버퍼(TWB-p), 비고정된 터보 라이트 버퍼(TWB-np), 및 사용자 스토리지(UST) 중 적어도 하나의 공간에 기입될 수 있다. 메모리 영역 속성 관리자(MAPM-d)은 앞서 설명된 다양한 방식들을 기반으로 호스트(1100)로부터 수신된 쓰기 데이터가 저장될 공간을 선택하고, 선택된 공간에 쓰기 데이터를 저장할 수 있다.The memory area attribute manager (MAPM-d) of the storage device 1200 may designate and manage an area in which write data received from the host 1100 will be stored. For example, as described above, write data received from the host 1100 according to an explicit request or internal policy of the host 1100 may be divided into a pinned Turbo Write Buffer (TWB-p), a non-pinned Turbo Write Buffer (TWB-np), and user storage (UST). The memory area property manager (MAPM-d) may select a space to store write data received from the host 1100 based on the various methods described above and store the write data in the selected space.

스토리지 장치(1200)의 메모리 영역 관리자(MAM-d)는 앞서 설명된 바와 같이, 호스트(1100)로부터의 명시적인 요청 또는 내부 정책에 따라, 고정된 터보 라이트 버퍼(TWB-p), 비고정된 터보 라이트 버퍼(TWB-np), 및 사용자 스토리지(UST) 사이의 데이터 이동/플러쉬/마이그레이션을 제어할 수 있다. As described above, the memory area manager (MAM-d) of the storage device 1200 may select pinned turbo write buffer (TWB-p), unpinned turbo write buffer (TWB-p), or an internal policy according to an explicit request from the host 1100 or an internal policy. Data movement/flush/migration between turbo write buffer (TWB-np) and user storage (UST) can be controlled.

상술된 호스트(1100) 및 스토리지 장치(1200) 각각의 계층적인 구조 및 기능은 예시적인 것이며 본 발명의 범위가 이에 한정되는 것은 아니다.The hierarchical structure and functions of each of the host 1100 and the storage device 1200 described above are illustrative and the scope of the present invention is not limited thereto.

이상에서와 같이 도면과 명세서에서 실시 예가 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허 청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시 예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호 범위는 첨부된 특허 청구범위의 기술적 사상에 의해 정해져야 할 것이다.As above, embodiments are disclosed in the drawings and specifications. Although specific terms are used here, they are used only for the purpose of describing the present invention and are not used to limit the meaning or scope of the present invention described in the patent claims. Therefore, those skilled in the art will understand that various modifications and other equivalent embodiments are possible. Therefore, the true scope of technical protection of the present invention should be determined by the technical spirit of the attached patent claims.

Claims (10)

리플레이 보호 블록 퍼지(RPMB Purge) 명령에 응답하여 퍼지 동작을 수행하는 스토리지 장치에 있어서:
적어도 하나의 불휘발성 메모리 장치; 그리고
상기 적어도 하나의 불휘발성 메모리 장치의 데이터 입출력을 제어하며, 리플레이 보호 블록(RPMB) 데이터가 저장되는 상기 적어도 하나의 불휘발성 메모리 장치의 리플레이 보호 블록(RPMB)을 추적하고, 상기 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 가비지 컬렉션을 트리거하는 스토리지 컨트롤러를 포함하되,
상기 스토리지 컨트롤러는 쓰기 데이터를 프로그램할 로그 블록을 할당할 때, 프리 블록들 중에서 상기 리플레이 보호 블록(RPMB)에 대응하는 메모리 블록에 우선순위를 부여하는 스토리지 장치.
In a storage device that performs a purge operation in response to a replay protection block purge (RPMB Purge) command:
at least one non-volatile memory device; and
Controls data input and output of the at least one non-volatile memory device, tracks a replay protection block (RPMB) of the at least one non-volatile memory device in which RPMB data is stored, and tracks the replay protection block (RPMB) of the at least one non-volatile memory device. ) includes a storage controller that triggers garbage collection when the number of
A storage device in which the storage controller gives priority to a memory block corresponding to the replay protection block (RPMB) among free blocks when allocating a log block for programming write data.
제 1 항에 있어서,
상기 리플레이 보호 블록(RPMB)에는 업데이트에 의해서 무효화된 RPMB 데이터를 포함하는 메모리 블록이 포함되는 스토리지 장치.
According to claim 1,
A storage device wherein the replay protection block (RPMB) includes a memory block containing RPMB data invalidated by an update.
제 1 항에 있어서,
상기 리플레이 보호 블록(RPMB)에는 논리적으로 소거된 RPMB 데이터를 포함하지만, 물리적으로 소거되기 이전인 프리 블록으로 지정된 메모리 블록이 포함되는 스토리지 장치.
According to claim 1,
The replay protection block (RPMB) includes a memory block that includes logically erased RPMB data, but is designated as a free block before being physically erased.
제 1 항에 있어서,
상기 스토리지 컨트롤러는 상기 리플레이 보호 블록(RPMB)이 물리적으로 소거된 후에 추적을 중지하는 스토리지 장치.
According to claim 1,
A storage device wherein the storage controller stops tracking after the replay protection block (RPMB) is physically erased.
제 1 항에 있어서,
상기 쓰기 데이터는 RPMB 데이터에 대응하는 스토리지 장치.
According to claim 1,
The write data is a storage device corresponding to RPMB data.
제 1 항에 있어서,
상기 스토리지 컨트롤러는:
상기 리플레이 보호 블록(RPMB)에 RPMB 식별자를 테그, 리스트, 그리고 테이블 중 적어도 하나의 형태로 부여하고 관리하는 블록 매니저; 그리고
상기 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 상기 리플레이 보호 블록(RPMB)들 내에서 가비지 컬렉션을 수행하는 RPMB 퍼지 매니저를 포함하는 스토리지 장치.
According to claim 1,
The storage controller:
a block manager that assigns and manages an RPMB identifier to the replay protection block (RPMB) in the form of at least one of a tag, list, and table; and
A storage device comprising an RPMB purge manager that performs garbage collection within the replay protection blocks (RPMBs) when the number of the replay protection blocks (RPMBs) reaches a threshold.
제 6 항에 있어서,
상기 RPMB 퍼지 매니저는 상기 가비지 컬렉션을 수행할 때, 수집된 유효 데이터를 복사하는 목적지 블록으로 무효한 RPMB 데이터를 갖는 프리 블록을 선택하는 스토리지 장치.
According to claim 6,
The RPMB purge manager selects a free block containing invalid RPMB data as a destination block to copy collected valid data when performing the garbage collection.
제 6 항에 있어서,
상기 가비지 컬렉션은 유효 데이터가 존재하지 않는 프리 블록에 백패턴 데이터를 프로그램하는 동작을 포함하는 스토리지 장치.
According to claim 6,
The garbage collection includes an operation of programming backpattern data in a free block in which no valid data exists.
불휘발성 메모리 장치; 그리고
상기 불휘발성 메모리 장치의 메모리 블록들 중 리플레이 보호 블록(RPMB) 데이터가 저장되는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달하면 가비지 컬렉션을 수행하는 스토리지 컨트롤러를 포함하는 스토리지 장치.
non-volatile memory device; and
A storage device comprising a storage controller that performs garbage collection when the number of RPMBs in which RPMB data is stored among memory blocks of the nonvolatile memory device reaches a threshold.
리플레이 보호 블록 퍼지(RPMB Purge) 명령에 응답하여 퍼지 동작을 수행하는 스토리지 장치의 메모리 블록 관리 방법에 있어서:
리플레이 보호 블록(RPMB) 데이터가 저장되는 리플레이 보호 블록(RPMB)의 수가 임계치에 도달했는지 체크하는 단계;
상기 리플레이 보호 블록(RPMB)의 수가 상기 임계치에 도달한 경우, 프리 블록들 중에 무효 RPMB 데이터를 포함하는 어느 하나를 선택하는 단계; 그리고
상기 선택된 어느 하나의 프리 블록에 상기 리플레이 보호 블록(RPMB)들로부터 수집된 유효 데이터를 복사하는 단계를 포함하는 메모리 블록 관리 방법.
In a method of managing a memory block of a storage device that performs a purge operation in response to a replay protection block purge (RPMB Purge) command:
Checking whether the number of replay protection blocks (RPMB) in which replay protection block (RPMB) data is stored has reached a threshold;
When the number of replay protection blocks (RPMB) reaches the threshold, selecting one of the free blocks containing invalid RPMB data; and
A memory block management method comprising copying valid data collected from the replay protection blocks (RPMB) to any one of the selected free blocks.
KR1020220086464A 2022-05-30 2022-07-13 Storage device providing high purge performance and memory block management method thereof KR20230166803A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US18/124,821 US20230384957A1 (en) 2022-05-30 2023-03-22 Storage device providing high purge performance and memory block management method thereof
EP23163934.5A EP4287028A1 (en) 2022-05-30 2023-03-24 Storage device providing high purge performance and memory block management method thereof
CN202310395197.2A CN117149052A (en) 2022-05-30 2023-04-12 Storage device providing high clearing performance and storage block management method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20220065998 2022-05-30
KR1020220065998 2022-05-30

Publications (1)

Publication Number Publication Date
KR20230166803A true KR20230166803A (en) 2023-12-07

Family

ID=89163716

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220086464A KR20230166803A (en) 2022-05-30 2022-07-13 Storage device providing high purge performance and memory block management method thereof

Country Status (1)

Country Link
KR (1) KR20230166803A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7430136B2 (en) 2004-11-30 2008-09-30 Siliconsystems, Inc. Purge operations for solid-state storage devices
US10522229B2 (en) 2017-08-30 2019-12-31 Micron Technology, Inc. Secure erase for data corruption
US10996883B2 (en) 2017-10-24 2021-05-04 Samsung Electronics Co., Ltd. Storage system including host device and storage device configured to perform selective purge operation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7430136B2 (en) 2004-11-30 2008-09-30 Siliconsystems, Inc. Purge operations for solid-state storage devices
US10522229B2 (en) 2017-08-30 2019-12-31 Micron Technology, Inc. Secure erase for data corruption
US10996883B2 (en) 2017-10-24 2021-05-04 Samsung Electronics Co., Ltd. Storage system including host device and storage device configured to perform selective purge operation

Similar Documents

Publication Publication Date Title
USRE49508E1 (en) Memory system and method for controlling nonvolatile memory
JP6982468B2 (en) Memory system and control method
US8700881B2 (en) Controller, data storage device and data storage system having the controller, and data processing method
JP5907255B2 (en) Selective data storage in LSB and MSB pages
US10411024B2 (en) Memory system and method for controlling nonvolatile memory
US11747989B2 (en) Memory system and method for controlling nonvolatile memory
WO2014102886A1 (en) Information processing apparatus and cache control method
US10817418B2 (en) Apparatus and method for checking valid data in memory system
EP2631916A1 (en) Data deletion method and device
US20100088461A1 (en) Solid state storage system using global wear leveling and method of controlling the solid state storage system
US20210034536A1 (en) Storage device, memory system comprising the same, and operating method thereof
US11392309B2 (en) Memory system for performing migration operation and operating method thereof
JP2021033849A (en) Memory system and control method
US11150819B2 (en) Controller for allocating memory blocks, operation method of the controller, and memory system including the controller
US11422930B2 (en) Controller, memory system and data processing system
JP7392080B2 (en) memory system
US11573732B2 (en) Storage device, memory system comprising the same, and operation method thereof
WO2018041258A1 (en) Method for processing de-allocation command, and storage device
KR20230166803A (en) Storage device providing high purge performance and memory block management method thereof
EP4287028A1 (en) Storage device providing high purge performance and memory block management method thereof
US10698621B2 (en) Block reuse for memory operations
KR20210142863A (en) Apparatus and method for increasing operation efficiency in a memory system
CN117149052A (en) Storage device providing high clearing performance and storage block management method thereof
KR20230115196A (en) Storage controller deallocating a memory block, method of operating the same, and a method of operating storage device having the same
JP2022121655A (en) Memory system and control method