JPH11297082A - Method of rewriting data in flash memory and semiconductor memory - Google Patents

Method of rewriting data in flash memory and semiconductor memory

Info

Publication number
JPH11297082A
JPH11297082A JP9325098A JP9325098A JPH11297082A JP H11297082 A JPH11297082 A JP H11297082A JP 9325098 A JP9325098 A JP 9325098A JP 9325098 A JP9325098 A JP 9325098A JP H11297082 A JPH11297082 A JP H11297082A
Authority
JP
Japan
Prior art keywords
sector
data
specific data
area
flash memory
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP9325098A
Other languages
Japanese (ja)
Inventor
Seiji Kudo
政治 工藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9325098A priority Critical patent/JPH11297082A/en
Publication of JPH11297082A publication Critical patent/JPH11297082A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate the need of a memory medium for the counts of cumulative number of erasures at each sector to enable the simplification of the software by eliminating the need for counting the cumulative number of erasures at each sector of a flash memory. SOLUTION: The data rewriting method comprises providing a unique word region 3 for previously storing a plurality of unique words showing the sector being in an erase state in a flash memory, writing the unique words on data areas at unique word in-sector addresses in a sector when being in the erase state, collating, to rewrite sector data on data areas at the unique word in-sector addresses of a sector to be a candidate for the data rewriting sector with the latest unique word stored in the unique word region 3, using a collator 7, selecting this candidate sector as a data rewriting sector when the collated data agree and taking other sector as a candidate for the rewriting sector when the collated data do not agree, using the collator 7.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、セクタ単位でのア
クセスが可能で、セクタでのデータの書込み単位と消去
単位が異なり、かつ、書込み単位が消去単位よりも小さ
いフラッシュメモリのデータ書換え方法およびフラッシ
ュメモリを用いた半導体記憶装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of rewriting data in a flash memory which can be accessed in units of sectors, in which a unit of writing data in a sector is different from an erasing unit, and in which the writing unit is smaller than the erasing unit. The present invention relates to a semiconductor memory device using a flash memory.

【0002】[0002]

【従来の技術】図3は従来のフラッシュメモリを用いた
半導体記憶装置のブロック図である。図3において、1
01〜10Nはフラッシュメモリの消去サイズと等しい
サイズに分割されたセクタであり、セクタ101〜10
Nはセクタ内のデータをセクタ内アドレス毎にランダム
に読み出し,書込みが可能なセクタである。11は複数
のセクタ101〜10Nからなるセクタ領域、12はセ
クタ制御部であり、セクタ制御部12が管理するポイン
タが各セクタアドレスおよびセクタ内アドレスを自在に
移動し、読み出し,書込み,消去などフラッシュメモリ
との入出力を行なうことができるようになっている。1
3はバス、14はセクタ制御部12に指示を与えてフラ
ッシュメモリへのメモリ記憶・再生動作を制御するメモ
リ制御部、161〜16Nは各セクタに対応して一つず
つ存在し、各セクタの累積消去回数をカウントするカウ
ンタ、15は複数のカウンタ161〜16Nを含みそれ
ぞれのカウント値を記憶しているカウンタ記憶部であ
る。
2. Description of the Related Art FIG. 3 is a block diagram of a conventional semiconductor memory device using a flash memory. In FIG. 3, 1
01 to 10N are sectors divided into the same size as the erase size of the flash memory.
N is a sector in which data in the sector can be read and written randomly for each address in the sector. Numeral 11 denotes a sector area composed of a plurality of sectors 101 to 10N. Numeral 12 denotes a sector control unit. A pointer managed by the sector control unit 12 can freely move each sector address and an address in a sector to read, write, erase, etc. Input and output with the memory can be performed. 1
Reference numeral 3 denotes a bus, 14 denotes a memory control unit for giving instructions to the sector control unit 12 to control a memory storage / reproduction operation to the flash memory, and 161 to 16N exist one by one corresponding to each sector. A counter 15 for counting the number of cumulative erasures is a counter storage unit that includes a plurality of counters 161 to 16N and stores respective count values.

【0003】この従来の半導体記憶装置は、セクタ領域
11をフラッシュメモリで構成し、メモリ制御部14が
セクタ制御部12に指示を与え、その指示によりセクタ
制御部12がセクタ101〜10Nに対し読み出し,書
込み,消去を行なうようになっている。また、カウンタ
161〜16Nの各カウント値すなわち各セクタの累積
消去回数を記憶するカウンタ記憶部15を、フラッシュ
メモリとは別の記憶媒体で設けている。
In this conventional semiconductor memory device, a sector area 11 is composed of a flash memory, a memory control unit 14 gives an instruction to a sector control unit 12, and the sector control unit 12 reads the sectors 101 to 10N according to the instruction. , Writing, and erasing. Further, the counter storage unit 15 for storing the count values of the counters 161 to 16N, that is, the cumulative erase count of each sector, is provided in a storage medium different from the flash memory.

【0004】この従来の半導体記憶装置におけるフラッ
シュメモリのデータ書換え動作について説明する。ここ
では、書換え元セクタをセクタ101とし、セクタ10
1内の任意データの一部を書き換えるものとする。メモ
リ制御部14は、書換え先セクタとして例えばセクタ1
02を候補とし、カウンタ記憶部15のカウンタ162
からセクタ102の累積消去回数を読み出す。続いてメ
モリ制御部14は、フラッシュメモリが規定する最大消
去回数とカウンタ162の値とを比較し、カウンタ16
2の値が最大消去回数以上の累積消去回数であれば、書
込み先セクタの候補をセクタ102以外に変更し、上記
カウンタ記憶部15の読み出し手順以降を繰り返し行な
う。
[0004] A data rewriting operation of the flash memory in the conventional semiconductor memory device will be described. Here, the rewriting source sector is defined as sector 101, and sector 10 is rewritten.
It is assumed that part of the arbitrary data in 1 is rewritten. The memory control unit 14 determines, for example, sector 1 as a rewrite destination sector.
02 as a candidate, the counter 162 of the counter storage unit 15
, The accumulated erase count of the sector 102 is read. Subsequently, the memory control unit 14 compares the maximum number of erases specified by the flash memory with the value of the counter 162, and
If the value of 2 is the cumulative number of erasures equal to or greater than the maximum number of erasures, the candidate for the write destination sector is changed to a sector other than the sector 102, and the above-described readout procedure of the counter storage unit 15 is repeated.

【0005】カウンタ162の値が最大消去回数よりも
少ない累積消去回数であれば、メモリ制御部14は、書
換え元セクタ101および書換え先セクタ102のセク
タ内アドレスを相対的に管理し、データ書換えを行なう
書換え先セクタ102のセクタ内アドレスになるまで、
バス13を通じ、書換え元セクタ101からセクタ全体
のサイズより小さい単位のデータの読み出しをセクタ制
御部12に指示する。セクタ制御部12は、書換え元セ
クタ101よりデータを読み出し、バス13を通じてメ
モリ制御部14へデータを送出する。メモリ制御部14
は、バス13を通じ、書換え先セクタ102へのデータ
書込みをセクタ制御部12に指示する。以上の手順をデ
ータ書換えを行なう書換え先セクタ102のセクタ内ア
ドレスまで繰り返す。
If the value of the counter 162 is smaller than the maximum number of times of erasure, the memory control unit 14 relatively manages addresses in the sectors of the rewrite source sector 101 and the rewrite destination sector 102, and performs data rewrite. Until the address in the sector of the rewriting destination sector 102 is reached,
Via the bus 13, the sector controller 12 is instructed to read data of a unit smaller than the size of the entire sector from the rewrite source sector 101. The sector control unit 12 reads data from the rewrite source sector 101 and sends the data to the memory control unit 14 via the bus 13. Memory control unit 14
Instructs the sector control unit 12 to write data to the rewrite destination sector 102 via the bus 13. The above procedure is repeated up to the intra-sector address of the rewrite destination sector 102 for rewriting data.

【0006】その後、メモリ制御部14が書き換えを行
なう書換え先セクタ102のセクタ内アドレスを認識し
た際に、書換え先セクタ102への書換えデータの書込
みをバス13を通じ、セクタ制御部12に指示する。そ
の後、メモリ制御部14は、書換え元セクタ101の書
換えを行なうセクタ内アドレス以降のデータを、書換え
先セクタ102へ移動させる。これは、書換え元セクタ
101の最終セクタ内アドレスまで繰り返す。
Thereafter, when the memory control unit 14 recognizes the address in the sector of the rewrite destination sector 102 to be rewritten, the memory control unit 14 instructs the sector control unit 12 to write the rewrite data to the rewrite destination sector 102 via the bus 13. Thereafter, the memory control unit 14 moves the data after the address in the sector where the rewriting of the rewriting source sector 101 is performed to the rewriting destination sector 102. This is repeated up to the address in the last sector of the rewrite source sector 101.

【0007】その後、メモリ制御部14は書換え元セク
タ101の消去をバス13を通じ、セクタ制御部12に
指示する。セクタ制御部12が書換え元セクタ101を
消去した後、メモリ制御部14は、カウンタ記憶部15
の書換え元セクタ101のみに対応する累積消去回数の
カウンタ161に対して累積消去回数のカウントを行な
う。
After that, the memory control unit 14 instructs the sector control unit 12 to erase the rewrite source sector 101 via the bus 13. After the sector control unit 12 erases the rewrite source sector 101, the memory control unit 14
Of the counter 161 of the cumulative number of erases corresponding to only the rewrite source sector 101 is counted.

【0008】[0008]

【発明が解決しようとする課題】上記従来例では、各セ
クタの累積消去回数をカウントしておき、セクタ内のデ
ータを書き換える場合に、書換えデータを書込む以外に
累積消去回数のカウント値と最大消去回数とを比較する
必要があるため、フラッシュメモリ使用開始時からの累
積消去回数をフラッシュメモリを使用中も未使用状態に
あるときも正確に保持しつづけねばならず、かつカウン
ト値自体をフラッシュメモリに記憶することができない
ため、カウンタ記憶部15としてフラッシュメモリとは
別の記憶媒体が必要となり、また、セクタ数と同じ数の
カウンタ161〜16Nを管理するために、ソフトウェ
アが非常に複雑な制御になるという問題点があった。
In the above conventional example, the cumulative erase count of each sector is counted, and when rewriting data in a sector, the count value of the cumulative erase count and the maximum value of the cumulative erase count are rewritten in addition to writing the rewrite data. Since the number of erasures needs to be compared, the cumulative number of erasures since the start of using the flash memory must be maintained accurately both when the flash memory is in use and when it is not in use, and the count value itself is flashed. Since the memory cannot be stored in the memory, a storage medium different from the flash memory is required as the counter storage unit 15, and software is very complicated in order to manage the same number of counters 161 to 16N as the number of sectors. There was a problem of control.

【0009】本発明の目的は、各セクタの累積消去回数
をカウントすることを不要とし、したがって各セクタの
累積消去回数のカウント値を記憶しておくためのフラッ
シュメモリとは別の記憶媒体を不要とし、ソフトウェア
の簡単化が可能になるフラッシュメモリのデータ書換え
方法および半導体記憶装置を提供することである。
An object of the present invention is to eliminate the need to count the cumulative erase count of each sector, and thus eliminate the need for a storage medium separate from the flash memory for storing the count value of the cumulative erase count of each sector. It is therefore an object of the present invention to provide a flash memory data rewriting method and a semiconductor memory device that can simplify software.

【0010】[0010]

【課題を解決するための手段】請求項1記載のフラッシ
ュメモリのデータ書換え方法は、フラッシュメモリを構
成する複数のセクタのうち書換え元セクタのデータを読
み出し、この読み出したデータを複数のセクタの中から
選択した書換え先セクタに書き込み、書換え元セクタ内
のデータを消去するフラッシュメモリのデータ書換え方
法であって、セクタが消去状態であることを示す複数の
特定データを予め記憶する特定データ領域をフラッシュ
メモリ内に設け、各セクタに特定データを書き込む特定
データ書込み領域を予め設定しておき、特定データ書込
み領域に最新の特定データが書き込まれているセクタを
書換え先セクタとして選択し、書換え元セクタ内のデー
タを消去した後に書換え元セクタの特定データ書込み領
域に、特定データ領域に記憶している複数の特定データ
の中から選択した1つを次の特定データとして書き込む
ことを特徴とする。
According to a first aspect of the present invention, there is provided a data rewriting method for a flash memory which reads data of a rewriting source sector among a plurality of sectors constituting a flash memory and stores the read data in a plurality of sectors. A data rewriting method for a flash memory for writing data to a rewriting destination sector selected from the above and erasing data in a rewriting source sector, wherein a specific data area in which a plurality of specific data indicating that a sector is in an erased state is previously stored is flashed A specific data write area where specific data is written in each sector is set in advance in the memory, and a sector in which the latest specific data is written in the specific data write area is selected as a rewrite destination sector. After erasing the specified data, the specific data And writes a selected one from a plurality of specific data stored in the band as the next specified data.

【0011】このフラッシュメモリのデータ書換え方法
によれば、セクタが消去状態であることを示す複数の特
定データを予め記憶する特定データ領域をフラッシュメ
モリ内に設け、各セクタに特定データを書き込む特定デ
ータ書込み領域を予め設定しておくため、特定データ書
込み領域に最新の特定データが書き込まれているセクタ
は書込み可能であり、そのセクタを書換え先セクタとし
て選択するようにしたことにより、従来のような各セク
タの累積消去回数をカウントすることを不要とし、した
がって各セクタの累積消去回数のカウント値を記憶して
おくためのフラッシュメモリとは別の記憶媒体が不要と
なり、さらにソフトウェアの簡単化が可能になる。
According to this data rewriting method for a flash memory, a specific data area in which a plurality of specific data indicating that a sector is in an erased state is provided in the flash memory in advance, and the specific data area for writing the specific data to each sector is provided. Since the write area is set in advance, the sector in which the latest specific data has been written in the specific data write area is writable, and the sector is selected as a rewrite destination sector. Eliminates the need to count the cumulative erase count for each sector, thus eliminating the need for a separate storage medium from the flash memory to store the cumulative erase count count for each sector, further simplifying software become.

【0012】請求項2記載のフラッシュメモリのデータ
書換え方法は、請求項1記載のフラッシュメモリのデー
タ書換え方法において、フラッシュメモリの特定データ
領域に記憶する複数の特定データは、各セクタに対応す
る特定データからなることを特徴とする。このように、
各セクタに対応する特定データを用いることにより、各
セクタが書込み可能か否かの判断の信頼性が高くなる。
A flash memory data rewriting method according to a second aspect of the present invention is the flash memory data rewriting method according to the first aspect, wherein the plurality of specific data stored in the specific data area of the flash memory is a specific data corresponding to each sector. It consists of data. in this way,
By using the specific data corresponding to each sector, the reliability of determining whether or not each sector is writable is increased.

【0013】請求項3記載の半導体記憶装置は、各々の
領域内に消去状態であることを示す特定データを書き込
む特定データ書込み領域が予め設定された複数のセクタ
と、特定データを予め複数記憶する特定データ領域とを
有したフラッシュメモリと、フラッシュメモリに対しデ
ータの読み出し,書き込みおよび消去を行なうセクタ制
御部と、複数のセクタのうち書換え元セクタのデータを
読み出してこの読み出したデータを複数のセクタの中か
ら選択した書換え先セクタに書き込みを行なう際に、書
換え先セクタの候補となるセクタの特定データ書込み領
域のデータと、特定データ領域に記憶されている最新の
特定データとを照合する照合部と、セクタ制御部に指示
を出すとともに、照合部による照合結果が一致したとき
に書換え先セクタの候補となるセクタを書換え先セクタ
として選択し、照合部による照合結果が不一致のときに
は他のセクタを書換え先セクタの候補とするメモリ制御
部とを備え、データを消去した書換え元セクタの特定デ
ータ書込み領域に、特定データ領域に記憶している複数
の特定データの中から選択した1つを次の特定データと
して書き込むようにしている。
According to a third aspect of the present invention, in the semiconductor memory device, a plurality of sectors in which specific data write areas for writing specific data indicating an erased state are set in each area and a plurality of specific data are stored in advance. A flash memory having a specific data area; a sector control unit for reading, writing, and erasing data from and to the flash memory; and reading data from a rewrite source sector among the plurality of sectors and transferring the read data to a plurality of sectors. When writing to a rewrite destination sector selected from among the above, a collation unit that collates data in a specific data write area of a sector that is a candidate for a rewrite destination sector with the latest specific data stored in the specific data area. To the sector control unit, and when the collation result by the collation unit matches, the A memory control unit for selecting a candidate sector as a rewriting destination sector, and when the collation result by the collating unit does not match, a memory control unit for selecting another sector as a candidate for the rewriting destination sector; In the area, one selected from a plurality of specific data stored in the specific data area is written as the next specific data.

【0014】この構成によれば、セクタが消去状態であ
ることを示す複数の特定データを予め記憶する特定デー
タ領域をフラッシュメモリ内に設け、各セクタに特定デ
ータを書き込む特定データ書込み領域を予め設定してお
くため、セクタ内のデータの書換えを行なう際に、特定
データ書込み領域に最新の特定データが書き込まれてい
るセクタは書込み可能であり、そのセクタを書換え先セ
クタとして選択するようにしたことにより、従来のよう
な各セクタの累積消去回数をカウントすることを不要と
し、したがって各セクタの累積消去回数のカウント値を
記憶しておくためのフラッシュメモリとは別の記憶媒体
が不要となり、さらにソフトウェアの簡単化が可能にな
る。
According to this configuration, the specific data area for storing a plurality of specific data indicating that the sector is in the erased state is provided in the flash memory, and the specific data write area for writing the specific data in each sector is set in advance. Therefore, when rewriting data in a sector, the sector in which the latest specific data has been written in the specific data write area is writable, and that sector is selected as the rewrite destination sector. This eliminates the need for counting the cumulative erase count of each sector as in the related art, and thus eliminates the need for a storage medium separate from the flash memory for storing the count value of the cumulative erase count of each sector. Software can be simplified.

【0015】請求項4記載の半導体記憶装置は、請求項
3記載の半導体記憶装置において、フラッシュメモリの
特定データ領域に記憶する複数の特定データは、各セク
タに対応する特定データからなることを特徴とする。こ
のように、各セクタに対応する特定データを用いること
により、各セクタが書込み可能か否かの判断の信頼性が
高くなる。
According to a fourth aspect of the present invention, in the semiconductor memory device according to the third aspect, the plurality of specific data stored in the specific data area of the flash memory comprises specific data corresponding to each sector. And As described above, by using the specific data corresponding to each sector, the reliability of determining whether each sector is writable is improved.

【0016】[0016]

【発明の実施の形態】以下本発明の実施の形態につい
て、図面を参照しながら説明する。図1は本発明の実施
の形態における半導体記憶装置のブロック図である。図
1において、111〜11Nはフラッシュメモリの消去
サイズと等しいサイズに分割されたセクタであり、セク
タ111〜11Nはセクタ内のデータをセクタ内アドレ
ス毎にランダムに読み出し,書込みが可能なセクタであ
る。2は複数のセクタ111〜11Nからなるセクタ領
域、3は複数のユニークワードを記憶し、読み出しが可
能なユニークワード領域、4は管理するポインタが各セ
クタアドレスおよびセクタ内アドレスを自在に移動し、
読み出し,書込み,消去することができるセクタ制御
部、5はフラッシュメモリの各セクタ間の連続性を制御
(複数のセクタを順番意識しながら連続にチェインさせ
たりする制御)し、かつ書込み済み(書込み不可能),
消去済み(書込み可能)といった個々のセクタの状態の
情報を一時的に保持できるメモリ制御部、6はセクタ制
御部4とメモリ制御部5とを接続するバス、7はメモリ
制御部5からのデータを照合し、その照合結果を返答す
る照合部である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a semiconductor memory device according to an embodiment of the present invention. In FIG. 1, reference numerals 111 to 11N denote sectors divided into a size equal to the erase size of the flash memory, and sectors 111 to 11N are sectors in which data in the sector can be read and written randomly for each address in the sector. . 2 is a sector area composed of a plurality of sectors 111 to 11N, 3 is a unique word area in which a plurality of unique words are stored, and is readable, and 4 is a pointer to be managed which moves freely between each sector address and an address in a sector.
A sector controller 5 capable of reading, writing, and erasing controls the continuity between the respective sectors of the flash memory (controls such that a plurality of sectors are continuously chained while being aware of the order), and has already been written (written). impossible),
A memory control unit that can temporarily hold information on the status of each sector such as erased (writable), 6 is a bus connecting the sector control unit 4 and the memory control unit 5, and 7 is data from the memory control unit 5. This is a collating unit that verifies the collation and returns the collation result.

【0017】本実施の形態の半導体記憶装置では、従来
セクタ領域として使用していた一部をユニークワード領
域3に用いてあり、ユニークワード領域3およびセクタ
領域2をフラッシュメモリで構成している。ユニークワ
ード領域3には、予め、セクタが消去状態であることを
示すユニークワード(特定データ)を複数記憶してお
く。そして、各セクタには、消去状態となったときに、
ユニークワード用セクタ内アドレス(特定のセクタ内ア
ドレス)のデータ領域(特定データ書込み領域)に、ユ
ニークワード領域3の複数のユニークワードの中から選
択された1つが次のユニークワードとして書き込まれ、
消去状態となる毎に異なるユニークワードが選択されて
書き込まれる。
In the semiconductor memory device of the present embodiment, a part which has been conventionally used as a sector area is used for a unique word area 3, and the unique word area 3 and the sector area 2 are constituted by flash memories. The unique word area 3 previously stores a plurality of unique words (specific data) indicating that the sector is in the erased state. Then, when each sector enters the erased state,
One selected from the plurality of unique words in the unique word area 3 is written as the next unique word in the data area (specific data write area) of the unique word sector address (specific sector address),
A different unique word is selected and written every time the erase state is entered.

【0018】そして、照合部7を設けてあり、セクタの
データの書換えを行なう際に、書換え先セクタの候補と
なるセクタのユニークワード用セクタ内アドレスのデー
タ領域のデータと、ユニークワード領域3に記憶されて
いる最新ユニークワード(現在消去状態であることを示
すユニークワード)とを照合する。また、メモリ制御部
5は、照合部7の照合結果が一致したときに書換え先セ
クタの候補となるセクタを書換え先セクタとして選択
し、照合部7の照合結果が不一致のときには他のセクタ
を書換え先セクタの候補とするようにしている。
A collation unit 7 is provided, and when rewriting data of a sector, the data of the data area of the address within the unique word sector of the sector which is a candidate for the rewriting destination sector and the unique word area 3 The stored latest unique word (unique word indicating that it is currently in the erased state) is collated. The memory control unit 5 selects a sector as a rewrite destination sector when the collation result of the collation unit 7 matches, and rewrites another sector when the collation result of the collation unit 7 does not match. It is set as a candidate for the destination sector.

【0019】このように構成される本実施の形態の半導
体記憶装置のセクタ領域2におけるデータ書換え方法、
すなわちフラッシュメモリのデータ書換え方法につい
て、さらに図2に示すフローチャートを参照しながら説
明する。ここでは、セクタ領域2内に配置されたセクタ
111は既に複数のデータが書込まれているものとす
る。書換え元セクタをセクタ111とし、セクタ111
内の一部のデータを書き換えるとものとする。
The data rewriting method in the sector area 2 of the semiconductor memory device according to the present embodiment configured as described above,
That is, the data rewriting method of the flash memory will be further described with reference to the flowchart shown in FIG. Here, it is assumed that a plurality of data has already been written in the sector 111 arranged in the sector area 2. The rewriting source sector is defined as a sector 111, and the sector 111
It is assumed that a part of the data is rewritten.

【0020】まず、メモリ制御部5は、例えばセクタ1
12を書換え先セクタの候補として選定する(ステップ
S1)。次に、ステップS2において、メモリ制御部5
は、バス6を通じセクタ制御部4に、書換え先セクタ1
12のユニークワード用セクタ内アドレスのデータ領域
に書き込まれているユニークワード(以下「書込み済ユ
ニークワード」という)の読み出しを指示する。セクタ
制御部4は、書換え先セクタ112のユニークワード用
セクタ内アドレスのデータ領域から書込み済ユニークワ
ードを読み出し、バス6を通じてメモリ制御部5に送出
する。その後、メモリ制御部5は読み出した書込み済ユ
ニークワードを照合部7に転送する。
First, the memory control unit 5, for example,
12 is selected as a candidate for the rewriting destination sector (step S1). Next, in step S2, the memory control unit 5
Is transmitted to the sector control unit 4 via the bus 6 and
An instruction is issued to read a unique word (hereinafter referred to as “written unique word”) written in the data area of the 12 unique word sector addresses. The sector control unit 4 reads out the written unique word from the data area of the address within the unique word sector of the rewrite destination sector 112 and sends it to the memory control unit 5 through the bus 6. After that, the memory control unit 5 transfers the read written unique word to the collation unit 7.

【0021】次に、ステップS3において、メモリ制御
部5は、バス6を通じセクタ制御部4に、ユニークワー
ド領域3から最新ユニークワードの読み出しを指示す
る。セクタ制御部4は、ユニークワード領域3から最新
ユニークワードを読み出し、バス6を通じてメモリ制御
部5に送出する。その後、メモリ制御部5は最新ユニー
クワードを照合部7に転送する。
Next, in step S3, the memory control unit 5 instructs the sector control unit 4 via the bus 6 to read the latest unique word from the unique word area 3. The sector control unit 4 reads out the latest unique word from the unique word area 3 and sends it to the memory control unit 5 via the bus 6. After that, the memory control unit 5 transfers the latest unique word to the matching unit 7.

【0022】次に、ステップS4において、照合部7
は、書込み済ユニークワードと最新ユニークワードとを
照合し、その照合結果をメモリ制御部5に返答する。照
合結果が一致しなかった場合、メモリ制御部5は、セク
タ112を書込み不可能と判断し、ステップS1に戻
り、セクタ112以外のセクタを書換え先セクタの候補
として選定し、以下同様にしてステップS4で、書込み
済ユニークワードと最新ユニークワードとの照合結果が
一致するまで繰り返す。
Next, in step S4, the collating unit 7
Compares the written unique word with the latest unique word, and returns a result of the comparison to the memory control unit 5. If the collation results do not match, the memory control unit 5 determines that the sector 112 is not writable, returns to step S1, selects a sector other than the sector 112 as a candidate for a rewrite destination sector, and similarly proceeds to step S1. In S4, the process is repeated until the collation result between the written unique word and the latest unique word matches.

【0023】ステップS4で照合結果が一致した場合に
ついて説明する。ここでは、セクタ112を書換え先セ
クタの候補としたときに照合結果が一致し、メモリ制御
部5は、セクタ112を書込み可能なセクタと判断し、
書換え先セクタとして選択したものとする。次に、メモ
リ制御部5は、書換え元セクタ111および書換え先セ
クタ112のセクタ内アドレスを相対的に管理し、書換
え先セクタ112の書換えを行なうセクタ内アドレスに
なるまで、バス6を通じセクタ制御部4に、書換え元セ
クタ111からセクタ全体のサイズより小さい単位のデ
ータの読み出しを指示する。セクタ制御部4は書換え元
セクタ111よりデータを読み出し、バス6を通じてメ
モリ制御部5へデータを送出する。メモリ制御部5はバ
ス6を通じ、書換え先セクタ112への書込みをセクタ
制御部4に指示する。以上の手順を、書換え先セクタ1
12の書換えを行なうセクタ内アドレスまで繰り返す
(ステップS5,S6,S8,S9,S10の繰り返し
ルート)。
The case where the collation results match in step S4 will be described. Here, when the sector 112 is set as a candidate for the rewrite destination sector, the matching results match, and the memory control unit 5 determines that the sector 112 is a writable sector,
It is assumed that the sector is selected as a rewrite destination sector. Next, the memory control unit 5 relatively manages the intra-sector addresses of the rewrite source sector 111 and the rewrite destination sector 112, and controls the sector control unit through the bus 6 until the address in the sector at which the rewrite destination sector 112 is rewritten is reached. Instruct 4 to read data of a unit smaller than the size of the entire sector from the rewrite source sector 111. The sector control unit 4 reads data from the rewrite source sector 111 and sends the data to the memory control unit 5 via the bus 6. The memory control unit 5 instructs the sector control unit 4 to write to the rewrite destination sector 112 via the bus 6. The above procedure is performed in the rewriting destination sector 1
The repetition is repeated up to the address in the sector where the rewriting is performed (step S5, S6, S8, S9, S10).

【0024】そして、ステップS6で、メモリ制御部5
が書換え先セクタ112の書換えを行なうセクタ内アド
レスを認識すると、書換え先セクタ112への書換えデ
ータの書込みをバス6を通じ、セクタ制御部4に指示す
る。その後、メモリ制御部5は、書換え元セクタ111
の書換えを行なうセクタ内アドレス以降のデータを、書
換え先セクタ112へ移動させる。これは、書換え元セ
クタ111の最終セクタ内アドレスまで、あるいは残り
の全データが移動するまで繰り返す(ステップS5,S
6,,S7,S8,S9,S10の繰り返しルート)。
なお、各セクタは、通常書き換えるデータより充分に大
きな容量をもつため、データ移動のうちほとんどはその
ままで、ステップS7で実際に書き換えるデータを準備
している。
Then, in step S6, the memory control unit 5
Recognizes the address in the sector where the rewrite destination sector 112 is to be rewritten, and instructs the sector control unit 4 via the bus 6 to write the rewrite data to the rewrite destination sector 112. Thereafter, the memory control unit 5 sets the rewrite source sector 111
The data after the address in the sector where the rewriting is performed is moved to the rewriting destination sector 112. This is repeated until the address within the last sector of the rewrite source sector 111 or until all the remaining data is moved (steps S5 and S5).
6, repetition route of S7, S8, S9, S10).
Since each sector has a sufficiently larger capacity than the data to be normally rewritten, data to be actually rewritten is prepared in step S7 while most of the data movement is not changed.

【0025】その後、ステップS11において、メモリ
制御部5は、書換え元セクタ111の消去を、バス6を
通じセクタ制御部4に指示する。セクタ制御部4は書換
え元セクタ111のデータ消去を行なう。次に、ステッ
プS12において、メモリ制御部5は、バス6を通じセ
クタ制御部4に指示して、ユニークワード領域3から今
回のデータ書換えに対応した次のユニークワードを読み
出し、消去されている書換え元セクタ111のユニーク
ワード用セクタ内アドレスのデータ領域に、読み出した
ユニークワードを書込む(ステップS13)。
Thereafter, in step S11, the memory control unit 5 instructs the sector control unit 4 to erase the rewrite source sector 111 through the bus 6. The sector control unit 4 erases data in the rewrite source sector 111. Next, in step S12, the memory control unit 5 instructs the sector control unit 4 via the bus 6 to read the next unique word corresponding to the current data rewriting from the unique word area 3, and The read unique word is written into the data area of the unique word address within the sector 111 (step S13).

【0026】以上のように本実施の形態によれば、セク
タが消去状態であることを示すユニークワードを予め複
数記憶するユニークワード領域3をフラッシュメモリ内
に設け、各セクタにユニークワードを書き込むユニーク
ワード用セクタ内アドレスのデータ領域を予め設定して
おくため、セクタ内のデータの書換えを行なう際に、ユ
ニークワード用セクタ内アドレスのデータ領域に最新ユ
ニークワードが書き込まれているセクタは書込み可能で
あり、そのセクタを書換え先セクタとして選択するよう
にしたことにより、従来のような各セクタの累積消去回
数をカウントすることを不要とし、したがって各セクタ
の累積消去回数のカウント値を記憶しておくためのフラ
ッシュメモリとは別の記憶媒体が不要となり、さらにソ
フトウェアの簡単化が可能になる。
As described above, according to the present embodiment, a unique word area 3 for previously storing a plurality of unique words indicating that a sector is in an erased state is provided in a flash memory, and a unique word is written in each sector. Since the data area of the word sector address is set in advance, when rewriting data in the sector, the sector in which the latest unique word has been written in the data area of the unique word sector address can be written. Yes, the sector is selected as a rewrite destination sector, so that it is not necessary to count the cumulative erase count of each sector as in the related art. Therefore, the count value of the cumulative erase count of each sector is stored. This eliminates the need for a storage medium separate from the flash memory for It becomes possible.

【0027】なお、ユニークワード領域3に、各セクタ
に対応してユニークワードを記憶しておき、各セクタに
それに対応するユニークワードを書き込むようにするこ
とにより、各セクタが書込み可能か否かの判断の信頼性
が高くなる。また、照合部7を設けているが、この照合
部7は、従来例の図3のカウンタ記憶部15に比べて回
路規模が小さく、半導体記憶装置全体の小型化を図るこ
とができる。
By storing a unique word corresponding to each sector in the unique word area 3 and writing a unique word corresponding to each sector, whether each sector is writable or not is determined. The reliability of the judgment increases. Although the collating unit 7 is provided, the collating unit 7 has a smaller circuit size than the conventional counter storage unit 15 of FIG. 3 and can reduce the size of the entire semiconductor memory device.

【0028】なお、本実施の形態の半導体記憶装置で
は、セクタ領域2の各セクタ111〜11Nに書き込む
データとしては、ディジタルデータ、特に音声のディジ
タルデータが適している。
In the semiconductor memory device of the present embodiment, digital data, particularly audio digital data, is suitable as data to be written in each of the sectors 111 to 11N of the sector area 2.

【0029】[0029]

【発明の効果】以上のように本発明によれば、セクタが
消去状態であることを示す複数の特定データを予め記憶
する特定データ領域をフラッシュメモリ内に設け、各セ
クタに特定データを書き込む特定データ書込み領域を予
め設定しておくため、セクタ内のデータの書換えを行な
う際に、特定データ書込み領域に最新の特定データが書
き込まれているセクタは書込み可能であり、そのセクタ
を書換え先セクタとして選択するようにしたことによ
り、従来のような各セクタの累積消去回数をカウントす
ることを不要とし、したがって各セクタの累積消去回数
のカウント値を記憶しておくためのフラッシュメモリと
は別の記憶媒体が不要となり、さらにソフトウェアの簡
単化が可能になる。
As described above, according to the present invention, a specific data area for previously storing a plurality of specific data indicating that a sector is in an erased state is provided in a flash memory, and specific data is written in each sector. Since the data write area is set in advance, when data in the sector is rewritten, the sector in which the latest specific data has been written in the specific data write area can be written, and that sector is set as the rewrite destination sector. The selection eliminates the necessity of counting the cumulative erase count of each sector as in the related art, and is therefore different from the flash memory for storing the count value of the cumulative erase count of each sector. No media is required, and software can be simplified.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態における半導体記憶装置の
ブロック図。
FIG. 1 is a block diagram of a semiconductor memory device according to an embodiment of the present invention.

【図2】本発明の実施の形態におけるデータ書換え方法
を示すフローチャート。
FIG. 2 is a flowchart showing a data rewriting method according to the embodiment of the present invention.

【図3】従来の半導体記憶装置のブロック図。FIG. 3 is a block diagram of a conventional semiconductor memory device.

【符号の説明】[Explanation of symbols]

111〜11N セクタ 2 セクタ領域 3 ユニークワード領域 4 セクタ制御部 5 メモリ制御部 6 バス 7 照合部 111-11N Sector 2 Sector area 3 Unique word area 4 Sector control unit 5 Memory control unit 6 Bus 7 Collation unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 フラッシュメモリを構成する複数のセク
タのうち書換え元セクタのデータを読み出し、この読み
出したデータを前記複数のセクタの中から選択した書換
え先セクタに書き込み、前記書換え元セクタ内のデータ
を消去するフラッシュメモリのデータ書換え方法であっ
て、 前記セクタが消去状態であることを示す複数の特定デー
タを予め記憶する特定データ領域を前記フラッシュメモ
リ内に設け、各セクタに前記特定データを書き込む特定
データ書込み領域を予め設定しておき、 前記特定データ書込み領域に最新の前記特定データが書
き込まれているセクタを前記書換え先セクタとして選択
し、前記書換え元セクタ内のデータを消去した後に前記
書換え元セクタの前記特定データ書込み領域に、前記特
定データ領域に記憶している前記複数の特定データの中
から選択した1つを次の特定データとして書き込むこと
を特徴とするフラッシュメモリのデータ書換え方法。
1. A method for reading data of a rewrite source sector among a plurality of sectors constituting a flash memory, writing the read data to a rewrite destination sector selected from the plurality of sectors, and rewriting data in the rewrite source sector. A data rewriting method for a flash memory for erasing data, wherein a specific data area in which a plurality of specific data indicating that the sector is in an erased state is stored in advance in the flash memory, and the specific data is written to each sector A specific data write area is set in advance, a sector in which the latest specific data is written in the specific data write area is selected as the rewrite destination sector, and the data in the rewrite source sector is erased before the rewrite. Stored in the specific data area in the specific data write area of the original sector Serial plurality of data rewriting method of a flash memory and writes the selected one from among the specified data as the next specified data.
【請求項2】 フラッシュメモリの特定データ領域に記
憶する複数の特定データは、各セクタに対応する特定デ
ータからなることを特徴とする請求項1記載のフラッシ
ュメモリのデータ書換え方法。
2. The flash memory data rewriting method according to claim 1, wherein the plurality of specific data stored in the specific data area of the flash memory includes specific data corresponding to each sector.
【請求項3】 各々の領域内に消去状態であることを示
す特定データを書き込む特定データ書込み領域が予め設
定された複数のセクタと、前記特定データを予め複数記
憶する特定データ領域とを有したフラッシュメモリと、 前記フラッシュメモリに対しデータの読み出し,書き込
みおよび消去を行なうセクタ制御部と、 前記複数のセクタのうち書換え元セクタのデータを読み
出してこの読み出したデータを前記複数のセクタの中か
ら選択した書換え先セクタに書き込みを行なう際に、前
記書換え先セクタの候補となるセクタの前記特定データ
書込み領域のデータと、前記特定データ領域に記憶され
ている最新の前記特定データとを照合する照合部と、 前記セクタ制御部に指示を出すとともに、前記照合部に
よる照合結果が一致したときに前記書換え先セクタの候
補となるセクタを前記書換え先セクタとして選択し、前
記照合部による照合結果が不一致のときには他のセクタ
を前記書換え先セクタの候補とするメモリ制御部とを備
え、 データを消去した前記書換え元セクタの前記特定データ
書込み領域に、前記特定データ領域に記憶している前記
複数の特定データの中から選択した1つを次の特定デー
タとして書き込むようにした半導体記憶装置。
3. A plurality of sectors in which a specific data write area for writing specific data indicating an erased state in each area is set in advance, and a specific data area in which a plurality of the specific data are stored in advance. A flash memory; a sector control unit for reading, writing, and erasing data from and to the flash memory; reading data of a rewrite source sector among the plurality of sectors; and selecting the read data from the plurality of sectors A collating unit for collating the data of the specific data write area of the candidate sector for the rewrite destination sector with the latest specific data stored in the specific data area when writing to the rewritten destination sector And issues an instruction to the sector control unit, and when the matching result by the matching unit matches, A memory control unit for selecting a sector as a candidate for a rewrite destination sector as the rewrite destination sector, and when the collation result by the collation unit does not match, a memory control unit for making another sector a candidate for the rewrite destination sector; A semiconductor memory device in which one selected from the plurality of specific data stored in the specific data area is written as the next specific data in the specific data write area of the rewrite source sector.
【請求項4】 フラッシュメモリの特定データ領域に記
憶する複数の特定データは、各セクタに対応する特定デ
ータからなることを特徴とする請求項3記載のの半導体
記憶装置。
4. The semiconductor memory device according to claim 3, wherein the plurality of specific data stored in the specific data area of the flash memory comprises specific data corresponding to each sector.
JP9325098A 1998-04-06 1998-04-06 Method of rewriting data in flash memory and semiconductor memory Pending JPH11297082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9325098A JPH11297082A (en) 1998-04-06 1998-04-06 Method of rewriting data in flash memory and semiconductor memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9325098A JPH11297082A (en) 1998-04-06 1998-04-06 Method of rewriting data in flash memory and semiconductor memory

Publications (1)

Publication Number Publication Date
JPH11297082A true JPH11297082A (en) 1999-10-29

Family

ID=14077270

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9325098A Pending JPH11297082A (en) 1998-04-06 1998-04-06 Method of rewriting data in flash memory and semiconductor memory

Country Status (1)

Country Link
JP (1) JPH11297082A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383431B2 (en) 2002-06-11 2008-06-03 Seiko Epson Corporation Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383431B2 (en) 2002-06-11 2008-06-03 Seiko Epson Corporation Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory

Similar Documents

Publication Publication Date Title
US6154808A (en) Method and apparatus for controlling data erase operations of a non-volatile memory device
KR100871027B1 (en) Data recorder and method for recording data in flash memory
US6591328B1 (en) Non-volatile memory storing address control table data formed of logical addresses and physical addresses
US8327068B2 (en) Memory module, memory controller, nonvolatile storage, nonvolatile storage system, and memory read/write method
US7647470B2 (en) Memory device and controlling method for elongating the life of nonvolatile memory
US20080250188A1 (en) Memory Controller, Nonvolatile Storage, Nonvolatile Storage System, and Memory Control Method
WO2009096180A1 (en) Memory controller, nonvolatile storage device, and nonvolatile storage system
US20070033364A1 (en) Information recording medium, information recording medium accessing apparatus and accessing method
JPH10326493A (en) Compounded flash memory device
US5724544A (en) IC memory card utilizing dual eeproms for image and management data
JPH06124175A (en) Semiconductor disk device
JP5180957B2 (en) Memory controller, semiconductor recording device, and rewrite count notification method
WO2005008499A1 (en) Data area managing method in information recording medium and information processor employing data area managing method
EP1330715A2 (en) Storing device, storing control method and program
JP2003058417A (en) Storage device
JP4235646B2 (en) Memory controller and flash memory system
JPH113287A (en) Storage device and storage area management method used for the device
JPH07153284A (en) Non-volatile semiconductor memory and its control method
JPH11297082A (en) Method of rewriting data in flash memory and semiconductor memory
JP2008084288A (en) Memory controller
JP2008009699A (en) Writing method for nonvolatile memory
JP2007199828A (en) Nonvolatile storage device and address management method
JPH0773098A (en) Data write method
US6523105B1 (en) Recording medium control device and method
JPH0764831A (en) Data storage device