JP2002196976A - Memory access control method and device in ic card equipped with flash memory, and program storage medium - Google Patents

Memory access control method and device in ic card equipped with flash memory, and program storage medium

Info

Publication number
JP2002196976A
JP2002196976A JP2000397372A JP2000397372A JP2002196976A JP 2002196976 A JP2002196976 A JP 2002196976A JP 2000397372 A JP2000397372 A JP 2000397372A JP 2000397372 A JP2000397372 A JP 2000397372A JP 2002196976 A JP2002196976 A JP 2002196976A
Authority
JP
Japan
Prior art keywords
unit
address
space
last
logical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000397372A
Other languages
Japanese (ja)
Inventor
Yuji Hiura
裕二 樋浦
Katsuhiko Suzuki
勝彦 鈴木
Shinsuke Yoshida
慎介 吉田
Nichiko Kaku
日洪 霍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2000397372A priority Critical patent/JP2002196976A/en
Publication of JP2002196976A publication Critical patent/JP2002196976A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve renewal processing speed by eliminating any necessity for a program side determining whether being a writing processing or renewal processing and substituting the writing processing for the renewal processing. SOLUTION: The IC card 100 is provided with a control part 102, a logic memory reading and writing means 103, a garbage collection control means 104, a unit operation means 105, a final unit tracking means 106, a top unit control means 107, a memory access module 108, and a flash memory 109.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
搭載ICカードにおけるメモリアクセス制御方法および
装置並びにプログラム記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for controlling memory access in an IC card equipped with a flash memory and a program storage medium.

【0002】[0002]

【従来の技術】プラスチック・カードに半導体チップを
組み込んだICカードが様々な分野で使われている。I
Cカードに対する需要や要求が高まり、様々な機能をI
Cカードに盛り込むことが望まれるようになった。その
ため、大容量で高密度であるフラッシュメモリを搭載し
たICカードがよく知られている。
2. Description of the Related Art An IC card in which a semiconductor chip is incorporated in a plastic card is used in various fields. I
As the demand and demand for C-cards increase, various functions
It has become desirable to include them in C cards. Therefore, an IC card equipped with a large-capacity and high-density flash memory is well known.

【0003】図9は従来のフラッシュメモリ搭載ICカ
ードにおけるメモリアクセス制御のシステムを示す図、
図10は従来のフラッシュメモリにおける更新処理の流
れを示す図である。
FIG. 9 is a diagram showing a memory access control system in a conventional flash memory IC card.
FIG. 10 is a diagram showing a flow of an update process in a conventional flash memory.

【0004】図9において、900はICカード、90
1は外部機器、902はICカード900内の制御部、
903はICカード900内のメモリアクセス部、90
4はICカード900内のフラッシュメモリ、905は
外部機器901から制御部902へのコマンド送信、9
06は制御部902から外部機器901へのレスポンス
受信、907は制御部902とメモリアクセス部903
間のメモリ読み書き、908はメモリアクセス部903
とフラッシュメモリ904間のメモリ読み書きである。
In FIG. 9, 900 is an IC card, 90
1 is an external device, 902 is a control unit in the IC card 900,
903, a memory access unit in the IC card 900;
Reference numeral 4 denotes a flash memory in the IC card 900; 905, a command transmission from the external device 901 to the control unit 902;
06 is a response reception from the control unit 902 to the external device 901, 907 is the control unit 902 and the memory access unit 903
908 is a memory access unit 903
And a flash memory 904.

【0005】従来のフラッシュメモリ搭載ICカードに
おけるメモリアクセス制御方法では、図10に示すよう
に、あるイレースブロックを更新する場合、更新アドレ
ス以外の領域、を新しい領域2にコピーし(ステッ
プ1001)、元の領域1を消去し(ステップ100
2)、新しい領域2にコピーした元、を、元の領域
1に戻し、かつ、更新するデータを書き込み、先ほどの
新しい領域2を消去していた(ステップ1003)。
In the conventional memory access control method for a flash memory-mounted IC card, as shown in FIG. 10, when a certain erase block is updated, an area other than the update address is copied to a new area 2 (step 1001). The original area 1 is erased (step 100
2) The original copied to the new area 2 is returned to the original area 1, and data to be updated is written, and the new area 2 is erased (step 1003).

【0006】[0006]

【発明が解決しようとする課題】フラッシュメモリの特
徴として、完全ビット変更性が無いという大きな問題が
ある。完全ビット変更性が有るとは、通常のRAMやE
EPROM、ハードディスクのように、ビットあるいは
バイトの更新処理が可能なことをいう。完全ビット変更
性が無いフラッシュメモリでは、「1」→「0」への変
換はできるが、「0」→「1」には更新できないという
非可逆な性質を持つ。
As a feature of the flash memory, there is a major problem that there is no complete bit changeability. Complete bit changeability means that a normal RAM or E
This means that bit or byte update processing can be performed like an EPROM or a hard disk. A flash memory without complete bit changeability has an irreversible property that conversion from "1" to "0" is possible, but cannot be updated from "0" to "1".

【0007】フラッシュメモリのもう1つの特徴とし
て、イレーズブロックと呼ばれる集合の単位がある。こ
のイレーズブロックは、消去の単位を表し、上記の
「0」→「1」という操作をイレーズブロック全体で行
なうことができる。
[0007] Another feature of the flash memory is a set unit called an erase block. This erase block represents a unit of erasure, and the above operation of “0” → “1” can be performed on the entire erase block.

【0008】ここで問題となるのは、消去単位がバイト
単位ではなく、イレーズブロック単位(だいたい64k
バイト)であることと、消去処理時間がかかることであ
る。1バイト更新するためには、図10に示したような
処理となる。1バイトの書き込みが8μsかかるとし、
64kバイトのイレーズブロックに書き込むとすると、
約512msかかる。さらにイレーズブロックのデータ
消去に約1秒かかるため、1バイト更新するためだけで
単純に合計約1.5秒必要ということになる。
The problem here is that the erasure unit is not a byte unit but an erase block unit (about 64 k
Bytes) and the erasing process takes time. In order to update one byte, the processing is as shown in FIG. Assuming that writing one byte takes 8 μs,
If you write to a 64k byte erase block,
It takes about 512 ms. Furthermore, since it takes about one second to erase the data in the erase block, it takes a total of about 1.5 seconds simply to update one byte.

【0009】このようにフラッシュメモリは、その特性
上、読み出しおよび書き込みは高速であるが、更新処理
はバイト単位ではなく、イレースブロック単位にしか行
うことができず、かつ処理時間がかかってしまう。フラ
ッシュメモリを扱うプログラム側からは、可能な限り読
み出しと書き込みと同程度の処理速度で更新処理を行う
ことができることが望ましい。
As described above, the flash memory is high-speed in reading and writing due to its characteristics. However, the updating process can be performed only in erase block units, not in byte units, and processing time is required. It is desirable that the program handling the flash memory can perform the update processing at the same processing speed as the reading and writing as much as possible.

【0010】このような処理過程を踏むために、従来で
は、更新処理をするためには、図10に示したように、
イレースブロックの消去処理を2回(ステップ1002
と1003)と、イレースブロック全体のコピー処理を
2回(ステップ1001と1003)行う必要があっ
た。
In order to perform such a process, conventionally, in order to perform an update process, as shown in FIG.
The erase block is erased twice (step 1002
And 1003), and the copy processing of the entire erase block must be performed twice (steps 1001 and 1003).

【0011】また、フラッシュメモリでは、書き込みを
行う際に、書き込もうとするブロックが、以前に書き込
まれたブロックなのか、初めて書き込むブロックなのか
をプログラムが判断して、それぞれ書き込み処理あるい
は更新処理を行う必要があった。
In the flash memory, when writing, a program determines whether a block to be written is a previously written block or a block to be written for the first time, and performs a writing process or an updating process, respectively. Needed.

【0012】本発明は、上述したような従来システムの
有する問題点に鑑みてなされたもので、その目的は、プ
ログラム側には物理空間を直接見せず、論理空間を見せ
ることにより、更新処理と書き込み処理を同じ処理とし
て扱えるように工夫をし、プログラム側が書き込み処理
なのか更新処理なのかを判断する必要を排除し、かつ、
更新処理を書き込み処理によって代用することにより、
更新処理速度を向上させ、フラッシュメモリ搭載ICカ
ードにおいて高速なメモリアクセス制御方法および装置
並びにプログラム記憶媒体を提供することにある。
The present invention has been made in view of the above-mentioned problems of the conventional system, and an object of the present invention is to make it possible for a program to show a logical space without directly showing a physical space, and to perform an update process. Devise so that the write process can be treated as the same process, eliminate the need for the program to determine whether the process is a write process or an update process, and
By substituting the update process with the write process,
An object of the present invention is to provide a method and an apparatus for controlling a memory access in a flash memory IC card at a high speed and a program storage medium by improving the update processing speed.

【0013】[0013]

【課題を解決するための手段】上記課題を解決するため
に、本発明のフラッシュメモリ搭載ICカードにおける
メモリアクセス制御方法は、メモリ空間を物理空間と仮
想的な論理空間とに分離し、前記物理空間と前記論理空
間をマッピングすることにより、メモリヘの更新処理を
前記論理空間にのみ反映し、前記物理空間上は、読み出
しおよび書き込み処理に置換することを特徴とする。
In order to solve the above-mentioned problems, a memory access control method for an IC card equipped with a flash memory according to the present invention comprises the steps of dividing a memory space into a physical space and a virtual logical space; By mapping the space and the logical space, the update process to the memory is reflected only in the logical space, and the physical space is replaced with read and write processes.

【0014】また、前記物理空間と前記論理空間の前記
マッピングにおいて、ある論理アドレスにあるデータ
を、次のユニットを指す物理アドレスである次の物理ア
ドレス部と実データ部の組み合わせとするユニットで構
成し、読み出す際に、そのアドレスに対応する先頭ユニ
ットを検索し、最後のユニットになるまで次の物理アド
レス部を追跡し、最後のユニットの実データ部をその論
理アドレスに対応するデータとすることを特徴とする。
In the mapping between the physical space and the logical space, the data at a certain logical address is constituted by a unit in which a next physical address part which is a physical address indicating the next unit and a real data part are combined. When reading, the first unit corresponding to that address is searched, the next physical address part is traced until the last unit, and the actual data part of the last unit is the data corresponding to the logical address. It is characterized by.

【0015】また、前記ユニットによるデータ管理にお
いて、書き出す際に、そのアドレスに対応する先頭ユニ
ットを検索し、最後のユニットになるまで物理アドレス
部を追跡し、実データ部に書き込むデータを格納した新
しいユニットを生成し、そのユニットの物理アドレスを
最後のユニットの物理アドレス部に格納することを特徴
とする。
In the data management by the units, when writing, the head unit corresponding to the address is searched, the physical address portion is traced until the last unit, and the new data storing the data to be written in the real data portion is stored. A unit is generated, and the physical address of the unit is stored in the physical address section of the last unit.

【0016】また、前記ユニットによるデータ管理にお
いて、更新処理の回数分だけ発生するゴミとなるユニッ
トを整理し、ゴミユニットのない状態に復元するため
に、先頭ユニットのアドレスと追跡した最後のユニット
だけをつなげて単純なユニット群を生成し、最後にすべ
てのゴミユニットを消去するガベージコレクションを行
うことを特徴とする。
Further, in the data management by the units, in order to sort out the garbage units generated by the number of times of the update processing and restore the state without the garbage units, only the address of the head unit and the last unit tracked are used. To generate a simple unit group, and finally perform a garbage collection to erase all garbage units.

【0017】また、本発明のフラッシュメモリ搭載IC
カードにおけるメモリアクセス制御装置は、論理空間の
アドレスとそれに対応するユニットの先頭ユニットを管
理する先頭ユニット管理手段と、前記ユニットの次のユ
ニットを順次追跡し、最後のユニットを返す最終ユニッ
ト追跡手段と、ICカード内メモリからユニットの読み
込み、書き込み、生成を行うユニット操作手段と、外部
プログラムからの読み書き要求を受け付け、前記先頭ユ
ニット管理手段と前記最終ユニット追跡手段と前記ユニ
ット操作手段を連携して論理アドレスのデータを読み書
きする論理メモリ読み書き手段と、前記先頭ユニット管
理手段と前記最終ユニット追跡手段と前記ユニット操作
手段を連携してガベージコレクションを行うガベージコ
レクション管理手段とを備えたことを特徴とする。
Further, the flash memory mounted IC of the present invention
The memory access control device in the card includes a head unit management unit that manages a logical space address and a head unit of a unit corresponding thereto, a last unit tracking unit that sequentially tracks the next unit of the unit and returns a last unit. A unit operating means for reading, writing, and generating a unit from a memory in an IC card, a read / write request from an external program, and a logical operation in cooperation with the head unit managing means, the last unit tracking means, and the unit operating means. A logical memory read / write unit for reading / writing address data; and a garbage collection management unit for performing garbage collection in cooperation with the head unit management unit, the last unit tracking unit, and the unit operation unit.

【0018】さらに、本発明のフラッシュメモリ搭載I
Cカードにおけるメモリアクセス制御プログラムを記憶
したプログラム記憶媒体は、メモリ空間を物理空間と仮
想的な論理空間とに分離し、前記物理空間と前記論理空
間をマッピングすることにより、メモリヘの更新処理を
前記論理空間にのみ反映し、前記物理空間上は、読み出
しおよび書き込み処理に置換し、前記物理空間と前記論
理空間の前記マッピングにおいては、ある論理アドレス
にあるデータを、次のユニットを指す物理アドレスであ
る次の物理アドレス部と実データ部の組み合わせとする
ユニットで構成し、読み出す際には、そのアドレスに対
応する先頭ユニットを検索し、最後のユニットになるま
で次の物理アドレス部を追跡し、最後のユニットの実デ
ータ部をその論理アドレスに対応するデータとし、書き
出す際には、そのアドレスに対応する先頭ユニットを検
索し、最後のユニットになるまで物理アドレス部を追跡
し、実データ部に書き込むデータを格納した新しいユニ
ットを生成し、そのユニットの物理アドレスを最後のユ
ニットの物理アドレス部に格納し、更新処理の回数分だ
け発生するゴミとなるユニットを整理し、ゴミユニット
のない状態に復元するために、先頭ユニットのアドレス
と追跡した最後のユニットだけをつなげて単純なユニッ
ト群を生成し、最後にすべてのゴミユニットを消去する
ガベージコレクションを行うことを特徴とする。
Further, the flash memory mounted I of the present invention
The program storage medium storing the memory access control program in the C card separates the memory space into a physical space and a virtual logical space, and maps the physical space and the logical space to perform the update process to the memory. Reflecting only in the logical space, the physical space is replaced with read and write processing, and in the mapping of the physical space and the logical space, data at a certain logical address is represented by a physical address indicating the next unit. It consists of a unit that is a combination of a certain next physical address part and a real data part, and when reading, it searches for the first unit corresponding to that address, traces the next physical address part until it becomes the last unit, The actual data part of the last unit is the data corresponding to the logical address, and when writing it, Searches for the first unit corresponding to the address, traces the physical address part until it becomes the last unit, generates a new unit that stores the data to be written to the actual data part, and replaces the physical address of that unit with the physical address of the last unit A simple unit group that connects only the address of the first unit and the last unit tracked in order to organize the garbage units generated by the number of times of update processing and to restore the state without garbage units And finally performing a garbage collection to erase all garbage units.

【0019】すなわち、本発明では、プログラム側に対
して物理空間を見せずに論理空間を提供し、それに対す
る処理として更新処理不要な読み込み処理、書き込み処
理を提供する。論理空間から物理空間へのマッピングに
おいて、次の物理アドレス部と実データからなるユニッ
トを考え、ある論理アドレスに対する書き込みが生じた
場合、その論理アドレスに相当する先頭ユニットを検索
し、その先頭ユニットに対して、次のユニットがあるか
を検査し、あれば、次のユニットの追跡を繰り返し、な
ければ、新しいユニットを生成し、物理アドレスを前の
ユニットの次の物理アドレス部に書き込み、新しいユニ
ットの実データ部に書き込むデータを書き込む。読み込
みの場合は、同様に、その論理アドレスに相当する先頭
ユニットを検索し、その先頭ユニットに対して、次のユ
ニットがあるか検査し、あれば、次のユニットの追跡を
繰り返し、なければ、そのユニットの実データ部のデー
タを読み出す。
That is, in the present invention, a logical space is provided without showing the physical space to the program side, and a read process and a write process that do not require an update process are provided as processes for the logical space. In the mapping from logical space to physical space, considering the unit consisting of the next physical address part and real data, if writing to a certain logical address occurs, search for the head unit corresponding to that logical address, and On the other hand, it checks whether the next unit exists, and if so, repeats the tracking of the next unit.If not, creates a new unit, writes the physical address to the next physical address part of the previous unit, and writes the new unit. Write the data to be written to the actual data section of. In the case of reading, similarly, the head unit corresponding to the logical address is searched, and the head unit is inspected for the next unit. If there is, the next unit is repeatedly traced. The data in the actual data section of the unit is read.

【0020】このように本発明では、書き込み処理と更
新処理を区別しなくてはならない物理空間をプログラム
に見せず、書き込み処理と更新処理を区別する必要のな
い論理空間だけをプログラムに見せることで、容易にか
つシンプルにプログラミングを行うことができる。
As described above, in the present invention, the program does not show the physical space in which the write process and the update process need to be distinguished from each other, but shows the logical space in which the write process and the update process do not need to be distinguished. Programming can be performed easily and simply.

【0021】また、論理空間と物理空間のマッピングに
おいて、更新処理を書き込み処理の代用とすることで、
読み書きの処理時間である先頭ユニットを検索する時間
とユニットを追跡する時間の合計と更新処理時にはさら
に新しいユニットを書き込む時間の合計を、従来の更新
処理をするための2回のイレースブロックの消去と2回
のイレースブロック全体のコピー処理から差し引いた時
間だけ全体的に書き込み速度が向上することになる。
Further, in the mapping between the logical space and the physical space, the updating process is substituted for the writing process,
The sum of the time to search for the head unit, which is the processing time for reading and writing, and the time to track the unit, and the total time to write a new unit during the update processing are determined by erasing two erase blocks for the conventional update processing. The overall writing speed is improved by the time subtracted from the copy processing of the entire two erase blocks.

【0022】また、更新処理を行った回数だけ発生する
ゴミユニットすべてを消去することで、新しいユニット
生成のための領域を確保することができる。
Further, by erasing all dust units generated as many times as the number of times the updating process is performed, an area for generating a new unit can be secured.

【0023】[0023]

【発明の実施の形態】以下、図面を用いて本発明の実施
の形態について詳細に説明する。なお、以下で説明する
図面で、同一機能を有するものは同一符号を付け、その
繰り返しの説明は省略する。
Embodiments of the present invention will be described below in detail with reference to the drawings. In the drawings described below, those having the same functions are denoted by the same reference numerals, and the repeated description thereof will be omitted.

【0024】図1は、本発明の実施の形態のフラッシュ
メモリ搭載ICカードにおけるメモリアクセス制御のシ
ステムを示す図である。
FIG. 1 is a diagram showing a system for memory access control in an IC card with a flash memory according to an embodiment of the present invention.

【0025】100はICカード、101は外部機器、
102はICカード100内の制御部、103は論理メ
モリ読み書き手段、104はガベージコレクション管理
手段、105はユニット操作手段、106は最終ユニッ
ト追跡手段、107は先頭ユニット管理手段、108は
メモリアクセスモジュール、109はフラッシュメモ
リ、201は外部機器101から制御部102へのコマ
ンド送信、202は制御部102から外部機器101へ
のレスポンス受信、203、204はメモリ読み書きで
ある。
100 is an IC card, 101 is an external device,
102 is a control unit in the IC card 100, 103 is a logical memory read / write unit, 104 is a garbage collection management unit, 105 is a unit operation unit, 106 is a last unit tracking unit, 107 is a head unit management unit, 108 is a memory access module, 109 is a flash memory, 201 is a command transmission from the external device 101 to the control unit 102, 202 is a response reception from the control unit 102 to the external device 101, and 203 and 204 are memory reading and writing.

【0026】図2は本実施の形態における論理空間メモ
リ読み書き処理の流れを示す図、図3は本実施の形態に
おける書き込み処理の流れを示す図、図4は本実施の形
態におけるガベージコレクション処理の流れを示す図、
図5(a)、(b)は本実施の形態における各種フォー
マットを示す図、図6は本実施の形態におけるユニット
の配置例を示す図、図7は本実施の形態における書き込
み処理後を示す図、図8は本実施の形態におけるガベー
ジコレクション処理後を示す図である。
FIG. 2 is a diagram showing a flow of a logical space memory read / write process in the present embodiment, FIG. 3 is a diagram showing a flow of a write process in the present embodiment, and FIG. 4 is a diagram of a garbage collection process in the present embodiment. Diagram showing the flow,
FIGS. 5A and 5B are diagrams showing various formats in the present embodiment, FIG. 6 is a diagram showing an example of arrangement of units in the present embodiment, and FIG. 7 is a diagram after a write process in the present embodiment. FIGS. 8A and 8B are diagrams showing a state after the garbage collection processing in the present embodiment.

【0027】本実施の形態においては、ICカード10
0内の制御部102が内部プログラムを実行し、そのプ
ログラムから論理空間メモリヘの読み書き要求が発生す
るものとする。また、制御部102または内部プログラ
ムからガベージコレクション要求が発生するものとす
る。
In the present embodiment, the IC card 10
It is assumed that the control unit 102 in 0 executes an internal program, and a read / write request to the logical space memory is generated from the program. It is also assumed that a garbage collection request is generated from the control unit 102 or an internal program.

【0028】《読み書き処理》以下、図2、図1、図
5、図6を用いて論理空間メモリに対する読み書き処理
の流れについて説明する。
<< Read / Write Process >> The flow of the read / write process for the logical space memory will be described below with reference to FIGS. 2, 1, 5, and 6.

【0029】外部機器101からのコマンド送信201
によって、論理空間メモリ読み書き処理が開始され(図
2のステップ2001)、制御部102から論理空間メ
モリに対する読み書き要求を論理メモリ読み書き手段1
03(図1)が受け取ると、先頭ユニット管理手段10
7に対して、その論理アドレスが、図5(a)に示す先
頭ユニット管理手段の登録フォーマット501で登録さ
れているかを間い合わせる(ステップ2002)。
Command transmission 201 from external device 101
As a result, the logical space memory read / write processing is started (step 2001 in FIG. 2), and the control unit 102 issues a read / write request to the logical space memory with the logical memory read / write unit
03 (FIG. 1), the head unit management means 10
7 is checked whether the logical address is registered in the registration format 501 of the head unit management means shown in FIG. 5A (step 2002).

【0030】先頭ユニット管理手段107は、自分の管
理する登録テーブルにその論理アドレスが登録されてい
るかを、メモリアクセスモジュール108を用いてフラ
ッシュメモリ109を検索し、有無を返す。
The head unit management means 107 searches the flash memory 109 by using the memory access module 108 to check whether the logical address is registered in the registration table managed by the head unit management means 107 and returns the presence or absence.

【0031】その論理アドレスが%1のとき、図6の場
合では、論理アドレス%1は、登録されているので有り
を返し、論理アドレス%3の場合は登録されていないの
で無いを返す。
When the logical address is% 1, in the case shown in FIG. 6, the logical address% 1 is registered, so that "Yes" is returned. In the case of the logical address% 3, "No" is returned because it is not registered.

【0032】無い場合は、ユニット操作手段105に対
して図5(b)に示すようなユニットフォーマット50
2に従う新しいユニットを生成するようにユニット操作
手段105に依頼する(ステップ2003)。
If there is no unit format, a unit format 50 as shown in FIG.
A request is made to the unit operating means 105 to generate a new unit conforming to Step 2 (Step 2003).

【0033】ユニット操作手段105は、メモリアクセ
スモジュール108を用いてフラッシュメモリ109の
空き領域を探して、新しいユニットを格納し、その物理
アドレスを返す。受け取った新しいユニットの物理アド
レスと論理アドレスの組で先頭ユニット管理手段107
に登録を要求する(ステップ2004)。
The unit operating means 105 uses the memory access module 108 to search for a free area in the flash memory 109, stores a new unit, and returns its physical address. The head unit management unit 107 uses the set of the physical address and the logical address of the received new unit.
Request registration (step 2004).

【0034】先頭ユニット管理手段107は、メモリア
クセスモジュール108を用いて自分の管理する登録テ
ーブルに登録する。有る場合は特に何もせず、次の処理
に移る。
The head unit management means 107 registers in a registration table managed by itself using the memory access module 108. If there is, nothing is performed, and the process proceeds to the next process.

【0035】次に、最終ユニット追跡手段106に対し
て、一番最後のユニットの物理アドレスを間い合わせ
る。最終ユニット追跡手段106では、そのユニットの
次の物理アドレス部がNULLであるかを間い合わせ、
ユニット操作手段105に次の物理アドレス部の値を間
い合わせる(ステップ2005)。
Next, the last unit tracking unit 106 checks the physical address of the last unit. The last unit tracking means 106 determines whether the next physical address part of the unit is NULL,
The value of the next physical address part is registered with the unit operating means 105 (step 2005).

【0036】ユニット操作手段105は、メモリアクセ
スモジュール108を用いてユニットの次の物理アドレ
ス部を返す。次の物理アドレスがNULLでなければ、
次の物理アドレス部に示されるユニットを現在のユニッ
トとし、そのユニットの次の物理アドレス部がNULL
であるまで繰り返し、最後のユニットの物理アドレスを
返す(ステップ2006)。図6の場合、物理アドレス
#1が渡されると物理アドレス#5が返る。
The unit operating means 105 returns the next physical address of the unit using the memory access module 108. If the next physical address is not NULL,
The unit indicated by the next physical address part is the current unit, and the next physical address part of the unit is NULL.
And returns the physical address of the last unit (step 2006). In the case of FIG. 6, when the physical address # 1 is passed, the physical address # 5 is returned.

【0037】次に、読み込み処理なのか書き込み処理な
のかを判別する(ステップ2007)。
Next, it is determined whether the process is a read process or a write process (step 2007).

【0038】読み込み処理の場合は、ユニットのデータ
部の値を内部プログラム実行に返す(ステップ200
8)。
In the case of the reading process, the value of the data part of the unit is returned to the execution of the internal program (step 200).
8).

【0039】書き込みの場合は、書き込み処理を行って
(ステップ2009)内部プログラムに戻る。
In the case of writing, a writing process is performed (step 2009), and the process returns to the internal program.

【0040】《書き込み処理》以下、図3、図1、図
6、図7を用いて読み込み処理の流れについて説明す
る。
<< Write Process >> The flow of the read process will be described below with reference to FIGS. 3, 1, 6, and 7.

【0041】ここで、書き込み処理(図3のステップ3
001)は、まず新しいユニットを生成することをユニ
ット操作手段105(図1)に要求し(ステップ300
2)、生成した新しいユニットの物理アドレスを現在の
ユニットの次の物理アドレス部へ格納することをユニッ
ト操作手段105に要求する(ステップ3003)。
Here, the writing process (step 3 in FIG. 3)
001) first requests the unit operating means 105 (FIG. 1) to generate a new unit (step 300).
2) Request the unit operating means 105 to store the generated physical address of the new unit in the physical address next to the current unit (step 3003).

【0042】ユニット操作手段105は、メモリアクセ
スモジュール108を用いて現在のユニットの次の物理
アドレス部に、新しいユニットの物理アドレスを格納す
る。そして、新しいユニットの実データ部に書き込むデ
ータを格納するようにユニット操作手段105に依頼す
る。
The unit operation means 105 uses the memory access module 108 to store the physical address of the new unit in the physical address next to the current unit. Then, it requests the unit operating means 105 to store the data to be written in the actual data section of the new unit.

【0043】ユニット操作手段105は、メモリアクセ
スモジュール108を用いて新しいユニットの実データ
部に書き込むデータを格納し(ステップ3004)、書
き込み処理が終了する(ステップ3005)。
The unit operating means 105 stores data to be written in the real data section of the new unit by using the memory access module 108 (step 3004), and the writing process ends (step 3005).

【0044】図6の場合、論理アドレス%1に対する値
&4の書き込み処理の結果、図7に示すようになる。
In the case of FIG. 6, the result of the process of writing the value & 4 to the logical address% 1 is as shown in FIG.

【0045】《ガベージコレクション処理》以下、図
4、図1、図7、図8を用いてガベージコレクション
(ゴミユニットの消去)処理の流れについて説明する。
<< Garbage Collection Process >> The flow of the garbage collection (deletion of dust unit) process will be described below with reference to FIGS. 4, 1, 7, and 8.

【0046】制御部102あるいは内部プログラム中に
発生したガベージコレクション要求をガベージコレクシ
ョン管理手段104が受け取ると、ガベージコレクショ
ン処理が開始され(ステップ4001)、先頭ユニット
管理手段107に登録されているユニットを単純なユニ
ット群に置き換える。この置き換え処理では、まず、先
頭ユニット管理手段107に登録されているすべての先
頭ユニットの物理アドレスと論理アドレスの組を受け取
る(ステップ4002)。
When the garbage collection management unit 104 receives a garbage collection request generated in the control unit 102 or the internal program, the garbage collection process is started (step 4001), and the unit registered in the head unit management unit 107 is deleted. Replace with a simple unit group. In this replacement process, first, a set of physical addresses and logical addresses of all the head units registered in the head unit management means 107 is received (step 4002).

【0047】それぞれの先頭ユニットの物理アドレスを
元に、最終ユニット追跡手段106(図1)に対してユ
ニットを消去しながら最終ユニットを返すことを要求す
る。その処理内容は、現在のユニットの次の物理アドレ
スがNULLであるかチェックする(ステップ400
3)。
Based on the physical address of each head unit, it requests the last unit tracking means 106 (FIG. 1) to return the last unit while erasing the unit. The processing content checks whether the next physical address of the current unit is NULL (step 400).
3).

【0048】NULLでないならば、現在のユニットの
次の物理アドレス部に示される次のユニットを、ユニッ
ト操作手段105から取得して、それを現在のユニット
とし(ステップ4004)、NULLになるまで繰り返
す。
If it is not NULL, the next unit indicated by the physical address next to the current unit is obtained from the unit operating means 105, it is made the current unit (step 4004), and the process is repeated until it becomes NULL. .

【0049】NULLであるならば、ユニット操作手段
105に対して新しい領域に新しいユニットの生成を要
求する(ステップ4006)。
If it is NULL, a request is made to the unit operating means 105 to generate a new unit in a new area (step 4006).

【0050】先頭ユニットに対応する論理アドレスと新
しいユニットの物理アドレスの組を新しい領域に登録す
ることを、先頭ユニット管理手段107に要求する(ス
テップ4007)。
A request is made to the head unit management means 107 to register a set of a logical address corresponding to the head unit and a physical address of the new unit in a new area (step 4007).

【0051】次の新しいユニットのデータ部に現在のユ
ニットのデータ部を格納するようにユニット操作手段1
05に要求する(ステップ4008)。
The unit operating means 1 stores the data section of the current unit in the data section of the next new unit.
05 (step 4008).

【0052】次に現在のユニットを消去するようにユニ
ット操作手段105に要求し(ステップ4009)、元
の領域にある論理アドレスと先頭ユニットの物理アドレ
スの組を消去するように先頭ユニット管理手段107に
要求する(ステップ4010)。
Next, a request is made to the unit operating means 105 to erase the current unit (step 4009), and the head unit management means 107 is to erase the set of the logical address and the physical address of the head unit in the original area. (Step 4010).

【0053】しかしながら、ユニットの大きさが消去可
能な単位より小さい場合、1つのユニットのみを消去す
ることができないので、ここでは消去しない。これを元
の領域にある先頭ユニット管理手段107が管理する登
録情報がなくなるまで繰り返す。登録情報がなくなった
ならば、もしステップ4005およびステップ4009
およびステップ4010において、ユニットを消去でき
なかった場合、ここで消去できなかったユニットが存在
する元の領域を消去可能な単位で消去する(ステップ4
011)。
However, if the unit size is smaller than the erasable unit, only one unit cannot be erased. This is repeated until there is no more registration information managed by the head unit management means 107 in the original area. If there is no more registration information, step 4005 and step 4009
If the unit cannot be erased in step 4010, the original area where the unit that could not be erased exists is erased in erasable units (step 4).
011).

【0054】以上で、ガベージコレクション処理が終了
し(ステップ4012)、元の要求発生に戻る。
Thus, the garbage collection process ends (step 4012), and the process returns to the original request generation.

【0055】図7に示す場合にガベージコレクション処
理を行うと、図8に示すようになる。
When the garbage collection process is performed in the case shown in FIG. 7, the result becomes as shown in FIG.

【0056】上記のように、本実施の形態のフラッシュ
メモリ搭載ICカードにおけるメモリアクセス制御方法
では、メモリ空間を物理空間と仮想的な論理空間とに分
離し、物理空間と論理空間をマッピングすることによ
り、メモリヘの更新処理を論理空間にのみ反映し、物理
空間上は、読み出しおよび書き込み処理に置換する。
As described above, in the memory access control method in the IC card with a flash memory according to the present embodiment, the memory space is divided into a physical space and a virtual logical space, and the physical space and the logical space are mapped. Thus, the update process to the memory is reflected only in the logical space, and the read and write processes are replaced in the physical space.

【0057】また、物理空間と論理空間のマッピングに
おいて、ある論理アドレスにあるデータを、図5に示し
たように、次のユニットを指す物理アドレスである次の
物理アドレス部と実データ部の組み合わせとするユニッ
トで構成し、読み出す際には、図2に示したように、そ
のアドレスに対応する先頭ユニットを検索し、最後のユ
ニットになるまで次の物理アドレス部を追跡し、最後の
ユニットの実データ部をその論理アドレスに対応するデ
ータとする。
In the mapping between the physical space and the logical space, the data at a certain logical address is, as shown in FIG. 5, a combination of the next physical address part which is the physical address indicating the next unit and the real data part. At the time of reading, as shown in FIG. 2, the head unit corresponding to the address is searched, the next physical address part is traced until the last unit, and the last unit is read. The actual data part is data corresponding to the logical address.

【0058】また、書き出す際には、図2に示したよう
に、そのアドレスに対応する先頭ユニットを検索し、最
後のユニットになるまで物理アドレス部を追跡し、実デ
ータ部に書き込むデータを格納した新しいユニットを生
成し、そのユニットの物理アドレスを最後のユニットの
物理アドレス部に格納する。
At the time of writing, as shown in FIG. 2, the head unit corresponding to the address is searched, the physical address part is traced until the last unit is reached, and the data to be written in the real data part is stored. A new unit is generated, and the physical address of that unit is stored in the physical address part of the last unit.

【0059】また、更新処理の回数分だけ発生するゴミ
となるユニットを整理し、ゴミユニットのない状態に復
元するために、先頭ユニットのアドレスと追跡した最後
のユニットだけをつなげて単純なユニット群を生成し、
最後にすべてのゴミユニットを消去するガベージコレク
ションを行う。
Further, in order to sort out garbage units generated by the number of times of update processing and restore the state without garbage units, a simple unit group is formed by connecting only the address of the head unit and the last unit tracked. Produces
Finally, perform a garbage collection to erase all garbage units.

【0060】また、本実施の形態のフラッシュメモリ搭
載ICカードにおけるメモリアクセス制御装置は、図1
に示したように、論理空間のアドレスとそれに対応する
ユニットの先頭ユニットを管理する先頭ユニット管理手
段107と、ユニットの次のユニットを順次追跡し、最
後のユニットを返す最終ユニット追跡手段106と、I
Cカード100内のメモリからユニットの読み込み、書
き込み、生成を行うユニット操作手段105と、外部機
器101の外部プログラムからの読み書き要求を受け付
け、先頭ユニット管理手段107と最終ユニット追跡手
段106とユニット操作手段105を連携して論理アド
レスのデータを読み書きする論理メモリ読み書き手段1
03と、先頭ユニット管理手段107と最終ユニット追
跡手段106とユニット操作手段105を連携してガベ
ージコレクションを行うガベージコレクション管理手段
104とを備えている。
The memory access control device in the flash memory IC card according to the present embodiment is shown in FIG.
As shown in (1), the head unit management means 107 for managing the address of the logical space and the head unit of the corresponding unit, the last unit tracking means 106 for sequentially tracking the next unit of the unit and returning the last unit, I
A unit operation unit 105 for reading, writing, and generating units from a memory in the C card 100; a read / write request from an external program of the external device 101; and a head unit management unit 107, a last unit tracking unit 106, and a unit operation unit Logical memory read / write means 1 for reading / writing data of a logical address in cooperation with the logical memory 105
And a garbage collection management unit 104 for performing garbage collection in cooperation with the head unit management unit 107, the last unit tracking unit 106, and the unit operation unit 105.

【0061】さらに、本発明のフラッシュメモリ搭載I
Cカードにおけるメモリアクセス制御プログラムを記憶
したプログラム記憶媒体は、メモリ空間を物理空間と仮
想的な論理空間とに分離し、物理空間と論理空間をマッ
ピングすることにより、メモリヘの更新処理を論理空間
にのみ反映し、物理空間上は、読み出しおよび書き込み
処理に置換し、物理空間と論理空間のマッピングにおい
ては、ある論理アドレスにあるデータを、次のユニット
を指す物理アドレスである次の物理アドレス部と実デー
タ部の組み合わせとするユニットで構成し、読み出す際
には、そのアドレスに対応する先頭ユニットを検索し、
最後のユニットになるまで次の物理アドレス部を追跡
し、最後のユニットの実データ部をその論理アドレスに
対応するデータとし、書き出す際には、そのアドレスに
対応する先頭ユニットを検索し、最後のユニットになる
まで物理アドレス部を追跡し、実データ部に書き込むデ
ータを格納した新しいユニットを生成し、そのユニット
の物理アドレスを最後のユニットの物理アドレス部に格
納し、更新処理の回数分だけ発生するゴミとなるユニッ
トを整理し、ゴミユニットのない状態に復元するため
に、先頭ユニットのアドレスと追跡した最後のユニット
だけをつなげて単純なユニット群を生成し、最後にすべ
てのゴミユニットを消去するガベージコレクションを行
うメモリアクセス制御プログラムを記憶している。
Further, the flash memory mounting I of the present invention
The program storage medium storing the memory access control program in the C card separates the memory space into a physical space and a virtual logical space, and maps the physical space and the logical space to perform the update process to the memory in the logical space. Reflecting only on the physical space, it is replaced with read and write processing, and in mapping between the physical space and the logical space, data at a certain logical address is replaced with the next physical address part which is a physical address pointing to the next unit. It is composed of units that are combinations of actual data parts, and when reading, it searches for the head unit corresponding to that address,
The next physical address part is traced until the last unit, and the actual data part of the last unit is set as data corresponding to the logical address.When writing, the first unit corresponding to the address is searched, and the last unit is searched. Tracks the physical address part until it becomes a unit, generates a new unit that stores the data to be written to the real data part, stores the physical address of that unit in the physical address part of the last unit, and occurs as many times as the number of update processing In order to sort out garbage units and restore the state without garbage units, a simple unit group is generated by connecting only the head unit address and the last unit tracked, and all garbage units are erased at the end A memory access control program for performing garbage collection is stored.

【0062】このように本発明では、書き込み処理と更
新処理を区別しなくてはならない物理空間をプログラム
に見せず、書き込み処理と更新処理を区別する必要のな
い論理空間だけをプログラムに見せることで、容易にか
つシンプルにプログラミングを行うことができる。ま
た、論理空間と物理空間のマッピングにおいて、更新処
理を書き込み処理の代用とすることで、読み書きの処理
時間である先頭ユニットを検索する時間とユニットを追
跡する時間の合計と更新処理時にはさらに新しいユニッ
トを書き込む時間の合計を、従来の更新処理をするため
の2回のイレースブロックの消去と2回のイレースブロ
ック全体のコピー処理から差し引いた時間だけ全体的に
書き込み速度が向上することになる。また、更新処理を
行った回数だけ発生するゴミユニットすべてを消去する
ことで、新しいユニット生成のための領域を確保するこ
とができる。
As described above, according to the present invention, the program does not show the physical space in which the write process and the update process must be distinguished from each other, but shows the logical space in which the write process and the update process do not need to be distinguished. Programming can be performed easily and simply. In addition, in the mapping of the logical space and the physical space, the update process is used as a substitute for the write process, so that the total time for searching the head unit, which is the read / write processing time, and the time for tracking the unit, and a newer unit for the update process. The overall writing speed is improved by the time obtained by subtracting the total writing time of the erase block from two erase block erase operations for performing the conventional update process and the two erase block entire copy processes. Further, by erasing all dust units generated by the number of times the update process is performed, an area for generating a new unit can be secured.

【0063】以上述べたように本実施の形態によれば、
プログラム側が書き込み処理なのか更新処理なのか意
識する必要がなくなる。また、更新処理が読み込みあ
るいは書き込み処理と同レベルの処理速度で実行可能で
ある。さらに、更新処理が多く行われたときのゴミユ
ニットをすべて消去することができる、という効果が得
られる。
As described above, according to the present embodiment,
There is no need for the program to be conscious of whether it is write processing or update processing. Further, the updating process can be executed at the same processing speed as the reading or writing process. Further, there is an effect that all dust units when many update processes are performed can be erased.

【0064】以上本発明を実施の形態に基づいて具体的
に説明したが、本発明は上記実施の形態に限定されるも
のではなく、その要旨を逸脱しない範囲において種々変
更可能であることは勿論である。
Although the present invention has been specifically described based on the embodiments, the present invention is not limited to the above embodiments, and it is needless to say that various modifications can be made without departing from the scope of the invention. It is.

【0065】[0065]

【発明の効果】以上説明したように、本発明によれば、
プログラム側が書き込み処理なのか更新処理なのか意
識する必要がなくなる。また、更新処理が読み込みあ
るいは書き込み処理と同レベルの処理速度で実行可能で
ある。さらに、更新処理が多く行われたときのゴミユ
ニットをすべて消去することができる、という効果が得
られる。
As described above, according to the present invention,
There is no need for the program to be conscious of whether it is write processing or update processing. Further, the updating process can be executed at the same processing speed as the reading or writing process. Further, there is an effect that all dust units when many update processes are performed can be erased.

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

【図1】本発明の実施の形態のフラッシュメモリ搭載I
Cカードにおけるメモリアクセス制御のシステムを示す
図である。
FIG. 1 shows a flash memory mounted I according to an embodiment of the present invention.
FIG. 3 is a diagram showing a system for memory access control in a C card.

【図2】本実施の形態における論理空間メモリ読み書き
処理の流れを示す図である。
FIG. 2 is a diagram showing a flow of a logical space memory read / write process in the present embodiment.

【図3】本実施の形態における書き込み処理の流れを示
す図である。
FIG. 3 is a diagram showing a flow of a writing process according to the embodiment.

【図4】本実施の形態におけるガベージコレクション処
理の流れを示す図である。
FIG. 4 is a diagram showing a flow of a garbage collection process in the present embodiment.

【図5】(a)、(b)は本実施の形態における各種フ
ォーマットを示す図である。
FIGS. 5A and 5B are diagrams showing various formats in the present embodiment.

【図6】本実施の形態におけるユニットの配置例を示す
図である。
FIG. 6 is a diagram showing an example of arrangement of units in the present embodiment.

【図7】本実施の形態における書き込み処理後を示す図
である。
FIG. 7 is a diagram showing a state after a write process according to the embodiment;

【図8】本実施の形態におけるガベージコレクション処
理後を示す図である。
FIG. 8 is a diagram illustrating a state after a garbage collection process according to the present embodiment.

【図9】従来のフラッシュメモリ搭載ICカードにおけ
るメモリアクセス制御のシステムを示す図である。
FIG. 9 is a diagram showing a memory access control system in a conventional flash memory IC card.

【図10】従来のフラッシュメモリにおける更新処理の
流れを示す図である。
FIG. 10 is a diagram showing a flow of an update process in a conventional flash memory.

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

100…ICカード、101…外部機器、102…制御
部、103…論理メモリ読み書き手段、104…ガベー
ジコレクション管理手段、105…ユニット操作手段、
106…最終ユニット追跡手段、107…先頭ユニット
管理手段、108…メモリアクセスモジュール、109
…フラッシュメモリ、201…コマンド送信、202…
レスポンス受信、203、204…メモリ読み書き。
100: IC card, 101: external device, 102: control unit, 103: logical memory read / write unit, 104: garbage collection management unit, 105: unit operation unit
106: last unit tracking means, 107: leading unit management means, 108: memory access module, 109
... flash memory, 201 ... command transmission, 202 ...
Response reception, 203, 204: Memory read / write.

フロントページの続き (72)発明者 吉田 慎介 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 (72)発明者 霍 日洪 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 Fターム(参考) 5B035 AA02 BB09 BC00 CA11 CA29 5B060 AA07 AA08 AA10 AB26 AC11Continuing on the front page (72) Inventor Shinsuke Yoshida 2-3-1 Otemachi, Chiyoda-ku, Tokyo Within Nippon Telegraph and Telephone Corporation (72) Inventor Huo Nihongo 2-3-1 Otemachi, Chiyoda-ku, Tokyo F-term in Nippon Telegraph and Telephone Corporation (reference) 5B035 AA02 BB09 BC00 CA11 CA29 5B060 AA07 AA08 AA10 AB26 AC11

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】メモリ空間を物理空間と仮想的な論理空間
とに分離し、前記物理空間と前記論理空間をマッピング
することにより、メモリヘの更新処理を前記論理空間に
のみ反映し、前記物理空間上は、読み出しおよび書き込
み処理に置換することを特徴とするフラッシュメモリ搭
載ICカードにおけるメモリアクセス制御方法。
A memory space is divided into a physical space and a virtual logical space, and the physical space and the logical space are mapped to reflect an update process to a memory only in the logical space. Above, a memory access control method in a flash memory-mounted IC card, which is replaced with read and write processing.
【請求項2】前記物理空間と前記論理空間の前記マッピ
ングにおいて、ある論理アドレスにあるデータを、次の
ユニットを指す物理アドレスである次の物理アドレス部
と実データ部の組み合わせとするユニットで構成し、読
み出す際に、そのアドレスに対応する先頭ユニットを検
索し、最後のユニットになるまで次の物理アドレス部を
追跡し、最後のユニットの実データ部をその論理アドレ
スに対応するデータとすることを特徴とする請求項1記
載のフラッシュメモリ搭載ICカードにおけるメモリア
クセス制御方法。
2. In the mapping of the physical space and the logical space, the data at a certain logical address is constituted by a unit which is a combination of a next physical address part which is a physical address indicating the next unit and a real data part. When reading, the first unit corresponding to that address is searched, the next physical address part is traced until the last unit, and the actual data part of the last unit is the data corresponding to the logical address. 2. The memory access control method in a flash memory-mounted IC card according to claim 1, wherein:
【請求項3】前記ユニットによるデータ管理において、
書き出す際に、そのアドレスに対応する先頭ユニットを
検索し、最後のユニットになるまで物理アドレス部を追
跡し、実データ部に書き込むデータを格納した新しいユ
ニットを生成し、そのユニットの物理アドレスを最後の
ユニットの物理アドレス部に格納することを特徴とする
請求項2記載のフラッシュメモリ搭載ICカードにおけ
るメモリアクセス制御方法。
3. In the data management by the unit,
When writing, search for the head unit corresponding to that address, trace the physical address part until the last unit, generate a new unit storing the data to be written to the real data part, and change the physical address of that unit to the last. 3. The memory access control method for an IC card with a flash memory according to claim 2, wherein the memory access is stored in a physical address portion of the unit.
【請求項4】前記ユニットによるデータ管理において、
更新処理の回数分だけ発生するゴミとなるユニットを整
理し、ゴミユニットのない状態に復元するために、先頭
ユニットのアドレスと追跡した最後のユニットだけをつ
なげて単純なユニット群を生成し、最後にすべてのゴミ
ユニットを消去するガベージコレクションを行うことを
特徴とする請求項2記載のフラッシュメモリ搭載ICカ
ードおよびメモリアクセス制御方法。
4. The data management by the unit,
In order to sort out garbage units generated by the number of update processes and restore the state without garbage units, a simple unit group is generated by connecting only the address of the top unit and the last unit tracked, 3. A flash memory-mounted IC card and a memory access control method according to claim 2, wherein a garbage collection for erasing all dust units is performed.
【請求項5】論理空間のアドレスとそれに対応するユニ
ットの先頭ユニットを管理する先頭ユニット管理手段
と、 前記ユニットの次のユニットを順次追跡し、最後のユニ
ットを返す最終ユニット追跡手段と、 ICカード内メモリからユニットの読み込み、書き込
み、生成を行うユニット操作手段と、 外部プログラムからの読み書き要求を受け付け、前記先
頭ユニット管理手段と前記最終ユニット追跡手段と前記
ユニット操作手段を連携して論理アドレスのデータを読
み書きする論理メモリ読み書き手段と、 前記先頭ユニット管理手段と前記最終ユニット追跡手段
と前記ユニット操作手段を連携してガベージコレクショ
ンを行うガベージコレクション管理手段とを備えたこと
を特徴とするフラッシュメモリ搭載ICカードにおける
メモリアクセス制御装置。
5. A head unit management means for managing an address in a logical space and a head unit of a unit corresponding thereto, a last unit tracking means for sequentially tracing a unit next to the unit and returning a last unit, and an IC card. Unit operation means for reading, writing, and generating units from an internal memory; accepting a read / write request from an external program; and linking the head unit management means, the last unit tracking means, and the unit operation means with logical address data. And a garbage collection management means for performing garbage collection in cooperation with the head unit management means, the last unit tracking means, and the unit operation means. Memory access on the card Access control device.
【請求項6】メモリ空間を物理空間と仮想的な論理空間
とに分離し、前記物理空間と前記論理空間をマッピング
することにより、メモリヘの更新処理を前記論理空間に
のみ反映し、前記物理空間上は、読み出しおよび書き込
み処理に置換し、 前記物理空間と前記論理空間の前記マッピングにおいて
は、ある論理アドレスにあるデータを、次のユニットを
指す物理アドレスである次の物理アドレス部と実データ
部の組み合わせとするユニットで構成し、 読み出す際には、そのアドレスに対応する先頭ユニット
を検索し、最後のユニットになるまで次の物理アドレス
部を追跡し、最後のユニットの実データ部をその論理ア
ドレスに対応するデータとし、 書き出す際には、そのアドレスに対応する先頭ユニット
を検索し、最後のユニットになるまで物理アドレス部を
追跡し、実データ部に書き込むデータを格納した新しい
ユニットを生成し、そのユニットの物理アドレスを最後
のユニットの物理アドレス部に格納し、 更新処理の回数分だけ発生するゴミとなるユニットを整
理し、ゴミユニットのない状態に復元するために、先頭
ユニットのアドレスと追跡した最後のユニットだけをつ
なげて単純なユニット群を生成し、最後にすべてのゴミ
ユニットを消去するガベージコレクションを行うことを
特徴とするフラッシュメモリ搭載ICカードにおけるメ
モリアクセス制御プログラムを記憶したプログラム記憶
媒体。
6. A physical space and a virtual logical space are separated from each other, and the physical space and the logical space are mapped to reflect an update process to a memory only in the logical space. The upper part is replaced with read and write processing. In the mapping between the physical space and the logical space, data at a certain logical address is replaced with a next physical address part and a real data part which are physical addresses indicating the next unit. When reading, the first unit corresponding to that address is searched, the next physical address part is traced until the last unit is reached, and the actual data part of the last unit is When writing as data corresponding to an address, search for the first unit corresponding to that address and continue until it becomes the last unit. Tracks the physical address part, generates a new unit that stores the data to be written to the real data part, stores the physical address of that unit in the physical address part of the last unit, and generates garbage generated by the number of update processing In order to organize the units and restore them to a state without garbage units, a garbage collection that creates a simple unit group by connecting only the address of the first unit and the last unit tracked, and finally erases all garbage units A program storage medium storing a memory access control program in an IC card with a flash memory, wherein the program is executed.
JP2000397372A 2000-12-27 2000-12-27 Memory access control method and device in ic card equipped with flash memory, and program storage medium Pending JP2002196976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000397372A JP2002196976A (en) 2000-12-27 2000-12-27 Memory access control method and device in ic card equipped with flash memory, and program storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000397372A JP2002196976A (en) 2000-12-27 2000-12-27 Memory access control method and device in ic card equipped with flash memory, and program storage medium

Publications (1)

Publication Number Publication Date
JP2002196976A true JP2002196976A (en) 2002-07-12

Family

ID=18862504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000397372A Pending JP2002196976A (en) 2000-12-27 2000-12-27 Memory access control method and device in ic card equipped with flash memory, and program storage medium

Country Status (1)

Country Link
JP (1) JP2002196976A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100738032B1 (en) * 2006-03-24 2007-07-16 주식회사 케이티프리텔 Smart card of supporting large size memory and method thereof
JP2008134945A (en) * 2006-11-29 2008-06-12 Dainippon Printing Co Ltd Storage device, program for storage device and storage processing method
CN100426597C (en) * 2003-03-31 2008-10-15 松下电器产业株式会社 Connector of mobile device and digital products and method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426597C (en) * 2003-03-31 2008-10-15 松下电器产业株式会社 Connector of mobile device and digital products and method thereof
KR100738032B1 (en) * 2006-03-24 2007-07-16 주식회사 케이티프리텔 Smart card of supporting large size memory and method thereof
JP2008134945A (en) * 2006-11-29 2008-06-12 Dainippon Printing Co Ltd Storage device, program for storage device and storage processing method

Similar Documents

Publication Publication Date Title
JP3997130B2 (en) Memory management method
CN100424655C (en) Method for managing flash memory
KR100725390B1 (en) Apparatus and method for storing data in nonvolatile cache memory considering update ratio
US8261041B2 (en) Memory management device for accessing cache memory or main memory
EP0770960B1 (en) Flash translation layer block indication map revision method
US8166258B2 (en) Skip operations for solid state disks
US7404030B2 (en) Method of controlling a non-volatile memory device in which a data erase block is larger than a data write block
US20080168252A1 (en) Memory Controller, Nonvolatile Storage Device, Nonvolatile Storage System, and Memory Control Method
US20060187738A1 (en) Memory management device and memory device
CN103150256B (en) Improve method and the device of USB flash memory write performance
KR20090026941A (en) Method for address mapping in virtual file system embodied in storage device having a plurality of non-volatile data storage and apparatus thereof
JPH06250798A (en) Batch erasure type nonvolatile memory and semiconductor disk device using it
KR20040082921A (en) flash file system
CA2047696A1 (en) Method of reading and writing files on non-erasable storage media
US20080025706A1 (en) Information recording apparatus and control method thereof
JP2004139503A (en) Storage device and its control method
CN106598493A (en) Solid state disk address mapping table management method
US20190324692A1 (en) Storage device, information processing system, and non-transitory computer-readable storage medium for storing program
KR20020092261A (en) Management Scheme for Flash Memory with the Multi-Plane Architecture
Chung et al. STAFF: A flash driver algorithm minimizing block erasures
JP2002196976A (en) Memory access control method and device in ic card equipped with flash memory, and program storage medium
CN114546292A (en) Method and system for managing bad blocks of nand flash
KR100479170B1 (en) Access control device for memory and method thereof
KR100982440B1 (en) System for managing data in single flash memory
JPH0778228A (en) Memory card and its data managing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041221

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050412