JP2003058420A - Method of reading data from NAND flash memory - Google Patents
Method of reading data from NAND flash memoryInfo
- Publication number
- JP2003058420A JP2003058420A JP2001246617A JP2001246617A JP2003058420A JP 2003058420 A JP2003058420 A JP 2003058420A JP 2001246617 A JP2001246617 A JP 2001246617A JP 2001246617 A JP2001246617 A JP 2001246617A JP 2003058420 A JP2003058420 A JP 2003058420A
- Authority
- JP
- Japan
- Prior art keywords
- address
- flash memory
- data
- nand flash
- read
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
- Read Only Memory (AREA)
Abstract
(57)【要約】
【課題】 従来におけるNAND型フラッシュメモリか
らのデータ読み出し方法では、1ワード分のデータを読
み出す毎にCPUの関与が必要となって付随的な処理が
発生するために、データを読み出すのに時間がかかると
いう課題があった。
【解決手段】 NAND型フラッシュメモリからのデー
タ読み出し方法において、読み出し対象となるNAND
型フラッシュメモリ上のセクタを特定するステップと、
NAND型フラッシュメモリに対応付けられたアドレス
範囲内のアドレスがアドレスタグとして登録されている
キャッシュラインをアドレスヒット無効とするように設
定するステップと、上記アドレス範囲内のアドレスをア
クセス対象として逐次的に読み出し命令を出力するステ
ップとを有する。
(57) [Problem] In a conventional method of reading data from a NAND flash memory, every time data of one word is read, the involvement of a CPU is required and ancillary processing occurs. There is a problem that it takes time to read the data. In a method of reading data from a NAND flash memory, a NAND to be read is used.
Identifying a sector on the flash memory;
Setting a cache line in which an address within the address range associated with the NAND type flash memory is registered as an address tag so as to invalidate an address hit; and sequentially setting addresses within the address range as access targets. Outputting a read command.
Description
【0001】[0001]
【発明の属する技術分野】この発明は、メモリカード等
の各種電子機器に設けられたNAND型フラッシュメモ
リからのデータ読み出し方法に係り、特にCPUに内蔵
または付設されたキャッシュメモリへのNAND型フラ
ッシュメモリからのデータ読み出し方法に関するもので
ある。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for reading data from a NAND flash memory provided in various electronic devices such as a memory card, and more particularly to a NAND flash memory for a cache memory built in or attached to a CPU. The present invention relates to a method of reading data from the.
【0002】[0002]
【従来の技術】図3は、NAND型フラッシュメモリを
記憶手段として用いる情報処理装置の構成の一例を示す
図である。図3において、1はプログラムの実行や、デ
ータの処理等を実施するCPU(中央処理装置)、2は
データアクセスの高速化を図るためにCPU1に接続さ
れて所定の記憶容量を有するキャッシュラインを記憶単
位としてデータを記憶するキャッシュメモリ、3はキャ
ッシュメモリ2のキャッシュライン毎に、当該キャッシ
ュラインに記憶されるデータが元来記憶されていた他の
記憶手段上でのアドレスを特定する情報(例えば先頭ア
ドレスとして与えられるもので、以下、当該特定情報に
ついてはアドレスタグと称するものとする)をそれぞれ
登録するように設けられたアドレスアレイ、4はCPU
1、キャッシュメモリ2等を有して構成され電子機器全
体の制御等に係る処理を実施するプロセッサ、5はNA
ND型フラッシュメモリ、6はNAND型フラッシュメ
モリ5の入出力ポート、7は入出力コントローラ、8は
メモリセルアレイ、9は入出力コントローラ7とメモリ
セルアレイ8との間に接続されて種々のレジスタから構
成されるレジスタ群である。レジスタ群9のなかには、
1ワード(1バイト)分の容量を有してメモリセルアレ
イ8から読み出されたデータあるいはメモリセルアレイ
8へ書き込むデータを一次的に記憶するデータレジスタ
10、CPU1から出力されるコマンドを記憶するコマ
ンドレジスタ11、CPU1から出力されてメモリセル
アレイ8において処理対象となるセクタの先頭アドレス
を記憶するアドレスレジスタ12、処理対象となるセク
タの先頭アドレスが当初設定されるとともに1ワード分
のデータがメモリセルアレイ8からデータレジスタ10
へ読み出される毎にあるいは1ワード分のデータがデー
タレジスタ10からメモリセルアレイ8に書き込まれる
毎に、設定されたアドレス値をインクリメントするアド
レスカウンタ13を少なくとも含んでいる。なお、アド
レスレジスタ12により、アドレスカウンタ13の機能
を併用するような構成をとることも可能である。また、
図3に示される情報処理装置においては、CPU1に対
してあるいはCPU1を含むプロセッサ4に対して、図
示されてはいないRAMやROM等の種々の他の記憶手
段が接続されているものとする。2. Description of the Related Art FIG. 3 is a diagram showing an example of the configuration of an information processing apparatus using a NAND flash memory as a storage means. In FIG. 3, 1 is a CPU (central processing unit) that executes programs and processes data, and 2 is a cache line that is connected to the CPU 1 and has a predetermined storage capacity in order to speed up data access. The cache memory 3 for storing data as a storage unit, for each cache line of the cache memory 2, the information for specifying the address on the other storage means where the data stored in the cache line was originally stored (for example, The address array is provided as a head address, and hereinafter, the specific information will be referred to as an address tag).
1, a processor configured to include a cache memory 2 and the like for executing processing relating to control of the entire electronic device, and the like, 5 is an NA
ND type flash memory, 6 is an input / output port of the NAND type flash memory 5, 7 is an input / output controller, 8 is a memory cell array, and 9 is connected between the input / output controller 7 and the memory cell array 8 and is composed of various registers. It is a group of registers that are In the register group 9,
A data register 10 for temporarily storing data read from the memory cell array 8 or data to be written to the memory cell array 8 having a capacity of 1 word (1 byte), and a command register for storing commands output from the CPU 1. 11, an address register 12 that stores the start address of a sector to be processed in the memory cell array 8 that is output from the CPU 1, the start address of the sector to be processed is initially set, and one word of data from the memory cell array 8 Data register 10
It includes at least an address counter 13 that increments the set address value each time it is read out or when one word of data is written from the data register 10 to the memory cell array 8. The address register 12 can also be configured to use the function of the address counter 13 together. Also,
In the information processing apparatus shown in FIG. 3, it is assumed that various other storage means such as a RAM and a ROM (not shown) are connected to the CPU 1 or the processor 4 including the CPU 1.
【0003】また、本願発明では、プロセッサ4に接続
される各記憶手段に対してキャッシュメモリを介しての
データアクセスを図る第1のモードと、各記憶手段に対
してキャッシュメモリを外しての直接的なデータアクセ
スを図る第2のモードとをCPU1が適宜選択可能であ
るように構成されている情報処理装置を想定する。すな
わち、各記憶手段については、キャッシュメモリを介し
てのデータアクセスを実行するために割り当てられるア
ドレス(以下、キャッシュ領域内のアドレスと称する)
と、キャッシュメモリを外しての直接的なデータアクセ
スを実行するために割り当てられるアドレス(以下、非
キャッシュ領域内のアドレスと称する)とが存在する。
ところで、NAND型フラッシュメモリへのデータアク
セスについては、通常、CPU側から見てメモリセルア
レイ8内に格納される各ワードデータに対してのアドレ
ス割り当てはなされておらず、NAND型フラッシュメ
モリの入出力ポート6に対して単一のアドレスあるいは
所定サイズの記憶領域を包含するようなアドレス範囲を
成す複数のアドレスが割り当てられているのみであるか
ら、NAND型フラッシュメモリについてキャッシュメ
モリを介してのデータアクセスを図った場合には、NA
ND型フラッシュメモリ内の異なるセクタのデータにつ
いてもアドレスヒットが発生してキャッシュメモリにデ
ータを転送することができない。したがって、NAND
型フラッシュメモリ内に格納されたデータに対してアク
セスする際には、CPU1は直接的なデータアクセスを
図る第2のモードをとる。具体的には、メモリセルアレ
イ8上において読み出し対象となるセクタからデータを
読み出すためには、NAND型フラッシュメモリの入出
力ポート6に対して割り当てられたアドレスを対象とし
て、NAND型フラッシュメモリについて固有のRea
d命令をコマンドレジスタ11に書き込むとともに、N
AND型フラッシュメモリ上において読み出し対象とな
るセクタの先頭アドレスを示すデータをアドレスレジス
タ12に書き込む。これにより、NAND型フラッシュ
メモリ上において読み出し対象となるセクタのアドレス
を特定することが可能となる。Further, according to the present invention, the first mode for accessing data through the cache memory to each storage means connected to the processor 4 and the direct mode after removing the cache memory for each storage means It is assumed that the information processing apparatus is configured such that the CPU 1 can appropriately select the second mode for achieving a specific data access. That is, for each storage unit, an address assigned to execute data access via the cache memory (hereinafter referred to as an address in the cache area)
And an address (hereinafter, referred to as an address in the non-cache area) assigned to execute a direct data access without the cache memory.
By the way, regarding data access to the NAND flash memory, normally, no address is assigned to each word data stored in the memory cell array 8 when viewed from the CPU side. Since only a single address or a plurality of addresses forming an address range including a storage area of a predetermined size are assigned to the port 6, data access via the cache memory for the NAND flash memory is performed. In the case of
Address hits also occur in data of different sectors in the ND type flash memory, and the data cannot be transferred to the cache memory. Therefore, NAND
When accessing the data stored in the flash memory, the CPU 1 takes the second mode for direct data access. Specifically, in order to read data from the sector to be read on the memory cell array 8, the address assigned to the input / output port 6 of the NAND flash memory is targeted, and is unique to the NAND flash memory. Rea
While writing the d instruction to the command register 11, N
Data indicating the start address of the sector to be read on the AND type flash memory is written in the address register 12. This makes it possible to specify the address of the sector to be read on the NAND flash memory.
【0004】次に、上記の情報処理装置において、NA
ND型フラッシュメモリからデータを読み出す際の動作
について1セクタ分のデータの読み出しを例として説明
する。図4は、NAND型フラッシュメモリから1セク
タ分のデータを読み出す際の従来のデータ読み出し方法
を示すフローチャートである。まず、NAND型フラッ
シュメモリの入出力ポート6に対して割り当てられたア
ドレスを対象として、NAND型フラッシュメモリ5に
ついて固有のRead命令を出力する(ステップS1
1)。次に、読み出し対象のセクタの先頭アドレスを示
すデータを1回であるいは複数回に分けて出力する(ス
テップS12)。この際、メモリセルアレイ8上におけ
る先頭アドレスは、アドレスレジスタ12に書き込まれ
るとともに、当該アドレス値が初期値としてアドレスカ
ウンタ13に設定される。アドレスカウンタ13に設定
されたアドレスに対応する1ワード分のデータはデータ
レジスタ10に出力される。Next, in the above information processing apparatus, NA
The operation of reading data from the ND type flash memory will be described by taking the reading of data for one sector as an example. FIG. 4 is a flowchart showing a conventional data reading method when reading data for one sector from the NAND flash memory. First, a read command specific to the NAND flash memory 5 is output for the address assigned to the input / output port 6 of the NAND flash memory (step S1).
1). Next, the data indicating the start address of the sector to be read is output once or in a plurality of times (step S12). At this time, the head address on the memory cell array 8 is written in the address register 12, and the address value is set in the address counter 13 as an initial value. One word of data corresponding to the address set in the address counter 13 is output to the data register 10.
【0005】次に、CPU1は、上記のような工程が実
施されて、読み出し処理の準備が完了しているか否かを
判定する(ステップS13)。読み出し準備が完了して
いることが確認されれば、データレジスタ10から1ワ
ード分のデータを読み出して、当該データを例えばRA
M内に設定されたワークエリア内に書き込む(ステップ
S14)。この際、データレジスタ10から1ワード分
のデータが読み出される毎に、アドレスカウンタ13に
設定されるアドレス値はインクリメントされ、アドレス
カウンタ13に新たに設定されたアドレスに対応する1
ワード分のデータがデータレジスタ10に出力される。
次に、NAND型フラッシュメモリから1セクタ分のデ
ータの読み出しが完了したか否かを判定する(ステップ
S15)。1セクタ分のデータの読み出しが完了してい
なければ、ステップS14に戻って1ワード分のデータ
の読み出しを続行する。また、1セクタ分のデータの読
み出しが完了していれば、処理を終了する。Next, the CPU 1 determines whether or not the preparation for the reading process has been completed by carrying out the above steps (step S13). If it is confirmed that the read preparation is completed, one word of data is read from the data register 10 and the data is written to, for example, RA.
The data is written in the work area set in M (step S14). At this time, each time one word of data is read from the data register 10, the address value set in the address counter 13 is incremented to 1 corresponding to the address newly set in the address counter 13.
The word data is output to the data register 10.
Next, it is determined whether the reading of the data for one sector from the NAND flash memory is completed (step S15). If the reading of the data for one sector has not been completed, the process returns to step S14 and the reading of the data for one word is continued. If the reading of the data for one sector is completed, the processing is ended.
【0006】[0006]
【発明が解決しようとする課題】従来におけるNAND
型フラッシュメモリからのデータ読み出し方法は上記の
ようであるので、1ワード分のデータを読み出す毎にC
PUの関与が必要となって、1ワード分のデータに係る
読み出し処理を実施するにあたってCPU内のカウンタ
のインクリメント処理、カウンタに設定されたカウント
値に係る比較処理等の付随的な処理がCPUにおいて発
生するために、データを読み出すのに時間がかかるとい
う課題があった。Conventional NAND
Since the method of reading data from the flash memory is as described above, C is read every time one word of data is read.
Since the involvement of the PU is necessary, the CPU performs ancillary processing such as increment processing of the counter in the CPU and comparison processing of the count value set in the counter when executing the reading processing for the data of one word. However, there is a problem that it takes time to read the data because of the occurrence.
【0007】この発明は上記のような課題を解決するた
めになされたもので、NAND型フラッシュメモリから
のデータの読み出しを高速に実施することができるNA
ND型フラッシュメモリからのデータ読み出し方法を得
ることを目的とする。The present invention has been made in order to solve the above problems, and it is possible to read data from a NAND flash memory at high speed.
An object of the present invention is to obtain a method of reading data from an ND type flash memory.
【0008】[0008]
【課題を解決するための手段】この発明に係るNAND
型フラッシュメモリからのデータ読み出し方法は、読み
出し対象となるNAND型フラッシュメモリ上のセクタ
を特定するステップと、キャッシュメモリを介してのデ
ータアクセスを図るモードでNAND型フラッシュメモ
リに対応付けられているアドレス範囲内のアドレスがア
ドレスタグとして登録されているキャッシュメモリ内の
1または複数のキャッシュラインをアドレスヒット無効
とするように設定するステップと、上記モードでNAN
D型フラッシュメモリに対応付けられているアドレス範
囲内においてキャッシュラインの容量に応じた所定のア
ドレス間隔毎に設定されるアドレスをアクセス対象とし
て読み出し命令を逐次的に出力するステップとを有する
ようにしたものである。A NAND according to the present invention
The method of reading data from the flash memory is to specify the sector on the NAND flash memory to be read, and the address associated with the NAND flash memory in the mode for data access via the cache memory. A step of setting one or a plurality of cache lines in the cache memory in which an address within the range is registered as an address tag to invalidate the address hit; and a NAN in the above mode.
A step of sequentially outputting a read command for an access target at an address set at a predetermined address interval corresponding to the capacity of the cache line within the address range associated with the D-type flash memory. It is a thing.
【0009】この発明に係るNAND型フラッシュメモ
リからのデータ読み出し方法は、キャッシュメモリを介
してのデータアクセスを図るモードでNAND型フラッ
シュメモリに対応付けられているアドレス範囲内におい
てキャッシュラインの容量に応じた所定のアドレス間隔
毎に設定されるアドレスをアクセス対象として出力され
る読み出し命令間において、既に1または複数のキャッ
シュラインに読み出されたデータを他の記憶手段に書き
込むステップを有するようにしたものである。According to the method of reading data from the NAND flash memory according to the present invention, in accordance with the capacity of the cache line within the address range associated with the NAND flash memory in the mode for achieving data access via the cache memory. And a step of writing the data already read in one or a plurality of cache lines into another storage means between the read instructions that are output with the addresses set at predetermined address intervals as access targets. Is.
【0010】[0010]
【発明の実施の形態】以下、添付の図面を参照して本願
発明に係る実施の形態を説明する。なお、以下の説明に
おいては、本願発明の実施の形態に記載された実施例の
各手段および各工程と、特許請求の範囲に記載された発
明の各手段および各工程との対応関係を明らかにするた
めに、実施例の各手段および各工程にそれぞれ対応する
特許請求の範囲に記載された発明の各手段および各工程
を本願発明の実施の形態に係る説明文中において適宜か
っこ書きにより示すものとする。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the accompanying drawings. In the following description, the correspondence between each means and each step of the example described in the embodiment of the present invention and each means and each step of the invention described in the claims will be clarified. In order to do so, each means and each step of the invention described in the claims corresponding to each means and each step of the embodiment are shown in parentheses appropriately in the description according to the embodiment of the present invention. To do.
【0011】実施の形態1.本願発明に係るNAND型
フラッシュメモリからのデータ読み出し方法を適用する
情報処理装置としては、図3に示されるようなNAND
型フラッシュメモリを備えた通常の情報処理装置を想定
しているので、本願発明を適用する情報処理装置の構成
に係る説明は省略するものとする。図1は、この発明の
実施の形態1によるNAND型フラッシュメモリからの
データ読み出し方法を示すフローチャートである。Embodiment 1. An information processing apparatus to which the method of reading data from the NAND flash memory according to the present invention is applied is a NAND as shown in FIG.
Since a normal information processing apparatus including a flash memory is assumed, the description of the configuration of the information processing apparatus to which the present invention is applied will be omitted. 1 is a flow chart showing a method of reading data from a NAND flash memory according to a first embodiment of the present invention.
【0012】ここでは、図3に示される情報処理装置に
おいて、NAND型フラッシュメモリからデータを読み
出す際の動作について1セクタ分のデータの読み出しを
例として説明する。従来技術においては、NAND型フ
ラッシュメモリの入出力ポート6を特定するアドレスと
して非キャッシュ領域内のアドレスを使用してキャッシ
ュメモリを外しての直接的なデータアクセスを図る方式
(第2のモード)をとっていたが、本願発明では、NA
ND型フラッシュメモリの入出力ポート6を特定するア
ドレスとしてキャッシュ領域内のアドレスを使用してキ
ャッシュメモリを介してのデータアクセスを図る方式
(第1のモード)をとることで差異を有している。ま
た、NAND型フラッシュメモリの入出力ポート6を特
定するキャッシュ領域内のアドレスとして、NAND型
フラッシュメモリにおけるデータの読み出しおよび書き
込みの単位となるセクタのサイズ以上の記憶領域を包含
するアドレス範囲を割り当てるものとする。なお、この
ように所定の記憶領域を包含するアドレス範囲をNAN
D型フラッシュメモリの入出力ポート6に対応付けるこ
とについては、アドレスデコーダを適宜構成することす
なわちCPUあるいはプロセッサに付設された外部ピン
とNAND型フラッシュメモリに付設された外部ピンと
を回路仕様に応じて適宜接続することでハードウエア的
に実現されるものである。Here, in the information processing apparatus shown in FIG. 3, the operation of reading data from the NAND flash memory will be described by taking the reading of one sector of data as an example. In the conventional technology, a method (second mode) is used in which direct access is made to the cache memory by using an address in the non-cache area as an address for specifying the input / output port 6 of the NAND flash memory. However, in the present invention, NA
The difference is that the method (first mode) is used to access data via the cache memory by using the address in the cache area as the address for specifying the input / output port 6 of the ND type flash memory. . Further, as an address in the cache area for specifying the input / output port 6 of the NAND flash memory, an address range including a storage area larger than the size of a sector which is a unit of data reading and writing in the NAND flash memory is allocated. And It should be noted that the address range including the predetermined storage area is NAN
Regarding the correspondence with the input / output port 6 of the D-type flash memory, the address decoder is appropriately configured, that is, the external pin attached to the CPU or the processor and the external pin attached to the NAND type flash memory are appropriately connected according to the circuit specifications. This is realized by hardware.
【0013】次に、具体的な動作について説明する。こ
こでは、NAND型フラッシュメモリにおいて書き込み
および読み出しの単位となるセクタ毎の記憶容量を51
2バイト、並びにキャッシュライン毎の記憶容量を32
バイトと想定して説明を行う。なお、NAND型フラッ
シュメモリの入出力ポート6に対しては、キャッシュ領
域内においてNAND型フラッシュメモリの1セクタ分
の記憶領域を包含するアドレス範囲(“BE000
0h”から“BE01FFh”までのアドレス範囲)が割
り当てられているものとする。まず、NAND型フラッ
シュメモリ5を対象として、NAND型フラッシュメモ
リ5について固有のRead命令を出力する(ステップ
S1)。次に、読み出し対象のセクタの先頭アドレスを
示すデータを1回であるいは複数回に分けて出力する
(ステップS2)。この際、メモリセルアレイ8上にお
ける先頭アドレスは、アドレスレジスタ12に書き込ま
れるとともに、当該アドレス値が初期値としてアドレス
カウンタ13に設定される。アドレスカウンタ13に設
定されたアドレスに対応する1ワード分のデータはデー
タレジスタ10に出力される。上記のステップ1とステ
ップ2とから、読み出し対象となるNAND型フラッシ
ュメモリ上のセクタを特定する処理工程を構成するもの
である。Next, a specific operation will be described. Here, the storage capacity of each sector, which is a unit of writing and reading in the NAND flash memory, is 51
2 bytes, and the storage capacity for each cache line is 32
Explanation is given assuming that it is a byte. For the input / output port 6 of the NAND flash memory, an address range (“BE000” that includes a storage area of one sector of the NAND flash memory in the cache area is included.
It is assumed that an address range from 0 h ″ to “BE01FF h ″) is assigned. First, a read instruction specific to the NAND flash memory 5 is output to the NAND flash memory 5 (step S1). Next, the data indicating the start address of the sector to be read is output once or in a plurality of times (step S2), where the start address on the memory cell array 8 is written in the address register 12. , The address value is set as an initial value in the address counter 13. One word of data corresponding to the address set in the address counter 13 is output to the data register 10. From step 1 and step 2 above , The section on the NAND flash memory to be read It constitutes a processing step of identifying the.
【0014】次に、CPU1は、上記のような工程が実
施されて、読み出し処理の準備が完了しているか否かを
判定する(ステップS3)。読み出し準備が完了してい
ることが確認されれば、キャッシュライン毎に対応する
アドレスタグを検索して、NAND型フラッシュメモリ
の入出力ポート6に対して割り当てられているキャッシ
ュ領域のアドレス範囲内のアドレスが登録されている場
合には、このようなアドレスタグを有するキャッシュラ
インに対してInvalid命令を出力して当該キャッ
シュラインをアドレスヒット無効とするように設定する
(ステップS4)。各キャッシュラインにはそれぞれ対
応するようにバリッドフラグ(“1”のときに有効とす
る)が設けられており、Invalid命令を出力して
バリッドフラグを“0”とすることで、当該キャッシュ
ライン上のデータは無効となり、例えCPU1から出力
される処理対象のアドレスとアドレスタグとが一致した
としても当該キャッシュラインについてはアドレスヒッ
ト無効となる。すなわち、データの無効を示す“0”が
バリッドフラグに設定されたキャッシュラインについて
は、アドレスヒットすることがないので、同じアドレス
タグを有するデータを格納することが可能となり、NA
ND型フラッシュメモリからの逐次的なデータ読み出し
が可能となる。Next, the CPU 1 determines whether or not the above-mentioned steps have been carried out and the preparation for the reading process has been completed (step S3). If it is confirmed that the read preparation is completed, the address tag corresponding to each cache line is searched and the address tag within the address range of the cache area assigned to the input / output port 6 of the NAND flash memory is searched. When the address is registered, an Invalid instruction is output to the cache line having such an address tag, and the cache line is set to invalidate the address hit (step S4). Each cache line is provided with a valid flag (valid when it is "1") so as to correspond to each cache line. By outputting an invalid instruction and setting the valid flag to "0", the cache line Data becomes invalid, and even if the processing target address output from the CPU 1 and the address tag match, the address hit is invalid for the cache line. In other words, since no address hit occurs for a cache line in which "0" indicating invalid data is set in the valid flag, it is possible to store data having the same address tag.
It is possible to read data sequentially from the ND type flash memory.
【0015】NAND型フラッシュメモリの入出力ポー
ト6に対して割り当てられているキャッシュ領域のアド
レス範囲内のアドレスタグを有するキャッシュラインに
ついてアドレスヒットを無効とするように設定する処理
が完了すれば、キャッシュラインの記憶容量に応じたア
ドレス間隔毎に、上記アドレス範囲について先頭アドレ
スから順次アクセス対象のアドレスを設定してRead
命令(読み出し命令)を出力する(ステップS5)。こ
れにより、Read命令が実行される毎に、キャッシュ
メモリのメモリアクセス機構を用いて、アドレスカウン
タ13に設定されたメモリセルアレイ8上のアドレスか
ら、1キャッシュライン分の容量のデータがワード毎に
逐次的にキャッシュラインへ読み出される。この際、デ
ータレジスタ10から1ワード分のデータが読み出され
る毎に、アドレスカウンタ13に設定されたアドレス値
はインクリメントされる。When the processing for setting the address hit to be invalid for the cache line having the address tag within the address range of the cache area allocated to the input / output port 6 of the NAND flash memory is completed, For each address interval according to the storage capacity of the line, the addresses to be accessed are sequentially set from the top address in the above address range and Read
A command (read command) is output (step S5). As a result, every time the Read instruction is executed, the memory access mechanism of the cache memory is used to sequentially generate, from the address on the memory cell array 8 set in the address counter 13, the data of the capacity of one cache line for each word. Are read out to the cache line. At this time, every time one word of data is read from the data register 10, the address value set in the address counter 13 is incremented.
【0016】図2は、NAND型フラッシュメモリから
1セクタ分のデータを読み出す際のキャッシュメモリの
変化を示す図である。事前にNAND型フラッシュメモ
リからキャッシュメモリにデータが読み出されている場
合には、図2(a)に示されるように、NAND型フラ
ッシュメモリの入出力ポート6に対して割り当てられて
いるキャッシュ領域のアドレス範囲内のアドレスタグが
既に登録された状態となっている。ステップS4では、
上記アドレス範囲内のアドレスタグを検出して上記アド
レス範囲内のアドレスタグを有するキャッシュラインに
対してInvalid命令を出力し、図2(b)に示さ
れるように、バリッドフラグを“1”から“0”に書き
換えて当該キャッシュラインについてアドレスヒット無
効に設定する。次に、ステップS5において、アクセス
対象のアドレスとして逐次的に“BE0000h”,
“BE0020h”,“BE0040h”…を設定してそ
れぞれRead命令を出力することで、図(c)に示さ
れるように新たな1セクタ分のデータがNAND型フラ
ッシュメモリからキャッシュメモリに読み出される。な
お、図2(c)では、NAND型フラッシュメモリから
事前にデータが読み出されていた記憶領域に1セクタ分
のデータが上書きされているが、データの読み出しは必
ずしもこのような形態に限定されるものではなく、他の
キャッシュライン位置にデータを読み出す場合もあり得
る。FIG. 2 is a diagram showing changes in the cache memory when reading data for one sector from the NAND flash memory. When data is read from the NAND flash memory to the cache memory in advance, the cache area allocated to the input / output port 6 of the NAND flash memory as shown in FIG. 2A. Address tags within the address range of are already registered. In step S4,
An invalid instruction is output to a cache line having an address tag within the above address range by detecting an address tag within the above address range, and as shown in FIG. 2B, the valid flag is changed from "1" to " It is rewritten to 0 "and the address hit is invalidated for the cache line. Next, in step S5, “BE0000 h ”, is sequentially added as addresses to be accessed.
By setting “BE0020 h ”, “BE0040 h ” ... And outputting Read commands respectively, new one-sector data is read from the NAND flash memory to the cache memory as shown in FIG. . Note that in FIG. 2C, the data for one sector is overwritten in the storage area where the data has been read in advance from the NAND flash memory, but the reading of the data is not necessarily limited to such a form. However, the data may be read to another cache line position.
【0017】1セクタより大きなデータを読み出す場合
には、図1に示される読み出し処理を1セクタ毎に実施
することで、データの読み出しが可能となる。但し、こ
のような場合には、1セクタのデータを読み出す毎にN
AND型フラッシュメモリの入出力ポート6に対して割
り当てられたキャッシュ領域のアドレス範囲内のアドレ
スタグを有するデータは無効化されるので、キャッシュ
メモリに読み出されたデータを例えばRAM(他の記憶
手段)内のワークエリアに書き込むような処理を並列的
に実行する必要がある。既に述べたように、アクセス対
象となるアドレスを設定してRead命令を出力した後
のNAND型フラッシュメモリからキャッシュメモリへ
の1キャッシュライン分のデータの読み出しはキャッシ
ュメモリのメモリアクセス機構により独立に実施される
ので、その間においてCPUを用いて既に他のキャッシ
ュラインに読み出されたデータをワークエリアに書き込
むように処理することが可能である。When reading data larger than one sector, the reading process shown in FIG. 1 is performed for each sector, whereby the data can be read. However, in such a case, N is read every time data of one sector is read.
Since data having an address tag within the address range of the cache area assigned to the input / output port 6 of the AND type flash memory is invalidated, the data read to the cache memory is stored in, for example, a RAM (other storage means). It is necessary to execute the processing such as writing in the work area in parentheses in parallel. As described above, the data access for one cache line from the NAND flash memory to the cache memory after setting the address to be accessed and outputting the Read instruction is performed independently by the memory access mechanism of the cache memory. Therefore, during that time, it is possible to perform processing so as to write the data already read in another cache line into the work area by using the CPU.
【0018】以上のように、この実施の形態1によれ
ば、NAND型フラッシュメモリに対する固有のRea
d命令および読み出し対象となるセクタの先頭アドレス
に係るデータを出力して読み出し対象のセクタを特定す
るステップと、NAND型フラッシュメモリに対して割
り当てられたキャッシュ領域のアドレス範囲内のアドレ
スをアドレスタグとして備えるキャッシュラインをアド
レスヒット無効とするように設定するステップと、NA
ND型フラッシュメモリに対して割り当てられたキャッ
シュ領域のアドレス範囲内から逐次的に設定されるアド
レスをアクセス対象としてRead命令を出力するステ
ップとを有するように構成したので、キャッシュメモリ
のメモリアクセス機能を用いてNAND型フラッシュメ
モリからキャッシュメモリへデータを読み出すことがで
きるので、NAND型フラッシュメモリからのデータの
読み出しを高速に実施することが可能になるという効果
を奏する。As described above, according to the first embodiment, the Rea peculiar to the NAND flash memory is
The step of outputting the d command and the data related to the start address of the sector to be read to specify the sector to be read, and the address within the address range of the cache area allocated to the NAND flash memory as an address tag. A step of setting a cache line provided to invalidate an address hit;
And a step of outputting a Read instruction with an address sequentially set from within the address range of the cache area allocated to the ND type flash memory as an access target. Since data can be read from the NAND flash memory to the cache memory by using it, it is possible to read data from the NAND flash memory at high speed.
【0019】また、メモリアクセス機能を用いてキャッ
シュメモリへデータを読み出している間においては、C
PUを用いたワークエリアへのデータ書き込みを並列実
行することができるので、NAND型フラッシュメモリ
からRAM等に設けられたワークエリアへのデータの読
み出しをも高速に実行することができるという効果を奏
する。While data is being read to the cache memory by using the memory access function, C
Since data writing to the work area using the PU can be executed in parallel, it is possible to read data from the NAND flash memory to the work area provided in the RAM or the like at high speed. .
【0020】なお、実施の形態1により説明されるNA
ND型フラッシュメモリからのデータ読み出し方法は、
本願発明を限定するものではなく、例示することを意図
して開示されているものである。本願発明の技術的範囲
は特許請求の範囲の記載により定められるものであり、
特許請求の範囲に記載された技術的範囲内において種々
の設計的変更が可能である。例えば、実施の形態1で
は、NAND型フラッシュメモリの入出力ポート6に対
して割り当てられるキャッシュ領域のアドレスとして1
セクタ分の記憶領域を包含するサイズを有するアドレス
範囲が割り当てられるように構成しているが、NAND
型フラッシュメモリの入出力ポート6に対して割り当て
られるキャッシュ領域のアドレスとして複数個のセクタ
分の記憶領域を包含するサイズを有するアドレス範囲が
割り当てられるように構成してもよい。この場合には、
途中でデータの無効化を実施することなく当該複数個の
セクタ分のデータをNAND型フラッシュメモリからキ
ャッシュメモリへ読み出すことが可能となる。The NA explained in the first embodiment
The data read method from the ND type flash memory is
It is intended that the invention be disclosed by way of illustration and not limitation. The technical scope of the present invention is defined by the description of the claims,
Various design modifications are possible within the technical scope described in the claims. For example, in the first embodiment, 1 is set as the address of the cache area assigned to the input / output port 6 of the NAND flash memory.
Although it is configured so that an address range having a size including a storage area for sectors is allocated,
As an address of the cache area assigned to the input / output port 6 of the flash memory, an address range having a size including the storage areas of a plurality of sectors may be assigned. In this case,
It is possible to read the data for the plurality of sectors from the NAND flash memory to the cache memory without invalidating the data on the way.
【0021】[0021]
【発明の効果】以上のように、この発明によれば、読み
出し対象となるNAND型フラッシュメモリ上のセクタ
を特定するステップと、キャッシュメモリを介してのデ
ータアクセスを図るモードでNAND型フラッシュメモ
リに対応付けられたアドレス範囲内のアドレスがアドレ
スタグとして登録されているキャッシュメモリ内の1ま
たは複数のキャッシュラインをアドレスヒット無効とす
るように設定するステップと、上記モードでNAND型
フラッシュメモリに対応付けられたアドレス範囲内にお
いてキャッシュラインの容量に応じた所定のアドレス間
隔毎に設定されるアドレスをアクセス対象として読み出
し命令を逐次的に出力するステップとを有するように構
成したので、キャッシュメモリのメモリアクセス機能を
用いてNAND型フラッシュメモリからキャッシュメモ
リへデータを読み出すことができるから、NAND型フ
ラッシュメモリからのデータの読み出しを高速に実施す
ることが可能になるという効果を奏する。As described above, according to the present invention, the NAND flash memory is selected in the step of specifying the sector on the NAND flash memory to be read and in the mode for data access via the cache memory. Setting the address hit invalidation of one or more cache lines in the cache memory in which the addresses in the associated address range are registered as address tags, and associating with the NAND flash memory in the above mode And a step of sequentially outputting a read command with an address set at a predetermined address interval according to the capacity of the cache line within the specified address range as an access target. Function using NAND type Since it is possible from the flash memory read data to the cache memory, an effect that the reading of data from the NAND-type flash memory makes it possible to implement a high speed.
【0022】この発明によれば、キャッシュメモリを介
してのデータアクセスを図るモードでNAND型フラッ
シュメモリに対応付けられたアドレス範囲内においてキ
ャッシュラインの容量に応じた所定のアドレス間隔毎に
設定されるアドレスをアクセス対象として出力される読
み出し命令間において、既に1または複数のキャッシュ
ラインに読み出されたデータを他の記憶手段に書き込む
ステップを有するように構成したので、読み出し命令に
応じてキャッシュメモリのメモリアクセス機構によるデ
ータ読み出しを実施している間において、CPUを用い
たワークエリアへのデータ書き込みを並列実行すること
ができるから、NAND型フラッシュメモリからRAM
等に設けられたワークエリアへのデータの読み出しをも
高速に実行することができるという効果を奏する。According to the present invention, the data is accessed through the cache memory in the address range associated with the NAND flash memory, and is set at predetermined address intervals corresponding to the capacity of the cache line. Since there is a step of writing the data already read in one or a plurality of cache lines into another storage unit between the read commands output with the address as the access target, the cache memory of the cache memory is read according to the read command. Since the data writing to the work area using the CPU can be executed in parallel while the data reading by the memory access mechanism is being executed, the NAND flash memory to the RAM
There is an effect that the data can be read out at high speed to the work area provided in the above.
【図1】 この発明の実施の形態1によるNAND型フ
ラッシュメモリからのデータ読み出し方法を示すフロー
チャートである。FIG. 1 is a flowchart showing a method of reading data from a NAND flash memory according to a first embodiment of the present invention.
【図2】 NAND型フラッシュメモリから1セクタ分
のデータを読み出す際におけるキャッシュメモリの変化
を示す図である。FIG. 2 is a diagram showing a change in a cache memory when reading data for one sector from a NAND flash memory.
【図3】 NAND型フラッシュメモリを記憶手段とし
て用いる情報処理装置の構成の一例を示す図である。FIG. 3 is a diagram showing an example of a configuration of an information processing device using a NAND flash memory as a storage unit.
【図4】 NAND型フラッシュメモリから1セクタ分
のデータを読み出す際における従来のデータ読み出し方
法を示すフローチャートである。FIG. 4 is a flowchart showing a conventional data read method when reading data for one sector from a NAND flash memory.
1 CPU、2 キャッシュメモリ、3 アドレスアレ
イ、4 プロセッサ、5NAND型フラッシュメモリ、
6 入出力ポート、7 入出力コントローラ、8 メモ
リセルアレイ、9 レジスタ群、10 データレジス
タ、11 コマンドレジスタ、12 アドレスレジス
タ、13 アドレスカウンタ1 CPU, 2 cache memory, 3 address array, 4 processors, 5 NAND flash memory,
6 input / output ports, 7 input / output controller, 8 memory cell array, 9 register group, 10 data register, 11 command register, 12 address register, 13 address counter
Claims (2)
介してのデータアクセスを図る第1のモードと、各記憶
手段に対してキャッシュメモリを外しての直接的なデー
タアクセスを図る第2のモードとを選択可能なCPUを
有して、1または複数のNAND型フラッシュメモリの
それぞれについて、第1のモードにおいてNAND型フ
ラッシュメモリを特定するCPU側から見たアドレスと
して少なくとも当該NAND型フラッシュメモリの1セ
クタ分の記憶領域を包含するアドレス範囲が割り当てら
れるように構成されている情報処理装置を用いて、NA
ND型フラッシュメモリからキャッシュメモリへデータ
を読み出すNAND型フラッシュメモリからのデータ読
み出し方法において、 読み出し対象となるNAND型フラッシュメモリ上のセ
クタを特定するステップと、 第1のモードでNAND型フラッシュメモリに対応付け
られているアドレス範囲内のアドレスがアドレスタグと
して登録されているキャッシュメモリ内の1または複数
のキャッシュラインをアドレスヒット無効とするように
設定するステップと、 第1のモードでNAND型フラッシュメモリに対応付け
られているアドレス範囲内においてキャッシュラインの
容量に応じた所定のアドレス間隔毎に設定されるアドレ
スをアクセス対象として読み出し命令を逐次的に出力す
るステップとを有することを特徴とするNAND型フラ
ッシュメモリからのデータ読み出し方法。1. A first mode for achieving data access to each storage means via a cache memory, and a second mode for performing direct data access to each storage means without the cache memory. For each of the one or more NAND flash memories, at least one of the NAND flash memories is specified as an address viewed from the CPU side that identifies the NAND flash memory in the first mode. Using an information processing device configured to allocate an address range including a storage area for sectors,
In the data read method from the NAND flash memory for reading data from the ND flash memory to the cache memory, the step of identifying the sector on the NAND flash memory to be read, and supporting the NAND flash memory in the first mode Setting the address hit invalidation of one or more cache lines in the cache memory in which the addresses in the attached address range are registered as address tags; and in the NAND flash memory in the first mode. And a step of sequentially outputting a read command with an address set at a predetermined address interval according to the capacity of the cache line within an associated address range as an access target. Method of reading data from Sshumemori.
モリに対応付けられているアドレス範囲内においてキャ
ッシュラインの容量に応じた所定のアドレス間隔毎に設
定されるアドレスをアクセス対象として出力される読み
出し命令間において、既に1または複数のキャッシュラ
インに読み出されたデータを他の記憶手段に書き込むス
テップを有することを特徴とする請求項1記載のNAN
D型フラッシュメモリからのデータ読み出し方法。2. A read instruction that outputs an address set as an access target at an address set in a predetermined address interval according to a capacity of a cache line within an address range associated with a NAND flash memory in the first mode. 2. The NAN according to claim 1, further comprising the step of writing the data, which has already been read into one or a plurality of cache lines, into another storage means during the interval.
A method for reading data from a D-type flash memory.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001246617A JP2003058420A (en) | 2001-08-15 | 2001-08-15 | Method of reading data from NAND flash memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001246617A JP2003058420A (en) | 2001-08-15 | 2001-08-15 | Method of reading data from NAND flash memory |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2003058420A true JP2003058420A (en) | 2003-02-28 |
Family
ID=19076125
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001246617A Pending JP2003058420A (en) | 2001-08-15 | 2001-08-15 | Method of reading data from NAND flash memory |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2003058420A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2005076137A1 (en) * | 2004-02-05 | 2005-08-18 | Research In Motion Limited | Memory controller interface |
| JP2007115004A (en) * | 2005-10-20 | 2007-05-10 | Sony Corp | Storage device, computer system, and data writing method |
| CN1332289C (en) * | 2004-06-14 | 2007-08-15 | 张毅 | Multimedia memory card |
| JP2009526294A (en) * | 2006-02-09 | 2009-07-16 | フリースケール セミコンダクター インコーポレイテッド | Electronic device having memory element and method of operating the same |
| JP2010134741A (en) * | 2008-12-05 | 2010-06-17 | Internatl Business Mach Corp <Ibm> | Method and system for executing program |
-
2001
- 2001-08-15 JP JP2001246617A patent/JP2003058420A/en active Pending
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2005076137A1 (en) * | 2004-02-05 | 2005-08-18 | Research In Motion Limited | Memory controller interface |
| US7610433B2 (en) | 2004-02-05 | 2009-10-27 | Research In Motion Limited | Memory controller interface |
| US8086788B2 (en) | 2004-02-05 | 2011-12-27 | Research In Motion Limited | Memory controller interface |
| US8347025B2 (en) | 2004-02-05 | 2013-01-01 | Research In Motion Limited | Memory controller interface |
| CN1332289C (en) * | 2004-06-14 | 2007-08-15 | 张毅 | Multimedia memory card |
| JP2007115004A (en) * | 2005-10-20 | 2007-05-10 | Sony Corp | Storage device, computer system, and data writing method |
| JP2009526294A (en) * | 2006-02-09 | 2009-07-16 | フリースケール セミコンダクター インコーポレイテッド | Electronic device having memory element and method of operating the same |
| US8131914B2 (en) | 2006-02-09 | 2012-03-06 | Freescale Semiconductor, Inc. | Electronic device having a memory element and method of operation therefor |
| JP2010134741A (en) * | 2008-12-05 | 2010-06-17 | Internatl Business Mach Corp <Ibm> | Method and system for executing program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3016575B2 (en) | Multiple cache memory access methods | |
| EP3001321B1 (en) | Memory controller interface | |
| US7373452B2 (en) | Controller for controlling nonvolatile memory | |
| JP2007058840A5 (en) | ||
| JPS58212694A (en) | Memory system | |
| JP2000182381A (en) | Batch erase nonvolatile memory | |
| US5155828A (en) | Computing system with a cache memory and an additional look-aside cache memory | |
| JP5129023B2 (en) | Cache memory device | |
| JP2021515308A (en) | Devices and methods for accessing metadata when debugging devices | |
| US7472227B2 (en) | Invalidating multiple address cache entries | |
| JP2003058420A (en) | Method of reading data from NAND flash memory | |
| JPH0784886A (en) | Cache memory control method and cache memory control device | |
| JPS60701B2 (en) | data processing equipment | |
| KR100201671B1 (en) | Computing system with a cache memory and an additional look-aside cache memory | |
| JP2927160B2 (en) | Register device | |
| JPH05257807A (en) | Cache memory controller | |
| JPS6152505B2 (en) | ||
| US20220269544A1 (en) | Computer system with processing circuit that writes data to be processed by program code executed on processor into embedded memory inside processor | |
| JPS6161143B2 (en) | ||
| JPH02259945A (en) | Storing processing system | |
| JP2003337668A (en) | Image forming apparatus and memory clear method thereof | |
| JPH0944413A (en) | Page boundary test method | |
| JPH0414147A (en) | central processing unit | |
| JPH0320834A (en) | Initial diagnostic method for information processor | |
| JPS60183652A (en) | Cash memory control method |