JPH10240627A - Sector management method and device - Google Patents

Sector management method and device

Info

Publication number
JPH10240627A
JPH10240627A JP4171497A JP4171497A JPH10240627A JP H10240627 A JPH10240627 A JP H10240627A JP 4171497 A JP4171497 A JP 4171497A JP 4171497 A JP4171497 A JP 4171497A JP H10240627 A JPH10240627 A JP H10240627A
Authority
JP
Japan
Prior art keywords
sector
stored
sectors
storage means
data
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.)
Withdrawn
Application number
JP4171497A
Other languages
Japanese (ja)
Inventor
Akihiro Ishikawa
章弘 石川
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4171497A priority Critical patent/JPH10240627A/en
Publication of JPH10240627A publication Critical patent/JPH10240627A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable access to a data storage area storing data unrelated to the data for which a write error is generated even in the case that the write error is generated at the time of writing the data and to simplify a pointer operation at the time of reading the data in the case of managing the sectors of a semiconductor storage device formed by dividing a storage area into the plural pieces of the sectors. SOLUTION: All the sectors #0-#63 are handled as the sectors for storing the data. In the last byte areas B0-n-B63-n of the sectors #0-#63, the number of the sector to be connected next is stored in the case that the sector to be connected next is present and '0' is stored in the case that no sector to be connected next is present as a pointer for indicating the connection of the sector.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、記憶領域を複数個
のセクタに分割してなる半導体記憶装置のセクタを管理
するセクタ管理方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sector management method and apparatus for managing sectors of a semiconductor memory device having a storage area divided into a plurality of sectors.

【0002】[0002]

【従来の技術】図11は従来のセクタ管理方法が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。図11中、#0〜#21、#61〜#63はセク
タであり、セクタ#22〜#60は図示を省略してい
る。
2. Description of the Related Art FIG. 11 is a conceptual diagram showing a storage area of an example of a flash memory to which a conventional sector management method is applied. In FIG. 11, # 0 to # 21 and # 61 to # 63 are sectors, and sectors # 22 to # 60 are not shown.

【0003】この例では、セクタ#3〜#63からなる
記憶領域A2は、データを記憶するデータ記憶領域とさ
れ、セクタ#0〜#2からなる記憶領域A1は、データ
記憶領域A2のセクタ#3〜#63のうち、データを記
憶しているセクタの繋がりを示すポインタを記憶するポ
インタ記憶領域とされている。
In this example, a storage area A2 composed of sectors # 3 to # 63 is a data storage area for storing data, and a storage area A1 composed of sectors # 0 to # 2 is a sector # 2 of the data storage area A2. Among 3 to # 63, the pointer storage area is used to store a pointer indicating a connection between sectors storing data.

【0004】ここに、セクタ#0〜#63の各バイト領
域B0−0〜B63−nの記憶値は、初期状態において
は、255(=FF16)とされているが、たとえば、セ
クタ#3、#4、#5、#6からなる記憶領域C1にセ
クタ#3→#4→#5→#6と繋がるデータが記憶され
た場合には、セクタ#0のポインタの状態は、図12に
示すようになる。
Here, the storage value of each byte area B0-0 to B63-n of sectors # 0 to # 63 is 255 (= FF 16 ) in the initial state. When data linked to sectors # 3 → # 4 → # 5 → # 6 is stored in the storage area C1 including # 4, # 5, and # 6, the state of the pointer of sector # 0 is as shown in FIG. As shown.

【0005】即ち、バイト領域B0−0には、セクタ#
3に繋がるセクタ#4のセクタ番号[4]が記憶され、
バイト領域B0−1には、セクタ#4に繋がるセクタ#
5のセクタ番号[5]が記憶され、バイト領域B0−2
には、セクタ#5に繋がるセクタ#6のセクタ番号
[6]が記憶され、セクタ#6は次に繋がるセクタがな
いので、バイト領域B0−3には、次に繋がるセクタが
存在しないことを示す[0]が記憶される。
That is, in the byte area B0-0, the sector #
Sector number [4] of sector # 4 connected to No. 3 is stored,
Sector # connected to sector # 4 is located in byte area B0-1.
5 is stored in the byte area B0-2.
Stores the sector number [6] of the sector # 6 connected to the sector # 5. Since the sector # 6 has no next connected sector, it is determined that there is no next connected sector in the byte area B0-3. [0] is stored.

【0006】更に、たとえば、セクタ#7、#8、#
9、#10、#11からなる記憶領域C2にセクタ#7
→#8→#9→#10→#11と繋がるデータが記憶さ
れた場合には、セクタ#0のポインタの状態は、図13
に示すようになる。
Further, for example, sectors # 7, # 8, #
Sector # 7 in storage area C2 consisting of # 9, # 10 and # 11
When data connected to # 8 → # 9 → # 10 → # 11 is stored, the state of the pointer of sector # 0 is as shown in FIG.
It becomes as shown in.

【0007】即ち、バイト領域B0−4には、セクタ#
7に繋がるセクタ#8のセクタ番号[8]が記憶され、
バイト領域B0−5には、セクタ#8に繋がるセクタ#
9のセクタ番号[9]が記憶され、バイト領域B0−6
には、セクタ#9に繋がるセクタ#10のセクタ番号
[10]が記憶され、バイト領域B0−7には、セクタ
#10に繋がるセクタ#11のセクタ番号[11]が記
憶され、セクタ#11は次に繋がるセクタがないので、
バイト領域B0−8には、次に繋がるセクタが存在しな
いことを示す[0]が記憶される。
That is, in the byte area B0-4, the sector #
The sector number [8] of the sector # 8 connected to No. 7 is stored,
The byte area B0-5 has a sector # connected to the sector # 8.
9 is stored in the byte area B0-6.
Stores the sector number [10] of the sector # 10 connected to the sector # 9, the byte area B0-7 stores the sector number [11] of the sector # 11 connected to the sector # 10, and the sector # 11. Has no sector to connect to next,
[0] indicating that the next connected sector does not exist is stored in the byte area B0-8.

【0008】[0008]

【発明が解決しようとする課題】この例のように、従来
のセクタ管理方法においては、ポインタ記憶用のセクタ
(前例では、セクタ#0〜#2)を設定することにより
セクタ管理を行うとしているので、ポインタ記憶用のセ
クタで書込みエラーが発生した場合には、書込みエラー
が発生したポインタ記憶用のセクタを共用しているデー
タ記憶領域に対するアクセスが不可能になってしまうと
いう問題点があった。
As in this example, in the conventional sector management method, sector management is performed by setting a sector for storing a pointer (sectors # 0 to # 2 in the previous example). Therefore, when a write error occurs in the pointer storage sector, there is a problem that access to the data storage area sharing the pointer storage sector in which the write error has occurred becomes impossible. .

【0009】また、従来のセクタ管理方法においては、
データ記憶用のセクタ(前例では、セクタ#3〜#6
3)のうち、データを記憶しているセクタを示すポイン
タと、ポインタ記憶用のセクタに記憶されているポイン
タを示すポインタとの2種類のポインタを管理する必要
があり、このため、データ・アクセス時のポインタ操作
及びポインタ演算が煩雑であるという問題点があった。
In the conventional sector management method,
Data storage sector (sectors # 3 to # 6 in the previous example)
Of 3), it is necessary to manage two types of pointers, a pointer indicating a sector storing data and a pointer indicating a pointer stored in a sector for storing pointers. There is a problem that the pointer operation and pointer calculation at the time are complicated.

【0010】本発明は、かかる点に鑑み、記憶領域を複
数個のセクタに分割してなる半導体記憶装置のセクタを
管理するセクタ管理方法及び装置であって、データ書込
み時に書込みエラーが発生した場合においても、書込み
エラーが発生したデータと関わりを持たないデータが記
憶されているデータ記憶領域に対するアクセスが不可能
にならないようにすると共に、データ読出し時のポイン
タ操作を単純化できるようにしたセクタ管理方法及び装
置を提供することを目的とする。
In view of the foregoing, the present invention is a sector management method and apparatus for managing a sector of a semiconductor memory device in which a storage area is divided into a plurality of sectors. Also, in the sector management, it is possible to prevent access to a data storage area in which data having no relation to the data in which a write error has occurred is stored, and that a pointer operation at the time of data reading is simplified. It is an object to provide a method and an apparatus.

【0011】[0011]

【課題を解決するための手段】本発明中、第1の発明
(請求項1記載のセクタ管理方法)は、記憶領域を複数
個のセクタに分割してなる半導体記憶装置のセクタを管
理するセクタ管理方法において、データを記憶させるセ
クタにセクタの繋がりを示すポインタを記憶させるとい
うものである。
According to a first aspect of the present invention, there is provided a sector management method for managing a sector of a semiconductor memory device having a storage area divided into a plurality of sectors. In the management method, a pointer indicating a connection between sectors is stored in a sector in which data is stored.

【0012】本発明中、第1の発明によれば、データを
記憶させるセクタにセクタの繋がりを示すポインタを記
憶させるとしているので、データ書込み時に書込みエラ
ーが発生した場合においても、この書込みエラーは、書
込みエラーが発生したデータと関わりを持たないデータ
が記憶されているデータ記憶領域には影響することがな
く、書込みエラーが発生したデータと関わりを持たない
データが記憶されているデータ記憶領域に対するアクセ
スが不可能になることはない。
According to the first aspect of the present invention, since a pointer indicating the connection of sectors is stored in a sector for storing data, even if a write error occurs during data write, the write error is not changed. This does not affect the data storage area in which the data having no relation to the data in which the write error has occurred is stored, and does not affect the data storage area in which the data having no relation to the data in which the write error has occurred is stored. Access is never impossible.

【0013】また、本発明中、第1の発明によれば、デ
ータを記憶しているセクタを示すポインタと、ポインタ
記憶用のセクタに記憶されているポインタを示すポイン
タとの2種類のポインタを管理する必要がなく、各セク
タに記憶されているポインタを読出すことで、繋がりの
あるセクタに対して直ちにアクセスを行うことができ
る。
According to the first aspect of the present invention, two types of pointers, a pointer indicating a sector storing data and a pointer indicating a pointer stored in a sector for storing pointers, are used. By reading the pointer stored in each sector without management, it is possible to immediately access a connected sector.

【0014】本発明中、第2の発明(請求項2記載のセ
クタ管理方法)は、第1の発明において、データが複数
のセクタを必要とする場合において、データを記憶させ
るセクタにセクタの繋がりを示すポインタを記憶させる
工程は、最小セクタ番号のセクタから順にセクタの繋が
りを示すポインタを参照して空きセクタを探索し、探し
当てた空きセクタから順にセクタの繋がりを示すポイン
タを記憶させる工程と、探し当てた先頭の空きセクタの
セクタ番号をデータを管理するセクタに記憶させる工程
とを含むというものである。
According to a second aspect of the present invention, in the first aspect, when the data requires a plurality of sectors, the sector is connected to a sector for storing the data. The step of storing a pointer indicating the connection, searching for empty sectors by referring to the pointer indicating the connection of the sectors in order from the sector with the smallest sector number, storing the pointer indicating the connection of the sectors in order from the found empty sector, Storing the sector number of the found free sector in the sector that manages the data.

【0015】本発明中、第3の発明(請求項3記載のセ
クタ管理方法)は、第2の発明において、最小セクタ番
号のセクタから順にセクタの繋がりを示すポインタを参
照して空きセクタを探索し、探し当てた空きセクタから
順にセクタの繋がりを示すポインタを記憶させる工程
は、次に述べる第1の工程と、第2の工程と、第3の工
程とを含むというものである。
According to a third aspect of the present invention, in the second aspect of the present invention, in the second aspect, an empty sector is searched for by referring to a pointer indicating the connection of the sectors in order from the sector having the smallest sector number. The step of storing the pointers indicating the connection of the sectors in order from the found empty sector includes a first step, a second step, and a third step described below.

【0016】第1の工程は、第1の記憶手段にデータが
必要とするセクタ数を記憶させ、第2の記憶手段に最小
セクタ番号を記憶させた後、第2の記憶手段が記憶する
セクタ番号をインクリメントしながら、第2の記憶手段
が記憶するセクタ番号のセクタに記憶されているセクタ
の繋がりを示すポインタを参照して空きセクタを探索
し、先頭の空きセクタを探し当てた時は、第3の記憶手
段に第2の記憶手段が記憶する先頭の空きセクタのセク
タ番号を記憶させる工程である。
In the first step, the number of sectors required by the data is stored in the first storage means, the minimum sector number is stored in the second storage means, and then the sector stored in the second storage means is stored. While incrementing the number, the second storage means searches for an empty sector by referring to the pointer indicating the connection of the sectors stored in the sector of the sector number stored. When the first empty sector is found, In this step, the third storage means stores the sector number of the first empty sector stored in the second storage means.

【0017】第2の工程は、第1の工程の後、第2の記
憶手段が記憶するセクタ番号をインクリメントしなが
ら、第2の記憶手段が記憶するセクタ番号のセクタに記
憶されているセクタの繋がりを示すポインタを参照して
次の空きセクタを探索し、次の空きセクタを探し当てた
時は、第3の記憶手段が記憶するセクタ番号のセクタに
第2の記憶手段が記憶するセクタ番号をセクタの繋がり
を示すポインタとして記憶させる工程である。
In the second step, after the first step, the sector number stored in the sector of the sector number stored in the second storage means is incremented while the sector number stored in the second storage means is incremented. The next empty sector is searched by referring to the pointer indicating the connection, and when the next empty sector is found, the sector number stored in the second storage unit is replaced with the sector number stored in the third storage unit. This is a step of storing as a pointer indicating the connection of the sectors.

【0018】第3の工程は、第2の工程の後、第3の記
憶手段に第2の記憶手段が記憶するセクタ番号を記憶さ
せ、第1の記憶手段が記憶するセクタ数をデクリメント
し、第1の記憶手段が記憶するセクタ数が1となるま
で、第2の記憶手段が記憶するセクタ番号をインクリメ
ントしながら、第2の記憶手段が記憶するセクタ番号が
示すセクタに記憶されているセクタの繋がりを示すポイ
ンタを参照して次の空きセクタを探索し、次の空きセク
タを探し当てた時は、第3の記憶手段が記憶するセクタ
番号のセクタに第2の記憶手段が記憶するセクタ番号を
セクタの繋がりを示すポインタとして記憶させ、第1の
記憶手段が記憶するセクタ数が1となった場合には、第
3の記憶手段が記憶するセクタ番号のセクタにセクタの
繋がりを示すポインタとして次に繋がるセクタがないこ
とを示すポインタを記憶させる工程である。
In the third step, after the second step, the third storage means stores the sector number stored in the second storage means, and the number of sectors stored in the first storage means is decremented. The sectors stored in the sector indicated by the sector number stored in the second storage unit are incremented while incrementing the sector number stored in the second storage unit until the number of sectors stored in the first storage unit becomes 1. The next empty sector is searched by referring to the pointer indicating the connection of the second storage means. When the next empty sector is found, the sector number stored in the second storage means is replaced with the sector number stored in the third storage means. Is stored as a pointer indicating the connection of the sectors, and when the number of sectors stored in the first storage means becomes 1, a pointer indicating the connection of the sector to the sector of the sector number stored in the third storage means is stored. A step of storing a pointer indicating no next lead sector as.

【0019】本発明中、第4の発明(請求項4記載のセ
クタ管理装置)は、記憶領域を複数個のセクタに分割し
てなる半導体記憶装置のセクタを管理するセクタ管理装
置であって、データを記憶させるセクタにセクタの繋が
りを示すポインタを記憶させるための手段を備えるとい
うものである。
According to a fourth aspect of the present invention, there is provided a sector management apparatus for managing a sector of a semiconductor memory device obtained by dividing a storage area into a plurality of sectors. A means for storing a pointer indicating a connection between sectors in a sector for storing data is provided.

【0020】本発明中、第4の発明によれば、データを
記憶させるセクタにセクタの繋がりを示すポインタを記
憶させるための手段を備えるとしているので、第1、第
2、第3の発明を実行することができる。
According to the fourth aspect of the present invention, since the sector for storing data is provided with a means for storing a pointer indicating the connection between the sectors, the first, second, and third aspects of the present invention can be used. Can be performed.

【0021】本発明中、第5の発明(請求項5記載のセ
クタ管理装置)は、第4の発明において、データを記憶
させるセクタにセクタの繋がりを示すポインタを記憶さ
せるための手段は、第1の記憶手段と、第2の記憶手段
と、第3の記憶手段とを含めて構成され、次に述べる第
1の工程と、第2の工程と、第3の工程とを実行すると
いうものである。
According to a fifth aspect of the present invention, in the fourth aspect of the present invention, in the fourth aspect, the means for storing the pointer indicating the connection of the sector to the sector for storing the data is the following. The first storage unit, the second storage unit, and the third storage unit are configured to execute the following first, second, and third steps. It is.

【0022】第1の工程は、第1の記憶手段にデータが
必要とするセクタ数を記憶させ、第2の記憶手段に最小
セクタ番号を記憶させた後、第2の記憶手段が記憶する
セクタ番号をインクリメントしながら、第2の記憶手段
が記憶するセクタ番号のセクタに記憶されているセクタ
の繋がりを示すポインタを参照して空きセクタを探索
し、先頭の空きセクタを探し当てた時は、第3の記憶手
段に第2の記憶手段が記憶する先頭の空きセクタのセク
タ番号を記憶させる工程である。
In the first step, the number of sectors required by the data is stored in the first storage means, the minimum sector number is stored in the second storage means, and then the sector stored in the second storage means is stored. While incrementing the number, the second storage means searches for an empty sector by referring to the pointer indicating the connection of the sectors stored in the sector of the sector number stored. When the first empty sector is found, In this step, the third storage means stores the sector number of the first empty sector stored in the second storage means.

【0023】第2の工程は、第1の工程の後、第2の記
憶手段が記憶するセクタ番号をインクリメントしなが
ら、第2の記憶手段が記憶するセクタ番号のセクタに記
憶されているセクタの繋がりを示すポインタを参照して
次の空きセクタを探索し、次の空きセクタを探し当てた
時は、第3の記憶手段が記憶するセクタ番号のセクタに
第2の記憶手段が記憶するセクタ番号をセクタの繋がり
を示すポインタとして記憶させる工程である。
In the second step, after the first step, the sector number stored in the sector of the sector number stored in the second storage unit is incremented while the sector number stored in the second storage unit is incremented. The next empty sector is searched by referring to the pointer indicating the connection, and when the next empty sector is found, the sector number stored in the second storage unit is replaced with the sector number stored in the third storage unit. This is a step of storing as a pointer indicating the connection of the sectors.

【0024】第3の工程は、第2の工程の後、第3の記
憶手段に第2の記憶手段が記憶するセクタ番号を記憶さ
せ、第1の記憶手段が記憶するセクタ数をデクリメント
し、第1の記憶手段が記憶するセクタ数が1となるま
で、第2の記憶手段が記憶するセクタ番号をインクリメ
ントしながら、第2の記憶手段が記憶するセクタ番号が
示すセクタに記憶されているセクタの繋がりを示すポイ
ンタを参照して次の空きセクタを探索し、次の空きセク
タを探し当てた時は、第3の記憶手段が記憶するセクタ
番号のセクタに第2の記憶手段が記憶するセクタ番号を
セクタの繋がりを示すポインタとして記憶させ、第1の
記憶手段が記憶するセクタ数が1となった場合には、第
3の記憶手段が記憶するセクタ番号のセクタにセクタの
繋がりを示すポインタとして次に繋がるセクタがないこ
とを示すポインタを記憶させる工程である。
In the third step, after the second step, the third storage means stores a sector number stored in the second storage means, and the number of sectors stored in the first storage means is decremented. The sectors stored in the sector indicated by the sector number stored in the second storage unit are incremented while incrementing the sector number stored in the second storage unit until the number of sectors stored in the first storage unit becomes 1. The next empty sector is searched by referring to the pointer indicating the connection of the second storage means. When the next empty sector is found, the sector number stored in the second storage means is replaced with the sector number stored in the third storage means. Is stored as a pointer indicating the connection of the sectors, and when the number of sectors stored in the first storage means becomes 1, a pointer indicating the connection of the sector to the sector of the sector number stored in the third storage means is stored. A step of storing a pointer indicating no next lead sector as.

【0025】[0025]

【発明の実施の形態】図1は本発明のセクタ管理方法の
一実施形態が適用されるフラッシュメモリの一例の記憶
領域を示す概念図である。図1中、#0〜#21、#6
1〜#63はセクタであり、セクタ#22〜#60は、
図示を省略している。
FIG. 1 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of a sector management method according to the present invention is applied. In FIG. 1, # 0 to # 21, # 6
1 to # 63 are sectors, and sectors # 22 to # 60 are
Illustration is omitted.

【0026】本発明のセクタ管理方法の一実施形態は、
セクタ#0〜#63の全てをデータ記憶用のセクタとし
て扱い、セクタ#0〜#63の最後尾のバイト領域B0
−n〜B63−nに、セクタの繋がりを示すポインタと
して、次に繋がるセクタがある場合には、次に繋がるセ
クタの番号を記憶させ、次に繋がるセクタがない場合に
は、[0]を記憶させるというものである。
One embodiment of the sector management method of the present invention is as follows.
All sectors # 0 to # 63 are treated as sectors for storing data, and the last byte area B0 of sectors # 0 to # 63 is treated.
-N to B63-n store the number of the next connected sector as a pointer indicating the connection of the sectors if there is a next connected sector, and if there is no next connected sector, enter [0]. It is to memorize.

【0027】ここに、セクタ#0〜#63の全てのバイ
ト領域B0−0〜B63−nの記憶値は、初期状態にお
いては255(=FF16)とされているが、たとえば、
セクタ#0、#1、#2、#3からなる記憶領域C1に
セクタ#0→#1→#2→#3と繋がるデータD1が記
憶される場合には、セクタ#0、#1、#2、#3の最
後尾のバイト領域B0−n、B1−n、B2−n、B3
−nの状態は、図2に示すようになる。
Here, the storage values of all the byte areas B0-0 to B63-n of the sectors # 0 to # 63 are 255 (= FF 16 ) in the initial state.
When the data D1 linked to the sectors # 0 → # 1 → # 2 → # 3 is stored in the storage area C1 including the sectors # 0, # 1, # 2, and # 3, the sectors # 0, # 1, and # 3. 2, the last byte area B0-n, B1-n, B2-n, B3 of # 3
The state of -n is as shown in FIG.

【0028】即ち、セクタ#0のバイト領域B0−nに
は、セクタ#0に繋がるセクタ#1のセクタ番号[1]
が記憶され、セクタ#1のバイト領域B1−nには、セ
クタ#1に繋がるセクタ#2のセクタ番号[2]が記憶
され、セクタ#2のバイト領域B2−nには、セクタ#
2に繋がるセクタ#3のセクタ番号[3]が記憶され、
セクタ#3は次に繋がるセクタがないので、セクタ#3
のバイト領域B3−nには、次に繋がるセクタが存在し
ないことを示す[0]が記憶される。
That is, in the byte area B0-n of the sector # 0, the sector number [1] of the sector # 1 connected to the sector # 0
Is stored in the byte area B1-n of the sector # 1, the sector number [2] of the sector # 2 connected to the sector # 1, and the sector # 2 is stored in the byte area B2-n of the sector # 2.
Sector number [3] of sector # 3 connected to No. 2 is stored,
Sector # 3 has no next connected sector, so sector # 3
[0] indicating that there is no next connected sector is stored in the byte area B3-n.

【0029】更に、例えば、セクタ#4、#5、#6、
#7、#8からなる記憶領域C2にセクタ#4→#5→
#6→#7→#8と繋がるデータD2が記憶される場
合、セクタ#4、#5、#6、#7、#8の最後尾のバ
イト領域B4−n、B5−n、B6−n、B7−n、B
8−nの状態は、図3に示すようになる。
Further, for example, sectors # 4, # 5, # 6,
In the storage area C2 composed of # 7 and # 8, sectors # 4 → # 5 →
When data D2 linked to # 6 → # 7 → # 8 is stored, the last byte areas B4-n, B5-n, B6-n of sectors # 4, # 5, # 6, # 7, # 8 are stored. , B7-n, B
The state of 8-n is as shown in FIG.

【0030】即ち、セクタ#4のバイト領域B4−nに
は、セクタ#4に繋がるセクタ#5のセクタ番号[5]
が記憶され、セクタ#5のバイト領域B5−nには、セ
クタ#5に繋がるセクタ#6のセクタ番号[6]が記憶
され、セクタ#6のバイト領域B6−nには、セクタ#
6に繋がるセクタ#7のセクタ番号[7]が記憶され、
セクタ#7のバイト領域B7−nには、セクタ#7に繋
がるセクタ#8のセクタ番号[8]が記憶され、セクタ
#8は次に繋がるセクタがないので、セクタ#8のバイ
ト領域B8−nには、次に繋がるセクタが存在しないこ
とを示す[0]が記憶される。
That is, in the byte area B4-n of the sector # 4, the sector number [5] of the sector # 5 connected to the sector # 4
Is stored in the byte area B5-n of the sector # 5, and the sector number [6] of the sector # 6 connected to the sector # 5 is stored. In the byte area B6-n of the sector # 6, the sector # 5 is stored.
Sector number [7] of sector # 7 linked to No. 6 is stored,
In the byte area B7-n of the sector # 7, the sector number [8] of the sector # 8 connected to the sector # 7 is stored. Since the sector # 8 has no next connected sector, the byte area B8-n of the sector # 8. In [n], [0] indicating that the next connected sector does not exist is stored.

【0031】更に、例えば、セクタ#9、#10、#1
1、#12、#13からなる記憶領域C3にセクタ#9
→#10→#11→#12→#13と繋がるデータD3
が記憶される場合、セクタ#9、#10、#11、#1
2、#13の最後尾のバイト領域B9−n、B10−
n、B11−n、B12−n、B13−nの状態は、図
4に示すようになる。
Further, for example, sectors # 9, # 10, # 1
Sector # 9 in storage area C3 consisting of # 1, # 12 and # 13
→ Data D3 linked to # 10 → # 11 → # 12 → # 13
Is stored, sectors # 9, # 10, # 11, # 1
2, the last byte area B9-n and B10- of # 13
The states of n, B11-n, B12-n, and B13-n are as shown in FIG.

【0032】即ち、セクタ#9のバイト領域B9−nに
は、セクタ#9に繋がるセクタ#10のセクタ番号[1
0]が記憶され、セクタ#10のバイト領域B10−n
には、セクタ#10に繋がるセクタ#11のセクタ番号
[11]が記憶され、セクタ#11のバイト領域B11
−nにはセクタ#11に繋がるセクタ#12のセクタ番
号[12]が記憶され、セクタ#12のバイト領域B1
2−nには、セクタ#12に繋がるセクタ#13のセク
タ番号[13]が記憶され、セクタ#13は次に繋がる
セクタがないので、セクタ#13のバイト領域B13−
nには、次に繋がるセクタが存在しないことを示す
[0]が記憶される。
That is, in the byte area B9-n of the sector # 9, the sector number [1] of the sector # 10 connected to the sector # 9.
0] is stored in the byte area B10-n of the sector # 10.
Stores the sector number [11] of the sector # 11 linked to the sector # 10, and stores the byte area B11 of the sector # 11.
In -n, the sector number [12] of the sector # 12 connected to the sector # 11 is stored, and the byte area B1 of the sector # 12 is stored.
2-n stores the sector number [13] of the sector # 13 connected to the sector # 12. Since the sector # 13 has no next connected sector, the byte area B13-
In [n], [0] indicating that the next connected sector does not exist is stored.

【0033】更に、例えば、セクタ#14、#15、#
16からなる記憶領域C4にセクタ#14→#15→#
16と繋がるデータD4が記憶される場合、セクタ#1
4、#15、#16の最後尾のバイト領域B14−n、
B15−n、B16−nの状態は、図5に示すようにな
る。
Further, for example, sectors # 14, # 15, #
Sector # 14 → # 15 → # in a storage area C4 comprising
In the case where data D4 linked to No. 16 is stored, sector # 1
4, the last byte area B14-n of # 15, # 16,
The states of B15-n and B16-n are as shown in FIG.

【0034】即ち、セクタ#14のバイト領域B14−
nには、セクタ#14に繋がるセクタ#15のセクタ番
号[15]が記憶され、セクタ#15のバイト領域B1
5−nにはセクタ#15に繋がるセクタ#16のセクタ
番号[16]が記憶され、セクタ#16は次に繋がるセ
クタがないので、セクタ#16のバイト領域B16−n
には[0]が記憶される。
That is, byte area B14- of sector # 14
In n, the sector number [15] of the sector # 15 connected to the sector # 14 is stored, and the byte area B1 of the sector # 15 is stored.
5-n stores the sector number [16] of the sector # 16 connected to the sector # 15. Since the sector # 16 has no next connected sector, the byte area B16-n of the sector # 16 is stored.
Stores [0].

【0035】図6は本発明のセクタ管理方法の一実施形
態が実行されるシステムの要部を示す回路図であり、図
6中、100は図1に示す記憶領域を有するフラッシュ
メモリ、200は本発明のセクタ管理装置の一実施形態
をなすマイクロコンピュータである。
FIG. 6 is a circuit diagram showing a main part of a system in which one embodiment of the sector management method of the present invention is executed. In FIG. 6, reference numeral 100 denotes a flash memory having the storage area shown in FIG. 1 is a microcomputer that constitutes an embodiment of a sector management device of the present invention.

【0036】マイクロコンピュータ200において、2
01はデータ読出し時に使用する間接指定用レジスタ、
202はアキュムレータ、203はセクタへの書込みデ
ータ又はセクタからの読出しデータを一時的に記憶して
おく書込み・読出しデータ用メモリである。
In the microcomputer 200, 2
01 is an indirect designation register used when reading data,
Reference numeral 202 denotes an accumulator, and reference numeral 203 denotes a write / read data memory for temporarily storing write data to a sector or read data from a sector.

【0037】また、204は空きセクタを探索するため
に参照するセクタ番号を一時的に記憶させるセクタ番号
用メモリであり、本発明のセクタ管理装置が備える第2
の記憶手段に相当するものである。
Reference numeral 204 denotes a sector number memory for temporarily storing a sector number to be referred for searching for a free sector, and a second sector number memory provided in the sector management apparatus of the present invention.
Corresponds to the storage means.

【0038】また、205はセクタの繋がりを示すポイ
ンタを更新すべきセクタ(空きセクタ)のセクタ番号を
一時的に記憶させるポインタ更新用メモリであり、本発
明のセクタ管理装置が備える第3の記憶手段に相当する
ものである。
Reference numeral 205 denotes a pointer update memory for temporarily storing the sector number of a sector (empty sector) for updating the pointer indicating the connection of the sectors, and a third storage provided in the sector management device of the present invention. It is equivalent to a means.

【0039】また、206はデータの記憶に必要なセク
タ数を初期値として記憶させ、カウンタとして使用する
カウンタ用メモリであり、本発明のセクタ管理装置が備
える第1の記憶手段に相当するものである。
A counter memory 206 stores the number of sectors required for data storage as an initial value and uses it as a counter, which corresponds to a first storage means provided in the sector management device of the present invention. is there.

【0040】図7はフラッシュメモリ100にデータを
記憶するための領域を確保する場合のマイクロコンピュ
ータ200の動作を示すフローチャートである。
FIG. 7 is a flowchart showing the operation of the microcomputer 200 when an area for storing data in the flash memory 100 is secured.

【0041】即ち、フラッシュメモリ100にデータを
記憶するための領域を確保する場合には、まず、データ
の記憶に必要なセクタ数がカウンタ用メモリ206にセ
ットされ、最少セクタ番号である[0]がセクタ番号用
メモリ204にセットされる(ステップP1)。
That is, when securing an area for storing data in the flash memory 100, first, the number of sectors required for storing data is set in the counter memory 206, and the minimum sector number [0] is set. Is set in the sector number memory 204 (step P1).

【0042】次に、セクタ番号用メモリ204が記憶す
るセクタ番号をインクリメントさせながら、空きセクタ
が探索される(ステップP2)。
Next, a free sector is searched for while incrementing the sector number stored in the sector number memory 204 (step P2).

【0043】そして、空きセクタを探し当てた場合に
は、記憶させるデータを管理するセクタ内の記憶させる
データの先頭ポインタを記憶させるべきバイト領域の内
容が、セクタ番号用メモリ204が記憶するセクタ番号
に更新され、ポインタ更新用メモリ205にセクタ番号
用メモリ204が記憶するセクタ番号がセットされる
(ステップP3)。
When an empty sector is found, the contents of the byte area in which the head pointer of the data to be stored in the sector for managing the data to be stored is stored in the sector number stored in the sector number memory 204. The sector number stored in the sector update memory 204 is set in the pointer update memory 205 (step P3).

【0044】次に、セクタ番号用メモリ204が記憶す
るセクタ番号をインクリメントさせながら、空きセクタ
が探索される(ステップP4)。
Next, a free sector is searched for while incrementing the sector number stored in the sector number memory 204 (step P4).

【0045】そして、空きセクタを探し当てた場合に
は、ポインタ更新用メモリ205が記憶するセクタ番号
のセクタの最後尾のバイト領域の内容が、セクタ番号用
メモリ204が記憶するセクタ番号に更新される(ステ
ップP5)。
When an empty sector is found, the contents of the last byte area of the sector of the sector number stored in the pointer update memory 205 are updated to the sector number stored in the sector number memory 204. (Step P5).

【0046】次に、ポインタ更新用メモリ205が記憶
するセクタ番号がセクタ番号用メモリ204が記憶する
セクタ番号に更新され(ステップP6)、カウンタ用メ
モリ206が記憶するセクタ数がデクリメントされる
(ステップP7)。
Next, the sector number stored in the pointer update memory 205 is updated to the sector number stored in the sector number memory 204 (step P6), and the number of sectors stored in the counter memory 206 is decremented (step P6). P7).

【0047】そして、カウンタ用メモリ206が記憶す
るセクタ数、即ち、記憶させようとしているデータが必
要とする残りのセクタ数が[1]であるか否かが判断さ
れる(ステップP8)。
Then, it is determined whether or not the number of sectors stored in the counter memory 206, that is, the remaining number of sectors required by the data to be stored is [1] (step P8).

【0048】ステップP8における判断の結果、カウン
タ用メモリ206が記憶するセクタ数が[1]でない場
合(ステップP8でNOの場合)には、ステップP4に
戻り、ステップP4〜P8が繰り返される。
If the result of determination in step P8 is that the number of sectors stored in counter memory 206 is not [1] (NO in step P8), the process returns to step P4, and steps P4 to P8 are repeated.

【0049】これに対して、ステップP8における判断
の結果、カウンタ用メモリ206が記憶するセクタ数が
[1]となっている場合(ステップP8でYESの場
合)には、ポインタ更新用メモリ205が記憶するセク
タ番号のセクタの最後尾のバイト領域の内容が[0]に
更新され(ステップP9)、処理が終了される。
On the other hand, if the result of determination in step P8 is that the number of sectors stored in counter memory 206 is [1] (YES in step P8), pointer updating memory 205 The content of the last byte area of the sector having the sector number to be stored is updated to [0] (step P9), and the process ends.

【0050】例えば、データD1、D2、D3、D4
が、図8に示すように、データD1の配下にデータD
2、D3があり、データD2の配下にデータD4がある
場合において、データD4の記憶領域C4を確保する処
理は次のように行われる。
For example, data D1, D2, D3, D4
However, as shown in FIG.
In the case where there is the data D2 and the data D4 under the data D2, the process of securing the storage area C4 for the data D4 is performed as follows.

【0051】但し、記憶領域C4を制御するデータは、
記憶領域C2内のセクタ#6にあるものとし、図3に示
すように、セクタ#6の中のバイト領域B6−xにセク
タ#14の先頭ポインタ[14]の情報があるものとす
る。
However, the data for controlling the storage area C4 is
It is assumed that the information is in the sector # 6 in the storage area C2, and as shown in FIG. 3, the information of the head pointer [14] of the sector # 14 is in the byte area B6-x in the sector # 6.

【0052】即ち、データD4の記憶領域C4を確保す
る場合には、まず、図9(A)に示すように、データD
4の記憶に必要なセクタ数[3]がカウンタ用メモリ2
06にセットされ、最少セクタ番号である[0]がセク
タ番号用メモリ204にセットされる(ステップP
1)。
That is, when securing the storage area C4 for the data D4, first, as shown in FIG.
The number of sectors [3] necessary for storage of the counter memory 2
06 and the minimum sector number [0] is set in the sector number memory 204 (step P).
1).

【0053】次に、セクタ番号用メモリ204に記憶さ
れているセクタ番号をインクリメントさせながら、空き
セクタが探索される(ステップP2)。
Next, a free sector is searched for while incrementing the sector number stored in the sector number memory 204 (step P2).

【0054】この例の場合には、空きセクタ#14が探
し当てられ、図9(B)に示すように、データD4を管
理するセクタ#6のバイト領域B6−xの内容が、セク
タ番号用メモリ204が記憶する空きセクタ番号[1
4]に更新され、ポインタ更新用メモリ205にセクタ
番号用メモリ204が記憶するセクタ番号[14]がセ
ットされる(ステップP3)。
In this example, an empty sector # 14 is found, and as shown in FIG. 9B, the contents of the byte area B6-x of the sector # 6 managing the data D4 are stored in the sector number memory. The empty sector number [1
4], and the sector number [14] stored in the sector number memory 204 is set in the pointer update memory 205 (step P3).

【0055】次に、セクタ番号用メモリ204が記憶す
るセクタ番号[14]をインクリメントさせながら、空
きセクタが探索される(ステップP4)。
Next, a free sector is searched for while incrementing the sector number [14] stored in the sector number memory 204 (step P4).

【0056】この例の場合には、空きセクタ#15が探
し当てられ、図9(C)に示すように、ポインタ更新用
メモリ205が記憶するセクタ番号[14]のセクタ#
14の最後尾のバイト領域B14−nの内容が初期値の
[255]からセクタ番号用メモリ204が記憶するセ
クタ番号[15]に更新される(ステップP5)。
In the case of this example, the empty sector # 15 is found, and as shown in FIG. 9C, the sector # 14 of the sector number [14] stored in the pointer updating memory 205.
The contents of the last byte area B14-n of 14 are updated from the initial value [255] to the sector number [15] stored in the sector number memory 204 (step P5).

【0057】次に、図9(D)に示すように、ポインタ
更新用メモリ205が記憶するセクタ番号[14]がセ
クタ番号用メモリ204が記憶するセクタ番号[15]
に更新され(ステップP6)、カウンタ用メモリ206
が記憶するセクタ数[3]が[2]にデクリメントされ
る(ステップP7)。
Next, as shown in FIG. 9D, the sector number [14] stored in the pointer update memory 205 is replaced with the sector number [15] stored in the sector number memory 204.
(Step P6), and the counter memory 206
Is decremented to [2] (step P7).

【0058】そして、カウンタ用メモリ206が記憶す
るセクタ数、即ち、記憶させようとしているデータD1
が必要とする残りのセクタ数が[1]であるか否かが判
断される(ステップP8)。
Then, the number of sectors stored in the counter memory 206, that is, the data D1 to be stored.
It is determined whether or not the number of remaining sectors required by is [1] (step P8).

【0059】この例の場合には、カウンタ用メモリ20
6が記憶するセクタ数は[2]であり、[1]ではない
ので、ステップP4に戻り、ステップP4〜P8が繰り
返される。
In the case of this example, the counter memory 20
Since the number of sectors stored in 6 is [2] and not [1], the process returns to step P4, and steps P4 to P8 are repeated.

【0060】即ち、セクタ番号用メモリ204が記憶す
るセクタ番号[15]をインクリメントさせながら、空
きセクタが探索される(ステップP4)。
That is, a free sector is searched for while incrementing the sector number [15] stored in the sector number memory 204 (step P4).

【0061】この例の場合には、空きセクタ#16が探
し当てられ、図9(E)に示すように、ポインタ更新用
メモリ205が記憶するセクタ番号[15]のセクタ#
15の最後尾のバイト領域B15−nの内容が初期値の
[255]からセクタ番号用メモリ204が記憶するセ
クタ番号[16]に更新される(ステップP5)。
In the case of this example, the empty sector # 16 is found, and as shown in FIG. 9E, the sector # 15 of the sector number [15] stored in the pointer updating memory 205.
The contents of the last byte area B15-n of the fifteen are updated from the initial value [255] to the sector number [16] stored in the sector number memory 204 (step P5).

【0062】次に、図9(F)に示すように、ポインタ
更新用メモリ205が記憶するセクタ番号[15]がセ
クタ番号用メモリ204が記憶するセクタ番号[16]
に更新され(ステップP6)、カウンタ用メモリ206
が記憶するセクタ数[2]が[1]にデクリメントされ
る(ステップP7)。
Next, as shown in FIG. 9F, the sector number [15] stored in the pointer update memory 205 is replaced with the sector number [16] stored in the sector number memory 204.
(Step P6), and the counter memory 206
Is decremented to [1] (step P7).

【0063】そして、カウンタ用メモリ206が記憶す
るセクタ数、即ち、記憶させようとしているデータD1
が必要とする残りのセクタ数が[1]であるか否かが判
断される(ステップP8)。
The number of sectors stored in the counter memory 206, that is, the data D1 to be stored
It is determined whether or not the number of remaining sectors required by is [1] (step P8).

【0064】この例の場合には、図9(G)に示すよう
に、カウンタ用メモリ206が記憶するセクタ数は
[1]となっているので、ポインタ更新用メモリ205
が記憶するセクタ番号[16]のセクタ#16の最後尾
のバイト領域B16−nの内容が初期値の[255]か
ら[0]に更新され(ステップP9)、処理が終了され
る。
In the case of this example, as shown in FIG. 9G, the number of sectors stored in the counter memory 206 is [1].
Is updated from the initial value of [255] to [0] of the last byte area B16-n of the sector # 16 of the sector number [16] (step P9), and the process ends.

【0065】また、図10はフラッシュメモリ100か
らのデータ読出し動作を示すフローチャートである。
FIG. 10 is a flowchart showing an operation of reading data from the flash memory 100.

【0066】即ち、フラッシュメモリ100からデータ
が読み出される場合には、まず、読出しデータが記憶さ
れている領域を管理するセクタに記憶されている先頭の
セクタのセクタ番号を示すポインタがセクタ番号用メモ
リ204にセットされる(ステップN1)。
That is, when data is read from the flash memory 100, first, the pointer indicating the sector number of the first sector stored in the sector managing the area where the read data is stored is stored in the sector number memory. 204 is set (step N1).

【0067】次に、セクタ番号用メモリ204が記憶し
ているポインタが参照され(ステップN2)、セクタ番
号用メモリ204が記憶しているポインタが示すセクタ
に記憶されているデータが全て書込み・読出しデータ用
メモリ203に読み出される(ステップN3、N4)。
Next, the pointer stored in the sector number memory 204 is referred to (step N2), and all data stored in the sector indicated by the pointer stored in the sector number memory 204 is written / read. The data is read out to the data memory 203 (steps N3 and N4).

【0068】次に、セクタ番号用メモリ204が記憶し
ているポインタの値が、セクタ番号用メモリ204が記
憶しているポインタが示すセクタの最後尾のバイト領域
に記憶されているポインタの値に更新される(ステップ
N5)。
Next, the value of the pointer stored in the sector number memory 204 is changed to the value of the pointer stored in the last byte area of the sector indicated by the pointer stored in the sector number memory 204. Updated (step N5).

【0069】次に、セクタ番号用メモリ204が記憶し
ているポインタの値が[0]であるか否かが判断され
(ステップN6)、セクタ番号用メモリ204が記憶し
ているポインタの値が[0]でない場合(ステップN6
でのNOの場合)には、ステップN2に戻り、ステップ
N2〜N6が繰り返される。
Next, it is determined whether or not the value of the pointer stored in the sector number memory 204 is [0] (step N6), and the value of the pointer stored in the sector number memory 204 is determined. If not [0] (Step N6
Is NO), the process returns to step N2, and steps N2 to N6 are repeated.

【0070】これに対して、ステップN6における判断
の結果、セクタ番号用メモリ204が記憶しているポイ
ンタの値が[0]となっている場合(ステップN6でY
ESの場合)には、書込み・読出しデータ用メモリ20
3へのデータの読み出しが終了される。
On the other hand, if the result of the determination in step N6 is that the value of the pointer stored in the sector number memory 204 is [0] (Y in step N6)
ES), the write / read data memory 20
3 is completed.

【0071】このように、本発明のセクタ管理方法の一
実施形態によれば、データを記憶させるセクタの最後尾
のバイト領域にセクタの繋がりを示すポインタを記憶さ
せるとしているので、データ書込み時に書込みエラーが
発生した場合においても、この書込みエラーは、書込み
エラーが発生したデータと関わりを持たないデータが記
憶されているデータ記憶領域には影響することがなく、
書込みエラーが発生したデータと関わりを持たないデー
タが記憶されているデータ記憶領域に対するアクセスが
不可能になることはない。
As described above, according to the embodiment of the sector management method of the present invention, since the pointer indicating the connection of the sectors is stored in the last byte area of the sector in which the data is to be stored, the data is written when the data is written. Even when an error occurs, the write error does not affect the data storage area in which data not related to the data in which the write error occurred is stored.
Access to a data storage area storing data that has no relation to the data in which a write error has occurred does not become impossible.

【0072】また、本発明のセクタ管理方法の一実施形
態によれば、従来例の場合のように、データを記憶して
いるセクタを示すポインタと、ポインタ記憶用のセクタ
に記憶されているポインタを示すポインタとの2種類の
ポインタを管理する必要がなく、データ読出し時、セク
タ内のデータを最後まで読出した時点でセクタの最後尾
のバイト領域に記憶されているポインタを読出すこと
で、繋がりのあるセクタに対して直ちにアクセスを行う
ことができるので、ポインタ操作の単純化を図ることが
できる。
Further, according to one embodiment of the sector management method of the present invention, as in the case of the conventional example, the pointer indicating the sector storing the data and the pointer stored in the sector for storing the pointer are used. It is not necessary to manage two types of pointers, namely, a pointer indicating the end of the sector and a pointer stored in the last byte area of the sector when data in the sector is read to the end at the time of data reading. Since a connected sector can be immediately accessed, the pointer operation can be simplified.

【0073】また、本発明のセクタ管理装置の一実施形
態によれば、本発明のセクタ管理方法の一実施形態を実
行し、データ書込み時に書込みエラーが発生した場合に
おいても、書込みエラーが発生したデータと関わりを持
たないデータが記憶されているデータ記憶領域に対する
アクセスが不可能にならないようにすることができると
共に、データ読出し時におけるポインタ操作の単純化を
図ることができる。
According to an embodiment of the sector management apparatus of the present invention, the embodiment of the sector management method of the present invention is executed, and even when a write error occurs at the time of writing data, a write error occurs. Access to a data storage area in which data having no relation to data is stored can be prevented from being disabled, and pointer operation at the time of data reading can be simplified.

【0074】[0074]

【発明の効果】以上のように、本発明中、第1、第2又
は第3の発明(請求項1、2又は3記載のセクタ管理方
法)によれば、データを記憶させるセクタにセクタの繋
がりを示すポインタを記憶させるとしたことにより、デ
ータ書込み時に書込みエラーが発生した場合において
も、書込みエラーが発生したデータと関わりを持たない
データが記憶されているデータ記憶領域に対するアクセ
スが不可能にならないようにすることができると共に、
データ読出し時、データを記憶させたセクタに記憶され
ているポインタを読出すことで、繋がりのあるセクタに
対して直ちにアクセスを行うことができるので、ポイン
タ操作の単純化を図ることができる。
As described above, according to the first, second or third aspect of the present invention (sector management method according to claim 1, 2 or 3), the sector for storing data is By storing the pointer indicating the connection, even if a write error occurs during data writing, access to the data storage area storing data unrelated to the data in which the write error occurred is disabled. Not only can be
At the time of data reading, by reading the pointer stored in the sector in which the data is stored, it is possible to immediately access a connected sector, so that the pointer operation can be simplified.

【0075】また、本発明中、第4又は第5の発明(請
求項4又は5記載のセクタ管理装置)によれば、データ
を記憶させるセクタにセクタの繋がりを示すポインタを
記憶させるための手段を備えるとしているので、第1、
第2又は第3の発明を実行し、データ書込み時に書込み
エラーが発生した場合においても、書込みエラーが発生
したデータと関わりを持たないデータが記憶されている
データ記憶領域に対するアクセスが不可能にならないよ
うにすることができると共に、データ読出し時における
ポインタ操作の単純化を図ることができる。
According to the fourth or fifth aspect of the present invention, according to the fourth aspect of the present invention, a means for storing a pointer indicating a connection between sectors in a sector for storing data. The first,
Even when the second or third aspect of the present invention is executed and a write error occurs at the time of writing data, it is not impossible to access a data storage area storing data not related to the data in which the write error has occurred. In addition to this, it is possible to simplify pointer operation at the time of data reading.

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

【図1】本発明のセクタ管理方法の一実施形態が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。
FIG. 1 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of a sector management method of the present invention is applied.

【図2】本発明のセクタ管理方法の一実施形態が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。
FIG. 2 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of a sector management method according to the present invention is applied;

【図3】本発明のセクタ管理方法の一実施形態が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。
FIG. 3 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of the sector management method of the present invention is applied;

【図4】本発明のセクタ管理方法の一実施形態が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。
FIG. 4 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of a sector management method according to the present invention is applied;

【図5】本発明のセクタ管理方法の一実施形態が適用さ
れるフラッシュメモリの一例の記憶領域を示す概念図で
ある。
FIG. 5 is a conceptual diagram showing a storage area of an example of a flash memory to which an embodiment of the sector management method of the present invention is applied;

【図6】本発明のセクタ管理方法の一実施形態が実行さ
れるシステムの要部を示す回路図である。
FIG. 6 is a circuit diagram showing a main part of a system in which an embodiment of the sector management method of the present invention is executed.

【図7】図6に示すフラッシュメモリにデータを記憶す
るための領域を確保する場合の図6に示すマイクロコン
ピュータの動作を示すフローチャートである。
FIG. 7 is a flowchart showing an operation of the microcomputer shown in FIG. 6 when an area for storing data in the flash memory shown in FIG. 6 is reserved.

【図8】図6に示すフラッシュメモリに記憶するデータ
の関係を示す図である。
8 is a diagram showing a relationship between data stored in the flash memory shown in FIG.

【図9】図6に示すフラッシュメモリにデータを記憶さ
せるための領域を確保する場合の図6に示すマイクロコ
ンピュータの動作を示す図である。
9 is a diagram showing an operation of the microcomputer shown in FIG. 6 in a case where an area for storing data in the flash memory shown in FIG. 6 is secured.

【図10】図6に示すフラッシュメモリからのデータ読
出し動作を示すフローチャートである。
FIG. 10 is a flowchart showing an operation of reading data from the flash memory shown in FIG. 6;

【図11】従来のセクタ管理方法が適用されるフラッシ
ュメモリの一例の記憶領域を示す概念図である。
FIG. 11 is a conceptual diagram showing a storage area of an example of a flash memory to which a conventional sector management method is applied.

【図12】従来のセクタ管理方法が適用されるフラッシ
ュメモリの一例の記憶領域を示す概念図である。
FIG. 12 is a conceptual diagram showing a storage area of an example of a flash memory to which a conventional sector management method is applied.

【図13】従来のセクタ管理方法が適用されるフラッシ
ュメモリの一例の記憶領域を示す概念図である。
FIG. 13 is a conceptual diagram showing a storage area of an example of a flash memory to which a conventional sector management method is applied.

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

#0〜#21、#61〜#63 セクタ # 0 to # 21, # 61 to # 63 sectors

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】記憶領域を複数個のセクタに分割してなる
半導体記憶装置のセクタを管理するセクタ管理方法にお
いて、 データを記憶させるセクタにセクタの繋がりを示すポイ
ンタを記憶させることを特徴とするセクタ管理方法。
1. A sector management method for managing a sector of a semiconductor memory device in which a storage area is divided into a plurality of sectors, wherein a pointer indicating a connection between the sectors is stored in a sector for storing data. Sector management method.
【請求項2】前記データが複数のセクタを必要とする場
合において、前記データを記憶させるセクタにセクタの
繋がりを示すポインタを記憶させる工程は、 最小セクタ番号のセクタから順にセクタの繋がりを示す
ポインタを参照して空きセクタを探索し、探し当てた空
きセクタから順にセクタの繋がりを示すポインタを記憶
させる工程と、 前記探し当てた空きセクタのうち、先頭の空きセクタの
セクタ番号を前記データを管理するセクタに記憶させる
工程とを含むことを特徴とする請求項1記載のセクタ管
理方法。
2. When the data requires a plurality of sectors, the step of storing a pointer indicating the connection of the sectors in the sector in which the data is stored includes a pointer indicating the connection of the sectors in order from the sector having the smallest sector number. Searching for an empty sector by referring to, and storing a pointer indicating the connection of the sectors in order from the found empty sector; and, among the found empty sectors, a sector number of a leading empty sector, and a sector for managing the data. Storing the data in the sector management method.
【請求項3】前記最小セクタ番号のセクタから順にセク
タの繋がりを示すポインタを参照して空きセクタを探索
し、探し当てた空きセクタから順にセクタの繋がりを示
すポインタを記憶させる工程は、 第1の記憶手段に前記データが必要とするセクタ数を記
憶させ、第2の記憶手段に前記最小セクタ番号を記憶さ
せた後、前記第2の記憶手段が記憶するセクタ番号をイ
ンクリメントしながら、前記第2の記憶手段が記憶する
セクタ番号のセクタに記憶されているセクタの繋がりを
示すポインタを参照して空きセクタを探索し、先頭の空
きセクタを探し当てた時は、第3の記憶手段に前記第2
の記憶手段が記憶する前記先頭の空きセクタのセクタ番
号を記憶させる第1の工程と、 この第1の工程の後、前記第2の記憶手段が記憶するセ
クタ番号をインクリメントしながら、前記第2の記憶手
段が記憶するセクタ番号のセクタに記憶されているセク
タの繋がりを示すポインタを参照して次の空きセクタを
探索し、次の空きセクタを探し当てた時は、前記第3の
記憶手段が記憶するセクタ番号のセクタに前記第2の記
憶手段が記憶するセクタ番号をセクタの繋がりを示すポ
インタとして記憶させる第2の工程と、 この第2の工程の後、前記第3の記憶手段に前記第2の
記憶手段が記憶するセクタ番号を記憶させ、前記第1の
記憶手段が記憶するセクタ数をデクリメントし、前記第
1の記憶手段が記憶するセクタ数が1となるまで、前記
第2の記憶手段が記憶するセクタ番号をインクリメント
しながら、前記第2の記憶手段が記憶するセクタ番号が
示すセクタに記憶されているセクタの繋がりを示すポイ
ンタを参照して次の空きセクタを探索し、次の空きセク
タを探し当てた時は、前記第3の記憶手段が記憶するセ
クタ番号のセクタに前記第2の記憶手段が記憶するセク
タ番号をセクタの繋がりを示すポインタとして記憶さ
せ、前記第1の記憶手段が記憶するセクタ数が1となっ
た場合には、前記第3の記憶手段が記憶するセクタ番号
のセクタにセクタの繋がりを示すポインタとして次に繋
がるセクタがないことを示すポインタを記憶させる第3
の工程とを含むことを特徴とする請求項2記載のセクタ
管理方法。
3. A step of searching for an empty sector by referring to a pointer indicating the connection of the sectors in order from the sector having the smallest sector number, and storing a pointer indicating the connection of the sectors in order from the found empty sector; After storing the number of sectors required by the data in the storage means and storing the minimum sector number in the second storage means, the second storage means increments the sector number stored in the second storage means while incrementing the second sector number. When a free sector is searched for by referring to a pointer indicating the connection of the sectors stored in the sector of the sector number stored in the storage means of the second storage means, and when the first free sector is found, the second storage means is stored in the third storage means.
A first step of storing the sector number of the leading empty sector stored by the storage means of the second step; and after the first step, the second step of storing the second sector number while incrementing the sector number stored by the second storage means. The next empty sector is searched for by referring to the pointer indicating the connection of the sectors stored in the sector of the sector number stored in the storage means of the third storage means. When the next empty sector is found, the third storage means A second step of storing the sector number stored by the second storage means in the sector having the sector number to be stored as a pointer indicating the connection of the sectors; and after the second step, storing the sector number in the third storage means. The sector number stored in the second storage unit is stored, the number of sectors stored in the first storage unit is decremented, and the number of sectors stored in the first storage unit is decreased until the number of sectors stored in the first storage unit becomes 1. While incrementing the sector number stored in the second storage means, the next empty sector is searched for by referring to the pointer indicating the connection of the sectors stored in the sector indicated by the sector number stored in the second storage means. When the next empty sector is found, the sector number stored in the second storage means is stored in the sector having the sector number stored in the third storage means as a pointer indicating the connection of the sectors, and the first When the number of sectors stored in the storage means becomes 1, a pointer indicating that there is no next connected sector is stored as a pointer indicating the connection of the sector to the sector of the sector number stored in the third storage means. Third
3. The method according to claim 2, further comprising the steps of:
【請求項4】記憶領域を複数個のセクタに分割してなる
半導体記憶装置のセクタを管理するセクタ管理装置であ
って、 データを記憶させるセクタにセクタの繋がりを示すポイ
ンタを記憶させるための手段を備えていることを特徴と
するセクタ管理装置。
4. A sector management device for managing a sector of a semiconductor memory device in which a storage area is divided into a plurality of sectors, means for storing a pointer indicating a connection between sectors in a sector for storing data. A sector management device comprising:
【請求項5】前記データを記憶させるセクタにセクタの
繋がりを示すポインタを記憶させるための手段は、第1
の記憶手段と、第2の記憶手段と、第3の記憶手段とを
含めて構成され、 第1の記憶手段に前記データが必要とするセクタ数を記
憶させ、第2の記憶手段に最小セクタ番号を記憶させた
後、前記第2の記憶手段が記憶するセクタ番号をインク
リメントしながら、前記第2の記憶手段が記憶するセク
タ番号のセクタに記憶されているセクタの繋がりを示す
ポインタを参照して空きセクタを探索し、先頭の空きセ
クタを探し当てた時は、第3の記憶手段に前記第2の記
憶手段が記憶する前記先頭の空きセクタのセクタ番号を
記憶させる第1の工程と、 この第1の工程の後、前記第2の記憶手段が記憶するセ
クタ番号をインクリメントしながら、前記第2の記憶手
段が記憶するセクタ番号のセクタに記憶されているセク
タの繋がりを示すポインタを参照して次の空きセクタを
探索し、次の空きセクタを探し当てた時は、前記第3の
記憶手段が記憶するセクタ番号のセクタに前記第2の記
憶手段が記憶するセクタ番号をセクタの繋がりを示すポ
インタとして記憶させる第2の工程と、 この第2の工程の後、前記第3の記憶手段に前記第2の
記憶手段が記憶するセクタ番号を記憶させ、前記第1の
記憶手段が記憶するセクタ数をデクリメントし、前記第
1の記憶手段が記憶するセクタ数が1となるまで、前記
第2の記憶手段が記憶するセクタ番号をインクリメント
しながら、前記第2の記憶手段が記憶するセクタ番号が
示すセクタに記憶されているセクタの繋がりを示すポイ
ンタを参照して次の空きセクタを探索し、次の空きセク
タを探し当てた時は、前記第3の記憶手段が記憶するセ
クタ番号のセクタに前記第2の記憶手段が記憶するセク
タ番号をセクタの繋がりを示すポインタとして記憶さ
せ、前記第1の記憶手段が記憶するセクタ数が1となっ
た場合には、前記第3の記憶手段が記憶するセクタ番号
のセクタにセクタの繋がりを示すポインタとして次に繋
がるセクタがないことを示すポインタを記憶させる第3
の工程とを実行することを特徴とする請求項4記載のセ
クタ管理装置。
5. Means for storing a pointer indicating a connection between sectors in a sector for storing said data,
, A second storage means, and a third storage means. The first storage means stores the number of sectors required by the data, and the second storage means stores the minimum number of sectors. After the number is stored, the pointer indicating the connection of the sectors stored in the sector having the sector number stored in the second storage unit is incremented while referring to the sector number stored in the second storage unit. A first step of storing the sector number of the first empty sector stored in the second storage means in the third storage means when the first empty sector is found by searching for an empty sector by using After the first step, while incrementing the sector number stored in the second storage means, a pointer indicating the connection of the sectors stored in the sector of the sector number stored in the second storage means When the next empty sector is searched with reference to the next empty sector, when the next empty sector is found, the sector number stored in the second storage means is connected to the sector having the sector number stored in the third storage means. A second step of storing as a pointer indicating the sector number. After the second step, the third storage means stores the sector number stored in the second storage means, and the first storage means stores the sector number. The number of sectors to be stored is decremented, and the sector number stored in the second storage unit is incremented while the sector number stored in the second storage unit is incremented until the number of sectors stored in the first storage unit becomes 1. The next empty sector is searched by referring to the pointer indicating the connection of the sectors stored in the sector indicated by the number. When the next empty sector is found, the sector stored in the third storage means is searched. The sector number stored in the second storage means is stored in the sector of the number as a pointer indicating the connection of the sectors, and when the number of sectors stored in the first storage means becomes 1, the third number is stored. A third pointer is stored as a pointer indicating the connection of the sector to the sector of the sector number stored in the storage means, indicating that there is no next connected sector.
5. The sector management device according to claim 4, wherein the steps are performed.
JP4171497A 1997-02-26 1997-02-26 Sector management method and device Withdrawn JPH10240627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4171497A JPH10240627A (en) 1997-02-26 1997-02-26 Sector management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4171497A JPH10240627A (en) 1997-02-26 1997-02-26 Sector management method and device

Publications (1)

Publication Number Publication Date
JPH10240627A true JPH10240627A (en) 1998-09-11

Family

ID=12616099

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4171497A Withdrawn JPH10240627A (en) 1997-02-26 1997-02-26 Sector management method and device

Country Status (1)

Country Link
JP (1) JPH10240627A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004516536A (en) * 2000-11-22 2004-06-03 サンディスク コーポレイション Processing techniques for non-volatile memory systems with data sectors having a size different from the page size and / or block size of the memory
JP2009104497A (en) * 2007-10-25 2009-05-14 Nec Access Technica Ltd Memory management system and memory management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004516536A (en) * 2000-11-22 2004-06-03 サンディスク コーポレイション Processing techniques for non-volatile memory systems with data sectors having a size different from the page size and / or block size of the memory
JP2009104497A (en) * 2007-10-25 2009-05-14 Nec Access Technica Ltd Memory management system and memory management method

Similar Documents

Publication Publication Date Title
KR100233178B1 (en) Method and system for updating mass storage device configuration records
US7849060B2 (en) System and method for managing log information for transaction
JPH0668736B2 (en) Apparatus and method for providing a cache memory unit with a write operation utilizing two system clock cycles
KR102658600B1 (en) Apparatus and method for accessing metadata when debugging a device
JPH10214203A (en) Information processor
JPH10240627A (en) Sector management method and device
JP2004030224A (en) Processor, method for retracting register and method for designating register
JP2731047B2 (en) Program operand check method
JP2607319B2 (en) Programmable controller
JP3489153B2 (en) File system
JP3460265B2 (en) Data transfer method between computers
JP2615046B2 (en) Record addition processing method
JPS60191342A (en) File control processing system
JPS60134937A (en) Address extension device
JPH03271841A (en) Recovery system for data base
JPH05257807A (en) Cache memory controller
JPH05120343A (en) Index updating system
JP2702356B2 (en) Debug information access method
JP2735400B2 (en) Asynchronous I / O control method
JP2798492B2 (en) List vector processing device
JPH1027153A (en) Bus transfer device
JPH04156626A (en) File entry generating system for vtoc
JP2002351740A (en) Buffer device, device/method/program for buffer control, and recording medium
JPH06168079A (en) Data backup system
JPH0156411B2 (en)

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20040511