JPWO1999030239A1 - Storage device and access method - Google Patents
Storage device and access methodInfo
- Publication number
- JPWO1999030239A1 JPWO1999030239A1 JP11-530614A JP53061499A JPWO1999030239A1 JP WO1999030239 A1 JPWO1999030239 A1 JP WO1999030239A1 JP 53061499 A JP53061499 A JP 53061499A JP WO1999030239 A1 JPWO1999030239 A1 JP WO1999030239A1
- Authority
- JP
- Japan
- Prior art keywords
- data
- free block
- block
- free
- information
- 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.)
- Granted
Links
Abstract
(57)【要約】 メモリセルアレイ(1)をアクセスするための、論理アドレスと物理アドレスとの対応関係を記憶するアドレス変換テーブルと空きブロックの位置を示す空きブロックテーブルを、メモリセルアレイ(1)自身の任意のブロックに記憶させる。メモリセルアレイ(1)からデータを読み出す際は、メモリセルアレイ(1)に記憶されているアドレス変換テーブルを参照して、物理アドレスを求め、データを読み出す。また、データを書き込む際は、メモリセルアレイ(1)に格納された空きブロックテーブルから、空きブロックを判別し、その空きブロックにデータを書き込む。さらに、更新されたアドレス変換テーブルと空きブロックテーブルを他の空きブロックに書き込む。 (57) [Abstract] An address conversion table that stores the correspondence between logical addresses and physical addresses for accessing a memory cell array (1) and an empty block table that indicates the location of empty blocks are stored in any block of the memory cell array (1). When reading data from the memory cell array (1), the address conversion table stored in the memory cell array (1) is referenced to determine the physical address and the data is read. When writing data, an empty block is identified from the empty block table stored in the memory cell array (1) and the data is written to that empty block. Furthermore, the updated address conversion table and empty block table are written to another empty block.
Description
【発明の詳細な説明】 記憶装置及びアクセス方法 技術分野 この発明は、記憶装置及びアクセス方法に関し、特にブロック消去型記憶装置 とそのアクセス方法に関する。[Detailed Description of the Invention] Storage Device and Access Method Technical Field This invention relates to a storage device and an access method, and more particularly to a block-erasable storage device and an access method thereof.
背景技術 フラッシュメモリ等のブロック消去型記憶媒体を備え、中央処理装置(CPU )や専用コントローラの制御の下に情報を読み書きするブロック消去型記憶装置 が知られている。BACKGROUND ART Block-erasable storage devices are known that include block-erasable storage media such as flash memory and read and write information under the control of a central processing unit (CPU) or a dedicated controller.
ブロック消去型記憶媒体とは、データを書き込むためには、書き込みの対象と なる領域の記憶内容が予め消去されていなければならず、消去の処理が、書込処 理により扱われる最小記憶容量の単位(一般に、ページ、セグメント等と呼ばれ る)に等しい大きさであるか又はより大きな単位(一般に、ブロックと呼ばれる )でしか行えない記憶媒体を指す。Block-erasable storage media refers to storage media in which the contents of the target area must be erased before data can be written, and erasure can only be performed in units (commonly called blocks) equal to or larger than the smallest unit of storage capacity handled by the write process (commonly called a page, segment, etc.).
ブロック消去型記憶装置は、外部からのアクセスを管理するために、空きブロ ックの位置を表す情報を格納する空きブロックテーブルや論理アドレスと物理ア ドレスとの対応関係を表す情報を格納するアドレス変換テーブルを記憶するSR AM(スタティック型ランダムアクセスメモリ)等を備えている。To manage external access, block-erasing memory devices are equipped with a free block table that stores information indicating the locations of free blocks, and an SRAM (static random access memory) that stores an address translation table that stores information indicating the correspondence between logical addresses and physical addresses.
ブロック消去型記憶装置は、書き込み要求を受信すると、空きブロックテーブ ルに登録されている空ブロックを検索し、索出したブロックにデータを書き込み 、そのブロックの物理アドレスと論理アドレスとの対応関係をアドレス変換テー ブルに追加し、さらに、そのブロックを空きブロックテーブルから削除 する。When a block-erasing storage device receives a write request, it searches for an empty block registered in the empty block table, writes the data to the found block, adds the correspondence between the physical address and logical address of that block to the address translation table, and then deletes the block from the empty block table.
また、ブロック消去型記憶装置は、読み出し要求を受信すると、読み出し対象 のデータの論理アドレスをキーとして、アドレス変換テーブルを検索して、読み 出し対象のデータが記憶されている位置の物理アドレスを判別し、その位置から データを読み出していた。Furthermore, when a block-erasing storage device receives a read request, it searches the address translation table using the logical address of the data to be read as a key to determine the physical address of the location where the data to be read is stored, and then reads the data from that location.
このような記憶装置では、SRAM等が占める容積の分だけ、記憶装置全体の 容積も増大する。このため、このような記憶装置は、JEIDA/PCMCIA カード等、低容積が要求される用途に用いる場合には、容積を抑えるための工夫 が必要であった。In such storage devices, the overall volume of the storage device increases by the volume occupied by the SRAM, etc. Therefore, when using such storage devices in applications requiring low volume, such as JEIDA/PCMCIA cards, it is necessary to devise ways to reduce the volume.
また、SRAMは消費電力が大きく、各種テーブルを格納するためにSRAM を使用すると、記憶装置全体としての消費電力も増加してしまい、JEIDA/ PCMCIAカード等、低消費電力が要求される用途に適さなくなってしまうと いう問題があった。Additionally, SRAM consumes a lot of power, and using SRAM to store various tables increases the overall power consumption of the storage device, making it unsuitable for applications requiring low power consumption, such as JEIDA/PCMCIA cards.
発明の開示 この発明は上記実状に鑑みてなされたもので、小容積及び低消費電力のブロッ ク消去型記憶装置とそのアクセス方法とを提供することを目的とする。DISCLOSURE OF THE INVENTION This invention was developed in consideration of the above-mentioned circumstances, and aims to provide a block-erasable memory device with a small volume and low power consumption, and an access method therefor.
上記目的を達成するため、この発明の第1の観点にかかる記憶装置は、 物理アドレスが割り当てられた複数のメモリブロックを含む記憶手段(1)と 、 前記記憶手段の記憶データをメモリブロック単位で一括して消去する消去手段 (1e)と、 データと論理アドレスを入力し、該データの前記記憶手段内の記憶位置を定め 、該データを該記憶位置に書き込む書込手段(4X,4B,5,20)と、 から構成され、 前記記憶手段は、前記論理アドレスと前記記憶手段の物理アドレスとの対応関 係を表す情報を格納するアドレス変換テーブルを記憶し、 前記書込手段は、前記データを書き込んだ位置の物理アドレスと入力した論理 アドレスとの対応付けを表す情報を前記アドレス変換テーブルに追加し、又は前 記アドレス変換テーブルを更新する手段(4X,4B,5,20)を備える、 ことを特徴とする。To achieve the above object, a storage device according to a first aspect of the present invention comprises: storage means (1) including a plurality of memory blocks to which physical addresses are assigned; erasing means (1e) for collectively erasing data stored in the storage means by memory block; writing means (4X, 4B, 5, 20) for inputting data and a logical address, determining a storage location for the data within the storage means, and writing the data to the storage location; The storage means stores an address conversion table that stores information indicating the correspondence between the logical address and the physical address of the storage means; The writing means includes means (4X, 4B, 5, 20) for adding information indicating the correspondence between the physical address of the location where the data is written and the input logical address to the address conversion table or updating the address conversion table.
この構成の記憶装置では、アドレス変換テーブルは、ブロック消去型記憶媒体 である記憶手段に記憶されている。このため、前記記憶手段の他にアドレス変換 テーブル記憶用のSRAM等の記憶媒体を配置する必要がない。従って、比較的 小容積で低消費電力のブロック消去型の記憶装置を提供することができる。In a storage device with this configuration, the address translation table is stored in a storage means, which is a block-erasable storage medium. Therefore, there is no need to provide a storage medium such as an SRAM for storing the address translation table in addition to the storage means. This makes it possible to provide a block-erasable storage device with a relatively small volume and low power consumption.
前記記憶装置は、 前記アドレス変換テーブルが書き込まれているブロックの物理アドレスを記憶 する手段(20)と、 前記アドレス変換テーブルが格納されているブロックをアクセスし、読み出し 対象のデータの論理アドレスに対応する物理アドレスを読み出す物理アドレス読 出手段(4X,4B,5,20)と、 前記物理アドレス読出手段により読み出された物理アドレスに格納されている データを読み出して出力する手段(4X,4B,5,20)と、 から構成される読出手段(4X,4B,5,20)をさらに配置してもよい。The storage device may further include reading means (4X, 4B, 5, 20) consisting of: means (20) for storing the physical address of the block in which the address conversion table is written; physical address reading means (4X, 4B, 5, 20) for accessing the block in which the address conversion table is stored and reading a physical address corresponding to the logical address of the data to be read; means (4X, 4B, 5, 20) for reading and outputting data stored at the physical address read by the physical address reading means.
この読出手段により、読み出し対象データの物理アドレスを、記憶手段に格納 されたアドレス変換テーブルから判別して、読み出すことができる。This reading means can determine the physical address of the data to be read from the address conversion table stored in the storage means and read it out.
前記記憶手段は、データを記憶していない空きブロックを示す情報を格納する 空きブロックテーブルを記憶してもよい。The storage means may also store a free block table that stores information indicating free blocks that do not store data.
このような構成とすれば、記憶手段の他に使用するSRAMなどのメモリの使 用量をさらに低減し、小容積化、低消費電力化を進めることができる。With this configuration, the amount of memory used, such as SRAM, in addition to the storage means can be further reduced, leading to smaller volume and lower power consumption.
そして、前記空きブロックに前記情報が書き込まれる前に存在した前記空きブ ロックの情報を格納する前記空きブロックテーブルは除去され、そして、前記空 きブロック書込手段により前記空きブロックに前記情報が書き込まれた後に残存 する前記空きブロックの情報を格納する前記空きブロックテーブルを前記記憶手 段に記憶させるようにすれば、空きブロックテーブルに含まれる空きブロックの 情報は更新され、随時最新の空きブロックの情報を得ることができる。The free block table that stores the information about the free blocks that existed before the information was written to the free blocks is then deleted, and the free block table that stores the information about the free blocks that remain after the information is written to the free blocks by the free block writing means is stored in the storage means. This updates the free block information contained in the free block table, making it possible to obtain the latest free block information at any time.
また、前記記憶手段は、例えば、複数チップのフラッシュメモリによって構成 されたものとすることができる。この場合、前記アドレス変換テーブル(及び前 記空きブロックテーブル)は、いずれかのチップのフラッシュメモリの任意の1 つのブロックに記憶すればよい。そして、アドレス変換テーブル及び空きブロッ クテーブルがどのチップのどのブロックに記憶されているかを示す情報を記憶す る手段を設ければよい。The storage means may be configured, for example, with multiple flash memory chips. In this case, the address translation table (and the free block table) may be stored in any one block of the flash memory of any one of the chips. A means for storing information indicating which block of which chip the address translation table and free block table are stored may then be provided.
前記記憶手段は、例えば、前記アドレス変換テーブルと前記空きブロックテー ブルを1つのブロック内に記憶する。The storage means stores, for example, the address translation table and the free block table in one block.
このような構成とすれば、アドレス変換テーブルと空きブロックテーブルの格 納のために使用するブロックを1つに抑え、記憶手段の記憶容量を有効に使用す ることができる。また、これらのテーブルの記憶位置の管理などが容易になる。This configuration allows for efficient use of the storage capacity of the memory means by limiting the number of blocks required to store the address translation table and free block table to one. It also simplifies the management of the storage locations of these tables.
また、この発明の第2の観点にかかる記憶装置は、 物理アドレスが割り当てられた複数のメモリブロックを含む記憶手段(1)と 、 前記記憶手段の記憶データをメモリブロック単位で一括して消去する消去手 段(1e)と、 書き込み対象のデータと論理アドレスを入力し、該データの前記記憶手段内の 記憶位置を定め、該データを該記憶位置に書き込む書込手段(4X,4B,5, 20)と、 から構成され、 前記記憶手段は、前記データを記憶していない空きブロックを表す空きブロッ ク情報を記憶しており、 前記書込手段は、前記空きブロック情報が示す空きブロックに前記データを書 き込む、 ことを特徴とする。A second aspect of the present invention provides a storage device comprising: storage means (1) including a plurality of memory blocks to which physical addresses are assigned; erasing means (1e) for erasing data stored in the storage means in units of memory blocks at once; writing means (4X, 4B, 5, 20) for inputting data to be written and a logical address, determining a storage location for the data within the storage means, and writing the data to the storage location; wherein the storage means stores free block information indicating free blocks that do not store the data; wherein the writing means writes the data to the free blocks indicated by the free block information.
この構成によれば、空きブロック情報は、ブロック消去型記憶媒体である記憶 手段に記憶されている。このため、前記記憶手段の他に空きブロック情報記憶用 のSRAM等の他の記憶媒体を配置する必要がない。従って、比較的小容積で低 消費電力のブロック消去型の記憶装置を提供することができる。According to this configuration, free block information is stored in the storage means, which is a block-erasing storage medium. Therefore, there is no need to provide another storage medium, such as an SRAM, for storing free block information in addition to the storage means. This makes it possible to provide a block-erasing storage device that is relatively small in volume and consumes low power.
また、前記書込手段は、前記記憶手段に記憶された前記空きブロック情報を、 前記書込手段により前記空きブロックに前記データが書き込まれた後に残存する 前記空きブロックの情報を表す前記空きブロック情報に更新する手段(1e,4 X,4B,5,20)を更に備えるようにすれば、前記空きブロック情報は更新 され、随時最新の空きブロックの情報を得ることができる。Furthermore, if the writing means further includes means (1e, 4 X, 4B, 5, 20) for updating the free block information stored in the storage means to free block information representing the free block information remaining after the data is written to the free block by the writing means, the free block information is updated, and the latest free block information can be obtained at any time.
前記空きブロック情報は、各空きブロックの一部に記憶され、他の1つの空き ブロックを示すように連鎖的に登録された連鎖情報から構成されるものとするこ とができる。この場合、前記書込手段は、前記連鎖情報に従って、空きブロック を判別し、該空きブロックに前記データを書き込む手段(4X,4B,5,20 )を備えるものとすることができる。The free block information may be stored in a portion of each free block and may consist of chain information registered in a chain to point to another free block. In this case, the writing means may include means (4X, 4B, 5, 20) for identifying a free block according to the chain information and writing the data to that free block.
この構成によれば、空きブロックテーブルを格納するために1つのブロック を使用する必要がなく、記憶媒体の使用効率が高い。また、空きブロックの連鎖 情報に基づいて、書き込み対象のブロックを特定するので、各ブロックの使用頻 度を均一化することができる。This configuration eliminates the need to use a single block to store the free block table, resulting in more efficient use of storage media. Furthermore, since the target block for writing is identified based on free block chain information, the frequency of use of each block can be evened out.
前記空きブロック情報を連鎖情報から構成する場合、最初の空きブロックのア ドレスを記憶する先頭空きブロック記憶手段(20)等を配置し、ここに記憶さ れた物理アドレスが付された空きブロックにデータを書き込み、先頭空きブロッ ク記憶手段の内容をデータを書き込んだブロックに登録されている連鎖情報で更 新してもよい。When the free block information is constructed from chain information, a first free block storage means (20) for storing the address of the first free block may be provided, and data may be written to the free block assigned the physical address stored therein, and the contents of the first free block storage means may be updated with the chain information registered in the block to which the data has been written.
記憶手段をフラッシュメモリ等から構成する場合、記憶領域はデータ領域と冗 長領域から構成される。この場合、連鎖情報を前記冗長領域に格納しておくこと ができる。When the storage means is configured with a flash memory or the like, the storage area is configured with a data area and a redundant area. In this case, the chain information can be stored in the redundant area.
このような記憶装置においては、連鎖情報は、空きブロックの前記冗長領域に 書き込まれ、前記データは、既に連鎖情報が書き込まれている空きブロックに上 書きされる。In such a storage device, the chain information is written to the redundant area of an empty block, and the data is written over the empty block to which the chain information is already written.
このとき、前記データ領域と前記冗長領域は前記記憶領域の中で互いに重複し ないように配置されることにより、前記データの上書きによっても前記連鎖情報 は破壊されない。In this case, the data area and the redundant area are arranged so that they do not overlap each other within the storage area, so that the chain information is not destroyed even when the data is overwritten.
なお、この第2の観点にかかる記憶装置においても、前記記憶手段は、例えば 、複数チップのフラッシュメモリによって構成されたものとすることができる。In the storage device according to the second aspect, the storage means may also be configured, for example, by a multi-chip flash memory.
この場合、前記連鎖情報は、次の空きブロックがどのチップのどのブロックに記 憶されているかを示す情報によって構成すればよい。In this case, the chain information may be configured by information indicating in which block of which chip the next free block is stored.
また、この発明の第3の観点に係るアクセス方法は、 ブロック単位でデータの消去が可能で、予めデータが消去された空きブロック にデータの書き込みが可能なブロック消去型のメモリへのアクセス方法であって 、 前記メモリに付された物理アドレスとデータの論理アドレスとの対応関係を示 すアドレス変換テーブルを前記メモリ自身に記憶させ、 書き込み対象データとその論理アドレスが供給された時は、該論理アドレスに 既にデータが書き込まれているか否かを前記アドレス変換テーブルにより判別し 、存在すると判別したときは、前記空きブロックを判別して前記データを該空き ブロックに書き込むと共に旧データを持つブロックを消去し、存在しないと判別 したときは、前記空きブロックを判別して前記データを該空きブロックに書き込 み、次に、 前記データが書き込まれた前記ブロックの物理アドレスと前記論理アドレスと の対応を示す情報を前記メモリ内の前記アドレス変換テーブルに追加するか又は その情報を更新し、 読み出し対象データの論理アドレスが供給された時は、前記メモリ内の前記ア ドレス変換テーブルをアクセスして、該当データが格納された位置の物理アドレ スを判別して、該物理アドレスからデータを読み出して出力する、 ことを特徴とする。Furthermore, a third aspect of the present invention relates to an access method for a block-erasing memory, which allows data to be erased in blocks and write data to free blocks from which data has been previously erased. The method stores an address conversion table in the memory, which indicates the correspondence between physical addresses assigned to the memory and the logical addresses of the data. When data to be written and its logical address are supplied, the method uses the address conversion table to determine whether data has already been written to the logical address. If data exists, the method identifies a free block and writes the data to the free block while erasing the block containing the old data. If data does not exist, the method identifies a free block and writes the data to the free block. Next, the method adds or updates information indicating the correspondence between the physical address of the block to which the data has been written and the logical address to the address conversion table in the memory. When the logical address of the data to be read is supplied, the address translation table in the memory is accessed to determine the physical address where the data is stored, and the data is read from that physical address and output.
また、この発明の第4の観点に係るアクセス方法は、 ブロック単位でデータの消去が可能で、予めデータが消去された空きブロック にデータの書き込みが可能なブロック消去型のメモリへのアクセス方法であって 、 前記メモリに、空きブロックを示す空きブロックテーブルを記憶させておき、 書き込み対象データが供給された時に、前記メモリ内の空きブロックテーブル に基づいて空きブロックを判別して、判別した空きブロックに該データを書き込 む、 ことを特徴とする。Furthermore, a fourth aspect of the present invention relates to an access method for a block-erasing memory in which data can be erased in blocks and data can be written to free blocks from which data has been previously erased. The method includes storing a free block table indicating free blocks in the memory, and when data to be written is supplied, identifying a free block based on the free block table in the memory and writing the data to the identified free block.
第3及び第4の観点に係るアクセス方法によれば、メモリの一部をアドレス 変換テーブルや空きブロックテーブルとして使用でき、これらのテーブルを格納 するためのSRAM等の他のメモリを配置する必要がなく、小容量化、低消費電 力化に寄与する。According to the access methods of the third and fourth aspects, part of the memory can be used as an address translation table or free block table, eliminating the need for additional memory such as SRAM to store these tables, thereby contributing to smaller capacity and lower power consumption.
また、この発明の第5の観点に係るアクセス方法は、 ブロック単位でデータの消去が可能で、予めデータが消去された空きブロック にデータの書き込みが可能なブロック消去型のメモリへのアクセス方法であって 、 前記メモリが備えるブロックに、該メモリの空きブロックを示す空きブロック 情報を記憶させ、 書き込み対象データが供給された時に、前記空きブロック情報に基づいて空き ブロックを判別し、判別した空きブロックに該データを書き込むと共に、前記空 きブロック情報に基づいて空きブロックを新たに判別し、前記空きブロック情報 を記憶する前記ブロックの記憶内容を消去すると共に、新たに判別した前記空き ブロックに更新された空きブロック情報を書き込む、 ことを特徴とする。Furthermore, a fifth aspect of the present invention relates to an access method for a block-erasing memory that allows data to be erased in blocks and data to be written to free blocks from which data has been previously erased. The method includes: storing free block information indicating free blocks in the memory in a block of the memory; and, when data to be written is supplied, identifying a free block based on the free block information, writing the data to the identified free block; identifying a new free block based on the free block information; erasing the contents of the block storing the free block information; and writing the updated free block information to the newly identified free block.
第5の観点に係るアクセス方法によれば、メモリの一部をアドレス変換テーブ ルや空きブロックテーブルとして使用でき、小容量化、低消費電力化を図り得る 上、前記空きブロックの情報が更新されることにより、随時最新の空きブロック の情報を得ることができる。According to the access method of the fifth aspect, part of the memory can be used as an address translation table or free block table, thereby reducing capacity and power consumption. Furthermore, by updating the free block information, the latest free block information can be obtained at any time.
また、この発明の第6の観点に係るアクセス方法は、 ブロック単位でデータの消去が可能で、予めデータが消去された空きブロック にデータの書き込みが可能なブロック消去型のメモリへのアクセス方法であって 、 前記メモリの各空きブロックの一部に、順次他の空きブロックを示す情報から なる空きブロック連鎖情報を格納し、 書き込み対象データが供給された時に、空きブロック連鎖情報により定義され る空きブロックの連鎖の先頭の空きブロックを判別し、判別した空きブロックに 該データを書き込む、 ことを特徴とする。Furthermore, a sixth aspect of the present invention relates to an access method for a block-erasing memory in which data can be erased in blocks and data can be written to free blocks from which data has been previously erased. The method includes: storing free block chain information, consisting of information sequentially indicating other free blocks, in a portion of each free block of the memory; and, when data to be written is supplied, determining the first free block in the chain of free blocks defined by the free block chain information, and writing the data to the determined free block.
第6の観点に係るアクセス方法によれば、メモリの一部を空きブロックテーブ ルとして使用できる。According to the access method of the sixth aspect, a part of the memory can be used as a free block table.
また、データが書き込まれるブロックが連鎖情報より定義される連鎖の順とな るので、書き込み頻度をメモリ全体で均一化することができる。In addition, since the blocks to which data is written are in the order of the chain defined by the chain information, the write frequency can be made uniform across the entire memory.
図面の簡単な説明 図1は、この発明の実施の形態にかかる記憶装置の基本構成を示すブロック図 である。BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram showing the basic configuration of a storage device according to an embodiment of the present invention.
図2は、メモリセルアレイの構成を示す図である。FIG. 2 is a diagram showing the configuration of a memory cell array.
図3は、記憶領域の論理的構造を示す図である。FIG. 3 is a diagram showing the logical structure of a storage area.
図4は、空きブロックテーブルの構成の一例を示す図である。FIG. 4 is a diagram illustrating an example of the configuration of the free block table.
図5は、アドレス変換テーブルの構成の一例を示す図である。FIG. 5 is a diagram showing an example of the configuration of the address conversion table.
図6は、データを読み出す処理を示すフローチャートである。FIG. 6 is a flowchart showing the process of reading data.
図7は、物理アドレス決定の処理を示すフローチャートである。FIG. 7 is a flowchart showing the process of determining a physical address.
図8は、書き込み処理を示すフローチャートである。FIG. 8 is a flowchart showing the write process.
図9は、旧データ消去の処理を示すフローチャートである。FIG. 9 is a flowchart showing the process of erasing old data.
図10は、空きブロックテーブル及びアドレス変換テーブルを更新する処理を 示すフローチャートである。FIG. 10 is a flowchart showing the process of updating the free block table and the address translation table.
図11は、第2の実施の形態の記憶装置における空きブロックの連鎖を示す概 念図である。FIG. 11 is a conceptual diagram showing a chain of free blocks in a storage device according to the second embodiment.
図12は、第2の実施の形態の記憶装置における、データ書き込み処理のフ ローチャートである。FIG. 12 is a flowchart of a data write process in the storage device according to the second embodiment.
図13は、第2の実施の形態の記憶装置における、空きブロック情報及びアド レス変換テーブルを更新する処理を示すフローチャートである。FIG. 13 is a flowchart showing the process of updating free block information and the address translation table in the storage device according to the second embodiment.
発明を実施するための最良の形態 以下、この発明を実施するための最良の形態にかかる記憶装置を説明する。BEST MODE FOR CARRYING OUT THE INVENTION The following describes a storage device according to the best mode for carrying out the present invention.
(第1の実施の形態) この実施の形態にかかる記憶装置は、アドレス変換テーブル等をフラッシュメ モリユニット自身に記憶するものであり、図1に示すように、フラッシュメモリ ユニット10と、コントローラ20とより構成される。(First Embodiment) The storage device according to this embodiment stores address translation tables and other data in the flash memory unit itself. As shown in Figure 1, it is composed of a flash memory unit 10 and a controller 20.
フラッシュメモリユニット10は、メモリセルアレイ1と、I/Oバッファ2 と、Xアドレスバッファ3Xと、ブロックアドレスバッファ3Bと、Xアドレス デコーダ4Xと、ブロックアドレスデコーダ4Bと、制御回路5と、グローバル バッファ6とより構成される。The flash memory unit 10 comprises a memory cell array 1, an I/O buffer 2, an X-address buffer 3X, a block address buffer 3B, an X-address decoder 4X, a block address decoder 4B, a control circuit 5, and a global buffer 6.
メモリセルアレイ1は、複数のメモリセルから構成されている。各メモリセル は、例えばNAND型のものであって、1バイトの記憶容量を有する。これらの メモリセルは、論理的には、図2に示すように、縦16384行、横528列の マトリクス状に配置されている。従って、メモリセルアレイ1は全体としては8 .65メガバイトの記憶容量を有する。Memory cell array 1 is composed of multiple memory cells. Each memory cell is, for example, a NAND type, and has a storage capacity of 1 byte. These memory cells are logically arranged in a matrix of 16,384 rows and 528 columns, as shown in Figure 2. Therefore, memory cell array 1 has an overall storage capacity of 8.65 MB.
メモリセルアレイ1は、8個のデータ入出力端Tdataと、対応する行のメモリ セルに共通に接続された16384個の行制御入力端Trowcontと、すべてのメ モリセルに共通の読出制御端Treadcont及び書込制御端Twritecontと、データ 消去用の消去制御回路1eとを備える。The memory cell array 1 includes eight data input/output terminals Tdata, 16,384 row control input terminals Trowcont commonly connected to memory cells in corresponding rows, a read control terminal Treadcont and a write control terminal Twritecont common to all memory cells, and an erase control circuit 1e for erasing data.
メモリセルアレイ1の読出制御端Treadcontに制御信号が入力されているとき 、行制御入力端Trowcontに制御信号が供給されると、制御信号を供給され た行のメモリセルは、その記憶内容を、先頭からメモリセル1個分(すなわち、 1バイト)ずつ、528回に分けて、データ入出力端Tdataに出力する。When a control signal is input to the read control terminal Treadcont of memory cell array 1, if a control signal is supplied to the row control input terminal Trowcont, the memory cells in the row to which the control signal is supplied output their stored contents to the data input/output terminal Tdata in 528 increments, one memory cell at a time (i.e., one byte) from the beginning.
一方、書込制御端Twritecontに制御信号が入力されているときは、データ入 出力端Tdataから入力されるデータを、1バイトずつ528回に分けて、先頭の メモリセルから記憶する。On the other hand, when a control signal is input to the write control terminal Twritecont, the data input from the data input/output terminal Tdata is divided into 528 byte chunks and stored starting from the first memory cell.
ただし、各メモリセルはNAND型であるため、データの記録は、記憶値を「 1」から「0」にする方向にしか行うことができず、いったん記憶値が「0」と なったメモリセルは、記憶内容がリセットされるまで、記憶値が「0」の状態を 維持する。However, because each memory cell is a NAND type, data can only be written in the direction of changing the stored value from "1" to "0." Once a memory cell has a stored value of "0," it will maintain that state until its contents are reset.
図2に示すように、メモリセルのマトリクスの各行は528バイトの記憶容量 を有するページを構成する。ページには連続的に1から16384までのページ アドレスが付与され、各ページに含まれるメモリセルには、連続的に1から52 8までの番地が与えられている。As shown in Figure 2, each row of the memory cell matrix constitutes a page with a storage capacity of 528 bytes. The pages are assigned consecutive page addresses ranging from 1 to 16384, and the memory cells contained in each page are assigned consecutive addresses ranging from 1 to 528.
図2及び図3に示すように、各ページは、先頭から16ページ単位で1つのブ ロックを構成する。各ブロックは8キロバイトの記憶容量を有し、記憶領域全体 は、1024個のブロックから構成されている。As shown in Figures 2 and 3, each page is organized into a block, with 16 pages from the beginning. Each block has a storage capacity of 8 kilobytes, and the entire storage area is composed of 1,024 blocks.
また、各ページは、図3に示すように、先頭から512バイトの領域を占める データ領域と、末尾16バイトを占める冗長部とから構成される。データ領域に は、本来のデータが格納され、冗長部にはエラーチェックコード等が格納される 。As shown in Figure 3, each page consists of a data area occupying the first 512 bytes and a redundant section occupying the last 16 bytes. The data area stores the original data, while the redundant section stores error check codes and other information.
そして、データ消去用の消去制御回路1eに、特定のブロックのデータを消去 するよう指示する制御信号が入力されると、当該ブロックに含まれるすべてのメ モリセルの記憶内容がリセットされる(すなわち、各メモリセルの記憶値が「1 」になる)。When a control signal instructing the data erase control circuit 1e to erase data from a specific block is input, the contents of all memory cells in that block are reset (i.e., the value stored in each memory cell becomes "1").
メモリセルアレイ1には、このメモリセルアレイ1にアクセスするための空 きブロックテーブル及びアドレス変換テーブルが格納されている。The memory cell array 1 stores an empty block table and an address conversion table for accessing the memory cell array 1.
空きブロックテーブルは、メモリセルアレイ1の任意のブロックの先頭ページ に記憶されており、メモリセルアレイ1の各ブロックのいずれが空きブロック( すなわち、リセットされた状態にあり、データ「0」を記憶したメモリセルを含 んでいないブロック)であるかを表す情報を格納する。空きブロックテーブルが 格納されているブロックの情報は、後述するように、制御回路5に記憶される。The free block table is stored in the first page of any block in the memory cell array 1 and contains information indicating which of the blocks in the memory cell array 1 are free blocks (i.e., blocks that are in a reset state and do not contain memory cells storing data "0"). Information about the blocks in which the free block table is stored is stored in the control circuit 5, as described below.
メモリセルアレイ1のブロックの総数が1024個であるときの、空きブロッ クテーブルの構造の一例を図4に示す。この空きブロックテーブルは、特定のブ ロックの先頭の128バイトのメモリセル(すなわち、先頭から1024ビット )から構成され、先頭のビットから順に、ブロック1からブロック1024に1 対1に対応し、対応するブロックが空きブロックであるとき「1」、空きブロッ クでないとき「0」を格納する。An example of the structure of the free block table when the total number of blocks in memory cell array 1 is 1024 is shown in Figure 4. This free block table is composed of the first 128 bytes of memory cells (i.e., the first 1024 bits) of a particular block, and has a one-to-one correspondence from the first bit to blocks 1 through 1024. If the corresponding block is a free block, it stores a "1," and if it is not a free block, it stores a "0."
アドレス変換テーブルは、空きブロックテーブルが格納されているブロックの 第2ページ以降に記憶され、メモリセルアレイ1の各ブロックに割り当てられて いる論理アドレスを表す情報を格納する。The address translation table is stored in the second page or later of the block in which the free block table is stored, and stores information representing the logical addresses assigned to each block of the memory cell array 1.
論理アドレスは、この記憶装置が後述する動作により読み書きされるときに、 後述する外部のコンピュータ11が備えるCPU(中央処理ユニット)12や、 コントローラ20等により、データ読み書きの単位として認識される単位である 。A logical address is a unit recognized as a unit of data read/write by the CPU (Central Processing Unit) 12 of the external computer 11 (described below) and the controller 20 when this storage device is read or written using the operations described below.
論理アドレスが割り当てられている領域の総量は、メモリセルアレイ1の記憶 容量より小さい所定の値、例えば16000ページ分であり、各論理アドレスの 占める記憶領域は、例えば、1ページの占める記憶領域に一致する。The total area allocated to the logical addresses is a predetermined value smaller than the storage capacity of the memory cell array 1, e.g., 16,000 pages, and the storage area occupied by each logical address is, for example, equal to the storage area occupied by one page.
論理アドレスは、具体的には、例えば、メモリセルアレイ1の記憶容量より小 さい所定の値に相当する大きさ(例えば16000ページ分)の仮想の記憶 領域を512バイト毎の区画に分け、各区画に0から始まる連番を付した場合の 当該連番、すなわちLBA(Logic Block Address)から構成されている。Specifically, a logical address is composed of a virtual memory area of a size (e.g., 16,000 pages) that is smaller than the memory capacity of the memory cell array 1, divided into 512-byte sections, and each section is assigned a consecutive number starting from 0. The logical address is then composed of the consecutive numbers, i.e., LBAs (Logic Block Addresses).
アドレス変換テーブルの構造の一例を図5に示す。アドレス変換テーブルは複 数のレコードからなり、各レコードの先頭には論理アドレスが格納され、続いて 、該論理アドレスに対応付けられている領域の先頭のページが位置するブロック の番号(ブロックアドレス)と、その先頭のページの番号とが格納されている。An example of the structure of an address translation table is shown in Figure 5. The address translation table consists of multiple records, each of which contains a logical address at the beginning, followed by the block number (block address) in which the first page of the area associated with that logical address is located, and the number of that first page.
I/Oバッファ2は、図1に示すように、グローバルバッファ6と、メモリセ ルアレイ1のデータ入出力端Tdataと、制御回路5とに接続されている。As shown in FIG. 1, the I/O buffer 2 is connected to the global buffer 6, the data input/output terminal Tdata of the memory cell array 1, and the control circuit 5.
I/Oバッファ2は、制御回路5の指示に従い、グローバルバッファ6が記憶 するデータをメモリセルアレイ1のデータ入出力端Tdataに1バイトずつ出力す る動作と、データ入出力端Tdataから出力されるデータをグローバルバッファ6 に1バイトずつ出力する動作とを行う。In accordance with instructions from the control circuit 5, the I/O buffer 2 outputs the data stored in the global buffer 6 to the data input/output terminal Tdata of the memory cell array 1 one byte at a time, and outputs the data output from the data input/output terminal Tdata to the global buffer 6 one byte at a time.
Xアドレスバッファ3Xは、グローバルバッファ6より、メモリセルアレイ1 の行アドレス(すなわち、ページアドレス)を示す行アドレス信号を入力して、 Xアドレスデコーダ4Xに出力する。The X-address buffer 3X receives a row address signal indicating the row address (i.e., page address) of the memory cell array 1 from the global buffer 6 and outputs it to the X-address decoder 4X.
Xアドレスデコーダ4Xは、行アドレス信号が示す行、又は、制御回路5が指 示する行の行制御入力端Trowcontに、アクティブレベルの制御信号を供給する 。The X address decoder 4X supplies an active-level control signal to the row control input terminal Trowcont of the row indicated by the row address signal or the row indicated by the control circuit 5.
ブロックアドレスバッファ3Bは、グローバルバッファ6より、メモリセルア レイ1の各ブロックのアドレスを示すブロックアドレス信号を入力して、ブロッ クアドレスデコーダ4Bに出力する。The block address buffer 3B receives a block address signal indicating the address of each block of the memory cell array 1 from the global buffer 6 and outputs the signal to the block address decoder 4B.
ブロックアドレスデコーダ4Bは、ブロックアドレス信号が示すブロック、又 は、制御回路5が指示するブロックのデータを消去するよう指示する信号を、消 去制御回路1eに供給する。The block address decoder 4B supplies an erase control circuit 1e with a signal instructing the erase control circuit 1e to erase data in a block indicated by the block address signal or in a block instructed by the control circuit 5.
制御回路5は、グローバルバッファ6よりコマンドを入力して解析し、解析結 果に従って、Xアドレスバッファ3X、Xアドレスデコーダ4X、ブロックアド レスデコーダ4B及びI/Oバッファ2を制御する。The control circuit 5 receives and analyzes commands from the global buffer 6, and controls the X-address buffer 3X, the X-address decoder 4X, the block address decoder 4B, and the I/O buffer 2 in accordance with the analysis results.
また、制御回路5は、コントローラ20より、書込信号Swrite及びラッチ信 号Slatchの供給を受ける。そして、これらの信号に従って、メモリセルアレイ 1及びグローバルバッファ6を後述のように制御する。また、制御回路5は、コ ントローラ20に、後述するタイミングでビジー信号Sbusy及びレディ信号Sre adyを供給する。The control circuit 5 also receives a write signal Swrite and a latch signal Slatch from the controller 20. In accordance with these signals, the control circuit 5 controls the memory cell array 1 and the global buffer 6 as described below. The control circuit 5 also supplies a busy signal Sbusy and a ready signal Sready to the controller 20 at timings described below.
また、制御回路5は、グローバルバッファ6に格納されたデータが後述するセ ットアップコマンドや消去コマンド等の所定のコマンドを表すとき、そのコマン ドが指示する処理を、後述するように実行する。Furthermore, when the data stored in the global buffer 6 represents a predetermined command such as a setup command or an erase command, which will be described later, the control circuit 5 executes the processing indicated by the command, as will be described later.
なお、ビジー信号Sbusy及びレディ信号Sreadyとは同一の信号線を介して伝 送されるようにしてよい。従って、例えば、制御回路5が所定の信号線に2値論 理値”1”を表す電圧を印加しているときは、制御回路5がビジー信号Sbusyを 供給しているものとし、2値論理値”0”を表す電圧を印加しているときは、レ ディ信号Sreadyを供給しているものとしてもよい。The busy signal Sbusy and the ready signal Sready may be transmitted via the same signal line. Therefore, for example, when the control circuit 5 applies a voltage representing a binary logic value "1" to a specific signal line, it may be considered that the control circuit 5 is supplying the busy signal Sbusy, and when it applies a voltage representing a binary logic value "0," it may be considered that the control circuit 5 is supplying the ready signal Sready.
グローバルバッファ6は、I/Oバッファ2と、制御回路5と、コントローラ 20とに接続されている。そして、制御回路5から出力される制御信号に従い、 バスライン13上の信号及びI/Oバッファ2の記憶内容のうち、当該制御信号 が供給された時点で自己に供給されているものを記憶し、記憶した内容を、Xア ドレスバッファ3X又は制御回路5に出力する。The global buffer 6 is connected to the I/O buffer 2, the control circuit 5, and the controller 20. In response to a control signal output from the control circuit 5, the global buffer 6 stores the signals on the bus line 13 and the contents stored in the I/O buffer 2 that are currently being supplied at the time the control signal is received, and outputs the stored contents to the X address buffer 3X or the control circuit 5.
コントローラ20は、CPU等からなり、フラッシュメモリユニット10の制 御回路5に接続されており、また、バスライン13を介して、フラッシュメモリ ユニット10のグローバルバッファ6及びコンピュータ11のCPU12に接続 されている。ただし、コントローラ20を構成するCPUは、コンピュ ータ11のCPU12と同一のものであってもよい。The controller 20, which includes a CPU and the like, is connected to the control circuit 5 of the flash memory unit 10 and is also connected to the global buffer 6 of the flash memory unit 10 and the CPU 12 of the computer 11 via a bus line 13. However, the CPU constituting the controller 20 may be the same as the CPU 12 of the computer 11.
コントローラ20は、外部のコンピュータ11が備えるCPU12等より供給 されるコマンドに従い、後述するように、制御回路5に書込信号Swriteやラッ チ信号Slatchを供給し、グローバルバッファ6には、物理アドレス、書き込み 対象のデータ、コマンド等を供給して、フラッシュメモリユニット10を制御す る。In response to commands provided by the CPU 12 or the like of the external computer 11, the controller 20 supplies a write signal Swrite and a latch signal Slatch to the control circuit 5, and supplies a physical address, data to be written, commands, etc. to the global buffer 6, thereby controlling the flash memory unit 10, as described below.
また、コントローラ20は、アドレス変換テーブル及び空きブロックテーブル の位置と、最後に書き込みがなされたブロックの位置とを表すデータを記憶し、 CPU12から供給されたコマンドに従った後述の処理を実行する際に、自己が 記憶しているデータを参照する。また、コントローラ20は、CPU12から、 読み出す対象のデータをバイト単位で表した量(すなわち、バイト数)を供給さ れると、これを記憶し、後述する処理において参照する。The controller 20 also stores data indicating the positions of the address translation table and free block table, and the position of the last written block, and references the stored data when executing the processing described below in accordance with commands supplied from the CPU 12. When the controller 20 receives from the CPU 12 the amount of data to be read, expressed in bytes (i.e., the number of bytes), it stores this information and references it in the processing described below.
(第1の実施の形態の動作) 次に、この記憶装置にデータを書き込む処理を、図6〜図10を参照して説明 する。(Operation of the First Embodiment) Next, the process of writing data to this storage device will be described with reference to Figures 6 through 10.
図6は、データを読み出す処理を示すフローチャートである。FIG. 6 is a flowchart showing the process of reading data.
図7は、物理アドレス決定の処理を示すフローチャートである。FIG. 7 is a flowchart showing the process of determining a physical address.
図8は、書き込み処理を示すフローチャートである。FIG. 8 is a flowchart showing the write process.
図9は、旧データ消去の処理を示すフローチャートである。FIG. 9 is a flowchart showing the process of erasing old data.
図10は、空きブロックテーブル及びアドレス変換テーブルを更新する処理を 示すフローチャートである。FIG. 10 is a flowchart showing the process of updating the free block table and the address translation table.
(データ読み出し) コンピュータ11内のCPU12は、この記憶装置からデータを読み出す場合 、図6に示す、データ読み出しの処理を実行する。(Data Reading) When reading data from this storage device, the CPU 12 in the computer 11 executes the data reading process shown in Figure 6.
処理が開始されると、CPU12は、読み出す対象のデータが格納されてい る論理アドレスをバスライン13上に出力し、コントローラ20に、データの読 み出しを指示するコマンドと、読み出すデータが格納されている記憶領域のペー ジ数とを供給する(図6、ステップS101)。When the process starts, the CPU 12 outputs the logical address at which the data to be read is stored onto the bus line 13, and supplies the controller 20 with a command to read the data and the page number of the storage area where the data to be read is stored (FIG. 6, step S101).
コントローラ20は、CPU12からのコマンドに応答し、バスライン13を 介して供給された論理アドレス及びページ数を取得し、両者を記憶する(ステッ プS102)。In response to the command from the CPU 12, the controller 20 acquires the logical address and page number supplied via the bus line 13 and stores both (step S102).
そして、コントローラ20は、アドレス変換テーブルの先頭ページの物理アド レスをグローバルバッファ6に供給し、制御回路5にラッチ信号Slatchを送出 して、制御回路5からレディ信号Sreadyが供給されるのを待機する(ステップ S103)。The controller 20 then supplies the physical address of the first page of the address translation table to the global buffer 6, sends a latch signal Slatch to the control circuit 5, and waits for a ready signal Sready to be supplied from the control circuit 5 (step S103).
制御回路5は、コントローラ20からのラッチ信号Slatchに応答し、コント ローラ20へのビジー信号Sbusyの供給を開始し、コントローラ20が供給して いる物理アドレスをラッチする指示を、グローバルバッファ6に送る。この指示 に応答し、グローバルバッファ6はコントローラ20が供給している物理アドレ スをラッチする(ステップS104)。グローバルバッファ6にラッチされた物 理アドレスのうち、ブロックアドレスに当たる部分はブロックアドレスバッファ 3Bを介してブロックアドレスデコーダ4Bに供給され、ページアドレスに当た る部分はXアドレスバッファ3Xを介してXアドレスデコーダ4Xに供給される 。In response to the latch signal Slatch from the controller 20, the control circuit 5 begins supplying a busy signal Sbusy to the controller 20 and sends an instruction to the global buffer 6 to latch the physical address supplied by the controller 20. In response to this instruction, the global buffer 6 latches the physical address supplied by the controller 20 (step S104). Of the physical address latched in the global buffer 6, the block address portion is supplied to the block address decoder 4B via the block address buffer 3B, and the page address portion is supplied to the X address decoder 4X via the X address buffer 3X.
制御回路5は、アドレス変換テーブルの読み出しを行うため、グローバルバッ ファ6よりページアドレスを供給されたXアドレスデコーダ4Xに、当該ページ アドレスが示すページを選択するよう指示する。To read the address conversion table, the control circuit 5 instructs the X address decoder 4X, which receives a page address from the global buffer 6, to select the page indicated by the page address.
Xアドレスデコーダ4Xは、制御回路5からの指示に応答して、アドレス変換 テーブルが格納されているページの行制御入力端Trowcontにアクティブレベル の制御信号を出力する。これにより、アドレス変換テーブルのうち、コン トローラ20が指示するページが選択される。In response to an instruction from the control circuit 5, the X address decoder 4X outputs an active-level control signal to the row control input terminal Trowcont of the page in which the address translation table is stored. This selects the page of the address translation table designated by the controller 20.
次に、制御回路5は、メモリセルアレイ1の読出制御端Treadcontにデータ読 み出しの指示を送り、ビジー信号Sbusyの供給を停止して、コントローラ20に レディ信号Sreadyを供給する。一方、メモリセルアレイ1は、制御回路5より 送られた指示に応答し、アドレス変換テーブルのある当該ページの記憶内容を、 I/Oバッファ2及びグローバルバッファ6を介してコントローラ20に1バイ トずつ順次出力する。Next, the control circuit 5 sends a data read instruction to the read control terminal Treadcont of the memory cell array 1, stops the supply of the busy signal Sbusy, and supplies a ready signal Sready to the controller 20. Meanwhile, in response to the instruction sent from the control circuit 5, the memory cell array 1 sequentially outputs the memory contents of the corresponding page of the address translation table to the controller 20, one byte at a time, via the I/O buffer 2 and the global buffer 6.
一方、コントローラ20は、グローバルバッファ6から供給される情報を順次 読み取ることにより、当該ページに記憶されている各論理アドレスと、各論理ア ドレスに対応付けられた物理アドレスとを読み取る(ステップS105)。Meanwhile, the controller 20 sequentially reads the information supplied from the global buffer 6, thereby reading each logical address stored in the page and the physical address associated with each logical address (step S105).
そして、コントローラ20は、アドレス変換テーブルから読み出した論理アド レスの中に、ステップS102でCPU12から取得した論理アドレスと一致す るものがあるか否かを判別する(ステップS106)。The controller 20 then determines whether or not any of the logical addresses read from the address conversion table matches the logical address obtained from the CPU 12 in step S102 (step S106).
ステップS106において、一致する論理アドレスがないと判別したとき、コ ントローラ20は、グローバルバッファ6に、アドレス変換テーブルの次のペー ジの物理アドレスを供給し、制御回路5にラッチ信号Slatchを送出し(ステッ プS107)、この記憶装置は、処理をステップS104に戻す。If it is determined in step S106 that there is no matching logical address, the controller 20 supplies the physical address of the next page of the address translation table to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S107), and the storage device returns the process to step S104.
一方、ステップS106において、一致する論理アドレスがあると判別したと きは、処理をS108へ移す。On the other hand, if it is determined in step S106 that a matching logical address exists, the process proceeds to step S108.
ステップS108において、コントローラ20は、ステップS106で一致す ると判別した論理アドレスが示す物理アドレス(すなわち、読み出す対象のデー タのあるページのうち先頭のページの物理アドレス)の値をグローバルバッファ 6に供給し、制御回路5にラッチ信号Slatchを送出する。In step S108, the controller 20 supplies the value of the physical address indicated by the logical address determined to match in step S106 (i.e., the physical address of the first page of the pages containing the data to be read) to the global buffer 6 and sends a latch signal Slatch to the control circuit 5.
すると、フラッシュメモリユニット10は、コントローラ20がステップS1 03で供給したラッチ信号Slatchに応答した場合の処理と実質的に同一の 処理を行い、コントローラ20がグローバルバッファ6に供給した物理アドレス の記憶内容(すなわち、読み出す対象のデータのうち未だ読み出されていない部 分の先頭のページの内容)を、グローバルバッファ6を介してコントローラ20 に1バイトずつ順次供給する(ステップS109)。The flash memory unit 10 then performs substantially the same processing as that performed when responding to the latch signal Slatch supplied by the controller 20 in step S103, and sequentially supplies the contents of the physical address supplied by the controller 20 to the global buffer 6 (i.e., the contents of the first page of the data to be read that has not yet been read) to the controller 20, byte by byte, via the global buffer 6 (step S109).
一方、コントローラ20は、ステップS109でグローバルバッファ6が供給 する情報を順次読み取ることにより、読み出す対象のデータを読み取り、読み取 ったデータを、バスライン13を介してCPU12に供給する(ステップS11 0)。Meanwhile, in step S109, the controller 20 sequentially reads the information supplied by the global buffer 6 to read the data to be read, and supplies the read data to the CPU 12 via the bus line 13 (step S110).
そして、コントローラ20は、ステップS108の処理を開始して以降に読み 出したページ数が、CPU12から供給されてステップS102で自己が記憶し たページ数に達しているか否かを判別する(ステップS111)。The controller 20 then determines whether the number of pages read since the start of the process in step S108 has reached the number of pages supplied from the CPU 12 and stored by itself in step S102 (step S111).
そして、達していないと判別したとき、コントローラ20は、制御回路5がビ ジー信号Sbusyの供給を停止したタイミングで、読み出す対象のデータのある次 の物理アドレスをグローバルバッファ6に供給し、制御回路5にラッチ信号Sla tchを送出する(ステップS112)。そしてこの記憶装置は、処理をステップ S109に戻す。If it is determined that the address has not been reached, the controller 20 supplies the next physical address containing the data to be read to the global buffer 6 at the timing when the control circuit 5 stops supplying the busy signal Sbusy, and sends a latch signal Slatch to the control circuit 5 (step S112).Then, the storage device returns to step S109.
一方、達していると判別すると、コントローラ20は、例えば、バスライン1 3を介してCPU12に終了コードを送出したり、図示しない制御信号をCPU 12に出力することにより、CPU12に読み出しの終了を通知する(ステップ S113)。On the other hand, if it is determined that the count has been reached, the controller 20 notifies the CPU 12 of the end of reading by, for example, sending an end code to the CPU 12 via the bus line 13 or outputting a control signal (not shown) to the CPU 12 (step S113).
CPU12は、読み出しの終了を検知すると(ステップS114)、データ読 み出しの処理を終了する。When the CPU 12 detects the end of the read operation (step S114), it ends the data read operation.
ステップS101〜S114の処理により、メモリセルアレイ1自体に格納さ れたアドレス変換テーブルを用いて、論理アドレスに対応する物理アドレスの位 置が検索され、その位置にあるデータが順次読み出される。By the processing of steps S101 to S114, the location of the physical address corresponding to the logical address is searched for using the address conversion table stored in the memory cell array 1 itself, and the data at that location is sequentially read out.
読み出し対象の論理アドレスが複数あるときは、ステップS101〜S114 の処理を、読み出し対象の論理アドレスの数だけ繰り返して行う。If there are multiple logical addresses to be read, steps S101 to S114 are repeated the same number of times as the number of logical addresses to be read.
(データ書き込み:新たな物理アドレスの決定) メモリセルアレイ1にデータを書き込む場合、この記憶装置はまず、図7に示 す物理アドレス決定の処理を行い、データ書き込み対象の物理アドレスを決定す る処理を実行する。(Data Write: Determining a New Physical Address) When writing data to memory cell array 1, this storage device first performs the physical address determination process shown in Figure 7 to determine the physical address to which the data will be written.
CPU12は、例えばまず、書き込み対象のデータの大きさから、1ページの 記憶容量を512バイトとして、書き込みに要するページ数を算出し、書き込み の対象とする論理アドレスを決定する。For example, the CPU 12 first calculates the number of pages required for writing based on the size of the data to be written, assuming that one page has a storage capacity of 512 bytes, and then determines the logical address to which the data will be written.
そして、CPU12は、書き込み対象の論理アドレスのうち最も番号が若いも のをバスライン13上に出力し、コントローラ20に、データの書き込みを指示 するコマンドを送る(ステップS201)。The CPU 12 then outputs the logical address with the smallest number among the logical addresses to be written onto the bus line 13 and sends a command to the controller 20 to write the data (step S201).
コントローラ20は、ステップS201でCPU12から送られたコマンドに 応答して、図6の処理におけるステップS103〜S107の処理と実質的に同 一の処理を行う(ステップS202)。In response to the command sent from the CPU 12 in step S201, the controller 20 performs substantially the same processing as steps S103 to S107 in the processing of FIG. 6 (step S202).
すなわち、フラッシュメモリユニット10から、アドレス変換テーブルの内容 を読み出し、読み出した内容のうち、ステップS201でCPU12から取得し た論理アドレスと一致するものがあるか否かを順次判別することにより、CPU 12から取得した当該論理アドレスに対応付けられている物理アドレスを特定す る。That is, the contents of the address translation table are read from the flash memory unit 10, and by sequentially determining whether any of the read contents match the logical address obtained from the CPU 12 in step S201, the physical address associated with the logical address obtained from the CPU 12 is identified.
ステップS202で、物理アドレスが特定されると、コントローラ20は、特 定された物理アドレスを記憶する(ステップS203)。そして、空きブロック テーブルを読み出すため、グローバルバッファ6に空きブロックテーブルの物理 アドレスを供給し、制御回路5にラッチ信号Slatchを送る(ステップS204 )。Once the physical address is identified in step S202, the controller 20 stores the identified physical address (step S203). Then, to read the free block table, the controller 20 supplies the physical address of the free block table to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S204).
制御回路5は、ステップS103でラッチ信号Slatchを供給された場合と同 様にして、Xアドレスデコーダ4Xに、空きブロックテーブルのあるページを選 択させる。The control circuit 5 causes the X address decoder 4X to select a page with an empty block table, in the same manner as when the latch signal Slatch is supplied in step S103.
そして、制御回路5は、ページが選択されると、メモリセルアレイ1の読出制 御端Treadcontにデータ読み出しの指示を送る。メモリセルアレイ1は、指示を 受けると、空きブロックテーブルのある当該ページの記憶内容を、I/Oバッフ ァ2及びグローバルバッファ6を介して、コントローラ20に1バイトずつ順次 出力する。When a page is selected, the control circuit 5 sends a data read instruction to the read control terminal Treadcont of the memory cell array 1. Upon receiving the instruction, the memory cell array 1 sequentially outputs the contents of the page in the free block table, one byte at a time, to the controller 20 via the I/O buffer 2 and the global buffer 6.
そして、コントローラ20は、グローバルバッファ6から供給される情報を順 次読み取ることにより、空きブロックテーブルを取得する(ステップS205) 。The controller 20 then sequentially reads the information provided by the global buffer 6 to obtain the free block table (step S205).
次に、コントローラ20は、取得した空きブロックテーブルの内容に基づき、 任意の空きブロックに属する物理アドレスを特定し(ステップS206)、以後 、ステップS206で特定した物理アドレスを、書き込み対象の論理アドレスが 示す物理アドレスであるものとして扱うことと決定する。Next, the controller 20 identifies a physical address belonging to any free block based on the contents of the acquired free block table (step S206), and thereafter determines that the physical address identified in step S206 will be treated as the physical address indicated by the logical address to be written.
ただし、ステップS206においては、図7の処理を開始して以降、既にステ ップS206で特定された物理アドレスを再度特定しないようにするものとする 。However, in step S206, after the process of FIG. 7 is started, a physical address already identified in step S206 is not identified again.
また、ステップS206においては、図7の処理を開始して以降にステップS 206で特定された物理アドレスが属するブロックは、当該物理アドレスにデー タが書き込まれた後でも、空きブロックであるものとして扱う。Furthermore, in step S206, the block to which the physical address identified in step S206 belongs after the start of the process of FIG. 7 is treated as a free block even after data is written to that physical address.
また、データの書き込み対象の物理アドレスとして、論理アドレスが割り当て られていない物理アドレスが選択されてもよい。Furthermore, a physical address to which no logical address is assigned may be selected as the physical address to which data is to be written.
(データ書き込み:フラッシュメモリへの書き込み) ステップS206の処理を終えると、コントローラ20は、図8に示す書き 込み処理を実行する。(Data writing: writing to flash memory) After completing step S206, the controller 20 executes the write process shown in Figure 8.
すなわち、コントローラ20は、ステップS206の処理により物理アドレス を特定すると、グローバルバッファ6に特定した物理アドレスを供給し、制御回 路5にラッチ信号Slatchを送る(ステップS211)。That is, after the controller 20 identifies the physical address through the processing of step S206, it supplies the identified physical address to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S211).
制御回路5は、ラッチ信号Slatchに応答して、ビジー信号Sbusyの供給を停 止し、コントローラ20へのレディ信号Sreadyの供給を開始する。そして、X アドレスデコーダ4Xに、ステップS206で特定された物理アドレスを選択さ せる。In response to the latch signal Slatch, the control circuit 5 stops supplying the busy signal Sbusy and starts supplying the ready signal Sready to the controller 20. Then, the X address decoder 4X selects the physical address identified in step S206.
一方、コントローラ20は、レディ信号Sreadyに応答して、CPU12に書 き込み対象のデータの供給を要求し(ステップS212)、CPU12は、この 要求に応答して、書き込み対象のデータのうち先頭の1バイト分を、バスライン 13を介してコントローラ20に供給する。Meanwhile, in response to the ready signal Sready, the controller 20 requests the CPU 12 to supply the data to be written (step S212). In response to this request, the CPU 12 supplies the first byte of the data to be written to the controller 20 via the bus line 13.
そして、コントローラ20は、バスライン13を介してCPU12から供給さ れた書き込み対象のデータを記憶してグローバルバッファ6に供給し、制御回路 5に書込信号Swriteを送る(ステップS213)。The controller 20 then stores the data to be written, which is supplied from the CPU 12 via the bus line 13, supplies it to the global buffer 6, and sends a write signal Swrite to the control circuit 5 (step S213).
制御回路5は、書込信号Swriteに応答して、グローバルバッファ6に供給さ れた書き込み対象のデータをラッチするようグローバルバッファ6に指示し、レ ディ信号Sreadyの供給を停止して、コントローラ20へのビジー信号Sbusyの 供給を再開する。グローバルバッファ6は、バスライン13上のデータをラッチ して、I/Oバッファ2に格納する。In response to the write signal Swrite, the control circuit 5 instructs the global buffer 6 to latch the data to be written that has been supplied to the global buffer 6, stops supplying the ready signal Sready, and resumes supplying the busy signal SBusy to the controller 20. The global buffer 6 latches the data on the bus line 13 and stores it in the I/O buffer 2.
次に、制御回路5は、I/Oバッファ2に、I/Oバッファ2が格納している データをデータ入出力端Tdataに出力するよう指示する。指示に応答し、I/O バッファ2は、グローバルバッファ6により自己に格納されたデータを、データ 入出力端Tdataに出力する。Next, the control circuit 5 instructs the I/O buffer 2 to output the data stored in the I/O buffer 2 to the data input/output terminal Tdata. In response to the instruction, the I/O buffer 2 outputs the data stored in itself by the global buffer 6 to the data input/output terminal Tdata.
次に、制御回路5は、メモリセルアレイ1に、データ入出力端Tdataに現在 入力されているデータを記憶させるために、書込制御端Twritecontにアクティ ブレベルの書込制御信号を出力する。書込制御信号に応答して、メモリセルアレ イ1は、データ入出力端Tdataに入力されているデータを、現在選択されている ページの先頭のメモリセルに記録する。Next, the control circuit 5 outputs an active-level write control signal to the write control terminal Twritecont to cause the memory cell array 1 to store the data currently input to the data input/output terminal Tdata. In response to the write control signal, the memory cell array 1 records the data input to the data input/output terminal Tdata in the first memory cell of the currently selected page.
メモリセルアレイ1の書込制御端Twritecontにアクティブレベルの書込制御 信号を出力した後、制御回路5は、ビジー信号Sbusyの供給を停止し、コントロ ーラ20へのレディ信号Sreadyの供給を再開する。コントローラ20は、レデ ィ信号Sreadyの供給の再開を検知すると、ステップS214に処理を移す。After outputting an active-level write control signal to the write control terminal Twritecont of the memory cell array 1, the control circuit 5 stops supplying the busy signal Sbusy and resumes supplying the ready signal Sready to the controller 20. When the controller 20 detects the resumption of supply of the ready signal Sready, it proceeds to step S214.
ステップS214において、コントローラ20は、後続データを要求する信号 を送った後、バイトカウンタの値を参照して、現在選択中のページに512バイ トのデータが書き込まれたか否かを判別する。In step S214, after sending a signal requesting subsequent data, the controller 20 refers to the value of the byte counter and determines whether 512 bytes of data have been written to the currently selected page.
そして、512バイト書き込まれたと判別すると、コントローラ20は、CP U12に、次の論理アドレスを送ることを要求する(ステップS215)。Then, when it is determined that 512 bytes have been written, the controller 20 requests the CPU 12 to send the next logical address (step S215).
そして、CPU12が、次の論理アドレスをバスライン13上に送出し、コン トローラ20がその論理アドレスを取得すると、コントローラ20は、その論理 アドレスをステップS201で取得したものとして扱うこととし、処理を図7の 処理におけるステップS202に戻す。Then, the CPU 12 sends the next logical address onto the bus line 13. When the controller 20 acquires that logical address, the controller 20 treats that logical address as having been acquired in step S201, and the process returns to step S202 in the process of FIG. 7.
一方、512バイト書き込まれていないと判別すると、コントローラ20は、 CPU12に、書き込み対象の後続データを要求する信号を送る(ステップS2 16)。On the other hand, if it is determined that 512 bytes have not been written, the controller 20 sends a signal to the CPU 12 requesting subsequent data to be written (step S216).
CPU12は、この信号に応答して、書き込み対象の後続のデータがあるか否 かを判別し、後続のデータがないと判別すると、バスライン13に書込終了を表 す制御コードを供給する。一方、後続のデータがあると判別すると、CPU12 は、バスライン13に後続の1バイトのデータを供給する。In response to this signal, the CPU 12 determines whether there is subsequent data to be written. If there is no subsequent data, the CPU 12 supplies a control code indicating the end of writing to the bus line 13. On the other hand, if there is subsequent data, the CPU 12 supplies the subsequent one byte of data to the bus line 13.
コントローラ20は、ステップS216で後続データを要求する信号を送った 後、CPU12から、後続のデータ又は書き込み終了を表す制御コードを供給さ れると、供給されたものが、書き込み終了を表す制御コードであるか否かを判別 する(ステップS217)。After sending a signal requesting subsequent data in step S216, when the controller 20 receives subsequent data or a control code indicating the end of writing from the CPU 12, the controller 20 determines whether the received code is a control code indicating the end of writing (step S217).
そして、当該制御コードではないと判別すると、コントローラ20は処理をス テップS213に戻し、当該制御コードであると判別すると、図9に示す旧デー タ消去の処理に移る。If the controller 20 determines that the control code is not the relevant one, the process returns to step S213. If the controller 20 determines that the control code is the relevant one, the process proceeds to the old data erasure process shown in FIG. 9.
なお、CPU12が、書き込み対象のデータがないことをコントローラ20に 通知する手法は任意であり、制御コードをバスライン13を介して供給する手法 に限らず、例えば他の任意の制御線を介して、書き込み対象のデータがないこと を表す制御信号をコントローラに送出するようにしてもよい。The method by which the CPU 12 notifies the controller 20 that there is no data to be written may be any method, and is not limited to sending a control code via the bus line 13. For example, the CPU 12 may send a control signal indicating that there is no data to be written to the controller via any other control line.
(データ書き込み:旧データの消去) 書込終了の制御コードを取得したコントローラ20は、図9に示す旧データ消 去の処理を実行する。(Data Write: Old Data Erase) Upon receiving the write completion control code, the controller 20 executes the old data erase process shown in Figure 9.
図9の処理を開始すると、コントローラ20は、まず、既に読み出したアドレ ス変換テーブルの内容に基づき、ステップS203で自己が記憶した物理アドレ ス(すなわち、ステップS206で新たに物理アドレスが対応付けられるまで書 き込み対象の論理アドレスに対応付けられていた古い物理アドレス)と同一のブ ロックに属する物理アドレスを特定する(ステップS221)。When the process of FIG. 9 begins, the controller 20 first identifies a physical address belonging to the same block as the physical address stored by itself in step S203 (i.e., the old physical address that was associated with the logical address to be written until the new physical address was associated in step S206) based on the contents of the address conversion table that has already been read (step S221).
そして、この記憶装置は、ステップS221で特定した物理アドレスの各々を 、読み出す対象のデータの先頭ページを表すものとし、これらの物理アドレスの 各々につき、図6のステップS108〜S114の処理に従ってデータ読み出し を行う(ステップS222)。そして、コントローラ20は更に、ステップS2 04〜S206の処理と実質的に同一の処理を行い、ステップS222で読み出 したデータを格納する物理アドレスを特定する(ステップS22 3)。The storage device then determines that each of the physical addresses identified in step S221 represents the first page of the data to be read, and performs data read for each of these physical addresses according to the processing of steps S108 to S114 of Figure 6 (step S222).The controller 20 then performs processing substantially identical to the processing of steps S204 to S206 to identify the physical address at which the data read in step S222 will be stored (step S223).
ただし、ステップS223においては、データを格納する物理アドレスとして 、読み出したデータが格納されていたブロックと同一のブロックに属する物理ア ドレスを特定しないようにする。However, in step S223, the physical address for storing the data is determined not to be a physical address belonging to the same block as the block in which the read data was stored.
次に、この記憶装置は、ステップS222で読み出したデータを、ステップS 223で特定した物理アドレスに、図8の処理に従って書き込む(ステップS2 24)。Next, the storage device writes the data read in step S222 to the physical address identified in step S223 according to the process of FIG. 8 (step S224).
次に、コントローラ20は、グローバルバッファ6に、記憶内容を消去する対 象のブロックの指定を行うための所定のセットアップコマンドを供給して、制御 回路5にラッチ信号Slatchを送る(ステップS225)。Next, the controller 20 supplies the global buffer 6 with a predetermined setup command for specifying the block from which the stored contents are to be erased, and sends a latch signal Slatch to the control circuit 5 (step S225).
制御回路5は、ステップS225でラッチ信号Slatchが供給されたとき、グ ローバルバッファ6に供給されたデータがセットアップコマンドであることを検 知して、次にグローバルバッファ6に供給されるデータを、消去する対象のブロ ックのブロックアドレスとして扱うことを決定する。When the latch signal Slatch is supplied in step S225, the control circuit 5 detects that the data supplied to the global buffer 6 is a setup command, and determines that the next data to be supplied to the global buffer 6 should be treated as the block address of the block to be erased.
次に、コントローラ20は、グローバルバッファ6に、記憶内容を消去する対 象のブロック(すなわち、ステップS203で自己が記憶した物理アドレスが属 するブロック)のブロックアドレスを供給して、制御回路5にラッチ信号Slatc hを送る(ステップS226)。Next, the controller 20 supplies the global buffer 6 with the block address of the block from which the stored contents are to be erased (i.e., the block to which the physical address stored by the controller 20 in step S203 belongs), and sends a latch signal Slatch to the control circuit 5 (step S226).
制御回路5は、ステップS226で供給されたラッチ信号Slatchに応答して 、グローバルバッファ6に指示を送り、コントローラ20が供給しているブロッ クアドレスを、グローバルバッファ6にラッチさせる。グローバルバッフア6に ラッチされたブロックアドレスはブロックアドレスバッファ3Bを介してブロッ クアドレスデコーダ4Bに供給され、これにより、記憶内容を消去する対象のブ ロックが選択される。In response to the latch signal Slatch supplied in step S226, the control circuit 5 sends an instruction to the global buffer 6, causing the global buffer 6 to latch the block address supplied by the controller 20. The block address latched by the global buffer 6 is supplied to the block address decoder 4B via the block address buffer 3B, thereby selecting the block whose stored contents are to be erased.
次に、コントローラ20は、グローバルバッファ6に、記憶内容を消去する ための所定の消去コマンドを供給して、制御回路5にラッチ信号Slatchを送る (ステップS227)。Next, the controller 20 supplies a predetermined erase command to the global buffer 6 to erase the stored contents, and sends a latch signal Slatch to the control circuit 5 (step S227).
制御回路5は、ステップS227でラッチ信号Slatchが供給されたとき、グ ローバルバッファ6に供給されたデータが消去コマンドであることを検知して、 ブロックアドレスデコーダ4Bに、選択されているブロックの記憶内容を消去す るよう指示する。When the latch signal Slatch is supplied in step S227, the control circuit 5 detects that the data supplied to the global buffer 6 is an erase command and instructs the block address decoder 4B to erase the contents of the selected block.
指示を受けたブロックアドレスデコーダ4Bは、消去の対象として選択されて いるブロックのデータを消去するよう指示する信号を、消去制御回路1eに送る 。これにより、当該ブロックの記録内容は消去される。Upon receiving the instruction, the block address decoder 4B sends a signal to the erase control circuit 1e instructing it to erase the data in the block selected for erasure. This erases the recorded contents of that block.
ステップS221〜S227の処理により、メモリセルアレイ1に記録された データは消去され、消去されたデータと同じブロックに記憶されていたデータは 、他のページに退避される。By processing steps S221 to S227, the data recorded in memory cell array 1 is erased, and the data stored in the same block as the erased data is saved to another page.
なお、旧データ消去の処理は、書き込み処理の後に行われるものである必要は ない。従って、例えば、データを書き込む対象の物理アドレスを決定した後、そ の物理アドレスに新たに対応付けられた論理アドレスに対応付けられていた古い 物理アドレスがあるブロックの記録内容をまず消去し、次いで、データを書き込 む対象の物理アドレスに新たなデータを書き込むようにしてもよい。Note that the process of erasing old data does not necessarily have to be performed after the write process. Therefore, for example, after determining the physical address to which data is to be written, the contents of the block containing the old physical address that was associated with the new logical address associated with that physical address may first be erased, and then new data may be written to the physical address to which data is to be written.
また、データの消去が行われる場面は、上述のステップS221〜S227の 場合のような、データの書き込みの処理の一環としてなされる場面に限られない 。Furthermore, data erasure is not limited to being performed as part of the data writing process, as in steps S221 to S227 described above.
従って、データの消去は、新たなデータの書き込みを伴わずに行われてもよい。Therefore, data may be erased without writing new data.
具体的には、例えばまずCPU12が、データの消去を指示するコマンドをコ ントローラ20に送り、消去対象の論理アドレスをバスライン13を介してコン トローラ20に供給する。Specifically, for example, the CPU 12 first sends a command to the controller 20 instructing the controller 20 to erase data, and then supplies the logical address of the data to be erased to the controller 20 via the bus line 13.
コントローラ20は、コマンドに応答して、図7の処理のステップS201 〜S203における処理と同様の処理を行い、消去対象の論理アドレスが示す物 理アドレス(つまり、消去対象の物理アドレス)を特定する。In response to the command, the controller 20 performs the same processing as steps S201 to S203 of the processing in FIG. 7 to identify the physical address indicated by the logical address of the data to be erased (i.e., the physical address of the data to be erased).
そして、コントローラ20は、特定された消去対象の物理アドレスを、ステッ プS203で特定された物理アドレスであるものとして扱い、上述したステップ S221〜S227の処理を行う。これにより、消去対象の物理アドレスが属す るブロックの記録内容が消去される。The controller 20 then treats the identified physical address to be erased as the physical address identified in step S203, and performs the processing of steps S221 to S227 described above. As a result, the recorded contents of the block to which the physical address to be erased belongs are erased.
なお、上述のデータ書き込み処理において、コントローラ20は、新たに書き 込み対象の物理アドレスを指定する際、データが、最後にデータが書き込まれた 空きブロック以降のブロックに順次書き込まれ、後続のブロックに空きブロック がないときは、先頭のブロック以降の空きブロックに順次書き込まれるように指 定してもよい。In the above-described data write process, when specifying a new physical address to write to, the controller 20 may specify that the data be written sequentially to blocks following the free block to which data was last written, and if there are no free blocks following that, then the data be written sequentially to free blocks following the first block.
これにより、空きブロックへの書き込みはサイクリックになされるので、特定 のブロックのみのデータ更新の頻度が高くなることがなく、従って特定のブロッ クの性能が集中的に劣化する事態が防止される。This allows free blocks to be written to cyclically, preventing data updates to specific blocks from becoming too frequent, thereby preventing performance degradation in specific blocks.
(空きブロックテーブル及びアドレス変換テーブル更新) 以上の処理により、データの消去やデータの書き込みが完了すると、コントロ ーラ20は、空きブロックテーブル及びアドレス変換テーブルを更新するため、 図10に示す処理を開始する。(Updating the Free Block Table and Address Translation Table) Once the data erasure and writing are completed through the above process, the controller 20 initiates the process shown in Figure 10 to update the free block table and address translation table.
図10に示す処理において、まず、コントローラ20は、空きブロックテーブ ルを更新するため、図7のステップS201〜205の処理と実質的に同一の処 理を行って、フラッシュメモリユニット10から空きブロックテーブルを取得し 、その空きブロックテーブルを一時記憶する(ステップS301)。In the process shown in FIG. 10, first, in order to update the free block table, the controller 20 performs substantially the same process as steps S201 to S205 in FIG. 7 to obtain the free block table from the flash memory unit 10 and temporarily stores the free block table (step S301).
次に、コントローラ20は、一時記憶した空きブロックテーブルの内容に基づ き、新たに空きブロックテーブル及びアドレス変換テーブルを書き込むための空 きブロックを1個特定し、そのブロックの先頭のページを記憶する(ステ ップS302)。Next, based on the contents of the temporarily stored free block table, the controller 20 identifies one free block into which to write the free block table and address translation table, and stores the first page of that block (step S302).
そして、コントローラ20は、一時記憶した空きブロックテーブルのうち、デ ータの書き込みがなされた空きブロック及びステップS302で特定された空き ブロックを示すビットや、ステップS206及びS223で特定された物理アド レスが属するブロックを示すビットを、「1」から「0」に変換する。また、コ ントローラ20は、空きブロックテーブル及びアドレス変換テーブルが現在ある ブロックを表すビットや、ステップS227で記録内容を消去されたブロックを 示すビットを、「0」から「1」に変換する(ステップS303)。The controller 20 then converts bits in the temporarily stored free block table that indicate free blocks into which data has been written and free blocks identified in step S302, and bits that indicate blocks to which physical addresses identified in steps S206 and S223 belong, from "1" to "0." The controller 20 also converts bits that indicate blocks in which the free block table and address conversion table currently exist, and bits that indicate blocks whose recorded contents were erased in step S227, from "0" to "1" (step S303).
次に、コントローラ20は、ステップS302で特定した空きブロックの先頭 ページの物理アドレスをグローバルバッファ6に供給し、制御回路5にラッチ信 号Slatchを送る(ステップS304)。Next, the controller 20 supplies the physical address of the first page of the free block identified in step S302 to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S304).
制御回路5は、ラッチ信号Slatchに応答して、ビジー信号Sbusyの供給を停 止し、コントローラ20へのレディ信号Sreadyの供給を開始する。そして、X アドレスデコーダ4Xに、コントローラ20からグローバルバッファ6に供給さ れた物理アドレスを選択させる。In response to the latch signal Slatch, the control circuit 5 stops supplying the busy signal Sbusy and starts supplying the ready signal Sready to the controller 20. Then, the control circuit 5 causes the X address decoder 4X to select the physical address supplied from the controller 20 to the global buffer 6.
一方、コントローラ20は、レディ信号Sreadyに応答して、ステップS30 3で変換済みの空きブロックテーブルのうち先頭の1バイト分をグローバルバッ ファ6に供給し(ステップS305)、制御回路5に書込信号Swriteを送る( ステップS306)。Meanwhile, in response to the ready signal Sready, the controller 20 supplies the first byte of the free block table converted in step S303 to the global buffer 6 (step S305) and sends a write signal Swrite to the control circuit 5 (step S306).
制御回路5は、書込信号Swriteに応答して、コントローラ20からグローバ ルバッファ6に供給されたデータをグローバルバッファ6にラッチさせ、レディ 信号Sreadyの供給を停止し、コントローラ20へのビジー信号Sbusyの供給を 再開する。グローバルバッファ6は、バスライン13上のデータをラッチして、 I/Oバッファ2に格納する。In response to the write signal Swrite, the control circuit 5 causes the global buffer 6 to latch the data supplied from the controller 20 to the global buffer 6, stops supplying the ready signal Sready, and resumes supplying the busy signal SBusy to the controller 20. The global buffer 6 latches the data on the bus line 13 and stores it in the I/O buffer 2.
次に、制御回路5は、I/Oバッファ2に、I/Oバッファ2が格納してい るデータをデータ入出力端Tdataに供給させ、書込制御端Twritecontにアクテ ィブレベルの書込制御信号を供給して、データ入出力端Tdataに供給されている データを、現在選択されているページの先頭のメモリセルに記録させる。Next, the control circuit 5 causes the I/O buffer 2 to supply the data stored in the I/O buffer 2 to the data input/output terminal Tdata, and supplies an active-level write control signal to the write control terminal Twritecont, causing the data supplied to the data input/output terminal Tdata to be written into the first memory cell of the currently selected page.
そして、制御回路5は、ビジー信号Sbusyの供給を停止し、コントローラ20 へのレディ信号Sreadyの供給を再開する。Then, the control circuit 5 stops supplying the busy signal Sbusy and resumes supplying the ready signal Sready to the controller 20.
コントローラ20は、レディ信号Sreadyの供給の再開を検知すると、自己が 一時記憶する空きブロックテーブルのうち未だフラッシュメモリユニット10に 供給していない部分が残っているか否かを判別する(ステップS307)。When the controller 20 detects the resumption of the supply of the ready signal Sready, it determines whether any portion of the free block table temporarily stored in itself remains that has not yet been supplied to the flash memory unit 10 (step S307).
そして、残っていると判別すると、コントローラ20は、自己が一時記憶する 空きブロックテーブルの後続の1バイトをグローバルバッファ6に供給して(ス テップS308)、処理をステップS306に移す。If it is determined that there are remaining free blocks, the controller 20 supplies the next byte of the free block table that it temporarily stores to the global buffer 6 (step S308), and then proceeds to step S306.
一方、残っていないと判別すると、コントローラ20は、アドレス変換テーブ ルを更新するため、アドレス変換テーブルの先頭ページの物理アドレスをグロー バルバッファ6に供給し、制御回路5にラッチ信号Slatchを供給して、制御回 路5からレディ信号Sreadyが供給されるのを待機する(ステップS309)。On the other hand, if it is determined that no more pages remain, the controller 20 supplies the physical address of the first page of the address conversion table to the global buffer 6 in order to update the address conversion table, supplies a latch signal Slatch to the control circuit 5, and waits for a ready signal Sready to be supplied from the control circuit 5 (step S309).
すると、フラッシュメモリユニット10は、ステップS103でラッチ信号を 供給された場合と同様にして、ビジー信号Sbusyの供給を停止して、コントロー ラ20にレディ信号Sreadyを供給し、アドレス変換テーブルのうち、コントロ ーラ20が指示するページの記憶内容を、コントローラ20に供給する。Then, in the same manner as when the latch signal was supplied in step S103, the flash memory unit 10 stops supplying the busy signal Sbusy, supplies the ready signal Sready to the controller 20, and supplies the memory contents of the page of the address translation table designated by the controller 20 to the controller 20.
一方、コントローラ20は、ステップS105と同様にして、フラッシュメモ リユニット10から、自己が供給した物理アドレスにあたるページに記憶されて いる各論理アドレスと、各論理アドレスに対応付けられた物理アドレスとを読み 取って一時記憶する(ステップS310)。Meanwhile, the controller 20, similar to step S105, reads from the flash memory unit 10 each logical address stored in the page corresponding to the physical address provided by the controller 20, and the physical address associated with each logical address, and temporarily stores them (step S310).
次に、コントローラ20は、一時記憶した各論理アドレスの中に、物理アド レスの割り当てを変更されるべき対象として自らが記憶している論理アドレスと 一致するものがあるか否かを判別する(ステップS311)。Next, the controller 20 determines whether any of the temporarily stored logical addresses matches a logical address that it has stored as a target for which the physical address assignment should be changed (step S311).
一致するものがないと判別したとき、コントローラ20は、処理をステップS 313へ移す。一致するものがあると判別したとき、コントローラ20は、自己 が一時記憶している物理アドレスのうち、一致すると判別した論理アドレスに対 応付けられているものを、その論理アドレスに新たに対応付けられるべき物理ア ドレスへと変換し(ステップS312)、処理をステップS313に移す。If it is determined that there is no match, the controller 20 proceeds to step S313. If it is determined that there is a match, the controller 20 converts the physical address temporarily stored in itself that is associated with the logical address determined to match into a physical address that should be newly associated with that logical address (step S312), and proceeds to step S313.
例えば、データ書き込みの対象としてCPU12がコントローラ20に供給し た論理アドレスは、ステップS311において、物理アドレスの割り当てを変更 されるべき対象としてコントローラ20が記憶する論理アドレスと一致すると判 別される。そして、ステップS312で、当該論理アドレスが示す物理アドレス は、ステップS202で特定された古い物理アドレスから、ステップS206で 特定された新たな物理アドレスへと変換される。For example, in step S311, the logical address supplied by the CPU 12 to the controller 20 as the target for data writing is determined to match the logical address stored by the controller 20 as the target for which the physical address assignment should be changed. Then, in step S312, the physical address indicated by that logical address is converted from the old physical address identified in step S202 to the new physical address identified in step S206.
次に、この記憶装置は、ステップS301〜S308の処理と実質的に同一の 処理を行うことにより、メモリセルアレイ1のうち、図10の処理を開始して以 降で最新の書き込みがなされたページの次のページに、アドレス変換テーブルの うち自己が一時記憶する1ページ分の部分を書き込む(ステップS313)。Next, the storage device performs substantially the same processing as steps S301 to S308, thereby writing the portion of the address translation table that it temporarily stores, equivalent to one page, to the page of memory cell array 1 next to the page that was most recently written to since the start of the processing of FIG. 10 (step S313).
書き込みが完了すると、コントローラ20は、ステップS313で書き込んだ ページの数が、アドレス変換テーブルの総ページ数に等しいか否かを判定するこ とにより、アドレス変換テーブルの書き込みを完了したか否かを判別する(ステ ップS314)。When writing is complete, the controller 20 determines whether writing of the address translation table is complete by determining whether the number of pages written in step S313 is equal to the total number of pages in the address translation table (step S314).
そして、完了したと判別したときは処理をステップS316へ移す。完了して いないと判別したときは、グローバルバッファ6に、アドレス変換テーブル の次のページの物理アドレスを供給し、制御回路5にラッチ信号Slatchを送出 して(ステップS315)、処理をステップS310へ戻す。If it is determined that the process is complete, the process proceeds to step S316. If it is determined that the process is not complete, the physical address of the next page in the address translation table is supplied to the global buffer 6, a latch signal Slatch is sent to the control circuit 5 (step S315), and the process returns to step S310.
ステップS316において、コントローラ20は、更新後の空きブロックテー ブル及びアドレス変換テーブルの位置を記憶する。In step S316, the controller 20 stores the updated positions of the free block table and the address translation table.
そして、この記憶装置は、上述したステップS221〜S227と同様の処理 に従って、更新前の空きブロックテーブル及びアドレス変換テーブルがある論理 アドレスの記憶内容を消去する(ステップS317)。Then, the storage device erases the contents of the logical addresses where the pre-update free block table and address translation table are located (step S317), following the same process as steps S221 to S227 described above.
なお、この記憶装置では、データの書き込み順にそのデータの論理アドレスと 物理アドレスとの対応関係をアドレス変換テーブルに書き込んでいた。そして、 データの読み出し時には、アドレス変換テーブルを順次調べて論理アドレスと物 理アドレスとの対応関係を読み出していた。これに対し、論理アドレスと物理ア ドレスとの対応関係の読み出しに次のような高速化手法を用いてもよい。In this storage device, the correspondence between the logical and physical addresses of data is written to an address translation table in the order in which the data is written. Then, when reading data, the correspondence between the logical and physical addresses is read by sequentially checking the address translation table. Alternatively, the following method can be used to speed up the reading of the correspondence between logical and physical addresses:
例えば、コントローラ20は、データの書き込み時にCPU12から送られた 論理アドレスから所定のハッシュ関数を使用して論理アドレスと物理アドレスと の対応関係のアドレス変換テーブル内での記憶位置を求め、求めた記憶位置に論 理アドレスと物理アドレスとの対応関係を記憶するように、フラッシュメモリユ ニット10を制御してもよい。そして、コントローラ20は、データの読み出し 時にも同じハッシュ関数を使用してCPU12から送られた論理アドレスから論 理アドレスと物理アドレスとの対応関係の記憶位置を求め、フラッシュメモリユ ニット10のうち、自己が求めた記憶位置から物理アドレスを読み出せばよい。For example, when writing data, the controller 20 may use a predetermined hash function to determine the storage location in the address translation table of the correspondence between the logical address and the physical address from the logical address sent from the CPU 12, and control the flash memory unit 10 to store the correspondence between the logical address and the physical address in the determined storage location. When reading data, the controller 20 may use the same hash function to determine the storage location of the correspondence between the logical address and the physical address from the logical address sent from the CPU 12, and read the physical address from the determined storage location in the flash memory unit 10.
この場合、CPU12から送られた論理アドレスから求めた記憶位置の衝突が 起こる場合が生じるが、このときは求めた記憶位置の次の記憶位置に論理アドレ スと物理アドレスとの対応関係を記憶しても、衝突したものを記憶する領 域を特別に設けてもよい。In this case, a conflict may occur between the storage locations determined from the logical addresses sent from the CPU 12. In this case, the correspondence between the logical address and the physical address can be stored in the storage location next to the determined storage location, or a special area can be provided to store the conflicting addresses.
以上説明したように、この記憶装置では、メモリセルアレイ1自身にアドレス 変換テーブルと空きブロックテーブルを格納し、且つ、これらのテーブルを用い てデータの読み出し及び書き込みが可能となる。As described above, in this memory device, the address translation table and free block table are stored in the memory cell array 1 itself, and these tables can be used to read and write data.
なお、各ブロックの大きさは上述の大きさに限られない。例えば、各ブロック は16ページから構成される必要はなく、例えば、各ページの大きさの整数倍で あればよい。The size of each block is not limited to the above. For example, each block does not have to consist of 16 pages, but may be an integer multiple of the size of each page.
また、この記憶装置が、例えばJEIDA/PCMCIAインターフェースを 備えたフラッシュメモリである場合、各ページの大きさは、コンピュータ11上 で実行されるOS(オペレーティングシステム)により決定されるのが一般であ るが、必ずしもOSにより決定される必要はない。Furthermore, if the storage device is, for example, a flash memory with a JEIDA/PCMCIA interface, the size of each page is generally determined by the operating system (OS) running on computer 11, but it does not necessarily have to be determined by the OS.
また各ブロックの大きさは、この記憶装置に固有の値であるのが一般的である が、この記憶装置における各ブロックの大きさは、外部からの制御により指定で きるものであってもよい。The size of each block is generally a value specific to the storage device, but the size of each block in the storage device may be specified by external control.
(第2の実施の形態) 第1の実施の形態の記憶装置では、空きブロックの位置を表す情報が特定の領 域に集中して格納されていた。しかし、空きブロックの位置を表す情報は集中し て保存される必要はなく、例えば、各空きブロックに、他の空きブロックの位置 を表す情報を順次格納することにより、空きブロックを連鎖させる形態をとって 空きブロックの管理を行うことができる。(Second Embodiment) In the storage device of the first embodiment, information indicating the locations of free blocks was stored centrally in a specific area. However, information indicating the locations of free blocks does not need to be stored centrally. For example, free blocks can be managed in a chained fashion by sequentially storing information indicating the locations of other free blocks in each free block.
以下、そのような連鎖した空きブロックを備える第2の実施の形態の記憶装置 及びその空きブロックの管理の処理を、図11〜図13を参照して説明する。A second embodiment of a storage device having such chained free blocks and the process of managing the free blocks will be described below with reference to FIGS. 11 to 13.
この実施の形態の記憶装置の基本構成は、第1の実施の形態の記憶装置の基本 構成と実質的に同一である。ただし、この実施の形態では、アドレス変換テーブ ルは、任意のブロックの先頭領域に格納されている。The basic configuration of the storage device of this embodiment is substantially the same as the basic configuration of the storage device of the first embodiment. However, in this embodiment, the address translation table is stored in the leading area of any block.
また、各空きブロックの冗長部の所定位置には、図11に示すように、その空 きブロックよりも、論理的に後ろにある空きブロックのうちの最も近い空きブロ ックの番号を示す空きブロック情報が記憶されている。Furthermore, as shown in FIG. 11, free block information indicating the number of the free block that is closest to the free block in question among the free blocks that are logically subsequent to that free block is stored in a predetermined position in the redundant portion of each free block.
この空きブロック情報により定義される空きブロックの連鎖は、物理的な空き ブロックの配置とは、異なった順番で連鎖されている。The chain of free blocks defined by this free block information is chained in a different order than the physical free block layout.
また、制御回路5は、空きブロックの連鎖のうちの最初の空きブロックの空き ブロック番号を記憶している。The control circuit 5 also stores the free block number of the first free block in the free block chain.
この実施の形態の記憶装置では、上述のように、データ領域と冗長部が各ペ ージの中で互いに重複しないように配置されている。In the storage device of this embodiment, as described above, the data area and the redundant area are arranged so as not to overlap each other within each page.
このため、既に空きブロック情報が書き込まれている空きブロックにデータを 書き込む処理を、データを単に上書きすることにより実行しても、空きブロック の冗長部に書き込まれた空きブロック情報が破壊されることはない。Therefore, even if data is written to a free block that already has free block information written to it by simply overwriting the data, the free block information written in the redundant portion of the free block will not be destroyed.
(第2の実施の形態の動作) この記憶装置にデータを書き込む処理は、データ書き込みの処理と、空きブロ ック情報及びアドレス変換テーブルの更新の処理とを除き、第1の実施の形態の 処理と同一である。そこで、データ書き込みの処理と、空きブロック情報及びア ドレス変換テーブルを更新する処理とを中心に、図12〜図13を参照してこの 記憶装置の動作を説明する。(Operation of the Second Embodiment) The process of writing data to this storage device is identical to that of the first embodiment, except for the data write process and the process of updating the free block information and address translation table. Therefore, the operation of this storage device will be explained with reference to Figures 12 and 13, focusing on the data write process and the process of updating the free block information and address translation table.
(データ書き込み) この記憶装置において、データを書き込むときは、図12に示すステップS5 01から処理を開始する。(Data Writing) When writing data to this storage device, processing begins at step S501 shown in Figure 12.
ステップS501において、CPU12は、書き込み対象の論理アドレスを特 定した後、その論理アドレスのうち最も番号が若いものの値をバスライン13上 に供給し、コントローラ20にデータの書き込みを指示するコマンドを供給する 。In step S501, the CPU 12 identifies the logical address to be written, then supplies the lowest-numbered logical address to the bus line 13 and issues a command to the controller 20 to write the data.
コントローラ20は、ステップS501で供給されたコマンドに応答し、バス ライン13を介してCPU12から供給された論理アドレスを、書き込み対象の 論理アドレスとして記憶する(ステップS502)。In response to the command supplied in step S501, the controller 20 stores the logical address supplied from the CPU 12 via the bus line 13 as the logical address to be written (step S502).
次いで、コントローラ20は、前に述べたステップS202の処理と実質的に 同一の処理を行うことにより、自己が記憶する書き込み対象の論理アドレスに対 応付けられている物理アドレスを特定する(ステップS503)。Next, the controller 20 performs substantially the same process as the process of step S202 described above to identify the physical address associated with the logical address to be written that is stored in the controller 20 (step S503).
次に、コントローラ20は、自己が記憶するデータを参照し、先頭の空きブロ ックの先頭ページを特定する(ステップS504)。そして、以後、ステップS 503で特定した物理アドレスと、ステップS504で特定したページにあたる 物理アドレスとを互いに入れ替えて扱うことと決定する(ステップS505)。Next, the controller 20 references the data stored therein and identifies the first page of the first free block (step S504). It then determines that the physical address identified in step S503 and the physical address corresponding to the page identified in step S504 will be interchanged and treated as such (step S505).
これにより、書き込み対象の物理アドレスは、ステップS504で特定された、 連鎖の先頭の空きブロックにあたる物理アドレスとなる。As a result, the physical address to be written to becomes the physical address of the free block at the beginning of the chain, identified in step S504.
次に、コントローラ20は、グローバルバッファ6に、ステップS505で書 き込み対象として決定された物理アドレスを供給し、制御回路5に、当該物理ア ドレスが示すページの先頭から513バイト目以降を読み出すことを指示する( ステップS506)。Next, the controller 20 supplies the physical address determined as the write target in step S505 to the global buffer 6 and instructs the control circuit 5 to read the 513th byte and subsequent bytes from the beginning of the page indicated by the physical address (step S506).
制御回路5は、ステップS504で特定されたページを選択するようXアドレ スデコーダ4Xに指示し、次いで、メモリセルアレイ1の読出制御端Treadcont にデータ読み出しの指示を送る。メモリセルアレイ1は、当該ページの冗長部に 記憶されている空きブロック情報を、I/Oバッファ2及びグローバルバッファ 6を介して、コントローラ20に1バイトずつ順次供給する。The control circuit 5 instructs the X-address decoder 4X to select the page identified in step S504, and then sends a data read instruction to the read control terminal Treadcont of the memory cell array 1. The memory cell array 1 sequentially supplies the free block information stored in the redundant portion of the page to the controller 20, one byte at a time, via the I/O buffer 2 and the global buffer 6.
コントローラ20は、フラッシュメモリユニット10から供給された空きブロ ック情報を読み取ると、その空きブロック情報を、先頭の空きブロックの位置の 情報として記憶する(ステップS507)。ステップS507で記憶された空き ブロック情報は、図12に示す処理を経た後に新たに連鎖の先頭となる 空きブロックを表す。When the controller 20 reads the free block information provided by the flash memory unit 10, it stores the free block information as information about the position of the first free block (step S507). The free block information stored in step S507 represents the free block that will become the new first free block in the chain after the process shown in FIG. 12 has been completed.
続いてこの記憶装置は、ステップS505で書き込み対象として決定したペー ジに当たる物理アドレスを、第1の実施の形態におけるステップS206で特定 された物理アドレスとして扱い、上述のステップS211〜S217の処理と実 質的に同一の処理を行ってデータを書き込む(ステップS508)。Next, the storage device treats the physical address corresponding to the page determined as the write target in step S505 as the physical address identified in step S206 in the first embodiment, and writes the data by performing substantially the same processing as steps S211 to S217 described above (step S508).
そして、ステップS508の処理のうち、ステップS217にあたる処理にお いて、CPU12から書き込み終了を表す制御コードが供給されたと判別すると 、コントローラ20は、データ書込の処理を終了する。Then, in the process of step S508, if it is determined in the process corresponding to step S217 that a control code indicating the end of writing has been supplied from the CPU 12, the controller 20 ends the data writing process.
また、ステップS214にあたる処理において、現在選択中のページに512 バイトのデータが書き込まれたと判別すると、コントローラ20は、CPU12 に、次の論理アドレスの供給を要求する信号を送り、CPU12はこの信号に応 答して、次の論理アドレスをバスライン13上に送出する。そして、コントロー ラ20は、バスライン13を介してCPU12から次の論理アドレスを取得する と、その論理アドレスを、書き込み対象の論理アドレスとして、従前記憶してい た論理アドレスに上書きして記憶し、処理をステップS503に戻す。Furthermore, if it is determined in step S214 that 512 bytes of data have been written to the currently selected page, the controller 20 sends a signal to the CPU 12 requesting the next logical address. In response to this signal, the CPU 12 transmits the next logical address over the bus line 13. The controller 20 then acquires the next logical address from the CPU 12 via the bus line 13, overwrites the previously stored logical address with this logical address as the logical address to be written, and returns the process to step S503.
以上説明したステップS501〜S508の処理により、書き込み対象の論理 アドレスが示す物理アドレスが、空きブロックの連鎖の先頭から順次特定され、 特定された空きブロックにデータの書き込みが行われる。By the processing of steps S501 to S508 described above, the physical addresses indicated by the logical address to be written are identified sequentially, starting from the beginning of the chain of free blocks, and data is written to the identified free blocks.
(空きブロック情報及びアドレス変換テーブル更新) コントローラ20は、空きブロック情報及びアドレス変換テーブルを更新する とき、図13のステップS601より処理を開始する。(Updating free block information and address conversion tables) When updating free block information and address conversion tables, the controller 20 begins processing at step S601 in Figure 13.
図13に示す処理において、まず、コントローラ20は、自己が記憶するデー タを参照し、先頭の空きブロックの先頭ページを特定する(ステップS601) 。In the process shown in FIG. 13, the controller 20 first references the data stored therein and identifies the first page of the first free block (step S601).
次に、コントローラ20は、ステップS601で特定したページの物理アドレ スをグローバルバッファ6に供給し、制御回路5にラッチ信号Slatchを送る( ステップS602)。Next, the controller 20 supplies the physical address of the page identified in step S601 to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S602).
制御回路5は、ラッチ信号Slatchに応答し、グローバルバッファ6に供給さ れた物理アドレスが示すページを選択するようXアドレスデコーダ4Xに指示し 、ページが選択されると、メモリセルアレイ1の読出制御端Treadcontにデータ 読み出しの指示を送る。メモリセルアレイ1は、当該ページの記憶内容を、I/ Oバッファ2及びグローバルバッファ6を介してコントローラ20に1バイトず つ順次出力する。In response to the latch signal Slatch, the control circuit 5 instructs the X address decoder 4X to select the page indicated by the physical address supplied to the global buffer 6. Once the page is selected, the control circuit 5 sends a data read instruction to the read control terminal Treadcont of the memory cell array 1. The memory cell array 1 sequentially outputs the memory contents of the selected page, one byte at a time, to the controller 20 via the I/O buffer 2 and the global buffer 6.
そして、コントローラ20は、グローバルバッファ6から供給される当該記憶 内容のうち、先頭から513バイト目以降を順次読み取ることにより、読み取ら れたページの冗長部に記憶されている空きブロック情報を取得する(ステップS 603)。The controller 20 then sequentially reads the contents of the global buffer 6, starting from the 513th byte, and acquires the free block information stored in the redundant portion of the page that was read (step S603).
コントローラ20は、空きブロック情報を読み取ると、その空きブロック情報 を、ステップS601で特定した先頭の空きブロックの先頭ページの情報に上書 きする。すなわち、先頭の空きブロックの位置の情報を、その次の空きブロック の位置の情報に更新する(ステップS604)。After reading the free block information, the controller 20 overwrites the information for the first page of the first free block identified in step S601 with that free block information. In other words, the information for the location of the first free block is updated to the information for the location of the next free block (step S604).
次に、コントローラ20は、前に述べたステップS309〜S315の処理を 実行してアドレス変換テーブルを更新し(ステップS605)、更新後のアドレ ス変換テーブルの位置を記憶する(ステップS606)。Next, the controller 20 executes the processes of steps S309 to S315 described above to update the address translation table (step S605), and stores the location of the updated address translation table (step S606).
ただし、更新後のアドレス変換テーブルは、ステップS601で特定され、現 在選択されているページにあたる論理アドレスに書き込む。また、更新されるべ き情報には、論理アドレスが新たに割り当てられた物理ブロックの情報の他、前 に述べたステップS505における物理アドレスの交換の結果の情報が含まれる 。However, the updated address translation table is written to the logical address corresponding to the currently selected page identified in step S601. The information to be updated includes information about the physical block to which the logical address has been newly assigned, as well as information about the results of the physical address swap performed in step S505.
次に、コントローラ20は、空きブロック情報を追加するため、自己が記憶す るデータを参照し、先頭の空きブロックの先頭ページを特定する(ステップS6 07)。Next, in order to add free block information, the controller 20 references the data stored therein and identifies the first page of the first free block (step S607).
次に、コントローラ20は、自己が現在特定しているページの物理アドレスを グローバルバッファ6に供給し、制御回路5にはラッチ信号Slatchを送る(ス テップS608)。Next, the controller 20 supplies the physical address of the page it is currently identifying to the global buffer 6 and sends a latch signal Slatch to the control circuit 5 (step S608).
制御回路5は、ラッチ信号Slatchに応答し、グローバルバッファ6に供給さ れた物理アドレスが示すページをXアドレスデコーダ4Xに選択させ、メモリセ ルアレイ1の読出制御端Treadcontにデータ読み出しの指示を送って、メモリセ ルアレイ1に、当該ページの記憶内容を、I/Oバッファ2及びグローバルバッ ファ6を介してコントローラ20に順次供給させる。In response to the latch signal Slatch, the control circuit 5 causes the X address decoder 4X to select the page indicated by the physical address supplied to the global buffer 6, and sends a data read instruction to the read control terminal Treadcont of the memory cell array 1, causing the memory cell array 1 to sequentially supply the memory contents of the selected page to the controller 20 via the I/O buffer 2 and the global buffer 6.
そして、コントローラ20は、グローバルバッファ6から供給される情報のう ち、先頭から513バイト目以降を順次読み取ることにより、当該ページの冗長 部に記憶されている情報を取得する(ステップS609)。The controller 20 then sequentially reads the information supplied from the global buffer 6, starting from the 513th byte from the beginning, to obtain the information stored in the redundant portion of the page (step S609).
次に、コントローラ20は、ステップS609で読み取った情報の中に、空き ブロック情報があるか否かを判別する(ステップS610)。Next, the controller 20 determines whether or not the information read in step S609 contains free block information (step S610).
空きブロック情報があるとき、コントローラ20は、その空きブロック情報が 示す次の空きブロックの先頭ページを特定し(ステップS611)、処理をステ ップS608に戻す。If there is free block information, the controller 20 identifies the first page of the next free block indicated by the free block information (step S611) and returns the process to step S608.
空きブロック情報がないとき、現在特定されているページは、末尾の空きブロ ックの先頭ページである。If there is no free block information, the currently specified page is the first page of the last free block.
このとき、コントローラ20は、上述のステップS301〜S308の処理と 実質的に同様の処理を行い、先頭の512バイトが空白で、513バイト目以降 に、空きブロック情報として更新前の古いアドレス変換テーブルが現在格納され ているブロックの情報を含んでいるデータを、現在特定されているペー ジに書き込ませるよう、フラッシュメモリユニット10を制御する(ステップS 612)。At this time, the controller 20 performs substantially the same processing as steps S301 to S308 described above, controlling the flash memory unit 10 to write data to the currently specified page, with the first 512 bytes being blank and the data containing, from byte 513 onward, information about the block in which the old, pre-update address translation table is currently stored as free block information (step S612).
これにより、古いアドレス変換ブロックが現在格納されているブロックは、空 きブロックの連鎖の末尾に組み込まれる。This causes the block currently containing the old address translation block to be attached to the end of the chain of free blocks.
次に、この記憶装置は、上述したステップS221〜S227と同様の処理に 従って、更新前のアドレス変換テーブルがあるブロックの記憶内容を消去する( ステップS613)。これにより、古いアドレス変換ブロックが格納されていた ブロックは、空きブロックとなる。Next, the storage device erases the contents of the block containing the old address translation table (step S613) by following the same process as steps S221 to S227 described above. As a result, the block containing the old address translation table becomes a free block.
以上説明したステップS601〜S613の処理により、空きブロック情報及 びアドレス変換テーブルは更新される。By the processing of steps S601 to S613 described above, the free block information and the address translation table are updated.
なお、メモリセルアレイ1を初期化する場合、コントローラ20は、一旦、メ モリセルアレイ1の全ブロックの内容を消去した後、各ブロックの冗長部に空き ブロック連鎖情報を書き込むよう、フラッシュメモリユニット10を制御する。When initializing the memory cell array 1, the controller 20 erases the contents of all blocks in the memory cell array 1, and then controls the flash memory unit 10 to write free block chain information to the redundant section of each block.
この際、コントローラ20は、図11に示すように、空きブロックがとびとび に連鎖されるように、連鎖情報を書き込む。連鎖情報をこのような構成として、 データの書き込み位置を分散させれば、一部の領域のみに繰り返してデータが書 き込まれる事態を防止できる。In this case, the controller 20 writes the chain information so that free blocks are linked together at random, as shown in Figure 11. By configuring the chain information in this way and distributing the data write locations, it is possible to prevent data from being written repeatedly to only some areas.
なお、この発明は、上記実施の形態に限定されず、種々の変形及び応用が可能 である。The present invention is not limited to the above-described embodiment, and various modifications and applications are possible.
例えば、上記実施の形態では、理解を容易にするため、CPU12と記憶装置 との間のデータの授受を1バイト単位で行ったが、2バイト、4バイト単位で行 う等、データの転送単位は任意である。同様に、メモリセルの容量も1バイトに 限定されず、2バイト等でもよい。For example, in the above embodiment, data is transferred between the CPU 12 and the storage device in 1-byte units for ease of understanding, but the data transfer unit may be any unit, such as 2-byte or 4-byte units. Similarly, the capacity of the memory cell is not limited to 1 byte and may be 2 bytes, etc.
また、上記の実施の形態の記憶装置に使用されているメモリセルアレイ1は、 1チップだけであった。しかしながら、複数チップのフラッシュメモリを有する 記憶装置に本発明を適用することもできる。この場合、アドレス変換テーブル( 及び空きブロックテーブル)をいずれか1チップのフラッシュメモリのいずれか 1つのブロック内に記憶し、更にコントローラ20が、アドレス変換テーブル( 及び空きブロックテーブル)を記憶するチップの情報を記憶すればよい。また、 上記の第2の実施の形態のように空きブロック情報を連鎖情報によって構成する 場合には、次の空きブロックのあるチップとブロック番号とを示す連鎖情報を冗 長領域に書き込めばよい。Furthermore, the memory cell array 1 used in the storage device of the above embodiment was only one chip. However, the present invention can also be applied to storage devices having multiple flash memory chips. In this case, the address translation table (and free block table) can be stored in one block of one of the flash memory chips, and the controller 20 can store information about the chip storing the address translation table (and free block table). Furthermore, if free block information is constructed using chain information, as in the second embodiment above, chain information indicating the chip with the next free block and its block number can be written to the redundant area.
また、上記実施の形態では、メモリセルアレイ1は、NAND型のものによっ て構成されていたが、NOR型のものによって構成することができる。In the above embodiment, the memory cell array 1 is configured as a NAND type, but it may be configured as a NOR type.
また、上記実施の形態では、記憶装置内に制御回路5を配置したが、制御回路 5が実行する動作をコントローラ20やCPU12に行わせることにより、制御 回路5を使用せずに、メモリセルアレイ1へのアクセスを制御することも可能で ある。また、コントローラ20が実行する動作をCPU12に行わせることによ り、コントローラ20を使用せずに、メモリセルアレイ1へのアクセスを制御す ることも可能である。Furthermore, while the above embodiment has the control circuit 5 disposed within the storage device, it is possible to control access to the memory cell array 1 without using the control circuit 5 by having the controller 20 or the CPU 12 perform the operations performed by the control circuit 5. It is also possible to control access to the memory cell array 1 without using the controller 20 by having the CPU 12 perform the operations performed by the controller 20.
制御回路5やコントローラ20の動作をCPU12が実行する場合、上述の制 御動作を実行するためのプログラムを格納した媒体(フロッピーディスク、CD −ROM等)から該プログラムをコンピュータ11にインストールし、OS(オ ペレーティングシステム)上で動作させることにより、上述の処理を実行させる 。When the CPU 12 executes the operations of the control circuit 5 and the controller 20, the program for executing the above-described control operations is installed into the computer 11 from a medium (e.g., floppy disk, CD-ROM, etc.) that stores the program, and the program is run on the OS (operating system) to execute the above-described processes.
以上説明したように、この発明によれば、空きブロックの位置を表す情報や論 理アドレスと物理アドレスとの対応関係を表す情報等が、ブロック消去型記憶媒 体に記憶される。このため、空きブロックの位置を表す情報や論理アドレスや物 理アドレスとの対応関係を表す情報等を記憶する記憶媒体を別に用意す る必要がない。As described above, according to the present invention, information indicating the locations of free blocks, information indicating the correspondence between logical addresses and physical addresses, etc., is stored in a block-erasable storage medium. Therefore, there is no need to prepare a separate storage medium for storing information indicating the locations of free blocks, information indicating the correspondence between logical addresses and physical addresses, etc.
───────────────────────────────────────────────────── (注)この公表は、国際事務局(WIPO)により国際公開された公報を基に作 成したものである。 なおこの公表に係る日本語特許出願(日本語実用新案登録出願)の国際公開の 効果は、特許法第184条の10第1項(実用新案法第48条の13第2項)に より生ずるものであり、本掲載とは関係ありません。───────────────────────────────────────────────────── (Note) This publication is based on the publication published internationally by the International Bureau of Patents (WIPO). The effect of the international publication of the Japanese patent application (Japanese utility model registration application) related to this publication arises pursuant to Article 184-10, Paragraph 1 of the Patent Act (Article 48-13, Paragraph 2 of the Utility Model Act) and is unrelated to this publication.
Claims (24)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33559697 | 1997-12-05 | ||
| JP9-335596 | 1997-12-05 | ||
| PCT/JP1998/005441 WO1999030239A1 (en) | 1997-12-05 | 1998-12-02 | Memory and access method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO1999030239A1 true JPWO1999030239A1 (en) | 2000-08-08 |
| JP3680142B2 JP3680142B2 (en) | 2005-08-10 |
Family
ID=18290361
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP53061499A Expired - Fee Related JP3680142B2 (en) | 1997-12-05 | 1998-12-02 | Storage device and access method |
Country Status (6)
| Country | Link |
|---|---|
| US (1) | US6477632B1 (en) |
| EP (1) | EP0973097A4 (en) |
| JP (1) | JP3680142B2 (en) |
| KR (1) | KR100614469B1 (en) |
| TW (1) | TW400476B (en) |
| WO (1) | WO1999030239A1 (en) |
Families Citing this family (30)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000311469A (en) * | 1999-02-26 | 2000-11-07 | Matsushita Electric Ind Co Ltd | Disk control device and disk device using the same |
| JP3443093B2 (en) * | 2000-12-27 | 2003-09-02 | 株式会社東芝 | Digital recording and playback device |
| JP4772214B2 (en) * | 2001-06-08 | 2011-09-14 | ルネサスエレクトロニクス株式会社 | Nonvolatile memory device and rewrite control method thereof |
| KR100437609B1 (en) * | 2001-09-20 | 2004-06-30 | 주식회사 하이닉스반도체 | Method for address translation of semiconductor memory device and apparatus the same |
| US6678785B2 (en) * | 2001-09-28 | 2004-01-13 | M-Systems Flash Disk Pioneers Ltd. | Flash management system using only sequential write |
| WO2004001605A1 (en) * | 2002-06-19 | 2003-12-31 | Tokyo Electron Device Limited | Memory device, memory managing method and program |
| US7120068B2 (en) * | 2002-07-29 | 2006-10-10 | Micron Technology, Inc. | Column/row redundancy architecture using latches programmed from a look up table |
| JP3694501B2 (en) * | 2002-10-30 | 2005-09-14 | 松下電器産業株式会社 | Storage device |
| US20050050285A1 (en) * | 2003-08-26 | 2005-03-03 | Haas William Robert | Memory control system and method for installing new memory |
| JP2005092678A (en) * | 2003-09-19 | 2005-04-07 | Matsushita Electric Ind Co Ltd | Semiconductor memory card and nonvolatile memory data erasing method |
| JP2005285191A (en) * | 2004-03-29 | 2005-10-13 | Nec Electronics Corp | Nonvolatile semiconductor memory device and its driving method |
| US7237062B2 (en) * | 2004-04-02 | 2007-06-26 | Seagate Technology Llc | Storage media data structure system and method |
| JP4157501B2 (en) * | 2004-06-30 | 2008-10-01 | 株式会社東芝 | Storage device |
| JP4637524B2 (en) * | 2004-07-27 | 2011-02-23 | ルネサスエレクトロニクス株式会社 | Memory card |
| KR100622349B1 (en) * | 2004-08-04 | 2006-09-14 | 삼성전자주식회사 | A method for managing a defective block in a flash memory device and a flash memory device having a defective block management function. |
| EP1630657A1 (en) * | 2004-08-30 | 2006-03-01 | STMicroelectronics S.r.l. | Embedded storage device with integrated data-management functions and storage system incorporating it |
| JP4806183B2 (en) * | 2004-12-24 | 2011-11-02 | 富士通セミコンダクター株式会社 | File information writing processing method and program |
| KR100630735B1 (en) | 2005-01-14 | 2006-10-02 | 삼성전자주식회사 | Method and apparatus for providing selective access to a plurality of devices |
| US8072987B1 (en) * | 2005-09-30 | 2011-12-06 | Emc Corporation | Full array non-disruptive data migration |
| US8107467B1 (en) | 2005-09-30 | 2012-01-31 | Emc Corporation | Full array non-disruptive failover |
| US8589504B1 (en) | 2006-06-29 | 2013-11-19 | Emc Corporation | Full array non-disruptive management data migration |
| US7769945B2 (en) * | 2007-01-18 | 2010-08-03 | Sandisk Il Ltd. | Method and system for facilitating fast wake-up of a flash memory system |
| WO2008087634A1 (en) * | 2007-01-18 | 2008-07-24 | Sandisk Il Ltd. | A method and system for facilitating fast wake-up of a flash memory system |
| US9063895B1 (en) | 2007-06-29 | 2015-06-23 | Emc Corporation | System and method of non-disruptive data migration between heterogeneous storage arrays |
| US9098211B1 (en) | 2007-06-29 | 2015-08-04 | Emc Corporation | System and method of non-disruptive data migration between a full storage array and one or more virtual arrays |
| WO2009090692A1 (en) | 2008-01-16 | 2009-07-23 | Panasonic Corporation | Semiconductor memory device and semiconductor memory system |
| TWI415134B (en) * | 2008-04-10 | 2013-11-11 | Phison Electronics Corp | Data accessing method, controller and system using the same |
| TWI381393B (en) * | 2008-10-06 | 2013-01-01 | Phison Electronics Corp | Block management and replacement method, flash memory storage system and controller using the same |
| TWI427476B (en) * | 2009-02-24 | 2014-02-21 | Silicon Motion Inc | Flash memory device and method for accessing a flash memory |
| CN101556556B (en) * | 2009-05-22 | 2012-02-22 | 炬力集成电路设计有限公司 | Data storage method and device |
Family Cites Families (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61245253A (en) * | 1985-04-24 | 1986-10-31 | Hitachi Ltd | Virtual machine input/output control method |
| JPS6319051A (en) * | 1986-07-11 | 1988-01-26 | Fujitsu Ltd | Memory acquiring system |
| GB2251323B (en) * | 1990-12-31 | 1994-10-12 | Intel Corp | Disk emulation for a non-volatile semiconductor memory |
| JP2582487B2 (en) * | 1991-07-12 | 1997-02-19 | インターナショナル・ビジネス・マシーンズ・コーポレイション | External storage system using semiconductor memory and control method thereof |
| JP3178909B2 (en) * | 1992-01-10 | 2001-06-25 | 株式会社東芝 | Semiconductor memory device |
| US5375222A (en) * | 1992-03-31 | 1994-12-20 | Intel Corporation | Flash memory card with a ready/busy mask register |
| JP3485938B2 (en) * | 1992-03-31 | 2004-01-13 | 株式会社東芝 | Nonvolatile semiconductor memory device |
| JPH06187205A (en) * | 1992-12-18 | 1994-07-08 | Nikon Corp | Method for accessing eeprom and surveying equipment |
| US5404485A (en) * | 1993-03-08 | 1995-04-04 | M-Systems Flash Disk Pioneers Ltd. | Flash file system |
| US5485595A (en) * | 1993-03-26 | 1996-01-16 | Cirrus Logic, Inc. | Flash memory mass storage architecture incorporating wear leveling technique without using cam cells |
| DE4410060B4 (en) * | 1993-04-08 | 2006-02-09 | Hewlett-Packard Development Co., L.P., Houston | Translating device for converting a virtual memory address into a physical memory address |
| JP2971302B2 (en) * | 1993-06-30 | 1999-11-02 | シャープ株式会社 | Recording device using EEPROM |
| JP2938732B2 (en) * | 1993-11-10 | 1999-08-25 | 松下電送システム株式会社 | Memory management device and facsimile device using the same |
| JPH08137634A (en) * | 1994-11-09 | 1996-05-31 | Mitsubishi Electric Corp | Flash disk card |
| JP3464836B2 (en) * | 1995-01-19 | 2003-11-10 | 富士通株式会社 | Memory management device for storage device |
| JPH08249225A (en) * | 1995-03-10 | 1996-09-27 | Nec Corp | Memory management device |
| US5978808A (en) * | 1995-12-27 | 1999-11-02 | Intel Corporation | Virtual small block file manager for flash memory array |
| JPH09198195A (en) * | 1996-01-19 | 1997-07-31 | Nec Corp | Disk device capable of rearranging data |
| JP3321587B2 (en) * | 1996-02-01 | 2002-09-03 | 東京エレクトロンデバイス株式会社 | Data rewriting method and memory control device in flash memory system |
| JPH09212411A (en) * | 1996-02-06 | 1997-08-15 | Tokyo Electron Ltd | Memory system |
-
1998
- 1998-12-02 US US09/319,621 patent/US6477632B1/en not_active Expired - Fee Related
- 1998-12-02 KR KR1019997006688A patent/KR100614469B1/en not_active Expired - Fee Related
- 1998-12-02 WO PCT/JP1998/005441 patent/WO1999030239A1/en not_active Ceased
- 1998-12-02 JP JP53061499A patent/JP3680142B2/en not_active Expired - Fee Related
- 1998-12-02 EP EP98957137A patent/EP0973097A4/en not_active Withdrawn
- 1998-12-03 TW TW087120109A patent/TW400476B/en not_active IP Right Cessation
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3680142B2 (en) | Storage device and access method | |
| JPWO1999030239A1 (en) | Storage device and access method | |
| KR100375533B1 (en) | Data processing system, block erasing type memory device and memory medium storing program for controlling memory device | |
| US5953737A (en) | Method and apparatus for performing erase operations transparent to a solid state storage system | |
| US6477616B1 (en) | Storage device, storage system, memory management method, recording medium, and computer data signal | |
| US5717886A (en) | Semiconductor disk device and memory management method | |
| US5963983A (en) | Method and apparatus for dynamically creating conversion tables to access a semiconductor memory device | |
| JP4611024B2 (en) | Method and apparatus for grouping pages in a block | |
| EP1729304B1 (en) | Space management for managing high capacity nonvolatile memory | |
| JP4695801B2 (en) | Method and apparatus for reducing block write operation time performed on non-volatile memory | |
| EP0522780B1 (en) | Control method for a computer memory device | |
| EP1561168B1 (en) | Method and apparatus for splitting a logical block | |
| EP1739683A1 (en) | Space management for managing high capacity nonvolatile memory | |
| US20010048121A1 (en) | Semiconductor memory device with block alignment function | |
| JP2002508862A (en) | Moving sectors in blocks in flash memory | |
| WO2000050997A1 (en) | Memory card, method for allotting logical address, and method for writing data | |
| JP3421581B2 (en) | Storage device using nonvolatile semiconductor memory | |
| KR20070024504A (en) | Memory, memory management methods and programs | |
| US7404031B2 (en) | Memory card, nonvolatile semiconductor memory, and method of controlling semiconductor memory | |
| JP2002163139A (en) | Data management device and data management method using the same | |
| JPH05150913A (en) | Silicon disk with flash memory as storage medium | |
| JPH0695955A (en) | Flash file system | |
| TW202449616A (en) | Memory device, flash memory controller and associated control method | |
| TW202505530A (en) | Method for simulating electrically-erasable programmable read-only memory by using flash memory and flash memory system using same | |
| US6898680B2 (en) | Minimization of overhead of non-volatile memory operation |