KR20200050738A - Apparatus for controlling eeprom and method for writing data using same - Google Patents

Apparatus for controlling eeprom and method for writing data using same Download PDF

Info

Publication number
KR20200050738A
KR20200050738A KR1020180133733A KR20180133733A KR20200050738A KR 20200050738 A KR20200050738 A KR 20200050738A KR 1020180133733 A KR1020180133733 A KR 1020180133733A KR 20180133733 A KR20180133733 A KR 20180133733A KR 20200050738 A KR20200050738 A KR 20200050738A
Authority
KR
South Korea
Prior art keywords
data
data block
eeprom
field
reusable
Prior art date
Application number
KR1020180133733A
Other languages
Korean (ko)
Other versions
KR102142675B1 (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 KR1020180133733A priority Critical patent/KR102142675B1/en
Publication of KR20200050738A publication Critical patent/KR20200050738A/en
Application granted granted Critical
Publication of KR102142675B1 publication Critical patent/KR102142675B1/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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

The present invention relates to an apparatus for controlling an EEPROM and a method for writing data using the same, wherein the apparatus comprises: a memory unit consisting of a plurality of data blocks; and a control unit which records and stores data in the data block and controls the memory unit to reuse the reusable block among data blocks marked for deletion. According to the present invention, the number of erase cycles of the EEPROM is reduced by comparing the data to be newly stored with the data currently being used and the data marked for deletion, to reuse, if possible, the data currently being used or data marked for deletion, and consequently, the durability of the EEPROM is improved.

Description

EEPROM 제어장치 및 이를 이용한 EEPROM의 데이터 기록 방법{APPARATUS FOR CONTROLLING EEPROM AND METHOD FOR WRITING DATA USING SAME}EEPROM control device and data recording method of EEPROM using the same {APPARATUS FOR CONTROLLING EEPROM AND METHOD FOR WRITING DATA USING SAME}

본 발명은 EEPROM 제어장치 및 이를 활용한 EEPROM의 데이터 기록 방법에 관한 것으로, 보다 상세하게는 기존 삭제 표시된 데이터를 재활용함으로써 EEPROM을 효율적으로 사용하기 위한 EEPROM 제어장치 및 이를 활용한 EEPROM의 데이터 기록 방법에 관한 것이다.The present invention relates to an EEPROM control device and a method for recording data of an EEPROM utilizing the same, and more specifically, to an EEPROM control device for efficiently using the EEPROM by recycling existing deleted data, and a method for recording data in the EEPROM using the same. It is about.

일반적인 차량에서는 고장/진단/학습 데이터를 차량에 내장된 EEPROM에 저장하며, 이러한 EEPROM에 저장된 데이터를 이용해 고장의 원인을 파악하고 차량을 최적의 상태로 주행할 수 있도록 제어한다. In a typical vehicle, the failure / diagnosis / learning data is stored in the EEPROM embedded in the vehicle, and the data stored in the EEPROM is used to identify the cause of the failure and to control the vehicle to run in an optimal state.

EEPROM Emulation은 저장하고자 하는 데이터를 일정한 크기로 나누어 ID를 부여하고 이를 EEPROM에 저장하는 기술로서, EEPROM을 일정 수의 블록으로 나누어 각 블록에 ID가 부여된 데이터를 차례로 저장하되, 마지막 블록까지 저장이 이루어진 경우에는 이전 블록에서의 현재 저장된 데이터를 복사하여 마지막 블록으로 이동시킨 후, 이전 블록을 삭제하여 계속적으로 변경된 데이터를 저장하는 방식을 이용해 EEPROM에 데이터를 기록 또는 저장한다. 그러나 EEPROM은 이와 같이 데이터를 삭제하기 위한 Erase Cycle의 수에 제한이 있으며, 따라서 데이터가 빈번하게 변경되는 경우에는 계속해서 새로운 블록이 저장 및 삭제되므로 Erase Cycle이 계속해서 증가하게 되어 EEPROM의 내구도가 빠르게 감소하는 문제점이 있다.EEPROM Emulation is a technology that divides the data to be stored into a certain size and assigns an ID and stores it in the EEPROM. It divides the EEPROM into a certain number of blocks and sequentially stores the data with IDs assigned to each block. If it is done, after copying the currently stored data from the previous block and moving it to the last block, the previous block is deleted to record or store the data in the EEPROM using the method of storing the changed data continuously. However, EEPROM has a limitation on the number of erase cycles for erasing data. Therefore, when data is frequently changed, new blocks are continuously stored and erased, so the erase cycle continues to increase and the durability of EEPROM increases rapidly. There is a decreasing problem.

종래에는 도 1에서와 같이 새로 저장하고자 하는 블록의 데이터와 현재 사용중인 블록의 데이터를 비교하여(S110-S130), 동일한 경우에는 현재 사용 중인 블록의 데이터를 그대로 사용하고(S140), 동일하지 않은 경우에만 새로 저장하고자 하는 블록을 EEPROM에 기록(S150)하는 방법을 통해 Erase Cycle의 수를 줄이고자 하였다.Conventionally, as shown in FIG. 1, data of a block to be newly stored is compared with data of a currently used block (S110-S130), and in the same case, data of a currently used block is used as it is (S140), and is not the same. In this case, we tried to reduce the number of Erase Cycles by writing a block to be saved to EEPROM (S150).

그러나 이와 같이 현재 사용중인 블록과만 비교하는 종래 기술의 경우, 과거 사용했던 블록 중 새로 저장하고자 하는 블록과 동일한 블록이 존재하는 경우라도 이를 활용하지 못하므로 Erase Cycle의 수를 줄이는 것에 한계가 있다. 따라서EEPROM Emulation기능에 있어서 과거 사용했던 데이터를 활용하여 Erase Cycle의 수를 획기적으로 줄이고 EEPROM을 효율적으로 사용하기 위한 기술이 요구된다. 본 발명은 이와 관련된 것이다.However, in the case of the prior art that compares only the currently used block, there is a limit to reducing the number of Erase Cycles because even if the same block as the one to be newly stored exists among the previously used blocks, it cannot be utilized. Therefore, in the EEPROM Emulation function, a technique is required to dramatically reduce the number of Erase Cycles and utilize EEPROM efficiently by utilizing data that has been used in the past. The present invention relates to this.

대한민국 등록특허공보 제10-1826778호(2018.02.01)Republic of Korea Registered Patent Publication No. 10-1826778 (2018.02.01)

본 발명은 전술한 문제점을 해결하기 위하여 안출된 것으로, 삭제 표시된 데이터를 재사용하여 EEPROM의 Erase Cycle의 수를 줄이는 것을 목적으로 한다.The present invention has been devised to solve the above-mentioned problems, and aims to reduce the number of erase cycles of EEPROM by reusing data marked for deletion.

본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person skilled in the art from the following description.

상기 기술적 과제를 달성하기 위한 본 발명의 일 실시 예에 따른 EEPROM 제어장치는, 복수개의 데이터 블록으로 구성된 메모리부 및 상기 데이터 블록에 데이터를 기록 및 저장하고, 삭제 표시된 데이터 블록 중 재사용 가능한 블록이 있는 경우, 새로운 데이터 블록을 저장하지 않고 상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하도록 상기 메모리부를 제어하는 제어부를 포함할 수 있다.EEPROM control apparatus according to an embodiment of the present invention for achieving the above technical problem, a memory unit consisting of a plurality of data blocks and data is recorded and stored in the data block, there is a reusable block among the data blocks marked for deletion In this case, a control unit that controls the memory unit to change the reusable data block to a reuse state without storing a new data block may be included.

일 실시 예에 따르면, 상기 메모리부는 EEPROM(Electrically Erasable Programmable Read Only Memory)일 수 있다.According to an embodiment, the memory unit may be an EEPROM (Electrically Erasable Programmable Read Only Memory).

일 실시 예에 따르면, 상기 데이터 블록은, ID필드, STATUS필드, SIZE필드 및 DATA필드를 포함할 수 있다.According to an embodiment, the data block may include an ID field, a STATUS field, a SIZE field, and a DATA field.

일 실시 예에 따르면, 상기 제어부는, 데이터 블록의 사용 상태가 변경될 경우, 상태가 변경된 데이터 블록의 STATUS필드의 비트 값 중 하나를 0에서 1로 변경할 수 있다.According to an embodiment, when the use state of the data block is changed, the controller may change one of the bit values of the STATUS field of the data block whose state is changed from 0 to 1.

일 실시 예에 따르면, 상기 STATUS필드는, 현재 사용 또는 재사용 중인 데이터 블록은 짝수 개, 삭제 표시된 데이터 블록은 홀수 개의 1을 비트 값으로 가질 수 있다.According to an embodiment of the present disclosure, the STATUS field may have an even number of data blocks currently being used or reused, and an odd number of data blocks marked as deleted as bit values.

일 실시 예에 따르면, 상기 제어부는, 새로 저장할 데이터 블록과 현재 사용 중인 데이터 블록의 ID필드 및 DATA필드를 비교하여 상기 새로 저장할 데이터 블록을 저장할지 여부를 판단할 수 있다.According to an embodiment of the present disclosure, the control unit may determine whether to store the new data block to be stored by comparing the ID field and the DATA field of the currently used data block with the data block to be stored.

일 실시 예에 따르면, 상기 제어부는, 상기 비교 결과 ID필드 및 DATA필드가 동일한 현재 사용 중인 데이터 블록이 존재하는 경우, 현재 사용 중인 데이터 블록을 그대로 사용할 수 있다.According to an embodiment of the present disclosure, when there is a currently used data block having the same ID field and DATA field as a result of the comparison, the control unit may use the currently used data block as it is.

일 실시 예에 따르면, 상기 제어부는, 상기 비교 결과 ID필드는 동일하되 DATA필드는 상이한 데이터 블록이 존재하는 경우, 상기 새로 저장할 데이터 블록과 삭제 표시된 데이터 블록의 ID필드 및 DATA필드를 비교하여 재사용 가능 블록을 검색할 수 있다.According to an embodiment, if the ID field is the same as the result of the comparison, but the data field has a different data block, the control unit can compare and reuse the ID field and the DATA field of the newly stored data block and the marked data block. You can search for blocks.

일 실시 예에 따르면, 상기 제어부는, 상기 검색 결과 재사용 가능 데이터 블록이 존재하는 경우, 상기 재사용 가능 데이터 블록을 재사용할 수 있다.According to an embodiment, when the reusable data block exists as a result of the search, the control unit may reuse the reusable data block.

일 실시 예에 따르면, 상기 제어부는, 상기 검색 결과 재사용 가능 데이터 블록이 존재하지 않는 경우 상기 새로 저장할 데이터 블록을 메모리부에 저장할 수 있다.According to an embodiment of the present disclosure, when the reusable data block does not exist as a result of the search, the controller may store the new data block to be stored in the memory unit.

또한, 상기 기술적 과제를 달성하기 위한 본 발명의 일 실시 예에 따른 EEPROM의 데이터 기록 방법은, ID별로 새로 저장할 데이터 블록과 현재 저장된 데이터 블록의 DATA필드를 비교하는 단계, 삭제 표시된 데이터 블록 중 재사용 가능한 데이터 블록을 검색하는 단계 및 재사용 가능한 데이터 블록의 STATUS필드를 재사용 상태로 변경하는 단계를 포함할 수 있다.In addition, the data recording method of the EEPROM according to an embodiment of the present invention for achieving the above technical problem, comparing the data field of the newly stored data block and the currently stored data block by ID, reusable among the data blocks marked for deletion Searching for a data block and changing the STATUS field of the reusable data block to a reuse state.

일 실시 예에 따르면, 상기 검색하는 단계 이후, 검색 결과 재사용 가능한 데이터 블록이 존재하지 않는 경우 새로 저장할 데이터 블록을 메모리부에 저장하는 단계를 더 포함할 수 있다.According to an embodiment of the present invention, after the retrieving step, when the reusable data block does not exist as a result of the retrieval, the method may further include storing a new data block to be stored in the memory unit.

일 실시 예에 따르면, 상기 검색하는 단계 이후, 검색 결과 재사용 가능한 데이터 블록이 존재하는 경우 새로운 데이터 블록을 저장하지 않고 상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하는 단계를 더 포함할 수 있다.According to an embodiment, after the retrieval step, if a reusable data block exists as a result of the search, the method may further include changing the reusable data block to a reuse state without storing a new data block.

일 실시 예에 따르면, 상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하는 단계는, 상기 재사용 가능한 데이터 블록의 STATUS필드의 비트 값 중 하나를 0에서 1로 변경할 수 있다.According to an embodiment, in the step of changing the reusable data block to a reuse state, one of the bit values of the STATUS field of the reusable data block may be changed from 0 to 1.

본 발명에 의하면, 새로 저장할 데이터를 삭제 표시된 데이터와도 비교하고, 가능한 경우 삭제 표시된 데이터를 재사용함으로써 데이터 저장 횟수를 줄일 수 있는 바, EEPROM의 Erase Cycle의 수를 줄이고, EEPROM의 내구성을 향상시켜 보다 오랜 시간 사용할 수 있도록 하는 효과가 있다.According to the present invention, the number of data storage can be reduced by comparing the data to be newly stored with the data marked for deletion and, if possible, reusing the data marked for deletion, thereby reducing the number of erase cycles of the EEPROM and improving the durability of the EEPROM. It has the effect of allowing it to be used for a long time.

본 발명의 효과들은 이상에서 언급한 효과들로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해 될 수 있을 것이다.The effects of the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

도 1은 종래 기술에 따른 EEPROM Emulation기능을 이용한 데이터 기록 방법을 나타낸 도면이다.
도 2는 본 발명의 일 실시 예에 따른 EEPROM 제어장치의 구성을 나타낸 도면이다.
도 3은 본 발명의 일 실시 예에 따른 EEPROM 제어장치가 포함하는 메모리부의 구성을 나타낸 도면이다.
도 4는 새로 저장할 데이터 블록의 예시에 따른 데이터 기록 방법을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시 예에 따른 EEPROM제어장치가 EEPROM에 데이터를 기록하는 방법을 나타낸 순서도이다.
1 is a view showing a data recording method using the EEPROM Emulation function according to the prior art.
2 is a view showing the configuration of an EEPROM control device according to an embodiment of the present invention.
3 is a diagram illustrating a configuration of a memory unit included in the EEPROM control apparatus according to an embodiment of the present invention.
4 is a view for explaining a data recording method according to an example of a data block to be newly stored.
5 is a flowchart illustrating a method of recording data in the EEPROM by the EEPROM control apparatus according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시 예를 상세히 설명한다. 본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시 예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 게시되는 실시 예에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예들은 본 발명의 게시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Advantages and features of the present invention, and methods for achieving them will be clarified with reference to embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms, and only the embodiments allow the publication of the present invention to be complete, and general knowledge in the technical field to which the present invention pertains. It is provided to fully inform the holder of the scope of the invention, and the invention is only defined by the scope of the claims. The same reference numerals refer to the same components throughout the specification.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다.Unless otherwise defined, all terms (including technical and scientific terms) used in the present specification may be used as meanings commonly understood by those skilled in the art to which the present invention pertains.

또한, 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. 본 명세서에서 사용된 용어는 실시 예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다.In addition, terms defined in the commonly used dictionary are not ideally or excessively interpreted unless explicitly defined. The terminology used herein is for describing the embodiments and is not intended to limit the present invention. In the present specification, the singular form also includes the plural form unless otherwise specified in the phrase.

명세서에서 사용되는 "포함한다 (comprises)" 및/또는 "포함하는 (comprising)"은 언급된 구성 요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성 요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.As used herein, "comprises" and / or "comprising" refers to the components, steps, operations and / or elements mentioned above, the presence of one or more other components, steps, operations and / or elements Or do not exclude additions.

이하, 본 발명에 대하여 첨부된 도면에 따라 보다 상세히 설명한다.Hereinafter, the present invention will be described in more detail according to the accompanying drawings.

도 2는 본 발명의 일 실시 예에 따른 EEPROM 제어장치(10)의 구성을 나타낸 도면이고, 도 3은 본 발명의 일 실시 예에 따른 EEPROM 제어장치(10)가 포함하는 메모리부(100)의 구성을 나타낸 도면이며, 이들 모두 후술할 본 발명의 일 실시 예에 따른 EEPROM제어장치(10)가 EEPROM에 데이터를 기록하는 방법을 수행하는데 이용되므로, 우선적으로 설명하도록 한다. 2 is a view showing the configuration of the EEPROM control apparatus 10 according to an embodiment of the present invention, Figure 3 is a memory unit 100 included in the EEPROM control apparatus 10 according to an embodiment of the present invention It is a diagram showing the configuration, all of which will be described first since the EEPROM control apparatus 10 according to an embodiment of the present invention will be described later, which is used to perform a method of writing data to the EEPROM.

도 2를 참조하면, 본 발명의 일 실시 예에 따른 EEPROM 제어장치(10)는 메모리부(100) 및 제어부(200)를 포함할 수 있다.Referring to FIG. 2, the EEPROM control apparatus 10 according to an embodiment of the present invention may include a memory unit 100 and a control unit 200.

일 실시 예에 따르면, 메모리부(100)는 데이터가 저장되는 복수개의 데이터 블록으로 구성되며, 바람직하게는 EEPROM(Electrically Erasable Programmable Read Only Memory)일 수 있다.According to an embodiment, the memory unit 100 is composed of a plurality of data blocks in which data is stored, and may preferably be EEPROM (Electrically Erasable Programmable Read Only Memory).

도 3을 참조하면, 메모리부(100)를 구성하는 데이터 블록은, 각 데이터 블록을 식별하고 관리하기 위한 ID정보가 저장되는 ID필드(110), 블록의 사용 상태에 대한 정보가 저장되는 STATUS필드(120), 데이터의 크기 정보가 저장되는 SIZE필드(130) 및 데이터가 저장되는 DATA필드(140)를 포함할 수 있다.Referring to FIG. 3, the data block constituting the memory unit 100 includes an ID field 110 in which ID information for identifying and managing each data block is stored, and a STATUS field in which information on the use state of the block is stored. 120, a size field 130 in which data size information is stored, and a data field 140 in which data is stored.

일 실시 예에 따르면, STATUS 필드(120)는 제어부(200)에 의해 각 데이터 블록의 상태가 변함에 따라 변경되는 비트 값으로, 각 데이터 블록이 현재 사용 중인지, 혹은 삭제 표시되어 있는 상태인지, 혹은 재사용 중인 상태인지 여부를 나타내는 정보일 수 있다.According to an embodiment, the STATUS field 120 is a bit value that is changed as the state of each data block is changed by the control unit 200, and whether each data block is currently being used or marked for deletion, or It may be information indicating whether the state is being reused.

제어부(200)는 이를 위해 사용 중이던 데이터 블록이 삭제 표시되거나, 또는 삭제 표시된 데이터 블록이 재사용될 때 마다 STATUS필드(120)의 비트 값 중 하나를 0에서 1로 변경함으로써 현재 사용 상태에 따라 STATUS필드(120)의 값을 갱신할 수 있다.To this end, the control unit 200 changes one of the bit values of the STATUS field 120 from 0 to 1 whenever the data block being used is marked for deletion or the deleted data block is reused. The value of 120 can be updated.

예를 들어, STATUS필드(120)의 크기가 1byte(8bit)라고 가정하면, 처음 데이터 블록이 저장될 때 STATUS필드(120)의 비트 값은 00000000으로 저장될 수 있다. 이후 다른 데이터 블록을 사용함에 따라 현재 사용 중인 데이터 블록을 삭제 표시해야 하는 경우, 상기 처음 저장되어 현재 사용 중인 데이터 블록의 STATUS필드(120)는 비트 값 중 하나가 0에서 1로 변경되어 00000001의 값을 가질 수 있다. 또한 이와 같이 삭제표시 되어 있는 데이터 블록을 재사용하는 경우, 다시 해당 데이터 블록의 STATUS필드(120)의 비트값 중 하나를 0에서 1로 변경하며, 이 때 해당 데이터 블록의 STATUS필드(120)는 00000011의 비트 값을 가질 수 있다. For example, assuming that the size of the STATUS field 120 is 1 byte (8 bits), when the first data block is stored, the bit value of the STATUS field 120 may be stored as 00000000. If a data block currently in use is to be marked for deletion as another data block is used thereafter, one of the bit values of the STATUS field 120 of the data block that is currently stored and currently being used is changed from 0 to 1, resulting in a value of 00000001. Can have In addition, when the data block marked as deleted is reused, one of the bit values of the STATUS field 120 of the corresponding data block is changed from 0 to 1, and the STATUS field 120 of the corresponding data block is 00000011. It can have a bit value of.

이와 같이, 각 데이터 블록이 새로 저장되는 경우 STATUS필드(120)는 0의 비트 값을 가지고, 이후 상태가 변경(삭제 표시 또는 재사용)되는 경우 비트 값 중 하나를 0에서 1로 변경하므로, 각 데이터 블록의 STATUS필드(120)는 블록이 현재 사용 또는 재사용 중인 데이터 블록의 경우에는 짝수 개, 현재 삭제 표시 되어있는 블록의 경우 홀수 개의 1을 비트 값으로 가질 수 있다. 즉, 각 데이터 블록의 STATUS필드(120)에 포함된 1의 개수에 따라서 해당 데이터 블록이 현재 사용 중인 상태인지, 혹은 삭제 표시된 상태인지 판단할 수 있는 것이다.As described above, when each data block is newly stored, the STATUS field 120 has a bit value of 0, and when one of the bit values is changed from 0 to 1 when the status is subsequently changed (deleted or reused), each data The STATUS field 120 of the block may have an even number of 1s in the case of a data block currently being used or reused, or an odd number of 1s in the case of a block currently marked for deletion. That is, it is possible to determine whether the corresponding data block is currently in use or marked for deletion according to the number of 1 included in the STATUS field 120 of each data block.

한편, 전술한 STATUS필드(120)의 크기(1byte) 및 각 단계에서 변경되는 비트의 위치는 예시를 위한 것일 뿐 반드시 전술한 실시 예에 한정되는 것은 아님은 물론이다.Meanwhile, the size (1 byte) of the above-described STATUS field 120 and the position of the bit changed in each step are for illustration only and are not necessarily limited to the above-described embodiment.

다시, 도 2에 대한 설명으로 돌아가도록 한다. Again, it will return to the description of FIG. 2.

제어부(200)는 논리연산을 수행함과 동시에 메모리부(100)의 전반적인 동작을 제어하며, 특히 데이터 블록에 데이터를 기록 및 저장하고 삭제 표시된 데이터 블록 중 재사용 가능한 블록이 있는지 여부를 판단하여 재사용 가능한 블록이 있는 경우 이를 재사용하도록 메모리부(100)를 제어할 수 있다.The control unit 200 controls the overall operation of the memory unit 100 while performing logical operations. In particular, the control unit 200 records and stores data in the data block and determines whether or not there is a reusable block among the marked data blocks to be reused. In this case, the memory unit 100 may be controlled to reuse it.

이하, 앞서 설명한 도2 내지 도 3과 더불어 도 4를 참조하여 도 5에 도시된 본 발명의 일 실시 예에 따른 EEPROM제어장치(10)가 EEPROM에 데이터를 기록하는 방법에 대하여 상세히 살펴보도록 한다. Hereinafter, a method of writing data to the EEPROM by the EEPROM controller 10 according to an embodiment of the present invention shown in FIG. 5 will be described in detail with reference to FIGS. 2 to 3 as well as FIG. 4 described above.

도 4는 새로 저장할 데이터 블록의 예시에 따른 데이터 기록 방법을 설명하기 위한 도면이며, 도 5는 본 발명의 일 실시 예에 따른 EEPROM제어장치(10)가 EEPROM에 데이터를 기록하는 방법을 나타낸 순서도이다. 4 is a view for explaining a data recording method according to an example of a data block to be newly stored, and FIG. 5 is a flowchart illustrating a method for the EEPROM control apparatus 10 according to an embodiment of the present invention to write data to the EEPROM. .

도 5를 참조하면, 먼저 제어부(200)는 메모리부(100)에 저장되어 있는 현재 사용 중인 데이터 블록을 검색(S210)하고, 이를 새로 저장할 데이터 블록과 비교하여 새로 저장할 데이터블록의 ID필드와 동일한 ID필드를 가진 데이터 블록이 있는지 여부를 판단한다(S220).Referring to FIG. 5, first, the control unit 200 searches for a currently used data block stored in the memory unit 100 (S210), compares it with a new data block to be stored, and equals the ID field of the new data block to be stored. It is determined whether there is a data block having an ID field (S220).

도4(a)에서와 같이 상기 비교 결과 새로 저장할 데이터 블록과 ID가 동일한 데이터 블록이 존재하지 않는 경우에는, 새로 저장할 데이터 블록을 마지막에 저장된 데이터 블록의 다음 블록에 순차적으로 저장한다(S270). 이 경우, 기존에 메모리부(100)에 저장되어 있지 않던 새로운 ID에 대한 데이터 블록이 새로이 저장되는 것이므로, 기존의 ID에 대응되어 사용하고 있던 데이터 블록들은 그대로 사용하며 삭제 표시하지 않는다.As shown in FIG. 4 (a), when there is no data block having the same ID as the data block to be newly stored as a result of the comparison, the data block to be newly stored is sequentially stored in the next block of the last stored data block (S270). In this case, since data blocks for new IDs that have not been previously stored in the memory unit 100 are newly stored, data blocks that have been used corresponding to the existing IDs are used as they are and are not marked for deletion.

만약 ID가 동일한 데이터 블록이 존재하는 경우에는, 다음으로 동일한 ID를 가지는 데이터 블록 중 현재 사용 중인 데이터 블록과 새로 저장할 데이터 블록의 DATA필드(140)를 비교하여 DATA가 동일한지 여부를 판단한다(S230).If there is a data block with the same ID, next, compare the data field 140 of the currently used data block and the data block to be newly stored among the data blocks having the same ID to determine whether the data is the same (S230). ).

비교 결과 도 4(b)에서와 같이 DATA가 동일한 경우에는, 현재 사용 중인 데이터 블록이 새로 저장할 데이터 블록과 ID 및 DATA가 모두 동일하므로, 새로 저장할 데이터 블록을 별개의 블록에 저장하지 않고 현재 사용 중인 데이터 블록을 계속해서 사용한다(S250).As a result of comparison, when the data is the same as in FIG. 4 (b), the data block to be saved is the same as the data block to be saved, and ID and DATA are all the same. The data block is continuously used (S250).

만약 DATA가 동일하지 않은 경우에는, 새로 저장할 데이터 블록을 삭제 표시된 데이터 블록과 비교하여 재사용 가능한 데이터 블록이 있는지 여부를 판단한다(S240).If the DATA is not the same, it is determined whether there is a reusable data block by comparing the data block to be newly stored with the data block marked for deletion (S240).

이 때 재사용 가능한 데이터 블록이라 함은, 삭제 표시된 상태로 메모리부(100)에 저장되어 있는 블록으로서 새로 저장할 데이터 블록과 ID 및 DATA가 동일한 블록을 의미하되, 재사용 횟수가 소진되지 않은 블록을 의미한다. 전술한 바와 같이, 본 발명은 특정 데이터 블록이 삭제 표시되거나 혹은 재사용됨으로써 사용 상태가 변경되는 경우, 해당 데이터 블록의 STATUS필드(120)의 비트 값 중 하나가 0에서 1로 변경함으로써 현재 데이터 블록의 사용 상태를 나타내는 것을 특징으로 한다. 이와 같이 사용 상태에 따라 비트 값이 0에서 1로 변경되면, 해당 데이터 블록이 몇 회 반복하여 재사용 또는 삭제 표시 된 후(재사용 횟수는 STATUS필드(120)의 크기에 따름)에는 STATUS필드(120)의 모든 비트 값이 1로 변경되어, 더 이상 재사용이 불가능할 수도 있다. 이러한 경우에는 재사용 횟수를 소진한 것이므로, 재사용 가능한 블록으로 판단하지 않는 것이다.In this case, the reusable data block is a block stored in the memory unit 100 in a marked state of deletion and means a block having the same ID and DATA to be stored as a new data block, but a block whose reuse count has not been exhausted. . As described above, according to the present invention, when a specific data block is marked for deletion or reused to change the use state, one of the bit values of the STATUS field 120 of the corresponding data block is changed from 0 to 1 to change the current data block. It is characterized by indicating the state of use. When the bit value is changed from 0 to 1 according to the usage state, the corresponding data block is repeatedly reused or deleted (the number of reuse depends on the size of the STATUS field 120), and then the STATUS field 120 All bit values of are changed to 1, so reuse may not be possible anymore. In this case, since the number of reuse is exhausted, it is not judged as a reusable block.

상기 판단 결과 도 4(c)에서와 같이 재사용 가능 데이터 블록이 있는 경우에는, 현재 사용 중인 데이터 블록을 삭제 표시함과 동시에 새로 저장할 데이터 블록을 별개의 블록에 저장하지 않고 재사용 가능 데이터 블록을 재사용한다(S260). 이 때 현재 사용 중인 데이터 블록 및 재사용 데이터 블록은 각각 STATUS필드(120)의 비트 값 중 하나를 0에서 1로 변경한다.When there is a reusable data block as shown in FIG. 4 (c) as a result of the determination, the currently used data block is marked for deletion and the reusable data block is reused without storing the data block to be newly stored in a separate block. (S260). At this time, each of the currently used data block and the reused data block changes one of the bit values of the STATUS field 120 from 0 to 1.

한편, 상기 판단 결과 도 4(d)에서와 같이 재사용 가능 데이터 블록이 없는 경우에는, 현재 사용 중인 데이터 블록을 삭제 표시하고 새로 저장할 데이터 블록을 마지막에 저장된 데이터 블록의 다음 블록에 순차적으로 저장하고(S270), 기존에 사용 중이던 데이터의 STATUS필드(120)의 비트 값 중 하나를 0에서 1로 변경하여 삭제 표시한다. On the other hand, if there is no reusable data block as shown in FIG. 4 (d) as a result of the determination, the currently used data block is marked for deletion and the data block to be newly stored is sequentially stored in the next block of the last saved data block ( S270), changing one of the bit values of the STATUS field 120 of the data being used from 0 to 1 to mark for deletion.

이와 같이 본 발명에 따르면 새로 저장할 데이터 블록의 DATA가 현재 사용 중인 데이터 블록의 DATA와 동일하지 않은 경우라도, 삭제 표시된 데이터 블록 중 재사용 가능한 데이터 블록이 있는 경우에는 기존 저장되어 있는 데이터 블록의 STATUS필드(120)의 값만을 변경함으로써 비어있는 블록에 새로이 저장하지 않고서도 사용 데이터 블록을 변경할 수 있다. 즉, 현재 사용 중인 블록과 데이터가 다른 경우라도 바로 새로운 데이터를 저장하는 것이 아니라, 삭제 표시된 데이터를 재사용함으로써 데이터의 저장 횟수를 줄일 수 있고, 따라서 EEPROM의 Erase Cycle의 수를 줄일 수 있다.According to the present invention, even if the data of the data block to be newly stored is not the same as the data of the currently used data block, if there is a reusable data block among the data blocks marked for deletion, the STATUS field of the existing stored data block ( By changing only the value of 120), the used data block can be changed without newly storing in an empty block. That is, even if the currently used block and the data are different, instead of storing new data immediately, the number of data storage can be reduced by reusing the marked data, and thus the number of erase cycles of the EEPROM can be reduced.

이상 첨부된 도면을 참조하여 본 발명의 실시 예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시 예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art to which the present invention pertains may be implemented in other specific forms without changing the technical spirit or essential features of the present invention. You will understand. Therefore, it should be understood that the embodiments described above are illustrative in all respects and not restrictive.

10: EEPROM 제어장치
100: 메모리부 200: 제어부
110: ID필드 120: STATUS필드
130: SIZE필드 140: DATA필드
10: EEPROM control device
100: memory unit 200: control unit
110: ID field 120: STATUS field
130: SIZE field 140: DATA field

Claims (14)

복수개의 데이터 블록으로 구성된 메모리부; 및
상기 데이터 블록에 데이터를 기록 및 저장하고, 삭제 표시된 데이터 블록 중 재사용 가능한 데이터 블록이 있는 경우, 새로운 데이터 블록을 저장하지 않고 상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하도록 상기 메모리부를 제어하는 제어부;
를 포함하는 EEPROM 제어장치.
A memory unit composed of a plurality of data blocks; And
A control unit that controls the memory unit to record and store data in the data block, and to change the reusable data block to a reuse state without storing a new data block when there is a reusable data block among data blocks marked for deletion;
EEPROM control device comprising a.
제1항에 있어서,
상기 메모리부는,
EEPROM(Electrically Erasable Programmable Read Only Memory)인
EEPROM 제어장치.
According to claim 1,
The memory unit,
EEPROM (Electrically Erasable Programmable Read Only Memory)
EEPROM control.
제1항에 있어서,
상기 데이터 블록은,
ID필드, STATUS필드, SIZE필드 및 DATA필드를 포함하는
EEPROM 제어장치.
According to claim 1,
The data block,
ID field, STATUS field, SIZE field and DATA field
EEPROM control.
제3항에 있어서,
상기 STATUS필드는,
현재 사용 또는 재사용 중인 데이터 블록은 짝수 개, 삭제 표시된 데이터 블록은 홀수 개의 1을 비트 값으로 가지는
EEPROM 제어장치.
According to claim 3,
The STATUS field,
Data blocks currently being used or reused have even numbers, and data blocks marked for deletion have odd numbers of 1 as bit values.
EEPROM control.
제1항에 있어서,
상기 제어부는,
데이터 블록의 사용 상태가 변경될 경우, 상태가 변경된 데이터 블록의 STATUS필드의 비트 값 중 하나를 0에서 1로 변경하는
EEPROM 제어장치.
According to claim 1,
The control unit,
When the use status of a data block is changed, change one of the bit values in the STATUS field of the data block whose status is changed from 0 to 1.
EEPROM control.
제1항에 있어서,
상기 제어부는,
새로 저장할 데이터 블록과 현재 사용 중인 데이터 블록의 ID필드 및 DATA필드를 비교하여 상기 새로 저장할 데이터 블록을 저장할지 여부를 판단하는
EEPROM 제어장치.
According to claim 1,
The control unit,
Comparing the data block to be saved with the ID field and DATA field of the data block currently being used to determine whether to store the newly saved data block
EEPROM control.
제6항에 있어서
상기 제어부는,
상기 비교 결과 ID필드 및 DATA필드가 동일한 현재 사용 중인 데이터 블록이 존재하는 경우, 현재 사용 중인 데이터 블록을 그대로 사용하는
EEPROM 제어장치.
The method of claim 6
The control unit,
As a result of the comparison, if there is a currently used data block having the same ID field and DATA field, the current data block is used
EEPROM control.
제6항에 있어서,
상기 제어부는,
상기 비교 결과 ID필드는 동일하되 DATA필드는 상이한 데이터 블록이 존재하는 경우, 상기 새로 저장할 데이터 블록과 삭제 표시된 데이터 블록의 ID필드 및 DATA필드를 비교하여 재사용 가능 블록을 검색하는
EEPROM 제어장치.
The method of claim 6,
The control unit,
If the ID field is the same as the result of the comparison, but the DATA field has different data blocks, the reusable block is searched by comparing the ID field and the DATA field of the newly stored data block and the marked data block.
EEPROM control.
제8항에 있어서,
상기 제어부는,
상기 검색 결과 재사용 가능 데이터 블록이 존재하는 경우, 상기 재사용 가능 데이터 블록을 재사용하는
EEPROM 제어장치.
The method of claim 8,
The control unit,
If a reusable data block exists as a result of the search, reusing the reusable data block
EEPROM control.
제8항에 있어서,
상기 제어부는,
상기 검색 결과 재사용 가능 데이터 블록이 존재하지 않는 경우 상기 새로 저장할 데이터 블록을 메모리부에 저장하는
EEPROM 제어장치.
The method of claim 8,
The control unit,
When the reusable data block does not exist as a result of the search, the data block to be stored is stored in a memory unit.
EEPROM control.
EEPROM 제어 장치에 의한 EEPROM의 데이터 기록 방법에 있어서,
ID필드 별로 새로 저장할 데이터 블록과 현재 저장된 데이터 블록의 DATA필드를 비교하는 단계; 및
삭제 표시된 데이터 블록 중 재사용 가능한 데이터 블록을 검색하는 단계;
를 포함하는 EEPROM의 데이터 기록 방법.
In the EEPROM data recording method by the EEPROM control device,
Comparing a data block to be newly stored for each ID field and a DATA field of the currently stored data block; And
Searching for a reusable data block among data blocks marked for deletion;
EEPROM data recording method comprising a.
제11항에 있어서,
상기 검색하는 단계 이후,
검색 결과 재사용 가능한 데이터 블록이 존재하지 않는 경우 새로 저장할 데이터 블록을 메모리부에 저장하는 단계;
를 더 포함하는 EEPROM의 데이터 기록 방법.
The method of claim 11,
After the search step,
If a reusable data block does not exist as a result of the search, storing the data block to be newly stored in the memory unit;
EEPROM data recording method further comprising a.
제11항에 있어서,
상기 검색하는 단계 이후,
검색 결과 재사용 가능한 데이터 블록이 존재하는 경우 새로운 데이터 블록을 저장하지 않고 상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하는 단계;
를 더 포함하는 EEPROM의 데이터 기록 방법.
The method of claim 11,
After the search step,
If a reusable data block exists as a result of the search, changing the reusable data block to a reuse state without storing a new data block;
EEPROM data recording method further comprising a.
제13항에 있어서,
상기 재사용 가능한 데이터 블록을 재사용 상태로 변경하는 단계는,
상기 재사용 가능한 데이터 블록의 STATUS필드의 비트 값 중 하나를 0에서 1로 변경하는
EEPROM의 데이터 기록 방법.
The method of claim 13,
The step of changing the reusable data block to a reuse state,
Change one of the bit values in the STATUS field of the reusable data block from 0 to 1
EEPROM data recording method.
KR1020180133733A 2018-11-02 2018-11-02 Apparatus for controlling eeprom and method for writing data using same KR102142675B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180133733A KR102142675B1 (en) 2018-11-02 2018-11-02 Apparatus for controlling eeprom and method for writing data using same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180133733A KR102142675B1 (en) 2018-11-02 2018-11-02 Apparatus for controlling eeprom and method for writing data using same

Publications (2)

Publication Number Publication Date
KR20200050738A true KR20200050738A (en) 2020-05-12
KR102142675B1 KR102142675B1 (en) 2020-08-07

Family

ID=70679714

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180133733A KR102142675B1 (en) 2018-11-02 2018-11-02 Apparatus for controlling eeprom and method for writing data using same

Country Status (1)

Country Link
KR (1) KR102142675B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210076676A (en) * 2019-12-16 2021-06-24 주식회사 현대케피코 Apparatus and method for controlling eeprom
WO2021221397A1 (en) 2020-04-27 2021-11-04 주식회사 엘지에너지솔루션 Negative electrode for lithium secondary battery coated with lithiophilic material and production method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07318615A (en) * 1994-05-24 1995-12-08 Hitachi Ltd System for reducing duplication of control data
KR101430552B1 (en) * 2013-04-08 2014-08-18 인하대학교 산학협력단 A Data De-duplication and Recycling Method in SSD-based Storage System for Increasing De-duplication Rate and I/O Performance
KR20140131457A (en) * 2013-05-03 2014-11-13 인하대학교 산학협력단 An Invalid Data Recycling Method for Improving I/O Performance in SSD-based Storage System
KR101826778B1 (en) 2016-09-28 2018-03-22 현대오트론 주식회사 EEPROM Emulation Method Considering implementation of Flash Life Cycle and Performance Improvement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07318615A (en) * 1994-05-24 1995-12-08 Hitachi Ltd System for reducing duplication of control data
KR101430552B1 (en) * 2013-04-08 2014-08-18 인하대학교 산학협력단 A Data De-duplication and Recycling Method in SSD-based Storage System for Increasing De-duplication Rate and I/O Performance
KR20140131457A (en) * 2013-05-03 2014-11-13 인하대학교 산학협력단 An Invalid Data Recycling Method for Improving I/O Performance in SSD-based Storage System
KR101826778B1 (en) 2016-09-28 2018-03-22 현대오트론 주식회사 EEPROM Emulation Method Considering implementation of Flash Life Cycle and Performance Improvement

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210076676A (en) * 2019-12-16 2021-06-24 주식회사 현대케피코 Apparatus and method for controlling eeprom
WO2021221397A1 (en) 2020-04-27 2021-11-04 주식회사 엘지에너지솔루션 Negative electrode for lithium secondary battery coated with lithiophilic material and production method thereof

Also Published As

Publication number Publication date
KR102142675B1 (en) 2020-08-07

Similar Documents

Publication Publication Date Title
KR100818035B1 (en) Method, system and computer program for data management on storage medium
KR20140133427A (en) Method for managing data stored in flash memory and associated memory device and controller
CN110764704B (en) Environment variable writing method, storage medium and electronic device
KR102142675B1 (en) Apparatus for controlling eeprom and method for writing data using same
JP2009003880A (en) Control device and method for non-volatile memory and storage device
CN112397128A (en) Control method and device for Flash memory
US10776265B2 (en) Data storage devices and data processing methods
JP2004071033A (en) Data writing method for flash memory
JP2008123314A (en) Information recording method and information recording system to semiconductor storage device
WO2006030566A1 (en) Information writing/reading device of flash memory
KR101826778B1 (en) EEPROM Emulation Method Considering implementation of Flash Life Cycle and Performance Improvement
JP2008251056A (en) Semiconductor storage device and rewriting control method of semiconductor storage device
JP4235646B2 (en) Memory controller and flash memory system
US20060080350A1 (en) Allocation of file storage based on pattern recognition
KR20060106993A (en) Method for storing data in flash memory
JP2008084288A (en) Memory controller
KR20140039756A (en) Data storage device and operating method thereof
CN108304331B (en) NorFlash-based circular queue type data storage method and device
US20050108301A1 (en) Method for balancing wear when writing data in a flash memory
KR101083054B1 (en) Flash memory overwriting method and apparatus
JP4710274B2 (en) MEMORY DEVICE, MEMORY DEVICE CONTROL METHOD, AND DATA PROCESSING SYSTEM
US20090319587A1 (en) Memory controller, nonvolatile memory device, and nonvolatile memory system
JPH0764831A (en) Data storage device
JP4149640B2 (en) Semiconductor memory writing control apparatus and method
WO2015194100A1 (en) Storage device, flash memory control device, and program

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant