KR100280457B1 - How to read and write data in flash memory - Google Patents

How to read and write data in flash memory Download PDF

Info

Publication number
KR100280457B1
KR100280457B1 KR1019980010879A KR19980010879A KR100280457B1 KR 100280457 B1 KR100280457 B1 KR 100280457B1 KR 1019980010879 A KR1019980010879 A KR 1019980010879A KR 19980010879 A KR19980010879 A KR 19980010879A KR 100280457 B1 KR100280457 B1 KR 100280457B1
Authority
KR
South Korea
Prior art keywords
data
error
overhead
sector
defect
Prior art date
Application number
KR1019980010879A
Other languages
Korean (ko)
Other versions
KR19990076171A (en
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 KR1019980010879A priority Critical patent/KR100280457B1/en
Publication of KR19990076171A publication Critical patent/KR19990076171A/en
Application granted granted Critical
Publication of KR100280457B1 publication Critical patent/KR100280457B1/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

본 발명은 플래시 메모리의 데이터 리드 및 라이트방법에 관한 것으로, 종래에는 오버헤드에 디펙트가 있으면 잘못된 오버헤드데이터에 의해 유저데이터의 디펙트처리와 에러를 검출하므로 정확하게 데이터를 처리하지 못하고, 만약 디펙트가 없는 부분을 오버헤드로 설정시 섹터마다 오버헤드영역이 달라지므로 그 오버헤드영역의 위치를 확인해야 하는 과정이 필요하므로 데이터처리속도가 저하되고 또한 일정한 부분에 오버헤드를 고정하여 사용하면 디펙트가 있는 섹터는 사용하지 못하므로 섹터의 낭비를 초래할 수 있는 문제점이 있었다. 따라서, 본 발명은 플래시메모리의 각 섹터의 오버헤드영역중에 패러티비트만 디펙트 처리하고 또한 상기 오버헤드영역을 고정시킴으로써 데이터의 처리속도를 향상시킴과 아울러 플래시메모리의 이용효율을 향상시킬 수 있는 효과가 있다.The present invention relates to a method of reading and writing data in a flash memory. In the related art, if there is a defect in the overhead, defect data and error of the user data are detected by wrong overhead data, so that the data cannot be processed correctly. When the non-fective part is set to overhead, the overhead area is changed for each sector, so the process of checking the location of the overhead area is necessary. Therefore, the data processing speed is reduced and the overhead is fixed at a certain part. Since the sector with the defect cannot be used, there is a problem that can cause a waste of the sector. Therefore, the present invention can improve the processing speed of data and improve the use efficiency of flash memory by defect processing only the parity bits in the overhead area of each sector of the flash memory and fixing the overhead area. There is.

Description

플래시메모리의 데이터 리드 및 라이트하는 방법How to Read and Write Data from Flash Memory

플래시메모리의 데이터 리드 및 라이트하는 방법에 관한 것으로, 특히 오버헤드(Overhead)의 패러티(Parity) 비트만 디펙트(Defect) 처리하여 메모리를 효율적으로 사용할 수 있도록 한 플래시메모리의 데이터를 리드 및 라이트하는 방법에 관한 것이다.The present invention relates to a method of reading and writing data in a flash memory, and more particularly, to read and write data in a flash memory that can efficiently use the memory by processing only the parity bits of the overhead. It is about a method.

도1은 종래 플래시메모리의 데이터 리드방법에 대한 동작흐름도로서, 이에 도시된 바와같이 리딩신호에 의해 읽고자하는 데이터가 저장된 섹터(Sector)의 오버헤드(Overhead)를 읽어서 버퍼에 저장하고, 원하는 섹터(Sector)의 데이터를 읽어 이를 상기 버퍼에 저장하며, 그 저장된 데이터의 에러를 검출하여 그 검출된 에러를 정정한 후 상기 에러정정 과정중 에러가 발생하였는 지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 에러정정 과정중 에러가 발생하면 불량섹터(Sector)로 표시하고 에러정정 과정중 에러가 발생하지 않으면 오버헤드(Overhead)의 디펙트(Defect)정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect)를 소정 처리한 후 상기 버퍼에 저장되어 있는 데이터를 호스트(Host)로 전송하는 제2 단계로 수행한다.FIG. 1 is a flowchart illustrating a data read method of a conventional flash memory. As shown in FIG. 1, an overhead of a sector in which data to be read is stored by reading signals is read and stored in a buffer, and a desired sector is read. Reading the data of Sector and storing it in the buffer, detecting an error of the stored data, correcting the detected error, and determining whether an error has occurred during the error correction process; As a result of the determination in the first step, if an error occurs during the error correction process, the error is marked as a bad sector. If an error does not occur during the error correction process, the user uses the defect information of the overhead. The second step of transmitting the data stored in the buffer to the host after processing a defect on the data area.

도2는 종래 플래시메모리의 데이터 라이트방법에 대한 동작흐름도로서, 이에 도시된 바와같이 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)를 읽어 이를 버퍼에 저장하는 제1 단계와; 호스트(Host)로부터 데이터를 입력받아 이를 상기 버퍼에 저장하고 상기 오버헤드(Overhead)의 디펙트(Defect)정보를 이용하여 유저(USER) 데이터영역의 디펙트(Defect)를 소정 처리하는 제2 단계와; 상기 버퍼에 저장된 데이터의 에러를 검출하여 그에 따른 패러티(Parity)와 데이터를 섹터(Sector)에 쓰는 단계와; 프로그램에 에러가 발생하면 불량섹터(Sector)로 표시하고 프로그램에 에러가 발생되지 않으면 쓰기 동작을 완료하는 제3 단계로 수행한다.FIG. 2 is a flowchart illustrating a data writing method of a conventional flash memory. As shown in FIG. 2, an overhead of a sector to write data by a writing signal is read and stored in a buffer. Wow; A second step of receiving data from a host and storing the data in the buffer and processing defects of a user data area by using defect information of the overhead; Wow; Detecting an error of data stored in the buffer and writing parity and data according to the sector; If an error occurs in the program, it is marked as a bad sector. If an error does not occur in the program, the third step of completing a write operation is performed.

이와같은 종래 플래시메모리의 데이터 리드 및 라이트의 동작을 첨부한 도면을 참조하여 설명한다.Such operations of data read and write in the conventional flash memory will be described with reference to the accompanying drawings.

먼저, 플래시메모리의 데이터를 읽을 경우 리딩신호에 의해 읽고자하는 데이터가 저장된 섹터(Sector)의 오버헤드(Overhead)의 데이터를 읽어서 이를 버퍼에 저장한 후, 원하는 섹터(Sector)의 데이터를 읽어 이를 상기 버퍼에 저장한다.First, when reading data from the flash memory, the data of the overhead of the sector in which the data to be read is stored by reading signal is read and stored in the buffer, and then the data of the desired sector is read. Store in the buffer.

여기서, 상기 오버헤드(Overhead)는 섹터(Sector)마다 존재하고 주로 그 섹터(Sector)와 관련된 정보를 저장하는데, 즉 에러정정코드 및 디펙트(Defect) 비트에 대한 위치와 이레이저(Eraser) 싸이클 등을 저장한다.Here, the overhead exists in each sector and mainly stores information related to the sector, that is, the position and erasure cycles for error correction codes and defect bits. And so on.

그 다음, 상기 버퍼에 저장된 데이터를 에러정정코드를 이용하여 에러를 검출하고, 그 검출된 에러를 소정 처리하여 에러를 정정하는데, 만약 상기 에러정정 과정중 에러가 발생하면 그 섹터(Sector)는 불량섹터(Sector)로 인식되어 데이터를 읽을 수 없고 에러정정과정중 에러가 발생하지 않으면 오버헤드(Overhead)의 데이터에 존재하는 디펙트(Defect) 정보를 이용하여 섹터(Sector)의 유저(USER) 데이터영역에 존재하는 디펙트(Defect) 비트를 소정 처리한 후, 상기 버퍼에 저장된 데이터를 호스트(Host)로 전송함으로써 소정 데이터를 읽을 수 있다.Next, an error is detected by using the error correction code in the data stored in the buffer, and the error is corrected by predetermined processing of the detected error. If an error occurs during the error correction process, the sector is bad. If the data cannot be read because it is recognized as a sector and no error occurs during the error correction process, the user data of the sector is used by using defect information existing in the overhead data. After predetermined processing of the defect bit existing in the area, the predetermined data can be read by transmitting the data stored in the buffer to the host.

이때, 상기 에러정정 과정은 유저(USER) 데이터영역에 대해서만 수행하고 오버헤드(Overhead) 영역에 대해서는 수행하지 않으며, 또한 상기 디펙트(Defect) 비트에 대한 소정 디펙트(Defect) 처리는 허용할 수 있는 디펙트(Defect) 비트의 수내에서 유저(USER) 데이터영역에 존재하는 디펙트(Defect) 비트에 대해서는 오버헤드(Overhead) 영역의 디펙트(Defect) 비트에 대한 정보를 적어주고 그 디펙트(Defect) 비트의 데이터를 바꾸어서 읽거나 쓸때 에러가 없도록 한다.In this case, the error correction process may be performed only for the USER data area, not for the overhead area, and may allow a predetermined defect process on the defect bit. For the defect bits existing in the user data area within the number of defect bits present, write down information about the defect bits in the overhead area and the defect ( Defect) Change the bit data so that there is no error when reading or writing.

반대로, 플래시메모리에 데이터를 쓸 경우 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)의 데이터를 읽어 이를 버퍼에 저장한후, 호스트(Host)로부터 쓰고자 하는 데이터를 입력받아 이를 상기 버퍼에 저장한다.On the contrary, when writing data to the flash memory, the overhead data of the sector to write data is read by the writing signal, stored in the buffer, and the data to be written from the host is received. Store this in the buffer.

그 다음, 상기 오버헤드(Overhead)의 데이터에 포함된 디펙트(Defect)정보를 이용하여 유저(USER) 데이터 영역의 디펙트(Defect)를 소정 처리한후 상기 버퍼에 저장된 데이터의 에러를 검출하여 그에 따라 발생하는 패러티(Parity)와 쓰고자 하는 데이터를 섹터(Sector)에 쓴다.Next, by using the defect information included in the overhead data, the defect of the USER data area is subjected to a predetermined process, and then an error of the data stored in the buffer is detected. The resulting parity and the data to be written are written to the sector.

이때, 상기 데이터의 쓰기동작중 에러가 발생하면 불량섹터(Sector)로 표시하고 쓰기동작중에 에러가 발생하지 않으면 쓰기동작을 완료한다.At this time, if an error occurs during the write operation of the data, it is marked as a bad sector, and if an error does not occur during the write operation, the write operation is completed.

그러나, 상기와 같이 동작하는 종래 기술은 오버헤드(Overhead)에 디펙트(Defect)가 있으면 잘못된 오버헤드(Overhead)의 데이터에 의해 유저(USER) 데이터의 디펙트(Defect) 처리와 에러를 검출하므로 정확하게 데이터를 처리하지 못하고, 만약 디펙트(Defect)가 없는 부분을 오버헤드(Overhead)로 설정시 섹터(Sector)마다 오버헤드(Overhead) 영역이 달라지므로 그 오버헤드(Overhead) 영역의 위치를 확인해야 하는 과정이 필요하므로 데이터 처리속도가 저하되고 또한 일정한 부분에 오버헤드(Overhead)를 고정하여 사용하면 디펙트(Defect)가 있는 섹터(Sector)는 사용하지 못하므로 섹터(Sector)의 낭비를 초래할 수 있는 문제점이 있었다.However, the prior art operating as described above detects defect processing and errors of the user data by incorrect overhead data when there is a defect in the overhead. If the data cannot be processed correctly and the area without defect is set as overhead, the overhead area is changed for each sector, so the position of the overhead area is checked. As the data processing speed is slowed down and fixed overhead is used at a certain part, the sector with defect cannot be used, which may cause waste of the sector. There was a problem that could be.

따라서, 상기와 같은 문제점을 감안하여 창안한 본 발명은 오버헤드(Overhead)의 패러티(Parity) 비트만 소정 디펙트(Defect) 처리하여 메모리를 효율적으로 사용할 수 있도록 한 플래시메모리의 데이터 리드 및 라이트 방법을 제공함에 그 목적이 있다.Accordingly, the present invention devised in view of the above-described problems is a method of reading and writing data in a flash memory that enables efficient use of the memory by processing only a parity bit of overhead with a predetermined defect. The purpose is to provide.

도1은 종래 플래시메모리의 데이터 리드방법에 대한 동작흐름도.1 is an operation flowchart of a data reading method of a conventional flash memory.

도2는 종래 플래시메모리의 데이터 라이트방법에 대한 동작흐름도.2 is an operation flowchart of a data writing method of a conventional flash memory.

도3은 본 발명 플래시메모리의 데이터 리드방법에 대한 동작흐름도.Fig. 3 is an operation flowchart of the data read method of the flash memory of the present invention.

도4는 본 발명 플래시메모리의 데이터 라이트방법에 대한 동작흐름도.4 is an operation flowchart of a data writing method of a flash memory of the present invention.

상기와 같은 목적을 달성하기 위한 본 발명은 리딩신호에 의해 데이터를 읽고자하는 섹터(Sector)의 오버헤드(Overhead)에 대한 에러를 검출하여 그 검출된 에러를 정정한 후 정정과정에 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 정정과정에 에러가 발생하면 그 섹터(Sector)를 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않았으면 오버헤드(Overhead)부분에 존재하는 디펙트(Defect) 비트를 소정처리한 후 그 섹터(Sector)에 저장된 데이터를 읽어들여 이를 버퍼에 저장하는 제2 단계와; 상기 저장된 데이터에 대한 에러를 검출하여 그 검출된 에러에 대한 정정을 수행한 후 그 정정과정에 에러가 발생하였는 지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 정정과정에 에러가 발생하면 그 데이터의 어드레스를 리스트에 저장하고 정정과정에 에러가 발생하지 않으면 디코딩할 데이터가 더 남았는 지를 판단하는 제4 단계와; 상기 제4 단계의 판단결과 디코딩할 데이터가 있으면 상기 제3 단계로 궤환하고 디코딩할 데이터가 없으면 상기 리스트에 저장된 어드레스가 있는지를 판단하는 제5 단계와; 상기 제5 단계의 판단결과 리스트에 저장된 어드레스가 없으면 섹터(Sector)의 데이터중 오버헤드(Overhead)의 디펙트(Defect) 비트에 대한 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect)를 소정 처리한후 버퍼에 저장되어 있는 섹터(Sector)의 데이터를 호스트(Host)로 전송하고, 리스트에 저장된 어드레스가 있으면 그 어드레스의 데이터에 대한 패러티(Parity) 영역에 디펙트(Defect)가 있는지를 확인하여 디펙트(Defect)가 있는 패러티(Parity)는 소정 디펙트(Defect) 처리를 한 후 그 데이터에 대한 에러를 검출하여 검출된 에러의 정정을 수행한후 정정과정에 에러가 발생하였는지를 판단하는 제6 단계와; 상기 제6 단계의 판단결과 정정과정에 에러가 발생하면 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않으면 리스트에 처리할 데이터가 남아있는 지를 판단하는 제7 단계와; 상기 제7 단계의 판단결과 리스트에 처리할 데이터가 있으면 상기 제6 단계로 궤환하고 리스트에 처리할 데이터가 없으면 섹터(Sector)의 데이터중 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect) 처리를 한 후 버퍼에 저장되어 있는 섹터(Sector)의 데이터를 호스트(Host)로 전송하는 제8단계로 수행함을 특징으로 한다.In order to achieve the above object, the present invention detects an error of an overhead of a sector to read data by reading signal, corrects the detected error, and then generates an error in the correction process. A first step of judging whether it has been done; If an error occurs in the correction process of the first step, the sector is marked as a bad sector, and if an error does not occur in the correction process, a defect existing in the overhead portion is present. ) A second step of reading the data stored in the sector after the predetermined processing of the bit and storing it in the buffer; A third step of detecting an error with respect to the stored data, correcting the detected error, and determining whether an error has occurred in the correction process; A fourth step of storing an address of the data in a list when an error occurs in the correcting process and determining whether there is more data to decode if an error does not occur in the correcting process; A fifth step of returning to the third step if there is data to be decoded as a result of the determination of the fourth step and determining whether there is an address stored in the list if there is no data to be decoded; If there is no address stored in the determination result list of the fifth step, the defect for the user data area is determined by using information on the defect bit of the overhead of the sector data. After a predetermined process, the sector data stored in the buffer is transferred to the host, and if there is an address stored in the list, a defect is generated in the parity area for the data of the address. Defect parity checks whether there is an error in the correction process after performing a predetermined defect processing, detecting an error on the data, and correcting the detected error. Determining a sixth step; A seventh step of displaying a bad sector when an error occurs in the correcting process of the sixth step and determining whether data to be processed remains in the list when an error does not occur in the correcting process; If there is data to be processed in the determination result list of the seventh step, the process returns to the sixth step. If there is no data to be processed in the list, the defect information of the overhead of the sector data is used. After performing a defect process on the USER data area, an eighth step of transferring data of the sector stored in the buffer to the host is performed.

상기와 같은 목적을 달성하기 위한 본 발명은 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)를 읽고 그 오버헤드(Overhead)의 데이터에 대한 에러를 검출하여 그 에러를 정정한 후, 상기 에러정정 과정에서 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 에러정정 과정에서 에러가 발생하면 불량섹터(Sector)로 표시하고 에러정정 과정에서 에러가 발생하지 않으면 오버헤드(Overhead)의 디펙트(Defect)를 소정 처리하고, 호스트(Host)로부터 데이터를 입력받아 이를 버퍼에 저장한 후 상기 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect) 처리를 한후 상기 버퍼에 저장된 데이터에 대해 에러를 검출하고 오버헤드(Overhead)가 포함된 데이터인지를 판단하는 제2 단계와; 상기 제2 단계의 판단결과 오버헤드(Overhead)가 포함된 데이터이면 유저(USER) 데이터와 패러티(Parity) 비트를 오버헤드(Overhead) 영역에 쓰고 오버헤드(Overhead)가 포함되지 않은 데이터이면 에러검출시에 발생한 패러티(Parity)를 쓸 영역에 대한 소정 디펙트(Defect) 처리를하여 버퍼에 저장된 데이터와 패러티(Parity)를 해당영역에 쓴후, 써야 할 데이터가 더 남았는지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 써야 할 데이터가 있으면 상기 제2 단계로 궤환하고 써야할 데이터가 없으면 소정 프로그램의 이상유무를 판단하여 이상이 발생하면 불량섹터(Sector)로 표시하고 이상이 없으면 쓰기 동작을 종료하는 제4 단계로 수행함을 특징으로 한다.The present invention for achieving the above object is to read the overhead of the sector (Sector) to write data by the writing signal and to detect the error of the data of the overhead (Overhead) to correct the error A first step of determining whether an error has occurred in the error correction process; As a result of the determination in the first step, if an error occurs in the error correction process, it is indicated by a bad sector. If an error does not occur in the error correction process, an overhead defect is processed in advance and the host ( After receiving data from the host and storing it in the buffer, Defect processing on the USER data area is performed using the defect information of the overhead, and then the data stored in the buffer. A second step of detecting an error and determining whether the data includes overhead; As a result of the determination of the second step, if the data includes the overhead, user data and parity bits are written to the overhead area, and if the data does not include the error, error detection is performed. A third step of determining whether there is more data to be written after writing data stored in the buffer and parity in the corresponding area by performing a predetermined defect process on the area to write the parity generated at the time; ; If there is data to be written as a result of the determination of the third step, it is fed back to the second step and if there is no data to be written, it is determined whether there is an abnormality of a predetermined program. Characterized in that the fourth step to end.

이하, 본 발명의 작용 및 효과를 첨부한 도면을 참조하여 설명한다.Hereinafter, the operation and effects of the present invention will be described with reference to the accompanying drawings.

도3은 본 발명 플래시메모리의 데이터리드방법에 대한 흐름도로서, 이에 도시한 바와같이 리딩신호에 의해 데이터를 읽고자하는 섹터(Sector)의 오버헤드(Overhead)에 대한 에러를 검출하여 그 검출된 에러를 정정한 후 정정과정에 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 정정과정에 에러가 발생하면 그 섹터(Sector)를 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않았으면 오버헤드(Overhead) 부분에 존재하는 디펙트(Defect) 비트를 소정 처리한 후 그 섹터(Sector)에 저장된 데이터를 읽어들여 이를 버퍼에 저장하는 제2 단계와; 상기 저장된 데이터에 대한 에러를 검출하여 그 검출된 에러에 대한 정정을 수행한 후 그 정정과정에 에러가 발생하였는 지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 정정과정에 에러가 발생하면 그 데이터의 어드레스를 리스트에 저장하고 정정과정에 에러가 발생하지 않으면 디코딩할 데이터가 더 남았는 지를 판단하는 제4 단계와; 상기 제4 단계의 판단결과 디코딩할 데이터가 있으면 상기 제3 단계로 궤환하고 디코딩할 데이터가 없으면 상기 리스트에 저장된 어드레스가 있는지를 판단하는 제5 단계와; 상기 제5 단계의 판단결과 리스트에 저장된 어드레스가 없으면 오버헤드(Overhead)의 디펙트(Defect) 비트에 대한 정보를 이용하여 유저(User) 데이터영역에 대한 디펙트(Defect)를 소정 처리한후 버퍼에 저장되어 있는 데이터를 호스트(Host)로 전송하고, 리스트에 저장된 어드레스가 있으면 그 어드레스의 데이터에 대한 패러티(Parity) 영역에 디펙트(Defect)가 있는지를 확인하여 디펙트(Defect)가 있는 패러티(Parity) 비트는 소정 디펙트(Defect) 처리를 수행하고 그 데이터에 대한 에러를 검출하여 검출된 에러의 정정을 수행한후 정정과정에 에러가 발생하였는지를 판단하는 제6 단계와; 상기 제6 단계의 판단결과 정정과정에 에러가 발생하면 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않으면 상기 리스트에 처리할 데이터가 남아 있는지를 판단하는 제7 단계와; 상기 제7 단계의 판단결과 리스트에 처리할 데이터가 있으면 상기 제6단계로 궤환하고 리스트에 처리할 데이터가 없으면 오버헤드(Overhead)의 디펙트(Defect)정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect) 처리를 한 후 버퍼에 저장되어 있는 데이터를 호스트(Host)로 전송하는 제8단계로 수행한다.3 is a flowchart of a data reading method of a flash memory according to the present invention. As shown therein, an error of an overhead of a sector to read data by a reading signal is detected and the detected error is detected. A first step of determining whether an error has occurred in the correction process after the correction; If an error occurs in the correction process of the first step, the sector is marked as a bad sector, and if an error does not occur in the correction process, a defect existing in the overhead portion is present. ) A second step of processing a bit and reading data stored in the sector and storing the data in a buffer; A third step of detecting an error with respect to the stored data, correcting the detected error, and determining whether an error has occurred in the correction process; A fourth step of storing an address of the data in a list when an error occurs in the correcting process and determining whether there is more data to decode if an error does not occur in the correcting process; A fifth step of returning to the third step if there is data to be decoded as a result of the determination of the fourth step and determining whether there is an address stored in the list if there is no data to be decoded; If there is no address stored in the determination result list of the fifth step, the buffer is processed after predetermined defects for the user data area using information on the defect bits of the overhead. Transmit the data stored in the host to the host, and if there is an address stored in the list, check whether there is a defect in the parity area for the data of the address and check the defect with the defect. A sixth step of performing a predetermined defect process, detecting an error on the data, correcting the detected error, and determining whether an error has occurred in the correction process; A seventh step of displaying a bad sector when an error occurs in the correcting process of the sixth step and determining whether there is data to be processed in the list if an error does not occur in the correcting process; If there is data to be processed in the determination result list of the seventh step, the method returns to the sixth step, and if there is no data to be processed in the list, the defect information of the overhead is used to access the user data area. After the defect processing, the data stored in the buffer is transmitted to the host.

도4는 본 발명 플래시메모리의 데이터 라이트방법에 대한 흐름도로서, 이에 도시한 바와같이 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)를 읽고 그 오버헤드(Overhead)의 데이터에 대한 에러를 검출하여 그 에러를 정정한 후, 상기 에러정정 과정에서 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 에러정정 과정에서 에러가 발생하면 불량섹터(Sector)로 표시하고 에러정정 과정에서 에러가 발생하지 않으면 오버헤드(Overhead)의 디펙트(Defect)를 소정 처리하고, 호스트(Host)로부터 데이터를 입력받아 이를 버퍼에 저장한 후 상기 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect)를 소정처리 한후 상기 버퍼에 저장된 데이터에 대해 에러를 검출하고 오버헤드(Overhead)가 포함된 데이터인지를 판단하는 제2 단계와; 상기 제2 단계의 판단결과 오버헤드(Overhead)가 포함된 데이터이면 유저(USER) 데이터와 패러티(Parity)를 오버헤드(Overhead) 영역에 쓰고 오버헤드(Overhead)가 포함되지 않은 데이터이면 에러검출시에 발생한 패러티(Parity)를 쓸 영역에 대한 디펙트(Defect) 처리를 하여 버퍼에 저장된 데이터와 패러티(Parity)를 해당영역에 쓴후, 써야 할 데이터가 더 남았는지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 써야 할 데이터가 있으면 상기 제2 단계로 궤환하고 써야할 데이터가 없으면 소정 프로그램의 이상유무를 판단하여 이상이 발생하면 불량섹터(Sector)로 표시하고 이상이 없으면 쓰기 동작을 종료하는 제4 단계로 수행하며, 이와같은 본 발명의 동작을 설명한다.4 is a flowchart of a data writing method of a flash memory according to the present invention. As shown therein, an overhead of a sector to write data by a writing signal is read, and the data of the overhead is read. Detecting an error with and correcting the error, and determining whether an error has occurred in the error correction process; As a result of the determination in the first step, if an error occurs in the error correction process, it is indicated by a bad sector. If an error does not occur in the error correction process, an overhead defect is processed in advance and the host ( Receives data from the host and stores it in the buffer, and then processes the defect for the user data area by using the defect information of the overhead, and stores the data in the buffer. Detecting an error with respect to the data and determining whether the data includes overhead; As a result of the determination of the second step, if the data includes the overhead, the user data and parity are written in the overhead area, and if the data does not include the overhead, error detection is performed. A third step of performing a defect process on an area to write a parity generated in the second area to write data and parity stored in a buffer to a corresponding area, and then determining whether there is more data to be written; If there is data to be written as a result of the determination of the third step, it is fed back to the second step and if there is no data to be written, it is determined whether there is an abnormality of a predetermined program. The operation of the present invention is described in the fourth step of terminating.

먼저, 플래시메모리의 데이터를 읽을 경우 리딩신호에 의해 데이터를 읽고자 하는 섹터(Sector)의 오버헤드(Overhead)에 대한 에러를 검출하여 그 검출된 에러를 정정하는데, 상기 에러정정 과정중 에러가 발생하면 그 섹터(Sector)를 불량섹터(Sector)로 표시하고 에러가 발생하지 않으면 오버헤드(Overhead) 부분에 존재하는 디펙트(Defect)비트를 소정처리한 후 그 섹터(Sector)의 데이터를 읽어들여 버퍼에 저장한다.First, when reading data from a flash memory, an error about an overhead of a sector to read data is detected by a reading signal, and the detected error is corrected. An error occurs during the error correction process. If a sector is marked as a bad sector and an error does not occur, after processing the defect bit existing in the overhead part, the data of the sector is read. Store in a buffer.

이때, 상기 오버헤드(Overhead)는 패러티(Parity) 비트를 제외한 다른 영역은 디펙트(Defect) 비트가 허용되는 데, 즉 상기 오버헤드(Overhead)의 패러티(Parity)비트에 이상이 발생하면 에러정정과정중에 오버헤드(Overhead)의 데이터를 다르게 고치게 되므로 유저(USER) 데이터내의 디펙트(Defect) 처리가 틀린 오버헤드(Overhead)의 데이터를 가지고 수행하므로 데이터를 제대로 복구하지 못하게 되고, 이에 따라 상기 오버헤드(Overhead) 영역의 패러티(Parity) 비트는 오류가 없어야 한다.In this case, in the other area except the parity bit, the overhead is allowed to have a defect bit, that is, an error is corrected when an error occurs in the parity bit of the overhead. Since the overhead data is changed differently during the process, the defect processing in the user data is performed with the wrong overhead data so that the data cannot be recovered properly. The parity bit in the overhead area must be error free.

이후, 상기 버퍼에 저장된 섹터(Sector)의 데이터에 대한 에러를 검출하여 그에 따른 에러를 정정하고, 상기 정정과정중에 에러가 발생하면 그 데이터의 어드레스를 소정 리스트에 저장한다.Thereafter, an error of data of the sector stored in the buffer is detected and corrected accordingly, and if an error occurs during the correction process, the address of the data is stored in a predetermined list.

그 다음, 상기 리스트에 저장된 어드레스가 없으면 섹터(Sector)의 오버헤드(Overhead)의 데이터중 디펙트(Defect) 비트에 대한 데이터를 이용하여 유저(USER)데이터영역에 대한 디펙트(Defect)를 소정처리한 후 상기 버퍼에 저장된 섹터(Sector)의 데이터를 호스트(Host)로 전송하고, 상기 리스트에 저장된 어드레스가 있으면 섹터(Sector)의 오버헤드(Overhead)에 대한 데이터중 패러티(Parity) 영역에 디펙트(Defect)가 있는 지를 확인하여 디펙트(Defect)가 존재하는 패러티(Parity) 비트는 소정 디펙트(Defect) 처리를 한후 상기 섹터(Sector)의 데이터에 대한 에러를 검출하여 그에 따른 에러를 정정한 후 이 섹터(Sector)의 데이터를 호스트(Host)로 전송한다.Next, if there is no address stored in the list, the defect for the user data area is determined by using the data for the defect bit among the data of the overhead of the sector. After processing, the data of the sector stored in the buffer is transmitted to the host, and if there is an address stored in the list, the data is stored in the parity area of the data for the overhead of the sector. Parity bits with defects are checked by checking whether there is a defect, and after processing a predetermined defect, an error on the data of the sector is detected and corrected accordingly. After that, the data of this sector is transmitted to the host.

반대로, 플래시메모리에 데이터를 쓸 경우 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)를 읽고 그 오버헤드(Overhead)의 데이터에 대한 에러를 검출하여 그 에러를 정정하고, 이때 상기 에러정정 과정에서 에러가 발생하면 상기 섹터(Sector)를 불량섹터(Sector)로 표시하고 에러정정 과정중에 에러가 발생하지 않으면 상기 오버헤드(Overhead)의 디펙트(Defect) 비트를 소정처리한다.On the contrary, when data is written to the flash memory, the overhead of the sector to write data is read by the writing signal, the error of the overhead data is detected, and the error is corrected. At this time, if an error occurs in the error correction process, the sector is marked as a bad sector, and if an error does not occur during the error correction process, the defect bit of the overhead is processed. .

그 다음, 호스트(Host)로부터 소정 데이터를 입력받아 이를 버퍼에 저장한 후 상기 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 섹터(Sector)의 유저(USER)데이터영역에 대한 디펙트(Defect) 처리를 한다.Next, after receiving predetermined data from the host and storing it in a buffer, the defect information on the user data area of the sector is determined using the defect information of the overhead. (Defect) Process.

이후, 상기 버퍼에 저장된 데이터에 대해 에러를 검출하고 또한 그 데이터가 오버헤드(Overhead)가 포함된 데이터인지를 판단하여 오버헤드(Overhead)가 포함된 데이터이면 유저(USER) 데이터와 에러검출시 발생한 패러티(Parity)를 오버헤드(Overhead)의 해당영역에 쓴다.Subsequently, an error is detected with respect to the data stored in the buffer, and whether the data is the data including the overhead, and if the data includes the overhead, the user (USER) data and the error occurred when the error is detected. Write parity in the corresponding area of overhead.

그리고, 에러 검출된 데이터가 오버헤드(Overhead)를 포함하지 않은 데이터라면 상기 에러검출시 발생한 패러티(Parity)를 쓸 영역에 대한 디펙트(Defect)비트를 소정처리하여 상기 버퍼에 저장된 데이터와 패러티(Parity)를 해당영역에 쓰고, 상기와 같은 과정을 반복수행하여 데이터를 원하는 섹터(Sector)에 쓰게 된다.If the error detected data is data that does not include overhead, data and parity (stored in the buffer) may be processed by predetermined processing of a defect bit for an area in which the parity generated during the error detection will be written. Parity) is written in the corresponding area, and the above process is repeated to write data in the desired sector.

즉, 플래시메모리의 각 섹터(Sector)에 대한 오버헤드(Overhead)의 위치를 고정시킴과 아울러 그 오버헤드(Overhead) 영역중에 패러티(Parity) 영역만 디펙트(Defect) 비트가 없도록 사용함으로써 데이터 처리속도 및 섹터(Sector)의 이용효율을 향상시킨다.In other words, by fixing the position of the overhead of each sector of the flash memory, and using only the parity area in the overhead area without defect bits, data processing is performed. Improves speed and utilization efficiency of sectors.

이상에서 상세히 설명한 바와같이 본 발명은 플래시메모리의 각 섹터(Sector)의 오버헤드(Overhead) 영역중에 패러티(Parity) 비트만 디펙트(Defect) 처리하고 또한 상기 오버헤드(Overhead) 영역을 고정시킴으로써 데이터의 처리속도를 향상시킴과 아울러 플래시메모리의 이용효율을 향상시킬 수 있는 효과가 있다.As described in detail above, according to the present invention, only a parity bit is defected in an overhead area of each sector of a flash memory and the data is fixed by fixing the overhead area. In addition to improving the processing speed of the flash memory, the efficiency of using the flash memory can be improved.

Claims (2)

리딩신호에 의해 데이터를 읽고자하는 섹터(Sector)의 오버헤드(Overhead)에 대한 에러를 검출하여 그 검출된 에러를 정정한 후 정정과정에 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 정정과정에 에러가 발생하면 그 섹터(Sector)를 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않았으면 오버헤드(Overhead) 부분에 존재하는 디펙트(Defect) 비트를 소정 처리한 후 그 섹터(Sector)에 저장된 데이터를 읽어들여 이를 버퍼에 저장하는 제2 단계와; 상기 저장된 데이터에 대한 에러를 검출하여 그 검출된 에러에 대한 정정을 수행한 후 그 정정과정에 에러가 발생하였는 지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 정정과정에 에러가 발생하면 그 데이터의 어드레스를 리스트에 저장하고 정정과정에 에러가 발생하지 않으면 디코딩할 데이터가 더 남았는 지를 판단하는 제4 단계와; 상기 제4 단계의 판단결과 디코딩할 데이터가 있으면 상기 제3 단계로 궤환하고 디코딩할 데이터가 없으면 상기 리스트에 저장된 어드레스가 있는지를 판단하는 제5 단계와; 상기 제5 단계의 판단결과 리스트에 저장된 어드레스가 없으면 섹터(Sector)의 데이터중 오버헤드(Overhead)의 디펙트(Defect) 비트에 대한 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect)를 소정 처리한후 버퍼에 저장되어 있는 섹터(Sector)의 데이터를 호스트(Host)로 전송하고, 리스트에 저장된 어드레스가 있으면 그 어드레스의 데이터에 대한 패러티(Parity) 영역에 디펙트(Defect)가 있는지를 확인하여 디펙트(Defect)가 있는 패러티(Parity)는 소정 디펙트(Defect) 처리를 한 후 그 데이터에 대한 에러를 검출하여 검출된 에러의 정정을 수행한후 정정과정에 에러가 발생하였는지를 판단하는 제6 단계와; 상기 제6 단계의 판단결과 정정과정에 에러가 발생하면 불량섹터(Sector)로 표시하고 정정과정에 에러가 발생하지 않으면 리스트에 처리할 데이터가 남아있는 지를 판단하는 제7 단계와; 상기 제7 단계의 판단결과 리스트에 처리할 데이터가 있으면 상기 제6단계로 궤환하고 리스트에 처리할 데이터가 없으면 섹터(Sector)의 데이터중 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect) 처리를 한 후 버퍼에 저장되어 있는 섹터(Sector)의 데이터를 호스트(Host)로 전송하는 제8 단계로 수행함을 특징으로 하는 플래시메모리의 데이터 리드방법.A first step of detecting an error of an overhead of a sector to read data by a reading signal, correcting the detected error, and determining whether an error has occurred in the correction process; If an error occurs in the correction process of the first step, the sector is marked as a bad sector, and if an error does not occur in the correction process, a defect existing in the overhead portion is present. ) A second step of processing a bit and reading data stored in the sector and storing the data in a buffer; A third step of detecting an error with respect to the stored data, correcting the detected error, and determining whether an error has occurred in the correction process; A fourth step of storing an address of the data in a list when an error occurs in the correcting process and determining whether there is more data to decode if an error does not occur in the correcting process; A fifth step of returning to the third step if there is data to be decoded as a result of the determination of the fourth step and determining whether there is an address stored in the list if there is no data to be decoded; If there is no address stored in the determination result list of the fifth step, the defect for the user data area is determined by using information on the defect bit of the overhead of the sector data. After a predetermined process, the sector data stored in the buffer is transferred to the host, and if there is an address stored in the list, a defect is generated in the parity area for the data of the address. Defect parity checks whether there is an error in the correction process after performing a predetermined defect processing, detecting an error on the data, and correcting the detected error. Determining a sixth step; A seventh step of displaying a bad sector when an error occurs in the correcting process of the sixth step and determining whether data to be processed remains in the list when an error does not occur in the correcting process; If there is data to be processed in the determination result list of the seventh step, the process returns to the sixth step. If there is no data to be processed in the list, the defect information of the overhead of the sector data is used. Defect processing of the USER data area is performed, and the data read of the flash memory is performed as an eighth step of transferring data of the sector stored in the buffer to the host. Way. 라이팅신호에 의해 데이터를 쓰고자 하는 섹터(Sector)의 오버헤드(Overhead)를 읽고 그 오버헤드(Overhead)의 데이터에 대한 에러를 검출하여 그 에러를 정정한 후, 상기 에러정정 과정에서 에러가 발생하였는지를 판단하는 제1 단계와; 상기 제1 단계의 판단결과 에러정정 과정에서 에러가 발생하면 불량섹터(Sector)로 표시하고 에러정정 과정에서 에러가 발생하지 않으면 오버헤드(Overhead)의 디펙트(Defect)를 소정 처리하고, 호스트(Host)로부터 데이터를 입력받아 이를 버퍼에 저장한 후 상기 오버헤드(Overhead)의 디펙트(Defect) 정보를 이용하여 유저(USER) 데이터영역에 대한 디펙트(Defect) 처리를 한후 상기 버퍼에 저장된 데이터에 대해 에러를 검출하고 오버헤드(Overhead)가 포함된 데이터인지를 판단하는 제2 단계와; 상기 제2 단계의 판단결과 오버헤드(Overhead)가 포함된 데이터이면 유저(USER) 데이터와 패러티(Parity) 비트를 오버헤드(Overhead) 영역에 쓰고 오버헤드(Overhead)가 포함되지 않은 데이터이면 에러검출시에 발생한 패러티(Parity)를 쓸 영역에 대한 디펙트(Defect) 처리를 하여 버퍼에 저장된 데이터와 패러티(Parity)를 해당영역에 쓴후, 써야 할 데이터가 더 남았는지를 판단하는 제3 단계와; 상기 제3 단계의 판단결과 써야 할 데이터가 있으면 상기 제2 단계로 궤환하고 써야할 데이터가 없으면 소정 프로그램의 이상유무를 판단하여 이상이 발생하면 불량섹터(Sector)로 표시하고 이상이 없으면 쓰기 동작을 종료하는 제4 단계로 수행함을 특징으로 하는 플래시메모리의 데이터 라이트방법.After reading the overhead of the sector to write data by the writing signal, detecting the error of the data of the overhead and correcting the error, an error occurs in the error correction process. A first step of judging whether it has been done; As a result of the determination in the first step, if an error occurs in the error correction process, it is indicated by a bad sector. If an error does not occur in the error correction process, an overhead defect is processed in advance and the host ( After receiving data from the host and storing it in the buffer, Defect processing on the USER data area is performed using the defect information of the overhead, and then the data stored in the buffer. A second step of detecting an error and determining whether the data includes overhead; As a result of the determination of the second step, if the data includes the overhead, user data and parity bits are written to the overhead area, and if the data does not include the error, error detection is performed. A third step of performing a defect processing on an area to write parity generated at the time, writing data and parity stored in a buffer to a corresponding area, and then determining whether there is more data to be written; If there is data to be written as a result of the determination of the third step, it is fed back to the second step and if there is no data to be written, it is determined whether there is an abnormality of a predetermined program. And a fourth step of terminating the data.
KR1019980010879A 1998-03-28 1998-03-28 How to read and write data in flash memory KR100280457B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980010879A KR100280457B1 (en) 1998-03-28 1998-03-28 How to read and write data in flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980010879A KR100280457B1 (en) 1998-03-28 1998-03-28 How to read and write data in flash memory

Publications (2)

Publication Number Publication Date
KR19990076171A KR19990076171A (en) 1999-10-15
KR100280457B1 true KR100280457B1 (en) 2001-02-01

Family

ID=65860596

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980010879A KR100280457B1 (en) 1998-03-28 1998-03-28 How to read and write data in flash memory

Country Status (1)

Country Link
KR (1) KR100280457B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271856B2 (en) 2009-02-25 2012-09-18 Samsung Electronics Co., Ltd. Resistive memory devices and methods of controlling operations of the same
KR101411976B1 (en) 2007-07-09 2014-06-27 삼성전자주식회사 Flash memory system and error correction method thereof

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100809319B1 (en) 2006-09-13 2008-03-05 삼성전자주식회사 Apparatus and method for providing atomicity request of multiple sector write in flash memory
KR100843144B1 (en) 2006-12-20 2008-07-02 삼성전자주식회사 Nonvolatile memory device using variable resistive element and operating method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101411976B1 (en) 2007-07-09 2014-06-27 삼성전자주식회사 Flash memory system and error correction method thereof
US8271856B2 (en) 2009-02-25 2012-09-18 Samsung Electronics Co., Ltd. Resistive memory devices and methods of controlling operations of the same

Also Published As

Publication number Publication date
KR19990076171A (en) 1999-10-15

Similar Documents

Publication Publication Date Title
US20030172325A1 (en) Verifying data in a data storage device
US20060120166A1 (en) Data processing apparatus and method for flash memory
JP2772391B2 (en) Bad data algorithm
EP1164589A1 (en) Storage device having an error correction function
JPS6151241A (en) Error recovery system of control storage device
US6408417B1 (en) Method and apparatus for correcting soft errors in digital data
TWI446160B (en) Flash memory controller and data read method
US6742159B2 (en) Address parity error processing method, and apparatus and storage for the method
US20080301528A1 (en) Method and apparatus for controlling memory
US5467361A (en) Method and system for separate data and media maintenance within direct access storage devices
US8738989B2 (en) Method and apparatus for detecting free page and a method and apparatus for decoding error correction code using the method and apparatus for detecting free page
JPS6310460B2 (en)
US6842867B2 (en) System and method for identifying memory modules having a failing or defective address
KR100280457B1 (en) How to read and write data in flash memory
US7496822B2 (en) Apparatus and method for responding to data retention loss in a non-volatile memory unit using error checking and correction techniques
CN115729746A (en) Data storage protection method based on CRC and ECC
US11501845B2 (en) Data access system, and method for operating a data access system
US20030182611A1 (en) Method for verifying error correction code function of a computer system
KR100307517B1 (en) Defect cell detecting method of flash memory
US20170346505A1 (en) Circuits and methods for writing and reading data
JPH0652065A (en) Memory control circuit
KR100328818B1 (en) How to save data in flash memory
CN112306733B (en) Memory device, memory controller and data access method thereof
JPH11161560A (en) Address propriety judgement device and address propriety judgement method for storage device
JPH03111953A (en) Method for detecting fault of memory address

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: 20101025

Year of fee payment: 11

LAPS Lapse due to unpaid annual fee