JP2015166990A - Ic chip, command execution method and program for ic chip - Google Patents

Ic chip, command execution method and program for ic chip Download PDF

Info

Publication number
JP2015166990A
JP2015166990A JP2014041711A JP2014041711A JP2015166990A JP 2015166990 A JP2015166990 A JP 2015166990A JP 2014041711 A JP2014041711 A JP 2014041711A JP 2014041711 A JP2014041711 A JP 2014041711A JP 2015166990 A JP2015166990 A JP 2015166990A
Authority
JP
Japan
Prior art keywords
data
command
interface
predetermined area
nonvolatile memory
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
JP2014041711A
Other languages
Japanese (ja)
Other versions
JP6307938B2 (en
Inventor
隆史 工藤
Takashi Kudo
隆史 工藤
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2014041711A priority Critical patent/JP6307938B2/en
Publication of JP2015166990A publication Critical patent/JP2015166990A/en
Application granted granted Critical
Publication of JP6307938B2 publication Critical patent/JP6307938B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an IC chip, a command execution method and a program for an IC chip, capable of further reducing processing time required from receiving a command to responding thereto.SOLUTION: When a command is received through a specific IF, write-processing to a NVM 13d is not executed while processing the command, but instead, is executed thereafter when a command is received through an IF other than the specific IF.

Description

本発明は、ICチップに関し、特に、ICチップが備える不揮発性メモリにデータを書き込む技術に関する。   The present invention relates to an IC chip, and more particularly to a technique for writing data in a nonvolatile memory included in the IC chip.

近年、携帯端末を用いた非接触通信での決済サービスが提供されている。決済時には、携帯端末が決済端末に翳されることで、携帯端末と決済端末は、コマンド(コマンドデータ)とレスポンス(レスポンスデータ)を送受信し、決済に必要な処理を行う。このような携帯端末には、例えば、SIM(Subscriber Identity Module)カードといったセキュアエレメントと呼ばれるICチップ(ICモジュール)が組み込まれている。セキュアエレメントは、2つのインターフェース(IF)をもつ。それぞれのインターフェースは、携帯端末に搭載されるコントローラとの接触通信用(例えば、ISO/IEC7816規格に基づく)、外部端末との非接触通信用(例えば、ISO/IEC 14443規格に基づく)といった用途で使用される。セキュアエレメントは、それぞれのインターフェースを介して、外部端末や携帯端末のコントローラから受信したコマンドに応じた処理を実行し、その結果をレスポンスとして応答する。   In recent years, settlement services using non-contact communication using mobile terminals have been provided. At the time of payment, the mobile terminal is deceived as a payment terminal, so that the mobile terminal and the payment terminal transmit / receive a command (command data) and a response (response data) and perform processing necessary for payment. Such a portable terminal incorporates an IC chip (IC module) called a secure element such as a SIM (Subscriber Identity Module) card. The secure element has two interfaces (IF). Each interface is used for contact communication with a controller mounted on a portable terminal (for example, based on ISO / IEC7816 standard) and non-contact communication with an external terminal (for example, based on ISO / IEC 14443 standard). used. The secure element executes processing according to a command received from the controller of the external terminal or the mobile terminal via each interface, and responds with the result as a response.

上述した決済サービスにおいて、セキュアエレメントは、受信したコマンドに応じた処理を実行するが、その処理時間が取引全体にかかる時間の多くを占めている。そのセキュアエレメント内での処理には、暗号演算処理や不揮発性メモリへの書き込み処理が含まれる。非接触での決済サービスでは、コマンドの受信から応答までにかかる処理時間を短縮することが要求されるため、暗号演算処理や不揮発性メモリへの書き込み処理がボトルネックとなる問題がある。不揮発性メモリへの書き込み処理を短縮する技術として、不揮発性メモリへの書き込み処理をキャッシングする技術が知られている(例えば、特許文献1及び特許文献2参照)。この技術では、書き込みたい複数のデータを一つにまとめるなどして、不揮発性メモリへの書き込み回数を減らすことで、上記処理時間を短縮させている。   In the payment service described above, the secure element executes processing according to the received command, and the processing time occupies much of the time required for the entire transaction. The processing within the secure element includes cryptographic calculation processing and writing processing to the nonvolatile memory. In the non-contact payment service, it is required to shorten the processing time from the reception of a command to the response, so that there is a problem that the cryptographic calculation processing and the writing processing to the nonvolatile memory become a bottleneck. As a technique for shortening the writing process to the nonvolatile memory, a technique for caching the writing process to the nonvolatile memory is known (see, for example, Patent Document 1 and Patent Document 2). In this technique, the processing time is shortened by reducing the number of times of writing to the nonvolatile memory by combining a plurality of data to be written into one.

特開2001−147855号公報JP 2001-147855 A 特開2007−034434号公報JP 2007-034344 A

しかしながら、従来技術のように不揮発性メモリへの書き込み回数を減らす方法では限界があり、更なる処理時間の短縮が望まれている。   However, there is a limit to the method of reducing the number of times of writing to the nonvolatile memory as in the prior art, and further reduction of the processing time is desired.

そこで、本発明は、このような点に鑑みてなされたものであり、コマンドの受信から応答までにかかる処理時間を、より一層、短縮することが可能なICチップ、コマンド実行方法、及びICチップ用プログラムを提供することを課題とする。   Therefore, the present invention has been made in view of such a point, and an IC chip, a command execution method, and an IC chip that can further reduce the processing time from reception of a command to a response. It is an object to provide a program for use.

上記課題を解決するために、請求項1に記載の発明は、外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップであって、前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信する受信手段と、前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定する判定手段と、前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新する更新手段と、前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む書き込み手段と、を備えることを特徴とする。   In order to solve the above-described problem, an invention according to claim 1 is an IC chip including a plurality of interfaces for performing communication with the outside, a cache memory, and a nonvolatile memory, wherein the cache A command for executing at least a process of updating data in a predetermined area in the memory and writing the data in the predetermined area including the updated data to the nonvolatile memory, wherein any one of the interfaces from the outside Receiving means for receiving the command via the interface, determining means for determining whether or not the interface from which the command is received is a specific interface, and a predetermined area in the cache memory according to the received command Updating means for updating the data, and the determination means If it is determined that the interface is not the specific interface, the update is not performed while the data in the predetermined area including the data updated by the update unit is not written to the nonvolatile memory. And writing means for writing the data in the predetermined area including the data updated by the means into the non-volatile memory.

請求項2に記載の発明は、請求項1に記載のICチップにおいて、前記書き込み手段は、前記コマンドが受信されたときに前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新された第1のデータを含む前記所定領域のデータを不揮発性メモリに書き込まず、その後に、次の前記コマンドが受信されたときに前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新された第2のデータ及び前記第1のデータを含む前記所定領域のデータを前記不揮発性メモリに書き込むことを特徴とする。   According to a second aspect of the present invention, in the IC chip according to the first aspect, when the writing unit determines that the specific interface is the specific interface when the command is received, the update is performed. The data in the predetermined area including the first data updated by the means is not written to the nonvolatile memory, and then, when the next command is received, it is determined that the specific interface is not the specific interface. In this case, the second data updated by the updating unit and the data in the predetermined area including the first data are written in the nonvolatile memory.

請求項3に記載の発明は、請求項1または請求項2に記載のICチップにおいて、前記判定手段は、前記複数のインターフェースが利用設定されているか否かを判定し、前記利用設定されていると判定した場合に限り、前記特定のインターフェースであるか否かを判定することを特徴とする。   According to a third aspect of the present invention, in the IC chip according to the first or second aspect, the determination unit determines whether or not the plurality of interfaces are set for use, and the use is set. Only when it is determined, it is determined whether or not the interface is the specific interface.

請求項4に記載の発明は、外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップにおけるコンピュータを、前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信する受信手段と、前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定する判定手段と、前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新する更新手段と、前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む書き込み手段として機能させることを特徴とする。   According to a fourth aspect of the present invention, a computer in an IC chip including a plurality of interfaces for communicating with the outside, a cache memory, and a nonvolatile memory is updated, and data in a predetermined area in the cache memory is updated. And a command for executing at least a process of writing the data in the predetermined area including the updated data to the nonvolatile memory, and receiving the command from the outside via any of the interfaces Receiving means; determining means for determining whether or not the interface from which the command is received is a specific interface; and updating means for updating data in a predetermined area in the cache memory in accordance with the received command The specific interface is determined by the determination means. If the determination means determines that the data is not in the specific interface, the update means updates the data in the predetermined area including the data updated by the update means. The data of the predetermined area including the processed data is made to function as a writing means for writing to the nonvolatile memory.

請求項5に記載の発明は、外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップにおけるコマンド実行方法であって、前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信するステップと、前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定するステップと、前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新するステップと、前記特定のインターフェースであると判定された場合、前記更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記特定のインターフェースでないと判定された場合、前記更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込むステップと、を含むことを特徴とする。   The invention according to claim 5 is a command execution method in an IC chip comprising a plurality of interfaces for performing communication with the outside, a cache memory, and a nonvolatile memory, and a predetermined area in the cache memory Is a command for executing at least a process of updating the data of the predetermined area and writing the data of the predetermined area including the updated data to the nonvolatile memory, and the command from the outside via any of the interfaces Receiving a command; determining whether an interface from which the command is received is a specific interface; and updating data in a predetermined area in the cache memory according to the received command. And determine that it is the specific interface If it is determined that the data is not in the specific interface, the data in the predetermined area including the updated data is not written to the nonvolatile memory. And writing to the non-volatile memory.

本発明によれば、コマンドの受信から応答までにかかる処理時間を、より一層、短縮することができる。   According to the present invention, it is possible to further reduce the processing time required from the reception of a command to the response.

ICカード1の概要構成例を示す図である。1 is a diagram illustrating a schematic configuration example of an IC card 1. FIG. (A)は、SE13のハードウェア構成例を示すブロック図であり、(B)は、SE13の機能構成例を示すブロック図である。(A) is a block diagram showing a hardware configuration example of SE13, and (B) is a block diagram showing a functional configuration example of SE13. 図3は、SE13がコマンドを受信したときのコマンド処理の一例を示すフローチャートである。FIG. 3 is a flowchart illustrating an example of command processing when the SE 13 receives a command.

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、携帯端末に対して本発明を適用した場合の実施の形態である。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment when the present invention is applied to a mobile terminal.

先ず、図1を参照して、本実施形態に係る携帯端末の構成及び機能概要について説明する。図1は、本実施形態に係る携帯端末の概要構成例を示すブロック図である。図1に示すように、携帯端末Tは、携帯端末Tの機能を担うコントローラ11、CLF(ContactLess Front-end)12、SE(Secure Element)13、及び電池14等を備えて構成されている。なお、携帯端末Tには、例えば操作キー、ディスプレイ、スピーカ、及び移動体通信部等を備える携帯電話機やスマートフォン等を適用できる。また、SE13は、本発明のICチップの一例である。SE13は、携帯端末Tの回路基板上に直接組み込んで構成するようにしてもよい。電池14は、コントローラ11等に電力を供給する。   First, with reference to FIG. 1, the configuration and functional overview of the mobile terminal according to the present embodiment will be described. FIG. 1 is a block diagram illustrating a schematic configuration example of a mobile terminal according to the present embodiment. As shown in FIG. 1, the mobile terminal T includes a controller 11 responsible for the function of the mobile terminal T, a CLF (Contact Less Front-end) 12, an SE (Secure Element) 13, a battery 14, and the like. Note that, for example, a mobile phone or a smartphone including an operation key, a display, a speaker, and a mobile communication unit can be applied to the mobile terminal T. SE13 is an example of the IC chip of the present invention. The SE 13 may be configured by being directly incorporated on the circuit board of the portable terminal T. The battery 14 supplies power to the controller 11 and the like.

コントローラ11は、図示しないが、CPU(Central Processing Unit)、各種プログラム及びデータを記憶する不揮発性メモリ(例えばフラッシュメモリ等)、データを一時記憶するRAM、及び、SE13との間のインターフェースを担うI/Oポート等を備えている。コントローラ11は、SE13との間でI/Oポートを介して通信を行う。そして、コントローラ11は、携帯端末Tの通信(移動体通信網やインターネットを介して行われる通信)処理や携帯端末Tのユーザからの操作キーを介した操作指示に応じて各種処理を実行する。このような処理の中で、コントローラ11は、例えば暗号化処理や認証処理等に係るコマンドをI/Oポートを介してSE13へ送信する。   Although not shown, the controller 11 is a CPU (Central Processing Unit), a non-volatile memory (such as a flash memory) that stores various programs and data, a RAM that temporarily stores data, and an I that serves as an interface with the SE 13. / O port etc. The controller 11 communicates with the SE 13 via the I / O port. And the controller 11 performs various processes according to the communication (communication performed via a mobile communication network or the internet) process of the portable terminal T, or the operation instruction from the user of the portable terminal T via the operation key. In such processing, the controller 11 transmits a command related to, for example, encryption processing or authentication processing to the SE 13 via the I / O port.

CLF12は、NFC(Near Field Communication)の規格で規定される非接触通信(近距離無線通信)用のLSIモジュールであり、SE13との間のインターフェースを担うI/Oポート(SWIO)、及び非接触のフィールド内で非接触リーダライタR/Wとの間で各種信号の送受信を行うためのアンテナ12aに接続されている。そして、ユーザが携帯端末Tを非接触リーダライタR/Wに翳すと、非接触リーダライタR/Wからアンテナ12aを介して受信したコマンドをI/Oポートを介してSE13へ送信する。   The CLF 12 is an LSI module for non-contact communication (near field communication) defined by the NFC (Near Field Communication) standard, and an I / O port (SWIO) that performs an interface with the SE 13 and non-contact Are connected to an antenna 12a for transmitting / receiving various signals to / from the non-contact reader / writer R / W. When the user places the portable terminal T over the contactless reader / writer R / W, the command received from the contactless reader / writer R / W via the antenna 12a is transmitted to the SE 13 via the I / O port.

SE13は、例えば、SIM(Subscriber Identity Module)をベースに機能を拡張されたUIM(User Identity Module)である。図2(A)は、SE13のハードウェア構成例を示すブロック図であり、図2(B)は、SE13の機能構成例を示すブロック図である。図2(A)に示すように、SE13は、CPU13a、ROM(Read Only Memory)13b、RAM(Random Access Memory)13c、NVM(Nonvolatile Memory)13d、及び外部(SE13の外部)との間で通信を行うための複数のIF(インターフェース)1〜IFn等を備えている。SE13は、例えばIF1を介してコントローラ11との間で通信を行う。また、SE13は、例えばIF2を介してCLF12との間で通信を行う。CLF12とSE13間の通信プロトコルには、例えば、SWP(Single Wire Protocol)が適用される。なお、SE13は、図示しないが、例えば、ISO/IEC7816等によって定められた、C1〜C8の8個の端子を有する。このうち、例えば、C7端子は、コントローラ11との間のIF1を担う端子であり、C6端子は、CLF12との間のIF2を担う端子である。なお、IFの数は、特に限定されるものではなく、3つ以上のIFが備えられる場合も本発明を適用することができる。   The SE 13 is a UIM (User Identity Module) whose functions are expanded based on, for example, a SIM (Subscriber Identity Module). FIG. 2A is a block diagram illustrating a hardware configuration example of SE13, and FIG. 2B is a block diagram illustrating a functional configuration example of SE13. As shown in FIG. 2A, the SE 13 communicates with the CPU 13a, ROM (Read Only Memory) 13b, RAM (Random Access Memory) 13c, NVM (Nonvolatile Memory) 13d, and the outside (outside of the SE 13). Are provided with a plurality of IFs (interfaces) 1 to IFn. The SE 13 communicates with the controller 11 via, for example, IF1. The SE 13 communicates with the CLF 12 via, for example, IF2. For example, SWP (Single Wire Protocol) is applied as a communication protocol between the CLF 12 and the SE 13. Although not shown, the SE 13 has eight terminals C1 to C8 defined by, for example, ISO / IEC7816. Among these, for example, the C7 terminal is a terminal that bears IF1 with the controller 11, and the C6 terminal is a terminal that bears IF2 with the CLF12. The number of IFs is not particularly limited, and the present invention can also be applied when three or more IFs are provided.

RAM13cは、NVM13dへの書き込み処理をキャッシングするためのキャッシュメモリである。RAM13cには、図2(B)に示すように、データを一時的に保持するためのキャッシュデータ保持領域105(所定領域の一例)が設けられる。NVM13dは、フラッシュメモリ、または「Electrically Erasable Programmable Read-Only Memory」等の不揮発性メモリである。NVM13dには、図2(B)に示すように、キャッシュデータ保持領域105のデータを保持するための更新対象データ保持領域106(キャッシュデータ保持領域105に対応する領域)が設けられる。また、ROMまたはNVM13dには、OS、本発明のICチップ用プログラム及びアプリケーションプログラムが記憶される。アプリケーションプログラムには、例えば、決済処理用アプリケーションプログラムが含まれる。決済処理用アプリケーションプログラムの実行により、例えば暗号化処理、認証処理、残高更新処理等が行われる。なお、更新対象データ保持領域106には、これらの処理で用いられるアプリケーションプログラム用の更新対象データ(例えば、決済処理が開始されたか否かを示すフラグ、コントローラ11からピン(暗証番号)を入力したか否かを示すフラグなど)が保持される。   The RAM 13c is a cache memory for caching a write process to the NVM 13d. As shown in FIG. 2B, the RAM 13c is provided with a cache data holding area 105 (an example of a predetermined area) for temporarily holding data. The NVM 13d is a flash memory or a nonvolatile memory such as “Electrically Erasable Programmable Read-Only Memory”. As shown in FIG. 2B, the NVM 13d is provided with an update target data holding area 106 (an area corresponding to the cache data holding area 105) for holding the data in the cache data holding area 105. The ROM or NVM 13d stores the OS, the IC chip program of the present invention, and the application program. The application program includes, for example, a payment processing application program. By executing the application program for payment processing, for example, encryption processing, authentication processing, balance update processing, and the like are performed. The update target data holding area 106 is input with the update target data for the application program used in these processes (for example, a flag indicating whether or not the settlement process is started, and a pin (password) from the controller 11. Or a flag indicating whether or not).

CPU13aは、本発明のICチップ用プログラム等を実行することにより、図2(B)に示すように、IF判定部101、コマンド処理部102、キャッシュメモリ更新部103、及び不揮発性メモリ更新部104等として機能する。ここで、IF判定部101は、本発明における判定手段の一例である。コマンド処理部102は、本発明における受信手段の一例である。キャッシュメモリ更新部103は、本発明における更新手段の一例である。不揮発性メモリ更新部104は、本発明における書き込み手段の一例である。   As shown in FIG. 2B, the CPU 13a executes the IC chip program and the like of the present invention, and as shown in FIG. 2B, the IF determination unit 101, the command processing unit 102, the cache memory update unit 103, and the nonvolatile memory update unit 104 And so on. Here, the IF determination unit 101 is an example of a determination unit in the present invention. The command processing unit 102 is an example of a receiving unit in the present invention. The cache memory update unit 103 is an example of update means in the present invention. The non-volatile memory update unit 104 is an example of a writing unit in the present invention.

IF判定部101は、外部(例えば、コントローラ11、またはCLF12)から何れかのIFを介してコマンド(例えば、APDU(Application Protocol Data Unit))が受信された場合に、当該コマンドが受信されたIFが特定のIF(例えば、パフォーマンスを優先する非接触通信用のIF)であるか否かを判定する。このコマンドは、RAM13cにおけるキャッシュデータ保持領域105のデータ(更新対象データ)を更新し、且つ当該更新されたデータを含むキャッシュデータ保持領域105のデータをNVM13dに書き込む処理を少なくとも実行させるためのコマンドである。なお、本実施形態では、CLF12との間で通信を行うためのIF2が、特定のIFであるとして例えばプログラム中、或いはNVM13d中に予め設定される。なお、どのIFを特定のIFに設定するかは任意であり、例えばサービスの形態によって適宜変更可能である。   When the IF determination unit 101 receives a command (for example, APDU (Application Protocol Data Unit)) from the outside (for example, the controller 11 or the CLF 12) via any IF, the IF received the command. Is a specific IF (for example, IF for contactless communication that prioritizes performance). This command is a command for updating at least the data (update target data) of the cache data holding area 105 in the RAM 13c and writing the data of the cache data holding area 105 including the updated data to the NVM 13d. is there. In this embodiment, the IF 2 for performing communication with the CLF 12 is set in advance, for example, in the program or in the NVM 13d as a specific IF. Note that which IF is set as a specific IF is arbitrary, and can be appropriately changed depending on, for example, the form of service.

コマンド処理部102は、受信されたコマンドに応じたコマンド処理を実行し、その結果をレスポンスとして外部へ応答する。キャッシュメモリ更新部103は、IF判定部101により特定のIFであると判定されたか否かに関わらず、受信されたコマンドに応じて、RAM13cにおけるキャッシュデータ保持領域105のデータを更新する。不揮発性メモリ更新部104は、IF判定部101により特定のIFであると判定された場合、キャッシュメモリ更新部103により更新されたデータを含むキャッシュデータ保持領域105のデータをNVM13dに書き込まない(反映しない)一方、IF判定部101により特定のIFでないと判定された場合、不揮発性メモリ更新部104は、キャッシュメモリ更新部103により更新されたデータを含む「キャッシュデータ保持領域105のデータ」をNVM13dにおける更新対象データ保持領域106に書き込む。つまり、CPU13aは、特定のIFを介してコマンドが受信された場合のNVM13dへの書き込み処理を、そのコマンド処理中に実行せず、その後に、特定のIF以外のIFを介してコマンドが受信されたときに実行する。これにより、コマンドの受信から応答までにかかる処理時間を短縮することができる。   The command processing unit 102 executes command processing according to the received command, and returns the result as a response to the outside. The cache memory update unit 103 updates the data in the cache data holding area 105 in the RAM 13c in accordance with the received command regardless of whether the IF determination unit 101 determines that the specific IF is specified. The nonvolatile memory update unit 104 does not write the data in the cache data holding area 105 including the data updated by the cache memory update unit 103 to the NVM 13d when the IF determination unit 101 determines that it is a specific IF (reflection). On the other hand, if it is determined by the IF determination unit 101 that the IF is not a specific IF, the non-volatile memory update unit 104 sets the “data in the cache data holding area 105” including the data updated by the cache memory update unit 103 to the NVM 13d. Are written in the update target data holding area 106 in FIG. In other words, the CPU 13a does not execute the writing process to the NVM 13d when the command is received via the specific IF during the command processing, and then receives the command via the IF other than the specific IF. Run when. As a result, it is possible to shorten the processing time required from the reception of the command to the response.

次に、図3を参照して、SE13がコマンドを受信したときのコマンド処理について説明する。図3は、SE13がコマンドを受信したときのコマンド処理の一例を示すフローチャートである。図3に示すコマンド処理は、外部からIFを介してコマンドが受信されたときに開始される。   Next, command processing when the SE 13 receives a command will be described with reference to FIG. FIG. 3 is a flowchart illustrating an example of command processing when the SE 13 receives a command. The command processing shown in FIG. 3 is started when a command is received from the outside via the IF.

図3に示すコマンド処理が開始されると、CPU13aは、RAM13cにおけるキャッシュデータ保持領域105のデータが初期化されている(キャッシュデータが初期化済)か否かを判定する(ステップS1)。キャッシュデータ保持領域105のデータが初期化されていない(例えば、0000・・・になっている)と判定された場合(ステップS1:NO)、ステップS2へ進む。一方、キャッシュデータ保持領域105のデータが初期化されていると判定された場合(ステップS1:YES)、ステップS3へ進む。   When the command processing shown in FIG. 3 is started, the CPU 13a determines whether or not the data in the cache data holding area 105 in the RAM 13c has been initialized (cache data has been initialized) (step S1). If it is determined that the data in the cache data holding area 105 has not been initialized (for example, 0000...) (Step S1: NO), the process proceeds to step S2. On the other hand, if it is determined that the data in the cache data holding area 105 has been initialized (step S1: YES), the process proceeds to step S3.

ステップS2では、CPU13aは、更新対象データ保持領域106に保持されている更新対象データ(例えば上述したフラグ等)を、キャッシュデータ保持領域105へ記憶(コピー)し、ステップS3へ進む。   In step S2, the CPU 13a stores (copies) the update target data (for example, the flag described above) stored in the update target data storage area 106 in the cache data storage area 105, and proceeds to step S3.

ステップS3では、CPU13aのコマンド処理部102は、コマンド処理を行う。このコマンド処理において、CPU13aのキャッシュメモリ更新部103は、受信されたコマンドに応じて、キャッシュデータ保持領域105に保持されている更新対象データを更新(キャッシュデータ更新)する。なお、この更新対象データは、例えば、図2(B)に示すデータA(第1のデータの一例)とする。   In step S3, the command processing unit 102 of the CPU 13a performs command processing. In this command processing, the cache memory update unit 103 of the CPU 13a updates the update target data held in the cache data holding area 105 (cache data update) in accordance with the received command. The update target data is, for example, data A (an example of first data) shown in FIG.

次いで、CPU13aのIF判定部101は、複数のIFが利用設定されている(複数のIFが利用設定中)か否かを判定する(ステップS4)。複数のIFが利用設定されていると判定された場合(ステップS4:YES)、ステップS5へ進む。一方、複数のIFが利用設定されていないと判定された場合(ステップS4:NO)、ステップS6へ進む。つまり、複数のIFのうち、単一のIFのみが利用設定されている場合、ステップS5の処理がスキップされる。ステップS4の判定は行わないように構成してもよいが(つまり、コマンドが受信されると、常にステップS5の判定を行う)、ステップS4の判定を行うことで、複数のIFが利用設定されていると判定された場合に限りステップS5の判定を行うようにすることができる。そのため、単一のIFのみが利用設定されている場合におけるコマンド処理時間を短縮することができる。   Next, the IF determination unit 101 of the CPU 13a determines whether or not a plurality of IFs are set for use (a plurality of IFs are being set for use) (step S4). When it is determined that a plurality of IFs are set to be used (step S4: YES), the process proceeds to step S5. On the other hand, when it is determined that a plurality of IFs are not set to be used (step S4: NO), the process proceeds to step S6. That is, when only a single IF is set to be used among a plurality of IFs, the process of step S5 is skipped. Although it may be configured not to perform the determination of step S4 (that is, the determination of step S5 is always performed when a command is received), the use of a plurality of IFs is set by performing the determination of step S4. Only when it is determined that the image is determined, the determination in step S5 can be performed. Therefore, it is possible to shorten the command processing time when only a single IF is set to be used.

ステップS5では、CPU13aのIF判定部101は、コマンドが受信されたIFが、特定のIF(例えば、非接触通信用のIF)であるか否かを判定する。特定のIFであると判定された場合(ステップS5:YES)、不揮発性メモリ更新部104は、ステップS3でキャッシュデータ保持領域105において更新された更新対象データをNVM13dに書き込まず、コマンド処理部102は、コマンド処理の結果をレスポンスとして、コマンドが受信されたIFを介して外部へ応答し(ステップS7)、コマンド処理を終了する。一方、特定のIFでないと判定された場合(ステップS5:NO)、不揮発性メモリ更新部104は、ステップS3でキャッシュデータ保持領域105において更新された更新対象データをNVM13dにおける更新対象データ保持領域106に書き込み、コマンド処理部102は、コマンド処理の結果をレスポンスとして、コマンドが受信されたIFを介して外部へ応答し(ステップS7)、コマンド処理を終了する。   In step S5, the IF determination unit 101 of the CPU 13a determines whether the IF from which the command is received is a specific IF (for example, an IF for non-contact communication). If it is determined that the IF is a specific IF (step S5: YES), the nonvolatile memory update unit 104 does not write the update target data updated in the cache data holding area 105 in step S3 to the NVM 13d, and the command processing unit 102 Responds to the outside via the IF from which the command is received using the result of the command processing as a response (step S7), and ends the command processing. On the other hand, if it is determined that the IF is not a specific IF (step S5: NO), the nonvolatile memory update unit 104 updates the update target data updated in the cache data holding area 105 in step S3 to the update target data holding area 106 in the NVM 13d. The command processing unit 102 returns the command processing result as a response to the outside via the IF from which the command is received (step S7), and ends the command processing.

その後に、次のコマンドが受信されることでコマンド処理が開始されたときに、キャッシュメモリ更新部103は、キャッシュデータ保持領域105の更新対象データとして、例えば、データB(第2のデータの一例)を更新し、ステップS5で特定のIFでないと判定されたとする。この場合、不揮発性メモリ更新部104は、キャッシュメモリ更新部103により更新された更新対象データ(データB)及び前回のコマンド処理で書き込まれなかったデータAを含む「キャッシュデータ保持領域105のデータ」を、更新対象データ保持領域106に書き込むことになる。   Thereafter, when command processing is started by receiving the next command, the cache memory update unit 103 uses, for example, data B (an example of second data) as update target data in the cache data holding area 105. ), And it is determined in step S5 that it is not a specific IF. In this case, the non-volatile memory update unit 104 includes “data in the cache data holding area 105” including the update target data (data B) updated by the cache memory update unit 103 and the data A that has not been written in the previous command processing. Is written in the update target data holding area 106.

以上説明したように、上記実施形態によれば、特定のIFを介してコマンドが受信された場合のNVM13dへの書き込み処理を、そのコマンド処理中に実行せず、その後に、特定のIF以外のIFを介してコマンドが受信されたときに実行するように構成したので、コマンドの受信から応答までにかかる処理時間を、より一層、短縮することができる。これにより、非接触決済などの処理をより短時間に完了させることができるため、例えば交通機関における改札の処理を高速化させて改札の出入りをスムーズにさせることができたり、店舗等の決済処理においては決済の処理待ちを解消して利便性を上げたりすることができる。   As described above, according to the above-described embodiment, the write process to the NVM 13d when a command is received via a specific IF is not executed during the command process, and after that, other than the specific IF Since the processing is executed when a command is received via the IF, the processing time required from the reception of the command to the response can be further reduced. As a result, processing such as contactless payment can be completed in a shorter time. For example, it is possible to speed up the ticket gate processing in transportation to smooth the entrance and exit of the ticket gate, In this case, it is possible to improve the convenience by eliminating the waiting for payment processing.

11 コントローラ
12 CLF
13 SE
14 電池
13a CPU
13b ROM
13c RAM
13d NVM
101 IF判定部
102 コマンド処理部
103 キャッシュメモリ更新部
104 不揮発性メモリ更新部
105 キャッシュデータ保持領域
106 更新対象データ保持領域
T 携帯端末
11 Controller 12 CLF
13 SE
14 Battery 13a CPU
13b ROM
13c RAM
13d NVM
DESCRIPTION OF SYMBOLS 101 IF determination part 102 Command processing part 103 Cache memory update part 104 Non-volatile memory update part 105 Cache data holding area 106 Update object data holding area T Portable terminal

Claims (5)

外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップであって、
前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信する受信手段と、
前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定する判定手段と、
前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新する更新手段と、
前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む書き込み手段と、
を備えることを特徴とするICチップ。
An IC chip comprising a plurality of interfaces for communicating with the outside, a cache memory, and a nonvolatile memory,
A command for executing at least a process of updating data in a predetermined area in the cache memory and writing the data in the predetermined area including the updated data into the nonvolatile memory. Receiving means for receiving the command via the interface;
Determining means for determining whether the interface from which the command is received is a specific interface;
Updating means for updating data in a predetermined area in the cache memory in response to the received command;
When the determination unit determines that the interface is the specific interface, the data of the predetermined area including the data updated by the update unit is not written to the nonvolatile memory, but the determination unit does not write the specific interface. If determined, writing means for writing data in the predetermined area including data updated by the updating means to the nonvolatile memory;
An IC chip comprising:
前記書き込み手段は、前記コマンドが受信されたときに前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新された第1のデータを含む前記所定領域のデータを不揮発性メモリに書き込まず、その後に、次の前記コマンドが受信されたときに前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新された第2のデータ及び前記第1のデータを含む前記所定領域のデータを前記不揮発性メモリに書き込むことを特徴とする請求項1に記載のICチップ。   When the determination unit determines that the specific interface is the specific interface when the command is received, the writing unit stores the data in the predetermined area including the first data updated by the update unit in a nonvolatile manner The second data and the first data updated by the update unit when the determination unit determines that the interface is not the specific interface when the next command is received after not writing to the memory. The IC chip according to claim 1, wherein data in the predetermined area including the data is written in the nonvolatile memory. 前記判定手段は、前記複数のインターフェースが利用設定されているか否かを判定し、前記利用設定されていると判定した場合に限り、前記特定のインターフェースであるか否かを判定することを特徴とする請求項1または請求項2に記載のICチップ。   The determination means determines whether or not the plurality of interfaces are set to be used, and determines whether or not the specific interface is set only when it is determined that the settings are set to be used. The IC chip according to claim 1 or 2. 外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップにおけるコンピュータを、
前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信する受信手段と、
前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定する判定手段と、
前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新する更新手段と、
前記判定手段により前記特定のインターフェースであると判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記判定手段により前記特定のインターフェースでないと判定された場合、前記更新手段により更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む書き込み手段として機能させることを特徴とするICチップ用プログラム。
A computer in an IC chip including a plurality of interfaces for communicating with the outside, a cache memory, and a nonvolatile memory,
A command for executing at least a process of updating data in a predetermined area in the cache memory and writing the data in the predetermined area including the updated data into the nonvolatile memory. Receiving means for receiving the command via the interface;
Determining means for determining whether the interface from which the command is received is a specific interface;
Updating means for updating data in a predetermined area in the cache memory in response to the received command;
When the determination unit determines that the interface is the specific interface, the data of the predetermined area including the data updated by the update unit is not written to the nonvolatile memory, but the determination unit does not write the specific interface. An IC chip program that, when determined, causes the data in the predetermined area including the data updated by the updating means to function as a writing means for writing to the nonvolatile memory.
外部との間で通信を行うための複数のインターフェースと、キャッシュメモリと、不揮発性メモリとを備えるICチップにおけるコマンド実行方法であって、
前記キャッシュメモリにおける所定領域のデータを更新し、且つ当該更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込む処理を少なくとも実行させるためのコマンドであって、前記外部から何れかの前記インターフェースを介して当該コマンドを受信するステップと、
前記コマンドが受信されたインターフェースが特定のインターフェースであるか否かを判定するステップと、
前記受信されたコマンドに応じて、前記キャッシュメモリにおける所定領域のデータを更新するステップと、
前記特定のインターフェースであると判定された場合、前記更新されたデータを含む前記所定領域のデータを不揮発性メモリに書き込まない一方、前記特定のインターフェースでないと判定された場合、前記更新されたデータを含む前記所定領域のデータを前記不揮発性メモリに書き込むステップと、
を含むことを特徴とするコマンド実行方法。
A command execution method in an IC chip comprising a plurality of interfaces for communicating with the outside, a cache memory, and a nonvolatile memory,
A command for executing at least a process of updating data in a predetermined area in the cache memory and writing the data in the predetermined area including the updated data into the nonvolatile memory. Receiving the command via the interface;
Determining whether the interface from which the command was received is a specific interface;
Updating data in a predetermined area in the cache memory in response to the received command;
If it is determined that the interface is the specific interface, the data in the predetermined area including the updated data is not written to the nonvolatile memory. On the other hand, if it is determined that the interface is not the specific interface, the updated data is stored. Including writing the predetermined area of data into the nonvolatile memory;
A command execution method comprising:
JP2014041711A 2014-03-04 2014-03-04 IC chip, command execution method, and IC chip program Active JP6307938B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014041711A JP6307938B2 (en) 2014-03-04 2014-03-04 IC chip, command execution method, and IC chip program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014041711A JP6307938B2 (en) 2014-03-04 2014-03-04 IC chip, command execution method, and IC chip program

Publications (2)

Publication Number Publication Date
JP2015166990A true JP2015166990A (en) 2015-09-24
JP6307938B2 JP6307938B2 (en) 2018-04-11

Family

ID=54257822

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014041711A Active JP6307938B2 (en) 2014-03-04 2014-03-04 IC chip, command execution method, and IC chip program

Country Status (1)

Country Link
JP (1) JP6307938B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017222678A (en) * 2017-07-06 2017-12-21 バイエル・ヘルスケア・エルエルシーBayer HealthCare LLC Monoclonal antibodies against tissue factor pathway inhibitors (tfpi)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013037430A (en) * 2011-08-04 2013-02-21 Dainippon Printing Co Ltd Ic chip, processing method in ic chip, and processing program in ic chip

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013037430A (en) * 2011-08-04 2013-02-21 Dainippon Printing Co Ltd Ic chip, processing method in ic chip, and processing program in ic chip

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017222678A (en) * 2017-07-06 2017-12-21 バイエル・ヘルスケア・エルエルシーBayer HealthCare LLC Monoclonal antibodies against tissue factor pathway inhibitors (tfpi)

Also Published As

Publication number Publication date
JP6307938B2 (en) 2018-04-11

Similar Documents

Publication Publication Date Title
US10380578B2 (en) Systems and methods for providing near field communications
US10810591B2 (en) Virtual reality headset device and payment method
US20120067947A1 (en) Ic card, mobile electronic device and data processing method in ic card
US8650387B2 (en) IC chip, information processing apparatus, software module control method, information processing system, information processing method, and program
KR102371705B1 (en) Device and method for controlling transactions of nfc reader with external electronic device
US9978056B2 (en) Smart card having multiple payment instruments
EP3065097B1 (en) Device and method for facilitating a transaction
JP6307938B2 (en) IC chip, command execution method, and IC chip program
JP5457743B2 (en) IC card and portable electronic information device
US9594917B2 (en) Secured multi-directional, multi-interface transaction processing
EP3493134A1 (en) Electronic device and method for processing remote payment
JP2012093857A (en) Ic chip, memory initialization method for ic chip, processing program for ic chip, and portable terminal
US11863475B2 (en) Method and apparatus for designing rate matching pattern for partial demodulation reference signal (DMRS) transmission
JP5754287B2 (en) IC chip, processing method in IC chip, UIM, portable terminal, and processing program for IC chip
CN112822666B (en) Communication method, communication device, electronic equipment and storage medium
JP5838713B2 (en) IC chip, UIM, processing method in IC chip, IC chip processing program, and portable terminal
US11652512B2 (en) Fast NFC processing
CN110830556B (en) Service processing method and device
US9948752B2 (en) Default data packet routing in a NFC device
JP5799754B2 (en) IC chip, processing method in IC chip, IC chip processing program, IC card, and portable terminal
JP5724701B2 (en) IC chip, processing method in IC chip, IC chip processing program, and portable terminal
JP6201812B2 (en) Information processing apparatus and information processing method
JP2017142655A (en) Electronic information storage medium, information processing method, and information processing program
US11954477B2 (en) Information processing device, information processing method, and program
JP6326835B2 (en) Information processing apparatus, IC card, command processing method, and command processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170925

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180213

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180226

R150 Certificate of patent or registration of utility model

Ref document number: 6307938

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150