Nothing Special   »   [go: up one dir, main page]

JPH0877081A - File memory system - Google Patents

File memory system

Info

Publication number
JPH0877081A
JPH0877081A JP23435994A JP23435994A JPH0877081A JP H0877081 A JPH0877081 A JP H0877081A JP 23435994 A JP23435994 A JP 23435994A JP 23435994 A JP23435994 A JP 23435994A JP H0877081 A JPH0877081 A JP H0877081A
Authority
JP
Japan
Prior art keywords
sector
data
block
management data
contents
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP23435994A
Other languages
Japanese (ja)
Inventor
Chihoko Yokobe
千穂子 横部
Yasuhiko Saie
靖彦 齋江
Takashi Kikuchi
隆 菊池
Hiroshi Fukuda
宏 福田
Takeshi Suzuki
猛 鈴木
Shigeru Kadowaki
茂 門脇
Chikao Ookubo
京夫 大久保
Masamichi Kishi
正道 岸
Kunihiro Katayama
国弘 片山
Kenichi Kaki
健一 柿
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.)
Hitachi ULSI Engineering Corp
Hitachi Ltd
Original Assignee
Hitachi ULSI Engineering Corp
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi ULSI Engineering Corp, Hitachi Ltd filed Critical Hitachi ULSI Engineering Corp
Priority to JP23435994A priority Critical patent/JPH0877081A/en
Publication of JPH0877081A publication Critical patent/JPH0877081A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE: To provide the file memory system which prevents sector management data in a nonvolatile memory from being rewritten unnecessarily. CONSTITUTION: In the file memory system which stores data in a file, sector by sector, a nonvolatile storage device 5 which is electrically rewritable in block units has sector management data 51 showing use states by sectors. The sector management data are initially set in a volatile storage device 4 from the nonvolatile storage device 5 and a sector table 41 which has its contents updated according to file operation is formed. When the power supply to the volatile storage device 4 is stopped, the contents of the sector management data that the nonvolatile storage device 5 holds are compared in block units with the contents of the sector table 41 and only blocks where mismatching is detected are rewritten into the corresponding contents of the sector table 41.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電気的に書換え可能な
不揮発性半導体記憶装置としてフラッシュメモリを利用
するファイルメモリシステムに係り、例えばコンピュー
タの補助記憶装置として利用されるメモリカードに適用
して有効な技術である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file memory system which uses a flash memory as an electrically rewritable nonvolatile semiconductor memory device, and is applied to a memory card used as an auxiliary memory device of a computer, for example. It is an effective technology.

【0002】[0002]

【従来の技術】セクタ単位でファイルのデータを格納す
るファイルメモリシステムとして、例えばフラッシュメ
モリを利用するファイルメモリシステムがある。上記フ
ラッシュメモリはエレクトリカリ・イレーザブル・アン
ド・プログラマブル・リード・オンリ・メモリ(以下単
にEEPROMと記す)と同様に電気的に消去及び書込
みを行うことが可能であり、その場合はメモリセルの全
てを一括して、またはメモリセルのブロックを一括して
電気的に消去する機能を持つ。また上記各ブロックは複
数セクタ以上の容量を有し、従って1つのブロックには
複数個のセクタが含まれる。これによりフラッシュメモ
リのデータを書換える場合はブロック単位で消去されて
当該ブロックに含まれる複数個のセクタのデータが一括
して書換えられる。即ち、書換えの単位はセクタの単位
よりも大きくされる。従ってセクタの書換えに際しては
該セクタが含まれるメモリブロックに有効な別のセクタ
が存在する場合には、そのまま該セクタのデータの書換
えは不可能であり、当該書換えには空きセクタを利用す
ることになる。その為セクタ毎に有効または無効を示す
情報が必要とされる。
2. Description of the Related Art As a file memory system for storing file data in sector units, for example, there is a file memory system using a flash memory. The flash memory can be electrically erased and written in the same manner as an electrically erasable and programmable read only memory (hereinafter simply referred to as an EEPROM), and in that case, all the memory cells can be erased. It has a function of electrically erasing all or a block of memory cells collectively. Further, each block has a capacity of a plurality of sectors or more, and therefore one block includes a plurality of sectors. As a result, when the data in the flash memory is rewritten, the data is erased in block units, and the data in a plurality of sectors included in the block is collectively rewritten. That is, the rewriting unit is made larger than the sector unit. Therefore, when rewriting a sector, if another valid sector exists in the memory block including the sector, the data in the sector cannot be rewritten as it is, and the empty sector is used for the rewriting. Become. Therefore, information indicating validity or invalidity is required for each sector.

【0003】また上記フラッシュメモリは、データの消
去及び書込み時にメモリセルに高電界を印加する為、デ
ータの書換え可能な回数に限度がある。フラッシュメモ
リは通常数万回程度の書換えは可能であるが、特定のブ
ロックに書換え処理が集中した場合にはブロック間でデ
ータ書換え回数に差が生じ、記憶素子の劣化の程度が不
均等になる。このようにフラッシュメモリに対してはデ
ータ書換え回数を制限するだけでなく、ブロック毎のデ
ータ書換え回数の均等化をも考慮する必要がある。従っ
て特定のブロックに書換えが集中することを防止する
為、例えばブロック毎の消去回数を記録し、相対的に書
換え回数の少ない有効データを有するメモリブロックの
内容を、相対的に書換え回数の多い無効データを有する
メモリブロックに移動する。その為には、データを入換
えたブロックのメモリアドレスとセクタとの関係を規定
する情報が必要とされる。
Further, since the above flash memory applies a high electric field to the memory cells when erasing and writing data, there is a limit to the number of times data can be rewritten. Flash memory can usually be rewritten several tens of thousands of times, but when rewriting processing is concentrated on a specific block, the number of data rewritings differs between blocks, and the degree of deterioration of storage elements becomes uneven. . As described above, it is necessary to consider not only the number of data rewrites for the flash memory but also the equalization of the number of data rewrites for each block. Therefore, in order to prevent rewriting from concentrating on a specific block, for example, the erase count for each block is recorded, and the contents of a memory block having valid data with a relatively small rewrite count are invalidated with a relatively large rewrite count. Move to a memory block that has data. For that purpose, information that defines the relationship between the memory address of the block in which the data is replaced and the sector is required.

【0004】上述の有効または無効を示す情報、そして
入換えられたメモリブロックのアドレスとセクタとの関
係を規定する情報は、セクタ管理データとしてセクタ毎
に保持されなければならない。上記セクタ管理データは
上記フラッシュメモリ上で更新することも可能である
が、その場合はファイルのデータ書換えに際して上記フ
ァイルを格納するセクタだけでなく上記セクタ管理デー
タも書換える必要が生じる為、上記フラッシュメモリの
書換え回数が増加する。更にフラッシュメモリのデータ
を書換える場合は、データを読出す場合に比して著しく
長い時間を必要とする。従って上記セクタ管理データを
フラッシュメモリ上で書換える場合は、ファイルのデー
タ書換え時間に上記セクタ管理データの書換えに要する
時間が加算され、当該フラッシュメモリに対する書換え
時間が著しく増大する。更に上記セクタ管理データの書
換えに要する時間の為、ファイルのデータ書換えに不所
望な待ち時間が生じる可能性がある。これにより上記フ
ラッシュメモリに格納されたセクタ管理データを、セク
タの利用状況の変化に伴って逐次更新することは得策で
はない。従って上記フラッシュメモリとは別に上記ファ
イルメモリシステムにワーク領域を設け、上記ワーク領
域において上記セクタ管理データを更新することが望ま
しい。
The above-mentioned information indicating validity or invalidity and the information defining the relationship between the address of the replaced memory block and the sector must be held for each sector as sector management data. The sector management data can be updated on the flash memory, but in that case, it is necessary to rewrite not only the sector storing the file but also the sector management data when rewriting the data of the file. The number of times memory is rewritten increases. Furthermore, rewriting the data in the flash memory requires a significantly longer time than reading the data. Therefore, when the sector management data is rewritten on the flash memory, the time required for rewriting the sector management data is added to the data rewriting time of the file, and the rewriting time for the flash memory significantly increases. Furthermore, because of the time required to rewrite the sector management data, an undesired waiting time may occur when rewriting the file data. As a result, it is not a good idea to sequentially update the sector management data stored in the flash memory as the usage status of the sector changes. Therefore, it is desirable to provide a work area in the file memory system separately from the flash memory and update the sector management data in the work area.

【0005】上記ワーク領域として、例えば擬似スタテ
ィック・ランダム・アクセス・メモリ(以下単にPSR
AMと記す)を利用できる。上記PSRAMは上記セク
タ管理データを更新するワーク領域を備え、上記領域に
上記フラッシュメモリより上記セクタ管理データが転送
されてセクタテーブルが生成される。上記セクタテーブ
ルはセクタの利用状況の変化に応じて更新され、従って
最新のセクタ利用状況は上記セクタテーブルに示され
る。しかし上記PSRAMは揮発性半導体記憶装置であ
り、供給電源が停止されると記憶データは消失する。こ
の為上記PSRAMに対する電源供給が停止される場合
は、上記セクタテーブルの内容によって上記フラッシュ
メモリの上記セクタ管理データを書換え、上記最新のセ
クタの利用状況を上記フラッシュメモリのセクタ管理デ
ータに保存する。
As the work area, for example, a pseudo static random access memory (hereinafter referred to simply as PSR) is used.
AM)) can be used. The PSRAM has a work area for updating the sector management data, and the sector management data is transferred from the flash memory to the area to generate a sector table. The sector table is updated in response to changes in sector usage, so the latest sector usage is shown in the sector table. However, the PSRAM is a volatile semiconductor memory device, and the stored data is lost when the power supply is stopped. Therefore, when the power supply to the PSRAM is stopped, the sector management data of the flash memory is rewritten according to the contents of the sector table, and the latest usage status of the sector is stored in the sector management data of the flash memory.

【0006】尚、フラッシュメモリを利用するファイル
メモリシステムの一例であるメモリカードについて記載
された文献の例として、日経BP社発行の「日経エレク
トロニクス第566号」(1992年10月26日号)
の第86項及び第87項がある。
As an example of a document describing a memory card which is an example of a file memory system using a flash memory, "Nikkei Electronics No. 566" issued by Nikkei BP (October 26, 1992).
There are the 86th and 87th terms of.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、従来の
技術では、上記フラッシュメモリに格納されるセクタ管
理データを対応する上記セクタテーブルの内容に書換え
る上で、次のような問題点があることが本発明者によっ
て見出された。
However, in the conventional technique, there are the following problems in rewriting the sector management data stored in the flash memory with the contents of the corresponding sector table. Found by the inventor.

【0008】上記セクタ管理データを上記セクタテーブ
ルの内容に書換えることは、上記フラッシュメモリのセ
クタ利用の現状を上記セクタ管理データに反映させる為
に行うものである。この為データの書換えはブロック単
位に行われるフラッシュメモリの特性を考慮すれば、上
記セクタ管理データを格納するブロックと、当該ブロッ
クに対応する上記セクタテーブルの内容とが一致する場
合は、上記ブロックに対する書換えは不要である。従っ
て上記セクタ管理データを上記セクタテーブルの内容に
無条件に書換えることは、本来書換える必要のないブロ
ックも書換える可能性がある。これにより上記フラッシ
ュメモリの書換え回数の低減及び上記セクタ管理データ
の書換え時間の短縮が阻害されている。
Rewriting the sector management data to the contents of the sector table is carried out in order to reflect the present state of sector utilization of the flash memory in the sector management data. For this reason, rewriting of data is performed in block units. Considering the characteristics of the flash memory, if the block storing the sector management data and the content of the sector table corresponding to the block match, the block is written to the block. No rewriting is necessary. Therefore, if the sector management data is unconditionally rewritten to the contents of the sector table, there is a possibility that a block that should not be originally rewritten may be rewritten. This impedes the reduction of the number of times of rewriting of the flash memory and the reduction of the rewriting time of the sector management data.

【0009】本発明の目的は、フラッシュメモリのよう
な不揮発性半導体記憶装置のセクタ管理データを無駄に
書換えることを防止し、上記セクタ管理データを格納す
るブロックに対する書換え回数の低減を可能とするファ
イルメモリシステムを提供することである。本発明の別
の目的は、フラッシュメモリのような不揮発性半導体記
憶装置のセクタ管理データのデータ書換え時間を短縮で
きるファイルメモリシステムを提供することである。
An object of the present invention is to prevent wasteful rewriting of sector management data in a non-volatile semiconductor memory device such as a flash memory, and to reduce the number of times of rewriting to a block storing the sector management data. It is to provide a file memory system. Another object of the present invention is to provide a file memory system capable of reducing the data rewriting time of the sector management data of a nonvolatile semiconductor memory device such as a flash memory.

【0010】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0011】[0011]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The outline of the representative one of the inventions disclosed in the present application will be briefly described as follows.

【0012】すなわち、ファイルのデータをセクタ単位
で格納するファイルメモリシステムにおいて、複数セク
タ以上の記憶容量を有するブロック単位で電気的にデー
タ消去が可能な不揮発性半導体記憶装置に、セクタ毎の
利用状況を示すセクタ管理データが格納される。上記不
揮発性半導体記憶装置から転送される上記セクタ管理デ
ータが初期設定され、ファイル操作に応じてその内容が
更新されるセクタテーブルを格納する領域を揮発性半導
体記憶装置に備える。上記揮発性半導体記憶装置に対す
る電源供給が停止されるときに、上記不揮発性半導体記
憶装置が保持する上記セクタ管理データの内容を上記ブ
ロック単位で上記セクタテーブルの内容と比較し、不一
致が検出されたブロックに対してのみ対応する上記セク
タテーブルの内容で書換える制御手段を備える。
That is, in a file memory system for storing file data in sector units, a nonvolatile semiconductor memory device capable of electrically erasing data in blocks having a storage capacity of a plurality of sectors is used in each sector. Is stored in the sector management data. The volatile semiconductor memory device is provided with an area for storing the sector table in which the sector management data transferred from the nonvolatile semiconductor memory device is initialized and the contents of which are updated in response to a file operation. When the power supply to the volatile semiconductor memory device is stopped, the contents of the sector management data held by the nonvolatile semiconductor memory device are compared with the contents of the sector table in block units, and a mismatch is detected. A control means for rewriting the contents of the sector table corresponding to only the block is provided.

【0013】上記制御手段は、上記不一致が検出された
ブロックに対する比較動作を中断してデータの書換えを
行った後、上記セクタ管理データを格納する未だ比較し
ていない他のブロックとそれに対応する上記セクタテー
ブルの内容との比較動作に移行する。
The control means interrupts the comparison operation for the block in which the non-coincidence is detected, rewrites the data, and then corresponds to another block which has not been compared yet and which stores the sector management data. The operation shifts to a comparison operation with the contents of the sector table.

【0014】[0014]

【作用】上記した手段によれば、揮発性半導体記憶装置
のセクタ管理データを不揮発性半導体記憶装置のセクタ
管理データに反映させるとき、ブロック単位で内容が不
一致のブロックに対してのみ書換えを行う。このこと
は、本来書換えを要しないブロックに対する無駄なデー
タ書換えを防止し、不揮発性半導体記憶装置に対する書
換え回数及び書換え時間の増大を抑える。
According to the above means, when the sector management data of the volatile semiconductor memory device is reflected in the sector management data of the non-volatile semiconductor memory device, only the blocks whose contents do not match are rewritten in block units. This prevents useless data rewriting for a block that originally does not require rewriting, and suppresses an increase in the number of rewriting times and rewriting time for a nonvolatile semiconductor memory device.

【0015】また、上記セクタ管理データを格納するブ
ロックのデータは、上記不一致が検出された時点で対応
するセクタテーブルのデータに書換えられる。
Further, the data of the block for storing the sector management data is rewritten to the data of the corresponding sector table at the time when the mismatch is detected.

【0016】[0016]

【実施例】図1には本発明に係るファイルメモリシステ
ムの一実施例のブロック図が示される。同図に示される
メモリカード1は、特に制限されないが、JEIDAメ
モリカードインタフェースに適合されたインタフェース
を有し、例えばハードディスク装置やフレキシブルディ
スク装置のような磁気記憶装置に代替してコンピュータ
の補助記憶装置として利用可能である。上記メモリカー
ド1は、カードインタフェース2、マイクロコンピュー
タ3、擬似スタティック・ランダム・アクセス・メモリ
(以下単にPSRAMとも記す)4及びフラッシュメモ
リ5を備え、全体がカード基板に搭載される。
1 is a block diagram of an embodiment of a file memory system according to the present invention. Although not particularly limited, the memory card 1 shown in the figure has an interface adapted to the JEIDA memory card interface, and is replaced by a magnetic storage device such as a hard disk device or a flexible disk device, and an auxiliary storage device of a computer. Is available as. The memory card 1 includes a card interface 2, a microcomputer 3, a pseudo static random access memory (hereinafter also simply referred to as PSRAM) 4, and a flash memory 5, and the whole is mounted on a card substrate.

【0017】図1に示されるマイクロコンピュータ3
は、特に制限されないが、夫々図示しない中央処理装置
とその動作プログラムを格納したメモリとを含み、PS
RAM4及びフラッシュメモリ5の動作制御を行う。ま
たカードインタフェース2は、これも特に制限されない
が、インタフェースコントローラ21と、データレジス
タDR、コマンドレジスタCR、及びステータスレジス
タSTRを備えるレジスタ回路22とを含み、内部バス
6を介してマイクロコンピュータ3,PSRAM4,フ
ラッシュメモリ5に接続される。上記カードコントロー
ラ2は、インタフェース端子を介して更に当該メモリカ
ード1を利用するホストシステム10のシステムバス1
3と接続される。PSRAM4は、特に制限されない
が、セクタテーブル41とライトバッファ42等に利用
され、上記マイクロコンピュータ3によって制御され
る。
The microcomputer 3 shown in FIG.
Although not particularly limited, PS includes a central processing unit (not shown) and a memory storing an operation program thereof, and PS
It controls the operation of the RAM 4 and the flash memory 5. The card interface 2 includes an interface controller 21 and a register circuit 22 including a data register DR, a command register CR, and a status register STR, though not particularly limited, and the microcomputer 3 and the PSRAM 4 are connected via the internal bus 6. , Connected to the flash memory 5. The card controller 2 uses the system bus 1 of the host system 10 that further uses the memory card 1 via the interface terminal.
Connected with 3. The PSRAM 4 is used for the sector table 41, the write buffer 42, etc., and is controlled by the microcomputer 3, although not particularly limited thereto.

【0018】同図に示されるフラッシュメモリ5はブロ
ック単位で電気的に書換え可能な不揮発性半導体記憶装
置であり、例えば2層ゲート構造の絶縁ゲート型電界効
果トランジスタによって構成されたメモリセルがマトリ
クス配置される。上記メモリセルを構成するトランジス
タのコントロールゲートは夫々対応する図示しないワー
ド線に接続され、上記トランジスタのドレインは夫々対
応する図示しないデータ線に接続され、上記トランジス
タのソースはブロック毎に共通の図示しないソース線に
夫々接続されている。
The flash memory 5 shown in FIG. 1 is a nonvolatile semiconductor memory device that can be electrically rewritten in block units. For example, memory cells composed of insulated gate field effect transistors having a two-layer gate structure are arranged in a matrix. To be done. The control gates of the transistors forming the memory cells are connected to corresponding word lines (not shown), the drains of the transistors are connected to corresponding data lines (not shown), and the sources of the transistors are not shown in common for each block. Each is connected to the source line.

【0019】上記フラッシュメモリ5においてメモリセ
ルへのデータの書込み動作は、例えばコントロールゲー
ト及びドレインに高電圧を印加して、アバランシェ注入
によりドレイン側からフローティングゲートに電子を注
入することで実現される。この書込み動作によりメモリ
セルのトランジスタは、そのコントロールゲートからみ
たしきい値電圧が、書込み動作を行わなかった消去状態
のメモリセルに比べて高くされる。一方消去動作は、例
えばソースに高電圧を印加して、トンネル現象によりフ
ローティングゲートからソース側に電子を引き抜くこと
により実現される。従って同一のソース線に接続される
複数のメモリセルに対し上記消去動作が一括して行われ
る為、フラッシュメモリにおいてデータの消去はブロッ
ク単位に行われる。上記消去動作によりメモリセルのト
ランジスタは、そのコントロールゲートからみたしきい
値電圧が低くされる。
In the flash memory 5, the data writing operation to the memory cell is realized by, for example, applying a high voltage to the control gate and drain and injecting electrons from the drain side to the floating gate by avalanche injection. By this write operation, the threshold voltage of the transistor of the memory cell seen from the control gate is made higher than that of the erased memory cell in which the write operation is not performed. On the other hand, the erase operation is realized, for example, by applying a high voltage to the source and extracting electrons from the floating gate to the source side by the tunnel phenomenon. Therefore, since the erase operation is collectively performed on a plurality of memory cells connected to the same source line, data is erased in block units in the flash memory. By the erase operation, the threshold voltage of the transistor of the memory cell seen from the control gate is lowered.

【0020】このようにフラッシュメモリ5の記憶デー
タを書換える場合は、高電圧が印加されて所定のメモリ
セルのフローティングゲートに対し電子を注入する、ま
たは電子を放出させることにより、当該メモリセルのト
ランジスタのしきい値電圧が変更される。従って上記フ
ラッシュメモリ5を構成するメモリセルは記憶データが
書換えられることによって電気的ストレスを受け、上記
電気的ストレスによって記憶素子が劣化する。またフラ
ッシュメモリ5のデータ消去単位はブロックである為、
書換え頻度が高いデータが特定のブロックに集中した場
合は、当該ブロックに対する書換えが多発しメモリセル
の劣化が進行する。これによりブロック毎の書換え回数
に差が生じた場合、当該フラッシュメモリ5を構成する
メモリセルの特性が不均一になる可能性がある。
When rewriting the data stored in the flash memory 5 in this manner, a high voltage is applied to inject or emit electrons into the floating gate of a predetermined memory cell to cause the memory cell to rewrite. The threshold voltage of the transistor is changed. Therefore, the memory cells forming the flash memory 5 are electrically stressed by rewriting the stored data, and the memory element is deteriorated by the electrical stress. Moreover, since the data erasing unit of the flash memory 5 is a block,
When data having a high rewriting frequency concentrates on a specific block, rewriting of the block frequently occurs and deterioration of the memory cell progresses. If a difference occurs in the number of rewrites for each block, the characteristics of the memory cells that make up the flash memory 5 may become non-uniform.

【0021】上述のメモリセルの特性が不均一になる不
具合を防止するには、例えば上記フラッシュメモリ5の
ブロック毎のデータ消去回数を記録し、記憶データを移
動して上記書換え回数の差が拡大することを抑制すれば
よい。本実施例においては上記フラッシュメモリ5のブ
ロック毎のデータ消去回数をセクタ管理データ51に記
録し、マイクロコンピュータ3によって上記セクタ管理
データ51を参照してフラッシュメモリ5のデータを移
動し、ブロックの内容を入換えてブロック毎の書換え回
数の差の拡大を抑制する。上記セクタ管理データ51
は、ブロックのメモリアドレスとセクタとの関係を規定
する情報と、セクタの有効または無効を示す情報とを有
する。上述のようにブロックのデータが移動された場
合、入換えられたブロックのアドレスとセクタとの対応
は上記メモリアドレスとセクタとの関係を規定する情報
に反映される。従って上記セクタ管理データ51を参照
することにより、セクタ毎の有効または無効やセクタを
格納するブロックのメモリアドレス等のセクタの利用状
況を取得することができる。ここでデータの書込みを行
う場合、それに先立つデータ消去はブロック単位で行わ
れる為、書込みに利用されるセクタはそれが属するブロ
ックの全てのセクタが無効とされていなければデータが
消去できない。従って有効セクタと無効セクタとが混在
するブロックは書込みに利用することはできない為、上
記ブロックより有効セクタのみ他のブロックに移動し、
当該ブロックのデータ消去を行う。
In order to prevent the above-mentioned problem that the characteristics of the memory cells become non-uniform, for example, the number of times data is erased for each block of the flash memory 5 is recorded, and the stored data is moved to increase the difference in the number of times of rewriting. It should be suppressed. In this embodiment, the number of times of erasing data for each block of the flash memory 5 is recorded in the sector management data 51, the microcomputer 3 refers to the sector management data 51 to move the data in the flash memory 5, and the contents of the block are recorded. To suppress the expansion of the difference in the number of rewrites for each block. The sector management data 51
Has information that defines the relationship between the memory address of the block and the sector, and information that indicates whether the sector is valid or invalid. When the data of the block is moved as described above, the correspondence between the address of the replaced block and the sector is reflected in the information defining the relationship between the memory address and the sector. Therefore, by referring to the sector management data 51, it is possible to obtain the validity or invalidity of each sector and the utilization status of the sector such as the memory address of the block storing the sector. When data is written here, data erasing prior to that is performed in block units, and therefore the sector used for writing cannot erase data unless all sectors of the block to which it belongs are invalidated. Therefore, since a block in which valid sectors and invalid sectors are mixed cannot be used for writing, only valid sectors are moved to another block from the above block,
Data of the block is erased.

【0022】上述のデータ移動のような上記フラッシュ
メモリ5に対するファイル操作を行う場合は、データの
書換えや移動等によって生じるセクタの利用状況の変化
を上記セクタ管理データ51に反映する為、上記セクタ
管理データ51を更新する必要がある。しかし上記フラ
ッシュメモリ5に格納される上記セクタ管理データ51
を直接書換えることは、当該フラッシュメモリ5の書換
え回数の増大につながる為、得策ではない。これにより
上記セクタ管理データ51の内容をPSRAM4に転送
してセクタテーブル41を生成し、上記参照と更新とは
セクタテーブル41を利用する。
When performing a file operation on the flash memory 5 such as the above-mentioned data movement, the sector management data 51 is reflected in the change of the utilization status of the sector caused by the rewriting or movement of the data. The data 51 needs to be updated. However, the sector management data 51 stored in the flash memory 5 is
It is not a good idea to directly rewrite the above because it leads to an increase in the number of times of rewriting of the flash memory 5. As a result, the contents of the sector management data 51 are transferred to the PSRAM 4 to generate the sector table 41, and the sector table 41 is used for the above reference and update.

【0023】図2にはフラッシュメモリ5及びPSRA
M4の記憶領域の一例説明図が示される。同図において
フラッシュメモリ5の領域5aにはセクタ管理データ5
1が格納される。またPSRAM4の領域4a及び領域
4bは、マイクロコンピュータ3によって夫々セクタテ
ーブル41及びライトバッファ42が生成される。同図
を参照して上記セクタ管理データ51及び上記セクタテ
ーブル41を利用する手順を説明する。
FIG. 2 shows the flash memory 5 and PSRA.
An explanatory view of an example of the storage area of M4 is shown. In the figure, the sector management data 5 is stored in the area 5a of the flash memory 5.
1 is stored. In the area 4a and the area 4b of the PSRAM 4, the sector table 41 and the write buffer 42 are generated by the microcomputer 3, respectively. A procedure for using the sector management data 51 and the sector table 41 will be described with reference to FIG.

【0024】本実施例におけるメモリカード1は、ホス
トシステム10より供給される各種のコマンドまたは信
号によってその動作が指示される。従ってセクタテーブ
ル41の生成及び更新もコマンドまたは信号によって指
示され、それらはマイクロコンピュータ3によって制御
される。コマンドは、特に制限されないが、ホストCP
U11よりシステムバス13を介してコマンドレジスタ
CRに供給される。上記コマンドが供給された場合、イ
ンタフェースコントローラ21はマイクロコンピュータ
3に上記コマンドをフェッチすべきことを割込み等によ
って通知する。これにより上記マイクロコンピュータ3
は上記コマンドをデコードし、そのデコード結果に従っ
てレジスタ回路22、PSRAM4及びフラッシュメモ
リ5を制御する。
The operation of the memory card 1 in this embodiment is instructed by various commands or signals supplied from the host system 10. Therefore, generation and updating of the sector table 41 are also instructed by commands or signals, which are controlled by the microcomputer 3. The command is not particularly limited, but the host CP
It is supplied from U11 to the command register CR via the system bus 13. When the command is supplied, the interface controller 21 notifies the microcomputer 3 that the command should be fetched by an interrupt or the like. As a result, the microcomputer 3
Decodes the above command and controls the register circuit 22, the PSRAM 4 and the flash memory 5 according to the decoding result.

【0025】また、当該メモリカード1のパワーオンや
パワーオフ等の動作は、上記ホストシステム10より図
示しない信号によって指示される。例えば図示しない信
号によって当該メモリカード1のパワーオンが指示され
た場合、マイクロコンピュータ3はPSRAM4の初期
設定を行う。即ち、上記マイクロコンピュータ3は上記
領域4aにフラッシュメモリ5よりセクタ管理データ5
1を転送し、セクタテーブル41を生成する。また上記
PSRAM4の領域4bは、ライトバッファ42として
利用される。
The operation such as power-on and power-off of the memory card 1 is instructed by the host system 10 by a signal (not shown). For example, when the memory card 1 is instructed to be powered on by a signal (not shown), the microcomputer 3 initializes the PSRAM 4. That is, the microcomputer 3 stores the sector management data 5 from the flash memory 5 in the area 4a.
1 is transferred and the sector table 41 is generated. The area 4b of the PSRAM 4 is used as the write buffer 42.

【0026】上記フラッシュメモリ5に格納されるファ
イルのデータを読出す場合、ホストCPU11よりフラ
ッシュメモリ5のデータ読出しを指示するコマンドとと
もに所望のファイル名が供給される。上記マイクロコン
ピュータ3は、当該フラッシュメモリ5が使用中である
ことを示すステータスをステータスレジスタSTRにセ
ットする。そして上記ファイル名のファイルのセクタ番
号を検索し、取得されたセクタ番号に基づいて上記セク
タテーブル41を参照する。これにより上記セクタ番号
によって指定されるフラッシュメモリ5のメモリアドレ
スを取得する。マイクロコンピュータ3は上記アドレス
によってフラッシュメモリ5からデータを読出して、デ
ータレジスタDRに転送する。上記データ転送後、上記
データレジスタDRには有効なリードデータが存在する
ことを示すステータスがステータスレジスタSTRがセ
ットされる。ホストCPU11は上記ステータスを認識
することによってデータレジスタDRから上記リードデ
ータを読込む。
When reading the data of the file stored in the flash memory 5, a desired file name is supplied from the host CPU 11 together with a command instructing the data reading of the flash memory 5. The microcomputer 3 sets a status indicating that the flash memory 5 is in use in the status register STR. Then, the sector number of the file having the file name is searched, and the sector table 41 is referred to based on the acquired sector number. As a result, the memory address of the flash memory 5 designated by the sector number is obtained. The microcomputer 3 reads the data from the flash memory 5 at the above address and transfers it to the data register DR. After the data transfer, the status register STR is set to a status indicating that valid read data exists in the data register DR. The host CPU 11 reads the read data from the data register DR by recognizing the status.

【0027】上記フラッシュメモリ5に対するデータ書
込みを行う場合、ホストCPU11よりフラッシュメモ
リ5のデータ書込みを指示するコマンドとともに上記デ
ータのファイル名が供給される。上記マイクロコンピュ
ータ3は、当該フラッシュメモリ5が使用中であること
を示すステータスをステータスレジスタSTRにセット
する。システムバス13より供給された入力データをラ
イトバッファ42に一時的に格納し、上記ファイル名の
ファイルを検索する。また、セクタテーブル41を参照
して書込み可能な空きセクタの情報を取得し、上記空き
セクタに上記ライトバッファ42に格納されたデータを
書込む。そしてセクタテーブル41の内容を書換えて上
記セクタを有効状態とする。上記書込み終了後、その結
果を示すステータスがステータスレジスタSTRにセッ
トされる。
When data is written in the flash memory 5, the host CPU 11 supplies a command for instructing the data writing in the flash memory 5 and the file name of the data. The microcomputer 3 sets a status indicating that the flash memory 5 is in use in the status register STR. The input data supplied from the system bus 13 is temporarily stored in the write buffer 42, and the file having the above file name is searched. In addition, the sector table 41 is referred to obtain the writable empty sector information, and the data stored in the write buffer 42 is written in the empty sector. Then, the contents of the sector table 41 are rewritten to bring the sector into the valid state. After the writing is completed, the status indicating the result is set in the status register STR.

【0028】上記マイクロコンピュータ3はブロック毎
の書換え回数を均等化する為、上述したコマンドまたは
信号により指示された動作以外に上記フラッシュメモリ
5に格納されるデータ移動の制御を行う。例えば当該メ
モリカード1が非選択状態のとき、セクタテーブル41
を参照してブロック毎の書換え回数の差を検査する。こ
のときブロック毎の書換え回数の差が規定された範囲を
越えている場合、書換え回数の多いブロックのデータを
書換え回数の少ないブロックに移動する。例えば相対的
に書換え回数の少ない有効セクタを格納するブロックよ
り、ライトバッファ42にデータを転送し、上記データ
を相対的に書換え回数の多い無効セクタを格納するブロ
ックに書込む。また、有効セクタと無効セクタが混在す
るブロックより有効セクタの情報を移動し、上記ブロッ
クのデータを消去して、利用可能な空きセクタとする。
上記データ移動によりセクタ番号とフラッシュメモリ5
のメモリアドレスとの対応が変化する為、上記セクタテ
ーブル41を更新する。
The microcomputer 3 controls the movement of data stored in the flash memory 5 in addition to the operation instructed by the above-mentioned command or signal in order to equalize the number of times of rewriting for each block. For example, when the memory card 1 is in the non-selected state, the sector table 41
And the difference in the number of rewrites for each block is checked. At this time, if the difference in the number of times of rewriting for each block exceeds the specified range, the data of the block with the number of times of rewriting is moved to the block with the number of times of rewriting. For example, data is transferred to the write buffer 42 from a block storing a valid sector having a relatively small number of rewrites, and the data is written to a block storing an invalid sector having a relatively large number of rewrites. In addition, the information of the valid sector is moved from the block in which the valid sector and the invalid sector are mixed, and the data of the block is erased to make the available free sector.
Due to the above data movement, the sector number and flash memory 5
The sector table 41 is updated because the correspondence with the memory address of is changed.

【0029】当該メモリカード1のリセットを指示する
コマンドが供給された場合、または当該メモリカード1
のパワーオフ、即ち、PSRAM4の電源供給が停止さ
れる場合、上記PSRAM4に保持されるデータをフラ
ッシュメモリ5に転送して保存する。図3にはセクタテ
ーブル41の内容をセクタ管理データ51に反映させる
処理の手順がフローチャートを用いて示される。同図に
従って上記セクタ管理データ51の内容とそれに対応す
る上記セクタテーブル41の内容とをブロック単位で比
較し、不一致の検出されたブロックのデータを対応する
セクタテーブル41の内容によって書換える処理につい
て説明する。
When a command for resetting the memory card 1 is supplied, or the memory card 1
When the power is turned off, that is, when the power supply to the PSRAM 4 is stopped, the data held in the PSRAM 4 is transferred to and saved in the flash memory 5. FIG. 3 is a flowchart showing a procedure of processing for reflecting the contents of the sector table 41 in the sector management data 51. A process of comparing the contents of the sector management data 51 with the contents of the sector table 41 corresponding thereto in block units and rewriting the data of the block in which a mismatch is detected with the contents of the corresponding sector table 41 will be described with reference to FIG. To do.

【0030】リセットを指示するコマンドが供給された
場合、上記マイクロコンピュータ3は内蔵する図示しな
いワークアドレスポインタAiにフラッシュメモリ5の
セクタ管理データ51の先頭アドレスの値をセットする
(ステップS1)。上記ワークアドレスポインタAiに
示されるアドレスに保持されるデータと、それに対応す
るセクタテーブル41のデータとを夫々取得し(ステッ
プS2、S3)、取得された上記フラッシュメモリ5の
データと、それに対応する上記セクタテーブル41のデ
ータとを比較する(ステップS4)。両者が一致する場
合、上記マイクロコンピュータ3はセクタテーブル41
を参照し、上記ワークアドレスポインタAiの値と上記
ワークアドレスポインタAiに示されるアドレスが含ま
れるブロックの有効なデータの最終アドレスとを比較す
る(ステップS5)。上記ワークアドレスポインタAi
の値と上記ブロックの最終アドレスとが一致する場合、
当該ブロックの内容が全て一致すると判断される。従っ
て当該ブロックの内容の書換えは実施しない。上記セク
タ管理データ51を格納するフラッシュメモリ5のブロ
ックで未比較のものがある場合は(ステップS9)、上
記未比較のブロックの先頭アドレスを上記ワークアドレ
スポインタAiにセットする(ステップS10)。
When a command for resetting is supplied, the microcomputer 3 sets the value of the start address of the sector management data 51 of the flash memory 5 in a work address pointer Ai (not shown) incorporated therein (step S1). The data held at the address indicated by the work address pointer Ai and the data of the sector table 41 corresponding thereto are respectively acquired (steps S2 and S3), and the acquired data of the flash memory 5 and the corresponding data are acquired. The data in the sector table 41 is compared (step S4). If they match, the microcomputer 3 displays the sector table 41.
The value of the work address pointer Ai is compared with the final address of the valid data of the block including the address indicated by the work address pointer Ai (step S5). The work address pointer Ai
If the value of and the last address of the above block match,
It is determined that the contents of the block all match. Therefore, the contents of the block are not rewritten. If there is an uncompared block in the flash memory 5 storing the sector management data 51 (step S9), the start address of the uncompared block is set in the work address pointer Ai (step S10).

【0031】上記ワークアドレスポインタAiの値が上
記ブロックの最終アドレスでない場合、上記マイクロコ
ンピュータ3は当該ブロックに格納される未比較のデー
タを取得する為、上記ワークアドレスポインタAiの値
を次の値に進める(ステップS6)。
When the value of the work address pointer Ai is not the final address of the block, the microcomputer 3 acquires the uncompared data stored in the block, and therefore the value of the work address pointer Ai is set to the next value. (Step S6).

【0032】また、上記ワークアドレスポインタAiに
よって示されるフラッシュメモリ5のデータがそれに対
応するセクタテーブル41のデータと一致しない場合、
マイクロコンピュータ3は上記不一致の検出されたブロ
ックのデータを一括消去し(ステップS7)、上記ブロ
ックに対応するセクタテーブル41のデータを転送して
上記フラッシュメモリ5に書込み(ステップS8)、上
記セクタ管理データ51を更新する。上記セクタ管理デ
ータ51を格納する未比較のブロックがある場合(ステ
ップS9)、上記書換え動作が終了した後、上記マイク
ロコンピュータ3は上記未比較のブロックの先頭アドレ
スを上記ワークアドレスポインタAiにセットする(ス
テップS10)。
If the data in the flash memory 5 indicated by the work address pointer Ai does not match the corresponding data in the sector table 41,
The microcomputer 3 collectively erases the data of the block in which the mismatch is detected (step S7), transfers the data of the sector table 41 corresponding to the block and writes the data in the flash memory 5 (step S8), and the sector management. The data 51 is updated. If there is an uncompared block that stores the sector management data 51 (step S9), the microcomputer 3 sets the start address of the uncompared block in the work address pointer Ai after the rewriting operation is completed. (Step S10).

【0033】上記マイクロコンピュータ3は、上記セク
タ管理データ51を格納する全てのブロックとそれに対
応するセクタテーブル41との比較が終了する迄、上記
比較動作を繰返す(ステップS2〜S10)。
The microcomputer 3 repeats the comparison operation until the comparison of all the blocks storing the sector management data 51 and the corresponding sector table 41 is completed (steps S2 to S10).

【0034】上記セクタ管理データ51を格納する全て
のブロックの比較が終了したならばカードインタフェー
ス2を介して図示しない信号を出力し、セクタ管理デー
タ51の更新が終了したことをホストCPU11に通知
する(ステップS11)。
When the comparison of all the blocks storing the sector management data 51 is completed, a signal not shown is output via the card interface 2 to notify the host CPU 11 that the update of the sector management data 51 is completed. (Step S11).

【0035】メモリカード1のパワーオフは、ホストC
PU11よりシステムバス13を介して供給される図示
しない信号によってマイクロコンピュータ3に通知され
る。このときにライトバッファ42に保持されているデ
ータがあれば、上記マイクロコンピュータ3はフラッシ
ュメモリ5に上記データを書込み、上記セクタテーブル
41を更新する。上記書込みが終了した後、マイクロコ
ンピュータ3は上述のリセットコマンドが供給された場
合と同様の手順で、上記セクタ管理データ51を更新す
る。即ち、セクタ管理データ51の先頭アドレスの値を
ワークアドレスポインタAiにセットする(ステップS
1)。上記ワークアドレスポインタAiの値を進めなが
らセクタ管理データ51の内容とそれに対応する上記セ
クタテーブル41の内容とをブロック単位で比較し、不
一致の検出されたブロックのデータを対応するセクタテ
ーブル41の内容によって書換える。(ステップS2〜
S10)。上記セクタ管理データ51を格納する全ての
ブロックの比較と、不一致が検出されたブロックの書換
えとが終了したならば図示しない信号によってセクタ管
理データ51の更新が終了したことをホストCPU11
に通知する(ステップS11)。
The memory card 1 is powered off by the host C.
The microcomputer 3 is notified by a signal (not shown) supplied from the PU 11 via the system bus 13. At this time, if there is data held in the write buffer 42, the microcomputer 3 writes the data in the flash memory 5 and updates the sector table 41. After the writing is completed, the microcomputer 3 updates the sector management data 51 in the same procedure as when the reset command is supplied. That is, the value of the start address of the sector management data 51 is set in the work address pointer Ai (step S
1). While advancing the value of the work address pointer Ai, the contents of the sector management data 51 and the contents of the corresponding sector table 41 are compared in block units, and the data of the block in which a mismatch is detected is stored in the corresponding sector table 41. Rewrite by. (Step S2-
S10). When the comparison of all the blocks storing the sector management data 51 and the rewriting of the block in which the mismatch is detected are completed, the host CPU 11 indicates that the update of the sector management data 51 is completed by a signal not shown.
(Step S11).

【0036】本実施例によれば以下の作用効果がある。
フラッシュメモリ5に格納されるセクタ管理データ51
の内容をPSRAN4に転送してセクタテーブル41を
生成し、セクタの利用状況の変化に伴い逐次上記セクタ
テーブル41を更新する。上記PSRSM4の電源停止
のときに、上記セクタテーブル41に保持された最新の
セクタの利用状況を上記セクタ管理データ51に反映す
る。このとき上記フラッシュメモリ5のブロック単位で
上記セクタ管理データ51のデータとそれに対応する上
記セクタテーブル41のデータとを比較し、不一致のブ
ロックのみデータを書換える。これにより上記フラッシ
ュメモリ5における上記セクタ管理データ51の無駄な
書換えを防止し、当該フラッシュメモリ5のデータ書換
え回数を低減することができる。
According to this embodiment, there are the following effects.
Sector management data 51 stored in the flash memory 5
Contents are transferred to the PSRAN 4 to generate the sector table 41, and the sector table 41 is sequentially updated in accordance with changes in the usage status of the sector. When the power supply of the PSRSM4 is stopped, the latest sector usage status held in the sector table 41 is reflected in the sector management data 51. At this time, the data of the sector management data 51 and the corresponding data of the sector table 41 are compared in block units of the flash memory 5, and the data is rewritten only in the unmatched blocks. As a result, unnecessary rewriting of the sector management data 51 in the flash memory 5 can be prevented, and the number of times of rewriting data in the flash memory 5 can be reduced.

【0037】また、上記比較動作によって内容が一致す
るブロックの書換えを実施しないことにより、上記セク
タ管理データ51に対する書換えに要する時間を短縮す
ることができる。本実施例に示される1ブロックが16
Kバイトの容量を有するフラッシュメモリの場合を例に
説明する。上記フラッシュメモリ5において、データ消
去速度を2秒/ブロック、データ書込み速度を10マイ
クロ秒/バイトとすると、1ブロックのデータ書換えに
要する時間は 2秒+(10マイクロ秒*16Kバイト)=2160ミ
リ秒 となる。一方フラッシュメモリ5のデータとそれに対応
するPSRAM4のデータとを夫々読出して比較する動
作の処理速度は1マイクロ秒/バイトである。従って1
ブロック、即ち16Kバイトの上記データ比較にかかる
時間は16ミリ秒である。これにより上記データ書換え
に要する時間と上記比較動作に要する時間との差は 2160ミリ秒−16ミリ秒=2144ミリ秒 となる。このように上記比較動作はデータ書換えに比し
て1ブロック当たり2秒以上短い時間で終了する。従っ
て上記比較動作に多少の時間を要したとしても、上記セ
クタ管理データ51の内容と上記セクタテーブル41の
内容とがブロック単位で一致する場合は、無条件に上記
セクタ管理データ51の内容を書換える場合より処理時
間を短縮することができる。即ち、上記比較動作によっ
て不要なセクタ管理データ51の書換えを防止すること
によって上記メモリカード1の電源停止時における処理
時間を短縮することができる。
By not rewriting the block having the same contents by the comparison operation, the time required for rewriting the sector management data 51 can be shortened. One block shown in this embodiment is 16
A case of a flash memory having a capacity of K bytes will be described as an example. In the flash memory 5, assuming that the data erasing speed is 2 seconds / block and the data writing speed is 10 microseconds / byte, the time required for rewriting data of one block is 2 seconds + (10 microseconds * 16 Kbytes) = 2160 mm. Seconds. On the other hand, the processing speed of the operation of reading and comparing the data in the flash memory 5 and the corresponding data in the PSRAM 4 is 1 microsecond / byte. Therefore 1
The time required to compare the data of a block, that is, 16 Kbytes is 16 milliseconds. As a result, the difference between the time required to rewrite the data and the time required to perform the comparison operation is 2160 ms−16 ms = 2144 ms. As described above, the comparison operation is completed in a time shorter than 2 seconds per block as compared with the data rewriting. Therefore, even if the comparison operation takes some time, if the contents of the sector management data 51 and the contents of the sector table 41 match in block units, the contents of the sector management data 51 are unconditionally rewritten. The processing time can be shortened compared to the case of That is, by preventing unnecessary rewriting of the sector management data 51 by the comparison operation, the processing time when the power of the memory card 1 is stopped can be shortened.

【0038】上記比較動作は、上記マイクロコンピュー
タ3の動作プログラムに上記比較動作の機能を追加する
ことにより上記マイクロコンピュータ3による制御が可
能となる。これにより当該メモリカード1に回路を追加
することなく上記比較動作を行うことができる。
The comparison operation can be controlled by the microcomputer 3 by adding the function of the comparison operation to the operation program of the microcomputer 3. Thereby, the comparison operation can be performed without adding a circuit to the memory card 1.

【0039】また上記PSRAM4にライトバッファ4
2を設け、フラッシュメモリ5に書込むべきデータを一
時的に保持する。これにより当該フラッシュメモリ5の
データ消去の終了を待つ時間が不要となり、上記メモリ
カード1を利用するファイルメモリシステムの処理能力
を向上させることが可能である。
The write buffer 4 is added to the PSRAM 4.
2 is provided to temporarily hold the data to be written in the flash memory 5. This eliminates the need to wait for the end of the data erasing of the flash memory 5 and improves the processing capacity of the file memory system using the memory card 1.

【0040】更に、上記セクタの容量をハードディスク
装置(以下単にHDDとも記す)やフレキシブルディス
ク装置(以下単にFDDとも記す)に用いられるセクタ
と同容量、例えば512バイトとすることにより、上記
メモリカード1をホストシステム10の図示しないディ
スクインタフェースに接続することが可能となる。これ
により上記メモリカード1を上記FDDやHDDのよう
な磁気記憶装置の代わりにホストシステム10の補助記
憶装置として利用することができる。また上記メモリカ
ード1は磁気ディスクを回転させる必要がない為、上記
磁気記憶装置と比べて消費電力が少なく、小型化、軽量
化に有利である。従って上記メモリカード1を利用する
ことによりホストシステム10の小型化、軽量化及び省
電力化が可能となる。
Further, the memory card 1 has the same capacity as the sector used in a hard disk device (hereinafter also simply referred to as HDD) or a flexible disk device (hereinafter simply referred to as FDD), for example, 512 bytes. Can be connected to a disk interface (not shown) of the host system 10. Accordingly, the memory card 1 can be used as an auxiliary storage device of the host system 10 instead of the magnetic storage device such as the FDD or HDD. Further, since the memory card 1 does not need to rotate the magnetic disk, it consumes less power than the magnetic storage device, and is advantageous in downsizing and weight saving. Therefore, by using the memory card 1, it is possible to reduce the size and weight of the host system 10 and save power.

【0041】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited thereto and needless to say, various modifications can be made without departing from the scope of the invention. Yes.

【0042】例えば、本発明に係るメモリカードの構成
は本実施例に限定されない。例えばダイナミック・ラン
ダム・アクセス・メモリのような擬似スタティック・ラ
ンダム・アクセス・メモリ以外の揮発性半導体記憶装置
も利用可能である。またライトバッファをカードインタ
フェース手段に生成することもできる。
For example, the configuration of the memory card according to the present invention is not limited to this embodiment. For example, a volatile semiconductor memory device other than the pseudo static random access memory such as the dynamic random access memory can be used. It is also possible to generate a write buffer in the card interface means.

【0043】また、制御手段は本実施例に限定されな
い。例えばカードインタフェースにコンパレータを設
け、上記コンパレータと、セクタ管理データのデータを
取り込むレジスタと、セクタテーブルのデータを取込む
レジスタとによって構成される制御手段としてもよい。
即ち,比較すべき上記セクタ管理データと上記セクタテ
ーブルとを夫々の上記レジスタに取込み、上記コンパレ
ータによって上記レジスタに取込まれたデータを比較さ
せてもよい。
The control means is not limited to this embodiment. For example, a comparator may be provided in the card interface, and the control means may be configured by the comparator, a register for taking in the data of the sector management data, and a register for taking in the data of the sector table.
That is, the sector management data to be compared and the sector table may be fetched into the respective registers, and the data fetched in the register by the comparator may be compared.

【0044】更に、メモリカードの動作を指示するコマ
ンド及び信号の種類も本実施例に限定されない。
Further, the types of commands and signals for instructing the operation of the memory card are not limited to those in this embodiment.

【0045】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるコンピ
ュータの補助記憶装置として利用されるメモリカードに
適用した場合について説明したが、本発明はそれに限定
されず、少なくともブロック単位で電気的にデータの書
換えを可能とする不揮発性半導体記憶装置を利用したフ
ァイルメモリシステムに適用して有効な技術である。
In the above description, the case where the invention made by the present inventor is mainly applied to a memory card used as an auxiliary storage device of a computer, which is a field of application of the background, has been described, but the present invention is limited thereto. However, the technique is effective when applied to a file memory system using a non-volatile semiconductor memory device capable of electrically rewriting data at least in block units.

【0046】[0046]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by the typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0047】即ち、ファイルを格納する単位であるセク
タ毎の利用状況を揮発性半導体記憶装置に生成されたセ
クタテーブルに保持し、上記揮発性半導体記憶装置に対
する電源が停止されるときに不揮発性半導体記憶装置に
格納されるセクタ管理データの内容を書換えることによ
り、上記不揮発性半導体記憶装置に対する書換え回数の
低減をはかるファイルメモリシステムにおいて、上記セ
クタ管理データを書換える場合に上記セクタ管理データ
と、上記セクタテーブルの内容とを比較し、不一致が検
出されたブロックのみ上記セクタテーブルの内容で上記
セクタ管理データを書換える。これにより上記セクタ管
理データの無駄な書換えが防止され、上記不揮発性半導
体記憶装置の書換え回数を不要に増加させることなく上
記セクタ管理データを更新することができる。
That is, the utilization status of each sector, which is a unit for storing a file, is held in a sector table generated in the volatile semiconductor memory device, and the nonvolatile semiconductor memory is used when the power supply to the volatile semiconductor memory device is stopped. By rewriting the contents of the sector management data stored in the storage device, in the file memory system intended to reduce the number of times of rewriting to the nonvolatile semiconductor memory device, in the case of rewriting the sector management data, the sector management data, The contents of the sector table are compared with each other, and the sector management data is rewritten with the contents of the sector table only in the block in which a mismatch is detected. This prevents unnecessary rewriting of the sector management data, and the sector management data can be updated without unnecessarily increasing the number of times of rewriting of the nonvolatile semiconductor memory device.

【0048】また、上記無駄なデータ書換えが防止され
ることにより、電源停止のときに上記セクタテーブルの
内容をセクタ管理データに反映させる為に行う不揮発性
半導体記憶装置のデータ書換え時間を短縮するこができ
る。
Further, since the wasteful data rewriting is prevented, the data rewriting time of the nonvolatile semiconductor memory device for reflecting the contents of the sector table in the sector management data when the power supply is stopped can be shortened. You can

【0049】上記セクタ管理データを格納するブロック
のデータは、上記不一致が検出された時点で当該ブロッ
クに対する比較動作が停止され、対応するセクタテーブ
ルのデータに書換えられる。これにより上記不一致が検
出されてから比較動作を当該ブロックの最終データ迄行
う時間が省略される。従って上記不揮発性半導体記憶装
置に格納されるセクタ管理データの書換えに要する時間
が更に短縮される。
The data of the block which stores the sector management data is rewritten to the data of the corresponding sector table after the comparison operation for the block is stopped when the mismatch is detected. As a result, the time for performing the comparison operation until the final data of the block is detected after the above mismatch is detected is omitted. Therefore, the time required for rewriting the sector management data stored in the nonvolatile semiconductor memory device is further shortened.

【0050】フラッシュメモリなどのように記憶データ
の書換えによってメモリセルが電気的なストレスを受け
る不揮発性半導体記憶装置に対し、記憶データの書換え
回数を低減することは上記メモリセルの劣化を抑えるこ
とができる。従って当該不揮発性半導体記憶装置を搭載
するメモリカードの寿命を延ばし、ファイルメモリシス
テムの使用コストを低減することができる。
For a nonvolatile semiconductor memory device such as a flash memory in which a memory cell is electrically stressed by rewriting the stored data, reducing the number of times of rewriting the stored data suppresses the deterioration of the memory cell. it can. Therefore, it is possible to extend the life of the memory card equipped with the nonvolatile semiconductor memory device and reduce the use cost of the file memory system.

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

【図1】本発明の一実施例に係るメモリカードのブロッ
ク図である。
FIG. 1 is a block diagram of a memory card according to an embodiment of the present invention.

【図2】図1に示されるメモリカードのフラッシュメモ
リ及びPSRAMの記憶領域の一例説明図である。
FIG. 2 is an explanatory diagram showing an example of storage areas of a flash memory and a PSRAM of the memory card shown in FIG.

【図3】図1に示されるメモリカードにおいてセクタ管
理データとセクタテーブルとを比較する動作の一例フロ
ーチャートである。
3 is a flowchart of an example of an operation of comparing sector management data and a sector table in the memory card shown in FIG.

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

1 メモリカード 2 カードインタフェース 3 マイクロコンピュータ 4 PSRAM 5 フラッシュメモリ 11 ホストCPU 13 システムバス 41 セクタテーブル 42 ライトバッファ 51 セクタ管理データ 1 Memory Card 2 Card Interface 3 Microcomputer 4 PSRAM 5 Flash Memory 11 Host CPU 13 System Bus 41 Sector Table 42 Write Buffer 51 Sector Management Data

───────────────────────────────────────────────────── フロントページの続き (72)発明者 齋江 靖彦 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 菊池 隆 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 福田 宏 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 鈴木 猛 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 門脇 茂 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 大久保 京夫 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 岸 正道 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 片山 国弘 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 (72)発明者 柿 健一 神奈川県海老名市下今泉810番地 株式会 社日立製作所オフィスシステム事業部内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Yasuhiko Saie 5-20-1 Kamimizuhoncho, Kodaira-shi, Tokyo Hiratsuko ELS Engineering Co., Ltd. (72) Inventor Takashi Kikuchi Kodaira, Tokyo 5-20-1 Jitsumizu Honcho, Ichi, Japan, within Hitate Super L.S.I. Engineering Co., Ltd. (72) Inventor Hiroshi Fukuda 5-20-1, Kamimizuhoncho, Kodaira, Tokyo Metropolitan Government I Engineering Co., Ltd. (72) Inventor Takeshi Suzuki 5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Hiratsuru SLS Engineering Co., Ltd. (72) Inventor Shigeru Kadowaki Kodaira, Tokyo 5-20-1 Jousuihonmachi Hitate Super LSI Engineering Co., Ltd. (72) Inventor Kyoo Okubo Higashi 5-20-1 Kamimizuhoncho, Kodaira-shi, Tokyo Within Hitsudori SLS Engineering Co., Ltd. (72) Inventor Masamichi Kishi 5-20-1 Kamimizuhoncho, Kodaira-shi, Tokyo SII Engineering Co., Ltd. (72) Inventor Kunihiro Katayama 1099, Ozenji, Aso-ku, Kawasaki-shi, Kanagawa Hitachi, Ltd. System Development Laboratory Hitachi, Ltd. Office Systems Division

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ファイルのデータをセクタ単位で格納す
るファイルメモリシステムであって、 複数セクタ以上の記憶容量を有するブロック単位で電気
的にデータ消去が可能にされ、且つ、セクタ毎の利用状
況を示すセクタ管理データの格納領域を備える不揮発性
半導体記憶装置と、 上記不揮発性半導体記憶装置から転送される上記セクタ
管理データが初期設定され、ファイル操作に応じてその
内容が更新されるセクタテーブルの格納領域を備える揮
発性半導体記憶装置と、 上記揮発性半導体記憶装置に対する電源供給が停止され
るときに、上記不揮発性半導体記憶装置が保持する上記
セクタ管理データの内容を上記ブロック単位で上記セク
タテーブルの内容と比較し、不一致が検出されたブロッ
クの記憶領域に対してのみ対応する上記セクタテーブル
の内容で書換える制御手段と、を備えてなることを特徴
とするファイルメモリシステム。
1. A file memory system for storing file data in sector units, wherein data can be electrically erased in block units having a storage capacity of a plurality of sectors, and the utilization status of each sector is A nonvolatile semiconductor memory device having a storage area for the sector management data shown, and storage of a sector table in which the sector management data transferred from the nonvolatile semiconductor memory device is initialized and the contents are updated according to a file operation. A volatile semiconductor memory device having an area, and the contents of the sector management data held by the nonvolatile semiconductor memory device when the power supply to the volatile semiconductor memory device is stopped The above sector that is compared with the contents and corresponds only to the storage area of the block in which a mismatch is detected A file memory system comprising: a control unit that rewrites the contents of a table.
【請求項2】 上記制御手段は、上記不一致が検出され
たとき当該不一致に係るブロックに対する比較動作を中
断して書換えを行った後、上記セクタ管理データを格納
する未だ比較していない他のブロックとそれに対応する
上記セクタテーブルの内容との比較動作に移行するもの
であることを特徴とする請求項1記載のファイルメモリ
システム。
2. The control means, when the non-coincidence is detected, interrupts the comparison operation for the non-coincidence block to perform rewriting, and then stores the sector management data in another block not yet compared. 3. The file memory system according to claim 1, wherein the operation shifts to a comparison operation between the contents of the sector table and the contents of the sector table corresponding thereto.
【請求項3】 外部と情報の受け渡しを行うカードイン
タフェース手段を更に備え、 上記カードインタフェース手段に、上記不揮発性半導体
記憶装置と、上記揮発性半導体記憶装置と、上記制御手
段とが夫々接続され、全体がカード基板上に搭載されて
メモリカードとして成るものであることを特徴とする請
求項1または2記載のファイルメモリシステム。
3. A card interface means for exchanging information with the outside is further provided, and the non-volatile semiconductor memory device, the volatile semiconductor memory device, and the control means are connected to the card interface means, respectively. 3. The file memory system according to claim 1, wherein the entire file memory system is mounted on a card substrate to form a memory card.
JP23435994A 1994-09-02 1994-09-02 File memory system Withdrawn JPH0877081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23435994A JPH0877081A (en) 1994-09-02 1994-09-02 File memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23435994A JPH0877081A (en) 1994-09-02 1994-09-02 File memory system

Publications (1)

Publication Number Publication Date
JPH0877081A true JPH0877081A (en) 1996-03-22

Family

ID=16969775

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23435994A Withdrawn JPH0877081A (en) 1994-09-02 1994-09-02 File memory system

Country Status (1)

Country Link
JP (1) JPH0877081A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998047065A1 (en) * 1997-04-16 1998-10-22 Sony Corporation Recording medium control device and method
US6845916B2 (en) 1998-04-17 2005-01-25 Hitachi, Ltd. IC card having memory contents transfer control unit and method of storing data in IC card
KR100592859B1 (en) * 1997-04-16 2006-11-30 소니 가부시끼 가이샤 Recording medium control device and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998047065A1 (en) * 1997-04-16 1998-10-22 Sony Corporation Recording medium control device and method
US6523105B1 (en) 1997-04-16 2003-02-18 Sony Corporation Recording medium control device and method
KR100592859B1 (en) * 1997-04-16 2006-11-30 소니 가부시끼 가이샤 Recording medium control device and method
US6845916B2 (en) 1998-04-17 2005-01-25 Hitachi, Ltd. IC card having memory contents transfer control unit and method of storing data in IC card
US7093766B2 (en) 1998-04-17 2006-08-22 Hitachi, Ltd. IC card having memory contents transfer control unit and method of storing data in IC card

Similar Documents

Publication Publication Date Title
US7440337B2 (en) Nonvolatile semiconductor memory apparatus having buffer memory for storing a program and buffering work data
US7093064B2 (en) Programming suspend status indicator for flash memory
TWI507871B (en) Data storage device, memory system, and computing system using nonvolatile memory device
US5829013A (en) Memory manager to allow non-volatile memory to be used to supplement main memory
EP0691008B1 (en) Flash memory mass storage architecture
US6446179B2 (en) Computing system with volatile lock architecture for individual block locking on flash memory
US5930815A (en) Moving sequential sectors within a block of information in a flash memory mass storage architecture
JP4834676B2 (en) System and method using on-chip non-volatile memory write cache
US6401166B2 (en) Data processing system, block erasing type memory device and memory storing program for controlling memory device
JP4129381B2 (en) Nonvolatile semiconductor memory device
JP2647312B2 (en) Batch erase nonvolatile semiconductor memory device
US7174440B2 (en) Method and apparatus for performing block caching in a non-volatile memory system
US7739443B2 (en) Memory controller, memory device and control method for the memory controller
KR101391270B1 (en) Non-volatile memory system using MRAM
JP2002366420A (en) Nonvolatile memory and its rewriting control method
JP2008500678A (en) Configurable ready / busy control
JPH0778766B2 (en) Method and apparatus for controlling direct execution of program in external storage device using randomly accessible and rewritable memory
US6189070B1 (en) Apparatus and method for suspending operation to read code in a nonvolatile writable semiconductor memory
US7149844B2 (en) Non-volatile memory device
JP3421581B2 (en) Storage device using nonvolatile semiconductor memory
KR20080075608A (en) A method for minimizing or reducing the memory map table search time and a semiconductor memory device accordingly
US20070113001A1 (en) Semiconductor processor and semiconductor integrated circuit
JPH0877081A (en) File memory system
WO2006067839A1 (en) Storing apparatus and controller
US6898680B2 (en) Minimization of overhead of non-volatile memory operation

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20011106