JP2002163139A - Data management device and data management method using it - Google Patents

Data management device and data management method using it

Info

Publication number
JP2002163139A
JP2002163139A JP2000356817A JP2000356817A JP2002163139A JP 2002163139 A JP2002163139 A JP 2002163139A JP 2000356817 A JP2000356817 A JP 2000356817A JP 2000356817 A JP2000356817 A JP 2000356817A JP 2002163139 A JP2002163139 A JP 2002163139A
Authority
JP
Japan
Prior art keywords
data
partition
block
data management
physical
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
JP2000356817A
Other languages
Japanese (ja)
Inventor
Yasuo Goto
康雄 後藤
Nobuaki Tomori
宣昭 戸森
Kazuhiro Okamoto
一宏 岡本
Katsumi Fukumoto
克巳 福本
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2000356817A priority Critical patent/JP2002163139A/en
Publication of JP2002163139A publication Critical patent/JP2002163139A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a data management device efficiently storing data and adaptable to a configuration mixed with physical erase blocks of different sizes. SOLUTION: This data management device comprises a flash memory section 1005, a flash memory controller 1004 controlling the operation of the flash memory section 1005, a data management system controller 1002 managing the data stored on the flash memory section 1005, a data management system memory section 1003 storing the data management information referred to from the data management system controller 1002, and software 1006 requesting a data process to a data management system 1001. The flash memory section 1005 comprises erase blocks of the same or different sizes. The data management system controller 1002 manages data with a logical management unit (partition) comprising a storage region including one or a plurality of blocks and the attribute information and state information of the blocks, and it has a function to change the size of the partition.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性半導体メ
モリを記憶媒体として使用する情報処理装置およびその
拡張記憶装置、より具体的にはハンドヘルドコンピュー
タ、電子手帳や携帯電話、メモリーカードリーダー等に
使用されるデータ管理装置およびそれを用いたデータ管
理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus using a nonvolatile semiconductor memory as a storage medium and an extended storage apparatus thereof, and more specifically, to a hand-held computer, an electronic organizer, a cellular phone, a memory card reader and the like. And a data management method using the same.

【0002】[0002]

【従来の技術】従来から、パーソナルコンピュータにお
けるデータ記憶装置としては、ハード磁気ディスクドラ
イブが多く用いられている。このハード磁気ディスクド
ライブの特徴および利点としては、データが不揮発性記
憶されること、およびデータの読み出しと書き換えをセ
クタ単位(例えば512バイト単位)で行い、データの
上書きが可能であることが挙げられる。一方、このハー
ド磁気ディスクドライブの欠点としては、物理的なサイ
ズが大きいこと、相対的に消費電力が大きいこと、およ
び振動や衝撃に弱いことが挙げられる。
2. Description of the Related Art Conventionally, hard magnetic disk drives have been widely used as data storage devices in personal computers. The features and advantages of this hard magnetic disk drive include that data is stored in a non-volatile manner, and that data can be read and rewritten in sector units (for example, in 512-byte units) and data can be overwritten. . On the other hand, disadvantages of this hard magnetic disk drive include its large physical size, relatively high power consumption, and its susceptibility to vibration and shock.

【0003】上記ハード磁気ディスクドライブに対し
て、フラッシュメモリからなる半導体メモリの利点とし
ては、小型で振動や衝撃に強いこと、および相対的に消
費電力が著しく小さいことが挙げられる。一方、フラッ
シュメモリからなる半導体メモリの欠点としては、デー
タの読み出しと書き込みが1バイト単位(ワード)単位
であること、データの書き換えには一旦データ消去動作
(通常64キロバイトのブロック単位での消去)が必要
で、データの上書きが不可能であること、およびブロッ
ク消去回数が有限(通常10万回まで)が挙げられる。
The advantages of the semiconductor memory including the flash memory over the above-described hard magnetic disk drive include a small size, high resistance to vibration and shock, and relatively low power consumption. On the other hand, the disadvantages of the semiconductor memory composed of a flash memory are that data reading and writing are performed in 1-byte units (words), and data rewriting is performed by a data erasing operation (erasing in a 64-kilobyte block unit). And that data overwriting is not possible, and the number of block erasures is finite (usually up to 100,000 times).

【0004】フラッシュメモリは、電気的にデータの書
き込みと消去が可能であり、書き込まれたデータは消去
(通常64キロバイト単位)されるまでの間は不揮発性
データとして保持される。この消去動作は、ブロック単
位(通常64キロバイト単位)で行われ、上記ハード磁
気ディスクドライブにおけるデータ書き換え単位(例え
ば512バイト)と比較した場合、フラッシュメモリで
は著しく大きなデータ書き換え単位となっている。な
お、フラッシュメモリの消去動作とは、ソース、ドレイ
ン、コントロールゲートおよび電子の蓄積手段となるフ
ローティングゲートからなるフラッシュメモリにおい
て、通常、フローティングゲートから電子を引き抜き、
その結果、メモリセルの閾値が低く(約3V以下)なる
ことを言う。また、フラッシュメモリの書き込み動作と
は、通常、フローティングゲートに電子を注入し、その
結果、メモリセルの閾値が高く(約5.5V以上)なる
ことを言う。
A flash memory is capable of electrically writing and erasing data, and the written data is held as non-volatile data until it is erased (usually in units of 64 kilobytes). This erasing operation is performed in units of blocks (usually in units of 64 kilobytes), and is a remarkably large data rewriting unit in the flash memory as compared with the data rewriting unit (for example, 512 bytes) in the hard magnetic disk drive. Note that the erasing operation of the flash memory means that, in a flash memory including a source, a drain, a control gate, and a floating gate serving as an electron storage means, electrons are usually extracted from the floating gate.
As a result, it means that the threshold value of the memory cell becomes lower (about 3 V or less). The writing operation of the flash memory generally means that electrons are injected into the floating gate, and as a result, the threshold value of the memory cell becomes higher (about 5.5 V or more).

【0005】フラッシュメモリは、1バイト(ワード)
の書き込み時間が約20マイクロ秒であるのに対して、
消去時間(通常64キロバイト単位の場合)が約1秒程
度と著しく遅く、消去の保証回数が有限(通常10万回
まで)であるという欠点がある。このため、1セクタ
(例えば512バイト)のデータ書き換え毎に消去動作
(通常64キロバイト)が行われる場合、データ書き換
え時間(消去時間と書き込み時間の和)として1秒以上
が必要となり、ハード磁気ディスクドライブのディスク
書き換え時間と比較して、著しく遅いものとなる。フラ
ッシュメモリを上記ハード磁気ディスクドライブの代替
として用いるためには、上記フラッシュメモリの欠点を
踏まえ、かつ、データの取り扱い単位を上記ハード磁気
ディスクドライブ程度(数百バイト)に小さくする必要
がある。
[0005] Flash memory is 1 byte (word)
Write time of about 20 microseconds,
The erasing time (usually in units of 64 kilobytes) is extremely slow, about 1 second, and the number of guaranteed erasures is limited (usually up to 100,000 times). Therefore, when an erasing operation (usually 64 kilobytes) is performed every time one sector (for example, 512 bytes) of data is rewritten, a data rewriting time (the sum of the erasing time and the writing time) of 1 second or more is required. This is significantly slower than the disk rewriting time of the drive. In order to use the flash memory as a substitute for the hard magnetic disk drive, it is necessary to take the drawbacks of the flash memory into consideration and to reduce the data handling unit to about the above-mentioned hard magnetic disk drive (several hundred bytes).

【0006】そこで、動作時間の長いデータ消去をなる
べく行わず、効率良くデータを管理するための仕組み、
すなわち、フラッシュメモリに対応したファイルシステ
ムに関する技術として、例えば特開平6−202821
号や特開平9−97139号に提案されているようなも
のがある。
Therefore, a mechanism for efficiently managing data without performing data erasure with a long operation time as much as possible,
That is, as a technology related to a file system corresponding to a flash memory, for example, Japanese Patent Application Laid-Open No. 6-202821
And Japanese Patent Application Laid-Open No. 9-97139.

【0007】特開平6−202821号では、複数のフ
ラッシュメモリを用いて固体メモリディスクを実現する
ために、各フラッシュメモリの消去ブロックに、データ
が格納されているセクタを記憶するデータスペース、お
よびブロックセクタ変換テーブルを含む。このブロック
セクタ変換テーブルは、ブロックのデータスペースに記
憶されている各データのセクタをセクタ番号によって識
別する方法を採っている。
In Japanese Patent Application Laid-Open No. Hei 6-202821, in order to realize a solid-state memory disk using a plurality of flash memories, an erase block of each flash memory includes a data space for storing a sector in which data is stored, and a block. Includes sector conversion table. This block sector conversion table employs a method of identifying a sector of each data stored in the data space of a block by a sector number.

【0008】特開平9−97139号では、フラッシュ
メモリを用いてファイルシステムを実現するために、デ
ータ領域およびデータ領域に対応する管理領域で構成さ
れる複数の記憶ブロックをフラッシュメモリに形成して
いる。また、各記憶ブロックにおいて、データ領域の記
憶状態を示す状態情報を管理領域に格納し、その状態情
報に基づいてデータ領域へのアクセスを管理する手段
と、指定された記憶ブロックに対して、その管理領域に
格納されている状態情報をデータ領域が無効である情報
に更新することによりそのデータ領域を廃棄する手段と
を備えている。
In Japanese Patent Laid-Open No. 9-97139, in order to realize a file system using a flash memory, a plurality of storage blocks each including a data area and a management area corresponding to the data area are formed in the flash memory. . Further, in each storage block, state information indicating the storage state of the data area is stored in the management area, and means for managing access to the data area based on the state information is provided. Means for updating the status information stored in the management area to information in which the data area is invalid, thereby discarding the data area.

【0009】以下に、図41〜図44を用いてデータ管
理の仕組みについて説明する。
Hereinafter, a data management mechanism will be described with reference to FIGS.

【0010】物理的なデータ消去単位(物理消去ブロッ
クと称する、例えば64キロバイト:図41の実線で囲
んだ部分。)に対して、充分に小さいデータ消去単位で
データ管理を行う場合、通常はその物理消去ブロック
(例えば64キロバイト)を仮想的に分割(論理セクタ
と称する、例えば512バイト:図41の点線で囲んだ
部分、斜線部はその1つを示す)する。
When data management is performed in a sufficiently small data erasing unit for a physical data erasing unit (referred to as a physical erasing block, for example, 64 kilobytes: a portion surrounded by a solid line in FIG. 41), usually, A physical erase block (for example, 64 kilobytes) is virtually divided (referred to as a logical sector, for example, 512 bytes: a portion surrounded by a dotted line in FIG. 41, and a hatched portion indicates one of them).

【0011】この論理セクタには、図42に示すよう
に、データだけではなく、書き込んだデータを識別する
ための論理セクタ番号および書き込み状態(データ有
効、データ無効および未使用の3種類の状態)を示すフ
ラグが格納されている。
In this logical sector, as shown in FIG. 42, not only data but also a logical sector number for identifying the written data and a write state (three kinds of states of data valid, data invalid and unused). Is stored.

【0012】データの書き込みは、論理セクタ単位で行
い、書き込み状態を示すフラグを未使用からデータ有効
に更新する。また、データの書き換え(更新)またはデ
ータの削除は、図43に示すように、更新前のデータま
たは削除されるデータに対して物理的な消去動作を行わ
ず、論理セクタのフラグをデータ有効からデータ無効に
することにより、データ全体の有効/無効を表現する。
なお、図43において、○で囲んだ数値は論理セクタ番
号を示し、×が記されている論理セクタはデータ無効を
示す。
Data is written in units of logical sectors, and a flag indicating a write state is updated from unused to data valid. As shown in FIG. 43, when rewriting (updating) data or deleting data, a physical erase operation is not performed on data before update or data to be deleted, and the flag of the logical sector is changed from data valid to data valid. By making the data invalid, the validity / invalidity of the entire data is expressed.
In FIG. 43, a numerical value enclosed by a circle indicates a logical sector number, and a logical sector indicated by an x indicates invalid data.

【0013】このようなデータ書き換えを複数回行う
と、同一の論理セクタ番号を有する論理セクタが複数存
在することになる。しかし、このとき、データ有効を示
すフラグを有する論理セクタは、常に1個である。デー
タの読み出しの際には、その論理セクタ番号、およびフ
ラグがデータ有効を示すことを条件として、論理セクタ
を順次検索し、最新のデータを特定する。
When such data rewriting is performed a plurality of times, there are a plurality of logical sectors having the same logical sector number. However, at this time, there is always one logical sector having a flag indicating data validity. When data is read, logical sectors are sequentially searched and the latest data is specified, provided that the logical sector number and the flag indicate that the data is valid.

【0014】データの書き換えは、実際には未使用セク
タへの書き込みであり、元のデータは見掛け上削除(フ
ラグが無効化)されるが、物理的にはメモリ領域に存在
している。物理消去ブロックの容量を全て使用した後、
さらにデータの書き込みまたはを行う際には、物理消去
ブロックに対する消去動作が必要となる。この消去動作
を再構築(リクレーム)と称する。
The rewriting of data is actually writing to an unused sector, and the original data is apparently deleted (the flag is invalidated), but physically exists in the memory area. After using all the capacity of the physical erase block,
Further, when data is written or written, an erasing operation is required for the physical erase block. This erasing operation is called reconstruction (reclaim).

【0015】再構築を行うためには、予め予備の物理消
去ブロックを1個用意しておく必要がある。再構築で
は、図44に示すように、予備の物理消去ブロック(図
44の下の物理消去ブロック)へ、フラグが有効である
論理セクタのみをセクタ毎に複写し、複写元の物理消去
ブロック(図44の上の物理消去ブロック)の無いよう
を消去する。このとき、データの再配置を行うことによ
り、未使用セクタを一まとめにする。予備の物理消去ブ
ロックは、データ管理に使用される物理消去ブロックの
個数に関わらず、1個確保すればよいが、必ず他の物理
消去ブロックと同じ物理容量でなければならないという
制約がある。
In order to perform reconstruction, it is necessary to prepare one spare physical erase block in advance. In the reconstruction, as shown in FIG. 44, only the logical sector for which the flag is valid is copied for each sector to a spare physical erase block (the lower physical erase block in FIG. 44), and the copy source physical erase block ( The physical erase block (upper part of FIG. 44) is erased. At this time, the unused sectors are grouped together by rearranging the data. One spare physical erase block may be reserved regardless of the number of physical erase blocks used for data management, but there is a restriction that it must have the same physical capacity as other physical erase blocks.

【0016】以下に、図45〜図55を用いて、従来の
データ管理方法について詳細に説明する。
A conventional data management method will be described below in detail with reference to FIGS.

【0017】図45は、本願出願人が以前に出願した特
願平11−254973号に開示されている、従来のフ
ラッシュメモリを用いたファイルシステムの構成を示す
図である。図45において、1はファイルシステム、2
はファイルシステム1の処理を制御するファイルシステ
ム制御部、3はファイルシステム1が制御情報を格納す
るために使用するファイルシステムメモリ部、4はフラ
ッシュメモリ部5へのデータ処理を制御するフラッシュ
メモリ制御部、5はフラッシュメモリ部、6はファイル
システム1へデータの処理を依頼するアプリケーション
プログラムまたはオペレーションシステム(OS)等の
ソフトウェアである。
FIG. 45 is a diagram showing a configuration of a conventional file system using a flash memory, which is disclosed in Japanese Patent Application No. 11-254973 filed by the present applicant before. In FIG. 45, 1 is a file system, 2
Is a file system control unit that controls the processing of the file system 1, 3 is a file system memory unit that is used by the file system 1 to store control information, and 4 is a flash memory control that controls data processing to the flash memory unit 5. And 5, a flash memory unit; and 6, software such as an application program or an operation system (OS) for requesting the file system 1 to process data.

【0018】図46は、図45のフラッシュメモリ部5
に格納されているデータの構成を示す図である。フラッ
シュメモリ部5の各消去ブロック(物理消去ブロック)
51は、データの取り扱い単位である複数の物理セクタ
52に分割されて配置され、各消去ブロック51内で一
意の物理セクタ番号を有する。例えば各消去ブロック5
1のサイズが64キロバイトで各物理セクタ52のサイ
ズが512バイトである場合、各消去ブロック51には
128個の物理セクタ52が存在することになる。
FIG. 46 shows the flash memory unit 5 shown in FIG.
FIG. 3 is a diagram showing a configuration of data stored in a. Each erase block (physical erase block) of the flash memory unit 5
Reference numeral 51 is divided into a plurality of physical sectors 52, which are data handling units, and has a unique physical sector number in each erase block 51. For example, each erase block 5
If the size of 1 is 64 kilobytes and the size of each physical sector 52 is 512 bytes, each erase block 51 has 128 physical sectors 52.

【0019】このフラッシュメモリ部5内の複数の消去
ブロック51のうち、任意の1個の消去ブロック51を
ファイルシステム1の再構築用に用いられる、データが
書き込まれていない予備消去ブロックとして予め確保し
ておく。また、各消去ブロック51の先頭の物理セクタ
52は、各消去ブロック51の制御情報を格納するブロ
ックコントロールセクタ52aとして予め確保してお
く。
An arbitrary one of the plurality of erase blocks 51 in the flash memory section 5 is reserved in advance as a spare erase block in which no data is written, which is used for reconstructing the file system 1. Keep it. The leading physical sector 52 of each erase block 51 is reserved in advance as a block control sector 52a for storing control information of each erase block 51.

【0020】消去ブロック51において、ブロックコン
トロールセクタ52aには、先頭からその消去ブロック
51の状態情報として2バイト、セクタ#1〜#127
の物理セクタ52の状態情報として各々2バイトが順次
配列され、2バイト×128個=256バイトの情報を
有している。
In the erase block 51, the block control sector 52a has two bytes from the beginning as status information of the erase block 51, sectors # 1 to # 127.
2 bytes are sequentially arranged as status information of the physical sector 52, and have information of 2 bytes × 128 = 256 bytes.

【0021】消去ブロック51の状態情報は、ファイル
システム制御部2が割り当てを行う0〜255の一意の
論理ブロック番号、および5種類のブロック状態のいず
れかを表すデータからなる。5種類のブロック状態と
は、(1)「未使用」を表す11111111b(bは
2新数を表す。以下同様)、(2)「データ転送中」を
表す11111110b、(3)「元ブロック消去中」
を表す11111100b、(4)「データ有り」を表
す11111000b、(5)「ブロックフル」を表す
11110000bである。
The status information of the erasure block 51 is composed of unique logical block numbers 0 to 255 to which the file system control unit 2 allocates, and data indicating any of five types of block status. The five types of block states include (1) 11111111b representing “unused” (b represents a new number; the same applies to the following description), (2) 11111110b representing “data transfer in progress”, and (3) “erase original block”. During"
11111100b representing (4) “data present”, and (11) 110000b representing (5) “block full”.

【0022】消去ブロック51の各物理セクタ52の状
態情報は、消去ブロック51の状態情報と同様に、ファ
イルシステム制御部2が割り当てを行う0〜4095の
一意論理セクタ番号、および5種類のセクタ状態のいず
れかを表すデータからなる。5種類のセクタ状態とは
(1)「セクタ未使用」を表す1111b、(2)「デ
ータ書き込み中」を表す1110b、(3)「データ書
き込み完了」を表す1100b、(4)「データ有効」
を表す1000b、(5)「データ無効」を表す000
0bである。
The status information of each physical sector 52 of the erasure block 51, like the status information of the erasure block 51, includes unique logical sector numbers from 0 to 4095 to which the file system control unit 2 allocates, and five types of sector status. Consists of data representing either of the following. The five types of sector states are (1) 1111b indicating "sector not used", (2) 1110b indicating "data writing", (3) 1100b indicating "data writing completed", and (4) "data valid".
(B) 000 representing “data invalid”
0b.

【0023】図47は、図45のファイルシステムメモ
リ部3に格納されている各消去ブロック51に関するデ
ータの構成(以下、ブロック情報表10と称する)を示
す図である。この図47においては、物理ブロック番
号、論理ブロック番号およびブロック状態を1つの情報
単位としており、例えば物理ブロック番号=0、論理ブ
ロック番号=0、ブロック状態=「データ有り」となっ
ている消去ブロック51および物理ブロック番号=1、
論理ブロック番号=1、ブロック状態=「ブロックフ
ル」となっている消去ブロック51等が存在することを
示している。
FIG. 47 is a diagram showing a data configuration (hereinafter, referred to as a block information table 10) of each erase block 51 stored in the file system memory unit 3 of FIG. In FIG. 47, a physical block number, a logical block number, and a block state are used as one information unit. For example, an erase block having a physical block number = 0, a logical block number = 0, and a block state = “data present” is provided. 51 and physical block number = 1,
This indicates that there is an erase block 51 or the like with the logical block number = 1 and the block state = “block full”.

【0024】なお、物理ブロック番号も論理ブロック番
号も各々の消去ブロックに1個ずつ与えられる番号であ
る。物理ブロック番号はフラッシュメモリ部の物理的構
成に従って一意に決定され、データ管理システムが動作
している間、各々の消去ブロックに与えられた物理ブロ
ック番号は不変であり、データの物理アドレスを計算す
るのに使用される。一方、論理ブロック番号はデータ領
域の再構築を行った場合にスペアブロックと論理ブロッ
ク番号を入れ替えるが、データの格納されている消去ブ
ロックの論理ブロック番号は変化しない。この論理ブロ
ック番号により、データの格納されている場所を管理す
ることができる。各々の物理ブロック番号に対応する論
理ブロック番号は、再構築処理を行う度に変化する。各
消去ブロックの物理ブロック番号と論理ブロック番号と
の対応関係は、図47に示す管理テーブルに保有されて
いる。
Both the physical block number and the logical block number are numbers given to each erase block. The physical block number is uniquely determined according to the physical configuration of the flash memory unit. During the operation of the data management system, the physical block number given to each erase block is unchanged, and the physical address of the data is calculated. Used for On the other hand, as for the logical block number, when the data area is reconstructed, the spare block is replaced with the logical block number, but the logical block number of the erase block storing the data does not change. The location where data is stored can be managed by the logical block number. The logical block number corresponding to each physical block number changes every time the reconstruction process is performed. The correspondence between the physical block number and the logical block number of each erase block is held in the management table shown in FIG.

【0025】図48は、図45のファイルシステムメモ
リ部3に格納されている各物理セクタ52に関するデー
タの構成(以下、セクタ情報表11と称する)を示す図
である。この図48においては、物理ブロック番号、物
理セクタ、論理セクタ番号およびセクタ状態を1つの情
報単位としており、例えば物理ブロック番号=0、物理
セクタ番号=0、論理セクタ番号=100、セクタ状態
=「データ有効」となっている物理セクタ52および物
理ブロック番号=0、物理セクタ番号=1、論理セクタ
番号=10、セクタ状態=「データ無効」となっている
物理セクタ52等が存在することを示している。
FIG. 48 is a diagram showing a data structure (hereinafter, referred to as sector information table 11) of each physical sector 52 stored in the file system memory unit 3 of FIG. In FIG. 48, a physical block number, a physical sector, a logical sector number, and a sector state are defined as one information unit. For example, a physical block number = 0, a physical sector number = 0, a logical sector number = 100, and a sector state = “ It indicates that there is a physical sector 52 with “data valid” and a physical block number = 0, a physical sector number = 1, a logical sector number = 10, and a physical sector 52 with a sector status = “data invalid”. ing.

【0026】なお、物理セクタ番号も論理セクタ番号も
各々のセクタに1個ずつ与えられる番号である。物理セ
クタ番号は消去ブロックをセクタサイズに分割して管理
するときに、各々のセクタに対して一意に割り当てる番
号である。物理セクタ番号は、そのセクタが消去ブロッ
ク内のどこの場所にあるかを表し、データの物理アドレ
スを計算するために使用される。データ管理システムが
動作している間、セクタ状態や格納しているデータは変
わるが、そのセクタの物理セクタ番号は不変である。一
方、論理セクタ番号は各々のセクタに対して割り当てら
れる番号であるが、格納しているデータに依存して変化
する。データの書き換えを行った場合、無効となったセ
クタと、未使用から新たに有効になったセクタは同じ論
理セクタ番号を有する。データ管理システムは、論理セ
クタ番号を使用してデータの管理を行う。各々の論理セ
クタ番号に対応する物理セクタ番号は、データの書き換
えを行う度に変化する。各々のセクタの物理セクタ番号
と論理セクタ番号との対応関係は、図48に示す管理テ
ーブルに保有されている。
Both the physical sector number and the logical sector number are numbers assigned to each sector. The physical sector number is a number uniquely assigned to each sector when an erase block is divided into sector sizes and managed. The physical sector number indicates where in the erase block the sector is located and is used to calculate the physical address of the data. While the data management system is operating, the sector status and stored data change, but the physical sector number of that sector remains unchanged. On the other hand, the logical sector number is a number assigned to each sector, but changes depending on stored data. When data is rewritten, an invalid sector and a newly valid sector from unused have the same logical sector number. The data management system manages data using logical sector numbers. The physical sector number corresponding to each logical sector number changes each time data is rewritten. The correspondence between the physical sector number and the logical sector number of each sector is held in the management table shown in FIG.

【0027】図49は、図45のファイルシステムメモ
リ部3に格納されている消去ブロック毎に、各物理セク
タ52の数を各々のセクタ状態に応じて整理したデータ
の構成(以下、セクタ情報表12と称する)を示す図で
ある。この図49においては、物理ブロック番号、未使
用セクタ数、データ有効セクタ数およびデータ無効セク
タ数を1つの情報単位としており、例えば物理ブロック
番号=0、未使用セクタ数=100、データ有効セクタ
数=20、データ無効セクタ数=7となっている消去ブ
ロック51および物理ブロック番号=1、未使用セクタ
数=0、データ有効セクタ数=50、データ無効セクタ
数=77となっている消去ブロック51等が存在するこ
とを示している。
FIG. 49 shows a data structure (hereinafter referred to as a sector information table) in which the number of each physical sector 52 is arranged according to each sector state for each erase block stored in the file system memory unit 3 of FIG. 12 (referred to as No. 12). In FIG. 49, the physical block number, the number of unused sectors, the number of valid data sectors, and the number of invalid data sectors are set as one information unit. For example, the physical block number = 0, the number of unused sectors = 100, the number of valid data sectors = 20, the number of invalid data sectors = 7, and the erase block 51 where the physical block number = 1, the number of unused sectors = 0, the number of valid data sectors = 50, and the number of invalid data sectors = 77. Etc. exist.

【0028】図47のブロック情報表10、図48のセ
クタ情報表11および図49のセクタ情報表12は、フ
ァイルシステム1が起動する段階において、フラッシュ
メモリ部5から各消去ブロック51のブロックコントロ
ールセクタ52aを読み出すことによって各々作成され
る。また、ブロック情報表10、セクタ情報表11およ
びセクタ情報表12を作成しない場合においても、これ
らの表が各消去ブロック51のブロックコントロールセ
クタ52aに格納されているため、ファイルシステム1
を使用することは可能である。しかしながら、ファイル
システムメモリ部3の動作速度がフラッシュメモリ部5
よりも高速であるため、ファイルシステムメモリ部3に
ブロック情報表10、セクタ情報表11およびセクタ情
報表12を作成しておいておく方が、フラッシュメモリ
部5の内部状態やデータの格納場所を高速に把握するこ
とができる。また、フラッシュメモリ部5とのデータの
やり取りが減るため、ファイルシステムメモリ部3を利
用することは、ファイルシステム1の動作速度を高速に
する上で非常に有効である。
The block information table 10 in FIG. 47, the sector information table 11 in FIG. 48, and the sector information table 12 in FIG. 49 show the block control sector of each erase block 51 from the flash memory unit 5 when the file system 1 starts up. Each is created by reading 52a. Even when the block information table 10, the sector information table 11, and the sector information table 12 are not created, since these tables are stored in the block control sector 52a of each erase block 51, the file system 1
It is possible to use However, the operating speed of the file system memory unit 3 is not
It is faster to create the block information table 10, the sector information table 11, and the sector information table 12 in the file system memory unit 3 in order to save the internal state of the flash memory unit 5 and the storage location of data. You can grasp at high speed. Since the exchange of data with the flash memory unit 5 is reduced, using the file system memory unit 3 is very effective in increasing the operation speed of the file system 1.

【0029】(データの読み出し処理)図50は、従来
技術におけるフラッシュメモリ部5に格納されたデータ
の読み出し処理に関するフローチャートである。
(Data reading process) FIG. 50 is a flowchart relating to a process of reading data stored in the flash memory unit 5 in the prior art.

【0030】アプリケーションプログラムまたはオペレ
ーティングシステム6において、フラッシュメモリ部5
からのデータの読み出し要求が発生した場合、この読み
出し要求と共に論理セクタ番号がアプリケーションプロ
グラムまたはオペレーティングシステム6からファイル
システム制御部2に与えられる。
In the application program or operating system 6, the flash memory unit 5
, A logical sector number is given from the application program or the operating system 6 to the file system control unit 2 together with the read request.

【0031】ファイルシステム制御部2は、ファイルシ
ステムメモリ部3内のセクタ情報表11をアクセスし
て、与えられた論理セクタ番号を検索して、この論理セ
クタ番号に対応するセクタ状態が「データ有効」である
ことを確認する。そして、この論理セクタ番号に対応す
る物理セクタ番号を取得して、この物理セクタ番号をフ
ラッシュメモリ制御部4に与える(ステップ121)。
The file system control unit 2 accesses the sector information table 11 in the file system memory unit 3, searches for a given logical sector number, and determines that the sector state corresponding to this logical sector number is "data valid". ". Then, a physical sector number corresponding to this logical sector number is obtained, and this physical sector number is given to the flash memory control unit 4 (step 121).

【0032】フラッシュメモリ制御部4は、この物理セ
クタ番号に基づいてフラッシュメモリ部5をアクセス
し、この物理セクタ番号に該当する物理的な格納場所の
物理セクタを読み出して読み出したデータをファイルシ
ステム制御部2に与える(ステップ122)。
The flash memory control unit 4 accesses the flash memory unit 5 based on the physical sector number, reads a physical sector at a physical storage location corresponding to the physical sector number, and stores the read data in a file system control. (Step 122).

【0033】読み出すべき残りのデータがある場合には
(ステップ123がYes)、ステップ121へ戻り、
読み出すべき残りのデータが無い場合には(ステップ1
23がNo)、処理を終了する。
When there is remaining data to be read (Yes in step 123), the process returns to step 121,
If there is no remaining data to be read (step 1
23 is No), and the process ends.

【0034】(データの書き込み処理)図51〜図53
は、従来技術におけるフラッシュメモリ部5へのデータ
の書き込み処理に関するフローチャートである。
(Data Write Processing) FIGS. 51 to 53
5 is a flowchart relating to a process of writing data to the flash memory unit 5 according to the related art.

【0035】まず、アプリケーションプログラムまたは
オペレーティングシステム6において、フラッシュメモ
リ部5へのデータの書き込み要求が発生した場合、この
書き込み要求と共に論理セクタ番号、および書き込まれ
るデータがアプリケーションプログラムまたはオペレー
ティングシステム6からファイルシステム制御部2に与
えられる。ファイルシステム制御部2は、ファイルシス
テムメモリ部3内のセクタ情報表12をアクセスして、
未使用セクタ数が最も多い物理ブロック番号(書き込み
可能な消去ブロック51を示す)を取得し(ステップ1
31)、取得できたか否かの確認を行う(ステップ13
2)。物理ブロック番号が取得できなかった場合には
(ステップ132がNo)、書き込み可能な消去ブロッ
ク51を確保するために、後述するファイルシステムの
再構築を行う(ステップ133)。
First, when a request for writing data to the flash memory unit 5 occurs in the application program or the operating system 6, the logical sector number and the data to be written together with the write request are transmitted from the application program or the operating system 6 to the file system. It is provided to the control unit 2. The file system control unit 2 accesses the sector information table 12 in the file system memory unit 3 and
The physical block number having the largest number of unused sectors (indicating the writable erase block 51) is obtained (step 1).
31), and confirm whether or not the acquisition has been completed (step 13)
2). If the physical block number could not be obtained (No at Step 132), a file system described later is reconstructed to secure the writable erase block 51 (Step 133).

【0036】未使用セクタ数が最も多い物理ブロック番
号を取得できた場合には(ステップ132がYes)、
ファイルシステム制御部2は、セクタ情報表11をアク
セスして、ステップ131またはステップ133におい
て取得した物理ブロック番号に対応する各物理セクタ番
号からセクタ状態が「未使用」となっている物理セクタ
番号を取得する。さらに、セクタ情報表12をアクセス
して、その物理ブロック番号に対応する未使用セクタ数
を−1し、データ有効セクタ数を+1する(ステップ1
34)。
If the physical block number with the largest number of unused sectors has been obtained (Yes at step 132),
The file system control unit 2 accesses the sector information table 11 and finds a physical sector number whose sector status is "unused" from each physical sector number corresponding to the physical block number acquired in step 131 or 133. get. Further, by accessing the sector information table 12, the number of unused sectors corresponding to the physical block number is decremented by one, and the number of valid data sectors is incremented by one (step 1).
34).

【0037】この後、ファイルシステム制御部2は、ブ
ロック情報表10をアクセスして、ステップ131また
はステップ133において取得した物理ブロック番号に
対応するブロック状態が「未使用」であるか否かの確認
を行う(ステップ135)。ブロック状態が「未使用」
であれば(ステップ135がYes)、フラッシュメモ
リ制御ブロック4を通じてフラッシュメモリ部5をアク
セスし、その物理ブロック番号に対応する消去ブロック
51のブロックコントロールセクタ52aの論理ブロッ
ク番号をその物理ブロック番号に更新し、ブロックコン
トロールセクタ52aのブロック状態を「未使用」から
「データ有り」に更新する。同様に、ファイルシステム
制御部2は、ブロック情報表10をアクセスして、ステ
ップ131またはステップ133において取得した物理
ブロック番号に対応する論理ブロック番号を物理ブロッ
ク番号に更新し、ブロック状態を「未使用」から「デー
タ有り」に更新して(ステップ136)、ステップ13
7に移る。ブロック状態が「未使用」でなければ(ステ
ップ135がNo)、ステップ136をジャンプしてス
テップ137に移る。
Thereafter, the file system control unit 2 accesses the block information table 10 and checks whether or not the block state corresponding to the physical block number obtained in step 131 or 133 is “unused”. Is performed (step 135). Block status is "unused"
If it is (Yes at Step 135), the flash memory unit 5 is accessed through the flash memory control block 4, and the logical block number of the block control sector 52a of the erase block 51 corresponding to the physical block number is updated to the physical block number. Then, the block state of the block control sector 52a is updated from "unused" to "data present". Similarly, the file system control unit 2 accesses the block information table 10, updates the logical block number corresponding to the physical block number acquired in step 131 or 133 to the physical block number, and changes the block state to “unused”. "Is updated to" with data "(step 136), and step 13
Move to 7. If the block state is not “unused” (No in step 135), the process jumps from step 136 to step 137.

【0038】次に、ファイルシステム制御部2は、セク
タ情報表12をアクセスして、ステップ131またはス
テップ133において取得した物理ブロック番号に対応
する未使用セクタ数が0であるか否かの確認を行う(ス
テップ137)。未使用セクタ数が0であれば(ステッ
プ137がYes)、フラッシュメモリ制御部4を通じ
てフラッシュメモリ部5をアクセスし、その物理ブロッ
ク番号に対応する消去ブロック51のブロックコントロ
ールセクタ52aのブロック状態を「データ有り」から
「ブロックフル」へ更新する。同様に、ファイルシステ
ム制御部2は、ブロック情報表10をアクセスして、ス
テップ131またはステップ133において取得した物
理ブロック番号に対応するブロック状態も「データ有
り」から「ブロックフル」に更新する(ステップ13
8)。未使用セクタ数が0でなければ(ステップ137
がNo)、ステップ138をジャンプしてステップ13
9に移る。
Next, the file system control unit 2 accesses the sector information table 12 to check whether the number of unused sectors corresponding to the physical block number obtained in step 131 or 133 is 0 or not. Perform (step 137). If the number of unused sectors is 0 (Yes in step 137), the flash memory unit 5 is accessed through the flash memory control unit 4, and the block state of the block control sector 52a of the erase block 51 corresponding to the physical block number is set to " Update from "data present" to "block full". Similarly, the file system control unit 2 accesses the block information table 10 and updates the block state corresponding to the physical block number acquired in step 131 or 133 from “data present” to “block full” (step 13
8). If the number of unused sectors is not 0 (step 137)
Is No), the step 138 is jumped to the step 13
Move to 9.

【0039】続いて、ファイルシステム制御部2は、フ
ラッシュメモリ制御部4を通じてフラッシュメモリ部5
にアクセスして、ステップ131またはステップ133
において取得した物理ブロック番号およびステップ13
4において取得した物理セクタ番号に対応する消去ブロ
ック51のブロックコントロールセクタ52aの論理セ
クタ番号に、ファイルシステム制御部2に与えられた論
理セクタ番号を書き込み、このセクタ52のセクタ状態
を「未使用」から「データ書き込み中」へ更新する。同
様に、ファイルシステム制御部2は、セクタ情報表11
をアクセスして、ステップ131またはステップ133
において取得した物理ブロック番号およびステップ13
4において取得した物理セクタ番号に対応する論理セク
タ番号を、ファイルシステム制御部2に与えられた論理
セクタ番号に更新し、セクタ状態を「未使用」から「デ
ータ書き込み中」へ更新する(ステップ139)。
Subsequently, the file system control section 2 sends the flash memory section 5 through the flash memory control section 4.
To step 131 or step 133
Physical block number acquired in step 13 and step 13
4, the logical sector number given to the file system control unit 2 is written to the logical sector number of the block control sector 52a of the erase block 51 corresponding to the physical sector number acquired, and the sector state of this sector 52 is set to "unused". To "writing data". Similarly, the file system control unit 2 sets the sector information table 11
Is accessed, and step 131 or step 133 is performed.
Physical block number acquired in step 13 and step 13
4, the logical sector number corresponding to the physical sector number acquired is updated to the logical sector number given to the file system control unit 2, and the sector status is updated from "unused" to "data writing" (step 139). ).

【0040】その後、ファイルシステム制御部2は、フ
ラッシュメモリ制御部4を通じてフラッシュメモリ部5
にアクセスして、ステップ131またはステップ133
において取得した物理ブロック番号およびステップ13
4において取得した物理セクタ番号に対応するセクタ5
2に、ファイルシステム制御部2に与えられたデータを
書き込む(ステップ140)。
After that, the file system control unit 2 sends the flash memory unit 5 through the flash memory control unit 4.
To step 131 or step 133
Physical block number acquired in step 13 and step 13
Sector 5 corresponding to the physical sector number obtained in 4
2, the data given to the file system control unit 2 is written (step 140).

【0041】ファイルシステム制御部2は、フラッシュ
メモリ部5内のセクタ52への書き込み終了後、ステッ
プ131またはステップ133において取得した物理ブ
ロック番号およびステップ134において取得した物理
セクタ番号に対応する消去ブロック51のブロックコン
トロールセクタ52aの論理セクタ番号のセクタ状態を
「データ書き込み中」から「データ書き込み完了」へ更
新する。同様に、ファイルシステム制御部2は、セクタ
情報表11をアクセスして、ステップ131またはステ
ップ133において取得した物理ブロック番号およびス
テップ134において取得した物理セクタ番号に対応す
るセクタ状態を「データ書き込み中」から「データ書き
込み完了」へ更新する(ステップ141)。
After the writing to the sector 52 in the flash memory unit 5 is completed, the file system control unit 2 deletes the erase block 51 corresponding to the physical block number obtained in step 131 or 133 and the physical sector number obtained in step 134. Update the sector state of the logical sector number of the block control sector 52a from “data writing in progress” to “data write completion”. Similarly, the file system control unit 2 accesses the sector information table 11 and sets the sector state corresponding to the physical block number obtained in step 131 or step 133 and the physical sector number obtained in step 134 to “data writing”. Is updated to "data write completed" (step 141).

【0042】次に、ファイルシステム制御部2は、フラ
ッシュメモリ部5内のセクタ52に書き込んだデータ
が、既にフラッシュメモリ部5に書き込まれていたデー
タの更新データであるか否かの確認を行う。この確認
は、セクタ情報表11にアクセスしてデータを書き込ん
だセクタ52と同じ論理セクタ番号であるセクタ52が
存在するか否かを検索する。そして、存在すれば、その
セクタの物理セクタ番号と、そのセクタが存在するブロ
ックの物理ブロック番号を取得する(ステップ14
2)。既存データの更新であれば(ステップ142がY
es)、ファイルシステム制御部2はセクタ情報表11
をアクセスして、ステップ140において書き込みを実
行したセクタ52の論理セクタ番号と同じ論理セクタ番
号を有し、かつ、ステップ140において書き込みを実
行したセクタ52の物理セクタ番号とは異なる他のセク
タ52の物理ブロック番号および物理セクタ番号(既存
のデータが格納されたセクタ52の物理ブロック番号お
よび物理セクタ番号)を取得する(ステップ143)。
そして、ファイルシステム制御部2は、フラッシュメモ
リ制御部4を通じてフラッシュメモリ部5にアクセスし
て、この物理ブロック番号および物理セクタ番号に対応
する消去ブロック51のブロックコントロールセクタ5
2aのセクタ状態を「データ有効」から「データ無効」
へ更新する。同様に、ファイルシステム制御部2は、セ
クタ情報表11をアクセスし、この物理ブロック番号お
よび物理セクタ番号に対応するセクタ状態を「データ有
効」から「データ無効」へ更新する。さらに、セクタ情
報表12をアクセスして、この物理ブロック番号に対応
するデータ有効セクタ数を−1し、データ無効セクタ数
を+1する(ステップ144)。既存データの更新であ
れば(ステップ142がNo)、ステップ143および
ステップ144をジャンプしてステップ145に移る。
Next, the file system control unit 2 checks whether or not the data written to the sector 52 in the flash memory unit 5 is update data of data already written in the flash memory unit 5. . This confirmation is made by searching whether or not there is a sector 52 having the same logical sector number as the sector 52 in which the data is written by accessing the sector information table 11. If there is, the physical sector number of the sector and the physical block number of the block in which the sector exists are obtained (step 14).
2). If the existing data is to be updated (Step 142 is Y
es), the file system control unit 2 sends the sector information table 11
In the other sector 52 having the same logical sector number as the logical sector number of the sector 52 on which the writing was performed in step 140 and different from the physical sector number of the sector 52 on which the writing was performed in step 140 The physical block number and the physical sector number (the physical block number and the physical sector number of the sector 52 in which the existing data is stored) are obtained (step 143).
Then, the file system control unit 2 accesses the flash memory unit 5 through the flash memory control unit 4 and checks the block control sector 5 of the erase block 51 corresponding to the physical block number and the physical sector number.
2a sector status changed from "data valid" to "data invalid"
Update to Similarly, the file system control unit 2 accesses the sector information table 11 and updates the physical block number and the sector state corresponding to the physical sector number from “data valid” to “data invalid”. Further, the sector information table 12 is accessed, and the number of valid data sectors corresponding to the physical block number is decremented by one, and the number of invalid data sectors is incremented by one (step 144). If the existing data is to be updated (No in step 142), the process jumps from step 143 and step 144 to step 145.

【0043】続いて、ファイルシステム制御部2は、フ
ラッシュメモリ制御部4を通じてフラッシュメモリ部5
にアクセスして、ステップ143において取得した物理
ブロック番号および物理セクタ番号に対応する消去ブロ
ック51のブロックコントロールセクタ52aのセクタ
状態を「データ書き込み完了」から「データ有効」へ更
新する。同様に、ファイルシステム制御部2は、セクタ
情報表11をアクセスして、ステップ143において取
得した物理ブロック番号および物理セクタ番号に対応す
るセクタ状態も「データ書き込み完了」から「データ有
効」へ更新する(ステップ145)。
Subsequently, the file system control unit 2 sends the flash memory unit 5 through the flash memory control unit 4.
To update the sector state of the block control sector 52a of the erase block 51 corresponding to the physical block number and the physical sector number acquired in step 143 from "data writing completed" to "data valid". Similarly, the file system control unit 2 accesses the sector information table 11 and updates the physical block number and the sector state corresponding to the physical sector number acquired in step 143 from “data write completed” to “data valid”. (Step 145).

【0044】次に、フラッシュメモリ制御ブロック2
は、書き込みデータがまだ残っているか否かの確認を行
い(ステップ146)、書き込みデータがまだ残ってい
る場合には(ステップ146がYes)、ステップ13
1へ戻り、書き込みデータがなくなれば(ステップ14
6がNo)、処理を終了する。
Next, the flash memory control block 2
Checks whether or not write data still remains (step 146). If write data still remains (step 146 is Yes), step 13
1 and if there is no more write data (step 14
6 is No), and the process ends.

【0045】(再構築処理)図54および図55は、従
来技術におけるファイルシステム1の再構築処理に関す
るフローチャートである。
(Reconstruction Processing) FIGS. 54 and 55 are flowcharts relating to the reconstruction processing of the file system 1 in the prior art.

【0046】まず、ファイルシステム制御部2は、セク
タ情報表12をアクセスして、データ無効セクタ数が最
も多い物理ブロック番号を取得し、さらに、ブロック情
報表10をアクセスして、取得した物理ブロック番号に
対応する論理ブロック番号を取得する(ステップ15
1)。
First, the file system control unit 2 accesses the sector information table 12 to obtain a physical block number having the largest number of data invalid sectors, and further accesses the block information table 10 to obtain the obtained physical block number. Acquire the logical block number corresponding to the number (step 15
1).

【0047】そして、ファイルシステム制御部2は、フ
ラッシュメモリ制御部4を通じてフラッシュメモリ部5
にアクセスして、ファイルシステム1の再構築処理用に
予め未使用で確保しておいた予備消去ブロック51のブ
ロックコントロールセクタ52aの論理ブロック番号を
ステップ151において取得した論理ブロック番号に更
新し、このブロックコントロールセクタ52aのブロッ
ク状態を「未使用」から「データ転送中」へ更新する。
同様に、ファイルシステム制御部2は、ブロック情報表
10をアクセスして、予備消去ブロック51の論理ブロ
ック番号をステップ151において取得した論理ブロッ
ク番号に更新し、ブロック状態を「未使用」から「デー
タ転送中」へ更新する(ステップ152)。
Then, the file system control unit 2 sends the flash memory unit 5 through the flash memory control unit 4.
To update the logical block number of the block control sector 52a of the spare erase block 51, which is reserved and unused in advance for the rebuilding process of the file system 1, with the logical block number acquired in step 151. The block state of the block control sector 52a is updated from "unused" to "data transfer".
Similarly, the file system control unit 2 accesses the block information table 10, updates the logical block number of the preliminary erase block 51 to the logical block number obtained in step 151, and changes the block state from “unused” to “data”. "Transferring" (step 152).

【0048】次に、ファイルシステム制御部2は、ステ
ップ151において取得した物理ブロック番号の消去ブ
ロック51から予備消去ブロック51に効率良くデータ
をコピーするために、セクタ情報表11をアクセスし、
ステップ151において取得した物理ブロック番号に対
応する各物理セクタ番号からセクタ状態が「データ有
効」である物理セクタ番号を検索して取得する(ステッ
プ153)。
Next, the file system control unit 2 accesses the sector information table 11 in order to efficiently copy data from the erase block 51 of the physical block number acquired in step 151 to the spare erase block 51,
From each physical sector number corresponding to the physical block number obtained in step 151, a physical sector number whose sector state is "data valid" is searched for and obtained (step 153).

【0049】そして、ファイルシステム制御部2は、セ
クタ状態が「データ有効」のセクタ52があるか否かの
確認を行い(ステップ154)、「データ有効」のセク
タ52があれば(ステップ154がYes)、ファイル
システム制御部2は、フラッシュメモリ制御部4を通じ
てフラッシュメモリ部5にアクセスして、ステップ15
1において取得した物理ブロック番号およびステップ1
53において取得した物理セクタ番号に対応する消去ブ
ロック51のブロックコントロールセクタ52aのセク
タ状態「データ有効」を予備消去ブロック51の同じ物
理セクタ番号に対応するブロックコントロールセクタ5
2aのセクタ状態にコピーする。同様に、ファイルシス
テム制御部2は、セクタ情報表11をアクセスし、ステ
ップ151において取得した物理ブロック番号およびス
テップ153において取得した物理セクタ番号のセクタ
状態「データ有効」を予備消去ブロック51の同じ物理
セクタ番号のセクタ状態にコピーする。同様に、ファイ
ルシステム制御部2は、フラッシュメモリ制御部4を通
じてフラッシュメモリ部5にアクセスして、ステップ1
51において取得した物理ブロック番号およびステップ
153において取得した物理セクタ番号に対応する消去
ブロック51のセクタ52から予備消去ブロック51の
同じ物理セクタ番号のセクタ52へデータをコピーする
(ステップ155)。「データ有効」のセクタ52が無
い場合には(ステップ154がNo)、ステップ155
をジャンプしてステップ156に移る。
Then, the file system control unit 2 checks whether or not there is a sector 52 whose sector status is "data valid" (step 154). If there is a sector 52 of "data valid" (step 154). Yes), the file system control unit 2 accesses the flash memory unit 5 through the flash memory control unit 4, and
Physical block number acquired in step 1 and step 1
The sector state “data valid” of the block control sector 52 a of the erase block 51 corresponding to the physical sector number acquired in 53 is changed to the block control sector 5 corresponding to the same physical sector number of the preliminary erase block 51.
Copy to sector state 2a. Similarly, the file system control unit 2 accesses the sector information table 11 and changes the physical block number acquired in step 151 and the sector state “data valid” of the physical sector number acquired in step 153 to the same physical Copies to the sector state of the sector number. Similarly, the file system control unit 2 accesses the flash memory unit 5 through the flash memory control unit 4 and
Data is copied from the sector 52 of the erase block 51 corresponding to the physical block number acquired at 51 and the physical sector number acquired at step 153 to the sector 52 of the same physical sector number of the preliminary erase block 51 (step 155). If there is no “data valid” sector 52 (No in Step 154), Step 155
Is jumped to step 156.

【0050】続いて、ファイルシステム制御部2は、ス
テップ151において取得した物理ブロック番号の消去
ブロック51に、未処理のセクタ52があるか否かの確
認を行う(ステップ156)。未処理のセクタがある場
合には(ステップ156がYes)、ステップ153へ
戻る。未処理のセクタが無い場合には(ステップ156
がNo)、データのコピーが完了したため、ファイルシ
ステム制御部2は、セクタ情報表12をアクセスして、
ステップ151において取得した物理ブロック番号に対
応するデータ有効セクタ数を予備消去ブロック51のデ
ータ有効セクタ数にコピーし、データ無効セクタ数を0
とし、さらに、データ有効セクタ数とデータ無効セクタ
数と未使用セクタ数の和が総セクタ数(ここでは12
7)となるように、未使用セクタ数を計算して設定する
(ステップ157)。
Subsequently, the file system control unit 2 checks whether or not there is an unprocessed sector 52 in the erase block 51 of the physical block number acquired in step 151 (step 156). When there is an unprocessed sector (Yes in Step 156), the process returns to Step 153. If there is no unprocessed sector (step 156)
No), since the data copy has been completed, the file system control unit 2 accesses the sector information table 12 and
The number of valid data sectors corresponding to the physical block number acquired in step 151 is copied to the number of valid data sectors of the preliminary erase block 51, and the number of invalid data sectors is set to 0.
Further, the sum of the number of valid data sectors, the number of invalid data sectors, and the number of unused sectors is equal to the total number of sectors (here, 12
The number of unused sectors is calculated and set so as to satisfy 7) (step 157).

【0051】次に、ファイルシステム制御部2は、フラ
ッシュメモリ制御部4を通じてフラッシュメモリ部5に
アクセスして、予備消去ブロック51のブロックコント
ロールセクタ52aのブロック状態を「データ転送中」
から「元ブロック消去中」へ更新し(ステップ15
8)、ステップ151において取得した物理ブロック番
号の消去ブロック51のデータを消去して(ステップ1
59)、予備消去ブロック51のブロックコントロール
セクタ52aのブロック状態を「元ブロック消去中」か
ら「データ有り」へ更新する(ステップ160)。同様
に、ファイルシステム制御部2は、ブロック情報表10
をアクセスして、予備消去ブロック51のブロック状態
を「データ転送中」から「元ブロック消去中」へ更新し
(ステップ158)、ステップ159を経た後、予備消
去ブロック51のブロック状態を「元ブロック消去中」
から「データ有り」へ更新する(ステップ160)。こ
れによって、ステップ151において取得した物理ブロ
ック番号の消去ブロック51(データを消去した消去ブ
ロック51)が、新しい予備消去ブロックとして確保さ
れる。なお、ステップ159において、データを消去し
た消去ブロック51のブロックコントロールセクタ52
aのブロック状態は、データ消去により自動的に「デー
タ有り」または「データフル」から「未使用」となる。
また、ブロック情報表10、セクタ情報表11およびセ
クタ情報表12では、ステップ159においてデータを
消去した消去ブロックが予備消去ブロックとなり、フラ
ッシュメモリ部5へのデータの書き込みにおいて予備消
去ブロック51が参照されることはないため、この予備
消去ブロック51の物理ブロック番号に対応する項目の
更新は不要である。
Next, the file system control unit 2 accesses the flash memory unit 5 through the flash memory control unit 4 and changes the block state of the block control sector 52a of the preliminary erase block 51 to “data transfer”.
To “being erased from original block” (step 15
8), the data of the erasure block 51 of the physical block number acquired in step 151 is erased (step 1).
59), the block state of the block control sector 52a of the preliminary erase block 51 is updated from "erasing the original block" to "data present" (step 160). Similarly, the file system control unit 2 sends the block information table 10
To update the block state of the preliminary erase block 51 from “data transfer” to “erasing the original block” (step 158), and after step 159, changes the block state of the preliminary erase block 51 to “the original block”. Erasing "
Is updated to "data available" (step 160). As a result, the erase block 51 of the physical block number acquired in step 151 (the erase block 51 from which data has been erased) is secured as a new spare erase block. In step 159, the block control sector 52 of the erase block 51 from which the data has been erased.
The block state of “a” is automatically changed from “data present” or “data full” to “unused” by data erasure.
In the block information table 10, the sector information table 11, and the sector information table 12, the erase block from which data has been erased in step 159 becomes a spare erase block, and the spare erase block 51 is referred to when writing data to the flash memory unit 5. Therefore, it is not necessary to update the item corresponding to the physical block number of the preliminary erase block 51.

【0052】[0052]

【発明が解決しようとする課題】従来のデータ管理装置
におけるデータ管理システムは、物理消去ブロックのサ
イズが全て同じであり、かつ、論理セクタのサイズも全
て同じであることが前提であるため、以下のような問題
がある。
The data management system in the conventional data management apparatus is based on the premise that all physical erase blocks have the same size and all logical sectors have the same size. There is such a problem.

【0053】扱うデータサイズが不均一である場合、一
意に設定した論理セクタのサイズでは、データサイズが
大きすぎたり、小さすぎたりすることがあるため、デー
タの格納効率が低下する。データの格納効率を向上させ
るためには、論理セクタのサイズが格納されるデータに
一致することが望ましい。例えば、論理セクタのサイズ
を512バイトと設定し、500バイトと100バイト
のデータを格納する場合には、500バイトのデータは
セクタサイズに近いために格納効率が良く、100バイ
トのデータは約400バイト分の領域が未使用となって
格納効率が悪くなる。
When the data size to be handled is not uniform, the data size may be too large or too small with the uniquely set logical sector size, and the data storage efficiency is reduced. In order to improve the data storage efficiency, it is desirable that the size of the logical sector matches the data to be stored. For example, when the size of a logical sector is set to 512 bytes and 500-byte and 100-byte data are stored, 500-byte data is close to the sector size, so that the storage efficiency is good and 100-byte data is about 400 bytes. The byte area is unused and storage efficiency deteriorates.

【0054】さらに、単一デバイス内に異なるサイズの
物理消去ブロックが存在する場合(例えばブートブロッ
ク構成のフラッシュメモリにおいては、8キロバイトお
よび64キロバイトのサイズの物理消去ブロックが混在
する)、異なるサイズの物理消去ブロックを同一のデー
タ管理領域として使用することができない。さらに、異
なるサイズの物理消去ブロックが混在する場合、複数の
デバイスを組み合わせたデータ領域を管理することがで
きない。単一デバイス内に異なるサイズの物理消去ブロ
ックが混在する構成、例えば、8キロバイトと64キロ
バイトのサイズの物理消去ブロックが混在するブートブ
ロック構成のメモリを用いた場合、64キロバイトの物
理消去ブロックをデータ領域の物理消去ブロックに設定
すると、8キロバイトの物理消去ブロックはデータ領域
として使用することができない。
Further, when physical erase blocks of different sizes exist in a single device (for example, in a flash memory having a boot block configuration, physical erase blocks of 8 KB and 64 KB are mixed), Physical erase blocks cannot be used as the same data management area. Further, when physical erase blocks of different sizes are mixed, a data area in which a plurality of devices are combined cannot be managed. In a configuration in which physical erase blocks of different sizes are mixed in a single device, for example, when using a memory having a boot block configuration in which physical erase blocks of 8 KB and 64 KB are mixed, a physical erase block of 64 KB is used as data. When the area is set as a physical erase block, an 8 kilobyte physical erase block cannot be used as a data area.

【0055】上記特開平6−202821号および特開
平9−97139号についても、同様の課題を有してい
る。
The above-mentioned JP-A-6-202821 and JP-A-9-97139 also have similar problems.

【0056】本発明は、このような従来技術の課題を解
決するためになされたものであり、データを効率良く格
納することができ、異なるサイズの物理消去ブロックが
混在する構成にも適用可能なデータ管理装置およびそれ
を用いたデータ管理方法を提供することを目的とする。
The present invention has been made to solve such problems of the prior art, and can store data efficiently and can be applied to a configuration in which physical erase blocks of different sizes are mixed. It is an object to provide a data management device and a data management method using the same.

【0057】[0057]

【課題を解決するための手段】本発明のデータ管理装置
は、複数のブロックからなり、該ブロック単位でデータ
が消去される不揮発性半導体記憶部(フラッシュメモリ
等)と、該不揮発性半導体記憶部の動作を制御する記憶
制御部と、該不揮発性半導体記憶部に格納されるデータ
を管理するデータ管理システム制御部と、該データ管理
システム制御部から参照されるデータ管理情報を格納す
るデータ管理システムメモリー部とからなるデータ管理
システム、および該データ管理システムに対してデータ
処理を依頼するソフトウェアから構成されるデータ管理
装置において、前記不揮発性半導体記憶部は、全て同一
サイズのブロックから構成され、該データ管理システム
制御部は、1または複数のブロックを含む記憶領域と該
ブロックの属性情報と該ブロックの状態情報からなる論
理的な管理単位であるパーティションを用いてデータを
管理し、さらに、該パーティションのサイズを可変とす
る機能を有しており、そのことにより上記目的が達成さ
れる。
According to the present invention, there is provided a data management device comprising a plurality of blocks, in which data is erased in units of blocks, a nonvolatile semiconductor memory (such as a flash memory), and a nonvolatile semiconductor memory. Control unit for controlling the operation of the nonvolatile semiconductor storage unit, a data management system control unit for managing data stored in the nonvolatile semiconductor storage unit, and a data management system for storing data management information referred to by the data management system control unit In a data management system including a memory unit, and a data management device including software for requesting the data management system to perform data processing, the non-volatile semiconductor storage unit includes all blocks having the same size. The data management system control unit includes a storage area including one or more blocks and attribute information of the blocks. And a function of managing data using a partition, which is a logical management unit including the block status information, and making the size of the partition variable, thereby achieving the above object. .

【0058】上記構成によれば、パーティション単位で
データを管理し、そのサイズが可変であるので、取り扱
うデータのサイズに最適で効率の良いデータ管理が可能
となる。なお、パーティションのサイズは、パーティシ
ョンを構成する物理ブロック数をパーティション情報テ
ーブルに設定することにより変えることができる。
According to the above configuration, data is managed in units of partitions, and its size is variable, so that data management optimal for the size of data to be handled and efficient can be performed. The size of the partition can be changed by setting the number of physical blocks constituting the partition in the partition information table.

【0059】本発明のデータ管理装置は、複数のブロッ
クからなり、該ブロック単位でデータが消去される不揮
発性半導体記憶部と、該不揮発性半導体記憶部の動作を
制御する記憶制御部と、該不揮発性半導体記憶部に格納
されるデータを管理するデータ管理システム制御部と、
該データ管理システム制御部から参照されるデータ管理
情報を格納するデータ管理システムメモリー部とからな
るデータ管理システム、および該データ管理システムに
対してデータ処理を依頼するソフトウェアから構成され
るデータ管理装置において、前記不揮発性半導体記憶部
は、サイズの異なるブロックを有し、該データ管理シス
テム制御部は、1または複数のブロックを含む記憶領域
と該ブロックの属性情報と該ブロックの状態情報とから
なる論理的な管理単位であるパーティションを用いてデ
ータを管理し、さらに、該パーティションのサイズを可
変とする機能を有し、そのことにより上記目的が達成さ
れる。
A data management device according to the present invention comprises a nonvolatile semiconductor memory unit composed of a plurality of blocks from which data is erased in block units, a storage control unit for controlling the operation of the nonvolatile semiconductor memory unit, A data management system control unit that manages data stored in the nonvolatile semiconductor storage unit;
A data management system including a data management system memory unit for storing data management information referred to by the data management system control unit, and a data management device including software for requesting the data management system to perform data processing. The non-volatile semiconductor storage unit has blocks of different sizes, and the data management system control unit executes a logical operation including a storage area including one or a plurality of blocks, attribute information of the blocks, and status information of the blocks. It has a function of managing data using a partition which is a typical management unit, and further has a function of changing the size of the partition, thereby achieving the above object.

【0060】上記構成によれば、ブートブロック構成の
フラッシュメモリのようにサイズの異なるブロックが含
まれていてもパーティション単位で管理可能である。
According to the above configuration, even if blocks having different sizes are included such as a flash memory having a boot block configuration, it can be managed in partition units.

【0061】前記不揮発性半導体記憶部を同一の装置内
に複数有していてもよい。
A plurality of the nonvolatile semiconductor memory units may be provided in the same device.

【0062】上記構成によれば、不揮発性半導体記憶部
の数を変えることにより、扱うデータに最適なデータ容
量を得ることが可能である。
According to the above configuration, it is possible to obtain an optimum data capacity for data to be handled by changing the number of nonvolatile semiconductor storage units.

【0063】前記データ管理システム制御部は、前記パ
ーティションを構成するブロックを論理的により小さな
記憶領域であるセクタとしてデータを管理し、さらに、
該セクタのサイズを可変とする機能を有していてもよ
い。
The data management system control section manages data as a logically smaller storage area of a block constituting the partition, and further manages the data.
A function to change the size of the sector may be provided.

【0064】上記構成によれば、取り扱うデータのサイ
ズによってメモリを有効に活用することが可能である。
なお、セクタのサイズはセクタサイズをパーティション
情報テーブルに設定することにより変えることができ
る。
According to the above configuration, the memory can be effectively used depending on the size of the data to be handled.
The size of the sector can be changed by setting the sector size in the partition information table.

【0065】前記不揮発性半導体記憶部は、格納されて
いるデータが無効であるセクタを解放する再構築処理用
に予め確保される予備ブロックを、前記パーティション
毎に少なくとも1個有していてもよい。
[0065] The nonvolatile semiconductor memory section may have at least one spare block for each partition previously reserved for a reconstruction process for releasing a sector in which stored data is invalid. .

【0066】上記構成によれば、データ管理システムの
再構築が容易となる。
According to the above configuration, the data management system can be easily reconfigured.

【0067】前記不揮発性半導体記憶部は、格納されて
いるデータが無効であるセクタを解放する再構築処理用
に予め確保される予備ブロックを、前記パーティション
全体に対して少なくとも1個有し、該予備ブロックを複
数のパーティションで共用してもよい。
The non-volatile semiconductor storage unit has at least one spare block for the entire partition, which is reserved in advance for a reconstruction process for releasing a sector in which stored data is invalid. The spare block may be shared by a plurality of partitions.

【0068】上記構成によれば、データ領域を有効に活
用できるようになる。
According to the above configuration, the data area can be effectively used.

【0069】前記パーティションを構成するブロックに
設けられたセクタのサイズは、1つのパーティション内
では同一であるのが好ましい。
It is preferable that the size of a sector provided in a block constituting the partition is the same in one partition.

【0070】上記構成によれば、データの管理が容易に
なる。
According to the above configuration, data management becomes easy.

【0071】前記データ管理システムメモリ部は、前記
パーティション構成するブロックの属性情報と状態情報
を格納する領域を有していてもよい。
The data management system memory section may have an area for storing attribute information and status information of blocks constituting the partition.

【0072】上記構成によれば、属性情報や状態情報を
用いることにより、データの管理が容易になる。
According to the above configuration, data management becomes easy by using attribute information and status information.

【0073】前記データ管理システムメモリ部は、揮発
性または不揮発性の高速アクセス可能な記憶素子からな
るのが好ましい。
It is preferable that the data management system memory section comprises a volatile or nonvolatile high-speed accessible storage element.

【0074】上記構成によれば、データ管理に要する処
理の高速化を図ることが可能である。
According to the above configuration, it is possible to speed up the processing required for data management.

【0075】前記パーティションを構成するブロックの
属性情報と状態情報として、少なくとも、パーティショ
ンを識別するパーティション番号、パーティションを構
成するブロックのサイズとブロック数、ブロックに含ま
れるセクタのサイズ、パーティションの領域を示す先頭
物理アドレスと最終物理アドレス、および格納されるデ
ータ数の最大値の情報を有するパーティション情報テー
ブルを含んでいてもよい。
The attribute information and status information of the blocks constituting the partition indicate at least a partition number for identifying the partition, the size and the number of blocks constituting the partition, the size of the sector included in the block, and the area of the partition. It may include a partition information table having information on the first physical address, the last physical address, and the maximum value of the number of stored data.

【0076】上記構成によれば、パーティション情報テ
ーブルによってパーティションの構成を設定することが
可能である。
According to the above configuration, it is possible to set the partition configuration by using the partition information table.

【0077】前記パーティションを構成するブロックの
属性情報および状態情報として、少なくとも、パーティ
ションを構成するブロックを識別するブロック番号、ブ
ロックに格納されているデータの状態、ブロックに含ま
れるセクタを識別するセクタ番号、セクタに格納されて
いるデータの状態、ブロックに含まれる使用されていな
いセクタの数および格納されているデータが無効である
セクタの数の情報を有する管理テーブルを含んでいても
よい。
The attribute information and the state information of the blocks constituting the partition include at least a block number for identifying the block constituting the partition, a state of data stored in the block, and a sector number for identifying a sector included in the block. And a management table having information on the state of data stored in the sector, the number of unused sectors included in the block, and the number of sectors in which the stored data is invalid.

【0078】上記構成によれば、管理テーブルを参照す
ることにより、データの管理が容易となる。
According to the above configuration, data management becomes easy by referring to the management table.

【0079】前記管理テーブルに含まれる情報の一部
は、パーティション毎に固有の情報であってもよい。
A part of the information included in the management table may be information unique to each partition.

【0080】上記構成によれば、パーティションに対す
る処理が容易になる。
According to the above configuration, processing for a partition becomes easy.

【0081】本発明のデータ管理方法は、請求項10乃
至請求項12のいずれかに記載の本発明のデータ管理装
置を用いてデータを管理するデータ管理方法であって、
前記パーティション情報テーブルに含まれる情報として
前記データ管理システムに予め任意に設定される値を与
え、その値を基に前記データ管理システム制御部が該パ
ーティション情報テーブルを前記データ管理システムメ
モリ部に展開し、該パーティション情報テーブルを参照
することによりパーティションの構成を任意に設定し、
そのことにより上記目的が達成される。
A data management method according to the present invention is a data management method for managing data by using the data management apparatus according to any one of claims 10 to 12.
A value arbitrarily set in advance is given to the data management system as information included in the partition information table, and based on the value, the data management system control unit expands the partition information table in the data management system memory unit. Arbitrarily set the partition configuration by referring to the partition information table,
Thereby, the above object is achieved.

【0082】上記方法によれば、ユーザーから設定値を
与えることによって、パーティションの構成を可変とな
る。
According to the above method, the configuration of the partition can be changed by giving a setting value from the user.

【0083】前記パーティションの構成が設定された
後、前記データ管理システム制御部が設定されたパーテ
ィションの構成に従って構築された該不揮発性半導体記
憶部のデータを検索し、その情報を基にして前記管理テ
ーブルを前記データ管理システムメモリ部に生成しても
よい。
After the configuration of the partition is set, the data management system control unit searches the data of the nonvolatile semiconductor storage unit constructed according to the set partition configuration, and based on the information, the management of the management is performed. A table may be generated in the data management system memory unit.

【0084】上記方法によれば、管理テーブルを自動的
に生成することが可能となる。
According to the above method, the management table can be automatically generated.

【0085】前記パーティション情報テーブルの設定お
よび前記管理テーブルの生成は、前記データ管理装置が
起動するシステムの初期設定時に行ってもよい。
The setting of the partition information table and the generation of the management table may be performed at the time of initial setting of a system started by the data management apparatus.

【0086】上記方法によれば、システム起動毎に最新
のパーティション情報テーブルおよび管理テーブルを得
ることが可能となる。
According to the above method, it is possible to obtain the latest partition information table and management table every time the system is started.

【0087】前記不揮発性半導体記憶部へのデータ処理
を実行する際に、前記ソフトウェアから前記データ管理
システムに対して、内部のハードウェア構成に依存しな
い論理的な値であるパーティション番号、および処理対
象となるデータを識別するデータ識別番号を与え、前記
データ管理システム制御部は、与えられたパーティショ
ン番号およびデータ識別番号から前記パーティション情
報テーブルおよび前記管理テーブルの情報を参照して動
作の対象となる物理的なアドレスを算出し、算出した物
理アドレスと共に処理を指示するコマンドを前記不揮発
性半導体記憶部に与えることにより、特定のデータまた
はデータ領域に対して指定された動作を実行してもよ
い。
When executing data processing on the nonvolatile semiconductor memory unit, the software gives the data management system a partition number, which is a logical value independent of an internal hardware configuration, and a processing object. The data management system control unit refers to the information in the partition information table and the management table from the given partition number and data identification number, and performs a physical operation to be performed. An operation specified for specific data or a data area may be executed by calculating a typical address and providing a command for instructing processing together with the calculated physical address to the nonvolatile semiconductor storage unit.

【0088】上記方法によれば、ソフトウェアからハー
ドウェアに依存しないパーティション番号と識別番号を
用いて容易にデータをアクセスすることが可能である。
According to the above method, data can be easily accessed from software using a partition number and an identification number that do not depend on hardware.

【0089】前記予備ブロックを前記パーティション全
体に対して少なくとも1個有し、該予備ブロックを該パ
ーティション全体で共用する場合に、該パーティション
毎に固有の管理テーブルに格納されるブロックの物理番
号を、該予備ブロックを共用する全てのパーティション
と同一の予備ブロックの物理番号に設定してもよい。
When at least one spare block is provided for the entire partition and the spare block is shared by the entire partition, the physical number of the block stored in a management table unique to each partition is The physical number of the same spare block as that of all partitions sharing the spare block may be set.

【0090】上記方法によれば、予備ブロックの共用が
可能となる。
According to the above method, the spare block can be shared.

【0091】前記予備ブロックを前記パーティション全
体に対して少なくとも1個有し、該予備ブロックを該パ
ーティション全体で共用する場合に、前記パーティショ
ン情報テーブルに同一のパーティションに対して該予備
ブロックを共用するパーティションの数分のエントリを
設け、各エントリに含まれるパーティションの領域を示
す先頭物理アドレスおよび最終物理アドレスを、該予備
ブロックを共用する全てのパーティションと同じ値に設
定して該パーティション情報テーブルを生成してもよ
い。さらに、前記パーティション情報テーブルを生成し
た後、前記不揮発性半導体記憶部へのデータ処理を実行
するために、前記ソフトウェアから前記データ管理シス
テムに対して、内部のハードウェア構成に依存しない論
理的な値であるパーティション番号、および処理対象と
なるデータを識別するデータ識別番号を与え、前記デー
タ管理システム制御部は、与えられたパーティション番
号およびデータ識別番号から前記パーティション情報テ
ーブルおよび前記管理テーブルの情報を参照して動作の
対象となる物理的なアドレスを算出する際に、該管理テ
ーブルから動作の対象となるブロックがパーティション
のどの物理的な領域に含まれるかを判別して、前記同一
のパーティションに対して設けた複数のエントリから動
作の対象となるエントリを選択する処理を含んでいても
よい。
When at least one spare block is provided for the entire partition and the spare block is shared by the entire partition, the partition sharing the spare block with the same partition in the partition information table is used. The partition information table is generated by setting the first physical address and the last physical address indicating the area of the partition included in each entry to the same value as all the partitions sharing the spare block. You may. Furthermore, in order to execute data processing to the nonvolatile semiconductor storage unit after generating the partition information table, a logical value independent of an internal hardware configuration is provided from the software to the data management system. The data management system control unit refers to the information of the partition information table and the management table from the given partition number and data identification number. When calculating a physical address to be operated by determining the physical area of the partition, the block to be operated is included in the management table from the management table, and for the same partition, From multiple entries provided by It may include a process of selecting a.

【0092】上記方法によれば、再構築対象の物理アド
レスの計算が容易になる。
According to the above method, the calculation of the physical address to be reconstructed becomes easy.

【0093】前記不揮発性半導体記憶部を同一のデータ
管理装置内に複数有する場合、または該不揮発性半導体
記憶部が複数のバンクを有する場合に、該不揮発性半導
体記憶部へのデータ処理を実行する際に、該データ管理
システム制御部は、必ず算出した物理アドレスと共に処
理を指示するコマンドを該不揮発性半導体記憶部に与え
るようにするのが好ましい。
When a plurality of the nonvolatile semiconductor memory units are provided in the same data management device, or when the nonvolatile semiconductor memory unit has a plurality of banks, data processing to the nonvolatile semiconductor memory unit is executed. In this case, it is preferable that the data management system control unit always gives a command for instructing processing together with the calculated physical address to the nonvolatile semiconductor storage unit.

【0094】上記方法によれば、不揮発性半導体記憶部
(不揮発性半導体記憶装置)が複数含まれていたり、不
揮発性半導体記憶部に複数のバンクを有していても、不
揮発性半導体記憶部が単一の場合と同様にデータ管理を
行うことが可能である。
According to the above method, even if a plurality of nonvolatile semiconductor storage units (nonvolatile semiconductor storage devices) are included or the nonvolatile semiconductor storage unit has a plurality of banks, the nonvolatile semiconductor storage unit is Data management can be performed in the same manner as in the single case.

【0095】以下、本発明の作用について説明する。Hereinafter, the operation of the present invention will be described.

【0096】本発明にあっては、サイズが不均一である
複数のデータを効率良く取り扱うため、パーティション
という概念を導入して、データ領域(不揮発性半導体記
憶部)を分割する。パーティションは、データ領域の論
理的な管理単位であり、1またはは複数のブロックとそ
れに付随する属性情報や状態情報からなり、各パーティ
ション毎に論理セクタのサイズが異なる設定とすること
が可能である。よって、サイズが不均一である複数のデ
ータは、そのサイズに応じて各々最適なパーティション
に格納することが可能である。
In the present invention, in order to efficiently handle a plurality of data having a non-uniform size, a concept of a partition is introduced to divide a data area (nonvolatile semiconductor storage unit). A partition is a logical management unit of the data area, and is composed of one or a plurality of blocks and attribute information and status information associated therewith, and can be set so that the size of the logical sector differs for each partition. . Therefore, a plurality of data having non-uniform sizes can be stored in optimal partitions according to their sizes.

【0097】サイズが異なる物理消去ブロックを含む場
合には、サイズが異なる物理消去ブロックの領域毎に、
パーティションを設定可能である。例えば、8キロバイ
トと64キロバイトの物理消去ブロックを合わせ持つブ
ートブロック構成の場合、物理消去ブロックのサイズが
8キロバイトである領域と、物理消去ブロックのサイズ
が64キロバイトである領域を、別のパーティションに
設定する。
When a physical erase block having a different size is included, each area of the physical erase block having a different size is
Partitions can be set. For example, in the case of a boot block configuration having both a physical erase block of 8 kilobytes and a physical erase block of 64 kilobytes, an area having a physical erase block size of 8 kilobytes and an area having a physical erase block size of 64 kilobytes are stored in separate partitions. Set.

【0098】さらに、複数のデバイスを組み合わせたデ
ータ領域の構成に対応するため、デバイス間にまたがっ
たパーティションの設定を可能とする。複数のデバイス
を用いる場合には、デバイスの状態を示すステータスレ
ジスタは、デバイス毎に存在する。よって、デバイスに
対する処理コマンド(データ書き込みコマンド、ブロッ
ク消去コマンド、ステータスレジスタ読み出しコマン
ド、アレイ読み出しコマンド、サスペンドコマンド、レ
ジュームコマンド等)を発行するアドレスは、パーティ
ションの先頭アドレスや最終アドレスに対して発行する
のではなく、物理的にデータを書き込む場所(アドレ
ス)やデータを消去する場所(アドレス)に対して発行
する。これにより、データの書き込みやデータ消去を行
う場所(アドレス)におけるデバイスの状態を正確に認
識することが可能となる。
Further, in order to cope with the configuration of the data area in which a plurality of devices are combined, it is possible to set a partition over the devices. When a plurality of devices are used, a status register indicating a device state exists for each device. Therefore, an address at which a processing command (a data write command, a block erase command, a status register read command, an array read command, a suspend command, a resume command, etc.) for a device is issued is issued to the head address or the last address of the partition. Instead, it is issued to a place where data is physically written (address) or a place where data is erased (address). This makes it possible to accurately recognize the state of the device at the location (address) where data is written or erased.

【0099】データ管理システムの再構築(リクレー
ム)に必要な予備の物理消去ブロック(スペアブロッ
ク)は、パーティション毎に1個ずつ確保してもよい
が、確保するスペアブロック数を節約するため、物理消
去ブロックのサイズが等しい、複数のパーティションで
1個のスペアブロックを共用することも可能である。
A spare physical erasure block (spare block) necessary for rebuilding (reclaiming) the data management system may be secured one by one for each partition. It is also possible for a plurality of partitions having the same erase block size to share one spare block.

【0100】さらに、格納するデータ数が増加した場合
でも、データの読み出しやデータの書き込み速度が遅く
ならないように、各パーティションに関するデータ管理
情報を記憶する、パーティション情報テーブルや管理テ
ーブルをRAM等の高速にアクセス可能なメモリ上に作
成することができる。
Further, even if the number of data to be stored increases, a partition information table or a management table for storing data management information for each partition, such as a RAM, etc. Can be created on a memory that can be accessed.

【0101】[0101]

【発明の実施の形態】以下に、本発明の実施の形態につ
いて、図面を参照しながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0102】まず、本発明におけるデータ領域の論理的
な管理単位(パーティション)について、具体的に説明
する。
First, the logical management unit (partition) of the data area in the present invention will be specifically described.

【0103】図1は、異なるセクタ(図の点線で囲んだ
部分)のサイズ別に、データ領域を2分割して管理する
場合を示す。例えば、パーティション0は128バイト
のセクタサイズを有する3個の物理消去ブロックによっ
て構成され、パーティション1は512バイトのセクタ
サイズを有する2個の物理消去ブロックによって構成さ
れている。
FIG. 1 shows a case where the data area is divided into two and managed according to the size of different sectors (portions surrounded by dotted lines in the figure). For example, partition 0 is constituted by three physical erase blocks having a sector size of 128 bytes, and partition 1 is constituted by two physical erase blocks having a sector size of 512 bytes.

【0104】図2は、異なる物理消去ブロック(図の実
線で囲んだ部分)のサイズ別に、データ領域を2分割し
て管理する場合を示す。例えば、パーティション0は8
キロバイトのブロックサイズを有する4個の物理消去ブ
ロックによって構成され、パーティション1は64キロ
バイトのブロックサイズを有する2個の物理消去ブロッ
クによって構成されている。
FIG. 2 shows a case where the data area is divided into two and managed according to the size of different physical erase blocks (portions surrounded by solid lines in the figure). For example, partition 0 is 8
The partition 1 is composed of four physical erase blocks having a block size of 64 kilobytes, and the partition 1 is composed of two physical erase blocks having a block size of 64 kilobytes.

【0105】図3は、上記図1および図2の構成が混在
している場合を示している。例えば、パーティション0
は8キロバイトのブロックサイズ、512バイトのセク
タサイズを有する3個の物理消去ブロックによって構成
され、パーティション1は64キロバイトのブロックサ
イズ、128バイトのセクタサイズを有する2個の物理
消去ブロックによって構成されている。
FIG. 3 shows a case where the configurations of FIGS. 1 and 2 are mixed. For example, partition 0
Is composed of three physical erase blocks having a block size of 8 kilobytes and a sector size of 512 bytes, and partition 1 is composed of two physical erase blocks having a block size of 64 kilobytes and a sector size of 128 bytes. I have.

【0106】本発明において、データ領域の再構築処理
を行うために必要な予備の物理消去ブロック(スペアブ
ロック)の数は、以下の通りである。
In the present invention, the number of spare physical erase blocks (spare blocks) necessary for performing the data area rebuilding process is as follows.

【0107】(1) 物理消去ブロックのサイズが異な
る場合には、パーティション毎に少なくとも1個のスペ
アブロックを確保する。また、(2)物理ブロックのサ
イズが等しい場合には、パーティション毎に少なくとも
1個、または複数のパーティションに少なくとも1個の
スペアブロックを確保する。
(1) When the sizes of the physical erase blocks are different, at least one spare block is reserved for each partition. (2) If the physical blocks have the same size, at least one spare block is reserved for each partition, or at least one spare block is reserved for a plurality of partitions.

【0108】さらに、本実施形態では、パーティション
毎に唯一のパーティション番号を割り当てて、パーティ
ションを識別できるようにする。また、データ管理に必
要な、パーティションに関する各種情報を格納したパー
ティション情報テーブルおよび管理テーブルをRAM上
に設ける。
Further, in this embodiment, a unique partition number is assigned to each partition so that the partition can be identified. In addition, a partition information table and a management table storing various information related to partitions necessary for data management are provided on the RAM.

【0109】図4は、本発明の一実施形態であるデータ
管理装置の構成を示す図である。図4において、100
1はデータ管理システム、1002はデータ管理システ
ム1001の処理を制御するデータ管理システム制御
部、1003はフラッシュメモリ部1005のデータ管
理情報を格納するために使用されるデータ管理システム
メモリ部、1004はフラッシュメモリ部1005への
データ処理を制御するフラッシュメモリ制御部、100
5は複数の物理消去ブロックから構成されるフラッシュ
メモリ部、1006はデータ管理システム1001へデ
ータの処理を依頼するアプリケーションプログラムまた
はオペレーションシステム(OS)等のソフトウェアで
ある。データ管理システムメモリ部1003はRAMか
らなる。このRAMは揮発性であっても不揮発性でも良
い。
FIG. 4 is a diagram showing a configuration of a data management device according to an embodiment of the present invention. In FIG. 4, 100
Reference numeral 1 denotes a data management system; 1002, a data management system control unit that controls processing of the data management system 1001; 1003, a data management system memory unit used to store data management information in a flash memory unit 1005; Flash memory control unit for controlling data processing to memory unit 1005, 100
Reference numeral 5 denotes a flash memory unit including a plurality of physical erase blocks. Reference numeral 1006 denotes software such as an application program or an operation system (OS) for requesting the data management system 1001 to process data. The data management system memory unit 1003 comprises a RAM. This RAM may be volatile or non-volatile.

【0110】(実施形態1)本実施形態では、パーティ
ション毎に予備の物理消去ブロック(スペアブロック)
を設定する例について説明する。
(Embodiment 1) In this embodiment, a spare physical erase block (spare block) is provided for each partition.
An example of setting is described.

【0111】図5は、フラッシュメモリ部1005のデ
ータ領域を、64キロバイトのサイズを有する8個の物
理消去ブロックによって構成されるパーティション0と
パーティション2、および8キロバイトのサイズを有す
る8個の物理消去ブロックによって構成されるパーティ
ション1に3分割して、パーティション毎に1個の予備
の物理消去ブロック(スペアブロック)を設定した場合
を示している。ここでは、各物理消去ブロックに対して
0から23までの物理番号を通し番号で割り当ててい
る。また、パーティション0における各物理消去ブロッ
クには0から6の論理ブロック番号(ブロックの論理番
号)およびスペアブロックを示すSpの論理ブロック番
号を割り当てている。パーティション1およびパーティ
ションにおける各物理消去ブロックについても同様であ
る。
FIG. 5 shows that the data area of the flash memory unit 1005 is divided into partitions 0 and 2 composed of eight physical erase blocks having a size of 64 kilobytes, and eight physical erases having a size of 8 kilobytes. This figure shows a case where the data is divided into three partitions 1 each composed of blocks, and one spare physical erase block (spare block) is set for each partition. Here, a physical number from 0 to 23 is assigned to each physical erase block by a serial number. Each physical erase block in partition 0 is assigned a logical block number from 0 to 6 (logical number of the block) and a logical block number of Sp indicating a spare block. The same applies to the partition 1 and each physical erase block in the partition.

【0112】図6は、図5におけるブロックの物理番号
0から物理番号7(パーティション0)、物理番号8か
ら物理番号15(パーティション1)、および物理番号
16から物理番号23(パーティション3)の内部構成
を示している。各物理消去ブロックを構成するセクタの
サイズは、パーティション0では256バイト、パーテ
ィション1では32バイト、パーティション2では51
2バイトである。また、各物理消去ブロック内の制御情
報を格納するブロックコントロールセクタは、512バ
イトである。
FIG. 6 shows the internal structure of the physical numbers 0 to 7 (partition 0), the physical numbers 8 to 15 (partition 1), and the physical numbers 16 to 23 (partition 3) of the blocks in FIG. 1 shows the configuration. The size of the sector constituting each physical erase block is 256 bytes for partition 0, 32 bytes for partition 1, and 51 bytes for partition 2.
2 bytes. The block control sector for storing control information in each physical erase block is 512 bytes.

【0113】図7は、図4のデータ管理システムメモリ
1003内に格納されている、パーティション情報テー
ブルの構成を示す図である。このパーティション情報テ
ーブルは、パーティションを識別する番号、物理ブロッ
クのサイズ、パーティションを構成する物理ブロック
数、物理ブロックを論理的に分割したセクタのサイズ、
パーティションの物理的なスタートアドレス、パーティ
ションの物理的なエンドアドレス、および格納されるデ
ータを識別する固有の識別番号(ID)の最大値を情報
の単位とするデータによって構成されている。ここで
は、パーティション0は、各物理ブロックのサイズ=0
10000h(64キロ)バイト(hは16進数を表
す、以下同様)、物理ブロック数=8、各セクタのサイ
ズ=256バイト、パーティションの物理的なアドレス
空間=060000hから0DFFFFhまで、パーテ
ィションに格納されるIDの最大値=200である。ま
た、パーティション1は、各物理ブロックのサイズ=0
02000h(8キロ)バイト、物理ブロック数=8、
各セクタのサイズ=32バイト、パーティションの物理
的なアドレス空間=0E0000hから0EFFFFh
まで、パーティションに格納されるIDの最大値=15
0である。さらに、パーティション2は、各物理ブロッ
クのサイズ=010000h(64キロ)バイト、物理
ブロック数=8、各セクタのサイズ=512バイト、パ
ーティションの物理的なアドレス空間=0F0000h
から16FFFFhまで、パーティションに格納される
IDの最大値=200である。
FIG. 7 is a diagram showing the configuration of the partition information table stored in the data management system memory 1003 of FIG. This partition information table includes a number for identifying a partition, the size of a physical block, the number of physical blocks constituting the partition, the size of a sector into which the physical block is logically divided,
It is constituted by data in which the physical start address of the partition, the physical end address of the partition, and the maximum value of a unique identification number (ID) for identifying data to be stored are used as units of information. Here, partition 0 has a size of each physical block = 0.
10000h (64 kilobytes) bytes (h represents a hexadecimal number, the same applies hereinafter), the number of physical blocks = 8, the size of each sector = 256 bytes, and the physical address space of the partition = 0060000h to 0DFFFFh are stored in the partition. The maximum value of the ID is 200. Partition 1 has a size of each physical block = 0.
02000h (8 kilobytes) bytes, number of physical blocks = 8,
Size of each sector = 32 bytes, physical address space of partition = 0E0000h to 0EFFFFh
Up to 15 of the ID stored in the partition
0. Further, in the partition 2, the size of each physical block = 01010000h (64 kilobytes), the number of physical blocks = 8, the size of each sector = 512 bytes, the physical address space of the partition = 0F0000h.
The maximum value of the ID stored in the partition is from 200 to 16FFFFh.

【0114】このパーティション情報テーブルは、図4
におけるデータ管理システム1001の設定時にユーザ
によって与えられ、データ管理システム1001の起動
時にデータ管理システム制御部1002がデータ管理シ
ステムメモリ部1003内に作成する。
The partition information table shown in FIG.
Is provided by the user when the data management system 1001 is set, and is created in the data management system memory unit 1003 by the data management system control unit 1002 when the data management system 1001 is activated.

【0115】図8〜図11は図4のデータ管理システム
メモリ1003内に格納されている、管理テーブルの構
成を示す図である。図8に示す管理テーブル1は、パー
ティション毎に、データのID、物理消去ブロックの論
理番号、データの先頭が格納された物理消去ブロック内
のセクタの論理番号、およびデータサイズを情報の単位
とするデータによって構成されている。ここでは、パー
ティション0内に、ID=10、データサイズ=200
バイトであるデータが、物理消去ブロックの論理番号=
2、セクタの論理番号=3から格納されていることを示
している。なお、データサイズはデータの先頭にも格納
される情報であるため、テーブルサイズの削減およびシ
ステム起動時間を短縮するため、データサイズを管理テ
ーブル1に格納しないようにしてもよい。
FIGS. 8 to 11 show the structure of the management table stored in the data management system memory 1003 of FIG. The management table 1 shown in FIG. 8 uses, for each partition, a data ID, a logical number of a physical erase block, a logical number of a sector in the physical erase block in which the head of the data is stored, and a data size as a unit of information. It is composed of data. Here, in partition 0, ID = 10, data size = 200
Byte data is the logical number of the physical erase block =
2, the logical number of the sector = 3 is stored. Since the data size is information stored at the head of the data, the data size may not be stored in the management table 1 in order to reduce the table size and the system startup time.

【0116】図9に示す管理テーブル2は、パーティシ
ョン毎に、物理消去ブロックの物理番号、物理消去ブロ
ックの論理番号、および物理消去ブロックの状態を情報
の単位とするデータによって構成されている。ここで
は、パーティション0内の物理番号=0に対応する物理
消去ブロックは、論理番号=1、ブロック状態=データ
有りであることを示している。パーティション0内の物
理番号=1から物理番号=6に対応する物理消去ブロッ
クに関する情報についても同様である。また、パーティ
ション0内の物理番号=7に対応する物理消去ブロック
は、パーティション0の再構築処理用の予備の物理消去
ブロック(スペアブロック)であることを示している。
The management table 2 shown in FIG. 9 is composed of data in which the physical number of the physical erase block, the logical number of the physical erase block, and the state of the physical erase block are used as units of information for each partition. Here, the physical erase block corresponding to the physical number = 0 in the partition 0 indicates that the logical number = 1 and the block state = data exists. The same applies to the information on the physical erase blocks corresponding to the physical numbers = 1 to 6 in the partition 0. Also, the physical erase block corresponding to the physical number = 7 in the partition 0 indicates that it is a spare physical erase block (spare block) for the reconstruction process of the partition 0.

【0117】図10に示す管理テーブル3は、物理消去
ブロックの物理番号、物理消去ブロック内のセクタの物
理番号、セクタの論理番号、およびセクタの状態を情報
の単位とするデータによって構成されている。ここで
は、物理番号=0の物理消去ブロック内のセクタの物理
番号=50に対応するセクタは、論理番号=3、セクタ
状態=データ有効であることを示している。物理番号=
51および物理番号=52に対応するセクタに関する情
報についても同様である。
The management table 3 shown in FIG. 10 is composed of data using the physical number of the physical erase block, the physical number of the sector in the physical erase block, the logical number of the sector, and the state of the sector as information units. . Here, the sector corresponding to the physical number = 50 of the sector in the physical erase block with the physical number = 0 indicates that the logical number = 3 and the sector status = data valid. Physical number =
The same applies to information on the sector corresponding to 51 and the physical number = 52.

【0118】図11に示す管理テーブル4は、物理消去
ブロックの物理番号、物理消去ブロック内のセクタのう
ち、セクタ状態が未使用であるセクタの数、およびセク
タ状態がデータ無効である数を情報の単位とするデータ
によって構成されている。ここでは、物理番号=0の物
理消去ブロック内のセクタのうち、セクタ状態が「未使
用」である未使用セクタ数=100個、セクタ状態が
「データ無効」であるデータ無効セクタ数=50個であ
ることを示している。物理番号=1および物理番号=2
に対応する物理ブロックに関する情報についても同様で
ある。
The management table 4 shown in FIG. 11 contains information on the physical number of the physical erase block, the number of unused sectors among the sectors in the physical erase block, and the number of invalid sectors. It is composed of data as a unit of. Here, among the sectors in the physical erase block with the physical number = 0, the number of unused sectors whose sector status is “unused” = 100, and the number of data invalid sectors whose sector status is “data invalid” = 50 Is shown. Physical number = 1 and physical number = 2
The same applies to the information on the physical block corresponding to.

【0119】なお、上記管理テーブル1および管理テー
ブル2はパーティション毎に作成され、管理テーブル3
および管理テーブル4は各々1個のみ作成して各パーテ
ィションで共用する。
The management table 1 and management table 2 are created for each partition, and the management table 3
And only one management table 4 is created and shared by each partition.

【0120】この管理テーブル1〜管理テーブル4は、
図4におけるデータ管理システム1001の起動時に、
データ管理システム制御部1002がフラッシュメモリ
制御部1004を介してフラッシュメモリ部1005か
ら必要な情報を読みだし、データ管理システムメモリ部
1003内に作成する。
The management tables 1 to 4 are
When the data management system 1001 in FIG.
The data management system control unit 1002 reads necessary information from the flash memory unit 1005 via the flash memory control unit 1004 and creates it in the data management system memory unit 1003.

【0121】(データの読み出し方法)図7〜図10お
よび図12のフローチャートを用いて、パーティション
0に格納されたID=10であるデータを読み出す方法
について説明する。
(Data reading method) A method of reading data with ID = 10 stored in the partition 0 will be described with reference to the flowcharts of FIGS. 7 to 10 and FIG.

【0122】アプリケーションプログラムまたはオペレ
ーティングシステム1006よりフラッシュメモリ部1
005からのデータの読み出し要求が発生した場合、こ
の読み出し要求と共に読み出すデータのID=10およ
びパーティション番号=0がアプリケーションプログラ
ムまたはオペレーティングシステム1006からデータ
管理システム1001)に与えられる(図12のステッ
プ201)。なお、データが格納されているパーティシ
ョン番号は、アプリケーションプログラムまたはオペレ
ーティングシステム側で管理しており、これから与えら
れる。
The flash memory unit 1 from the application program or the operating system 1006
When a request to read data from 005 occurs, the ID = 10 and partition number = 0 of the data to be read together with the read request are given from the application program or the operating system 1006 to the data management system 1001 (step 201 in FIG. 12). . The partition number in which the data is stored is managed by the application program or the operating system, and will be given.

【0123】データ管理システム制御部1002は、デ
ータ管理システムメモリ部1003内のパーティション
0に関する管理テーブル1へアクセスして、対応するI
Dのデータが格納されている物理消去部の論理番号=
2、データ開始セクタの論理番号=3、およびデータサ
イズ=200を取得する(図8、図12のステップ20
2)。
The data management system control unit 1002 accesses the management table 1 for the partition 0 in the data management system memory unit 1003, and
Logical number of physical erasure unit storing data of D =
2. Acquire the logical number of the data start sector = 3 and the data size = 200 (step 20 in FIGS. 8 and 12).
2).

【0124】次に、データ管理システム制御部1002
は、パーティション0に関する管理テーブル2へアクセ
スして、ステップ202において取得した物理消去部の
論理番号=2に対応する物理番号=1、およびパーティ
ション0における先頭の物理消去ブロックに対応する物
理番号を取得する(図9、図12のステップ203)。
Next, the data management system control unit 1002
Accesses the management table 2 for the partition 0 and obtains the physical number = 1 corresponding to the logical number = 2 of the physical erasure unit obtained in step 202 and the physical number corresponding to the first physical erasure block in the partition 0 (Step 203 in FIGS. 9 and 12).

【0125】続いて、データ管理システム制御部100
2は、管理テーブル3へアクセスして、ステップ203
において取得した物理消去ブロックの物理番号=1、お
よびステップ202において取得したデータ開始セクタ
の論理番号=3に対応し、かつ、セクタ状態が「データ
有効」であるセクタの物理番号=50を取得する(図1
0、図12のステップ204)。
Subsequently, the data management system control unit 100
2 accesses the management table 3 and executes step 203
And the physical number = 50 of the sector corresponding to the physical number = 1 of the physical erase block obtained in step 2 and the logical number = 3 of the data start sector obtained in step 202 and the sector status is “data valid”. (Figure 1
0, step 204 in FIG. 12).

【0126】その後、データ管理システム制御部100
2は、パーティション情報テーブルにアクセスして、パ
ーティション0に関する情報(物理消去ブロックのサイ
ズ010000h(64キロ)バイト、物理セクタのサ
イズ=256バイト、パーティション0の物理的なスタ
ートアドレス=060000h)を用いて、以下の計算
式によりデータの読み出しを開始する物理アドレスを計
算する(図7、図12のステップ205)。
Thereafter, the data management system control unit 100
2 accesses the partition information table and uses information regarding the partition 0 (physical erase block size: 010000h (64 kilobytes) byte, physical sector size: 256 bytes, physical start address of partition 0: 060000h). Then, the physical address at which to start reading data is calculated by the following formula (step 205 in FIGS. 7 and 12).

【0127】データの読み出し開始アドレス=パーティ
ションのスタートアドレス[060000h]+パーティション
における物理消去ブロックのサイズ[010000h]×(ステ
ップ202において取得した物理ブロックの物理番号[1]−
ステップ202において取得した先頭の物理消去ブロック
の物理番号[1])+パーティションにおけるセクタのサ
イズ[256]×ステップ203において取得したセクタの物理
番号[50] そして、データ管理システム制御部1002は、フラッ
シュメモリ制御部1004を介して、ステップ205に
おいて計算した物理アドレスに対応するフラッシュメモ
リ部1005のアドレスから、ステップ202において
取得したデータサイズ分=200のデータ読み出しを行
う(図12のステップ206)。
Data read start address = partition start address [060000h] + size of physical erase block in partition [010000h] × (physical block physical number [1] obtained in step 202) −
The physical number of the first physical erase block acquired in step 202 [1]) + the size of the sector in the partition [256] × the physical number of the sector acquired in step 203 [50] Then, the data management system control unit 1002 Through the memory control unit 1004, data is read out from the address of the flash memory unit 1005 corresponding to the physical address calculated in step 205, for the data size = 200 acquired in step 202 (step 206 in FIG. 12).

【0128】(データの書き込み方法)図7、図13〜
図16および図17のフローチャートを用いて、ID=
10、サイズが50バイトであるデータをパーティショ
ン1に書き込む方法について説明する。
(Data writing method) FIGS. 7, 13 to
Using the flowcharts of FIG. 16 and FIG.
10. A method of writing data having a size of 50 bytes to the partition 1 will be described.

【0129】アプリケーションプログラムまたはオペレ
ーティングシステム1006よりフラッシュメモリ部1
005へのデータの書き込み要求が発生した場合、この
書き込み要求と共に書き込むデータのID=10、書き
込むデータ、書き込むデータサイズ=50バイトおよび
データサイズに適したパーティション番号=1がアプリ
ケーションプログラムまたはオペレーティングシステム
1006からデータ管理システム1001に与えられる
(図17のステップ211)。なお、どの番号のパーテ
ィションに格納するかは、データの種類によって、アプ
リケーションプログラムやオペレーティングシステム側
が判断する。例えば、携帯電話に本データ管理システム
を搭載した場合には、「電話番号データはパーティショ
ン0へ、メールデータはパーティション1へ」等とパー
ティション番号が与えられる。
The flash memory unit 1 from the application program or the operating system 1006
When a request to write data to the 005 is issued, the ID of the data to be written together with this write request = 10, the data to be written, the data size to be written = 50 bytes, and the partition number = 1 suitable for the data size are transmitted from the application program or the operating system 1006. This is given to the data management system 1001 (step 211 in FIG. 17). The number of the partition to be stored is determined by the application program or the operating system depending on the type of data. For example, when this data management system is mounted on a mobile phone, a partition number is given, such as "telephone number data to partition 0, mail data to partition 1", and the like.

【0130】データ管理システム制御部1002は、デ
ータ管理システムメモリ部1003内のパーティション
1に関する管理テーブル2へアクセスして、ブロック状
態が「データ有り」である物理消去ブロックの物理番
号、およびその論理番号を全て取得する。さらに、パー
ティション1における先頭の物理消去ブロックの物理番
号を取得する(図14、図17のステップ213)。例
えば図14の場合、取得されるブロックの物理番号は
8、9、10、12、13、14番である。
The data management system control unit 1002 accesses the management table 2 for the partition 1 in the data management system memory unit 1003, and finds the physical number of the physical erase block whose block status is “data present” and its logical number. To get all. Further, the physical number of the first physical erase block in the partition 1 is obtained (step 213 in FIGS. 14 and 17). For example, in the case of FIG. 14, the physical numbers of the acquired blocks are 8, 9, 10, 12, 13, and 14.

【0131】次に、データ管理システム制御部1002
は、管理テーブル4へアクセスして、ステップ213に
おいて取得した物理消去ブロックの物理番号のうち、未
使用セクタ数がデータの書き込みに必要なセクタ数以上
(パーティション情報テーブルより、パーティション1
における各セクタのサイズは32バイトであるため、そ
のデータを書き込むためには2個以上の未使用セクタが
必要)であり、かつ、未使用セクタ数が最大(図16
(a)では150)である物理消去ブロックの物理番号
=8を取得する(図16(a)、図17のステップ21
4)。
Next, the data management system control unit 1002
Accesses the management table 4, and among the physical numbers of the physical erase blocks acquired in step 213, the number of unused sectors is equal to or greater than the number of sectors necessary for writing data (from the partition information table, partition 1
Since the size of each sector is 32 bytes, two or more unused sectors are necessary to write the data, and the number of unused sectors is maximum (FIG. 16).
The physical number = 8 of the physical erase block, which is 150 in (a), is obtained (FIG. 16A, step 21 in FIG. 17).
4).

【0132】続いて、データ管理システム制御部100
2は、管理テーブル3へアクセスして、ステップ214
において取得した物理消去ブロックの物理番号=8に対
応するセクタのうち、セクタ状態が「未使用」であるセ
クタの物理番号(図15(a)では51、52、・・
・)、および論理番号(図15(a)では61、62、
・・・)を取得する(図15(a)、図17のステップ
215)。
Subsequently, the data management system control unit 100
2 accesses the management table 3 and executes step 214
Among the sectors corresponding to the physical number = 8 of the physical erase block acquired in the above, the physical numbers of the sectors whose sector status is “unused” (51, 52,... In FIG. 15A).
.), And logical numbers (61, 62 in FIG. 15A,
..) (FIG. 15A, step 215 in FIG. 17).

【0133】その後、データ管理システム制御部100
2は、パーティション情報テーブルにアクセスして、パ
ーティション1に関する情報(物理消去ブロックのサイ
ズ002000h(8キロ)バイト、物理セクタのサイ
ズ=32バイト、パーティション1の物理的なスタート
アドレス=0E0000h)を用いて、以下の計算式に
よりデータの書き込みを開始する物理アドレスを計算す
る(図7、図17のステップ216)。
Thereafter, the data management system control unit 100
2 accesses the partition information table and uses information about the partition 1 (the size of the physical erase block is 002000h (8 kilobytes), the size of the physical sector is 32 bytes, and the physical start address of the partition 1 is 0E0000h). Then, the physical address at which to start writing data is calculated by the following formula (step 216 in FIGS. 7 and 17).

【0134】データの書き込み開始アドレス=パーティ
ションのスタートアドレス[0E0000h]+パーティション
における物理消去ブロックのサイズ[0020000h]×(ステ
ップ214において取得した物理ブロックの物理番号[8]−
ステップ214において取得した先頭の物理消去ブロック
の物理番号[8])+パーティションにおけるセクタのサ
イズ[32]×ステップ215において取得したセクタの物理
番号[51] なお、ここでは、ステップ215において取得した未使
用セクタの物理番号51、52、・・・のうち、最も小
さい番号のセクタ51にデータを書き込む。この理由
は、物理セクタ番号1のセクタから順にセクタ状態を確
認する際に、最初に未使用状態のセクタが検出されれ
ば、以降のセクタは全て未使用であることが分かり、デ
ータ管理が容易になるからである。
Data write start address = partition start address [0E0000h] + physical erase block size in partition [0020000h] × (physical block physical number [8] obtained in step 214) −
The physical number [8] of the first physical erase block obtained in step 214) + the size of the sector in the partition [32] × the physical number [51] of the sector obtained in step 215. Data is written to the sector 51 with the smallest number among the physical numbers 51, 52,... Of the used sectors. The reason is that, when checking the sector status in order from the sector with the physical sector number 1, if an unused sector is detected first, it can be understood that all the subsequent sectors are unused, thus facilitating data management. Because it becomes.

【0135】そして、データ管理システム制御部100
2は、フラッシュメモリ制御部1004を介して、ステ
ップ216において計算した物理アドレスに対応するフ
ラッシュメモリ部1005のアドレスへ、ステップ21
1において与えられた書き込みデータを、ステップ21
1において与えられたデータサイズ分=50のデータ書
き込みを行う(図17のステップ217)。
The data management system control unit 100
2 is transferred to the address of the flash memory unit 1005 corresponding to the physical address calculated in step 216 via the flash memory control unit 1004, in step 21.
The write data given in step 1 is
The data write of the data size given in 1 = 50 is performed (step 217 in FIG. 17).

【0136】データの書き込み完了後、データ管理シス
テム制御部1002は、管理テーブル3へアクセスし
て、ステップ217において書き込みを行ったセクタに
対応するセクタ状態を「未使用」から「データ有効」へ
更新する(図15(b)、図17のステップ218)。
After the completion of the data writing, the data management system control unit 1002 accesses the management table 3 and updates the sector state corresponding to the sector in which the data has been written in step 217 from “unused” to “data valid”. (FIG. 15B, step 218 in FIG. 17).

【0137】また、データ管理システム制御部1002
は、管理テーブル3へアクセスして、ステップ217に
おいて書き込みを行った物理消去ブロックに対応する未
使用セクタ数(図16(b)では150)を、使用した
セクタ数(2個)だけ減じる(図16(b)では14
8)(図17のステップ219)。
The data management system control unit 1002
Accesses the management table 3 and reduces the number of unused sectors (150 in FIG. 16B) corresponding to the physical erase block on which the writing has been performed in step 217 by the number of used sectors (2) (FIG. 14 in 16 (b)
8) (Step 219 in FIG. 17).

【0138】最後に、データ管理システム制御部100
2は、パーティション1に関する管理テーブル1へアク
セスして、書き込みデータに対応するID=100、物
理消去ブロックの論理番号=2、データ開始セクタの論
理番号=60、およびデータサイズ50を更新する(図
13、図17のステップ220)。
Finally, the data management system control unit 100
2 accesses the management table 1 for the partition 1 and updates the ID = 100 corresponding to the write data, the logical number of the physical erase block = 2, the logical number of the data start sector = 60, and the data size 50 (FIG. 13, step 220 in FIG. 17).

【0139】(データの削除方法)図18〜図21およ
び図22のフローチャートを用いて、パーティション2
に格納されたID=20、サイズが500バイトである
データの削除方法について説明する。
(Data Deletion Method) Partition 2 is described with reference to the flowcharts of FIGS. 18 to 21 and 22.
A method of deleting data with ID = 20 and size of 500 bytes stored in.

【0140】アプリケーションプログラムまたはオペレ
ーティングシステム1006よりフラッシュメモリ部1
005からのデータの削除要求が発生した場合、この削
除要求と共に削除するデータのID=10、およびパー
ティション番号=2がアプリケーションプログラムまた
はオペレーティングシステム1006からデータ管理シ
ステム1001に与えられる(図22のステップ22
1)。なお、ID=10がパーティション2に含まれて
いることは、アプリケーションシステムまたはオペレー
ションシステム側で判断する。
The flash memory unit 1 is provided by the application program or the operating system 1006.
When a request to delete data from 005 is issued, the ID = 10 and the partition number = 2 of the data to be deleted along with the deletion request are given from the application program or the operating system 1006 to the data management system 1001 (step 22 in FIG. 22).
1). Whether the ID = 10 is included in the partition 2 is determined on the application system or operation system side.

【0141】次に、データ管理システム制御部1002
は、データ管理システムメモリ部1003内のパーティ
ション2に関する管理テーブル1へアクセスして、対応
するIDのデータが格納されている物理消去ブロックの
論理番号=3、データ開始セクタの論理番号=100、
およびデータサイズ=500を取得する(図18、図2
2のステップ222)。
Next, the data management system control unit 1002
Accesses the management table 1 for the partition 2 in the data management system memory unit 1003, and the logical number of the physical erase block storing the data of the corresponding ID = 3, the logical number of the data start sector = 100,
And data size = 500 (see FIGS. 18 and 2).
2 step 222).

【0142】続いて、データ管理システム制御部100
2は、パーティション2に関する管理テーブル2へアク
セスして、ステップ222において取得した物理消去ブ
ロックの論理番号=3に対応した物理番号=18を取得
する(図19、図22のステップ223)。
Subsequently, the data management system control unit 100
2 accesses the management table 2 for the partition 2 and acquires the physical number = 18 corresponding to the logical number = 3 of the physical erase block acquired in step 222 (step 223 in FIGS. 19 and 22).

【0143】その後、データ管理システム制御部100
2は、管理テーブル3へアクセスして、ステップ223
において取得した物理消去ブロックの物理番号=18、
およびステップ222において取得したセクタの論理番
号=100に対応し、かつ、セクタ状態が「データ有
効」であるセクタの物理番号=51を取得する(図20
(a)、図22のステップ224)。
Thereafter, the data management system control unit 100
2 accesses the management table 3 and proceeds to step 223
, The physical number of the physical erase block acquired at 18,
Then, the physical number = 51 of the sector corresponding to the logical number = 100 of the sector obtained in step 222 and the sector status is “data valid” is obtained (FIG. 20).
(A), step 224 in FIG. 22).

【0144】次に、データ管理システム制御部1002
は、フラッシュメモリ制御部1004を介してフラッシ
ュメモリ部1005へアクセスし、対応するデータの削
除(すなわち、フラッシュメモリ部1005の対象とな
るセクタの状態情報を無効にする)を行う(図22のス
テップ225)。
Next, the data management system control unit 1002
Accesses the flash memory unit 1005 via the flash memory control unit 1004 and deletes the corresponding data (that is, invalidates the state information of the target sector of the flash memory unit 1005) (step in FIG. 22). 225).

【0145】データの削除完了後、データ管理システム
制御部1002は、管理テーブル3へアクセスして、ス
テップ224において取得したセクタに対応するセクタ
状態を「データ有効」から「データ無効」へ更新する
(図20(b)、図22のステップ226)。
After the data deletion is completed, the data management system control unit 1002 accesses the management table 3 and updates the sector state corresponding to the sector obtained in step 224 from “data valid” to “data invalid” ( FIG. 20 (b), step 226 in FIG. 22).

【0146】また、データ管理システム制御部1002
は、管理テーブル4へアクセスして、ステップ225に
おいて削除を行ったセクタを含む物理消去ブロックに対
応するデータ無効セクタ数(図21(a)では100)
を、削除したセクタ数(1個)だけ加える(図21
(b)では101)(図22のステップ227)。
A data management system control unit 1002
Is the number of data invalid sectors corresponding to the physical erase block including the sector deleted in step 225 by accessing the management table 4 (100 in FIG. 21A).
As many as the number of deleted sectors (one) (FIG. 21).
(B) 101) (Step 227 in FIG. 22).

【0147】最後に、データ管理システム制御部100
2は、管理テーブル1へアクセスして、削除したデータ
に対応するID=20、物理消去ブロックの論理番号=
3、データ開始セクタの論理番号=100、およびデー
タサイズ500を消去する(図18、図22のステップ
228)。
Finally, the data management system control unit 100
2 accesses the management table 1 and has ID = 20 corresponding to the deleted data, logical number of the physical erase block =
3. The logical number of the data start sector = 100 and the data size 500 are erased (step 228 in FIGS. 18 and 22).

【0148】(再構築(リクレーム)方法)図23〜図
25および図26のフローチャートを用いて、パーティ
ション毎に予備の物理消去ブロック(スペアブロック)
を設定した場合における、パーティション0の再構築方
法について説明する。再構築は、データの書き込み時に
おけるステップ214において、データの書き込みに必
要な物理消去ブロックが取得できなかった場合に行われ
る。
(Reconstruction (Reclaim) Method) A spare physical erase block (spare block) is provided for each partition by using the flowcharts of FIGS. 23 to 25 and 26.
A method for reconstructing the partition 0 in the case where is set will be described. Reconstruction is performed when a physical erase block required for data writing cannot be obtained in step 214 at the time of data writing.

【0149】データ管理システム制御部1002は、デ
ータ管理システムメモリ部1003内の管理テーブル4
へアクセスして、データを書き込むパーティション0に
対応する物理消去ブロックのうち、データ無効セクタ数
が最大である物理消去ブロックの物理番号=5を取得す
る(図25、図26のステップ231)。
The data management system control unit 1002 stores the management table 4 in the data management system memory unit 1003.
To obtain the physical number = 5 of the physical erase block having the largest number of data invalid sectors among the physical erase blocks corresponding to the partition 0 to which data is to be written (step 231 in FIGS. 25 and 26).

【0150】次に、データ管理システム制御部1002
は、パーティション0に関する管理テーブル2へアクセ
スして、ステップ231において取得した物理消去ブロ
ックの物理番号=5に対応した論理番号=5を取得する
(図23(a)、図26のステップ232)。
Next, the data management system control unit 1002
Accesses the management table 2 for the partition 0 and acquires the logical number = 5 corresponding to the physical number = 5 of the physical erase block acquired in step 231 (FIG. 23 (a), step 232 in FIG. 26).

【0151】続いて、データ管理システム制御部100
2は、パーティション0に関する管理テーブル2から、
再構築処理用に予め確保しておいた予備の物理消去ブロ
ック(スペアブロック)の物理番号=7を取得すると共
に、予備の物理消去ブロックの論理番号=Sp(他の論
理番号と重複しない番号が割り振られる。また、この論
理番号Spにより予備ブロックを識別する)を、ステッ
プ232において取得した論理番号=5へ更新し(図2
3(b))、さらに、ブロック状態を「未使用」から
「データ転送中」へ更新する(図26のステップ23
3)。
Subsequently, the data management system control unit 100
2 is from the management table 2 for partition 0,
The physical number = 7 of the spare physical erase block (spare block) reserved in advance for the rebuilding process is acquired, and the logical number of the spare physical erase block = Sp (a number that does not overlap with other logical numbers is used). The spare block is identified by the logical number Sp), and is updated to the logical number = 5 acquired in step 232 (FIG. 2).
3 (b)), and further updates the block state from "unused" to "data transfer in progress" (step 23 in FIG. 26).
3).

【0152】その後、データ管理システム制御部100
2は、フラッシュメモリ制御部1004を介してフラッ
シュメモリ部1005へアクセスし、ステップ231に
おいて取得した物理消去ブロック(物理番号=5)か
ら、ステップ233において取得した予備の物理消去ブ
ロック(物理番号=7)へ、取得した物理消去ブロック
の物理番号に対応する管理テーブル3のセクタ状態が
「データ有効」であるセクタの内容を全てコピーすると
共に、管理テーブル3へアクセスして、対応するセクタ
の論理番号をコピーし、セクタ状態を「未使用」から
「データ有効」へ更新する(図24の(a)から
(b)、図26のステップ234)。
Thereafter, the data management system control unit 100
2 accesses the flash memory unit 1005 via the flash memory control unit 1004, and converts the physical erase block (physical number = 5) obtained in step 231 from the spare physical erase block (physical number = 7) obtained in step 233. ), All the contents of the sector whose sector status is “data valid” in the management table 3 corresponding to the physical number of the acquired physical erase block are copied, and the management table 3 is accessed to access the logical number of the corresponding sector. And updates the sector status from “unused” to “data valid” (from (a) to (b) in FIG. 24, step 234 in FIG. 26).

【0153】データのコピー完了後、データ管理システ
ム制御部1002は、管理テーブル4へアクセスして、
ステップ231において取得した物理消去ブロック(物
理番号=5)に対応する未使用セクタ数(図25(a)
では20)にデータ無効セクタ数(図25(a)では1
40)を加えた値=160を、ステップ233において
取得した予備の物理消去ブロック(物理番号=7)に対
応する未使用セクタ数へコピーし、データ無効セクタ数
を0へ更新する(図25の(a)から(b)、図26の
ステップ235)。
After the data copy is completed, the data management system control unit 1002 accesses the management table 4 and
The number of unused sectors corresponding to the physical erase block (physical number = 5) acquired in step 231 (FIG. 25A)
25), the number of data invalid sectors (1 in FIG. 25A)
40) is added to the unused sector number corresponding to the spare physical erase block (physical number = 7) acquired in step 233, and the data invalid sector number is updated to 0 (FIG. 25). (A) to (b), step 235 in FIG.

【0154】次に、データ管理システム制御部1002
は、管理テーブル2へアクセスして、ステップ233に
おいて取得した予備の物理消去ブロック(物理番号=
7)のブロック状態を「データ転送中」から「元ブロッ
ク消去中」へ更新し、フラッシュメモリ制御部1004
を介してフラッシュメモリ部1005へアクセスして、
ステップ231において取得した物理消去ブロック(物
理番号=5)に対応する物理消去ブロックのデータ消去
を行う(図26のステップ236)。
Next, the data management system control unit 1002
Accesses the management table 2 and obtains the spare physical erase block (physical number =
The block state of 7) is updated from “data transfer” to “original block erase”, and the flash memory control unit 1004
To the flash memory unit 1005 via
The data of the physical erase block corresponding to the physical erase block (physical number = 5) acquired in step 231 is erased (step 236 in FIG. 26).

【0155】データの消去完了後、データ管理システム
制御部1002は、パーティション0に関する管理テー
ブル2へアクセスして、ステップ236において更新し
た予備ブロックのブロック状態を「元ブロック消去中」
から「データ有り」へ更新すると共に、ステップ231
において取得した物理消去ブロックの物理番号=5に対
応する論理番号=5を、新しい予備の物理消去ブロック
の番号=Spへ更新し、さらに、ブロック状態を「未使
用」に更新する(図23(b)、図26のステップ23
7)。
After the data erasure is completed, the data management system control unit 1002 accesses the management table 2 for the partition 0 and changes the block status of the spare block updated in step 236 to “the original block is being erased”.
Is updated to “data available”, and step 231
23, the logical number = 5 corresponding to the physical number = 5 of the physical erase block acquired is updated to the new spare physical erase block number = Sp, and the block state is updated to “unused” (FIG. 23 ( b), step 23 of FIG.
7).

【0156】また、データ管理システム制御部1002
は、管理テーブル3へアクセスして、ステップ231に
おいて取得した物理消去ブロックの物理番号=5に対応
するセクタ状態を全て「未使用」へ更新する(図26の
ステップ238)。
A data management system control unit 1002
Accesses the management table 3 and updates all the sector states corresponding to the physical number = 5 of the physical erase block acquired in step 231 to “unused” (step 238 in FIG. 26).

【0157】最後に、データ管理システム制御部100
2は、管理テーブル4へアクセスして、ステップ231
において取得した物理消去ブロックの物理番号=5に対
応する未使用セクタ数を、全てのセクタが未使用である
初期値=254へ更新し、データ無効セクタ数を0へ更
新する(図25(b)、図26のステップ239)。
Finally, the data management system control unit 100
2 accesses the management table 4 and proceeds to step 231
Update the number of unused sectors corresponding to the physical number = 5 of the physical erase block acquired in the above to the initial value = 254 where all sectors are unused, and update the number of data invalid sectors to 0 (FIG. 25 (b) ), Step 239 in FIG. 26).

【0158】(実施形態2)本実施形態では、複数のパ
ーティションにおいて予備の物理消去ブロック(スペア
ブロック)を共用する例について説明する。
(Embodiment 2) In this embodiment, an example in which a spare physical erase block (spare block) is shared by a plurality of partitions will be described.

【0159】図27は、データ領域を、64キロバイト
のサイズを有する8個の物理消去ブロックによって構成
されるパーティション0とパーティション2、および8
キロバイトのサイズを有する8個の物理消去ブロックに
よって構成されるパーティション1に3分割して、パー
ティション0およびパーティション2に共用する1個の
予備の物理消去ブロック(スペアブロック)を設定し、
パーティション1に1個の予備の物理消去ブロック(ス
ペアブロック)を設定した場合において、スペアブロッ
クを共用するパーティション(パーティション0および
パーティション2)が物理的に非連続である状態を示し
ている。ここでは、各物理消去ブロックに対して0から
23までの物理ブロック番号(ブロックの物理番号)を
通し番号で割り当てている。また、パーティション0に
おける各物理消去ブロックには0から7(0_0〜0_
7)の論理ブロック番号(ブロックの論理番号)を割り
当て、パーティション1およびパーティション2におけ
る各物理消去ブロックには0から6の論理ブロック番号
(1_0〜1_6および2_0および2_6)およびス
ペアブロックを示すSpの論理ブロック番号(1_Sp
および2_Sp)を割り当てている。
FIG. 27 shows that the data area is divided into partitions 0, 2 and 8 each composed of eight physical erase blocks having a size of 64 kilobytes.
Partitioning into three partitions 1 each composed of eight physical erase blocks having a size of kilobytes, and setting one spare physical erase block (spare block) shared by partitions 0 and 2;
When one spare physical erase block (spare block) is set in the partition 1, the partition (partition 0 and partition 2) sharing the spare block is physically non-contiguous. Here, physical block numbers from 0 to 23 (physical numbers of the blocks) are assigned to the respective physical erase blocks by serial numbers. In addition, 0 to 7 (0_0 to 0_) are assigned to each physical erase block in the partition 0.
7) is assigned, and each physical erase block in partition 1 and partition 2 is assigned a logical block number from 0 to 6 (1_0 to 1_6 and 2_0 and 2_6) and a spare block indicating a spare block. Logical block number (1_Sp
And 2_Sp).

【0160】なお、パーティション0に属するSpの論
理ブロック番号を有する物理消去ブロックは、パーティ
ション2に属するSpの論理ブロック番号を有する物理
ブロックと同一にする(共用する)。すなわち、データ
管理システム1001の起動時に、データ管理システム
制御部1002が管理テーブル2をデータ管理システム
メモリ部1003内に作成するとき、図27の場合、パ
ーティション0の論理ブロック番号0_Spに対応する
物理消去ブロック番号を、パーティション2の論理ブロ
ック番号2_Spに割り当てられた物理消去ブロック番
号である23に割り当てる。
The physical erase block having the logical block number of Sp belonging to partition 0 is the same (shared) as the physical block having the logical block number of Sp belonging to partition 2. That is, when the data management system control unit 1002 creates the management table 2 in the data management system memory unit 1003 when the data management system 1001 is activated, in the case of FIG. 27, the physical erasure corresponding to the logical block number 0_Sp of the partition 0 is performed. The block number is assigned to 23 which is the physical erase block number assigned to the logical block number 2_Sp of the partition 2.

【0161】図28は、データ領域を、64キロバイト
のサイズを有する8個の物理消去ブロックによって構成
されるパーティション0とパーティション1、および8
キロバイトのサイズを有する8個の物理消去ブロックに
よって構成されるパーティション2に3分割して、パー
ティション0およびパーティション1に共用する1個の
予備の物理消去ブロック(スペアブロック)を設定し、
パーティション2に1個の予備の物理消去ブロック(ス
ペアブロック)を設定した場合において、スペアブロッ
クを共用するパーティション(パーティション0および
パーティション1)が物理的に連続している状態を示し
ている。ここでは、各物理消去ブロックに対して0から
23までの物理ブロック番号を通し番号で割り当ててい
る。また、パーティション0における各物理消去ブロッ
クには0から7(0_0〜0_7)の論理ブロック番号
を割り当て、パーティション1およびパーティション2
における各物理消去ブロックには0から6の論理ブロッ
ク番号(1_0〜1_6および2_0および2_6)お
よびスペアブロックを示すSpの論理ブロック番号(1
_Spおよび2_Sp)を割り当てている。
FIG. 28 shows that the data area is divided into partitions 0, 1, and 8 each composed of eight physical erase blocks having a size of 64 kilobytes.
Partition into three partitions 2 each composed of eight physical erase blocks having a size of kilobytes, and set one spare physical erase block (spare block) shared by partitions 0 and 1;
In the case where one spare physical erase block (spare block) is set in the partition 2, the partition (partition 0 and partition 1) sharing the spare block is physically continuous. Here, a physical block number from 0 to 23 is assigned to each physical erase block by a serial number. Also, logical block numbers from 0 to 7 (0_0 to 0_7) are assigned to each physical erase block in partition 0, and partition 1 and partition 2
, Each of the physical erase blocks has a logical block number of 0 to 6 (1_0 to 1_6, 2_0, and 2_6) and a logical block number of Sp (1
_Sp and 2_Sp).

【0162】なお、パーティション0に属するSpの論
理ブロック番号を有する物理消去ブロックは、パーティ
ション1に属するSpの論理ブロック番号を有する物理
ブロックと同一にする(共用する)。すなわち、データ
管理システム1001の起動時に、データ管理システム
制御部1002が管理テーブル2をデータ管理システム
メモリ部1003内に作成するとき、図28の場合、パ
ーティション0の論理ブロック番号0_Spに対応する
物理消去ブロック番号を、パーティション1の論理ブロ
ック番号1_Spに割り当てられた物理消去ブロック番
号である15に割り当てる。
The physical erase block having the logical block number of Sp belonging to partition 0 is the same (shared) as the physical block having the logical block number of Sp belonging to partition 1. That is, when the data management system control unit 1002 creates the management table 2 in the data management system memory unit 1003 when the data management system 1001 is started, in the case of FIG. 28, the physical erasure corresponding to the logical block number 0_Sp of the partition 0 in FIG. The block number is assigned to 15, which is the physical erase block number assigned to the logical block number 1_Sp of the partition 1.

【0163】以下に、実施形態1のようにパーティショ
ン毎に予備の物理消去ブロック(スペアブロック)を設
定した場合との相違点について説明する。
Hereinafter, differences from the case where a spare physical erase block (spare block) is set for each partition as in the first embodiment will be described.

【0164】図29は、図27において、再構築を繰り
返した場合の論理ブロック番号(ブロックの論理番号)
の移り変わりを示す図である。図29(a)に示す初期
状態では、パーティション0に属する各論理ブロック
は、物理ブロック番号(ブロックの物理番号)0から7
まで(以下、パーティション0の初期領域と称する)連
続して存在している。パーティション1およびパーティ
ション2に属する各論理ブロックも同様に、物理ブロッ
ク番号8から15まで(以下、パーティション1の初期
領域と称する)および物理ブロック番号16から23ま
で(以下、パーティション2の初期領域と称する)連続
して存在している。
FIG. 29 shows the logical block number (logical number of the block) in FIG. 27 when reconstructing is repeated.
It is a figure which shows the change of. In the initial state shown in FIG. 29A, each logical block belonging to partition 0 has a physical block number (physical number of block) 0 to 7
(Hereinafter referred to as the initial area of the partition 0). Similarly, each logical block belonging to the partition 1 and the partition 2 has physical block numbers 8 to 15 (hereinafter, referred to as an initial area of the partition 1) and physical block numbers 16 to 23 (hereinafter, referred to as an initial area of the partition 2). ) Exist continuously.

【0165】上記実施形態1のように、パーティション
毎に予備の物理消去ブロック(スペアブロック)を設定
する場合には、再構築を繰り返してもパーティション0
に含まれる各論理ブロックはパーティション0の初期領
域に存在する。パーティション1およびパーティション
2も同様である。
In the case where a spare physical erase block (spare block) is set for each partition as in the first embodiment, even if rebuilding is repeated, the partition 0
Exist in the initial area of partition 0. The same applies to partition 1 and partition 2.

【0166】図29(b)に、論理番号2_4のブロッ
クを再構築した後の状態を示す。論理番号2_4のブロ
ックは、物理番号19から23に移るが、移った後も同
じくパーティション2の初期領域に存在している。
FIG. 29B shows a state after the block of the logical number 2_4 has been reconstructed. The block of the logical number 2_4 moves from the physical number 19 to 23, but after the transfer, the block still exists in the initial area of the partition 2.

【0167】図29(c)に、さらに論理番号0_6の
ブロックを再構築した後の状態を示す。論理番号0_6
のブロックは、物理番号6から19に移るため、パーテ
ィション0の初期領域からパーティション2の初期領域
に移ることになる。
FIG. 29C shows a state after the block of the logical number 0_6 is further reconstructed. Logical number 0_6
Block moves from the physical number 6 to the physical number 19, and therefore moves from the initial area of the partition 0 to the initial area of the partition 2.

【0168】すなわち、再構築を繰り返すことにより、
パーティション0に属する論理ブロックがパーティショ
ン2の初期領域に物理的に存在する可能性がある。同じ
く、パーティション2に属する論理ブロックがパーティ
ション0の初期領域に物理的に存在する可能性もある。
図28の場合も同様である。
That is, by repeating the reconstruction,
The logical block belonging to partition 0 may physically exist in the initial area of partition 2. Similarly, a logical block belonging to partition 2 may physically exist in the initial area of partition 0.
The same applies to the case of FIG.

【0169】図30は、図27の場合における、パーテ
ィション情報テーブルの構成を示す図である。図7に示
したパーティション毎に予備の物理消去ブロック(スペ
アブロック)を設定する実施形態1のパーティション情
報テーブルとは異なり、スペアブロックを共用するパー
ティション0とパーティション2についての情報を各々
2行にしている。パーティション0とパーティション2
の情報は、パーティションのスタートアドレスとエンド
アドレスに同じ情報を有している。
FIG. 30 shows the structure of the partition information table in the case of FIG. Unlike the partition information table according to the first embodiment in which a spare physical erase block (spare block) is set for each partition shown in FIG. 7, information on the partition 0 and the partition 2 sharing the spare block is divided into two lines. I have. Partition 0 and partition 2
Has the same information in the start address and end address of the partition.

【0170】これは、パーティション0に属する論理ブ
ロックがパーティション0の初期領域に存在する場合
と、パーティション2の初期領域に存在する場合とで、
データの物理アドレスを算出する場合に用いるパーティ
ションの開始アドレスが異なるからである。パーティシ
ョン0に属する論理ブロックがパーティション0の初期
領域に存在する物理番号を有する場合には1行目の情報
を用い、この場合にはパーティション0に関する2行目
の情報は無視される。また、パーティション0に属する
論理ブロックが再構築を繰り返した結果、パーティショ
ン2の初期領域に存在する物理番号を有する場合には2
行目の情報を用い、この場合にはパーティション0に関
する1行目の情報は無視される。
This is based on the case where the logical block belonging to partition 0 exists in the initial area of partition 0 and the case where it exists in the initial area of partition 2.
This is because the start addresses of the partitions used for calculating the physical address of the data are different. If the logical block belonging to partition 0 has a physical number existing in the initial area of partition 0, the information on the first row is used, and in this case, the information on the second row for partition 0 is ignored. If the logical block belonging to partition 0 has a physical number that exists in the initial area of partition 2 as a result of repeating
The information on the row is used, and in this case, the information on the first row for partition 0 is ignored.

【0171】図31は、図28の場合における、パーテ
ィション情報テーブルの構成を示す図である。図7に示
したパーティション毎に予備の物理消去ブロック(スペ
アブロック)を設定する実施形態1のパーティション情
報テーブルとは異なり、スペアブロックを共用するパー
ティション0とパーティション1についての情報を各々
2行にしている。パーティション0とパーティション1
の情報は、パーティションのスタートアドレスとエンド
アドレスに同じ情報を有している。
FIG. 31 is a diagram showing the configuration of the partition information table in the case of FIG. Unlike the partition information table of the first embodiment in which a spare physical erase block (spare block) is set for each partition shown in FIG. 7, the information on the partitions 0 and 1 sharing the spare block is divided into two lines each. I have. Partition 0 and Partition 1
Has the same information in the start address and end address of the partition.

【0172】これは、パーティション0に属する論理ブ
ロックがパーティション0の初期領域に存在する場合
と、パーティションの初期領域に存在する場合とで、デ
ータの物理アドレスを算出する場合に用いるパーティシ
ョンの開始アドレスが異なるからである。パーティショ
ン0に属する論理ブロックがパーティション0の初期領
域に存在する物理番号を有する場合には1行目の情報を
用い、この場合にはパーティション0に関する2行目の
情報は無視される。また、パーティション0に属する論
理ブロックが再構築を繰り返した結果、パーティション
1の初期領域に存在する物理番号を有する場合には2行
目の情報を用い、この場合にはパーティション0に関す
る1行目の情報は無視される。
The start address of the partition used to calculate the physical address of data depends on whether the logical block belonging to the partition 0 exists in the initial area of the partition 0 or in the initial area of the partition. Because it is different. If the logical block belonging to partition 0 has a physical number existing in the initial area of partition 0, the information on the first row is used, and in this case, the information on the second row for partition 0 is ignored. If the logical block belonging to partition 0 has a physical number that exists in the initial area of partition 1 as a result of repeating the rebuilding, the information in the second row is used. Information is ignored.

【0173】図32は、図27の場合における、パーテ
ィション0およびパーティション2に関する管理テーブ
ル2の構成を示す図である。図7に示したパーティショ
ン毎に予備の物理消去ブロック(スペアブロック)を設
定する実施形態1の管理テーブルとは異なり、スペアブ
ロックを共用するパーティション0とパーティション2
において同一の物理番号=23が存在する。すなわち、
パーティション0に属する論理ブロック番号0_Spの
ブロックも、パーティション2に属する論理ブロック番
号2_Spのブロックも、ブロックの物理番号は23で
ある。
FIG. 32 is a diagram showing the configuration of the management table 2 for partition 0 and partition 2 in the case of FIG. Unlike the management table of the first embodiment in which a spare physical erase block (spare block) is set for each partition shown in FIG. 7, the partition 0 and the partition 2 share the spare block.
Have the same physical number = 23. That is,
The physical number of the block of the block having the logical block number 0_Sp belonging to the partition 0 and the block having the logical block number 2_Sp belonging to the partition 2 is 23.

【0174】図33は、図28の場合における、パーテ
ィション0およびパーティション1に関する管理テーブ
ル2の構成を示す図である。図7に示したパーティショ
ン毎に予備の物理消去ブロック(スペアブロック)を設
定する実施形態1の管理テーブルとは異なり、スペアブ
ロックを共用するパーティション0とパーティション1
において同一の物理番号=15が存在する。すなわち、
パーティション0に属する論理ブロック番号0_Spの
ブロックも、パーティション1に属する論理ブロック番
号1_Spのブロックも、ブロックの物理番号は15で
ある。なお、管理テーブル1、管理テーブル3および管
理テーブル4については、実施形態1の構成と同様であ
る。
FIG. 33 is a diagram showing the configuration of the management table 2 for partition 0 and partition 1 in the case of FIG. Unlike the management table of the first embodiment in which a spare physical erase block (spare block) is set for each partition shown in FIG. 7, the partition 0 and the partition 1 share the spare block.
Have the same physical number = 15. That is,
The physical number of the block of both the block of logical block number 0_Sp belonging to partition 0 and the block of logical block number 1_Sp belonging to partition 1 is 15. The management table 1, the management table 3, and the management table 4 are the same as in the configuration of the first embodiment.

【0175】(データの読み出し方法)データの読み出
し方法は、パーティション毎に予備の物理消去ブロック
(スペアブロック)を設定する実施形態1と基本的には
同様である。すなわち、アプリケーションプログラムま
たはオペレーティングシステム1006からデータの読
み出し要求と共に読み出すデータのIDおよびパーティ
ション番号がデータ管理システム1001に与えられた
後、パーティション情報テーブル、管理テーブル1から
管理テーブル4までを参照して、以下の計算式によりデ
ータの読み出しを開始する物理アドレスを計算するのは
同じである。
(Data reading method) The data reading method is basically the same as that of the first embodiment in which a spare physical erase block (spare block) is set for each partition. That is, after the data management system 1001 is provided with the data ID and the partition number of the data to be read together with the data read request from the application program or the operating system 1006, the partition information table, the management tables 1 to 4 are referred to, Is the same as calculating the physical address at which to start reading data.

【0176】データの読み出し開始アドレス=パーティ
ションのスタートアドレス+パーティションにおける物
理消去ブロックのサイズ×(物理ブロックの物理番号−
先頭の物理消去ブロックの物理番号)+パーティション
におけるセクタのサイズセクタの物理番号 しかし、パーティションのスタートアドレスと先頭の物
理消去ブロックの物理番号は、データが物理的にどのパ
ーティションの初期領域に存在するかで変わる。従っ
て、図32または図33に示した管理テーブル2から物
理ブロック番号を得た後、その物理消去ブロックがどの
パーティションの初期領域にあるかを認識し、パーティ
ション図30または図31に示したパーティション情報
テーブルのどの行の情報を用いるかを判断するステップ
を追加する必要がある。
Data read start address = partition start address + physical erase block size in partition × (physical block physical number−
(Physical number of first physical erase block) + size of sector in partition Physical number of sector However, the start address of the partition and the physical number of the first physical erase block indicate in which initial area of the partition the data is physically located. Will change. Therefore, after obtaining the physical block number from the management table 2 shown in FIG. 32 or 33, it is recognized which partition initial area the physical erase block is located in, and the partition information shown in the partition diagram 30 or FIG. It is necessary to add a step for determining which row of information in the table to use.

【0177】なお、予備の物理消去ブロックを共用して
いるパーティションの物理アドレスが、図30のように
不連続であっても、図31のように連続であっても、同
じ読み出し方法を用いることができる。
The same read method is used regardless of whether the physical addresses of the partitions sharing the spare physical erase block are discontinuous as shown in FIG. 30 or continuous as shown in FIG. Can be.

【0178】(データの書き込み方法)データの書き込
み方法は、パーティション毎に予備の物理消去ブロック
(スペアブロック)を設定する実施形態1と基本的には
同様である。すなわち、アプリケーションプログラムま
たはオペレーティングシステム1006からデータの書
き込み要求と共に書き込むデータのID、パーティショ
ン番号、データサイズおよびデータ内容がデータ管理シ
ステム1001に与えられた後、パーティション情報テ
ーブル、管理テーブル1から管理テーブル4までを参照
して、以下の計算式によりデータの書き込みを開始する
物理アドレスを計算するのは同じである。
(Data Writing Method) The data writing method is basically the same as that of the first embodiment in which a spare physical erase block (spare block) is set for each partition. That is, after the data ID, partition number, data size, and data content to be written together with the data write request from the application program or the operating system 1006 are given to the data management system 1001, the partition information table, the management table 1 to the management table 4, , The same calculation of the physical address at which data writing is started by the following formula is the same.

【0179】データの書き込み開始アドレス=パーティ
ションのスタートアドレス+パーティションにおける物
理消去ブロックのサイズ×(物理ブロックの物理番号−
先頭の物理消去ブロックの物理番号)+パーティション
におけるセクタのサイズセクタの物理番号 しかし、パーティションのスタートアドレスと先頭の物
理消去ブロックの物理番号は、データ書き込み先アドレ
スが物理的にどのパーティションの初期領域に存在する
かで変わる。
Data write start address = partition start address + size of physical erase block in partition × (physical number of physical block−
(The physical number of the first physical erase block) + the size of the sector in the partition The physical number of the sector However, the start address of the partition and the physical number of the first physical erase block correspond to the initial area of the partition whose data write destination address is physically It depends on the existence.

【0180】従って、図30または図31に示した管理
テーブル2から物理ブロック番号を得た後、その物理消
去ブロックがどのパーティションの初期領域にあるかを
認識し、パーティション図30または図31に示したパ
ーティション情報テーブルのどの行の情報を用いるかを
判断するステップを追加する必要がある。
Therefore, after the physical block number is obtained from the management table 2 shown in FIG. 30 or FIG. 31, it is recognized which partition the physical erase block is in in the initial area, and the physical block number shown in FIG. 30 or FIG. It is necessary to add a step of determining which row of the partition information table to use.

【0181】なお、予備の物理消去ブロックを共用して
いるパーティションの物理アドレスが、図30のように
不連続であっても、図31のように連続であっても、同
じ書き込み方法を用いることができる。
It should be noted that the same writing method is used regardless of whether the physical addresses of the partitions sharing the spare physical erase block are discontinuous as shown in FIG. 30 or continuous as shown in FIG. Can be.

【0182】(データの削除方法)データの削除方法
は、パーティション毎に予備の物理消去ブロック(スペ
アブロック)を設定する実施形態1と基本的には同様で
ある。すなわち、アプリケーションプログラムまたはオ
ペレーティングシステム1006からデータの削除要求
と共に削除するデータのIDおよびパーティション番号
がデータ管理システム1001に与えられた後、パーテ
ィション情報テーブル、管理テーブル1から管理テーブ
ル4までを参照して、以下の計算式によりデータの削除
を開始する物理アドレスを計算するのは同じである。
(Data Deletion Method) The data deletion method is basically the same as that of the first embodiment in which a spare physical erase block (spare block) is set for each partition. That is, after an ID and a partition number of data to be deleted together with a data deletion request from the application program or the operating system 1006 are given to the data management system 1001, the partition information table, the management tables 1 to 4 are referred to, It is the same to calculate the physical address to start deleting data by the following formula.

【0183】データの削除開始アドレス=パーティショ
ンのスタートアドレス+パーティションにおける物理消
去ブロックのサイズ×(物理ブロックの物理番号−先頭
の物理消去ブロックの物理番号)+パーティションにお
けるセクタのサイズセクタの物理番号 しかし、パーティションのスタートアドレスと先頭の物
理消去ブロックの物理番号は、データが物理的にどのパ
ーティションの初期領域に存在するかで変わる。従っ
て、図32または図33に示した管理テーブル2から物
理ブロック番号を得た後、その物理消去ブロックがどの
パーティションの初期領域にあるかを認識し、パーティ
ション図30または図31に示したパーティション情報
テーブルのどの行の情報を用いるかを判断するステップ
を追加する必要がある。
Data deletion start address = start address of partition + size of physical erase block in partition × (physical number of physical block−physical number of first physical erase block) + size of sector in partition Physical number of sector The start address of the partition and the physical number of the first physical erase block change depending on which partition the data physically exists in the initial area. Therefore, after obtaining the physical block number from the management table 2 shown in FIG. 32 or 33, it is recognized which partition initial area the physical erase block is located in, and the partition information shown in the partition diagram 30 or FIG. It is necessary to add a step for determining which row of information in the table to use.

【0184】なお、予備の物理消去ブロックを共用して
いるパーティションの物理アドレスが、図30のように
不連続であっても、図31のように連続であっても、同
じ削除方法を用いることができる。
Note that the same deletion method is used regardless of whether the physical addresses of the partitions sharing the spare physical erase block are discontinuous as shown in FIG. 30 or continuous as shown in FIG. Can be.

【0185】(再構築(リクレーム)方法)再構築方法
は、パーティション毎に予備の物理消去ブロック(スペ
アブロック)を設定する実施形態1と基本的には同様で
ある。
(Reconstruction (Reclaim) Method) The reconstruction method is basically the same as that in Embodiment 1 in which a spare physical erase block (spare block) is set for each partition.

【0186】しかし、コピー元のデータが格納されてい
る物理消去ブロック(コピー後に新たにスペアブロック
になるブロック)、データのコピー先になる物理消去ブ
ロック(論理番号Spのブロック)、およびデータ消去
される物理消去ブロック(新たにスペアブロックになる
ブロック)の物理アドレスを算出するときには、対象と
なる物理消去ブロックが、いずれのパーティションの初
期領域に属しているかを、図32または図33に示した
管理テーブル2におけるブロックの物理番号を用いて判
断する必要がある。
However, the physical erase block (the block which becomes a new spare block after copying) in which the data of the copy source is stored, the physical erase block (the block of logical number Sp) which becomes the copy destination of the data, and the data erased When calculating the physical address of a physical erase block to be replaced (a block that becomes a new spare block), the management unit shown in FIG. 32 or FIG. 33 determines which partition the initial area of the physical erase block belongs to. It is necessary to determine using the physical number of the block in Table 2.

【0187】なお、予備の物理消去ブロックを共用して
いるパーティションの物理アドレスが、図30のように
不連続であっても、図31のように連続であっても、同
じ削除方法を用いることができる。
It should be noted that the same deletion method is used regardless of whether the physical addresses of the partitions sharing the spare physical erase block are discontinuous as shown in FIG. 30 or continuous as shown in FIG. Can be.

【0188】本発明では、データ領域の管理を、物理的
なデバイス単位ではなく、複数の論理的なパーティショ
ン単位で行う。よって、図4に示したフラッシュメモリ
部1005が1個のデバイスのみで構成されているか、
複数のデバイスで構成されているかに関わらず、パーテ
ィションの構造が同じであれば、データ管理システム制
御部1002により同じパーティション情報テーブルが
生成される。従って、アプリケーションプログラムまた
はオペレーティングシステム1006は、フラッシュメ
モリ部1005のデバイス構成に関わらず、データ管理
システム1001とのデータのやり取りが可能となる。
According to the present invention, the management of the data area is performed not in units of physical devices but in units of a plurality of logical partitions. Therefore, whether the flash memory unit 1005 shown in FIG. 4 is composed of only one device,
The same partition information table is generated by the data management system control unit 1002 if the partition structure is the same, regardless of whether the partition structure is composed of a plurality of devices. Therefore, the application program or the operating system 1006 can exchange data with the data management system 1001 regardless of the device configuration of the flash memory unit 1005.

【0189】なお、データ領域として複数のフラッシュ
メモリを用いた場合には、フラッシュメモリのステータ
スレジスタが各デバイスに別々に存在する。このため、
フラッシュメモリ制御部1004がフラッシュメモリ部
1005に対して命令コマンド(データ書き込みコマン
ド、ブロック消去コマンド、ステータスレジスタ読み出
しコマンド、アレイ読み出しコマンド、サスペンドコマ
ンド、レジュームコマンド等)を発行するアドレスは、
パーティションの先頭アドレスや最終アドレスに対して
発行するのではなく、実際にデータを書き込む場所(ア
ドレス)、またはデータを消去する場所に対して発行す
る。これにより、デバイスの状態を正確に認識すること
ができる。なお、ここで言う場所(アドレス)とは、複
数のフラッシュメモリに渡って割り当てられた連続した
物理アドレスのことである。
When a plurality of flash memories are used as the data area, each device has a status register of the flash memory separately. For this reason,
The address at which the flash memory control unit 1004 issues an instruction command (a data write command, a block erase command, a status register read command, an array read command, a suspend command, a resume command, etc.) to the flash memory unit 1005 is
It is issued not to the start address or the end address of the partition, but to the place (address) where data is actually written or the place where data is erased. Thereby, the state of the device can be accurately recognized. The location (address) referred to here is a continuous physical address allocated over a plurality of flash memories.

【0190】(実施形態3)本実施形態では、フラッシ
ュメモリ部が複数のデバイスにより構成されている例に
ついて説明する。
(Embodiment 3) In this embodiment, an example in which the flash memory unit is constituted by a plurality of devices will be described.

【0191】図34(a)は、16個の物理消去ブロッ
クを有する1個のデバイス(フラッシュメモリ)によっ
て構成されるフラッシュメモリ部1005の構成を示
し、さらに、フラッシュメモリ部1005を、10個の
物理消去ブロックで構成されるパーティション0(論理
ブロック番号0_0〜0_9)と、6個の物理消去ブロ
ックで構成されるパーティション1(論理ブロック番号
1_0〜1_5)に2分割した場合を示している。
FIG. 34A shows the configuration of a flash memory unit 1005 composed of one device (flash memory) having 16 physical erase blocks. This figure shows a case where the partition is divided into two: a partition 0 (logical block numbers 0_0 to 0_9) composed of physical erase blocks and a partition 1 (logical block numbers 1_0 to 1_5) composed of six physical erase blocks.

【0192】図34(b)は、8個の物理消去ブロック
を有する2個のデバイス(フラッシュメモリ)によって
構成されるフラッシュメモリ部1005の構成を示し、
さらに、フラッシュメモリ部1005を、10個の物理
消去ブロックで構成されるパーティション0(論理ブロ
ック番号0_0〜0_9)と、6個の物理消去ブロック
で構成されるパーティション1(論理ブロック番号1_
0〜1_5)に2分割した場合を示している。この場
合、パーティション0は2個のデバイスに渡って存在す
る。但し、この図34(b)において、2個のデバイス
の物理アドレスは連続している。また、図34(a)の
パーティション0と図34(b)のパーティション0に
属する物理消去ブロックは同じサイズであり、図34
(a)のパーティション1と図34(b)のパーティシ
ョン1に属する物理消去ブロックは同じサイズである。
FIG. 34B shows the configuration of a flash memory unit 1005 composed of two devices (flash memories) each having eight physical erase blocks.
Further, the flash memory unit 1005 includes a partition 0 (logical block numbers 0_0 to 0_9) composed of 10 physical erase blocks and a partition 1 (logical block number 1_) composed of 6 physical erase blocks.
0 to 1_5) is shown. In this case, partition 0 exists over two devices. However, in FIG. 34B, the physical addresses of the two devices are continuous. The physical erase blocks belonging to the partition 0 in FIG. 34A and the partition 0 in FIG. 34B have the same size.
The physical erase block belonging to the partition 1 of FIG. 34A and the partition 1 of FIG. 34B has the same size.

【0193】データ管理システム制御部1002は、デ
ータ領域(フラッシュメモリ部1005)をパーティシ
ョン単位で管理しているので、フラッシュメモリ部10
05が図34(a)のように1個のデバイスで構成され
ていても、図34(b)のように2個のデバイスで構成
されていても、図35に示すように全く同じパーティシ
ョン情報テーブルが生成され、同様に扱うことが可能と
なる。管理テーブルについてもパーティション情報テー
ブルと同じく、同様に扱うことが可能である。
Since the data management system control unit 1002 manages the data area (flash memory unit 1005) in units of partitions, the flash memory unit 10
Regardless of whether the device 05 is composed of one device as shown in FIG. 34A or two devices as shown in FIG. 34B, the same partition information as shown in FIG. A table is generated and can be handled similarly. The management table can be handled in the same manner as the partition information table.

【0194】これに対して、本発明のようなパーティシ
ョンを用いずに、物理的なデバイス単位でデータ管理を
行った場合には、図34(b)のようにフラッシュメモ
リ部1005が8個の物理消去ブロックを有する2個の
デバイスによって構成される場合、9個以上の物理消去
ブロックを有するデータ管理領域の設定は不可能であ
る。
On the other hand, when data management is performed in units of physical devices without using partitions as in the present invention, eight flash memory units 1005 are provided as shown in FIG. In the case of being configured by two devices having physical erase blocks, it is impossible to set a data management area having nine or more physical erase blocks.

【0195】図36〜図40に、2個のデバイスによっ
て構成したフラッシュメモリ部1005の構成例を示
す。なお、2個のデバイスによってフラッシュメモリ部
を構成した図36〜図40の構成と、図36〜図40に
示した2個のデバイスを各々連結したものと同一のブロ
ック構成を有する1個のデバイスからなるフラッシュメ
モリ部においては、パーティション構成が同一であれ
ば、図35と同様のパーティション情報テーブルが生成
され、データ管理システム制御部1002は、両者を全
く同様に扱うことができる。
FIGS. 36 to 40 show configuration examples of the flash memory unit 1005 composed of two devices. 36 to 40 in which the flash memory unit is configured by two devices, and one device having the same block configuration as that in which the two devices illustrated in FIGS. 36 to 40 are respectively connected. If the partition configuration is the same, a partition information table similar to that shown in FIG. 35 is generated, and the data management system control unit 1002 can handle both in exactly the same way.

【0196】図36では、データ領域が、サイズが64
キロバイトである物理消去ブロックを複数個含むデバイ
ス0(物理消去ブロック番号0_0〜0_m)、および
デバイス1(物理消去ブロック番号1_0〜1_n)に
よって構成されている。デバイス0における物理消去ブ
ロックの数=m+1個、デバイス1における物理消去ブ
ロックの数=n+1個であり、各々2個以上の物理消去
ブロックを含むパーティション0、パーティション1お
よびパーティション2に3分割されている。パーティシ
ョン1は、デバイス0およびデバイス1の双方の物理消
去ブロックを含んだ構成となっている。
In FIG. 36, the data area has a size of 64
It is composed of a device 0 (physical erase block numbers 0_0 to 0_m) including a plurality of kilobytes of physical erase blocks and a device 1 (physical erase block numbers 1_0 to 1_n). The number of physical erase blocks in the device 0 is m + 1, and the number of physical erase blocks in the device 1 is n + 1. The partition is divided into three partitions 0, 1 and 2 each including two or more physical erase blocks. . The partition 1 has a configuration including physical erase blocks of both the device 0 and the device 1.

【0197】図37では、データ領域が、サイズが8キ
ロバイトおよび64キロバイトである物理消去ブロック
を各々複数個含むデバイス0(8キロバイトの物理消去
ブロック番号0_0〜0_l、64キロバイトの物理消
去ブロック番号0_l+1〜0_m)、およびデバイス
1(8キロバイトの物理消去ブロック番号1_0〜1_
n、64キロバイトの物理消去ブロック番号1_n+1
〜1_o)によって構成されている。デバイス0におけ
る物理消去ブロックの数=m+1個であり、このうち、
(1)サイズが8キロバイトである物理消去ブロックの
数はl+1個、(2)サイズが64キロバイトである物
理消去ブロックの数はm−l個である。また、デバイス
1における物理消去ブロックの数=o+1個であり、こ
のうち、(3)サイズが8キロバイトである物理消去ブ
ロックの数はn+1個、(4)サイズが64キロバイト
である物理消去ブロックの数はo−n個である。上記
(1)〜(4)は、各々パーティション0からパーティ
ション3に対応している。
In FIG. 37, the data area includes a plurality of devices 0 each including a plurality of physical erase blocks having a size of 8 kilobytes and 64 kilobytes (physical erase block numbers 0_0 to 0_1 of 8 kilobytes, physical erase block numbers 0_l + 1 of 64 kilobytes). ~ 0_m) and device 1 (8 KB physical erase block number 1_0 ~ 1_)
n, 64 KB physical erase block number 1_n + 1
To 1_o). The number of physical erase blocks in device 0 = m + 1, of which
(1) The number of physical erase blocks having a size of 8 kilobytes is l + 1, and (2) the number of physical erase blocks having a size of 64 kilobytes is ml. Also, the number of physical erase blocks in the device 1 is o + 1, among which (3) the number of physical erase blocks of 8 kilobytes in size is n + 1, and (4) the number of physical erase blocks of 64 kilobytes in size. The number is on. The above (1) to (4) correspond to partitions 0 to 3 respectively.

【0198】図38では、データ領域が、サイズが8キ
ロバイトおよび64キロバイトである物理消去ブロック
を各々複数個含むデバイス0(64キロバイトの物理消
去ブロック番号0_0〜0_l、8キロバイトの物理消
去ブロック番号0_l+1〜0_m)、およびデバイス
1(64キロバイトの物理消去ブロック番号1_0〜1
_n、8キロバイトの物理消去ブロック番号1_n+1
〜1_o)によって構成されている。図37に示した構
成との相違点は、パーティション0からパーティション
3に対応する物理消去ブロックにおいて、サイズ毎の構
成順序が入れ替わっていることである。
In FIG. 38, the device 0 includes a plurality of physical erasure blocks each having a size of 8 Kbytes and 64 Kbytes, respectively. Device 0 (64 Kbyte physical erasure block numbers 0_0 to 0_1, 8 Kbyte physical erasure block numbers 0_l + 1) To 0_m) and device 1 (64 KB physical erase block number 1_0 to 1)
_N, 8 KB physical erase block number 1_n + 1
To 1_o). The difference from the configuration shown in FIG. 37 is that, in the physical erase blocks corresponding to partitions 0 to 3, the configuration order for each size is changed.

【0199】図39では、データ領域が、サイズが8キ
ロバイトおよび64キロバイトである物理消去ブロック
を各々複数個含むデバイス0(8キロバイトの物理消去
ブロック番号0_0〜0_l、64キロバイトの物理消
去ブロック番号0_l+1〜0_m)、およびデバイス
1(64キロバイトの物理消去ブロック番号1_0〜1
_n、8キロバイトの物理消去ブロック番号1_n+1
〜1_o)によって構成されている。図37に示した構
成との相違点は、デバイス1の物理消去ブロックにおい
て、サイズ毎の構成順序が入れ替わっていることと、パ
ーティション1がデバイス0とデバイス1の双方のサイ
ズが64キロバイトである物理消去ブロックを含んでい
ることである。
In FIG. 39, the data area includes a plurality of devices 0 each including a plurality of physical erase blocks having a size of 8 KB and 64 KB (8 KB physical erase block numbers 0_0 to 0_1, 64 KB physical erase block numbers 0_l + 1). To 0_m) and device 1 (64 KB physical erase block number 1_0 to 1)
_N, 8 KB physical erase block number 1_n + 1
To 1_o). 37 differs from the configuration shown in FIG. 37 in that the configuration order of each size is changed in the physical erase block of the device 1 and that the physical size of the partition 1 is 64 kilobytes for both the device 0 and the device 1. That is, an erasure block is included.

【0200】図40では、データ領域が、サイズが8キ
ロバイトおよび64キロバイトである物理消去ブロック
を各々複数個含むデバイス0(64キロバイトの物理消
去ブロック番号0_0〜0_l、8キロバイトの物理消
去ブロック番号0_l+1〜0_m)、およびデバイス
1(8キロバイトの物理消去ブロック番号1_0〜1_
n、64キロバイトの物理消去ブロック番号1_n+1
〜1_o)によって構成されている。図37に示した構
成との相違点は、デバイス0の物理消去ブロックにおい
て、サイズ毎の構成順序が入れ替わっていることと、パ
ーティション1がデバイス0とデバイス1の双方のサイ
ズが64キロバイトである物理消去ブロックを含んでい
ることである。
In FIG. 40, the device 0 includes a plurality of physical erase blocks each having a size of 8 Kbytes and 64 Kbytes, respectively. Device 0 (64 Kbyte physical erase block numbers 0_0 to 0_1, 8 Kbyte physical erase block numbers 0_l + 1) ~ 0_m) and device 1 (8 KB physical erase block number 1_0 ~ 1_)
n, 64 KB physical erase block number 1_n + 1
To 1_o). 37 is different from the configuration shown in FIG. 37 in that the configuration order of each size is changed in the physical erase block of device 0, and the physical size of partition 1 is 64 kilobytes for both device 0 and device 1. That is, an erasure block is included.

【0201】なお、本実施形態では2個のデバイスによ
ってデータ領域を構成した例を示したが、3個以上のデ
バイスを用いた場合も、同様のデータ領域を設定するこ
とが可能である。
Although the present embodiment has shown an example in which the data area is composed of two devices, the same data area can be set when three or more devices are used.

【0202】上述したように複数個のデバイスを用いて
データ領域を設定した場合、パーティションによる管理
を行うことにより、デバイス構成の変更(例えば16M
bitフラッシュメモリ1個の構成から8Mbitフラ
ッシュメモリ2個の構成に変更する)等により、フラッ
シュメモリ部の変化(サイズの変化)が生じても、柔軟
に対応することが可能である。
When the data area is set by using a plurality of devices as described above, the device configuration is changed (for example, 16M
Even if a change (a change in size) occurs in the flash memory unit due to, for example, changing the configuration of one bit flash memory to the configuration of two 8 Mbit flash memories, it is possible to flexibly respond.

【0203】なお、フラッシュメモリ部1005に複数
のデバイスを使用した場合でも、データ管理システム制
御部1002は、フラッシュメモリ部に1個のデバイス
を使用した場合と全く同様に、アプリケーションプログ
ラムまたはオペレーティングシステム1006とデータ
をやり取りすることが可能である。
Even when a plurality of devices are used for the flash memory unit 1005, the data management system control unit 1002 determines whether the application program or the operating system 1006 is the same as when one device is used for the flash memory unit. It is possible to exchange data with.

【0204】しかしながら、データ領域として複数のデ
バイスを用いた場合には、フラッシュメモリ制御部10
04がフラッシュメモリ部に命令コマンドを発行すると
きに指定される、フラッシュメモリ部の物理アドレスに
ついて考慮する必要がある。
However, when a plurality of devices are used as the data area, the flash memory control unit 10
It is necessary to consider the physical address of the flash memory unit, which is specified when the command 04 issues an instruction command to the flash memory unit.

【0205】フラッシュメモリ制御部1004がフラッ
シュメモリ部1004に対して命令コマンドを発行する
ときに、デバイス内の任意の物理アドレスが指定可能で
あるコマンド(ステータスレジスタ読み出しコマンド、
ステータスレジスタクリアコマンド、中断/再開コマン
ド等)の場合、1個のデバイスを使用した場合にはパー
ティションに属する全物理ブロックが同一のデバイス内
に存在するので、指定する物理アドレスはパーティショ
ン内の任意の物理アドレスを指定することができる。し
かし、複数個のデバイスを使用した場合には、パーティ
ションに属する物理ブロックが複数のデバイスに渡って
存在している可能性があるので、命令コマンドを発行す
るときには、同じパーティション内でも、コマンド実行
先の物理アドレスが属するデバイスを指定する必要があ
る。そこで、本実施形態では、フラッシュメモリ制御部
1004がフラッシュメモリ部1005へ命令コマンド
を発行するときには、必ず、アプリケーションプログラ
ムまたはオペレーションシステム等のソフトウェア10
06から与えられたデータIDとパーティション番号か
ら算出される物理アドレスを指定するようにする。これ
により、フラッシュメモリ部1005へ正しく命令コマ
ンドを発行することができ、フラッシュメモリ部100
5が複数デバイスからなる構成にも適用可能となる。
When the flash memory control unit 1004 issues an instruction command to the flash memory unit 1004, a command that can specify an arbitrary physical address in the device (status register read command,
In the case of a status register clear command, a suspend / resume command, etc.), if one device is used, all physical blocks belonging to the partition exist in the same device, so the specified physical address is an arbitrary one in the partition. You can specify a physical address. However, when a plurality of devices are used, there is a possibility that the physical block belonging to the partition exists over a plurality of devices. Device to which the physical address belongs must be specified. Therefore, in the present embodiment, when the flash memory control unit 1004 issues an instruction command to the flash memory unit 1005, the flash memory control unit 1004 always executes software 10 such as an application program or an operation system.
The physical address calculated from the data ID and the partition number given from 06 is designated. As a result, an instruction command can be correctly issued to the flash memory unit 1005,
5 can be applied to a configuration including a plurality of devices.

【0206】本発明において、フラッシュメモリ部10
05は、物理消去ブロックが全て等しい(均等な)サイ
ズ(例えば64キロバイト)であってもよく、また、ブ
ートブロック構成(8キロバイトおよび64キロバイト
が混在する)であってももよい。さらに、データ領域を
構成するデバイスは、複数バンク構成(例えばシャープ
製 LH28F320BMシリーズや、インテル製 2
8F320Dシリーズ)であってもよい。
In the present invention, the flash memory unit 10
05 may have the same (uniform) size (for example, 64 KB) for all the physical erase blocks, or may have a boot block configuration (8 KB and 64 KB are mixed). Further, the device constituting the data area has a multi-bank configuration (for example, LH28F320BM series manufactured by Sharp, 2
8F320D series).

【0207】さらに、データ管理システムメモリ部10
03には、電池によりバックアップしたSRAMや、強
誘電体メモリを用いてもよい。強誘電体メモリを用いた
場合には、バックアップ用電池を削除することが可能で
ある。また、データ管理システムメモリ部1003に、
強誘電体メモリ等の不揮発性RAMを用いた場合には、
図6におけるブロックコントロールセクタ(512バイ
ト)を、不揮発性RAM上にのみ設定することができる
ので、フラッシュメモリ上からブロックコントロールセ
クタ(512バイト)削除することが可能となる。
Further, the data management system memory unit 10
For 03, an SRAM backed up by a battery or a ferroelectric memory may be used. When a ferroelectric memory is used, the backup battery can be omitted. Also, the data management system memory unit 1003 stores
When a nonvolatile RAM such as a ferroelectric memory is used,
Since the block control sector (512 bytes) in FIG. 6 can be set only on the nonvolatile RAM, the block control sector (512 bytes) can be deleted from the flash memory.

【0208】[0208]

【発明の効果】以上詳述したように、本発明によれば、
以下のような顕著な効果を奏する。
As described in detail above, according to the present invention,
The following remarkable effects are obtained.

【0209】複数の物理消去ブロックを有する不揮発性
半導体メモリを用いたデータ管理装置およびデータ管理
方法において、消去ブロックサイズが全て等しい場合、
または異なるサイズを含んでいる場合でも、少なくとも
異なるセクタサイズ毎に、データ管理システムの論理的
な管理単位(パーティション)を設定し、その管理単位
(パーティション)に対する管理情報をパーティション
毎に管理することにより、セクタサイズをデータ領域毎
に任意に設定可能となる。よって、格納されるデータサ
イズに適したセクタサイズを割り当てて、データ領域内
の各セクタの未使用領域を少なくすることが可能であ
り、データの格納効率を向上させることができる。
In a data management device and a data management method using a nonvolatile semiconductor memory having a plurality of physical erase blocks, when all erase block sizes are equal,
Alternatively, even if the data includes different sizes, a logical management unit (partition) of the data management system is set at least for each different sector size, and management information for the management unit (partition) is managed for each partition. , The sector size can be arbitrarily set for each data area. Therefore, it is possible to reduce the unused area of each sector in the data area by allocating a sector size suitable for the data size to be stored, and to improve the data storage efficiency.

【0210】データ管理システムの再構築処理用に予め
確保される物理消去ブロック(予備の物理消去ブロッ
ク)を、データ管理システムの論理的な管理単位(パー
ティション)毎に、少なくとも1個設けると、各パーテ
ィションに属する物理消去ブロックが一意に決まるた
め、システム開発時のデバッグ作業が容易になる。
If at least one physical erase block (spare physical erase block) reserved in advance for the data management system rebuilding process is provided for each logical management unit (partition) of the data management system, Since the physical erase block belonging to the partition is uniquely determined, debugging work during system development becomes easy.

【0211】データ管理システムの再構築処理用に予め
確保される物理消去ブロック(予備の物理消去ブロッ
ク)を、データ管理システムの論理的な管理単位(パー
ティション)で共用して用いることができるため、パー
ティション数を多く設定した場合に、予備の物理消去ブ
ロック数を節約して、実際にデータを格納する物理消去
ブロックの数を多くすることが可能となる。
The physical erasure block (spare physical erasure block) previously reserved for the data management system rebuilding process can be shared and used as a logical management unit (partition) of the data management system. When the number of partitions is set to be large, the number of spare physical erase blocks can be saved, and the number of physical erase blocks for actually storing data can be increased.

【0212】パーティションに対する管理情報を揮発性
または不揮発性の高速アクセス可能な記憶素子(RAM
等)上に記憶させることにより、高速に管理情報を検索
および更新することが可能となる。
A volatile or non-volatile high-speed storage element (RAM) can store management information for a partition.
Etc.), management information can be searched and updated at high speed.

【0213】不揮発性半導体記憶部に対して発行するコ
マンド(ステータスレジスタ読み出しコマンド、アレイ
読み出しコマンド、サスペンドコマンド、レジュームコ
マンド等)の対象アドレスは、実際にデータを書き込
み、またはデータを消去する場所(アドレス)であるた
め、複数の不揮発性半導体部(複数の不揮発性半導体記
憶デバイス)を有していたり、1個の不揮発性半導体記
憶部内に複数のバンクを有する構成とすることが可能と
なる。このように、複数のバンク構造を有する不揮発性
半導体記憶部を用いることが可能であるため、データ領
域を設定する自由度を向上させることが可能となる。ま
た、複数の不揮発性半導体記憶部を用いた構成が可能で
あるため、データ領域を容易に拡張することが可能とな
る。
The target address of a command (status register read command, array read command, suspend command, resume command, etc.) issued to the non-volatile semiconductor storage unit is the location (address) where data is actually written or data is erased. ), It is possible to have a configuration having a plurality of nonvolatile semiconductor sections (a plurality of nonvolatile semiconductor storage devices) or a plurality of banks in one nonvolatile semiconductor storage section. As described above, it is possible to use a nonvolatile semiconductor storage unit having a plurality of bank structures, so that the degree of freedom in setting a data area can be improved. Further, since a configuration using a plurality of nonvolatile semiconductor storage units is possible, the data area can be easily expanded.

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

【図1】本発明に係るセクタサイズによるパーティショ
ンの例を示す図である。
FIG. 1 is a diagram showing an example of a partition based on a sector size according to the present invention.

【図2】本発明に係る物理消去ブロックのサイズによる
パーティションの例を示す図である。
FIG. 2 is a diagram showing an example of a partition according to the size of a physical erase block according to the present invention.

【図3】本発明に係るセクタサイズおよび物理消去ブロ
ックのサイズが異なるパーティションの例を示す図であ
る。
FIG. 3 is a diagram showing an example of partitions having different sector sizes and physical erase block sizes according to the present invention.

【図4】本発明の一実施形態であるデータ管理装置の構
成を示す図である。
FIG. 4 is a diagram showing a configuration of a data management device according to an embodiment of the present invention.

【図5】実施形態1のデータ管理装置において、パーテ
ィション毎に予備物理消去ブロックを設定する例を説明
するための図である。
FIG. 5 is a diagram for explaining an example in which a spare physical erase block is set for each partition in the data management device of the first embodiment.

【図6】実施形態1のデータ管理装置におけるフラッシ
ュメモリ部に格納されているデータの構成を示す図であ
る。
FIG. 6 is a diagram illustrating a configuration of data stored in a flash memory unit in the data management device according to the first embodiment.

【図7】実施形態1のデータ管理装置におけるデータ管
理システムメモリ部に格納されている、各パーティショ
ン情報テーブルの構成を示す図である。
FIG. 7 is a diagram illustrating a configuration of each partition information table stored in a data management system memory unit in the data management device of the first embodiment.

【図8】実施形態1のデータ管理装置におけるデータ管
理システムメモリ部に格納されている、パーティション
毎のデータを管理する管理テーブルの構成を示す図であ
る。
FIG. 8 is a diagram showing a configuration of a management table for managing data for each partition, stored in a data management system memory unit in the data management device of the first embodiment.

【図9】実施形態1のデータ管理装置におけるデータ管
理システムメモリ部に格納されている、パーティション
毎の物理消去ブロックを管理する管理テーブルの構成を
示す図である。
FIG. 9 is a diagram showing a configuration of a management table stored in a data management system memory unit in the data management device of the first embodiment and managing a physical erase block for each partition.

【図10】実施形態1のデータ管理装置におけるデータ
管理システムメモリ部に格納されている、データ領域の
セクタ状態を管理する管理テーブルの構成を示す図であ
る。
FIG. 10 is a diagram showing a configuration of a management table stored in a data management system memory unit in the data management device of the first embodiment and managing a sector state of a data area.

【図11】実施形態1のデータ管理装置におけるデータ
管理システムメモリ部に格納されている、データ領域の
物理消去ブロックをセクタ状態に応じて整理した管理テ
ーブルの構成を示す図である。
FIG. 11 is a diagram illustrating a configuration of a management table stored in a data management system memory unit in the data management device according to the first embodiment, in which physical erase blocks in a data area are arranged according to a sector state.

【図12】実施形態1におけるデータ読み出し処理の例
を説明するためのフローチャートである。
FIG. 12 is a flowchart illustrating an example of a data read process according to the first embodiment.

【図13】(a)および(b)は、実施形態1のデータ
管理装置におけるデータ書き込み時の、図8の管理テー
ブルの変化の例を示す図である。
FIGS. 13A and 13B are diagrams illustrating an example of a change in the management table of FIG. 8 when writing data in the data management apparatus according to the first embodiment.

【図14】実施形態1のデータ管理装置におけるデータ
書き込み時の、図9の管理テーブルの例を示す図であ
る。
FIG. 14 is a diagram showing an example of the management table of FIG. 9 when writing data in the data management device of the first embodiment.

【図15】(a)および(b)は、実施形態1のデータ
管理装置におけるデータ書き込み時の、図10の管理テ
ーブルの変化の例を示す図である。
FIGS. 15A and 15B are diagrams illustrating an example of a change in the management table of FIG. 10 when data is written in the data management device of the first embodiment.

【図16】(a)および(b)は、実施形態1のデータ
管理装置におけるデータ書き込み時の、図11の管理テ
ーブルの変化の例を示す図である。
FIGS. 16A and 16B are diagrams illustrating an example of a change in the management table in FIG. 11 when data is written in the data management device according to the first embodiment.

【図17】実施形態1におけるデータ書き込み処理の例
を説明するためのフローチャートである。
FIG. 17 is a flowchart illustrating an example of a data write process according to the first embodiment.

【図18】実施形態1のデータ管理装置におけるデータ
削除時の、図8の管理テーブルの例を示す図である。
FIG. 18 is a diagram illustrating an example of the management table in FIG. 8 when data is deleted in the data management device of the first embodiment.

【図19】実施形態1のデータ管理装置におけるデータ
削除時の、図9の管理テーブルの例を示す図である。
FIG. 19 is a diagram illustrating an example of the management table in FIG. 9 when data is deleted in the data management device of the first embodiment.

【図20】(a)および(b)は、実施形態1のデータ
管理装置におけるデータ削除時の、図10の管理テーブ
ルの変化の例を示す図である。
FIGS. 20A and 20B are diagrams illustrating an example of a change in the management table in FIG. 10 when data is deleted in the data management device according to the first embodiment.

【図21】(a)および(b)は、実施形態1のデータ
管理装置におけるデータ削除時の、図11の管理テーブ
ルの変化の例を示す図である。
FIGS. 21A and 21B are diagrams illustrating an example of a change in the management table of FIG. 11 when data is deleted in the data management device according to the first embodiment.

【図22】実施形態1におけるデータ削除処理の例を説
明するためのフローチャートである。
FIG. 22 is a flowchart illustrating an example of a data deletion process according to the first embodiment.

【図23】(a)および(b)は、実施形態1のデータ
管理装置における再構築時の、図9の管理テーブルの変
化の例を示す図である。
FIGS. 23A and 23B are diagrams illustrating an example of a change in the management table of FIG. 9 at the time of reconstruction in the data management device of the first embodiment.

【図24】(a)および(b)は、実施形態1のデータ
管理装置における再構築時の、図10の管理テーブルの
変化の例を示す図である。
FIGS. 24A and 24B are diagrams illustrating an example of a change in the management table of FIG. 10 at the time of rebuilding in the data management device of the first embodiment.

【図25】(a)および(b)は、実施形態1のデータ
管理装置における再構築時の、図11の管理テーブルの
変化の例を示す図である。
FIGS. 25A and 25B are diagrams illustrating an example of a change in the management table of FIG. 11 at the time of reconstruction in the data management device of the first embodiment.

【図26】実施形態1における再構築処理の例を説明す
るためのフローチャートである。
FIG. 26 is a flowchart illustrating an example of a reconstruction process according to the first embodiment.

【図27】実施形態2のデータ管理装置において、複数
のパーティションにおいて予備物理消去ブロックを共用
する場合に、共用するパーティションが物理的に非連続
である例を説明するための図である。
FIG. 27 is a diagram for explaining an example in which a shared partition is physically discontinuous when a plurality of partitions share a spare physical erase block in the data management device of the second embodiment.

【図28】実施形態2のデータ管理装置において、複数
のパーティションにおいて予備物理消去ブロックを共用
する場合に、共用するパーティションが物理的に連続し
ている例を説明するための図である。
FIG. 28 is a diagram for explaining an example in which a shared physical partition is physically continuous when a plurality of partitions share a spare physical erase block in the data management device of the second embodiment.

【図29】(a)〜(c)は、実施形態2の図27の例
において、再構築を繰り返した場合のブロックの論理番
号の移り変わりを説明するための図である。
FIGS. 29 (a) to (c) are diagrams for explaining changes in logical numbers of blocks when restructuring is repeated in the example of FIG. 27 of the second embodiment.

【図30】実施形態2の図27の例において、データ管
理システムメモリ部に格納されている、各パーティショ
ン情報テーブルの構成を示す図である。
30 is a diagram illustrating a configuration of each partition information table stored in a data management system memory unit in the example of FIG. 27 of the second embodiment.

【図31】実施形態2の図28の例において、データ管
理システムメモリ部に格納されている、各パーティショ
ン情報テーブルの構成を示す図である。
31 is a diagram showing a configuration of each partition information table stored in a data management system memory unit in the example of FIG. 28 of the second embodiment.

【図32】(a)および(b)は、実施形態2の図27
の例において、データ管理システムメモリ部に格納され
ている、パーティション毎のデータを管理する管理テー
ブルの構成を示す図である。
32 (a) and (b) show FIG. 27 of the second embodiment.
FIG. 6 is a diagram showing a configuration of a management table for managing data for each partition stored in a data management system memory unit in the example of FIG.

【図33】(a)および(b)は、実施形態2の図28
の例において、データ管理システムメモリ部に格納され
ている、パーティション毎のデータを管理する管理テー
ブルの構成を示す図である。
33 (a) and (b) show FIG. 28 of the second embodiment.
FIG. 6 is a diagram showing a configuration of a management table for managing data for each partition stored in a data management system memory unit in the example of FIG.

【図34】(a)は実施形態3のデータ管理装置におい
て、フラッシュメモリ部を1個のデバイスによって構成
した例を説明するための図であり、(b)はフラッシュ
メモリ部を複数個のデバイスによって構成した例を説明
するための図である。
34A is a diagram for explaining an example in which a flash memory unit is configured by one device in the data management device according to the third embodiment, and FIG. 34B is a diagram illustrating the flash memory unit including a plurality of devices. It is a figure for explaining the example constituted by.

【図35】実施形態3のデータ管理装置において、デー
タ管理システムメモリ部に格納されている、パーティシ
ョン毎のデータを管理する管理テーブルの構成を示す図
である。
FIG. 35 is a diagram showing a configuration of a management table for managing data for each partition, stored in a data management system memory unit, in the data management device of the third embodiment.

【図36】実施形態3のデータ管理装置において、物理
消去ブロックのサイズが等しい複数のデバイスを用いて
パーティションを構成する例を説明するための図であ
る。
FIG. 36 is a diagram illustrating an example in which a partition is configured using a plurality of devices having the same physical erase block size in the data management device according to the third embodiment.

【図37】実施形態3のデータ管理装置において、物理
消去ブロックのサイズが異なる複数のデバイスを用いて
パーティションを構成する例を説明するための図であ
る。
FIG. 37 is a diagram for explaining an example in which a partition is configured using a plurality of devices having different physical erase block sizes in the data management device of the third embodiment.

【図38】実施形態3のデータ管理装置において、物理
消去ブロックのサイズが異なる複数のデバイスを用いて
パーティションを構成する他の例を説明するための図で
ある。
FIG. 38 is a diagram for explaining another example of configuring a partition using a plurality of devices having different physical erase block sizes in the data management device of the third embodiment.

【図39】実施形態3のデータ管理装置において、物理
消去ブロックのサイズが異なる複数のデバイスを用いて
パーティションを構成する他の例を説明するための図で
ある。
FIG. 39 is a diagram for explaining another example of configuring a partition using a plurality of devices having different physical erase block sizes in the data management device of the third embodiment.

【図40】実施形態3のデータ管理装置において、物理
消去ブロックのサイズが異なる複数のデバイスを用いて
パーティションを構成する他の例を説明するための図で
ある。
FIG. 40 is a diagram for explaining another example of configuring a partition using a plurality of devices having different physical erase block sizes in the data management device of the third embodiment.

【図41】従来技術における物理消去ブロックと論理セ
クタを説明するための図である。
FIG. 41 is a diagram for explaining a physical erase block and a logical sector in the related art.

【図42】従来技術における論理セクタの構成を説明す
るための図である。
FIG. 42 is a diagram for explaining a configuration of a logical sector in the related art.

【図43】従来技術におけるデータの更新または削除を
説明するための図である。
FIG. 43 is a diagram for explaining data update or deletion in the related art.

【図44】(a)および(b)は、従来技術におけるデ
ータの再構築を説明するための図である。
FIGS. 44A and 44B are diagrams for explaining data reconstruction in the related art.

【図45】従来のファイルシステムの構成を示す図であ
る。
FIG. 45 is a diagram showing a configuration of a conventional file system.

【図46】図45のファイルシステムにおけるフラッシ
ュメモリ部に格納されているデータの構成を示す図であ
る。
FIG. 46 is a diagram showing a configuration of data stored in a flash memory unit in the file system of FIG. 45.

【図47】図45のファイルシステムにおけるファイル
システムメモリ部に格納されている各消去ブロックに関
するデータの構成を示す図である。
FIG. 47 is a diagram showing a data structure of each erase block stored in a file system memory unit in the file system of FIG. 45.

【図48】図45のファイルシステムにおけるファイル
システムメモリ部に格納されている各セクタに関するデ
ータの構成を示す図である。
FIG. 48 is a diagram showing a data structure of each sector stored in a file system memory unit in the file system of FIG. 45.

【図49】図45のファイルシステムにおけるファイル
システムメモリ部に格納されている各消去ブロック毎
に、各セクタの数を各々のセクタ状態に応じて整理した
データの構成を示す図である。
FIG. 49 is a diagram showing a data structure in which the number of sectors is arranged according to each sector state for each erase block stored in the file system memory unit in the file system of FIG. 45.

【図50】従来技術におけるデータ読み出し処理を説明
するためのフローチャートである。
FIG. 50 is a flowchart for explaining a data read process in the conventional technique.

【図51】従来技術におけるデータ書き込み処理を説明
するためのフローチャートである。
FIG. 51 is a flowchart illustrating a data writing process according to the related art.

【図52】従来技術におけるデータ書き込み処理を説明
するためのフローチャートである。
FIG. 52 is a flowchart illustrating a data write process according to the related art.

【図53】従来技術におけるデータ書き込み処理を説明
するためのフローチャートである。
FIG. 53 is a flowchart illustrating a data writing process according to the related art.

【図54】従来技術における再構築処理を説明するため
のフローチャートである。
FIG. 54 is a flowchart illustrating a reconstruction process according to the related art.

【図55】従来技術における再構築処理を説明するため
のフローチャートである。
FIG. 55 is a flowchart illustrating a reconstruction process according to the related art.

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

1001 データ管理システム 1002 データ管理システム制御部 1003 データ管理システムメモリ部 1004 フラッシュメモリ制御部 1005 フラッシュメモリ部 1006 アプリケーションプログラムまたはオペレー
ティングシステム等のソフトウェア 1 フラッシュメモリファイルシステム 2 ファイルシステム制御部 3 ファイルシステムメモリ部 4 フラッシュメモリ制御部 5 フラッシュメモリ部 6 アプリケーションプログラムまたはオペレーティン
グシステム等のソフトウェア 10 ブロック情報表 11 セクタ情報表 12 セクタ情報表 51 物理消去ブロック 52 物理セクタ 52a ブロックコントロールセクタ
1001 Data management system 1002 Data management system control unit 1003 Data management system memory unit 1004 Flash memory control unit 1005 Flash memory unit 1006 Software such as application program or operating system 1 Flash memory file system 2 File system control unit 3 File system memory unit 4 Flash memory control unit 5 Flash memory unit 6 Software such as application program or operating system 10 Block information table 11 Sector information table 12 Sector information table 51 Physical erase block 52 Physical sector 52a Block control sector

───────────────────────────────────────────────────── フロントページの続き (72)発明者 岡本 一宏 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内 (72)発明者 福本 克巳 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内 Fターム(参考) 5B065 BA05 ZA15 5B082 EA01 JA06  ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Kazuhiro Okamoto 22-22 Nagaikecho, Abeno-ku, Osaka-shi, Osaka Inside Sharp Corporation (72) Inventor Katsumi Fukumoto 22-22 Nagaikecho, Abeno-ku, Osaka-shi, Osaka F-term (for reference) 5B065 BA05 ZA15 5B082 EA01 JA06

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】 複数のブロックからなり、該ブロック単
位でデータが消去される不揮発性半導体記憶部と、 該不揮発性半導体記憶部の動作を制御する記憶制御部
と、 該不揮発性半導体記憶部に格納されるデータを管理する
データ管理システム制御部と、 該データ管理システム制御部から参照されるデータ管理
情報を格納するデータ管理システムメモリー部とからな
るデータ管理システム、 および該データ管理システムに対してデータ処理を依頼
するソフトウェアから構成されるデータ管理装置におい
て、 前記不揮発性半導体記憶部は、全て同一サイズのブロッ
クから構成され、 該データ管理システム制御部は、1または複数のブロッ
クを含む記憶領域と該ブロックの属性情報と該ブロック
の状態情報からなる論理的な管理単位であるパーティシ
ョンを用いてデータを管理し、さらに、該パーティショ
ンのサイズを可変とする機能を有するデータ管理装置。
A non-volatile semiconductor storage unit including a plurality of blocks from which data is erased in units of the blocks; a storage control unit that controls an operation of the non-volatile semiconductor storage unit; A data management system comprising: a data management system control unit for managing data to be stored; a data management system memory unit for storing data management information referred to by the data management system control unit; In a data management device including software for requesting data processing, the nonvolatile semiconductor storage unit is configured by blocks of the same size, and the data management system control unit includes a storage area including one or a plurality of blocks. A partition which is a logical management unit consisting of attribute information of the block and status information of the block A data management device having a function of managing data by using a partition and making the size of the partition variable.
【請求項2】 複数のブロックからなり、該ブロック単
位でデータが消去される不揮発性半導体記憶部と、 該不揮発性半導体記憶部の動作を制御する記憶制御部
と、 該不揮発性半導体記憶部に格納されるデータを管理する
データ管理システム制御部と、 該データ管理システム制御部から参照されるデータ管理
情報を格納するデータ管理システムメモリー部とからな
るデータ管理システム、 および該データ管理システムに対してデータ処理を依頼
するソフトウェアから構成されるデータ管理装置におい
て、 前記不揮発性半導体記憶部は、サイズの異なるブロック
を有し、 該データ管理システム制御部は、1または複数のブロッ
クを含む記憶領域と該ブロックの属性情報と該ブロック
の状態情報とからなる論理的な管理単位であるパーティ
ションを用いてデータを管理し、さらに、該パーティシ
ョンのサイズを可変とする機能を有するデータ管理装
置。
2. A non-volatile semiconductor storage unit comprising a plurality of blocks, from which data is erased in block units, a storage control unit for controlling the operation of the non-volatile semiconductor storage unit, A data management system comprising: a data management system control unit for managing data to be stored; a data management system memory unit for storing data management information referred to by the data management system control unit; In a data management device including software for requesting data processing, the nonvolatile semiconductor storage unit includes blocks having different sizes, and the data management system control unit includes a storage area including one or a plurality of blocks. A partition which is a logical management unit composed of attribute information of a block and status information of the block. A data management device having a function of managing data using a partition, and further making a size of the partition variable.
【請求項3】 前記不揮発性半導体記憶部を同一の装置
内に複数有する請求項1または請求項2に記載のデータ
管理装置。
3. The data management device according to claim 1, wherein a plurality of the nonvolatile semiconductor storage units are provided in the same device.
【請求項4】 前記データ管理システム制御部は、前記
パーティションを構成するブロックを論理的により小さ
な記憶領域であるセクタとしてデータを管理し、さら
に、該セクタのサイズを可変とする機能を有する請求項
1乃至請求項3のいずれかに記載のデータ管理装置。
4. The data management system control unit has a function of managing data as a block, which is a logically smaller storage area, of blocks constituting the partition, and further having a function of changing the size of the sector. The data management device according to claim 1.
【請求項5】 前記不揮発性半導体記憶部は、格納され
ているデータが無効であるセクタを解放する再構築処理
用に予め確保される予備ブロックを、前記パーティショ
ン毎に少なくとも1個有する請求項1乃至請求項4のい
ずれかに記載のデータ管理装置。
5. The non-volatile semiconductor storage unit has at least one spare block for each partition previously reserved for a reconstruction process for releasing a sector in which stored data is invalid. The data management device according to claim 4.
【請求項6】 前記不揮発性半導体記憶部は、格納され
ているデータが無効であるセクタを解放する再構築処理
用に予め確保される予備ブロックを、前記パーティショ
ン全体に対して少なくとも1個有し、該予備ブロックを
複数のパーティションで共用する請求項1乃至請求項4
のいずれかに記載のデータ管理装置。
6. The non-volatile semiconductor storage section has at least one spare block reserved in advance for a reconstruction process for releasing a sector in which stored data is invalid, for the entire partition. And the spare block is shared by a plurality of partitions.
A data management device according to any one of the above.
【請求項7】 前記パーティションを構成するブロック
に設けられたセクタのサイズは、1つのパーティション
内では同一である請求項1乃至請求項6のいずれかに記
載のデータ管理装置。
7. The data management device according to claim 1, wherein the size of a sector provided in a block constituting the partition is the same in one partition.
【請求項8】 前記データ管理システムメモリ部は、前
記パーティション構成するブロックの属性情報と状態情
報を格納する領域を有する請求項1乃至請求項7のいず
れかに記載のデータ管理装置。
8. The data management apparatus according to claim 1, wherein the data management system memory unit has an area for storing attribute information and status information of blocks constituting the partition.
【請求項9】 前記データ管理システムメモリ部は、揮
発性または不揮発性の高速アクセス可能な記憶素子から
なる請求項8に記載のデータ管理装置。
9. The data management device according to claim 8, wherein the data management system memory unit includes a volatile or nonvolatile high-speed accessible storage element.
【請求項10】 前記パーティションを構成するブロッ
クの属性情報と状態情報として、少なくとも、パーティ
ションを識別するパーティション番号、パーティション
を構成するブロックのサイズとブロック数、ブロックに
含まれるセクタのサイズ、パーティションの領域を示す
先頭物理アドレスと最終物理アドレス、および格納され
るデータ数の最大値の情報を有するパーティション情報
テーブルを含む請求項8または請求項9に記載のデータ
管理装置。
10. The attribute information and status information of blocks constituting the partition include at least a partition number for identifying the partition, the size and number of blocks constituting the partition, the size of a sector included in the block, and the area of the partition. 10. The data management apparatus according to claim 8, further comprising a partition information table having information on a start physical address and an end physical address indicating the maximum number of data to be stored.
【請求項11】 前記パーティションを構成するブロッ
クの属性情報および状態情報として、少なくとも、パー
ティションを構成するブロックを識別するブロック番
号、ブロックに格納されているデータの状態、ブロック
に含まれるセクタを識別するセクタ番号、セクタに格納
されているデータの状態、ブロックに含まれる使用され
ていないセクタの数および格納されているデータが無効
であるセクタの数の情報を有する管理テーブルを含む請
求項8乃至請求項10のいずれかに記載のデータ管理装
置。
11. The attribute information and status information of the blocks constituting the partition include at least a block number for identifying a block constituting the partition, a status of data stored in the block, and a sector included in the block. 9. A management table including information on a sector number, a state of data stored in a sector, the number of unused sectors included in a block, and the number of sectors in which stored data is invalid. Item 11. The data management device according to any one of items 10.
【請求項12】 前記管理テーブルに含まれる情報の一
部は、パーティション毎に固有の情報である請求項11
に記載のデータ管理装置。
12. A part of information included in the management table is information unique to each partition.
A data management device according to claim 1.
【請求項13】 請求項10乃至請求項12のいずれか
に記載のデータ管理装置を用いてデータを管理するデー
タ管理方法であって、 前記パーティション情報テーブルに含まれる情報として
前記データ管理システムに予め任意に設定される値を与
え、その値を基に前記データ管理システム制御部が該パ
ーティション情報テーブルを前記データ管理システムメ
モリ部に展開し、該パーティション情報テーブルを参照
することによりパーティションの構成を任意に設定する
データ管理方法。
13. A data management method for managing data using the data management device according to claim 10, wherein the data management system includes a partition management table for storing data as information included in the partition information table. Given a value that is arbitrarily set, the data management system control unit expands the partition information table in the data management system memory unit based on the value, and refers to the partition information table to freely configure the partition. The data management method to be set.
【請求項14】 前記パーティションの構成が設定され
た後、前記データ管理システム制御部が設定されたパー
ティションの構成に従って構築された該不揮発性半導体
記憶部のデータを検索し、その情報を基にして前記管理
テーブルを前記データ管理システムメモリ部に生成する
請求項13に記載のデータ管理方法。
14. After the partition configuration is set, the data management system control unit searches for data in the nonvolatile semiconductor storage unit constructed according to the set partition configuration, and based on the information, 14. The data management method according to claim 13, wherein the management table is generated in the data management system memory unit.
【請求項15】 前記パーティション情報テーブルの設
定および前記管理テーブルの生成を、前記データ管理装
置が起動するシステムの初期設定時に行う請求項13ま
たは請求項14に記載のデータ管理方法。
15. The data management method according to claim 13, wherein the setting of the partition information table and the generation of the management table are performed at the time of initial setting of a system activated by the data management device.
【請求項16】 請求項11または請求項12に記載の
データ管理装置を用いてデータを管理するデータ管理方
法であって、 前記不揮発性半導体記憶部へのデータ処理を実行する際
に、前記ソフトウェアから前記データ管理システムに対
して、内部のハードウェア構成に依存しない論理的な値
であるパーティション番号、および処理対象となるデー
タを識別するデータ識別番号を与え、 前記データ管理システム制御部は、与えられたパーティ
ション番号およびデータ識別番号から前記パーティショ
ン情報テーブルおよび前記管理テーブルの情報を参照し
て動作の対象となる物理的なアドレスを算出し、算出し
た物理アドレスと共に処理を指示するコマンドを前記不
揮発性半導体記憶部に与えることにより、特定のデータ
またはデータ領域に対して指定された動作を実行するデ
ータ管理方法。
16. A data management method for managing data using the data management device according to claim 11, wherein the software is used when executing data processing on the nonvolatile semiconductor storage unit. To the data management system from the partition number which is a logical value independent of the internal hardware configuration, and a data identification number for identifying data to be processed, the data management system control unit, A physical address to be operated is calculated from the obtained partition number and data identification number by referring to the information in the partition information table and the management table, and a command for instructing a process together with the calculated physical address is stored in the nonvolatile memory. By providing the data to the semiconductor storage unit, Data management method for performing a specified operation Te.
【請求項17】 請求項11または請求項12に記載の
データ管理装置を用いてデータを管理するデータ管理方
法であって、 前記予備ブロックを前記パーティション全体に対して少
なくとも1個有し、該予備ブロックを複数のパーティシ
ョンで共用する場合に、該パーティション毎に固有の管
理テーブルに格納されるブロックの物理番号を、該予備
ブロックを共用する全てのパーティションと同一の予備
ブロックの物理番号に設定するデータ管理方法。
17. A data management method for managing data by using the data management device according to claim 11, wherein the at least one spare block is provided for the entire partition. When a block is shared by a plurality of partitions, data for setting the physical number of a block stored in a unique management table for each partition to the same physical number of a spare block as that of all partitions sharing the spare block Management method.
【請求項18】 請求項10乃至請求項12のいずれか
に記載のデータ管理装置を用いてデータを管理するデー
タ管理方法であって、 前記予備ブロックを前記パーティション全体に対して少
なくとも1個有し、該予備ブロックを複数のパーティシ
ョンで共用する場合に、前記パーティション情報テーブ
ルに同一のパーティションに対して該予備ブロックを共
用するパーティションの数分のエントリを設け、各エン
トリに含まれるパーティションの領域を示す先頭物理ア
ドレスおよび最終物理アドレスを、該予備ブロックを共
用する全てのパーティションと同じ値に設定して該パー
ティション情報テーブルを生成するデータ管理方法。
18. A data management method for managing data using the data management device according to claim 10, wherein the data management apparatus has at least one spare block for the entire partition. When the spare block is shared by a plurality of partitions, the partition information table is provided with the same number of entries as the number of partitions sharing the spare block for the same partition, and indicates the area of the partition included in each entry. A data management method for generating the partition information table by setting the first physical address and the last physical address to the same value as all partitions sharing the spare block.
【請求項19】 前記パーティション情報テーブルを生
成した後、前記不揮発性半導体記憶部へのデータ処理を
実行するために、前記ソフトウェアから前記データ管理
システムに対して、内部のハードウェア構成に依存しな
い論理的な値であるパーティション番号、および処理対
象となるデータを識別するデータ識別番号を与え、 前記データ管理システム制御部は、与えられたパーティ
ション番号およびデータ識別番号から前記パーティショ
ン情報テーブルおよび前記管理テーブルの情報を参照し
て動作の対象となる物理的なアドレスを算出する際に、
該管理テーブルから動作の対象となるブロックがパーテ
ィションのどの物理的な領域に含まれるかを判別して、
前記同一のパーティションに対して設けた複数のエント
リから動作の対象となるエントリを選択する処理を含む
請求項18に記載のデータ管理方法。
19. After the partition information table is generated, in order to execute data processing to the nonvolatile semiconductor storage unit, the software instructs the data management system to execute a logic independent of an internal hardware configuration. The data management system control unit assigns a partition number, which is a typical value, and a data identification number for identifying data to be processed, from the given partition number and data identification number to the partition information table and the management table. When calculating the physical address to be operated by referring to the information,
From the management table, determine in which physical area of the partition the block to be operated is included,
19. The data management method according to claim 18, further comprising a process of selecting an entry to be operated from a plurality of entries provided for the same partition.
【請求項20】 前記不揮発性半導体記憶部を同一のデ
ータ管理装置内に複数有する場合、または該不揮発性半
導体記憶部が複数のバンクを有する場合に、該不揮発性
半導体記憶部へのデータ処理を実行する際に、該データ
管理システム制御部は、必ず算出した物理アドレスと共
に処理を指示するコマンドを該不揮発性半導体記憶部に
与える請求項16または請求項19に記載のデータ管理
方法。
20. When a plurality of the nonvolatile semiconductor memory units are provided in the same data management device, or when the nonvolatile semiconductor memory unit has a plurality of banks, data processing to the nonvolatile semiconductor memory unit is performed. 20. The data management method according to claim 16, wherein, when executing, the data management system control unit gives the nonvolatile semiconductor storage unit a command instructing a process together with the calculated physical address.
JP2000356817A 2000-11-22 2000-11-22 Data management device and data management method using it Pending JP2002163139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000356817A JP2002163139A (en) 2000-11-22 2000-11-22 Data management device and data management method using it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000356817A JP2002163139A (en) 2000-11-22 2000-11-22 Data management device and data management method using it

Publications (1)

Publication Number Publication Date
JP2002163139A true JP2002163139A (en) 2002-06-07

Family

ID=18828986

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000356817A Pending JP2002163139A (en) 2000-11-22 2000-11-22 Data management device and data management method using it

Country Status (1)

Country Link
JP (1) JP2002163139A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005043394A1 (en) * 2003-10-31 2005-05-12 Matsushita Electric Industrial Co., Ltd. Information recording medium, information recording medium accessing apparatus and accessing method
JP2006164216A (en) * 2004-12-03 2006-06-22 Eitokui Sui Kagi Kofun Yugenkoshi Structure of shared partition for operation system and method therefor
WO2006067923A1 (en) * 2004-12-22 2006-06-29 Matsushita Electric Industrial Co., Ltd. Memory controller, nonvolatile storage, nonvolatile storage system, and memory control method
US7143237B2 (en) 2002-08-26 2006-11-28 Kabushiki Kaisha Toshiba Memory card authentication system, memory card host device, memory card, storage area switching method, and storage area switching program
JP2007004234A (en) * 2005-06-21 2007-01-11 Hitachi Ltd Storage device
JP2010049530A (en) * 2008-08-22 2010-03-04 Buffalo Inc Memory card, memory card control device and memory card control method
JP2010176268A (en) * 2009-01-28 2010-08-12 Yupiteru Corp Electronic apparatus and program
US8065473B2 (en) 2004-06-21 2011-11-22 Kabushiki Kaisha Toshiba Method for controlling memory card and method for controlling nonvolatile semiconductor memory
WO2013042880A2 (en) * 2011-09-23 2013-03-28 한양대학교 산학협력단 Method and device for storing data in a flash memory using address mapping for supporting various block sizes
JP2013161222A (en) * 2012-02-03 2013-08-19 Dainippon Printing Co Ltd Ic card and program
JP2014078278A (en) * 2006-01-24 2014-05-01 Memory Technologies Llc Method for utilizing memory interface to control partitioning of memory module
JP2016091533A (en) * 2014-10-30 2016-05-23 株式会社東芝 Memory system and program
US11334478B2 (en) 2014-10-30 2022-05-17 Kioxia Corporation Memory system and nonvolatile memory medium in which program is stored to optimize operating life

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7797490B2 (en) 2002-08-26 2010-09-14 Kabushiki Kaisha Toshiba Memory card authentication system, memory card host device, memory card, storage area switching method, and storage area switching program
US7143237B2 (en) 2002-08-26 2006-11-28 Kabushiki Kaisha Toshiba Memory card authentication system, memory card host device, memory card, storage area switching method, and storage area switching program
US7401183B2 (en) 2002-08-26 2008-07-15 Kabushiki Kaisha Toshiba Memory card authentication system, memory card host device, memory card, storage area switching method, and storage area switching program
US8185705B2 (en) 2003-10-31 2012-05-22 Panasonic Corporation Information recording medium, information recording medium accessing apparatus and accessing method
WO2005043394A1 (en) * 2003-10-31 2005-05-12 Matsushita Electric Industrial Co., Ltd. Information recording medium, information recording medium accessing apparatus and accessing method
JP4722704B2 (en) * 2003-10-31 2011-07-13 パナソニック株式会社 INFORMATION RECORDING MEDIUM, ACCESS DEVICE AND ACCESS METHOD FOR INFORMATION RECORDING MEDIUM
JPWO2005043394A1 (en) * 2003-10-31 2007-11-29 松下電器産業株式会社 INFORMATION RECORDING MEDIUM, ACCESS DEVICE AND ACCESS METHOD FOR INFORMATION RECORDING MEDIUM
US8065473B2 (en) 2004-06-21 2011-11-22 Kabushiki Kaisha Toshiba Method for controlling memory card and method for controlling nonvolatile semiconductor memory
US8180956B2 (en) 2004-06-21 2012-05-15 Kabushiki Kaisha Toshiba Method for controlling memory card and method for controlling nonvolatile semiconductor memory
JP2006164216A (en) * 2004-12-03 2006-06-22 Eitokui Sui Kagi Kofun Yugenkoshi Structure of shared partition for operation system and method therefor
WO2006067923A1 (en) * 2004-12-22 2006-06-29 Matsushita Electric Industrial Co., Ltd. Memory controller, nonvolatile storage, nonvolatile storage system, and memory control method
JP4688584B2 (en) * 2005-06-21 2011-05-25 株式会社日立製作所 Storage device
JP2007004234A (en) * 2005-06-21 2007-01-11 Hitachi Ltd Storage device
JP2014078278A (en) * 2006-01-24 2014-05-01 Memory Technologies Llc Method for utilizing memory interface to control partitioning of memory module
JP2010049530A (en) * 2008-08-22 2010-03-04 Buffalo Inc Memory card, memory card control device and memory card control method
JP2010176268A (en) * 2009-01-28 2010-08-12 Yupiteru Corp Electronic apparatus and program
WO2013042880A3 (en) * 2011-09-23 2013-05-23 한양대학교 산학협력단 Method and device for storing data in a flash memory using address mapping for supporting various block sizes
KR101289931B1 (en) * 2011-09-23 2013-07-25 한양대학교 산학협력단 Method and apparatus for storing data in flash memory using address mapping with various block sizes
WO2013042880A2 (en) * 2011-09-23 2013-03-28 한양대학교 산학협력단 Method and device for storing data in a flash memory using address mapping for supporting various block sizes
US9298384B2 (en) 2011-09-23 2016-03-29 Industry-University Cooperation Foundation Hanyang University Method and device for storing data in a flash memory using address mapping for supporting various block sizes
JP2013161222A (en) * 2012-02-03 2013-08-19 Dainippon Printing Co Ltd Ic card and program
JP2016091533A (en) * 2014-10-30 2016-05-23 株式会社東芝 Memory system and program
US11334478B2 (en) 2014-10-30 2022-05-17 Kioxia Corporation Memory system and nonvolatile memory medium in which program is stored to optimize operating life
US11868246B2 (en) 2014-10-30 2024-01-09 Kioxia Corporation Memory system and non-transitory computer readable recording medium

Similar Documents

Publication Publication Date Title
USRE45222E1 (en) Method of writing of writing to a flash memory including data blocks and log blocks, using a logical address having a block address portion and page identifying portion, a block address table and a page table
US9466383B2 (en) Non-volatile memory and method with adaptive logical groups
JP4695801B2 (en) Method and apparatus for reducing block write operation time performed on non-volatile memory
JP3588231B2 (en) Data processing system and block erase type storage medium
KR100771519B1 (en) Memory system including flash memory and merge method of thereof
KR100684887B1 (en) Data storing device including flash memory and merge method of thereof
US7191306B2 (en) Flash memory, and flash memory access method and apparatus
US7840617B2 (en) Host device and memory system
TWI261254B (en) Memory card and semiconductor device
JP4611024B2 (en) Method and apparatus for grouping pages in a block
US20050021904A1 (en) Mass memory device based on a flash memory with multiple buffers
US6477632B1 (en) Storage device and accessing method
JP2007280428A (en) Memory management
JP2010514017A (en) Hybrid solid-state memory system with volatile and non-volatile memory
JPH08137634A (en) Flash disk card
EP1228510A1 (en) Space management for managing high capacity nonvolatile memory
JP2002163139A (en) Data management device and data management method using it
US20100318726A1 (en) Memory system and memory system managing method
JP2012113343A (en) Storage device
JP2011238261A (en) Storage device and information processing system
KR20020092261A (en) Management Scheme for Flash Memory with the Multi-Plane Architecture
KR100932801B1 (en) Memory management methods, memory devices, and computer readable storage media
JP2000181784A (en) Non-volatile storage device which can be rewritten
KR20090046568A (en) Flash memory system and writing method of thereof
KR100982440B1 (en) System for managing data in single flash memory

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070126

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070307

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070403

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070522

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070615