KR101041837B1 - Control aparatus and method for storing file - Google Patents

Control aparatus and method for storing file Download PDF

Info

Publication number
KR101041837B1
KR101041837B1 KR1020100032948A KR20100032948A KR101041837B1 KR 101041837 B1 KR101041837 B1 KR 101041837B1 KR 1020100032948 A KR1020100032948 A KR 1020100032948A KR 20100032948 A KR20100032948 A KR 20100032948A KR 101041837 B1 KR101041837 B1 KR 101041837B1
Authority
KR
South Korea
Prior art keywords
file
page
block
memory
lsb
Prior art date
Application number
KR1020100032948A
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 KR1020100032948A priority Critical patent/KR101041837B1/en
Application granted granted Critical
Publication of KR101041837B1 publication Critical patent/KR101041837B1/en

Links

Images

Classifications

    • 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/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Abstract

PURPOSE: A file storage control device and a method thereof are provided to prevent elimination of a block during SPOR(Sudden Power off Recovery) by proceeding duplication writing if the last page of a file is LSB while storing the file in an MLC(Multi-Level Cell) NAND flash memory. CONSTITUTION: An MLA(Memory Linked Architecture) driver(32) approaches to a buffer area of the first memory which a file is temporarily stored during a file write request. A memory driver(33) approaches to the second memory which the file is to be stored. If the last page of the file is an LSB(Least Significant Bit) page, an FTL(Flash Translation Layer) unit(31) writes the LSB page on the first page of a block which the last page is to be stored and proceeds duplication write or emptying of the LSB page on the second page.

Description

파일저장 제어장치 및 방법{CONTROL APARATUS AND METHOD FOR STORING FILE}CONTROL APARATUS AND METHOD FOR STORING FILE}

본 발명은 파일저장 제어장치 및 방법에 관한 것이다.
The present invention relates to a file storage control apparatus and method.

멀티미디어 기술의 발달로 멀티미디어를 이용할 수 있는 단말기가 다양화되면서 멀티미디어 데이터를 저장하는 저장장치에 대한 관심도 증가하고 있다. 저장장치는 휘발성 저장장치 또는 비휘발성 저장장치 등이 있으며, 최근에는 비휘발성 저장장치가 소형의 휴대용 단말기에 많이 사용되고 있다. 비휘발성 저장장치는 NAND 플래시 메모리, NOR 플래시 메모리 등이 사용된다. As multimedia terminals have been diversified due to the development of multimedia technology, interest in storage devices for storing multimedia data is increasing. The storage device includes a volatile storage device or a nonvolatile storage device, and recently, a nonvolatile storage device has been widely used in a small portable terminal. Nonvolatile storage devices include NAND flash memory and NOR flash memory.

NAND 플래시 메모리는 NOR 플래시 메모리에 비해 집적도가 용이하고, 가격이 저렴하며 동작 속도가 빠르고 전력소모가 적은 장점이 있어 많이 사용되고 있다.NAND flash memory is widely used due to its advantages of easy integration, low cost, fast operation speed, and low power consumption compared to NOR flash memory.

이러한 NAND 플래시 메모리는 동일한 복수의 블록을 포함하고, 각각의 블록은 복수의 페이지를 포함할 수 있다. 종래 NAND 플래시 메모리에 저장되는 데이터는 FTL(Flash Translation Layer)에 의해 데이터가 각 블록에 저장된다. 특히, 멀티 레벨 셀 타입의 NAND 플래시의 경우에는 각 셀에 2bit값이 저장되므로 LSB 페이지와 MSB 페이지가 하나의 블록에 순차적으로 저장된다. Such a NAND flash memory may include a plurality of identical blocks, and each block may include a plurality of pages. Data stored in a conventional NAND flash memory is stored in each block by a FTL (Flash Translation Layer). In particular, in the case of a NAND flash of a multi-level cell type, since a 2-bit value is stored in each cell, the LSB page and the MSB page are sequentially stored in one block.

이때, 해당 파일의 마지막 페이지가 LSB 페이지일 경우 마지막 LSB 페이지가 저장된 블록에 다음 파일의 MSB 페이지가 저장될 수 있다. 여기서, 다음 파일의 MSB 페이지가 저장되는 동안 SPOR(Sudden Power off Recovery)시 해당 블록이 소거되어 이전 저장된 파일이 손상되는 문제점이 있다.
In this case, when the last page of the file is an LSB page, the MSB page of the next file may be stored in a block in which the last LSB page is stored. Here, while the MSB page of the next file is stored, the corresponding block is erased during the Sudden Power off Recovery (SPOR), thereby corrupting the previously stored file.

본 발명의 해결하려는 과제는 비휘발성 메모리에 파일 저장 시 SPOR(Sudden Power off Recovery)이 발생하여도 기 저장된 파일을 손상하지 않도록 할 수 있는 파일저장 제어장치 및 방법을 제공하는 데 있다.
An object of the present invention is to provide a file storage control apparatus and method that can prevent damage to a pre-stored file even if a SPOR (Sudden Power off Recovery) occurs when the file is stored in the nonvolatile memory.

본 발명의 일 측면에 따르면, 메모리의 파일 저장을 제어하는 파일저장 제어장치에 있어서, 파일 쓰기 요청 시 해당 파일이 임시 저장된 제1 메모리의 버퍼 영역에 접근하는 MLA(Memory Linked Architecture; 이하, "MLA"라 함) 드라이버; 상기 해당 파일이 저장될 제2 메모리에 접근하는 메모리 드라이버; 및 상기 해당 파일의 마지막 페이지가 LSB(Least Significant Bit; 이하, "LSB"라 함) 페이지 또는 MSB(Most Significant Bit; 이하, "MSB"라 함) 페이지인지 판단하여 LSB인 경우, 상기 마지막 페이지가 저장될 블록의 제1 페이지에 상기 해당 파일의 마지막 페이지인 상기 마지막 LSB 페이지의 쓰기 연산을 수행하고, 상기 마지막 페이지가 저장되는 블록의 제2 페이지에 상기 해당 파일의 마지막 LSB 페이지를 중복 쓰기 또는 상기 제2 페이지를 비우기를 수행하도록 제어하는 FTL(Flash Translation Layer; 이하, "FTL"이라 함) 부를 포함하는 파일저장 제어장치를 제공할 수 있다.According to an aspect of the present invention, in the file storage control device for controlling the file storage of the memory, MLA (Memory Linked Architecture) for accessing the buffer area of the first memory where the file is temporarily stored when a file write request; "Driver"; A memory driver accessing a second memory in which the corresponding file is to be stored; And if the last page of the corresponding file is an LSB by determining whether the last page is a LSB (Least Significant Bit) page or a Most Significant Bit (MSB) page; Perform a write operation of the last LSB page, which is the last page of the file, to the first page of the block to be stored, and overwrite or write the last LSB page of the file to the second page of the block in which the last page is stored; A file storage control apparatus may include a FTL (Flash Translation Layer) unit for controlling to empty the second page.

상기 FTL 부는 상기 해당 파일의 마지막 페이지가 MSB 페이지인 경우, 상기 LSB 페이지가 저장된 블록의 제2 페이지에 파일 쓰기를 수행할 수 있다.When the last page of the corresponding file is an MSB page, the FTL unit may perform a file write on a second page of a block in which the LSB page is stored.

상기 FTL 부는 상기 파일 쓰기 요청 시 수신된 파일 정보에 포함된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스를 검사하고, 상기 물리적 블록 어드레스에 상응하는 페이지에 저장된 데이터 유무를 검사하여 상기 블록 페이지에 저장된 데이터가 없을 경우 상기 마지막 LSB 페이지를 저장할 수 있다.The FTL unit checks a physical block address corresponding to a logical block address included in the file information received when the file write request is requested, and checks whether data stored in the page corresponding to the physical block address is present to store data stored in the block page. If not, the last LSB page can be stored.

상기 FTL 부는 상기 논리적 블록 어드레스와 상기 물리적 블록 어드레스가 매핑된 로그블록 테이블을 더 포함할 수 있다.The FTL unit may further include a log block table in which the logical block address and the physical block address are mapped.

상기 FTL 부는 상기 파일이 저장될 블록에 저장된 데이터가 있을 경우, 덮어쓰기를 수행할 수 있다.The FTL unit may perform overwriting when there is data stored in a block in which the file is to be stored.

상기 덮어쓰기 수행은 임시 블록 유무를 검사하여, 임시 블록이 있을 경우 빈 블록에 상기 파일을 쓰기 수행을 하고, 마지막 페이지가 LSB 페이지 인지 판단하여, LSB 페이지 인 경우 중복쓰기를 수행한 후, 로그 블록 테이블을 갱신할 수 있다.The overwrite operation checks the presence of a temporary block, and if there is a temporary block, writes the file to an empty block, determines whether the last page is an LSB page, and performs an overwrite when the LSB page is a log block. You can update the table.

상기 FTL 부는 상기 임시 블록이 없을 경우, 새로운 블록을 할당하거나, 희생블록을 할당하여 해당 블록에 상기 파일의 파일 쓰기를 수행할 수 있다.If there is no temporary block, the FTL unit may allocate a new block or allocate a victim block to write a file of the file to the block.

상기 FTL 부는 상기 파일 요청 시 수신된 파일 정보에 포함된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스가 없을 경우, 상기 제2 메모리의 빈 블록을 배정하고, 상기 빈 블록에 상응하는 물리 블록 어드레스 정보가 포함되도록 로그 블록 테이블 정보를 갱신할 수 있다.If there is no physical block address corresponding to the logical block address included in the file information received at the file request, the FTL unit allocates an empty block of the second memory and includes physical block address information corresponding to the empty block. You can update the log block table information as much as possible.

본 발명의 다른 측면에 따르면, 메모리의 파일 저장을 제어하는 파일저장 제어장치에 있어서, 파일 쓰기 요청 시 해당 파일이 임시 저장된 제1 메모리의 버퍼 영역에 접근하는 MLA 드라이버; 상기 해당 파일이 저장될 제2 메모리에 접근하는 메모리 드라이버; 및 상기 해당 파일을 상기 제2 메모리의 제1 저장 영역에 저장하며, 상기 해당 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하여 상기 해당 파일의 마지막 페이지가 LSB 페이지인 경우, 상기 마지막 LSB 페이지를 상기 제2 메모리의 제2 저장 영역에 중복 쓰기를 수행하도록 제어하는 FTL부를 포함하는 파일저장 제어장치를 제공할 수 있다.According to another aspect of the present invention, a file storage control device for controlling file storage of a memory, comprising: an MLA driver for accessing a buffer region of a first memory in which a corresponding file is temporarily stored when a file write request is made; A memory driver accessing a second memory in which the corresponding file is to be stored; And store the corresponding file in a first storage area of the second memory, and determine whether the last page of the file is an LSB page or an MSB page and if the last page of the file is an LSB page, the last LSB page. A file storage control device may include an FTL unit configured to perform redundant writing on a second storage area of the second memory.

본 발명의 또 다른 측면에 따르면, 메모리의 파일 저장을 제어하는 파일 저장 제어 방법에 있어서, (a) 파일 쓰기 요청을 수신하는 단계; (b) 메모리에 저장될 파일의 물리적 블록 어드레스를 검사하는 단계; (c) 상기 검사 결과, 상기 물리적 블록 어드레스가 있을 경우 상기 물리적 블록 어드레스에 상응하여 상기 메모리의 블록에 저장된 데이터의 유무를 판단하는 단계; (d) 상기 판단 결과, 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 없을 경우, 파일 쓰기를 수행하는 단계; 및 (e) 상기 파일 쓰기가 수행되는 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하고, 마지막 페이지가 LSB 페이지인 경우 마지막 LSB 페이지를 중복 쓰기를 수행하거나, 상기 마지막 LSB 페이지가 저장된 블록의 나머지 영역의 비우기를 수행하는 단계를 포함하는 파일 저장 제어 방법을 제공할 수 있다.According to another aspect of the present invention, a file storage control method for controlling file storage in a memory, the method comprising: (a) receiving a file write request; (b) checking the physical block address of the file to be stored in the memory; (c) determining the presence or absence of data stored in a block of the memory corresponding to the physical block address if the physical block address exists as a result of the checking; (d) performing file writing when there is no data stored in the block corresponding to the physical block address as a result of the determination; And (e) determining whether the last page of the file on which the file write is performed is an LSB page or an MSB page, and if the last page is an LSB page, performs a duplicate write on the last LSB page, or the rest of the block in which the last LSB page is stored. It is possible to provide a file storage control method including the step of emptying an area.

상기 단계 (e)는 상기 플래시 메모리의 각 블록 별로 설정된 페이지 중, 제1 페이지에 상기 마지막 LSB 페이지가 저장된 후 제2 페이지에 상기 마지막 LSB 페이지가 저장되는 단계일 수 있다.The step (e) may be a step in which the last LSB page is stored in a second page after the last LSB page is stored in a first page among pages set for each block of the flash memory.

상기 단계 (b)는 상기 파일 쓰기 요청 수신 단계에서 수신된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스로 변환하는 단계를 더 포함할 수 있다.Step (b) may further include the step of converting to a physical block address corresponding to the logical block address received in the step of receiving the file write request.

상기 단계 (b) 이후에, 상기 물리적 블록 어드레스가 없을 경우, 상기 메모리에 빈 블록을 배정하고 블록 테이블을 갱신하는 단계; 및 상기 빈 블록에 상기 파일 쓰기를 수행하는 단계를 더 포함할 수 있다.After step (b), if there is no physical block address, allocating an empty block to the memory and updating a block table; And writing the file to the empty block.

상기 단계 (d)에서 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 있을 경우, 덮어쓰기를 수행하는 단계를 더 포함할 수 있다.If there is data stored in the block corresponding to the physical block address in step (d), the method may further include overwriting.

상기 덮어쓰기를 수행하는 단계는 로그 블록 테이블에 로그 블록의 유무를 검사하는 단계; 및 상기 검사 결과, 상기 로그 블록이 있을 경우 빈 로그 블록에 파일 쓰기를 수행하는 단계를 더 포함할 수 있다.The overwriting may include checking whether a log block exists in a log block table; And writing a file to an empty log block when the log block exists.

상기 덮어쓰기를 수행하는 단계는 로그 블록 테이블에 로그 블록의 유무를 검사하는 단계; 상기 로그 블록이 없을 경우, 빈 로그 블록의 유무를 검사하는 단계; 상기 빈 로그 블록이 있을 경우 상기 빈 로그 블록을 할당하고 상기 로그 블록 테이블을 갱신하는 단계; 및 상기 빈 로그 블록에 파일 쓰기를 수행하는 단계를 더 포함할 수 있다.The overwriting may include checking whether a log block exists in a log block table; If there is no log block, checking for the presence of an empty log block; Allocating the empty log block and updating the log block table if the empty log block exists; And writing a file to the empty log block.

상기 빈 로그 블록이 없을 경우, 로그 블록에서 적어도 1개의 블록을 선정하는 단계; 및 상기 선정된 블록에 파일 쓰기를 수행하는 단계를 더 포함할 수 있다.Selecting at least one block from a log block if there is no empty log block; And writing a file to the selected block.

본 발명의 또 다른 측면에 따르면, 메모리의 파일 저장을 제어하는 파일 저장 제어 방법에 있어서, (a) 파일 쓰기 요청을 수신하는 단계; (b) 메모리에 저장될 파일의 물리적 블록 어드레스를 검사하는 단계; (c) 상기 검사 결과, 상기 물리적 블록 어드레스가 있을 경우 상기 물리적 블록 어드레스에 상응하여 상기 메모리의 블록에 저장된 데이터의 유무를 판단하는 단계; (d) 상기 판단 결과, 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 없을 경우, 상기 메모리의 제1 저장 영역에 파일 쓰기를 수행하는 단계; 및 (e) 상기 파일 쓰기가 수행되는 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하고, LSB 페이지인 경우 마지막 LSB 페이지를 상기 메모리의 제2 저장 영역에 저장하는 단계를 포함하는 파일 저장 제어 방법을 제공할 수 있다.According to another aspect of the present invention, a file storage control method for controlling file storage in a memory, the method comprising: (a) receiving a file write request; (b) checking the physical block address of the file to be stored in the memory; (c) determining the presence or absence of data stored in a block of the memory corresponding to the physical block address if the physical block address exists as a result of the checking; (d) writing a file to a first storage area of the memory when there is no data stored in a block corresponding to the physical block address as a result of the determination; And (e) determining whether the last page of the file on which the file writing is performed is an LSB page or an MSB page, and if the LSB page is an LSB page, storing the last LSB page in a second storage area of the memory. Can be provided.

상기 단계(d)는 상기 제1 저장 영역의 제1 페이지에 상기 LSB 페이지를 저장하고, 제2 페이지에 상기 MSB 페이지를 저장하는 단계를 더 포함할 수 있다.
The step (d) may further include storing the LSB page in a first page of the first storage area and storing the MSB page in a second page.

본 발명의 실시예에 의하면, MLC NAND 플래시 메모리에 파일 저장 시 해당 파일의 마지막 페이지가 LSB일 경우에 마지막 LSB 페이지를 중복쓰기를 수행하여 SPOR 시 블록이 소거되는 것을 방지할 수 있다.According to an embodiment of the present invention, when a file is stored in an MLC NAND flash memory, when the last page of the file is an LSB, the last LSB page may be overwritten to prevent the block from being erased during the SPOR.

또한 본 발명의 실시예에 의하면, MLC NAND 플래시 메모리에 파일 저장 시 해당 파일의 마지막 페이지가 LSB일 경우에 마지막 LSB 페이지가 저장된 블록의 제2 페이지를 비워 SPOR 시 블록이 소거되는 것을 방지할 수 있다.According to an embodiment of the present invention, when the file is stored in the MLC NAND flash memory, when the last page of the file is the LSB, the second page of the block in which the last LSB page is stored may be emptied to prevent the block from being erased at the SPOR. .

본 발명의 실시 예에 의하면, MLC NAND 플래시 메모리에 파일 저장시 해당 파일의 마지막 페이지가 LSB일 경우에 마지막 LSB 페이지를 제2 저장 영역에 중복으로 저장하여 SPOR 시 블록이 소거되는 것을 방지할 수 있다.
According to an embodiment of the present invention, when a file is stored in an MLC NAND flash memory, when the last page of the file is an LSB, the last LSB page is repeatedly stored in the second storage area to prevent the block from being erased during the SPOR. .

도 1은 본 발명의 일 실시 예에 따른 파일저장 제어장치가 구비된 메모리 제어 시스템의 일 실시 예를 도시한 블록도.
도 2는 도 1에 도시된 파일저장 제어장치의 일 실시 예를 도시한 블록도.
도 3은 도 1에 도시된 MLC NAND의 구조를 개략적으로 도시한 블록도.
도 4는 본 발명의 일 실시 예에 따라 파일이 MLC NAND에 저장된 것을 도시한 블록도.
도 5는 본 발명이 다른 실시 예에 따라 파일이 MLC NAND에 저장된 것을 도시한 블록도.
도 6은 본 발명의 제1 실시 예에 따른 파일 저장 제어 방법을 도시한 흐름도.
도 7은 본 발명의 제2 실시 예에 따른 파일저장 제어장치를 구비한 단말기를 도시한 블록도.
도 8은 도 7에 도시된 제2 메모리의 제1 저장영역과 제2 저장영역에 데이터가 저장되는 것을 예를 들어 도시한 도면이다.
도 9는 본 발명의 제2 실시 예에 따른 파일 저장 제어 방법을 순차적으로 도시한 흐름도.
1 is a block diagram illustrating an embodiment of a memory control system having a file storage control apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram showing an embodiment of a file storage control device shown in FIG. 1; FIG.
3 is a block diagram schematically showing the structure of the MLC NAND shown in FIG.
4 is a block diagram illustrating that a file is stored in an MLC NAND according to one embodiment of the present invention.
5 is a block diagram illustrating that a file is stored in an MLC NAND according to another embodiment of the present invention.
6 is a flowchart illustrating a file storage control method according to a first embodiment of the present invention.
Figure 7 is a block diagram showing a terminal having a file storage control device according to a second embodiment of the present invention.
FIG. 8 illustrates an example in which data is stored in a first storage area and a second storage area of the second memory shown in FIG. 7.
9 is a flowchart sequentially illustrating a file storage control method according to a second embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 이를 상세한 설명을 통해 상세히 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.The present invention may be variously modified and have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail with reference to the accompanying drawings. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention.

본 발명을 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 본 명세서의 설명 과정에서 이용되는 숫자(예를 들어, 제1, 제2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별기호에 불과하다.In describing the present invention, when it is determined that the detailed description of the related known technology may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. In addition, numerals (eg, first, second, etc.) used in the description process of the present specification are merely identification symbols for distinguishing one component from another component.

또한, 본 명세서에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, in the present specification, when one component is referred to as "connected" or "connected" with another component, the one component may be directly connected or directly connected to the other component, but in particular It is to be understood that, unless there is an opposite substrate, it may be connected or connected via another component in the middle.

이하, 첨부된 도면들을 참조하여 본 발명의 실시예들에 따른 데이터를 메모리에 저장하는 장치에 관하여 상세히 설명한다.
Hereinafter, an apparatus for storing data in a memory according to embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시 예에 따른 데이터를 메모리에 저장하는 장치를 구비한 단말기를 도시한 블록도이다. 도 1의 컴퓨팅 시스템은 모바일 단말기, MP3, 네비게이션, PMP 등의 멀티미디어 단말기일 수 있다.1 is a block diagram illustrating a terminal having an apparatus for storing data in a memory according to an embodiment of the present invention. The computing system of FIG. 1 may be a multimedia terminal such as a mobile terminal, MP3, navigation, PMP, or the like.

도 1을 참조하면, 본 발명의 일 실시 예에 다른 단말기는 호스트 프로세서(10), 제1 메모리(20), 파일저장 제어장치(30) 및 제2 메모리(40)를 포함할 수 있다.Referring to FIG. 1, another terminal according to an exemplary embodiment may include a host processor 10, a first memory 20, a file storage control device 30, and a second memory 40.

여기서, 제1 메모리(20)는 휘발성 메모리로서 DRAM(Dynamic Random Access Memory)을 일예로 설명하고, 제2 메모리(40)는 비휘발성 메모리로서 멀티레벨셀 낸드 플래시 메모리(Multi-Level Cell NAND Flash Memory)를 예를 들어 설명하기로 한다. 그러나, 제1 메모리(20) 및 제2 메모리(40)는 이에 한정되지 않는다.Here, the first memory 20 is described as a volatile memory (Dynamic Random Access Memory) (DRAM) as an example, the second memory 40 is a non-volatile memory as a multi-level cell NAND Flash memory ) As an example. However, the first memory 20 and the second memory 40 are not limited thereto.

구체적으로, 호스트 프로세서(10)는 송수신 통신 신호 처리, 신호 압축 처리, 에러 정정 및 통신 시스템 제어 등의 기능을 수행할 수 있다. 또한, 호스트 프로세서(10)는 멀티미디어 기능을 수행할 수 있다.In detail, the host processor 10 may perform functions such as transmission and reception communication signal processing, signal compression processing, error correction, and communication system control. In addition, the host processor 10 may perform a multimedia function.

예를 들면, 호스트 프로세서(10)는 사용자와의 인터페이스를 통해 어플리케이션을 수행하여 멀티미디어 프로세스를 수행할 수 있다.For example, the host processor 10 may perform an multimedia process by performing an application through an interface with a user.

호스트 프로세서(10)는 제1 메모리(20)에 파일의 쓰기, 읽기, 지우기 등의 기능을 수행할 수 있다. 이를 위하여, 호스트 프로세서(10)는 파일 시스템을 포함할 수 있다. 파일 시스템은 제1 메모리(20)에 파일 쓰기, 읽기 등의 기능을 수행할 수 있다. The host processor 10 may perform a function such as writing, reading, or erasing a file in the first memory 20. To this end, the host processor 10 may include a file system. The file system may perform a function such as writing or reading a file in the first memory 20.

제1 메모리(20)는 프로그램 및 데이터 등을 저장할 수 있다. 제1 메모리(20)는 프로세서 영역(21), 버퍼 영역(22) 및 드라이버 영역(23)으로 구분될 수 있다.The first memory 20 may store a program, data, and the like. The first memory 20 may be divided into a processor region 21, a buffer region 22, and a driver region 23.

프로세서 영역(21)은 호스트 프로세서(10) 또는 외부 장치로부터 입력된 파일 데이터, 프로그램 등을 저장할 수 있다.The processor region 21 may store file data, a program, and the like input from the host processor 10 or an external device.

버퍼 영역(22)은 제2 메모리(40)에 저장될 데이터가 임시로 저장될 수 있다. 버퍼 영역(22)은 호스트 프로세서(10)와 파일저장 제어장치(30)의 사이에서 접속이 가능한 듀얼 포트 메모리 영역일 수 있다. 버퍼 영역(22)은 명령어가 저장될 영역과 데이터가 저장될 영역으로 구분될 수 있다. 명령어 저장 영역은 파일 저장 제어장치에서 수행될 명령어가 저장될 수 있고, 데이터 저장 영역은 제2 메모리(40)에 저장될 데이터가 임시로 저장될 수 있다.In the buffer area 22, data to be stored in the second memory 40 may be temporarily stored. The buffer area 22 may be a dual port memory area that is accessible between the host processor 10 and the file storage control device 30. The buffer area 22 may be divided into an area in which an instruction is to be stored and an area in which data is to be stored. The command storage area may store a command to be executed in the file storage control device, and the data storage area may temporarily store data to be stored in the second memory 40.

드라이버 영역(23)은 파일저장 제어장치(30) 파일저장 제어장치(30)에서 수행되는 프로그램이 저장될 수 있다.The driver area 23 may store a program performed by the file storage control device 30 and the file storage control device 30.

제2 메모리(40)는 어플리케이션용 프로그램, 데이터 등을 저장할 수 있다. 제2 메모리(40)는 비휘발성 메모리 등을 포함할 수 있다. 본 실시 예에 따르면, 제2 메모리(40)는 페이지 단위로 데이터를 저장하며, 블록 단위로 데이터가 소거가 된다. 예를 들면, 제2 메모리(40)는 도 3에 도시된 바와 같이 하나의 블록(41)에 제1 페이지(51) 및 제2 페이지(52)로 데이터를 나눠 저장할 수 있다. 이때, 제1 페이지(51)에는 LSB(Least Significant Bit; 최하위 비트) 페이지가 저장되고, 제2 페이지에는 MSB 페이지(Most Significant Bit; 최상위 비트)가 저장될 수 있다.The second memory 40 may store an application program, data, and the like. The second memory 40 may include a nonvolatile memory. According to the present embodiment, the second memory 40 stores data in units of pages, and data is erased in units of blocks. For example, as illustrated in FIG. 3, the second memory 40 may divide and store data into the first page 51 and the second page 52 in one block 41. In this case, a first page 51 may store a least significant bit (LSB) page, and a second page may store an MSB page (most significant bit).

파일저장 제어장치(30)는 제2 메모리(40)에 접근하여 버퍼 영역(22)에 임시로 저장된 데이터를 저장하는 기능을 수행할 수 있다.The file storage control device 30 may access the second memory 40 and store a data temporarily stored in the buffer area 22.

파일저장 제어장치(30)는 버퍼 영역(22)으로부터 입력된 데이터의 논리적 어드레스를 물리적 어드레스로 변환하여 제2 메모리(40)의 물리적 어드레스에 해당 파일을 저장하도록 할 수 있다. 파일저장 제어장치(30)는 저장하려는 해당 파일의 마지막 페이지가 LSB 페이지일 경우, 제2 메모리(40)의 다음 페이지에 마지막 LSB 페이지를 중복하여 저장하도록 제어할 수 있다.The file storage control device 30 may convert the logical address of the data input from the buffer area 22 into a physical address to store the file at the physical address of the second memory 40. When the last page of the corresponding file to be stored is the LSB page, the file storage control device 30 may control to store the last LSB page redundantly on the next page of the second memory 40.

또한, 파일저장 제어장치(30)는 저장하려는 해당 파일의 마지막 페이지가 LSB 페이지일 경우 제2 메모리(40)에 다음 페이지를 비우도록 제어할 수 있다.In addition, the file storage controller 30 may control to empty the next page in the second memory 40 when the last page of the corresponding file to be stored is the LSB page.

한편, 파일저장 제어장치(30)는 제2 메모리(40)에 해당 물리적 어드레스에 다른 데이터가 저장된 경우에는 다른 비어있는 저장 블록에 해당 파일의 쓰기를 수행하도록 할 수 있다.On the other hand, the file storage control device 30 may write the file to another empty storage block when other data is stored at the corresponding physical address in the second memory 40.

파일저장 제어장치(30)에 대한 설명은 이하 도 2 내지 도 5를 참조하여 더 자세히 하기로 한다.
The file storage control device 30 will be described in more detail with reference to FIGS. 2 to 5 below.

도 2는 도 1에 도시된 호스트 프로세서와 파일저장 제어장치 사이의 계층을 개략적으로 도시한 블록도이다.FIG. 2 is a block diagram schematically illustrating a hierarchy between a host processor and a file storage control device shown in FIG. 1.

도 2를 참조하면, 호스트 프로세서(10)는 어플리케이션(11), 파일 시스템(12), 제1 MLA(Memory Linked Architecture; 이하, "MLA"라 함) 드라이버(13)를 포함할 수 있고, 파일저장 제어장치(30)는 FTL(Flash Translation Layer; 이하, "FTL"이라 함) 부(31), 제2 MLA 드라이버(32) 및 NAND 드라이버(33)를 포함할 수 있다.Referring to FIG. 2, the host processor 10 may include an application 11, a file system 12, a first Memory Linked Architecture (MLA) driver 13, and a file. The storage controller 30 may include a Flash Translation Layer (FTL) unit 31, a second MLA driver 32, and a NAND driver 33.

어플리케이션(11)은 상술한 바와 같이, 단말기의 다양한 어플리케이션을 수행할 수 있다. 예를 들면, 어플리케이션(11)은 통신, 게임, 멀티미디어 통신 등의 어플리케이션 기능을 수행하도록 할 수 있다.As described above, the application 11 may perform various applications of the terminal. For example, the application 11 may perform application functions such as communication, games, and multimedia communication.

파일 시스템(12)은 파일 또는 데이터의 읽기, 쓰기 및 지우기 등의 기능을 수행하도록 한다. 예를 들면, 파일 시스템(12)은 데이터 쓰기를 수행할 경우, 해당 파일을 저장할 수 있도록 파일을 여러 개로 분할할 수 있다. 분할된 파일은 제1 메모리의 버퍼 영역에 임시로 저장하도록 한다. 이때, 제1 MLA 드라이버(13)를 통해 제1 메모리에 접근할 수 있다.The file system 12 may perform functions such as reading, writing, and erasing a file or data. For example, when writing data, the file system 12 may divide the file into a number of files to store the file. The divided file is temporarily stored in the buffer area of the first memory. In this case, the first memory may be accessed through the first MLA driver 13.

제1 MLA드라이버(13)는 버퍼 영역과 파일저장 제어장치(30)와의 인터페이스를 담당한다. 제1 MLA 드라이버(13)는 버퍼 영역(22)에 접근할 수 있다. 제1 MLA 드라이버(13)는 파일저장 제어장치(30)의 파일 전송 요청을 수신하면, 버퍼 영역(22)에 임시로 저장된 명령어 또는 데이터를 제공할 수 있다.The first MLA driver 13 is responsible for the interface between the buffer area and the file storage control device 30. The first MLA driver 13 may access the buffer area 22. When the first MLA driver 13 receives a file transfer request from the file storage control device 30, the first MLA driver 13 may provide a command or data temporarily stored in the buffer area 22.

제2 MLA 드라이버(32)는 호스트 프로세서(10)에 구비된 제1 MLA 드라이버(13)와 인터페이스를 담당한다. 제2 MLA 드라이버(32)는 FTL 부(31)에서 직접 버퍼 영역(22)에 접근할 수 없으므로 버퍼 영역(22)에 임시 저장된 데이터를 FLT 부(31)에서 접근할 수 있도록 할 수 있다.The second MLA driver 32 is responsible for interfacing with the first MLA driver 13 included in the host processor 10. Since the second MLA driver 32 may not directly access the buffer area 22 from the FTL part 31, the second MLA driver 32 may access data temporarily stored in the buffer area 22 from the FLT part 31.

NAND 드라이버(33)는 메모리 드라이버로서 제2 메모리(40)에 접근할 수 있다. NAND 드라이버(33)는 FTL 부(31)에서 제어신호 또는 명령 신호가 입력되면, 제2 메모리에 접근하여 파일의 읽기, 쓰기 등의 기능을 지원하도록 한다.The NAND driver 33 may access the second memory 40 as a memory driver. When the control signal or the command signal is input from the FTL unit 31, the NAND driver 33 accesses the second memory to support a function such as reading or writing a file.

FTL 부(31)는 쓰기 명령이 수행되면 입력된 파일 정보 중 논리적 어드레스를 비휘발성 메모리의 물리적 블록 어드레스로 변환한다. 여기서 논리적 어드레스는 디스크의 섹터와 같은 개념으로 물리적 블록 어드레스는 블록 넘버와 페이지 넘버일 수 있다. FTL 부(31)는 제2 메모리(40)의 블록 어드레스를 검색하여 해당 블록에 데이터 쓰기를 수행한다. 이때, 해당 파일의 마지막 페이지가 LSB일 경우에는 마지막 LSB 페이지의 중복 쓰기를 수행하도록 한다. 중복 쓰기가 수행될 경우에는 제2 메모리의 다음 페이지 또는 빈 페이지에 마지막 LSB 페이지 쓰기가 수행될 수 있다.When the write command is performed, the FTL unit 31 converts a logical address of the input file information into a physical block address of the nonvolatile memory. The logical address may be the same as a sector of a disk, and the physical block address may be a block number and a page number. The FTL unit 31 retrieves the block address of the second memory 40 and writes data to the corresponding block. In this case, if the last page of the file is the LSB, the last LSB page is overwritten. When the overwrite is performed, the last LSB page write may be performed on the next page or the blank page of the second memory.

FTL 부(31)는 해당 블록 어드레스가 없을 경우에는 빈 블록을 찾아 데이터 쓰기를 수행한다. 그리고 FTL 부(31)는 빈 블록의 어드레스 정보를 블록 테이블에 업데이트한다.If there is no corresponding block address, the FTL unit 31 searches for an empty block and performs data writing. The FTL unit 31 updates the address information of the empty block in the block table.

한편, FTL 부(31)는 블록 어드레스에 상응하는 제2 메모리에 이미 데이터가 저장된 경우 로그 블록 테이블의 빈 블록이 있는지 검사하여 빈 로그 블록에 파일을 쓰도록 한다. 이때, 파일의 마지막 페이지가 LSB이면, 마지막 LSB 페이지의 중복 쓰기를 수행하고 로그 테이블을 업데이트 한다.Meanwhile, when data is already stored in the second memory corresponding to the block address, the FTL unit 31 checks whether there is an empty block of the log block table and writes a file to the empty log block. At this time, if the last page of the file is LSB, the last LSB page is overwritten and the log table is updated.

FTL 부(31)는 로그 블록 테이블에 빈 로그 블록이 없을 경우에 빈 로그 블록을 다시 검사하고, 새로운 블록을 할당하여 로그 블록을 표시하고 빈 로그 블록에 파일 쓰기를 수행한다. 이때, 빈 블록이 없을 경우 로그 블록에서 1개의 희생블록을 선정하고 희생 블록에 데이터 쓰기를 수행한 후 기존 블록을 소거할 수 있다.If there is no empty log block in the log block table, the FTL unit 31 checks the empty log block again, allocates a new block to display the log block, and writes a file to the empty log block. In this case, when there is no empty block, one victim block may be selected from the log block, the data may be written to the victim block, and the existing block may be erased.

상기의 실시 예에 따른 파일저장 제어장치는 ASIC(Application Specific Integrated Circuit) 또는 FPGA(Field Programmable Gate Array) 등으로 구현될 수 있다.
The file storage control apparatus according to the above embodiment may be implemented as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

도 3은 제2 메모리의 구성을 개략적으로 도시한 도면이다.3 is a diagram schematically illustrating a configuration of a second memory.

도 3은 본 발명의 일 실시 예에 따른 제2 메모리를 개략적으로 도시한 것으로, MLC NAND 플래시 메모리를 예를 들어 도시한 도면이다.3 schematically illustrates a second memory according to an embodiment of the present invention, and illustrates an MLC NAND flash memory as an example.

도 3을 참조하면, 제2 메모리(40)는 다수의 블록(41, 42)을 포함할 수 있다. 그리고 각각의 블록은 2개의 페이지(51, 52)로 구분될 수 있다. Referring to FIG. 3, the second memory 40 may include a plurality of blocks 41 and 42. Each block may be divided into two pages 51 and 52.

제2 메모리(40)는 파일 쓰기 시에는 페이지 단위로 수행되며, 삭제 시에는 블록 단위로 수행된다. 예를 들면, 제1 페이지(51)에는 LSB 페이지가 저장되며, 제2 페이지(52)에는 MSB 페이지가 저장될 수 있다.
The second memory 40 is performed in units of pages when writing a file and in units of blocks when deleting. For example, the LSB page may be stored in the first page 51 and the MSB page may be stored in the second page 52.

도 4는 도 3의 제2 메모리에 파일이 저장되는 일 실시 예를 도시한 도면이다.FIG. 4 is a diagram illustrating an embodiment in which a file is stored in a second memory of FIG. 3.

도 4를 참조하면, 제2 메모리(40)는 복수의 블록(41)으로 구성될 수 있다. 이때, 각 블록(41)은 2개의 페이지(51, 52)로 구분될 수 있다. 도 1을 참조하여 설명한 바와 같이, 제2 메모리(40)는 페이지 단위로 쓰기가 수행되며, 블록 단위로 소거가 되는 플래시 메모리이다. Referring to FIG. 4, the second memory 40 may be composed of a plurality of blocks 41. In this case, each block 41 may be divided into two pages 51 and 52. As described with reference to FIG. 1, the second memory 40 is a flash memory in which writing is performed in units of pages and erased in units of blocks.

제2 메모리(40)에는 저장되는 파일이 LSB 페이지(61)와 MSB 페이지(62)가 나뉘어 저장된다. In the second memory 40, a file to be stored is divided into an LSB page 61 and an MSB page 62.

제1 페이지에는 LSB 페이지(61)가 저장되며, 제2 페이지에는 MSB 페이지(62)가 저장될 수 있다. 이때, 저장되는 파일의 마지막 페이지가 LSB 페이지(63) 일 경우에는 도 4에 도시된 바와 같이, 마지막 LSB 페이지(63)는 동일한 블록(42)의 제2 페이지에 중복되어 저장될 수 있다.The LSB page 61 may be stored in the first page, and the MSB page 62 may be stored in the second page. In this case, when the last page of the file to be stored is the LSB page 63, as shown in FIG. 4, the last LSB page 63 may be duplicated and stored in the second page of the same block 42.

또한, 도 5에 도시된 바와 같이, 저장되는 파일의 마지막 페이지가 LSB 페이지 일 경우 마지막 LSB 페이지(63)가 저장된 블록의 제2 페이지는 비워지고, 다음 파일이 저장될 경우 다음 블록의 제1 페이지부터 저장될 수 있다.
In addition, as shown in FIG. 5, when the last page of the file to be stored is an LSB page, the second page of the block in which the last LSB page 63 is stored is empty, and the first page of the next block when the next file is stored. Can be stored.

도 6은 본 발명의 일 실시 예에 따른 파일 저장 방법을 도시한 플로우이다. 도 6의 설명에서는 도 1 내지 도 5를 더 참조하여 설명하기로 한다.6 is a flowchart illustrating a file storing method according to an embodiment of the present invention. In the description of FIG. 6, it will be described with reference to FIGS. 1 to 5.

도 6을 참조하면, 본 발명의 일 실시 예에 따른 메모리에 데이터를 저장하는 방법은 파일 쓰기 요청을 수신하는 단계(S100), 물리적 블록 어드레스 검사 단계(S110), 해당 페이지의 데이터 유무 검사 단계(S120), 파일 쓰기 단계(S130), 마지막 페이지 LSB 판단 단계(S140) 및 마지막 LSB 페이지 중복 쓰기 단계(S150)를 포함할 수 있다.Referring to FIG. 6, a method of storing data in a memory according to an embodiment of the present disclosure may include receiving a file write request (S100), checking a physical block address (S110), and checking whether a data exists in a corresponding page ( S120), a file writing step (S130), a last page LSB determination step (S140), and a last LSB page duplication writing step (S150).

구체적으로, 파일 쓰기 요청을 수신하는 단계(S100)는 호스트 프로세서(10)로부터 파일 쓰기 요청을 수신한다. In detail, in operation S100, a file write request is received from the host processor 10.

물리적 블록 어드레스 검사 단계(S110)는 파일 쓰기 요청 정보에 포함된 논리적 페이지 정보를 이용하여 논리적 블록 어드레스를 계산하고, 계산된 논리적 블록 어드레스를 이용하여 로그 블록 테이블로부터 물리적 블록 어드레스를 검사한다. In the physical block address checking step (S110), a logical block address is calculated using logical page information included in the file write request information, and a physical block address is checked from a log block table using the calculated logical block address.

해당 페이지의 데이터 유무 검사 단계(S120)는 상기의 물리적 블록 어드레스가 있을 경우 물리적 블록의 데이터 저장 상태를 검사한다. 이때, 제2 메모리(40)는 LSB 페이지가 저장될 제1 페이지와 MSB 페이지가 저장될 제2 페이지로 구분될 수 있다. 이때, NAND 드라이버(33) 또는 FTL 부(31)는 제2 메모리(40)에 접근하여 해당 파일이 저장될 블록에 저장된 데이터가 있는지 검사한다. 여기서, NAND 드라이버(33) 또는 FTL 부(31)는 제1 페이지에 저장된 데이터 또는 제2 페이지에 저장된 데이터의 유무를 검사한다.The data presence check step (S120) of the corresponding page checks the data storage state of the physical block if the physical block address exists. In this case, the second memory 40 may be divided into a first page in which the LSB page is to be stored and a second page in which the MSB page is to be stored. At this time, the NAND driver 33 or the FTL unit 31 accesses the second memory 40 and checks whether there is data stored in the block in which the corresponding file is to be stored. Here, the NAND driver 33 or the FTL unit 31 checks the presence or absence of data stored in the first page or data stored in the second page.

파일 쓰기 단계(S130)는 해당 블록의 제1 페이지 또는 제2 페이지에 저장된 데이터가 없을 경우에 파일 쓰기를 수행한다.In the file writing step S130, when there is no data stored in the first page or the second page of the block, file writing is performed.

마지막 페이지 LSB 판단 단계(S140)는 각 블록에 파일 쓰기를 수행하고 해당 파일의 마지막 페이지가 LSB 페이지 인지 MSB 페이지 인지 판단한다.The last page LSB determination step (S140) writes a file to each block and determines whether the last page of the file is an LSB page or an MSB page.

마지막 LSB 페이지 중복 쓰기 단계(S150)는 상기의 마지막 페이지 판단 단계(S140)에서 마지막 페이지가 LSB 페이지인 경우 마지막 LSB 페이지를 동일한 블록에 중복 쓰기 한다.In the last LSB page overwriting step (S150), when the last page is an LSB page in the last page determination step (S140), the last LSB page is overwritten in the same block.

이때, 마지막 LSB 페이지는 해당 블록의 제1 페이지에 저장된 후 제2 페이지에 동일한 마지막 LSB 페이지가 중복되어 저장될 수 있다.In this case, the last LSB page may be stored in the first page of the corresponding block, and the same last LSB page may be duplicated and stored in the second page.

한편, 상기 마지막 LSB 페이지 중복 쓰기 단계(S150)에서, 중복 쓰기가 수행되지 않고, 마지막 LSB 페이지가 저장된 블록의 제2 페이지가 데이터 쓰기를 하지 않고 비우는 것이 수행될 수 있다.Meanwhile, in the last LSB page redundancy write operation (S150), the redundancy write is not performed, and the second page of the block in which the last LSB page is stored may be emptied without writing data.

즉, 제1 페이지에 마지막 LSB 페이지의 쓰기가 수행된 이후 동일 블록의 제2 페이지는 비워지며, 추후 다른 데이터 쓰기가 수행되지 않을 수 있다.That is, after the writing of the last LSB page is performed on the first page, the second page of the same block may be empty, and other data writing may not be performed later.

도 5에 도시된 바와 같이, 마지막 LSB 페이지가 쓰여진 블록의 제2 페이지는 아무런 데이터도 저장되지 않도록 할 수 있다.As shown in FIG. 5, the second page of the block in which the last LSB page is written may cause no data to be stored.

그리고 다음 파일은 다음 블록의 제1 페이지에서부터 저장하도록 한다.The next file is stored from the first page of the next block.

한편, 물리적 블록 어드레스 검사 단계(S110)에서 해당 물리 블록이 없을 경우 빈 블록을 배정할 수 있다.(S160) 여기서, 빈 블록을 배정한 이후에 로그 블록 테이블을 갱신하여 로그 블록 테이블에 블록 정보를 업데이트 할 수 있다.(S170)On the other hand, if there is no corresponding physical block in the physical block address check step (S110), an empty block may be allocated (S160). After allocating the empty block, the log block table is updated to update the block information in the log block table. (S170)

다음으로, 파일 쓰기 단계(S130), 마지막 페이지 LSB 판단 단계(S140) 및 마지막 LSB 페이지 중복 쓰기 단계(S150)를 수행할 수 있다.
Next, a file writing step (S130), a last page LSB determination step (S140), and a last LSB page duplicate writing step (S150) may be performed.

본 발명의 제1 실시 예에 따르면, 상기 해당 페이지의 데이터 유무 검사 단계(S120)에서 해당 페이지가 비어있지 않은 경우 덮어 쓰기를 수행할 수 있다.According to the first embodiment of the present invention, if the corresponding page is not empty in the data existence check step (S120) of the corresponding page, overwriting may be performed.

덮어 쓰기는 로그 블록 테이블에 로그 블록 유무를 검사하는 단계(S200), 빈 로그 블록에 파일 쓰기 단계(S210), 마지막 페이지 LSB 판단 단계(S220), 마지막 페이지 중복 쓰기 단계(S230), 로그 매핑 테이블 갱신 단계(S240) 및 기존 블록 소거 단계(S250)를 포함할 수 있다. 또한, 로그 블록 테이블에 로그 블로 유무 검사시 로그 블록이 없을 경우 빈 로그 블록 유무를 검사하는 단계(S260), 새로운 블록 할당 단계(S270) 및 로그 블록에서 희생 블록 선정 단계(S280)를 더 포함할 수 있다. The overwriting is a step of checking whether a log block exists in the log block table (S200), a file writing step into an empty log block (S210), a last page LSB determination step (S220), a last page duplicate writing step (S230), and a log mapping table It may include an update step (S240) and the existing block erase step (S250). In addition, if there is no log block in the log block table, the log block table checks whether there is an empty log block (S260), a new block allocation step (S270) and the victim block selection step (S280) in the log block further includes Can be.

구체적으로, 로그 블록 테이블에 로그 블록 유무를 검사하는 단계(S200)는 로그 블록 테이블에 이전에 저장된 파일의 유무를 검사한다. 로그 블록 테이블에 로그 블록이 있을 경우, 빈 로그 블록에 파일 쓰기를 수행한다(S210). 이어서 해당 파일의 마지막 페이지가 LSB 인지 판단한다(S220). 이때, 해당 파일의 마지막 페이지가 LSB일 경우에 마지막 페이지를 중복 쓰기를 수행한다. 중복 쓰기는 제2 메모리 해당 블록의 제2 페이지에 수행될 수 있다.In detail, in operation S200, the presence of a log block in the log block table is checked in the presence of a file previously stored in the log block table. If a log block exists in the log block table, a file write is performed on an empty log block (S210). Subsequently, it is determined whether the last page of the file is LSB (S220). At this time, if the last page of the file is LSB, the last page is overwritten. Duplicate writing may be performed on the second page of the corresponding block of the second memory.

다음으로 로그 매핑 테이블을 갱신하고(S240), 기존 블록을 소거한다(S250).Next, the log mapping table is updated (S240) and the existing block is erased (S250).

한편, 로그블록 테이블에 로그 블록이 없을 경우, 빈 로그 블록의 유무를 검사한다(S60). 빈 로그 블록이 있을 경우 새로운 블록을 할당하고(S270), 로그 블록을 표시한 후, 파일 쓰기, 마지막 페이지 LSB판단 및 마지막 페이지 중복쓰기 단계를 수행한다.On the other hand, if there is no log block in the log block table, it is checked whether there is an empty log block (S60). If there is an empty log block, a new block is allocated (S270), the log block is displayed, the file writing, the last page LSB determination, and the last page overwriting are performed.

그러나, 빈 로그 블록이 없을 경우, 로그 블록에서 1개의 희생 블록을 선정한다(S290). 선정된 희생 블록에 파일 쓰기를 수행한다.(S210) 이후, 상술한 마지막 페이지 LSB 판단 단계(S220), 마지막 페이지 중복 쓰기 단계(S230), 로그 매핑 테이블 갱신 단계(S240) 및 기존 블록을 소거하는 단계(S250)를 순차적으로 수행한다.However, if there is no empty log block, one victim block is selected from the log block (S290). A file write is performed on the selected victim block (S210). After that, the above-described last page LSB determination step (S220), the last page duplicate writing step (S230), the log mapping table updating step (S240), and the existing block are erased. Step S250 is performed sequentially.

상기에서 설명한 바와 같이, 본 발명의 일 실시 예에 따르면, 제2 메모리에 저장되는 파일의 마지막 페이지가 LSB 페이지일 경우에 동일한 블록에 마지막 LSB 페이지를 저장하거나 동일한 블록의 제2 페이지를 비움으로써, SPOR 이 발생하여도 기 저장된 파일이 손상되지 않는다.
As described above, according to an embodiment of the present invention, when the last page of the file stored in the second memory is an LSB page, by storing the last LSB page in the same block or emptying the second page of the same block, Even if a SPOR occurs, the pre-stored file is not damaged.

도 7은 본 발명의 제2 실시 예에 따른 데이터를 메모리에 저장하는 장치를 구비한 단말기를 도시한 블록도이다. 도 8은 도 7에 도시된 제2 메모리의 제1 저장영역과 제2 저장영역에 데이터가 저장되는 것을 예를 들어 도시한 도면이다.7 is a block diagram illustrating a terminal having an apparatus for storing data in a memory according to a second embodiment of the present invention. FIG. 8 illustrates an example in which data is stored in a first storage area and a second storage area of the second memory shown in FIG. 7.

도 7은 도 1과 대비하여 제2 저장 영역을 추가로 구비한 것을 제외하고는 동일하므로 동일한 구성요소에 대한 중복된 설명은 생략하기로 한다. 여기서, 제2 메모리와 제2 저장 영역은 동일한 메모리이고, 저장 영역이 구분될 수도 있다.Since FIG. 7 is identical to FIG. 1 except that the second storage area is additionally provided, duplicate description of the same elements will be omitted. Here, the second memory and the second storage area are the same memory, and the storage area may be divided.

도 7 및 도 8을 참조하면, 본 발명의 제2 실시 에에 따른 단말기는 호스트 프로세서(10), 제1 메모리(20), 파일저장 제어장치(30) 및 제1 저장 영역(80)과 제2 저장 영역(90)이 구분된 제2 메모리(40)를 포함할 수 있다. 제2 메모리(40)는 멀티레벨 셀 낸드 플래시 메모리(Multi-Level Cell NAND Flash Memory)를 예를 들어 설명하기로 한다. 7 and 8, a terminal according to a second embodiment of the present invention includes a host processor 10, a first memory 20, a file storage control device 30, a first storage area 80, and a second. The storage area 90 may include a divided second memory 40. The second memory 40 will be described using, for example, a multi-level cell NAND flash memory.

호스트 프로세서(10)는 송수신 통신 신호 처리, 신호 압축 처리, 에러 정정 및 통신 시스템 제어 등의 기능을 수행할 수 있다. 또한, 호스트 프로세서(10)는 멀티미디어 기능을 수행할 수 있다.The host processor 10 may perform functions such as transmission and reception communication signal processing, signal compression processing, error correction, and communication system control. In addition, the host processor 10 may perform a multimedia function.

예를 들면, 호스트 프로세서(10)는 사용자와의 인터페이스를 통해 어플리케이션을 수행하여 멀티미디어 프로세스를 수행할 수 있다.For example, the host processor 10 may perform an multimedia process by performing an application through an interface with a user.

호스트 프로세서(10)는 제1 메모리(20)에 파일의 쓰기, 읽기, 지우기 등의 기능을 수행할 수 있다. 이를 위하여, 호스트 프로세서(10)는 파일 시스템을 포함할 수 있다. 파일 시스템은 제1 메모리(20)에 파일 쓰기, 읽기 등의 기능을 수행할 수 있다. The host processor 10 may perform a function such as writing, reading, or erasing a file in the first memory 20. To this end, the host processor 10 may include a file system. The file system may perform a function such as writing or reading a file in the first memory 20.

제1 메모리(20)는 부팅용 프로그램 및 데이터 등을 저장할 수 있다. 제1 메모리(20)는 프로세서 영역(21), 버퍼 영역(22) 및 드라이버 영역(23)으로 구분될 수 있다.The first memory 20 may store a booting program, data, and the like. The first memory 20 may be divided into a processor region 21, a buffer region 22, and a driver region 23.

프로세서 영역(21)은 호스트 프로세서(10) 또는 외부 장치로부터 입력된 파일 데이터, 프로그램 등을 저장할 수 있다.The processor region 21 may store file data, a program, and the like input from the host processor 10 or an external device.

버퍼 영역(22)은 제2 메모리(40)에 저장될 데이터가 임시로 저장될 수 있다. 버퍼 영역(22)은 호스트 프로세서(10)와 파일저장 제어장치(30)의 사이에서 접속이 가능한 메모리 영역일 수 있다. 버퍼 영역(22)은 명령어가 저장될 영역과 데이터가 저장될 영역으로 구분될 수 있다. In the buffer area 22, data to be stored in the second memory 40 may be temporarily stored. The buffer area 22 may be a memory area accessible between the host processor 10 and the file storage control device 30. The buffer area 22 may be divided into an area in which an instruction is to be stored and an area in which data is to be stored.

드라이버 영역(23)은 파일저장 제어장치(30) 파일저장 제어장치(30)에서 수행되는 프로그램이 저장될 수 있다.The driver area 23 may store a program performed by the file storage control device 30 and the file storage control device 30.

제2 메모리(40)는 부팅 프로그램, 데이터 등을 저장할 수 있다. 제2 메모리(40)는 페이지 단위로 데이터를 저장하며, 블록 단위로 데이터가 소거가 되는 NAND 플래시 메모리일 수 있다. 예를 들면, 제2 메모리(40)는 도 3에 도시된 바와 같이 하나의 블록(41)에 제1 페이지(51) 및 제2 페이지(52)로 데이터를 나눠 저장할 수 있다. 이때, 제1 페이지(51)에는 LSB 페이지가 저장되고, 제2 페이지에는 MSB 페이지가 저장될 수 있다.The second memory 40 may store a boot program, data, and the like. The second memory 40 may be a NAND flash memory in which data is stored in units of pages and data is erased in units of blocks. For example, as illustrated in FIG. 3, the second memory 40 may divide and store data into the first page 51 and the second page 52 in one block 41. In this case, the LSB page may be stored in the first page 51 and the MSB page may be stored in the second page.

도 8에 도시된 바와 같이, 제2 메모리(40)는 제1 저장 영역(80)과 제2 저장 영역(90)으로 구분될 수 있다. 제1 저장 영역(80)은 해당 파일의 LSB 페이지 및 MSB 페이지가 저장될 수 있다.As illustrated in FIG. 8, the second memory 40 may be divided into a first storage area 80 and a second storage area 90. The LSB page and the MSB page of the file may be stored in the first storage area 80.

제2 저장 영역(90)은 저장되는 파일의 마지막 페이지가 LSB일 경우에 마지막 LSB 데이터를 저장할 수 있다.The second storage area 90 may store the last LSB data when the last page of the stored file is the LSB.

본 발명의 제2 실시 예에서는 제2 메모리(40)가 제1 저장 영역(80)과 제2 저장 영역(90)으로 구분된 것을 도시하고 있으나, 이에 한정되지 않고, 마지막 페이지가 LSB일 경우에 마지막 LSB 페이지를 저장하는 별도의 메모리를 구비할 수도 있다.According to the second embodiment of the present invention, the second memory 40 is divided into the first storage area 80 and the second storage area 90. However, the present invention is not limited thereto, and the last page is the LSB. It may have a separate memory for storing the last LSB page.

파일저장 제어장치(30)는 제2 메모리(40)에 접근하여 버퍼 영역(22)에 임시로 저장된 데이터를 저장하는 기능을 수행할 수 있다.The file storage control device 30 may access the second memory 40 and store a data temporarily stored in the buffer area 22.

파일저장 제어장치(30)는 버퍼 영역(22)으로부터 입력된 데이터의 논리적 어드레스를 물리적 어드레스로 변환하여 제2 메모리(40)의 물리적 어드레스에 해당 파일을 저장하도록 할 수 있다. 파일저장 제어장치(30)는 저장하려는 해당 파일의 마지막 페이지가 LSB 페이지일 경우, 제2 메모리(40)의 제2 저장 영역(90)에 마지막 LSB 페이지를 중복하여 저장하도록 제어할 수 있다.The file storage control device 30 may convert the logical address of the data input from the buffer area 22 into a physical address to store the file at the physical address of the second memory 40. When the last page of the corresponding file to be stored is the LSB page, the file storage control device 30 may control to duplicate the last LSB page in the second storage area 90 of the second memory 40.

한편, 파일저장 제어장치(30)는 제2 메모리(40)에 해당 물리적 어드레스가 다른 데이터가 저장된 경우에는 다른 비어있는 저장 블록에 해당 파일의 쓰기를 수행하도록 할 수 있다.
On the other hand, the file storage control device 30 may write the file to another empty storage block when the data having a different physical address is stored in the second memory 40.

도 9는 본 발명의 제2 실시 예에 따른 파일 저장 방법을 순차적으로 도시한 흐름도이다.9 is a flowchart sequentially illustrating a file storage method according to a second embodiment of the present invention.

본 발명의 제 2 실시 예에 따른 파일 저장 방법은 파일 쓰기 요청 수신단계(S100), 물리적 블록 어드레스 검사 단계(S110), 제2 메모리의 제1 저장 영역에 해당 블록에 파일 쓰기 단계(S300), 마지막 페이지 LSB 판단 단계(S310) 및 제2 메모리의 제2 저장 영역에 마지막 페이지 중복 쓰기 단계(S320)를 포함할 수 있다.According to an embodiment of the present invention, a file storing method may include receiving a file write request (S100), checking a physical block address (S110), writing a file to a corresponding block in a first storage area of a second memory (S300), The final page LSB determination step S310 and the last page duplicate writing step S320 may be included in the second storage area of the second memory.

구체적으로, 파일 쓰기 요청을 수신하는 단계(S100)는 호스트 프로세서(10)로부터 파일 쓰기 요청을 수신한다. 이때, 버퍼 영역에 저장될 파일이 임시 저장되며, 제1 MLA 드라이버(13)와 제2 MLA 드라이버(32)간 인터페이스를 통해 파일 쓰기 요청을 수신할 수 있다.In detail, in operation S100, a file write request is received from the host processor 10. In this case, a file to be stored in the buffer area is temporarily stored, and a file write request may be received through an interface between the first MLA driver 13 and the second MLA driver 32.

물리적 블록 어드레스 검사 단계(S110)는 파일 쓰기 요청 정보에 포함된 논리적 페이지 정보를 이용하여 논리적 블록 어드레스를 계산하고, 계산된 논리적 블록 어드레스를 이용하여 로그 블록 테이블로부터 물리적 블록 어드레스를 검사한다.In the physical block address checking step (S110), a logical block address is calculated using logical page information included in the file write request information, and a physical block address is checked from a log block table using the calculated logical block address.

제1 저장 영역에 파일 쓰기 단계(S300)는 해당 블록의 제1 페이지 또는 제2 페이지에 저장된 데이터가 없을 경우에 파일 쓰기를 수행한다.The file writing step S300 in the first storage area performs file writing when there is no data stored in the first page or the second page of the block.

마지막 페이지 LSB 판단 단계(S310)는 각 블록에 파일 쓰기를 수행하고 해당 파일의 마지막 페이지가 LSB 페이지 인지 MSB 페이지 인지 판단한다.In the final page LSB determination step S310, a file is written to each block, and it is determined whether the last page of the file is an LSB page or an MSB page.

제2 저장 영역에 마지막 LSB 페이지 중복 쓰기 단계(S320)는 상기의 마지막 페이지 LSB 판단 단계(S310)에서 마지막 페이지가 LSB 페이지인 경우 마지막 LSB 페이지를 제2 저장 영역(90)에 중복 쓰기를 수행한다.In the step S320 of overwriting the last LSB page in the second storage area, when the last page is the LSB page in the last page LSB determination step S310, the last LSB page is overwritten in the second storage area 90. .

여기서, 해당 페이지의 데이터 유무 검사 단계를 더 포함할 수 있다. 해당 페이지의 데이터 유무 검사 단계(S120)는 물리적 블록 어드레스 검사 단계(S110)에서 물리적 블록 어드레스가 있을 경우 물리적 블록의 데이터 저장 상태를 검사한다. 이때, 제2 메모리(40)는 LSB 페이지가 저장될 제1 페이지와 MSB 페이지가 저장될 제2 페이지로 구분될 수 있다. 이때, NAND 드라이버(33) 또는 FTL 부(31)는 제2 메모리(40)에 접근하여 해당 파일이 저장될 블록에 저장된 데이터가 있는지 검사한다. 여기서, NAND 드라이버(33) 또는 FTL 부(31)는 제1 페이지에 저장된 데이터 또는 제2 페이지에 저장된 데이터의 유무를 검사한다.Here, the method may further include a step of checking whether data of the corresponding page exists. The data presence check step (S120) of the corresponding page checks the data storage state of the physical block if there is a physical block address in the physical block address check step (S110). In this case, the second memory 40 may be divided into a first page in which the LSB page is to be stored and a second page in which the MSB page is to be stored. At this time, the NAND driver 33 or the FTL unit 31 accesses the second memory 40 and checks whether there is data stored in the block in which the corresponding file is to be stored. Here, the NAND driver 33 or the FTL unit 31 checks the presence or absence of data stored in the first page or data stored in the second page.

한편, 상기 해당 페이지의 데이터 유무 검사 단계에서 해당 페이지가 비어있지 않은 경우 덮어 쓰기를 수행할 수 있다. 덮어 쓰기 수행 단계는 도 6에 설명한 덮어쓰기 단계와 동일하므로 중복된 설명은 생략하기로 한다.On the other hand, if the page is not empty in the data existence check step of the page can be overwritten. Since the overwriting step is the same as the overwriting step described with reference to FIG. 6, duplicate description thereof will be omitted.

상기와 같이 본 발명의 일 실시 예에 따르면, 제2 메모리의 제2 영역에 마지막 LSB 페이지를 중복쓰기를 수행하여 SPOR 시 블록이 소거되는 것을 방지할 수 있다.
As described above, according to an embodiment of the present disclosure, the block may be prevented from being erased during the SPOR by overwriting the last LSB page in the second area of the second memory.

상기에서는 본 발명의 실시예들을 참조하여 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
Although the above has been described with reference to embodiments of the present invention, those skilled in the art may variously modify the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. And can be changed.

10: 호스트 프로세서
11: 어플리케이션
12: 파일 시스템
13: 제1 MLA 드라이버
20: 제1 메모리
21: 프로세서 영역
22: 버퍼 영역
23: 드라이버 영역
30: 파일저장 제어장치
31: FTL 부
32: 제2 MLA 드라이버
33: NAND 드라이버
40: 제2 메모리
41: 블록
51: 제1 페이지 영역
52: 제2 페이지 영역
80: 제1 저장 영역
90: 제2 저장 영역
10: host processor
11: Application
12: file system
13: first MLA driver
20: first memory
21: Processor area
22: buffer area
23: Driver Area
30: file storage controller
31: FTL section
32: second MLA driver
33: NAND driver
40: second memory
41: block
51: first page area
52: second page area
80: first storage area
90: second storage area

Claims (19)

메모리의 파일 저장을 제어하는 파일저장 제어장치에 있어서,
파일 쓰기 요청 시 해당 파일이 임시 저장된 제1 메모리의 버퍼 영역에 접근하는 MLA(Memory Linked Architecture; 이하, "MLA" 라 함) 드라이버;
상기 해당 파일이 저장될 제2 메모리에 접근하는 메모리 드라이버; 및
상기 해당 파일의 마지막 페이지가 LSB(Least Significant Bit; 이하, "LSB"라 함) 페이지 또는 MSB(Most Significant Bit; 이하, "MSB"라 함) 페이지인지 판단하여 LSB인 경우, 상기 마지막 페이지가 저장될 블록의 제1 페이지에 상기 해당 파일의 마지막 페이지인 상기 마지막 LSB 페이지의 쓰기 연산을 수행하고,
상기 마지막 페이지가 저장되는 블록의 제2 페이지에 상기 해당 파일의 마지막 LSB 페이지를 중복 쓰기 또는 상기 제2 페이지를 비우기를 수행하도록 제어하는 FTL(Flash Translation Layer; 이하, "FTL" 이라함) 부를 포함하는 파일저장 제어장치.
In the file storage control device for controlling the file storage of the memory,
A Memory Linked Architecture (MLA) driver accessing a buffer area of the first memory in which the file is temporarily stored when a file write request is requested;
A memory driver accessing a second memory in which the corresponding file is to be stored; And
If the last page of the file is LSB (Least Significant Bit (LSB)) page or MSB (Most Significant Bit (hereinafter, referred to as "MSB") page, the page is LSB, the last page is stored Perform a write operation on the last LSB page, which is the last page of the file, to the first page of the block to be
And a FTL (Flash Translation Layer) section controlling controlling a second write of the last LSB page of the corresponding file or an empty of the second page to a second page of the block in which the last page is stored. File storage controller.
제 1 항에 있어서,
상기 FTL 부는
상기 해당 파일의 마지막 페이지가 MSB 페이지인 경우, 상기 LSB 페이지가 저장된 블록의 제2 페이지에 파일 쓰기를 수행하는 것을 특징으로 하는 파일저장 제어장치.
The method of claim 1,
The FTL part is
And writing a file to a second page of a block in which the LSB page is stored, when the last page of the corresponding file is an MSB page.
제 1 항에 있어서,
상기 FTL 부는
상기 파일 쓰기 요청 시 수신된 파일 정보에 포함된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스를 검사하고,
상기 물리적 블록 어드레스에 상응하는 페이지에 저장된 데이터 유무를 검사하여 상기 블록 페이지에 저장된 데이터가 없을 경우 상기 마지막 LSB 페이지를 저장하는 것을 특징으로 하는 파일저장 제어장치.
The method of claim 1,
The FTL part is
Examine a physical block address corresponding to a logical block address included in the file information received in the file write request,
And checking the presence or absence of data stored in the page corresponding to the physical block address and storing the last LSB page when there is no data stored in the block page.
제 3 항에 있어서,
상기 논리적 블록 어드레스와 상기 물리적 블록 어드레스가 매핑된 로그블록 테이블을 더 포함하는 파일저장 제어장치.
The method of claim 3, wherein
And a log block table in which the logical block address and the physical block address are mapped.
제 3 항에 있어서,
상기 FTL 부는
상기 파일이 저장될 블록에 저장된 데이터가 있을 경우, 덮어쓰기를 수행하는 것을 특징으로 하는 파일저장 제어장치.
The method of claim 3, wherein
The FTL part is
And, if there is data stored in the block in which the file is to be stored, overwriting is performed.
제 5 항에 있어서,
상기 덮어쓰기 수행은
임시 블록 유무를 검사하여, 임시 블록이 있을 경우 빈 블록에 상기 파일을 쓰기 수행을 하고, 마지막 페이지가 LSB 페이지 인지 판단하여, LSB 페이지 인 경우 중복쓰기를 수행한 후, 로그 블록 테이블을 갱신하는 것을 특징으로 하는 파일저장 제어장치.
The method of claim 5, wherein
The overwrite operation is
If there is a temporary block, the file is written to an empty block, if there is a temporary block, it is determined whether the last page is an LSB page, and if it is an LSB page, an overwrite is performed, and then the log block table is updated. File storage control device characterized in that.
제 6 항에 있어서,
상기 임시 블록이 없을 경우, 새로운 블록을 할당하거나, 희생블록을 할당하여 해당 블록에 상기 파일의 파일 쓰기를 수행하는 것을 특징으로 하는 파일저장 제어장치.
The method according to claim 6,
If the temporary block does not exist, a file storage control apparatus for allocating a new block or assigning a victim block to write a file of the file to the block.
제 1 항에 있어서,
상기 FTL 부는
상기 파일 요청 시 수신된 파일 정보에 포함된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스가 없을 경우, 상기 제2 메모리의 빈 블록을 배정하고, 상기 빈 블록에 상응하는 물리 블록 어드레스 정보가 포함되도록 로그 블록 테이블 정보를 갱신하는 것을 특징으로 하는 파일저장 제어장치.
The method of claim 1,
The FTL part is
If there is no physical block address corresponding to the logical block address included in the file information received at the file request, the second block allocates a free block of the second memory, and includes a log block to include physical block address information corresponding to the free block. File storage control device, characterized in that for updating the table information.
메모리의 파일 저장을 제어하는 파일저장 제어장치에 있어서,
파일 쓰기 요청 시 해당 파일이 임시 저장된 제1 메모리의 버퍼 영역에 접근하는 MLA 드라이버;
상기 해당 파일이 저장될 제2 메모리에 접근하는 메모리 드라이버; 및
상기 해당 파일을 상기 제2 메모리의 제1 저장 영역에 저장하며, 상기 해당 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하여 상기 해당 파일의 마지막 페이지가 LSB 페이지인 경우, 상기 마지막 LSB 페이지를 상기 제2 메모리의 제2 저장 영역에 중복 쓰기를 수행하도록 제어하는 FTL부를 포함하는 파일저장 제어장치.
In the file storage control device for controlling the file storage of the memory,
An MLA driver accessing a buffer area of the first memory in which the file is temporarily stored when a file write request is requested;
A memory driver accessing a second memory in which the corresponding file is to be stored; And
The file is stored in a first storage area of the second memory, and if the last page of the file is an LSB page or an MSB page, the last page of the file is an LSB page. And a FTL unit for controlling to overwrite the second storage area of the second memory.
메모리의 파일 저장을 제어하는 파일 저장 제어 방법에 있어서,
(a) 파일 쓰기 요청을 수신하는 단계;
(b) 메모리에 저장될 파일의 물리적 블록 어드레스를 검사하는 단계;
(c) 상기 검사 결과, 상기 물리적 블록 어드레스가 있을 경우 상기 물리적 블록 어드레스에 상응하여 상기 메모리의 블록에 저장된 데이터의 유무를 판단하는 단계;
(d) 상기 판단 결과, 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 없을 경우, 파일 쓰기를 수행하는 단계; 및
(e) 상기 파일 쓰기가 수행되는 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하고, 마지막 페이지가 LSB 페이지인 경우 마지막 LSB 페이지를 중복 쓰기를 수행하거나, 상기 마지막 LSB 페이지가 저장된 블록의 나머지 영역의 비우기를 수행하는 단계를 포함하는 파일 저장 제어 방법.
In the file storage control method for controlling the file storage of the memory,
(a) receiving a file write request;
(b) checking the physical block address of the file to be stored in the memory;
(c) determining the presence or absence of data stored in a block of the memory corresponding to the physical block address if the physical block address exists as a result of the checking;
(d) performing file writing when there is no data stored in the block corresponding to the physical block address as a result of the determination; And
(e) It is determined whether the last page of the file on which the file write is performed is an LSB page or an MSB page, and if the last page is an LSB page, the second LSB page is overwritten or the remaining area of the block in which the last LSB page is stored. File storage control method comprising the step of performing the emptying of the.
제 10 항에 있어서,
상기 단계 (e)는
상기 플래시 메모리의 각 블록 별로 설정된 페이지 중, 제1 페이지에 상기 마지막 LSB 페이지가 저장된 후 제2 페이지에 상기 마지막 LSB 페이지가 저장되는 단계인 것을 특징으로 하는 파일 저장 제어 방법.
The method of claim 10,
Step (e) is
And storing the last LSB page in a second page after the last LSB page is stored in a first page among the pages set for each block of the flash memory.
제 10 항에 있어서,
상기 단계 (b)는
상기 파일 쓰기 요청 수신 단계에서 수신된 논리적 블록 어드레스에 상응하는 물리적 블록 어드레스로 변환하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 10,
Step (b) is
And converting to a physical block address corresponding to the logical block address received in the step of receiving the file write request.
제 10 항에 있어서,
상기 단계 (b) 이후에,
상기 물리적 블록 어드레스가 없을 경우, 상기 메모리에 빈 블록을 배정하고 블록 테이블을 갱신하는 단계; 및
상기 빈 블록에 상기 파일 쓰기를 수행하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 10,
After step (b),
If there is no physical block address, allocating an empty block to the memory and updating a block table; And
And writing the file to the empty block.
제 10 항에 있어서,
상기 단계 (d)에서 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 있을 경우, 덮어쓰기를 수행하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 10,
And performing overwriting when there is data stored in the block corresponding to the physical block address in the step (d).
제 14 항에 있어서,
상기 덮어쓰기를 수행하는 단계는
로그 블록 테이블에 로그 블록의 유무를 검사하는 단계; 및
상기 검사 결과, 상기 로그 블록이 있을 경우 빈 로그 블록에 파일 쓰기를 수행하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 14,
Performing the overwriting is
Checking the presence or absence of a log block in the log block table; And
And writing a file to an empty log block if the log block exists.
제 14 항에 있어서,
상기 덮어쓰기를 수행하는 단계는
로그 블록 테이블에 로그 블록의 유무를 검사하는 단계;
상기 로그 블록이 없을 경우, 빈 로그 블록의 유무를 검사하는 단계; 및
상기 빈 로그 블록이 있을 경우 상기 빈 로그 블록을 할당하고 상기 로그 블록 테이블을 갱신하는 단계; 및
상기 빈 로그 블록에 파일 쓰기를 수행하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 14,
Performing the overwriting is
Checking the presence or absence of a log block in the log block table;
If there is no log block, checking for the presence of an empty log block; And
Allocating the empty log block and updating the log block table if the empty log block exists; And
And performing a file write on the empty log block.
제 16 항에 있어서,
상기 빈 로그 블록이 없을 경우, 로그 블록에서 적어도 1개의 블록을 선정하는 단계; 및
상기 선정된 블록에 파일 쓰기를 수행하는 단계를 더 포함하는 파일 저장 제어 방법.
17. The method of claim 16,
Selecting at least one block from a log block if there is no empty log block; And
And writing a file to the selected block.
메모리의 파일 저장을 제어하는 파일 저장 제어 방법에 있어서,
(a) 파일 쓰기 요청을 수신하는 단계;
(b) 메모리에 저장될 파일의 물리적 블록 어드레스를 검사하는 단계;
(c) 상기 검사 결과, 상기 물리적 블록 어드레스가 있을 경우 상기 물리적 블록 어드레스에 상응하여 상기 메모리의 블록에 저장된 데이터의 유무를 판단하는 단계;
(d) 상기 판단 결과, 상기 물리적 블록 어드레스에 상응하는 블록에 저장된 데이터가 없을 경우, 상기 메모리의 제1 저장 영역에 파일 쓰기를 수행하는 단계; 및
(e) 상기 파일 쓰기가 수행되는 파일의 마지막 페이지가 LSB 페이지 또는 MSB 페이지인지 판단하고, LSB 페이지인 경우 마지막 LSB 페이지를 상기 메모리의 제2 저장 영역에 저장하는 단계를 포함하는 파일 저장 제어 방법.
In the file storage control method for controlling the file storage of the memory,
(a) receiving a file write request;
(b) checking the physical block address of the file to be stored in the memory;
(c) determining the presence or absence of data stored in a block of the memory corresponding to the physical block address if the physical block address exists as a result of the checking;
(d) writing a file to a first storage area of the memory when there is no data stored in a block corresponding to the physical block address as a result of the determination; And
(e) determining whether the last page of the file on which the file writing is performed is an LSB page or an MSB page, and if the LSB page is an LSB page, storing the last LSB page in a second storage area of the memory.
제 18 항에 있어서,
상기 단계(d)는
상기 제1 저장 영역의 제1 페이지에 상기 LSB 페이지를 저장하고, 제2 페이지에 상기 MSB 페이지를 저장하는 단계를 더 포함하는 파일 저장 제어 방법.
The method of claim 18,
Step (d) is
Storing the LSB page in a first page of the first storage area, and storing the MSB page in a second page.
KR1020100032948A 2010-04-09 2010-04-09 Control aparatus and method for storing file KR101041837B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100032948A KR101041837B1 (en) 2010-04-09 2010-04-09 Control aparatus and method for storing file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100032948A KR101041837B1 (en) 2010-04-09 2010-04-09 Control aparatus and method for storing file

Publications (1)

Publication Number Publication Date
KR101041837B1 true KR101041837B1 (en) 2011-06-17

Family

ID=44405631

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100032948A KR101041837B1 (en) 2010-04-09 2010-04-09 Control aparatus and method for storing file

Country Status (1)

Country Link
KR (1) KR101041837B1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9116793B2 (en) 2012-06-12 2015-08-25 International Business Machines Corporation Maintaining versions of data in solid state memory
US9122584B2 (en) 2012-06-12 2015-09-01 International Business Machines Corporation File system for maintaining data version in solid state memory
US9122581B2 (en) 2012-06-12 2015-09-01 International Business Machines Corporation Data versioning in solid state memory
US9135161B2 (en) 2012-06-12 2015-09-15 International Business Machines Corporation Flash translation layer system for maintaining data versions in solid state memory
CN107037984A (en) * 2013-12-27 2017-08-11 威盛电子股份有限公司 Data memory device and its method for writing data
US9747170B2 (en) 2013-03-15 2017-08-29 Samsung Electronics Co., Ltd. Non-volatile multi-level cell memory system and method of performing adaptive data back-up in the system
CN111949559A (en) * 2019-05-16 2020-11-17 北京兆易创新科技股份有限公司 Data writing method and device and storage equipment
CN113093997A (en) * 2021-04-19 2021-07-09 深圳市安信达存储技术有限公司 Method for separating data Based on Host-Based FTL (fiber to the Home) architecture
US11734168B2 (en) 2020-11-26 2023-08-22 SK Hynix Inc. Storage device and operating method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206833A (en) 2002-12-26 2004-07-22 Toshiba Corp Nonvolatile semiconductor memory
KR100755718B1 (en) 2006-09-04 2007-09-05 삼성전자주식회사 Apparatus and method for managing run-time bad block in mlc flash memory
KR20080030334A (en) * 2006-09-29 2008-04-04 삼성전자주식회사 Flash memory device for reducing programming time of multi level cell and programming method of the same
KR20100033855A (en) * 2008-09-22 2010-03-31 삼성전자주식회사 Lsb page recovering method for multi-level cell flash memory device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206833A (en) 2002-12-26 2004-07-22 Toshiba Corp Nonvolatile semiconductor memory
KR100755718B1 (en) 2006-09-04 2007-09-05 삼성전자주식회사 Apparatus and method for managing run-time bad block in mlc flash memory
KR20080030334A (en) * 2006-09-29 2008-04-04 삼성전자주식회사 Flash memory device for reducing programming time of multi level cell and programming method of the same
KR20100033855A (en) * 2008-09-22 2010-03-31 삼성전자주식회사 Lsb page recovering method for multi-level cell flash memory device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9460802B2 (en) 2012-06-12 2016-10-04 International Business Machines Corporation Maintaining versions of data in solid state memory
US9778873B2 (en) 2012-06-12 2017-10-03 International Business Machines Corporation Maintaining versions of data in solid state memory
US9116793B2 (en) 2012-06-12 2015-08-25 International Business Machines Corporation Maintaining versions of data in solid state memory
US9122581B2 (en) 2012-06-12 2015-09-01 International Business Machines Corporation Data versioning in solid state memory
US9135161B2 (en) 2012-06-12 2015-09-15 International Business Machines Corporation Flash translation layer system for maintaining data versions in solid state memory
US9135163B2 (en) 2012-06-12 2015-09-15 International Business Machines Corporation Maintaining versions of data in solid state memory
US9135162B2 (en) 2012-06-12 2015-09-15 International Business Machines Corporation Data versioning in solid state memory
US9229852B2 (en) 2012-06-12 2016-01-05 International Business Machines Corporation Flash translation layer system for maintaining data versions in solid state memory
US9122582B2 (en) 2012-06-12 2015-09-01 International Business Machines Corporation File system for maintaining data versions in solid state memory
US9575682B2 (en) 2012-06-12 2017-02-21 International Business Machines Corporation Maintaining versions of data in solid state memory
US9817581B2 (en) 2012-06-12 2017-11-14 International Business Machines Corporation Maintaining versions of data in solid state memory
US9582511B2 (en) 2012-06-12 2017-02-28 International Business Machines Corporation Maintaining versions of data in solid state memory
US9122584B2 (en) 2012-06-12 2015-09-01 International Business Machines Corporation File system for maintaining data version in solid state memory
US9747170B2 (en) 2013-03-15 2017-08-29 Samsung Electronics Co., Ltd. Non-volatile multi-level cell memory system and method of performing adaptive data back-up in the system
CN107037984A (en) * 2013-12-27 2017-08-11 威盛电子股份有限公司 Data memory device and its method for writing data
CN111949559A (en) * 2019-05-16 2020-11-17 北京兆易创新科技股份有限公司 Data writing method and device and storage equipment
CN111949559B (en) * 2019-05-16 2024-04-16 兆易创新科技集团股份有限公司 Data writing method and device and storage equipment
US11734168B2 (en) 2020-11-26 2023-08-22 SK Hynix Inc. Storage device and operating method thereof
CN113093997A (en) * 2021-04-19 2021-07-09 深圳市安信达存储技术有限公司 Method for separating data Based on Host-Based FTL (fiber to the Home) architecture

Similar Documents

Publication Publication Date Title
KR101041837B1 (en) Control aparatus and method for storing file
US20220129375A1 (en) Memory system, data storage device, user device and data management method thereof
US10997065B2 (en) Memory system and operating method thereof
US9520992B2 (en) Logical-to-physical address translation for a removable data storage device
US9753847B2 (en) Non-volatile semiconductor memory segregating sequential, random, and system data to reduce garbage collection for page based mapping
US8489854B1 (en) Non-volatile semiconductor memory storing an inverse map for rebuilding a translation table
US10120615B2 (en) Memory management method and storage controller using the same
KR101465789B1 (en) Write and merge methods in memory card systems for reducing the number of page copies
US10678476B2 (en) Memory system with host address translation capability and operating method thereof
JP2008192154A (en) Memory mapping method and memory mapping system
US20200233610A1 (en) Data storage device and method for accessing logical-to-physical mapping table thereof
CN109783008B (en) Data storage device and operation method thereof
KR20190044968A (en) Memory system and operating method thereof
US11210226B2 (en) Data storage device and method for first processing core to determine that second processing core has completed loading portion of logical-to-physical mapping table thereof
KR20200114212A (en) Data storage device and operating method thereof
CN113900582A (en) Data processing method and corresponding data storage device
KR102596964B1 (en) Data storage device capable of changing map cache buffer size
CN115458013A (en) Storage device and operation method thereof
US9312011B1 (en) Data writing method, memory storage device and memory control circuit unit
US11366751B2 (en) Storage device and storage control method
US11954350B2 (en) Storage device and method of operating the same
US10445014B2 (en) Methods of operating a computing system including a host processing data of first size and a storage device processing data of second size and including a memory controller and a non-volatile memory
CN115390746A (en) Host device, storage device, and electronic device
US11221946B2 (en) Data arrangement method, memory storage device and memory control circuit unit
WO2020039927A1 (en) Non-volatile storage device, host device, and data storage system

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140530

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150602

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20170525

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190530

Year of fee payment: 9