JP2007004284A - Storage device and its method for data write-in processing - Google Patents

Storage device and its method for data write-in processing Download PDF

Info

Publication number
JP2007004284A
JP2007004284A JP2005180913A JP2005180913A JP2007004284A JP 2007004284 A JP2007004284 A JP 2007004284A JP 2005180913 A JP2005180913 A JP 2005180913A JP 2005180913 A JP2005180913 A JP 2005180913A JP 2007004284 A JP2007004284 A JP 2007004284A
Authority
JP
Japan
Prior art keywords
data
storage area
logical
physical address
valid
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
Application number
JP2005180913A
Other languages
Japanese (ja)
Other versions
JP4725779B2 (en
Inventor
Tetsuo Goto
哲郎 後藤
Akira Endo
彰 遠藤
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2005180913A priority Critical patent/JP4725779B2/en
Publication of JP2007004284A publication Critical patent/JP2007004284A/en
Application granted granted Critical
Publication of JP4725779B2 publication Critical patent/JP4725779B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve processing efficiency. <P>SOLUTION: As for the data write-in processing of a non-contact IC card 3, when executing logical/physical address rewriting processing, only the physical address "X" of a data storage region where new data are written is saved so that it is possible to reduce write-in data quantity in data write-in processing, and to sharply improve the result processing efficiency compared with the conventional method. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は記憶装置及びそのデータ書込処理方法に関し、例えば、リーダライタ装置に対して近接された際当該近接されたリーダライタ装置から送信されたデータを受信してこれを内部のメモリに書き込むデータ書込処理を実行する非接触IC(Integrated Circuit)カードに適用して好適なものである。   The present invention relates to a storage device and a data writing processing method therefor, for example, data received from an adjacent reader / writer device when it is approached to a reader / writer device and written to an internal memory. It is suitable for application to a non-contact IC (Integrated Circuit) card that executes a writing process.

従来この種の非接触ICカードは、近接されたリーダライタ装置から放出される電磁波を受信してこれを整流することにより非接触ICカードを駆動させるための駆動電力を生成し、当該生成した駆動電力によりデータ書込処理等を実行し得るようになされている。   Conventionally, this type of non-contact IC card generates electromagnetic power emitted from an adjacent reader / writer device and rectifies it to generate drive power for driving the non-contact IC card, and the generated drive Data writing processing or the like can be executed by electric power.

この非接触ICカードは、リーダライタ装置から離されてしまうとこのリーダライタ装置から放出されている電磁波を十分に受信することができなくなり、その結果駆動電力が低下してデータ書込処理を中断してしまう場合があり得る。   If the non-contact IC card is separated from the reader / writer device, the electromagnetic wave emitted from the reader / writer device cannot be sufficiently received, and as a result, the driving power is reduced and the data writing process is interrupted. It can happen.

このようにデータ書込処理を中断した場合、データ書込処理の対象となっていたデータが破壊されてしまう可能性がある。このため従来から、データ書込処理の対象となっていたデータを保障する手法が提案されている(例えば特許文献1参照)。   When the data writing process is interrupted in this way, there is a possibility that the data that was the target of the data writing process is destroyed. For this reason, conventionally, there has been proposed a method for guaranteeing data that has been a target of data writing processing (see, for example, Patent Document 1).

ここで図7及び図8を用いて従来手法を説明する。この従来手法が適用された非接触ICカードのメモリは、リーダライタ装置からのデータが書き込まれるデータ記憶区域ごとにそのデータ記憶区域の物理的な位置を示す物理的位置情報(物理アドレス)が対応付けられてなるデータ記憶領域AR101を有する。またこの非接触ICカードのメモリは、リーダライタ装置に対して論理的に認識させるデータ記憶区域の論理的位置情報(論理アドレス)とこの論理アドレスに対応するデータ記憶区域の物理アドレスとを対応付けてなる論物アドレス記憶領域AR102を有する。   Here, the conventional method will be described with reference to FIGS. In the memory of the non-contact IC card to which this conventional method is applied, physical position information (physical address) indicating the physical position of the data storage area corresponds to each data storage area in which data from the reader / writer device is written. A data storage area AR101 is provided. Further, the memory of this non-contact IC card associates the logical position information (logical address) of the data storage area logically recognized by the reader / writer device with the physical address of the data storage area corresponding to this logical address. A logical address storage area AR102.

例えばこの非接触ICカードの制御部は、論理アドレス「A」に対して新データを書き込むようにリーダライタ装置から命令されると、この新データを書き込むデータ書込処理(ステップSP101〜SP105)を実行開始する。   For example, when the control unit of the non-contact IC card is instructed by the reader / writer device to write new data to the logical address “A”, the data writing process (steps SP101 to SP105) for writing the new data is performed. Start running.

まずこの非接触ICカードの制御部は、図7(A)に示すように論物アドレス記憶領域AR102を参照することにより、データ書込可能なデータ記憶区域を指し示す論理アドレス「TEMP」に対応付けられた物理アドレス「Y」を認識し、当該認識した物理アドレス「Y」のデータ記憶区域に新データを書き込む(ステップSP101)。   First, the control unit of the non-contact IC card refers to the logical / physical address storage area AR102 as shown in FIG. 7A, and associates it with the logical address “TEMP” indicating the data storage area where data can be written. The recognized physical address “Y” is recognized, and new data is written in the data storage area of the recognized physical address “Y” (step SP101).

次いでこの非接触ICカードの制御部は、論物アドレス記憶領域AR102中の論理アドレス「A」が新データを書き込んだデータ記憶区域を指し示すように、論物アドレス記憶領域AR102を書き換える論物アドレス書換処理を実行する(ステップSP102〜SP105)。   Next, the control unit of the non-contact IC card rewrites the logical / physical address storage area AR102 so that the logical address “A” in the logical / physical address storage area AR102 indicates the data storage area in which the new data is written. Processing is executed (steps SP102 to SP105).

つまりこの論物アドレス書換処理では、図7(B)に示すように論物アドレス記憶領域AR102中の論理アドレス「A」とこの論理アドレス「A」に対応付けられている物理アドレス「X」とを対応付けて論物アドレス退避領域AR103に退避させると共に、論物アドレス記憶領域AR102中の論理アドレス「TEMP」に対応付けられた物理アドレス「Y」を論物アドレス退避領域AR103中の論理アドレス「TEMP」に対応付けるようにして論物アドレス退避領域AR103に退避させる(ステップSP102)。   That is, in the logical / physical address rewriting process, as shown in FIG. 7B, the logical address “A” in the logical / physical address storage area AR102 and the physical address “X” associated with the logical address “A” And the physical address “Y” associated with the logical address “TEMP” in the logical / physical address storage area AR102 is saved in the logical / physical address saving area AR103. It is saved in the logical / physical address save area AR103 so as to be associated with “TEMP” (step SP102).

次にこの論物アドレス書換処理では、論物アドレス書換処理を実行している最中である旨又は論物アドレス書換処理を実行している最中でない旨の何れかを示す書換処理状況情報が記憶された書換処理情報記憶領域AR104中の書換処理状況情報を、論物アドレス書換処理実行中である旨を示すように書き換える(ステップSP103)。因みにこの場合この書換処理状況情報は、「0」であると論物アドレス書換処理を実行している最中でない旨を示しており、「1」であると論物アドレス書換処理を実行している最中である旨を示している。   Next, in this logical / physical address rewriting process, rewrite processing status information indicating whether the logical / physical address rewriting process is being executed or not being executed. The rewrite process status information in the stored rewrite process information storage area AR104 is rewritten to indicate that the logical / physical address rewrite process is being executed (step SP103). In this case, if this rewrite processing status information is “0”, it indicates that the logical / physical address rewrite processing is not in progress, and if it is “1”, the logical / physical address rewrite processing is executed. It shows that it is in the middle.

続いてこの論物アドレス書換処理では、図8(C)に示すように論物アドレス退避領域AR103中の論理アドレス「A」に対応付けられている物理アドレス「X」を論物アドレス記憶領域AR102中の論理アドレス「TEMP」に対応付けるようにして論物アドレス記憶領域AR102に書き込むと共に、論物アドレス退避領域AR103中の論理アドレス「TEMP」に対応付けられている物理アドレス「Y」を論物アドレス記憶領域AR102中の論理アドレス「A」に対応付けるようにして論物アドレス記憶領域AR102に書き込む(ステップSP104)。   Subsequently, in this logical / physical address rewriting process, as shown in FIG. 8C, the physical address “X” associated with the logical address “A” in the logical / physical address saving area AR103 is assigned to the logical / physical address storage area AR102. The logical address “TEMP” is written to the logical / physical address storage area AR102 and the physical address “Y” associated with the logical address “TEMP” in the logical / physical address save area AR103 is set to the logical / physical address. The logical address “A” in the storage area AR102 is associated with the logical address “A” and written to the logical / physical address storage area AR102 (step SP104).

そしてこの論物アドレス書換処理では、論物アドレス書換処理を実行している最中でない旨を示すように書換処理情報記憶領域AR104中の書換処理状況情報を書き換える(ステップSP105)。   In this logical / physical address rewrite process, the rewrite process status information in the rewrite process information storage area AR104 is rewritten so as to indicate that the logical / physical address rewrite process is not being executed (step SP105).

これにより非接触ICカードの制御部は、この後に論理アドレス「A」からデータを読み出すようにリーダライタ装置から命令されると、これに応じて論物アドレス記憶領域AR102を参照することにより論理アドレス「A」に対応付けられた物理アドレス「Y」を認識し、当該認識した物理アドレス「Y」のデータ記憶区域に記憶されている新データを読み出すことができる。   Thus, when the control unit of the non-contact IC card is instructed by the reader / writer device to read data from the logical address “A” thereafter, the logical address is referred to by referring to the logical / physical address storage area AR102 accordingly. The physical address “Y” associated with “A” is recognized, and new data stored in the data storage area of the recognized physical address “Y” can be read.

また非接触ICカードの制御部は、リーダライタ装置から一度離された後再び近接されることにより駆動再開した際、書換処理情報記憶領域AR104中の書換処理状況情報が論物アドレス書換処理を実行している最中である旨を示したままになっていると、ステップSP104を実行している最中にデータ書込処理を中断してしまったと判断する。   When the control unit of the non-contact IC card is once separated from the reader / writer device and restarted by being approached again, the rewrite processing status information in the rewrite processing information storage area AR104 executes the logical / physical address rewriting process. If it remains in the middle of being executed, it is determined that the data writing process has been interrupted while step SP104 is being executed.

この場合論物アドレス退避領域AR103には、新データの書き込み先として命令された論理アドレス「A」と、この論理アドレス「A」に対応付けられていた物理アドレス「X」と、新データが実際に書き込まれた物理アドレス「Y」とが退避されている。   In this case, in the logical / physical address saving area AR103, the logical address “A” instructed as the write destination of the new data, the physical address “X” associated with the logical address “A”, and the new data are actually stored. The physical address “Y” written in is saved.

これにより非接触ICカードの制御部は、例えば、論物アドレス退避領域AR103中の論理アドレス「A」に対応付けられている物理アドレス「X」を論物アドレス記憶領域AR102中の論理アドレス「A」に対応付けるようにして論物アドレス記憶領域AR102に書き戻す共に、論物アドレス退避領域AR103中の論理アドレス「TEMP」に対応付けられている物理アドレス「Y」を論物アドレス記憶領域AR102中の論理アドレス「TEMP」に対応付けるようにして論物アドレス記憶領域AR102に書き戻す。   Thereby, the control unit of the non-contact IC card, for example, uses the physical address “X” associated with the logical address “A” in the logical / physical address saving area AR103 as the logical address “A” in the logical / physical address storage area AR102. And the physical address “Y” associated with the logical address “TEMP” in the logical-address save area AR103 is stored in the logical-address storage area AR102. Write back to the logical / physical address storage area AR102 so as to be associated with the logical address “TEMP”.

この結果非接触ICカードの制御部は、この後に論理アドレス「A」からデータを読み出すようにリーダライタ装置から命令されると、これに応じて論物アドレス記憶領域AR102を参照することにより論理アドレス「A」に対応付けられた物理アドレス「X」を認識し、当該認識した物理アドレス「X」のデータ記憶区域に記憶されている旧データを読み出すことができる。   As a result, when the control unit of the non-contact IC card is instructed by the reader / writer device to read data from the logical address “A” thereafter, the logical address is referred to by referring to the logical / physical address storage area AR102 accordingly. The physical address “X” associated with “A” is recognized, and the old data stored in the data storage area of the recognized physical address “X” can be read.

かくしてこの従来手法によれば、リーダライタ装置から命令された新データを書き込むデータ書込処理を中断したとしても、このデータ書込処理を実行する前の旧データを少なくとも保証することができる。
特開2003−178281公報
Thus, according to this conventional method, even if the data writing process for writing new data instructed by the reader / writer device is interrupted, at least the old data before executing this data writing process can be guaranteed.
JP 2003-178281 A

ところでかかる従来手法が適用された非接触ICカードでは、論物アドレス書換処理を実行する際に、新データの書き込み先として命令された論理アドレス「A」とこの論理アドレス「A」に対応付けられていた物理アドレス「X」と新データが実際に書き込まれた物理アドレス「Y」とを論物アドレス退避領域AR103に退避させる必要があるので、その分データ書込処理時の書き込みデータ量が多くなってしまい処理効率が良いとは言い難い問題があった。   By the way, in the non-contact IC card to which such a conventional method is applied, when the logical / physical address rewriting process is executed, the logical address “A” instructed as the write destination of the new data is associated with the logical address “A”. Since the physical address “X” and the physical address “Y” where the new data is actually written need to be saved in the logical / physical address saving area AR103, the amount of data to be written during the data writing process increases accordingly. Therefore, there is a problem that it is difficult to say that the processing efficiency is good.

本発明は以上の点を考慮してなされたもので、処理効率を向上し得る記憶装置及びそのデータ書込処理方法を提案しようとするものである。   The present invention has been made in consideration of the above points, and an object of the present invention is to propose a storage device capable of improving the processing efficiency and a data write processing method thereof.

かかる課題を解決するため本発明においては、データが書き込まれるデータ記憶区域ごとにそのデータ記憶区域の物理的位置を示す物理アドレスが対応付けられてなるデータ記憶領域と、データ記憶区域の論理的位置を示す論理アドレスとその論理アドレスに対応するデータ記憶区域の物理アドレスとそのデータ記憶区域に対して有効データが記憶されている旨又はそのデータ記憶区域に対して有効データが記憶されていない旨の何れかを表す有効情報とを対応付けて記憶する論物アドレス記憶領域と、論物アドレス記憶領域を書き換える論物アドレス書換処理の実行中である旨又は論物アドレス書換処理の実行中ではない旨の何れかを表す書換処理状況情報を記憶すると共に論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスが退避される書換処理情報記憶領域とを有するメモリと、外部から命令された論理アドレスに対応するデータ記憶区域に対してデータが記憶されるように当該データを書き込むデータ書込処理を実行する書込処理部と設け、データ書込処理では、論物アドレス記憶領域に記憶された有効情報の中から有効データが記憶されていない旨が表された有効情報を検出し当該検出した有効情報に対応付けられている物理アドレスのデータ記憶区域に対してデータを書き込み、論物アドレス書換処理の実行中である旨を表すように書換処理情報記憶領域中の書換処理状況情報を書き換えると共に当該データを書き込んだデータ記憶区域の物理アドレスを書換処理情報記憶領域に退避させ、当該データを書き込んだデータ記憶区域の物理アドレスに対応付けられた論理アドレスを外部から命令された論理アドレスに書き換えると共に当該物理アドレスに対応付けられている有効情報を有効データが記憶されている旨を表すように書き換え、論物アドレス記憶領域の中から当該物理アドレスに対応付けた論理アドレスと同じ論理アドレスを検出し当該検出した論理アドレスに対応付けられている有効情報を有効データが記憶されていない旨を表すように書き換え、論物アドレス書換処理の実行中ではない旨を表すように書換処理情報記憶領域中の書換処理状況情報を書き換えるようにした。   In order to solve such a problem, in the present invention, a data storage area in which a physical address indicating a physical position of the data storage area is associated with each data storage area to which data is written, and a logical position of the data storage area Indicating that a valid address is stored in the physical address of the data storage area corresponding to the logical address and the data storage area, or that no valid data is stored in the data storage area. A logical / physical address storage area that associates and stores valid information representing either one and a logical / physical address rewrite process for rewriting the logical / physical address storage area, or a logical / physical address rewrite process is not being executed. Is stored, and the corresponding logical address is rewritten by the logical address rewriting process. A data write process for writing the data so that the data is stored in a data storage area corresponding to the logical address instructed from the outside, and a memory having a rewrite processing information storage area in which a physical address is saved Provided with a write processing unit to be executed, in the data write processing, valid information indicating that valid data is not stored is detected from the valid information stored in the logical / physical address storage area, and the detected valid Write data to the data storage area of the physical address associated with the information, rewrite the rewrite processing status information in the rewrite processing information storage area to indicate that the logical / physical address rewrite processing is being executed, and The physical address of the data storage area where the data is written is saved in the rewrite processing information storage area, and the physical address of the data storage area where the data is written is saved. The logical address associated with the address is rewritten to the logical address instructed from the outside, and the valid information associated with the physical address is rewritten to indicate that valid data is stored, and the logical / physical address storage area The logical address that is the same as the logical address associated with the physical address is detected, and the valid information associated with the detected logical address is rewritten to indicate that no valid data is stored. The rewrite process status information in the rewrite process information storage area is rewritten so as to indicate that the rewrite process is not being executed.

このデータ書込処理によれば、論物アドレス書換処理を実行する際に、新たにデータを書き込んだデータ記憶区域の物理アドレスのみを退避させておけば良いので、その分従来手法と比べてデータ書込処理時の書き込みデータ量を低減させることができる。   According to this data writing process, when executing the logical / physical address rewriting process, it is only necessary to save only the physical address of the data storage area in which the data is newly written. The amount of write data during the write process can be reduced.

本発明によれば、論物アドレス書換処理を実行する際に、新たにデータを書き込んだデータ記憶区域の物理アドレスのみを退避させておけば良いので、その分従来手法と比べてデータ書込処理時の書き込みデータ量を低減させることができ、この結果処理効率を格段と向上させることができる。   According to the present invention, when executing the logical / physical address rewriting process, it is only necessary to save only the physical address of the data storage area into which data has been newly written. The amount of write data at the time can be reduced, and as a result, the processing efficiency can be significantly improved.

以下図面について、本発明の一実施の形態を詳述する。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

(1)近接無線通信システムにおける非接触ICカードの構成
図1において、1は全体として近接無線通信システムを示し、リーダライタ装置2とこのリーダライタ装置2と近接無線通信する非接触ICカード3とを有する。因みにこの近接無線通信方式としては、例えばFeliCa(R)方式やISO14443A/B等の方式が適用される。
(1) Configuration of Contactless IC Card in Proximity Wireless Communication System In FIG. 1, reference numeral 1 denotes a proximity wireless communication system as a whole, a reader / writer device 2 and a contactless IC card 3 that performs proximity wireless communication with the reader / writer device 2. Have Incidentally, as this proximity wireless communication system, for example, a system such as FeliCa (R) system or ISO14443A / B is applied.

図2に示すようにこの非接触ICカード3は、近接されたリーダライタ装置2から電磁波を受信するアンテナ部4と、当該受信した電磁波を整流することにより非接触ICカード3を駆動させるための駆動電力を生成する駆動電力生成部5とを有する。   As shown in FIG. 2, the non-contact IC card 3 includes an antenna unit 4 that receives electromagnetic waves from a reader / writer device 2 that is adjacent to the non-contact IC card 3 and drives the non-contact IC card 3 by rectifying the received electromagnetic waves. And a driving power generation unit 5 that generates driving power.

この駆動電力生成部5により生成された駆動電力により、非接触ICカード3の制御部6は書込読出部7を制御して、リーダライタ装置2からアンテナ部4及び送受信部8を順次介して受信したデータを不揮発性メモリ9に書き込むデータ書込処理を実行することができると共に、不揮発性メモリ9からデータを読み出しこれを送受信部8及びアンテナ部4を順次介してリーダライタ装置2に対して送信するデータ読出処理を実行することができる。   The control unit 6 of the non-contact IC card 3 controls the writing / reading unit 7 by the driving power generated by the driving power generation unit 5, and sequentially passes the reader / writer device 2 through the antenna unit 4 and the transmission / reception unit 8. A data writing process for writing the received data to the nonvolatile memory 9 can be executed, and the data is read from the nonvolatile memory 9 and is sequentially transmitted to the reader / writer device 2 via the transmission / reception unit 8 and the antenna unit 4. Data transmission processing to be transmitted can be executed.

因みに本実施の形態の場合この制御部6は、プログラムROM(Read Only Memory)10に格納されたプログラムをRAM(Random Access Memory)11に展開し当該展開したプログラムに従って非接触ICカード3全体を制御するための各種処理を実行するCPU(Central Processing Unit)12等を有する。   Incidentally, in the case of the present embodiment, the control unit 6 expands a program stored in a program ROM (Read Only Memory) 10 in a RAM (Random Access Memory) 11 and controls the entire contactless IC card 3 according to the expanded program. CPU (Central Processing Unit) 12 etc. which perform various processing for doing.

非接触ICカード3の不揮発性メモリ9は、図3に示すように、リーダライタ装置2からのデータが書き込まれるデータ記憶区域ごとに、そのデータ記憶区域の物理的な位置を示す物理的位置情報(物理アドレス)が対応付けられてなるデータ記憶領域AR1を有する。   As shown in FIG. 3, the nonvolatile memory 9 of the non-contact IC card 3 has physical location information indicating the physical location of the data storage area for each data storage area to which data from the reader / writer device 2 is written. It has a data storage area AR1 associated with (physical address).

またこの非接触ICカード3の不揮発性メモリ9は、リーダライタ装置2に対して論理的に認識させるデータ記憶区域の論理的位置情報(論理アドレス)と、この論理アドレスに対応するデータ記憶区域の物理アドレスと、そのデータ記憶区域に対してリーダライタ装置2に読み出させる有効なデータが記憶されている旨又はそのデータ記憶区域に対して有効なデータが記憶されていない旨の何れかを表す有効情報とを対応付けて記憶する論物アドレス記憶領域AR2を有する。因みに本実施の形態の場合この有効情報は、「1」であるとリーダライタ装置2に読み出させる有効なデータが記憶されている旨を表し、「0」であると有効なデータが記憶されていない旨を表すようになされている。   Further, the non-volatile memory 9 of the non-contact IC card 3 includes logical position information (logical address) of the data storage area that is logically recognized by the reader / writer device 2 and the data storage area corresponding to the logical address. It represents either the physical address and the fact that valid data to be read by the reader / writer device 2 is stored in the data storage area or that no valid data is stored in the data storage area. It has a logical / physical address storage area AR2 for storing valid information in association with it. Incidentally, in the case of this embodiment, this valid information indicates that valid data to be read by the reader / writer device 2 is stored when it is “1”, and valid data is stored when it is “0”. It is made to indicate that it is not.

さらにこの非接触ICカード3の不揮発性メモリ9は、論物アドレス記憶領域AR2を書き換える論物アドレス書換処理を実行している最中である旨又は論物アドレス書換処理を実行している最中ではない旨の何れかを表す書換処理状況情報と、この論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスとを記憶する書換処理情報記憶領域AR3を有する。因みに本実施の形態の場合書換処理状況情報は、「1」であると論物アドレス書換処理を実行している最中である旨を表し、「0」であると論物アドレス書換処理を実行している最中ではない旨を表すようになされている。   Further, the non-volatile memory 9 of the non-contact IC card 3 is in the middle of executing a logical / physical address rewriting process for rewriting the logical / physical address storage area AR2, or in the middle of executing a logical / physical address rewriting process. The rewrite processing information storage area AR3 stores rewrite processing status information representing any of the above and a physical address at which the corresponding logical address is rewritten by this logical / physical address rewrite processing. Incidentally, in the case of this embodiment, when the rewrite processing status information is “1”, it indicates that the logical / physical address rewrite processing is being executed, and when it is “0”, the logical / physical address rewrite processing is executed. It is made to indicate that it is not in the middle of doing.

この非接触ICカード3の制御部6は、例えば、論理アドレス「A」に対して新データを書き込むようにリーダライタ装置2から命令されると、図5に示すデータ書込処理手順RT1をステップSP1から実行開始する。   For example, when the reader / writer device 2 commands the control unit 6 of the non-contact IC card 3 to write new data to the logical address “A”, the control unit 6 performs the data write processing procedure RT1 shown in FIG. Execution starts from SP1.

すなわちステップSP1において非接触ICカード3の制御部6は、図3(A)に示すように、論物アドレス記憶領域AR2中の有効情報を順次参照する走査処理を実行することにより有効なデータが記憶されていない旨が表された有効情報を検出した後、当該検出した有効情報に対応付けられている物理アドレス「X」を認識し、当該認識した物理アドレス「X」のデータ記憶区域に対して新データを書き込む。   That is, in step SP1, the control unit 6 of the non-contact IC card 3 executes a scanning process for sequentially referring to the valid information in the logical / physical address storage area AR2, as shown in FIG. After detecting valid information indicating that it is not stored, the physical address “X” associated with the detected valid information is recognized, and the data storage area of the recognized physical address “X” is recognized. Write new data.

次いで非接触ICカード3の制御部6は、リーダライタ装置2から新データを書き込むように命令された論理アドレス「A」が、新データを書き込んだ物理アドレス「X」のデータ記憶区域を指し示すように、論物アドレス記憶領域AR2を書き換える論物アドレス書換処理を実行する。   Next, the control unit 6 of the non-contact IC card 3 indicates that the logical address “A” instructed to write new data from the reader / writer device 2 indicates the data storage area of the physical address “X” in which the new data is written. Then, a logical / physical address rewriting process is performed to rewrite the logical / physical address storage area AR2.

すなわち次のステップSP2において非接触ICカード3の制御部6は、図3(B)に示すように、論物アドレス書換処理を実行している最中である旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えると共に、新データを書き込んだデータ記憶区域の物理アドレス「X」を書換処理情報記憶領域AR3に記憶(退避)させる。   That is, in the next step SP2, as shown in FIG. 3B, the control unit 6 of the non-contact IC card 3 stores the rewrite processing information so as to indicate that the logical / physical address rewrite processing is being executed. The rewrite processing status information in the area AR3 is rewritten, and the physical address “X” of the data storage area in which the new data is written is stored (saved) in the rewrite processing information storage area AR3.

そして続くステップSP3において非接触ICカード3の制御部6は、図4(C)に示すように、論物アドレス記憶領域AR2において、新データを書き込んだデータ記憶区域の物理アドレス「X」に対応付けられた論理アドレスを、リーダライタ装置2から新データを書き込むように命令された論理アドレス「A」に書き換えるようにすると共に、この物理アドレス「X」に対応付けられている有効情報を、有効なデータが記憶されている旨を表すように書き換える。   In the subsequent step SP3, as shown in FIG. 4C, the controller 6 of the non-contact IC card 3 corresponds to the physical address “X” of the data storage area in which the new data is written in the logical / physical address storage area AR2. The assigned logical address is rewritten to the logical address “A” instructed to write new data from the reader / writer device 2, and valid information associated with the physical address “X” is changed to valid. Rewrite to indicate that correct data is stored.

次にステップSP4において非接触ICカード3の制御部6は、図4(D)に示すように、論物アドレス記憶領域AR2中の論理アドレスを順次参照する走査処理を実行することにより、新データを書き込んだデータ記憶区域の物理アドレス「X」に対応付けた論理アドレス「A」と同じ論理アドレス「A」を検出し、当該検出した論理アドレス「A」に対応付けられている有効情報を、有効なデータが記憶されていない旨を表すように書き換える。   Next, in step SP4, as shown in FIG. 4D, the control unit 6 of the non-contact IC card 3 executes a scanning process for sequentially referring to the logical addresses in the logical / physical address storage area AR2, thereby creating new data. The logical address “A” that is the same as the logical address “A” associated with the physical address “X” of the data storage area in which is written is detected, and valid information associated with the detected logical address “A” is Rewrite to indicate that valid data is not stored.

続いてステップSP5において非接触ICカード3の制御部6は、論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を変更した後、終了ステップSP6に移ってデータ書込処理手順RT1を終了する。   Subsequently, in step SP5, the control unit 6 of the non-contact IC card 3 changes the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that the logical / physical address rewrite process is not being executed. Then, the process proceeds to an end step SP6, and the data writing processing procedure RT1 is ended.

ところでこの非接触ICカード3の制御部6は、例えば、駆動電力生成部5から供給されていた駆動電力が途絶えたことに起因して、新データを書き込むデータ書込処理を中断してしまった場合、駆動電力生成部5からの駆動電力が供給再開されたとき、この論理アドレス「A」に対応するデータを正しく読み出せるように論物アドレス記憶領域AR2を修正する修正処理手順RT2(図6)を実行するようになされている。   By the way, the control unit 6 of the non-contact IC card 3 has interrupted the data writing process for writing new data due to, for example, the drive power supplied from the drive power generation unit 5 being cut off. In this case, when the supply of drive power from the drive power generation unit 5 is resumed, the correction processing procedure RT2 for correcting the logical / physical address storage area AR2 so that the data corresponding to the logical address “A” can be read correctly (FIG. 6). ) Has been made to perform.

すなわち非接触ICカード3の制御部6は、書換処理情報記憶領域AR3中の書換処理状況情報が論物アドレス書換処理を実行している最中である旨を表していた場合、論物アドレス書換処理を実行している最中にデータ書込処理を中断してしまったと判断し、修正処理手順RT2をステップSP21から開始する。   That is, if the rewrite processing status information in the rewrite processing information storage area AR3 indicates that the logical / physical address rewrite process is being executed, the control unit 6 of the non-contact IC card 3 rewrites the logical / physical address. It is determined that the data writing process has been interrupted while the process is being executed, and the correction processing procedure RT2 is started from step SP21.

ステップSP21において非接触ICカード3の制御部6は、例えば、書換処理情報記憶領域AR3に退避した物理アドレス「X」を認識した後、論物アドレス記憶領域AR2中の当該物理アドレス「X」に対応付けられている有効情報を参照し、当該参照した有効情報において有効なデータが記憶されている旨が表されているか否かを判断する。   In step SP21, for example, after recognizing the physical address “X” saved in the rewrite processing information storage area AR3, the control unit 6 of the non-contact IC card 3 sets the physical address “X” in the logical / physical address storage area AR2. With reference to the associated valid information, it is determined whether or not it is indicated that valid data is stored in the referenced valid information.

このステップSP21において否定結果が得られると、このことは、図3(B)に示すように有効情報において有効なデータが記憶されている旨が表されていないことから、ステップSP2の処理後ステップSP3の処理前にデータ書込処理を中断したことを意味しており、このとき非接触ICカード3の制御部6は、ステップSP22に移って論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を変更した後、終了ステップSP23に移って修正処理手順RT2を終了する。この結果非接触ICカード3の制御部6は、この後に論理アドレス「A」からデータを読み出すようにリーダライタ装置2から命令されると、これに応じて論物アドレス記憶領域AR2を参照することにより、論理アドレス「A」に対応付けられた物理アドレス「Y」を認識し、当該認識した物理アドレス「Y」のデータ記憶区域に記憶されている旧データを読み出すことができる。   If a negative result is obtained in this step SP21, this means that effective data is not stored in the valid information as shown in FIG. 3B, so that a post-processing step in step SP2 is performed. This means that the data writing process is interrupted before the processing of SP3, and at this time, the control unit 6 of the non-contact IC card 3 is not in the middle of executing the logical / physical address rewriting processing by moving to step SP22. After changing the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that, the process proceeds to an end step SP23, and the correction process procedure RT2 is ended. As a result, when the reader / writer device 2 instructs the controller 6 of the non-contact IC card 3 to read data from the logical address “A” thereafter, the controller 6 refers to the logical / physical address storage area AR2 accordingly. Thus, the physical address “Y” associated with the logical address “A” can be recognized, and the old data stored in the data storage area of the recognized physical address “Y” can be read.

これに対してステップSP21において肯定結果が得られると、このことは、図4(C)や(D)に示すように有効情報において有効なデータが記憶されている旨が表されていることから、ステップSP3の処理後にデータ書込処理を中断したことを意味しており、このとき非接触ICカード3の制御部6はステップSP24に移って、この有効情報を有効なデータが記憶されていない旨を表すように書き換える。   On the other hand, if a positive result is obtained in step SP21, this indicates that valid data is stored in the valid information as shown in FIGS. 4C and 4D. This means that the data writing process is interrupted after the process of step SP3. At this time, the control unit 6 of the non-contact IC card 3 moves to step SP24, and this valid information is not stored with valid data. Rewrite to indicate the effect.

次いで非接触ICカード3の制御部6はステップSP25に移り、当該書き換えた有効情報に対応付けられている論理アドレス「A」と同じ論理アドレス「A」を論物アドレス記憶領域AR2中から走査処理により検出し、当該検出した論理アドレス「A」に対応付けられている有効情報において有効なデータが記憶されている旨が表されているか否かを判断する。   Next, the control unit 6 of the non-contact IC card 3 moves to step SP25, and scans the logical address “A” that is the same as the logical address “A” associated with the rewritten valid information from the logical / physical address storage area AR2. And it is determined whether or not valid data associated with the detected logical address “A” indicates that valid data is stored.

このステップSP25において肯定結果が得られると、このことは、図4(C)に示すように、かかる有効情報において有効なデータが記憶されている旨が表されていることから、ステップSP3の処理後ステップSP4の処理前にデータ書込処理を中断したことを意味しており、このとき非接触ICカード3の制御部6は、ステップSP22に移って論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えた後、終了ステップSP23に移って修正処理手順RT2を終了する。この結果非接触ICカード3の制御部6は、この後に論理アドレス「A」からデータを読み出すようにリーダライタ装置2から命令されると、これに応じて論物アドレス記憶領域AR2を参照することにより論理アドレス「A」に対応付けられた物理アドレス「Y」を認識し、当該認識した物理アドレス「Y」のデータ記憶区域に記憶されている旧データを読み出すことができる。   If a positive result is obtained in step SP25, this means that valid data is stored in the valid information as shown in FIG. 4C. This means that the data writing process is interrupted before the process of the subsequent step SP4. At this time, the control unit 6 of the non-contact IC card 3 moves to step SP22 and executes the logical / physical address rewriting process. After rewriting the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that it is not in the middle, the process proceeds to an end step SP23 to end the correction process procedure RT2. As a result, when the reader / writer device 2 instructs the controller 6 of the non-contact IC card 3 to read data from the logical address “A” thereafter, the controller 6 refers to the logical / physical address storage area AR2 accordingly. Thus, the physical address “Y” associated with the logical address “A” can be recognized, and the old data stored in the data storage area of the recognized physical address “Y” can be read.

これに対してステップSP25において否定結果が得られると、このことは、図4(D)に示すように、かかる有効情報において有効なデータが記憶されている旨が表されていないことから、ステップSP4の処理後ステップSP5の処理前にデータ書込処理を中断したことを意味しており、このとき非接触ICカード3の制御部6はステップSP26に進んで、この有効情報を有効なデータが記憶されている旨を表すように書き換え、次いでステップSP22に移って論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えた後、終了ステップSP23に移って修正処理手順RT2を終了する。この結果非接触ICカード3の制御部6は、この後に論理アドレス「A」からデータを読み出すようにリーダライタ装置2から命令されると、これに応じて論物アドレス記憶領域AR2を参照することにより論理アドレス「A」に対応付けられた物理アドレス「Y」を認識し、当該認識した物理アドレス「Y」のデータ記憶区域に記憶されている旧データを読み出すことができる。   On the other hand, if a negative result is obtained in step SP25, this means that, as shown in FIG. 4D, it is not indicated that valid data is stored in the valid information. This means that the data writing process is interrupted after the process of SP4 and before the process of step SP5. At this time, the control unit 6 of the non-contact IC card 3 proceeds to step SP26, and this valid information is stored as valid data. The rewrite processing status information in the rewrite processing information storage area AR3 is rewritten so as to indicate that it is not in the middle of executing the logical / physical address rewriting processing. Thereafter, the process proceeds to an end step SP23 to end the correction processing procedure RT2. As a result, when the reader / writer device 2 instructs the controller 6 of the non-contact IC card 3 to read data from the logical address “A” thereafter, the controller 6 refers to the logical / physical address storage area AR2 accordingly. Thus, the physical address “Y” associated with the logical address “A” can be recognized, and the old data stored in the data storage area of the recognized physical address “Y” can be read.

このようにしてこの非接触ICカード3によれば、新データを書き込むデータ書込処理を中断したとしても、このデータ書込処理を実行する前の旧データを少なくとも保証することができる。   In this way, according to the non-contact IC card 3, even if the data writing process for writing new data is interrupted, at least the old data before executing this data writing process can be guaranteed.

(2)動作及び効果
以上の構成においてこの近接無線通信システム1は、近接されたリーダライタ装置2から電磁波を受信し当該受信した電磁波を整流することにより駆動電力を生成し当該生成した駆動電力によりデータ書込処理を実行する非接触ICカード3を有する。
(2) Operation and Effect In the above configuration, the close proximity wireless communication system 1 receives electromagnetic waves from the reader / writer device 2 that is in close proximity, generates drive power by rectifying the received electromagnetic waves, and generates the drive power using the generated drive power. It has a non-contact IC card 3 that executes data writing processing.

この非接触ICカード3の不揮発性メモリ9は、リーダライタ装置2からのデータが書き込まれるデータ記憶区域ごとにそのデータ記憶区域の物理的な位置を示す物理的位置情報(物理アドレス)が対応付けられてなるデータ記憶領域AR1を有する。またこの非接触ICカード3の不揮発性メモリ9は、リーダライタ装置2に対して論理的に認識させるデータ記憶区域の論理的位置情報(論理アドレス)とこの論理アドレスに対応するデータ記憶区域の物理アドレスとそのデータ記憶区域に対してリーダライタ装置2に読み出させる有効なデータが記憶されている旨又はそのデータ記憶区域に対して有効なデータが記憶されていない旨の何れかを表す有効情報とを対応付けて記憶する論物アドレス記憶領域AR2を有する。さらにこの非接触ICカード3の不揮発性メモリ9は、論物アドレス記憶領域AR2を書き換える論物アドレス書換処理を実行している最中である旨又は論物アドレス書換処理を実行している最中ではない旨の何れかを表す書換処理状況情報を記憶すると共に論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスが退避される書換処理情報記憶領域AR3を有する。   In the non-volatile memory 9 of the non-contact IC card 3, physical position information (physical address) indicating the physical position of the data storage area is associated with each data storage area in which data from the reader / writer device 2 is written. A data storage area AR1. In addition, the non-volatile memory 9 of the non-contact IC card 3 includes logical position information (logical address) of the data storage area that is logically recognized by the reader / writer device 2 and physical data of the data storage area corresponding to the logical address. Valid information indicating that valid data to be read by the reader / writer device 2 is stored for the address and its data storage area or that no valid data is stored for the data storage area And a logical / physical address storage area AR2. Further, the non-volatile memory 9 of the non-contact IC card 3 is in the middle of executing a logical / physical address rewriting process for rewriting the logical / physical address storage area AR2, or in the middle of executing a logical / physical address rewriting process. The rewrite processing information storage area AR3 is stored in which rewrite processing status information representing any of the above is stored and a physical address to which the corresponding logical address is rewritten by the logical / physical address rewrite processing is saved.

また非接触ICカード3の制御部6は、リーダライタ装置2から新データを論理アドレス「A」に対して書き込むように命令されると、当該命令された論理アドレス「A」に対応するデータ記憶区域に対して新データが記憶されるように当該新データを書き込むデータ書込処理を実行するようになされている。   When the control unit 6 of the non-contact IC card 3 is instructed to write new data to the logical address “A” from the reader / writer device 2, the data storage corresponding to the instructed logical address “A” is performed. A data writing process for writing the new data is executed so that the new data is stored in the area.

つまりこの非接触ICカード3の制御部6は、論物アドレス記憶領域AR2中の有効情報を順次参照する走査処理を実行することにより有効なデータが記憶されていない旨が表された有効情報を検出した後、当該検出した有効情報に対応付けられている物理アドレス「X」のデータ記憶区域に対して新データを書き込む。   In other words, the control unit 6 of the non-contact IC card 3 executes the scanning process for sequentially referring to the valid information in the logical / physical address storage area AR2, thereby obtaining valid information indicating that valid data is not stored. After detection, new data is written to the data storage area of the physical address “X” associated with the detected valid information.

次いで非接触ICカード3の制御部6は、論物アドレス書換処理を実行している最中である旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えると共に、新データを書き込んだデータ記憶区域の物理アドレス「X」を書換処理情報記憶領域AR3に退避させる。   Next, the control unit 6 of the non-contact IC card 3 rewrites the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that the logical / physical address rewrite process is being executed, and also updates the new data. The physical address “X” of the written data storage area is saved in the rewrite processing information storage area AR3.

続いて非接触ICカード3の制御部6は、論物アドレス記憶領域AR2において、新データを書き込んだデータ記憶区域の物理アドレス「X」に対応付けられた論理アドレスを、リーダライタ装置2から命令された論理アドレス「A」に書き換えると共に、この物理アドレス「X」に対応付けられている有効情報を、有効なデータが記憶されている旨を表すように書き換える。   Subsequently, the control unit 6 of the non-contact IC card 3 instructs the logical address associated with the physical address “X” of the data storage area in which the new data has been written from the reader / writer device 2 in the logical / physical address storage area AR2. The valid information associated with the physical address “X” is rewritten to indicate that valid data is stored.

そして非接触ICカード3の制御部6は、論物アドレス記憶領域AR2中の有効情報を順次参照する走査処理を実行することにより、新データを書き込んだデータ記憶区域の物理アドレス「X」に対応付けた論理アドレス「A」と同じ論理アドレス「A」を検出し、当該検出した論理アドレス「A」に対応付けられている有効情報を、有効なデータが記憶されていない旨を表すように書き換える。   Then, the control unit 6 of the non-contact IC card 3 corresponds to the physical address “X” of the data storage area in which the new data is written by executing a scanning process that sequentially refers to the valid information in the logical / physical address storage area AR2. The same logical address “A” as the attached logical address “A” is detected, and the valid information associated with the detected logical address “A” is rewritten to indicate that no valid data is stored. .

次いで非接触ICカード3の制御部6は、論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えた後、データ書込処理を終了する。   Next, the control unit 6 of the non-contact IC card 3 rewrites the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that the logical / physical address rewrite process is not being executed, and then writes the data End the process.

かくしてこの非接触ICカード3のデータ書込処理によれば、論物アドレス書換処理を実行する際に、新データを書き込んだデータ記憶区域の物理アドレス「X」のみを退避させておけば良いので、その分従来手法と比べてデータ書込処理時の書き込みデータ量を低減させることができ、この結果処理効率を格段と向上させることができる。   Thus, according to the data writing process of the non-contact IC card 3, when executing the logical / physical address rewriting process, it is only necessary to save only the physical address “X” of the data storage area where the new data is written. Therefore, compared with the conventional method, the amount of write data at the time of data write processing can be reduced, and as a result, the processing efficiency can be remarkably improved.

またこの非接触ICカード3の制御部6は、データ書込処理を中断してしまった場合このデータ書込処理の対象となっていたデータを読み出せるように論物アドレス記憶領域AR2を修正する修正処理を実行するようになされている。   In addition, when the data writing process is interrupted, the control unit 6 of the non-contact IC card 3 corrects the logical / physical address storage area AR2 so that the data that has been the target of the data writing process can be read. A correction process is executed.

すなわち非接触ICカード3の制御部6は、書換処理情報記憶領域AR3中の書換処理状況情報が論物アドレス書換処理を実行している最中である旨を表していた場合、書換処理情報記憶領域AR3に退避されている物理アドレス「X」を認識した後、論物アドレス記憶領域AR2中の当該物理アドレス「X」に対応付けられている有効情報を参照し、当該参照した有効情報において有効なデータが記憶されている旨が表されているか否かを判断する。   That is, when the rewrite processing status information in the rewrite processing information storage area AR3 indicates that the logical address rewrite process is being executed, the control unit 6 of the non-contact IC card 3 stores the rewrite process information storage. After recognizing the physical address “X” saved in the area AR3, the valid information associated with the physical address “X” in the logical / physical address storage area AR2 is referred to and valid in the referenced valid information. It is determined whether or not it is indicated that correct data is stored.

ここでこの非接触ICカード3の制御部6は、当該参照した有効情報において有効なデータが記憶されている旨が表されていない場合、論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えた後修正処理を終了し、これに対して当該参照した有効情報において有効なデータが記憶されている旨が表されている場合、当該参照した有効情報を有効なデータが記憶されていない旨を表すように書き換えると共に、当該書き換えた有効情報に対応付けられている論理アドレス「A」と同じ論理アドレス「A」を論物アドレス記憶領域AR2中から検出し、当該検出した論理アドレス「A」に対応付けられている有効情報において有効なデータが記憶されている旨が表されているか否かを判断する。   Here, the control unit 6 of the non-contact IC card 3 indicates that it is not in the middle of executing the logical / physical address rewriting process when it is not indicated that valid data is stored in the referenced valid information. After the rewrite processing status information in the rewrite processing information storage area AR3 is rewritten so as to represent the correction processing, the correction processing is terminated, and it is shown that valid data is stored in the referenced valid information. In this case, the referred valid information is rewritten so as to indicate that valid data is not stored, and the logical address “A” that is the same as the logical address “A” associated with the rewritten valid information is reconstituted. It is detected from the address storage area AR2 and indicates that valid data is stored in the valid information associated with the detected logical address “A”. Determines whether or not.

ここでこの非接触ICカード3の制御部6は、当該検出した論理アドレス「A」に対応付けられている有効情報において有効なデータが記憶されている旨が表されている場合、論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を変更した後修正処理を終了し、これに対して当該検出した論理アドレス「A」に対応付けられている有効情報において有効なデータが記憶されている旨が表されていない場合、この有効情報を有効なデータが記憶されている旨を表すように書き換えた後、論物アドレス書換処理を実行している最中でない旨を表すように書換処理情報記憶領域AR3中の書換処理状況情報を書き換えて修正処理を終了する。   Here, the control unit 6 of the non-contact IC card 3 indicates that the valid information associated with the detected logical address “A” indicates that valid data is stored. After changing the rewrite process status information in the rewrite process information storage area AR3 so as to indicate that the rewrite process is not being executed, the correction process is terminated, and the detected logical address “A” is changed to this. When it is not indicated that valid data is stored in the associated valid information, this valid information is rewritten to indicate that valid data is stored, and then a logical-physical address rewrite process is performed. The rewrite process status information in the rewrite process information storage area AR3 is rewritten so as to indicate that the process is not being executed, and the correction process is terminated.

かくしてこの非接触ICカード3の修正処理によれば、新データを書き込むデータ書込処理を中断したとしても、このデータ書込処理を実行する前の旧データを少なくとも保証することができる。   Thus, according to the correction process of the non-contact IC card 3, even if the data writing process for writing new data is interrupted, at least the old data before the data writing process is executed can be guaranteed.

以上の構成によれば、新データを書き込むデータ書込処理を中断したとしてもこのデータ書込処理を実行する前の旧データを少なくとも保証することができる上、処理効率を格段と向上させることができる。   According to the above configuration, even if the data writing process for writing new data is interrupted, at least the old data before executing this data writing process can be guaranteed, and the processing efficiency can be significantly improved. it can.

因みにこの非接触ICカード3のデータ書込処理によると、論物アドレス記憶領域AR2に対して走査処理を実行する分読み出しデータ量が増えてしまう。しかしながらEEPROM(Electrically Erasable and Programmable Read Only Memory)等の不揮発性メモリ9では、データを書き込む処理サイクル(例えば10[ms])よりもデータを読み出す処理サイクル(例えば70[ns])の方が格段と時間が短くて済むので、本実施の形態の構成により格段と処理効率を向上することができる。   Incidentally, according to the data writing process of the non-contact IC card 3, the amount of read data increases by executing the scanning process on the logical / address storage area AR2. However, in the nonvolatile memory 9 such as an EEPROM (Electrically Erasable and Programmable Read Only Memory), the processing cycle for reading data (for example, 70 [ns]) is much more remarkable than the processing cycle for writing data (for example, 10 [ms]). Since the time is short, the processing efficiency can be significantly improved by the configuration of the present embodiment.

(3)他の実施の形態
上述した実施の形態においては、データ書込処理によりデータが書き込まれるメモリとして、EEPROM等の不揮発性メモリ9を適用する場合について述べたが、本発明はこれに限らず、FeRAM(Ferroelectric Random Access Memory)やフラッシュメモリやハードディスクドライブ等のこの他種々の記憶装置を適用することができる。
(3) Other Embodiments In the above-described embodiments, the case where the nonvolatile memory 9 such as an EEPROM is applied as the memory into which data is written by the data writing process has been described. However, the present invention is not limited to this. First, various other storage devices such as FeRAM (Ferroelectric Random Access Memory), flash memory, and hard disk drive can be applied.

また上述した実施の形態においては、書換処理情報記憶領域AR3に対して、書換処理状況情報を記憶させると共に、論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスを退避させるようにしたが、本発明はこれに限らず、書換処理状況情報を記憶させる領域と、論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスを退避させる領域とを、別々に設けるようにしても良い。   In the above-described embodiment, the rewrite processing status information is stored in the rewrite processing information storage area AR3, and the physical address at which the corresponding logical address is rewritten by the logical / physical address rewrite processing is saved. The present invention is not limited to this, and an area for storing rewrite processing status information and an area for saving a physical address in which a corresponding logical address is rewritten by a logical / physical address rewrite process may be provided separately.

また上述した実施の形態においては、非接触ICカード3の制御部6が予めインストールされているプログラムに従って、データ書込処理手順RT1や修正処理手順RT2等をソフトウェア的に実行する場合について述べたが、本発明はこれに限らず、データ書込処理手順RT1や修正処理手順RT2等を実行するための回路を非接触ICカード3に設けることにより、これら処理手順RT1、RT2をハードウェア的に実行するようにしても良い。またデータ書込処理手順RT1や修正処理手順RT2等を実行するためのプログラムを、CD(Compact Disc)等の記録媒体に記録しておくようにしても良い。   In the above-described embodiment, the case has been described in which the control unit 6 of the non-contact IC card 3 executes the data writing processing procedure RT1, the correction processing procedure RT2, and the like in accordance with a program installed in advance. The present invention is not limited to this, and by providing a circuit for executing the data writing processing procedure RT1 and the correction processing procedure RT2 in the non-contact IC card 3, the processing procedures RT1 and RT2 are executed by hardware. You may make it do. A program for executing the data writing processing procedure RT1, the correction processing procedure RT2, and the like may be recorded on a recording medium such as a CD (Compact Disc).

本発明は、例えば、リーダライタ装置に対して近接された際当該近接されたリーダライタ装置から送信されたデータを受信してこれを内部のメモリに書き込むデータ書込処理を実行する非接触ICカード等に利用することができる。   The present invention provides, for example, a non-contact IC card that executes data writing processing for receiving data transmitted from a reader / writer device that is close to the reader / writer device and writing the data to an internal memory. Etc. can be used.

近接無線通信システムの構成を示す略線図である。It is a basic diagram which shows the structure of a near field communication system. 本実施の形態による非接触ICカードの構成を示す略線図である。It is a basic diagram which shows the structure of the non-contact IC card by this Embodiment. データ書込処理の説明に供する略線図である。It is an approximate line figure used for explanation of data writing processing. データ書込処理の説明に供する略線図である。It is an approximate line figure used for explanation of data writing processing. データ書込処理手順を示すフローチャートである。It is a flowchart which shows a data writing process procedure. 修正処理手順を示すフローチャートである。It is a flowchart which shows a correction process procedure. 従来手法によるデータ書込処理の説明に供する略線図である。It is a basic diagram with which it uses for description of the data writing process by a conventional method. 従来手法によるデータ書込処理の説明に供する略線図である。It is a basic diagram with which it uses for description of the data writing process by a conventional method.

符号の説明Explanation of symbols

1……近接無線通信システム、2……リーダライタ装置、3……非接触ICカード、6……制御部、9……不揮発性メモリ、AR1……データ記憶領域、AR2……論物アドレス記憶領域、AR3……書換処理情報記憶領域、RT1……データ書込処理手順、RT2……修正処理手順。
DESCRIPTION OF SYMBOLS 1 ... Proximity wireless communication system, 2 ... Reader / writer apparatus, 3 ... Non-contact IC card, 6 ... Control part, 9 ... Nonvolatile memory, AR1 ... Data storage area, AR2 ... Logical address storage Area, AR3... Rewrite processing information storage area, RT1... Data write processing procedure, RT2.

Claims (3)

データが書き込まれるデータ記憶区域ごとにそのデータ記憶区域の物理的位置を示す物理アドレスが対応付けられてなるデータ記憶領域と、データ記憶区域の論理的位置を示す論理アドレスとその論理アドレスに対応するデータ記憶区域の物理アドレスとそのデータ記憶区域に対して有効データが記憶されている旨又はそのデータ記憶区域に対して有効データが記憶されていない旨の何れかを表す有効情報とを対応付けて記憶する論物アドレス記憶領域と、上記論物アドレス記憶領域を書き換える論物アドレス書換処理の実行中である旨又は上記論物アドレス書換処理の実行中ではない旨の何れかを表す書換処理状況情報を記憶すると共に上記論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスが退避される書換処理情報記憶領域とを有するメモリと、
外部から命令された論理アドレスに対応するデータ記憶区域に対してデータが記憶されるように当該データを書き込むデータ書込処理を実行する書込処理部と、
を具え、
上記データ書込処理では、
上記論物アドレス記憶領域に記憶された有効情報の中から有効データが記憶されていない旨が表された有効情報を検出し当該検出した有効情報に対応付けられている物理アドレスのデータ記憶区域に対してデータを書き込み、上記論物アドレス書換処理の実行中である旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換えると共に当該データを書き込んだデータ記憶区域の物理アドレスを上記書換処理情報記憶領域に退避させ、当該データを書き込んだデータ記憶区域の物理アドレスに対応付けられた論理アドレスを外部から命令された論理アドレスに書き換えると共に当該物理アドレスに対応付けられている有効情報を有効データが記憶されている旨を表すように書き換え、上記論物アドレス記憶領域の中から当該物理アドレスに対応付けた論理アドレスと同じ論理アドレスを検出し当該検出した論理アドレスに対応付けられている有効情報を有効データが記憶されていない旨を表すように書き換え、上記論物アドレス書換処理の実行中ではない旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換える
ことを特徴とする記憶装置。
Corresponding to a data storage area in which a physical address indicating a physical position of the data storage area is associated with each data storage area to which data is written, a logical address indicating a logical position of the data storage area, and the logical address Associating the physical address of the data storage area with valid information indicating that valid data is stored in the data storage area or that no valid data is stored in the data storage area The logical / physical address storage area to be stored, and the rewrite processing status information indicating whether the logical / physical address rewriting process for rewriting the logical / physical address storage area is being executed or that the logical / physical address rewriting process is not being executed. And the physical address where the corresponding logical address is rewritten by the above-mentioned logical address rewriting process is saved. A memory and a processing information storage area,
A write processing unit for executing a data writing process for writing the data so that the data is stored in a data storage area corresponding to the logical address instructed from the outside;
With
In the above data writing process,
Valid information indicating that valid data is not stored is detected from the valid information stored in the logical / physical address storage area, and is stored in the data storage area of the physical address associated with the detected valid information. On the other hand, the data is written, the rewrite processing status information in the rewrite processing information storage area is rewritten so as to indicate that the logical / physical address rewrite processing is being executed, and the physical address of the data storage area in which the data is written is The logical address associated with the physical address of the data storage area in which the data is written is saved to the rewrite processing information storage area, and the valid information associated with the physical address is rewritten to the logical address instructed from the outside. Rewrite to indicate that valid data is stored, and store the relevant data from the above logical / physical address storage area. Detect the same logical address as the logical address associated with the address, rewrite the valid information associated with the detected logical address to indicate that no valid data is stored, and execute the above logical address rewriting process A rewrite processing status information in the rewrite processing information storage area is rewritten to indicate that it is not in the storage device.
上記データ書込処理を中断した場合上記データ書込処理の対象となっていたデータを読み出せるように上記論物アドレス記憶領域を修正する修正処理を実行する修正処理部を具え、
上記修正処理では、
上記書換処理情報記憶領域中の書換処理状況情報が上記論物アドレス書換処理の実行中である旨を表していた場合上記書換処理情報記憶領域に退避されている物理アドレスを認識した後上記論物アドレス記憶領域において当該認識した物理アドレスに対応付けられている有効情報を参照し当該参照した有効情報において有効データが記憶されている旨が表されているか否かを判断し、当該参照した有効情報において有効データが記憶されている旨が表されていない場合上記論物アドレス書換処理の実行中ではない旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換えた後上記修正処理を終了し、これに対して当該参照した有効情報において有効データが記憶されている旨が表されている場合当該参照した有効情報を有効データが記憶されていない旨を表すように書き換えると共に当該書き換えた有効情報に対応付けられている論理アドレスと同じ論理アドレスを上記論物アドレス記憶領域中から検出し当該検出した論理アドレスに対応付けられている有効情報において有効データが記憶されている旨が表されているか否かを判断し、当該対応付けられている有効情報において有効データが記憶されている旨が表されている場合上記論物アドレス書換処理の実行中でない旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換えた後上記修正処理を終了し、これに対して当該対応付けられている有効情報において有効データが記憶されている旨が表されていない場合当該対応付けられている有効情報を有効データが記憶されている旨を表すように書き換えた後上記論物アドレス書換処理の実行中でない旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換えて上記修正処理を終了する
ことを特徴とする請求項1に記載の記憶装置。
When the data writing process is interrupted, a correction processing unit that executes a correction process for correcting the logical-physical address storage area so that the data that has been the target of the data writing process can be read,
In the above correction process,
When the rewrite processing status information in the rewrite processing information storage area indicates that the logical / physical address rewrite process is being executed, the logical object is recognized after recognizing the physical address saved in the rewrite processing information storage area. Refers to valid information associated with the recognized physical address in the address storage area, determines whether or not valid data is stored in the referenced valid information, and refers to the valid information If it is not indicated that valid data is stored in the above, the correction process is performed after rewriting the rewrite process status information in the rewrite process information storage area so as to indicate that the logical / physical address rewrite process is not being executed. If the reference valid information indicates that valid data is stored, the valid information referred to is valid. Data is rewritten to indicate that the data is not stored, and the same logical address as that associated with the rewritten valid information is detected from the logical / physical address storage area and associated with the detected logical address. When it is determined whether or not valid data is stored in the associated valid information, and the fact that valid data is stored is represented in the associated valid information The rewrite processing status information in the rewrite processing information storage area is rewritten so as to indicate that the physical address rewrite processing is not being executed, and then the correction processing is terminated, and this is valid in the associated valid information. If the fact that the data is stored is not represented, the associated valid information indicates that the valid data is stored The rewrite processing status information in the rewrite processing information storage area is rewritten to indicate that the logical / physical address rewrite processing is not being executed after rewriting, and the correction processing is terminated. Storage device.
データが書き込まれるデータ記憶区域ごとにそのデータ記憶区域の物理的位置を示す物理アドレスが対応付けられてなるデータ記憶領域と、データ記憶区域の論理的位置を示す論理アドレスとその論理アドレスに対応するデータ記憶区域の物理アドレスとそのデータ記憶区域に対して有効データが記憶されている旨又はそのデータ記憶区域に対して有効データが記憶されていない旨の何れかを表す有効情報とを対応付けて記憶する論物アドレス記憶領域と、上記論物アドレス記憶領域を書き換える論物アドレス書換処理の実行中である旨又は上記論物アドレス書換処理の実行中ではない旨の何れかを表す書換処理状況情報を記憶すると共に上記論物アドレス書換処理により対応する論理アドレスが書き換えられる物理アドレスが退避される書換処理情報記憶領域とを有するメモリと、
外部から命令された論理アドレスに対応するデータ記憶区域に対してデータが記憶されるように当該データを書き込むデータ書込処理を実行する書込処理部と
を具える記憶装置のデータ書込処理方法であって、
上記論物アドレス記憶領域に記憶された有効情報の中から有効データが記憶されていない旨が表された有効情報を検出し当該検出した有効情報に対応付けられている物理アドレスのデータ記憶区域に対してデータを書き込み、上記論物アドレス書換処理の実行中である旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換えると共に当該データを書き込んだデータ記憶区域の物理アドレスを上記書換処理情報記憶領域に退避させ、当該データを書き込んだデータ記憶区域の物理アドレスに対応付けられた論理アドレスを外部から命令された論理アドレスに書き換えると共に当該物理アドレスに対応付けられている有効情報を有効データが記憶されている旨を表すように書き換え、上記論物アドレス記憶領域の中から当該物理アドレスに対応付けた論理アドレスと同じ論理アドレスを検出し当該検出した論理アドレスに対応付けられている有効情報を有効データが記憶されていない旨を表すように書き換え、上記論物アドレス書換処理の実行中ではない旨を表すように上記書換処理情報記憶領域中の書換処理状況情報を書き換える
ことを特徴とするデータ書込処理方法。
Corresponding to a data storage area in which a physical address indicating a physical position of the data storage area is associated with each data storage area to which data is written, a logical address indicating a logical position of the data storage area, and the logical address Associating the physical address of the data storage area with valid information indicating that valid data is stored in the data storage area or that no valid data is stored in the data storage area The logical / physical address storage area to be stored, and the rewrite processing status information indicating whether the logical / physical address rewriting process for rewriting the logical / physical address storage area is being executed or that the logical / physical address rewriting process is not being executed. And the physical address where the corresponding logical address is rewritten by the above-mentioned logical address rewriting process is saved. A memory and a processing information storage area,
A data write processing method for a storage device, comprising: a write processing unit that executes a data write process for writing the data so that the data is stored in a data storage area corresponding to a logical address instructed from outside Because
Valid information indicating that valid data is not stored is detected from the valid information stored in the logical / physical address storage area, and is stored in the data storage area of the physical address associated with the detected valid information. On the other hand, the data is written, the rewrite processing status information in the rewrite processing information storage area is rewritten so as to indicate that the logical / physical address rewrite processing is being executed, and the physical address of the data storage area in which the data is written is The logical address associated with the physical address of the data storage area in which the data is written is saved to the rewrite processing information storage area, and the valid information associated with the physical address is rewritten to the logical address instructed from the outside. Rewrite to indicate that valid data is stored, and store the relevant data from the above logical / physical address storage area. Detect the same logical address as the logical address associated with the address, rewrite the valid information associated with the detected logical address to indicate that no valid data is stored, and execute the above logical address rewriting process A rewrite processing status information in the rewrite processing information storage area is rewritten so as to indicate that it is not in the data write processing method.
JP2005180913A 2005-06-21 2005-06-21 Storage device and data write processing method thereof Expired - Fee Related JP4725779B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005180913A JP4725779B2 (en) 2005-06-21 2005-06-21 Storage device and data write processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005180913A JP4725779B2 (en) 2005-06-21 2005-06-21 Storage device and data write processing method thereof

Publications (2)

Publication Number Publication Date
JP2007004284A true JP2007004284A (en) 2007-01-11
JP4725779B2 JP4725779B2 (en) 2011-07-13

Family

ID=37689876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005180913A Expired - Fee Related JP4725779B2 (en) 2005-06-21 2005-06-21 Storage device and data write processing method thereof

Country Status (1)

Country Link
JP (1) JP4725779B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7890838B2 (en) 2008-12-19 2011-02-15 Kabushiki Kaisha Toshiba Storage apparatus having nonvolatile storage module

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005928A (en) * 1999-06-17 2001-01-12 Hitachi Maxell Ltd Ic card
JP2004127185A (en) * 2002-10-07 2004-04-22 Renesas Technology Corp Memory card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005928A (en) * 1999-06-17 2001-01-12 Hitachi Maxell Ltd Ic card
JP2004127185A (en) * 2002-10-07 2004-04-22 Renesas Technology Corp Memory card

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7890838B2 (en) 2008-12-19 2011-02-15 Kabushiki Kaisha Toshiba Storage apparatus having nonvolatile storage module

Also Published As

Publication number Publication date
JP4725779B2 (en) 2011-07-13

Similar Documents

Publication Publication Date Title
US8041879B2 (en) Flash memory backup system and method
KR101613678B1 (en) Recovery for non-volatile memory after power loss
US10475516B2 (en) Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method
CN103324443A (en) Storage control apparatus, storage apparatus, information processing system and processing method therefor
JP4237209B2 (en) Data storage device, memory management method, and program
US7519764B2 (en) Apparatus and method for detecting data validity in flash memory
JP2007080474A (en) Method for operating flash memory chip
US7809878B2 (en) Apparatus and method for controlling flash memory
KR100704618B1 (en) Data recovery device and method thereof
US20160124650A1 (en) Data Storage Device and Flash Memory Control Method
US7073015B2 (en) Information storage apparatus
JP4725779B2 (en) Storage device and data write processing method thereof
CN108228095B (en) Method for recording real-time information based on Flash
JP2007052558A (en) Flash memory rewrite device, flash memory rewrite method and flash memory rewrite program
JP2002288999A (en) Semiconductor memory
KR20070048384A (en) Method of processing bad block in memory map
JP6233134B2 (en) Electronic information storage medium, information processing method, and information processing program
CN109426443B (en) Memory control apparatus and method
US20110125933A1 (en) Removeable medium, formatting device, formatting system, formatting method, and formatting program
JP2005531842A (en) Non-volatile memory writing method and system for realizing the method
US20060200617A1 (en) Nonvolatile memory, mapping control apparatus and method of the same
JP2007280330A (en) Nonvolatile storage device and nonvolatile storage system
JPH09259046A (en) Method for storing data in flash memory and method for reading data out of flash memory
JP2000243093A (en) Data storing method for flash memory and data reading out method from flash memory
JP2008293426A (en) Information processor and its data recording method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110224

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110317

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110330

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140422

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees