JP6424473B2 - Arithmetic device, arithmetic method, and arithmetic processing program - Google Patents

Arithmetic device, arithmetic method, and arithmetic processing program Download PDF

Info

Publication number
JP6424473B2
JP6424473B2 JP2014114810A JP2014114810A JP6424473B2 JP 6424473 B2 JP6424473 B2 JP 6424473B2 JP 2014114810 A JP2014114810 A JP 2014114810A JP 2014114810 A JP2014114810 A JP 2014114810A JP 6424473 B2 JP6424473 B2 JP 6424473B2
Authority
JP
Japan
Prior art keywords
instruction code
binary logic
interpreted
acquired
processing
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.)
Active
Application number
JP2014114810A
Other languages
Japanese (ja)
Other versions
JP2015230495A (en
Inventor
山田 真生
真生 山田
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 JP2014114810A priority Critical patent/JP6424473B2/en
Publication of JP2015230495A publication Critical patent/JP2015230495A/en
Application granted granted Critical
Publication of JP6424473B2 publication Critical patent/JP6424473B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Executing Machine-Instructions (AREA)
  • Hardware Redundancy (AREA)

Description

本発明は、複数のコアを備え、並列処理を行うことが可能な演算装置の技術分野に関する。   The present invention relates to the technical field of an arithmetic device that includes multiple cores and can perform parallel processing.

故障すると安全性を損なう可能性のある制御装置等では、サブコア等の監視部によってメインコアを監視し、メインコアの異常を検出して制御装置の安全な動作を保証する策が講じられてきた。その一例として、特許文献1に開示されるように、ロックステップと称される技術が普及している。ロックステップとは、複数のコアが同じ処理を並列的に実行し、実行結果を比較して各コアが正常に動作していることを判断する技術である。ロックステップが故障の検出を目的とする一方で、例えば、特許文献2に開示されるように、暗号技術を用いて対向機器を認証することにより、安全な動作を保証する技術が知られている。   For control devices that may lose safety if they fail, measures have been taken to monitor the main core by a monitoring unit such as a sub core and detect an abnormality in the main core to guarantee the safe operation of the control device. . As one example, as disclosed in Patent Document 1, a technique called lock step is in widespread use. The lock step is a technology in which a plurality of cores execute the same processing in parallel and compare the execution results to determine that each core is operating normally. For example, as disclosed in Patent Document 2, there is known a technology that guarantees safe operation by authenticating an opposite device using encryption technology while lock step aims to detect a failure. .

特開2010−128627号公報JP, 2010-128627, A 特開2013−138304号公報JP, 2013-138304, A

しかしながら、認証用デバイスとして知られているスマートカードやTPM(Trusted Platform Module)等の分野においては、サイドチャネル攻撃が知られている。サイドチャネル攻撃とは、古くから暗号演算用制御装置において存在する脅威であり、演算時に消費される電力や発生する電磁波に代表される副次的な情報(サイドチャネル情報)を利用して演算内容を推定する攻撃手法である。ロックステップと、認証処理とを、単一の演算装置にて実現しようとした場合には、ロックステップによって複数のコアが同一の処理を同時に実行することになり、消費電力や電磁波が増長されてサイドチャネル攻撃の標的になりやすくなってしまうことが問題となる。   However, side channel attacks are known in fields such as smart cards and TPMs (Trusted Platform Module) known as authentication devices. Side channel attack is a threat that has existed for a long time in the controller for cryptographic computation, and the content of computation using power consumed during computation and secondary information (side channel information) represented by generated electromagnetic waves Attack method to estimate In the case where lock step and authentication processing are to be realized by a single arithmetic device, the lock step causes the multiple cores to simultaneously execute the same processing, and power consumption and electromagnetic waves are increased. It becomes a problem that it becomes easy to become a target of side channel attack.

そこで、本発明は、上記問題等に鑑みてなされたものであり、ロックステップと認証処理を同時に実行してもサイドチャネル情報が増長されず、高い耐タンパ性を実現することが可能な演算装置、演算方法、及び演算処理プログラムを提供することを目的とする。   Therefore, the present invention has been made in view of the above problems and the like, and an arithmetic device capable of realizing high tamper resistance without increasing side channel information even when lock step and authentication processing are simultaneously executed. , An arithmetic method, and an arithmetic processing program.

上記課題を解決するために、請求項1に記載の発明は、命令コードを記憶する不揮発性メモリと、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、を備えることを特徴とする。請求項2に記載の発明は、請求項1に記載の演算装置において、前記不揮発性メモリは、複数の命令コードから構成される1のプログラムを記憶し、前記第1演算ユニットは、前記1のプログラムに含まれる何れか1の命令コードを前記不揮発性メモリから取得し、取得した前記1の命令コードを解釈し、解釈した前記1の命令コードに従って処理を実行し、前記第2演算ユニットは、前記第1演算ユニットにより取得されて解釈された前記1の命令コードの2値論理が前記第1反転手段により反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行することを特徴とする。 In order to solve the above problems, the invention according to claim 1 acquires a non-volatile memory storing an instruction code, and an instruction code output from the non-volatile memory, interprets the acquired instruction code, and interprets the acquired instruction code. Processing according to the specified instruction code, and the first operation unit storing the first result data indicating the result of the processing in the internal memory, and inverting the binary logic representing the instruction code output from the non-volatile memory Obtaining an instruction code obtained by inverting the binary logic by the first inverting means and the first inverting means, and interpreting and interpreting the acquired instruction code by binary logic opposite to the first operation unit A second operation unit that executes processing in binary logic opposite to the first operation unit according to an instruction code, and stores second result data indicating the result of the processing in the internal memory And wherein the Rukoto. The invention described in claim 2 is the arithmetic device according to claim 1, wherein the non-volatile memory stores one program composed of a plurality of instruction codes, and the first arithmetic unit stores the one program. Any one instruction code included in the program is acquired from the nonvolatile memory, the acquired one instruction code is interpreted, and processing is executed according to the interpreted one instruction code, and the second operation unit is An instruction code obtained by binary logic of the one instruction code acquired and interpreted by the first operation unit is acquired by the first inverting means, and the acquired instruction code is the first operation unit. According to the instruction code interpreted and interpreted by the opposite binary logic, the processing is performed by the binary logic opposite to the first operation unit.

請求項に記載の発明は、命令コードを記憶する不揮発性メモリと、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、前記第2演算ユニットから出力された前記第2結果データを表現する2値論理を反転する第2反転手段と、を備え、前記不揮発性メモリは、前記第2反転手段により2値論理が反転された前記第2結果データを、所定の記憶領域に記憶することを特徴とする。 The invention according to claim 3 comprises: a non-volatile memory for storing an instruction code; acquiring an instruction code output from the non-volatile memory; interpreting the acquired instruction code; and executing processing according to the interpreted instruction code A first operation unit for storing, in an internal memory, first result data indicating the result of the process; first inverting means for inverting binary logic representing the instruction code output from the non-volatile memory; An instruction code obtained by inverting the binary logic is acquired by the first inverting means, and the acquired instruction code is interpreted by the binary logic opposite to the first arithmetic unit, and the first arithmetic unit according to the interpreted instruction code run the process in the opposite binary logic and, of outputting the second result data indicating the result of the processing and the second processing units to be stored in an internal memory, from the second arithmetic unit And and a second inverting means for inverting the binary logic representing said second result data, the nonvolatile memory, the second result data binary logic is inverted by the second inverting means, It is characterized in that it is stored in a predetermined storage area.

請求項に記載の発明は、命令コードを記憶する不揮発性メモリと、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、を備える演算装置であって、前記第1演算ユニットは、前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込み、前記演算装置は、前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転する第3反転手段を更に備え、前記第2演算ユニットは、前記第3反転手段により2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較することを特徴とする。 The invention according to claim 4 acquires a non-volatile memory for storing an instruction code and an instruction code output from the non-volatile memory, interprets the acquired instruction code, and executes processing according to the interpreted instruction code. A first operation unit for storing, in an internal memory, first result data indicating the result of the process; first inverting means for inverting binary logic representing the instruction code output from the non-volatile memory; An instruction code obtained by inverting the binary logic is acquired by the first inverting means, and the acquired instruction code is interpreted by the binary logic opposite to the first arithmetic unit, and the first arithmetic unit according to the interpreted instruction code run the process in the opposite binary logic and the second result data indicating the result of the processing a computing device comprising a second arithmetic unit that stored in the internal memory, the said One operation unit writes the first result data to a predetermined storage area in the non-volatile memory, and the operation device inverts binary logic representing the first result data output from the non-volatile memory The second operation unit further includes a third inverting unit, and the second operation unit acquires the first result data whose binary logic is inverted by the third inverting unit, and acquires the first result data and the second result data. And comparing with.

請求項に記載の発明は、命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、を含むことを特徴とする。請求項6に記載の発明は、命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、前記第2結果データを表現する2値論理を反転するステップと、前記2値論理が反転された前記第2結果データを、前記不揮発性メモリにおける所定の記憶領域に記憶するステップと、を含むことを特徴とする。請求項7に記載の発明は、命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込むステップと、前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転するステップと、前記2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較するステップと、を含むことを特徴とする。 The invention according to claim 5 is an arithmetic method in an arithmetic device including a non-volatile memory for storing an instruction code, wherein the instruction code output from the non-volatile memory is acquired, and the acquired instruction code is interpreted. A first operation step of executing processing according to the interpreted instruction code and storing first result data indicating the result of the processing in the internal memory; and binary logic representing the instruction code output from the non-volatile memory The step of inverting, acquiring the instruction code obtained by inverting the binary logic, interpreting the acquired instruction code by binary logic opposite to the first operation step, and performing the first operation according to the interpreted instruction code Performing a process with binary logic opposite to the step, and storing a second result data indicating the result of the process in the internal memory; To. The invention according to claim 6 is an arithmetic method in an arithmetic device including a non-volatile memory for storing an instruction code, which acquires an instruction code output from the non-volatile memory, and interprets the acquired instruction code. A first operation step of executing processing according to the interpreted instruction code and storing first result data indicating the result of the processing in the internal memory; and binary logic representing the instruction code output from the non-volatile memory The step of inverting, acquiring the instruction code obtained by inverting the binary logic, interpreting the acquired instruction code by binary logic opposite to the first operation step, and performing the first operation according to the interpreted instruction code A second operation step of executing processing with binary logic opposite to that of the step and storing second result data indicating the result of the processing in the internal memory; Inverting the binary logic representing the data, and storing the second result data obtained by inverting the binary logic in a predetermined storage area of the non-volatile memory. . The invention according to claim 7 is an arithmetic method in an arithmetic device including a non-volatile memory for storing an instruction code, which acquires an instruction code output from the non-volatile memory, and interprets the acquired instruction code. A first operation step of executing processing according to the interpreted instruction code and storing first result data indicating the result of the processing in the internal memory; and binary logic representing the instruction code output from the non-volatile memory The step of inverting, acquiring the instruction code obtained by inverting the binary logic, interpreting the acquired instruction code by binary logic opposite to the first operation step, and performing the first operation according to the interpreted instruction code A second operation step of executing processing with binary logic opposite to that of the step and storing second result data indicating the result of the processing in the internal memory; Writing the data into a predetermined storage area in the non-volatile memory, inverting the binary logic representing the first result data output from the non-volatile memory, and inverting the binary logic And acquiring the first result data, and comparing the acquired first result data with the second result data.

請求項に記載の発明は、命令コードを記憶する不揮発性メモリを備えるコンピュータに、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、を実行させることを特徴とする。請求項9に記載の発明は、命令コードを記憶する不揮発性メモリを備えるコンピュータに、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、前記第2結果データを表現する2値論理を反転するステップと、前記2値論理が反転された前記第2結果データを、前記不揮発性メモリにおける所定の記憶領域に記憶するステップと、を実行させることを特徴とする。請求項10に記載の発明は、命令コードを記憶する不揮発性メモリを備えるコンピュータに、前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込むステップと、前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転するステップと、前記2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較するステップと、を実行させることを特徴とする。 The invention according to claim 8 is a computer having a non-volatile memory for storing an instruction code, acquiring an instruction code output from the non-volatile memory, interpreting the acquired instruction code, and processing according to the interpreted instruction code Calculating a first result data indicating the result of the process in an internal memory, inverting the binary logic representing the instruction code output from the non-volatile memory, and The instruction code is obtained by inverting the binary logic, and the obtained instruction code is interpreted by the binary logic opposite to the first operation step, and the opposite 2 to the first operation step according to the interpreted instruction code. Performing a process according to value logic, and storing a second result data indicating a result of the process in an internal memory. The invention according to claim 9 is that according to an instruction code obtained by obtaining a command code output from the non-volatile memory, interpreting the obtained command code, and interpreting the obtained command code in a computer having a nonvolatile memory storing the command code. Calculating a first result data indicating the result of the process in an internal memory, inverting the binary logic representing the instruction code output from the non-volatile memory, and The instruction code is obtained by inverting the binary logic, and the obtained instruction code is interpreted by the binary logic opposite to the first operation step, and the opposite 2 to the first operation step according to the interpreted instruction code. A second operation step of executing processing with value logic and storing second result data indicating the result of the processing in an internal memory; and binary values representing the second result data A step of inverting the sense, the said binary logic is inverted the second result data, characterized in that to execute the steps of storing in a predetermined storage area in the nonvolatile memory. The invention according to claim 10 is that according to the instruction code obtained by acquiring the instruction code output from the non-volatile memory, interpreting the acquired instruction code, and processing the instruction code output from the non-volatile memory to a computer including the nonvolatile memory storing the instruction code. Calculating a first result data indicating the result of the process in an internal memory, inverting the binary logic representing the instruction code output from the non-volatile memory, and The instruction code is obtained by inverting the binary logic, and the obtained instruction code is interpreted by the binary logic opposite to the first operation step, and the opposite 2 to the first operation step according to the interpreted instruction code. A second operation step of executing processing with value logic and storing second result data indicating the result of the processing in an internal memory; and non-volatileally processing the first result data The steps of writing in a predetermined storage area in a memory, inverting the binary logic representing the first result data output from the non-volatile memory, and converting the first result data obtained by inverting the binary logic And acquiring the acquired first result data and comparing the acquired second result data with each other.

本発明によれば、第1演算ユニットは、不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行する一方、第2演算ユニットは、反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って第1演算ユニットとは反対の2値論理で処理を実行するように構成したので、例えばロックステップと認証処理を同時に実行してもサイドチャネル情報が増長されず、高い耐タンパ性を実現することができる。 According to the present invention, the first operation unit acquires the instruction code output from the non-volatile memory, interprets the acquired instruction code, and executes processing in accordance with the interpreted instruction code, while the second operation unit get the instruction code binary logic is reversed by the reversing means, the instruction code obtained, the first arithmetic unit interprets the opposite binary logic, as opposed to the first arithmetic unit in accordance with instruction codes of interpreting Since the processing is executed by the binary logic, for example, even if lock step and authentication processing are executed simultaneously, side channel information is not increased, and high tamper resistance can be realized.

ICチップCの概要構成例を示す図である。FIG. 6 is a diagram showing an example of a schematic configuration of an IC chip C. 実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。FIG. 7 is a diagram showing how an instruction code is fetched from a program memory PM and processing is executed according to the instruction code in the first embodiment. 実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。FIG. 7 is a diagram showing how an instruction code is fetched from a program memory PM and processing is executed according to the instruction code in the first embodiment. 実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。FIG. 7 is a diagram showing how an instruction code is fetched from a program memory PM and processing is executed according to the instruction code in the first embodiment. 実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。FIG. 7 is a diagram showing how an instruction code is fetched from a program memory PM and processing is executed according to the instruction code in the first embodiment. 実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。FIG. 7 is a diagram showing how an instruction code is fetched from a program memory PM and processing is executed according to the instruction code in the first embodiment. 実施例2において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。In Example 2, it is a figure which shows a mode that an instruction code is fetched from program memory PM and processing is performed according to an instruction code. 実施例2において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。In Example 2, it is a figure which shows a mode that an instruction code is fetched from program memory PM and processing is performed according to an instruction code. 実施例2において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。In Example 2, it is a figure which shows a mode that an instruction code is fetched from program memory PM and processing is performed according to an instruction code.

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、ICチップに対して本発明を適用した場合の実施の形態である。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment in the case where the present invention is applied to an IC chip.

先ず、図1を参照して、本実施形態に係るICチップの概要構成について説明する。図1は、ICチップCの概要構成例を示す図である。ICチップCは、本発明の演算装置の一例である。なお、ICチップCは、キャッシュカード、クレジットカード、社員カード等に搭載されて使用される。或いは、ICチップCは、スマートフォンや携帯電話機等の通信機器に組み込まれる。ICチップCは、通信機器の回路基板上に直接組み込んで構成するようにしてもよい。   First, with reference to FIG. 1, a schematic configuration of an IC chip according to the present embodiment will be described. FIG. 1 is a view showing a schematic configuration example of an IC chip C. As shown in FIG. The IC chip C is an example of the arithmetic device of the present invention. The IC chip C is mounted on a cash card, a credit card, an employee card or the like and used. Alternatively, the IC chip C is incorporated in a communication device such as a smartphone or a mobile phone. The IC chip C may be built directly on the circuit board of the communication device.

ICチップCは、図1に示すように、コア1、コア2、反転器3、RAM(Random Access Memory)4、不揮発性メモリ5、ROM(Read Only Memory)6、及びI/O回路7を備えて構成される。コア1は、第1演算ユニットの一例である。コア2は、第2演算ユニットの一例である。コア1とコア2とは並列処理が可能に構成されている。コア1、反転器3、RAM4、不揮発性メモリ5、ROM6、及びI/O回路7は、バス8に接続されている。一方、コア2は、反転器3に接続されている。反転器3は、命令コードや各種データ等を表現する2値論理(論理0と論理1)を反転(言い換えれば、低電位状態と高電位状態を反転)する第1〜第3反転手段の一例であり、NOT回路等により構成される。バス8は、アドレスバスとデータバスを備える。   As shown in FIG. 1, the IC chip C includes a core 1, a core 2, an inverter 3, a random access memory (RAM) 4, a non-volatile memory 5, a read only memory (ROM) 6, and an I / O circuit 7. It comprises and is constituted. The core 1 is an example of a first arithmetic unit. The core 2 is an example of a second operation unit. The cores 1 and 2 are configured to be capable of parallel processing. The core 1, the inverter 3, the RAM 4, the non-volatile memory 5, the ROM 6, and the I / O circuit 7 are connected to the bus 8. On the other hand, the core 2 is connected to the inverter 3. The inverter 3 is an example of first to third inverting means for inverting (in other words, inverting a low potential state and a high potential state) binary logic (logic 0 and logic 1) representing an instruction code, various data, etc. And is configured by a NOT circuit or the like. The bus 8 comprises an address bus and a data bus.

RAM4は、ワークメモリであり、スタックメモリを備える。スタックメモリは、サブルーチンの呼び出しや割り込みに伴う戻りアドレス等の格納に使用される。不揮発性メモリ5は、プログラムメモリPMとデータメモリDMを備える。プログラムメモリPMには、プログラムを構成する複数の命令コードが記憶(格納)される。データメモリDMには、各種データが記憶される。なお、ROM6には、不揮発性メモリ5に記憶されるプログラムの一部が記憶されてもよい。   The RAM 4 is a work memory and includes a stack memory. The stack memory is used to store return addresses and the like associated with subroutine calls and interrupts. The nonvolatile memory 5 includes a program memory PM and a data memory DM. The program memory PM stores (stores) a plurality of instruction codes constituting a program. Various data are stored in the data memory DM. The ROM 6 may store a part of the program stored in the non-volatile memory 5.

I/O回路7は、外部端末とのインターフェイスを担う。接触式のICチップCの場合、I/O回路7には、例えば、C1〜C8の8個の端子が備えられている。例えば、C1端子は電源端子、C2端子はリセット端子、C3端子はクロック端子、C5端子はグランド端子、C7端子は外部端末との間で通信を行うための端子である。一方、非接触式のICチップCの場合、I/O回路7には、例えば、アンテナ、及び変復調回路が備えられている。なお、外部端末の例としては、ICカード発行機、ATM、改札機、認証用ゲート等が挙げられる。或いは、ICカード1が通信機器に組み込まれる場合、外部端末には通信機器の機能を担う制御部が該当する。   The I / O circuit 7 interfaces with an external terminal. In the case of the contact type IC chip C, the I / O circuit 7 is provided with eight terminals C1 to C8, for example. For example, terminal C1 is a power supply terminal, terminal C2 is a reset terminal, terminal C3 is a clock terminal, terminal C5 is a ground terminal, and terminal C7 is a terminal for communication with an external terminal. On the other hand, in the case of the non-contact type IC chip C, the I / O circuit 7 is provided with, for example, an antenna and a modulation / demodulation circuit. In addition, as an example of an external terminal, an IC card issuing machine, an ATM, a ticket gate, an authentication gate, etc. may be mentioned. Alternatively, when the IC card 1 is incorporated into a communication device, the external terminal corresponds to a control unit that takes on the function of the communication device.

コア1は、演算器11、内部メモリ12、プログラムカウンタ13、及び割込みコントローラ14を備える。コア2は、演算器21、内部メモリ22、プログラムカウンタ23、及び割込みコントローラ24を備える。演算器11,21は、それぞれ、命令レジスタ及びデコーダを備える。内部メモリ12,22は、それぞれ、データレジスタを備える。プログラムカウンタ13,23は、次に実行されるべき命令コードが記憶されているプログラムメモリPM上のアドレス(番地)を保持する。割込みコントローラ14と割込みコントローラ24とは、バス8を介さずにデータ送受信可能に構成されている。ここで、コア2では、コア1における論理0と論理1の2値論理(言い換えれば、識別基準)が反転している。コア1が論理0を低電位状態によって表現する場合、コア2は論理0を高電位状態によって表現し、コア1が論理1を高電位状態によって表現する場合、コア2は論理1を低電位状態によって表現する。例えば、“9(10進数)”は、“1001(2進数)”と表記されるが、低電位状態=L、高電位状態=Hとして表現する場合、“1001(2進数)”は、コア1においては、“HLLH”と表現され、コア2においては、“LHHL”と表現される。同様にADD命令が、“000111(2進数) ” と表記される場合、コア1においては、“LLLHHH”と表示され、コア2においては、“HHHLLL”と表現される。   The core 1 includes an arithmetic unit 11, an internal memory 12, a program counter 13, and an interrupt controller 14. The core 2 includes an arithmetic unit 21, an internal memory 22, a program counter 23, and an interrupt controller 24. The computing units 11 and 21 each include an instruction register and a decoder. The internal memories 12 and 22 each include a data register. The program counters 13 and 23 hold an address (address) on the program memory PM in which an instruction code to be executed next is stored. The interrupt controller 14 and the interrupt controller 24 are configured to be able to transmit and receive data without passing through the bus 8. Here, in the core 2, binary logic (in other words, identification criteria) of logic 0 and logic 1 in the core 1 is inverted. When core 1 represents logic 0 by a low potential state, core 2 represents logic 0 by a high potential state, and when core 1 represents logic 1 by a high potential state, core 2 represents logic 1 in a low potential state Expressed by For example, “9 (decimal number)” is described as “1001 (binary number)”, but “1001 (binary number)” is the core when expressed as low potential state = L and high potential state = H. In 1, it is expressed as "HLLH", and in core 2, it is expressed as "LHHL". Similarly, when the ADD instruction is written as "000111 (binary)", it is displayed as "LLLHHH" in core 1 and is expressed as "HHHLLL" in core 2.

演算器11は、プログラムカウンタ13が指し示すアドレスに記憶されている命令コードを、プログラムメモリPMから命令レジスタにフェッチ(取得)する。つまり、不揮発性メモリ5のプログラムメモリPMから出力された命令コードが演算器11によりフェッチされる。そして、演算器11は、取得した命令コードをデコーダによって解釈(デコード)し、解釈した命令コードに従って処理を実行し(例えば、四則演算、論理演算等の演算処理を実行し)、当該処理の結果を示す第1結果データを内部メモリ12のデータレジスタに記憶する。   Arithmetic unit 11 fetches (acquires) the instruction code stored at the address indicated by program counter 13 from program memory PM to the instruction register. That is, the instruction code output from the program memory PM of the non-volatile memory 5 is fetched by the operation unit 11. Then, the arithmetic unit 11 interprets (decodes) the acquired instruction code by the decoder and executes processing according to the interpreted instruction code (for example, executes arithmetic processing such as four arithmetic operations and logical operations), and the result of the processing Are stored in the data register of the internal memory 12.

一方、演算器21は、プログラムカウンタ23が指し示すアドレスに記憶されている命令コードを、プログラムメモリPMから反転器3を介して命令レジスタにフェッチ(取得)する。つまり、不揮発性メモリ5のプログラムメモリPMから出力され、反転器3により2値論理が反転された命令コードがフェッチされる。ここで、コア2から出力されるアドレス(プログラムカウンタ23が指し示すアドレス)は、反転器3によって2値論理が反転された後にアドレスバスへ送出され、これに応じて、プログラムメモリPMからデータバスに送出された命令コードは、反転器3によって2値論理が反転された後に、コア2に入力されることになる。そして、演算器21は、取得した命令コードを演算器11とは反対の2値論理でデコーダによって解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第2結果データを内部メモリ22のデータレジスタに記憶する。   On the other hand, the arithmetic unit 21 fetches (acquires) the instruction code stored at the address indicated by the program counter 23 from the program memory PM via the inverter 3 to the instruction register. That is, the instruction code output from the program memory PM of the non-volatile memory 5 and having the binary logic inverted by the inverter 3 is fetched. Here, the address (address indicated by the program counter 23) output from the core 2 is sent to the address bus after the binary logic is inverted by the inverter 3, and accordingly, from the program memory PM to the data bus The issued instruction code is input to the core 2 after the binary logic is inverted by the inverter 3. Then, the arithmetic unit 21 interprets the obtained instruction code by the decoder with binary logic opposite to that of the arithmetic unit 11, executes processing according to the interpreted instruction code, and internally stores the second result data indicating the result of the processing. It is stored in the data register of the memory 22.

次に、本実施形態に係るICチップの動作例について、実施例1と実施例2とに分けて説明する。   Next, an operation example of the IC chip according to the present embodiment will be described by dividing it into Example 1 and Example 2.

(実施例1)
先ず、図2〜図6を参照して、実施例1について説明する。実施例1は、コア1とコア2とでデータメモリが共有される場合の動作例である。図2〜図6は、実施例1において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。なお、図2〜図6において、アドレスバス81とアドレスバス83は、分かれているが、単一のアドレスバスであってもよい。同様に、データバス82とデータバス84は、単一のデータバスであってもよい。また、図2〜図6の例では、命令コードの構成単位を3バイトとしている。図2(A)の状態は、命令コードがフェッチされる前の状態を示している。図2(A)の状態では、コア1における演算器11の命令レジスタには、初期値“00・・・(h)”が格納されている一方、コア2における演算器21の命令レジスタには、初期値“FF・・・(h)”が格納されている。ここで、“h”は、16進数であることを示す。また、図2(A)の状態では、コア1における内部メモリ12のデータレジスタには、初期値“00(h)”が格納されている一方、コア2における内部メモリ22のデータレジスタには、初期値“FF(h)”が格納されている。なお、図2(A)の例では、内部メモリ12と内部メモリ22には、それぞれ、データレジスタR1とデータレジスタR2との2つのデータレジスタを示しているが、実際には、これより多くのデータレジスタが設けられる。また、図2(A)の状態では、コア1におけるプログラムカウンタ13は、アドレス“0000(h)”を示している一方、コア2におけるプログラムカウンタ23は、アドレス“0000(h)”の反転値“FFFF(h) ”を示している。なお、以降、演算器11と演算器21とは並列的に処理を実行する。
Example 1
First, Embodiment 1 will be described with reference to FIGS. 2 to 6. The first embodiment is an operation example in the case where the data memory is shared by the core 1 and the core 2. 2 to 6 are diagrams showing how an instruction code is fetched from the program memory PM and the process is executed according to the instruction code in the first embodiment. In FIGS. 2 to 6, although the address bus 81 and the address bus 83 are separated, they may be a single address bus. Similarly, data bus 82 and data bus 84 may be a single data bus. Moreover, in the example of FIGS. 2-6, the structural unit of an instruction code is 3 bytes. The state of FIG. 2A shows the state before the instruction code is fetched. In the state of FIG. 2 (A), while the initial value “00... (H)” is stored in the instruction register of the arithmetic unit 11 in the core 1, the instruction register of the arithmetic unit 21 in the core 2 is stored. , And an initial value "FF (h)" is stored. Here, "h" indicates a hexadecimal number. Further, in the state of FIG. 2A, while the initial value “ 00 (h) ” is stored in the data register of the internal memory 12 in the core 1, the data register of the internal memory 22 in the core 2 is: The initial value " FF (h) " is stored. In the example of FIG. 2A, two data registers of the data register R1 and the data register R2 are shown in the internal memory 12 and the internal memory 22, respectively. A data register is provided. Further, in the state of FIG. 2A, the program counter 13 in the core 1 indicates the address "0000 (h)" while the program counter 23 in the core 2 indicates the inverted value of the address "0000 (h)""FFFF(h)" is shown. Note that, thereafter, the arithmetic unit 11 and the arithmetic unit 21 execute processing in parallel.

コア1における演算器11は、図2(B)に示すように、プログラムカウンタ13が指し示すアドレス“0000(h)”(つまり、プログラムカウンタ13の値)に記憶されている命令コード“08 01 09(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチする。つまり、プログラムカウンタ13が指し示すアドレス“0000(h)”がアドレスバス81へ送出され、これに応じて、プログラムメモリPMからデータバス82に送出された命令コードが命令レジスタにフェッチされる。そして、コア1における演算器11は、フェッチした命令コードをデコーダによって解釈(ロード(LOAD)命令であると解釈)し、解釈した命令コード(この例では、ロード命令)に従って、内部メモリ12におけるデータレジスタにデータをロードする。図2(B)の例では、命令コードに含まれる“08”は、演算器11のデコーダによりロード(LOAD)命令であると解釈され、当該命令コードに含まれる“09”が、演算対象のデータとして、内部メモリ12におけるデータレジスタR1(=01)にロードされている。   Arithmetic unit 11 in core 1 has the instruction code "08 01 09" stored in the address "0000 (h)" (that is, the value of program counter 13) pointed to by program counter 13 as shown in FIG. 2 (B). (H) "is fetched from the program memory PM to the instruction register via the data bus 82. That is, the address "0000 (h)" indicated by the program counter 13 is sent to the address bus 81, and in response, the instruction code sent from the program memory PM to the data bus 82 is fetched into the instruction register. Then, the arithmetic unit 11 in the core 1 interprets the fetched instruction code by the decoder (interprets it as a load (LOAD) instruction), and according to the interpreted instruction code (in this example, a load instruction), data in the internal memory 12 Load data into a register. In the example of FIG. 2B, “08” included in the instruction code is interpreted by the decoder of the arithmetic unit 11 as a load (LOAD) instruction, and “09” included in the instruction code is the operation target. The data is loaded as data into a data register R1 (= 01) in the internal memory 12.

一方、コア2における演算器21は、図2(B)に示すように、プログラムカウンタ23が指し示す“FFFF(h)”が反転(つまり、反転器31によって反転)されたアドレス(つまり、プログラムカウンタ23の反転値)“0000(h)”に記憶されている命令コード“0801 09(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチする。つまり、プログラムカウンタ3が指し示すアドレス“FFF(h)”が反転器31によって2値論理が反転された後にアドレスバス81へ送出され、これに応じて、プログラムメモリPMからデータバス82に送出された命令コードが反転器32によって2値論理が反転された後に命令レジスタにフェッチされる。そして、コア2における演算器21は、フェッチされた命令コードをデコーダによって解釈(演算器11とは反対の2値論理でロード(LOAD)命令であると解釈)し、解釈した命令コードに従って、内部メモリ22におけるデータレジスタR1にデータをロードする。図2(B)の例では、反転器32によって2値論理が反転された命令コード(つまり、命令コードの反転値)に含まれる“F7”は、演算器21のデコーダによりロード(LOAD)命令であると解釈され、当該反転された命令コードに含まれるデータ“F6”が、演算対象のデータとして、内部メモリ22におけるデータレジスタR1(=FE)にロードされている。 On the other hand, as shown in FIG. 2 (B), the arithmetic unit 21 in the core 2 has an address (ie, the program counter) in which “FFFF (h)” indicated by the program counter 23 is inverted (ie, inverted by the inverter 31). The instruction code "0801 09 (h)" stored in the inverted value "0000 (h)" of 23 is fetched from the program memory PM into the instruction register through the data bus 82 and the inverter 32. That is, the program counter 2 3 pointed address "FFF F (h)" is sent to the address bus 81 after the inverter 31 is binary logic is inverted, accordingly, transmitted from the program memory PM into the data bus 82 The inverted instruction code is fetched into the instruction register after the binary logic is inverted by the inverter 32. Then, the arithmetic unit 21 in the core 2 interprets the fetched instruction code by the decoder (interprets it as a load (LOAD) instruction with binary logic opposite to the arithmetic unit 11), and internally executes the interpreted instruction code. Data is loaded into data register R1 in memory 22. In the example of FIG. 2B, “F7” included in the instruction code (that is, the inverted value of the instruction code) whose binary logic is inverted by the inverter 32 is a load (LOAD) instruction by the decoder of the arithmetic unit 21. The data “F6” included in the inverted instruction code, which is interpreted as being, is loaded to the data register R1 (= FE) in the internal memory 22 as data to be calculated.

次に、コア1における割込みコントローラ14は、図3(A)に示すように、内部メモリ12における少なくともデータレジスタR1とデータレジスタR2からデータを取得し、割込みコントローラ24へ出力する。一方、コア2における割込みコントローラ24は、割込みコントローラ14からのデータを取得し、且つ、内部メモリ22における少なくともデータレジスタR1とデータレジスタR2からデータを取得する。そして、割込みコントローラ24は、割込みコントローラ14から取得したデータの反転値と、内部メモリ22から取得したデータの値とを比較(データ比較)する。そして、このデータ比較の結果、互いのデータが一致していない場合、割込みコントローラ14,24は、異常と判断してコア1,2の内部リセットを実行する。一方、上記データ比較の結果、互いの値が一致している場合、図3(B)に示すように、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値(“0000(h)”)を3番地先へ進め(つまり、“0003(h)”へ進め)、コア2におけるプログラムカウンタ23は、プログラムカウンタ13の値(“FFFF(h)”)を3番地先(この例では、命令コードの構成単位が3バイトとしているため)へ進める(つまり、“FFFC(h)”へ進める)。   Next, as shown in FIG. 3A, the interrupt controller 14 in the core 1 acquires data from at least the data register R1 and the data register R2 in the internal memory 12 and outputs the data to the interrupt controller 24. On the other hand, the interrupt controller 24 in the core 2 acquires data from the interrupt controller 14 and acquires data from at least the data register R1 and the data register R2 in the internal memory 22. Then, the interrupt controller 24 compares the inverted value of the data acquired from the interrupt controller 14 with the value of the data acquired from the internal memory 22 (data comparison). Then, if the result of the data comparison shows that the data of the two do not match, the interrupt controllers 14 and 24 determine that they are abnormal and execute the internal reset of the cores 1 and 2. On the other hand, as a result of the above data comparison, when the values match each other, as shown in FIG. 3B, the program counter 13 in the core 1 sets the value (“0000 (h)”) of the program counter 13 The program counter 23 in the core 2 advances the value ("FFFF (h)") of the program counter 13 to the third address (an instruction code in this example). Of the unit of 3 bytes) (ie, advance to "FFFC (h)").

次に、コア1における演算器11は、図示しないが、プログラムカウンタ13が指し示すアドレス“0003(h)”に記憶されている命令コード“0802 1(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(ロード(LOAD)命令であると解釈)し、解釈した命令コードに従って、内部メモリ12におけるデータレジスタR2にデータをロードする。一方、コア2における演算器21は、図示しないが、プログラムカウンタ23が指し示す“FFFC(h)”が反転されたアドレス“0003(h)”に記憶されている命令コード“0802 1(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(ロード(LOAD)命令であると解釈)し、解釈した命令コードに従って、内部メモリ22におけるデータレジスタR2にデータをロードする。そして、割込みコントローラ24は、命令コード“0801 09(h)”の場合と同じように内部メモリ12,22のデータ比較を行い、互いの値が一致している場合、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値(“0003(h)”)を3番地先へ進め(つまり、“0006(h)”へ進め)、コア2におけるプログラムカウンタ23は、プログラムカウンタ23の値(“FFFC(h)”)を3番地先へ進める(つまり、“FFF9(h)”へ進める)。 Next, the arithmetic unit 11 in the core 1 is not shown, but the instruction code "0802 1 1 (h)" stored in the address "0003 (h)" pointed to by the program counter 13 is transmitted from the program memory PM to the data bus Data is fetched into the instruction register via 82, the instruction code is interpreted by the decoder (interpreted as a load (LOAD) instruction), and data is loaded into the data register R2 in the internal memory 12 in accordance with the interpreted instruction code. On the other hand, the operation unit 21 in the core 2 is not shown, but the instruction code "0802 1 1 (h)" stored in the address "0003 (h)" obtained by inverting the "FFFC (h)" indicated by the program counter 23 Is fetched from the program memory PM into the instruction register via the data bus 82 and the inverter 32, and the instruction code is interpreted by the decoder (interpreted as a load (LOAD) instruction), and internally interpreted according to the interpreted instruction code. Load data into data register R2 in memory 22. Then, the interrupt controller 24 compares the data in the internal memories 12 and 22 in the same manner as in the case of the instruction code "0801 09 (h)", and when the values match each other, the program counter 13 in the core 1 The value of the program counter 13 ("0003 (h)") is advanced to the third address (that is, it advances to "0006 (h)"), and the program counter 23 in the core 2 calculates the value of the program counter 23 ("FFFC ( h) ") is advanced to the 3rd address (that is, it is advanced to" FFF 9 (h) ").

次に、コア1における演算器11は、図示しないが、プログラムカウンタ13が指し示すアドレス“0006(h)”に記憶されている命令コード“30 01 02(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(加算(ADD)命令であると解釈)する。そして、演算部11は、解釈した命令コード(この例では、加算命令)に従って、内部メモリ12におけるデータレジスタR1におけるデータ“09(h)”に、内部メモリ12におけるデータレジスタR2におけるデータ“11(h)”を加算する処理を実行し、当該処理の結果を示すデータ(第1結果データの一例)を内部メモリ12におけるデータレジスタR1に記憶する。つまり、内部メモリ12におけるデータレジスタR1のデータは、“1A(h)”に書き換えられる。一方、コア2における演算器21は、図示しないが、プログラムカウンタ23が指し示す“FFF9(h)”が反転されたアドレス“0006(h)”に記憶されている命令コード“30 01 02(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(加算(ADD)命令であると解釈)する。そして、演算部21は、解釈した命令コードに従って、内部メモリ22におけるデータレジスタR1におけるデータ“F6(h)”に、内部メモリ22におけるデータレジスタR2におけるデータ“EE(h)”を加算(演算器11とは反対の2値論理で加算)する処理を実行し、当該処理の結果を示すデータ(第2結果データの一例)を内部メモリ22に記憶する。つまり、内部メモリ12におけるデータレジスタR1のデータは、“E5(h)”に書き換えられる。   Next, the arithmetic unit 11 in the core 1 is not shown, but the instruction code “300 01 02 (h)” stored in the address “0006 (h)” pointed to by the program counter 13 is transmitted from the program memory PM to the data bus Then, the instruction code is fetched by the decoder via the instruction register 82 (interpreted as an add (ADD) instruction). Then, operation unit 11 sets data “09 (h)” in data register R1 in internal memory 12 to data “11 (data register R2 in internal memory 12” according to the interpreted instruction code (in this example, the addition instruction). h) The process of adding “” is executed, and data (an example of the first result data) indicating the result of the process is stored in the data register R1 in the internal memory 12. That is, the data of the data register R1 in the internal memory 12 is rewritten to "1A (h)". On the other hand, the operation unit 21 in the core 2 is not shown, but the instruction code "30 01 02 (h)" stored in the address "0006 (h)" obtained by inverting the "FFF 9 (h)" indicated by the program counter 23 Is fetched from the program memory PM into the instruction register via the data bus 82 and the inverter 32, and the instruction code is interpreted by the decoder (interpreted as an add (ADD) instruction). Then, operation unit 21 adds data “EE (h)” in data register R 2 in internal memory 22 to data “F 6 (h)” in data register R 1 in internal memory 22 according to the interpreted instruction code A process of adding with binary logic opposite to 11 is executed, and data (an example of second result data) indicating the result of the process is stored in the internal memory 22. That is, the data of the data register R1 in the internal memory 12 is rewritten to "E5 (h)".

次に、割込みコントローラ24は、命令コード“08 01 09(h)”の場合と同じように内部メモリ12,22のデータ比較を行い、互いの値が一致している場合、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値(“0006(h)”)を図4(A)に示すように3番地先へ進め(つまり、“0009(h)”へ進め)、コア2におけるプログラムカウンタ23は、プログラムカウンタ23の値(“FFF9(h)”)は、図4(A)に示すように3番地先へ進める(つまり、“FFF6(h)”へ進める)。   Next, the interrupt controller 24 compares data in the internal memories 12 and 22 in the same manner as in the case of the instruction code “08 01 09 (h)”, and if the values match, the program counter in core 1 13 advances the value ("0006 (h)") of the program counter 13 to the third address as shown in FIG. 4A (that is, advances to "0009 (h)"), and the program counter 23 in the core 2 The value of the program counter 23 ("FFF 9 (h)") advances to the third address as shown in FIG. 4A (that is, advances to "FFF 6 (h)").

次に、コア1における演算器11は、図4(B)に示すように、プログラムカウンタ13が指し示すアドレス“0009(h)”に記憶されている命令コード“52 01 00(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(ストア(STORE)命令であると解釈)する。一方、コア2における演算器21は、図4(B)に示すように、プログラムカウンタ23が指し示す“FFF6(h)”が反転されたアドレス“0009(h)”に記憶されている命令コード“52 01 00(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(ストア(STORE)確認命令であると解釈)する。   Next, as shown in FIG. 4B, the arithmetic unit 11 in the core 1 has the instruction code “52 01 00 (h)” stored in the address “0009 (h)” indicated by the program counter 13 as follows: The instruction code is fetched from the program memory PM to the instruction register via the data bus 82, and the instruction code is interpreted (interpreted as a STORE instruction) by the decoder. On the other hand, as shown in FIG. 4B, the arithmetic unit 21 in the core 2 stores the instruction code "" stored in the address "0009 (h)" obtained by inverting the "FFF 6 (h)" indicated by the program counter 23. 52 01 00 (h) is fetched from the program memory PM to the instruction register via the data bus 82 and the inverter 32, and the instruction code is interpreted by the decoder (interpreted as a STORE confirmation instruction).

次に、コア1における演算器11は、解釈したSTORE命令のコード体系が倍長であることを認識すると、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値(“0009(h)”)を図5(A)に示すように、3番地先へ進める(つまり、“000C(h)”へ進める)。一方、コア2における演算器21は、解釈したストア確認命令のコード体系が倍長であることを認識すると、コア2におけるプログラムカウンタ23は、プログラムカウンタ23の値(“FFF6(h)”)を図5(A)に示すように、3番地先へ進める(つまり、“FFF3(h)”へ進める)。   Next, when the arithmetic unit 11 in the core 1 recognizes that the code system of the interpreted STORE instruction is double-length, the program counter 13 in the core 1 calculates the value ("0009 (h)") of the program counter 13 As shown in FIG. 5 (A), it advances to the third address (that is, it advances to "000C (h)"). On the other hand, when the arithmetic unit 21 in the core 2 recognizes that the code system of the interpreted store confirmation instruction is double-length, the program counter 23 in the core 2 calculates the value ("FFF6 (h)") of the program counter 23 As shown in FIG. 5A, the process proceeds to the third address (that is, the process proceeds to "FFF 3 (h)").

次に、コア1における演算器11は、図5(B)に示すように、プログラムカウンタ13が指し示すアドレス“000C(h)”に記憶されているコード“1000 00(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタ(既に格納された命令コード“5201 00(h)”の後)にフェッチする。一方、コア2における演算器21は、図5(B)に示すように、プログラムカウンタ23が指し示す“FFF3(h)”が反転されたアドレス“000C(h)”に記憶されているコード“1000 00(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタ(既に格納された命令コード“ADFE FF(h)”の後)にフェッチする。 Next, as shown in FIG. 5 (B), the arithmetic unit 11 in the core 1 programs the code “ 10 00 00 (h)” stored in the address “000 C (h)” indicated by the program counter 13 It fetches from the memory PM to the instruction register (after the instruction code "5201 00 (h)" already stored) via the data bus 82. On the other hand, as shown in FIG. 5B, the arithmetic unit 21 in the core 2 stores the code " 10 " stored in the address "000C (h)" obtained by inverting the "FFF3 (h)" indicated by the program counter 23. 00 00 (h) is fetched from the program memory PM via the data bus 82 and the inverter 32 into the instruction register (after the instruction code “ AD FE FF (h)” already stored).

次に、コア1における割込みコントローラ14は、図6(A)に示すように、解釈した命令コード(この例では、ストア命令)に従って、内部メモリ12におけるデータレジスタR1におけるデータ“1A(h)”を、データバス84を介して、不揮発性メモリ5におけるデータメモリDM中の所定の記憶領域(命令コードに含まれるアドレス“0010 00 00(h)”)に書き込む処理を実行する。そして、コア2における割込みコントローラ24は、解釈した命令コード(この例では、ストア確認命令)に従って、データメモリDMに書き込まれたデータの確認処理を実行する。具体的には、割込みコントローラ24は、図6(B)に示すように、コア1によりデータメモリDMの記憶領域(命令コードに含まれるアドレス“0010 00 00(h)”)に書き込まれたデータ“1A(h)”を、データバス84及び反転器34を介して取得し、且つ、内部メモリ22におけるデータレジスタR1からデータ“E5(h)”を取得する。つまり、図6(B)に示すように、命令レジスタに格納されている“FFEF FF FF(h)”が反転器33によって2値論理が反転された後にアドレスバス83へ送出され、これに応じて、データメモリDMからデータバス84に送出されたデータが反転器34によって2値論理が反転された後に取得(この例では、データ“E5(h)”が取得)される。そして、割込みコントローラ24は、取得した互いのデータの値を比較(データ比較)し、当該データ比較の結果、互いのデータが一致していない場合、異常と判断してコア2の内部リセットを実行し、且つ、互いのデータが一致していないことを割込みコントローラ14に伝える。これにより、割込みコントローラ14は、コア1の内部リセットを実行する。一方、当該データ比較の結果、互いの値が一致している場合、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値を3番地先へ進め(つまり、“000F(h)”へ進め)、コア2におけるプログラムカウンタ23は、プログラムカウンタ13の値を3番地先へ進める(つまり、“FFF0(h)”へ進める)。以降、上記と同じように処理が進行する。 Next, as shown in FIG. 6A, the interrupt controller 14 in the core 1 follows the interpreted instruction code (in this example, a store instruction), the data “1A (h)” in the data register R1 in the internal memory 12 Is executed via the data bus 84 in a predetermined storage area (address "0010 00 00 (h)" included in the instruction code) in the data memory DM in the non-volatile memory 5. Then, the interrupt controller 24 in the core 2 executes the confirmation processing of the data written in the data memory DM according to the interpreted instruction code (in this example, the store confirmation instruction). Specifically, as shown in FIG. 6B, the interrupt controller 24 writes the data written by the core 1 to the storage area (address “0010 00 00 (h)” included in the instruction code) of the data memory DM. “1A (h)” is obtained via the data bus 84 and the inverter 34, and data “E5 (h)” is obtained from the data register R1 in the internal memory 22. That is, as shown in FIG. 6B, “FFEF FF FF (h)” stored in the instruction register is sent to the address bus 83 after the binary logic is inverted by the inverter 33, and accordingly Then, the data sent from the data memory DM to the data bus 84 is acquired after the binary logic is inverted by the inverter 34 (in this example, the data "E5 (h)" is acquired). Then, the interrupt controller 24 compares the values of the acquired data with each other (data comparison), and as a result of the data comparison, if the data do not match each other, it determines that it is abnormal and executes the internal reset of the core 2 And informs the interrupt controller 14 that their data do not match. Thereby, the interrupt controller 14 executes an internal reset of the core 1. On the other hand, as a result of the data comparison, when the values match each other, the program counter 13 in the core 1 advances the value of the program counter 13 to the third address (that is, advances to "000F (h)"), The program counter 23 in the core 2 advances the value of the program counter 13 to the third address (that is, advances to "FFF 0 (h)"). Thereafter, the process proceeds in the same manner as described above.

(実施例2)
次に、図7〜図9を参照して、実施例2について説明する。実施例2は、コア1とコア2とでデータメモリが共有されない場合の動作例である。図7〜図9は、実施例2において、プログラムメモリPMから命令コードがフェッチされ、命令コードに従って処理が実行される様子を示す図である。図7〜図9の例では、データメモリDMは、コア1用のデータメモリDM1と、コア2用のデータメモリDM2とに区分される。なお、実施例2においても、実施例1で図2及び図3を参照して説明した処理と同様の処理が行われるので、重複する説明を省略する。
(Example 2)
A second embodiment will now be described with reference to FIGS. 7 to 9. The second embodiment is an operation example when the data memory is not shared between the core 1 and the core 2. FIGS. 7 to 9 are diagrams showing how an instruction code is fetched from the program memory PM and the process is executed according to the instruction code in the second embodiment. In the examples of FIGS. 7 to 9, the data memory DM is divided into a data memory DM1 for the core 1 and a data memory DM2 for the core 2. Also in the second embodiment, the same processing as the processing described with reference to FIG. 2 and FIG. 3 in the first embodiment is performed, and thus redundant description will be omitted.

図7(A)の状態は、図4(A)の状態と同様である。コア1における演算器11は、図7(B)に示すように、プログラムカウンタ13が指し示すアドレス“0009(h)”に記憶されている命令コード“52 01 00(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈(ストア(STORE)命令であると解釈)する。一方、コア2における演算器21は、図7(B)に示すように、プログラムカウンタ23が指し示す“FFF6(h)”が反転されたアドレス“0009(h)”に記憶されている命令コード“52 01 00(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチし、当該命令コードをデコーダによって解釈する。この場合、実施例1とは異なり、命令コード“52 01 00(h)”の反転値である“AD FE FF(h)”は、ストア(STORE)命令であると解釈される。   The state of FIG. 7 (A) is the same as the state of FIG. 4 (A). As shown in FIG. 7B, the computing unit 11 in the core 1 is configured to use the program memory PM for the instruction code “52 01 00 (h)” stored at the address “0009 (h)” indicated by the program counter 13. To the instruction register via the data bus 82, and the instruction code is interpreted (interpreted as a STORE instruction) by the decoder. On the other hand, as shown in FIG. 7B, the arithmetic unit 21 in the core 2 stores the instruction code "" stored in the address "0009 (h)" obtained by inverting the "FFF 6 (h)" indicated by the program counter 23. 52 01 00 (h) ′ ′ is fetched from the program memory PM to the instruction register via the data bus 82 and the inverter 32, and the instruction code is interpreted by the decoder. In this case, unlike the first embodiment, “AD FE FF (h)” which is the inverted value of the instruction code “52 01 00 (h)” is interpreted as a store (STORE) instruction.

次に、コア1における演算器11は、解釈したSTORE命令のコード体系が倍長であることを認識すると、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値(“0009(h)”)を、図8(A)に示すように3番地先へ進める。一方、コア2における演算器21は、解釈したストア確認命令のコード体系が倍長であることを認識すると、コア2におけるプログラムカウンタ23は、プログラムカウンタ23の値(“FFF6(h)”)を図8(A)に示すように3番地先へ進める。   Next, when the arithmetic unit 11 in the core 1 recognizes that the code system of the interpreted STORE instruction is double-length, the program counter 13 in the core 1 calculates the value ("0009 (h)") of the program counter 13 As shown in FIG. 8A, advance to the third address. On the other hand, when the arithmetic unit 21 in the core 2 recognizes that the code system of the interpreted store confirmation instruction is double-length, the program counter 23 in the core 2 calculates the value ("FFF6 (h)") of the program counter 23 As shown in FIG. 8A, the process proceeds to the third address.

次に、コア1における演算器11は、図8(B)に示すように、プログラムカウンタ13が指し示すアドレス“000C(h)”に記憶されているコード“10 00 00(h)”を、プログラムメモリPMからデータバス82を介して命令レジスタにフェッチする。一方、コア2における演算器21は、図8(B)に示すように、プログラムカウンタ23が指し示す“FFF3(h)”が反転されたアドレス“000C(h)”に記憶されているコード“10 00 00(h)”を、プログラムメモリPMからデータバス82及び反転器32を介して命令レジスタにフェッチする。   Next, as shown in FIG. 8 (B), the arithmetic unit 11 in the core 1 programs the code “10 00 00 (h)” stored in the address “000 C (h)” indicated by the program counter 13 The data is fetched from the memory PM to the instruction register via the data bus 82. On the other hand, as shown in FIG. 8B, the arithmetic unit 21 in the core 2 stores the code "10" stored in the address "000C (h)" obtained by inverting the "FFF3 (h)" indicated by the program counter 23. 00 00 (h) is fetched from the program memory PM into the instruction register via the data bus 82 and the inverter 32.

次に、コア1における割込みコントローラ14は、図9(A)に示すように、解釈した命令コード(この例では、ストア命令)に従って、内部メモリ12におけるデータレジスタR1におけるデータ“1A(h)”を、データバス84を介して、不揮発性メモリ5におけるデータメモリDM1中の所定の記憶領域(命令コードに含まれるアドレス“00 10 00 00(h)”)に書き込む処理を実行する。一方、コア2における割込みコントローラ24は、解釈した命令コード(この例では、ストア命令)に従って、内部メモリ22におけるデータレジスタR1におけるデータ“E5(h)”を、データバス84及び反転器34を介して不揮発性メモリ5におけるデータメモリDM2中の所定の記憶領域(アドレス“00 10 00 00(h)”)に書き込む処理を実行する。これにより、図9(A)に示すように、反転器34により2値論理が反転されたデータ“1A(h)”が所定の記憶領域に記憶される。   Next, as shown in FIG. 9A, the interrupt controller 14 in the core 1 uses the data “1A (h)” in the data register R1 in the internal memory 12 according to the interpreted instruction code (store instruction in this example). Is executed via the data bus 84 in a predetermined storage area (address "00 10 00 00 (h)" included in the instruction code) in the data memory DM1 of the non-volatile memory 5. On the other hand, interrupt controller 24 in core 2 transmits data "E5 (h)" in data register R1 in internal memory 22 through data bus 84 and inverter 34 according to the interpreted instruction code (store instruction in this example). Then, a process of writing in a predetermined storage area (address "00 10 00 00 (h)") in the data memory DM2 in the non-volatile memory 5 is executed. As a result, as shown in FIG. 9A, data “1A (h)” whose binary logic is inverted by the inverter 34 is stored in a predetermined storage area.

次に、コア1における割込みコントローラ14は、図9(A)に示すように、データメモリDM1からデータ(ストア命令に従って書き込まれたデータ“1A(h)”)を取得し、割込みコントローラ24へ出力する。一方、コア2における割込みコントローラ24は、割込みコントローラ14からのデータを取得し、且つ、データメモリDM2からデータ(ストア命令に従って書き込まれたデータ“1A(h)”)を、データバス84及び反転器34を介して取得する。そして、割込みコントローラ24は、割込みコントローラ14から取得したデータの反転値と、データメモリDM2から取得したデータの値とを比較(データ比較)する。そして、このデータ比較の結果、互いのデータが一致していない場合、割込みコントローラ14,24は、異常と判断してコア1,2の内部リセットを実行する。一方、上記データ比較の結果、互いの値が一致している場合、コア1におけるプログラムカウンタ13は、プログラムカウンタ13の値を3番地先へ進め、コア2におけるプログラムカウンタ23は、プログラムカウンタ23の値を3番地先へ進める。以降、上記と同じように処理が進行する。 Next, as shown in FIG. 9A, the interrupt controller 14 in the core 1 acquires data (data “1A (h)” written according to the store instruction) from the data memory DM1 and outputs it to the interrupt controller 24. Do. On the other hand, the interrupt controller 24 in the core 2 acquires data from the interrupt controller 14 and converts data (data "1A (h)" written according to the store instruction) from the data memory DM2 into the data bus 84 and the inverter. Get through 34. Then, the interrupt controller 24 compares the inverted value of the data acquired from the interrupt controller 14 with the value of the data acquired from the data memory DM2 (data comparison). Then, if the result of the data comparison shows that the data of the two do not match, the interrupt controllers 14 and 24 determine that they are abnormal and execute the internal reset of the cores 1 and 2. On the other hand, the result of the data comparison, if the mutual values match, the program counter 13 in the core 1 advances the value of the program counter 13 to address 3 destination, the program counter 23 in the core 2, the program counter 23 Advance the value to address 3 forward. Thereafter, the process proceeds in the same manner as described above.

以上説明したように、上記実施形態によれば、並列処理が可能なコア1とコア2とを備えたICチップCにおいて、コア1は、不揮発性メモリ5から出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行する一方、コア2は、反転器32により2値論理が反転された命令コードを取得し、取得した命令コードを、コア1とは反対の2値論理で解釈し、解釈した命令コードに従ってコア1とは反対の2値論理で処理を実行するように構成したので、例えばロックステップと認証処理を同時に実行してもサイドチャネル情報が増長されず、高い耐タンパ性を実現することができる。つまり、コア2では、コア1における論理0と論理1の2値論理(言い換えれば、識別基準)が反転するように構成したので、コア1とコア2との並列処理において、ハミングウェイトを均一化させることができ、サイドチャネル情報が収集されることを極力防ぐことができる。   As described above, according to the above embodiment, in the IC chip C including the cores 1 and 2 capable of parallel processing, the core 1 acquires an instruction code output from the non-volatile memory 5, The core 2 interprets the acquired instruction code and executes processing according to the interpreted instruction code, while the core 2 acquires the instruction code whose binary logic is inverted by the inverter 32, and the acquired instruction code is core 1 Since the processing is performed by the binary logic opposite to that of the core 1 according to the interpreted binary code and interpreted by the opposite binary logic, for example, even if lock step and authentication processing are simultaneously executed, the side channel information remains It is possible to realize high tamper resistance without increasing the length. That is, in the core 2, since the binary logic (in other words, the identification reference) of the logic 0 and the logic 1 in the core 1 is inverted, the Hamming weight is equalized in parallel processing of the core 1 and the core 2. It is possible to prevent side channel information from being collected as much as possible.

また、実施例1では、コア2は、コア1によりデータメモリDMに書き込まれた第1結果データを反転器34により2値論理が反転された後に取得し、当該取得した第1結果データと、内部メモリ22に格納されている第2結果データとを比較し、この結果、互いのデータが一致していない場合、コア1,2の内部リセットが実行されるように構成したので、ICチップC内の故障や外部からの攻撃による異常を適切に検出することができる。   Further, in the first embodiment, the core 2 acquires the first result data written to the data memory DM by the core 1 after the binary logic is inverted by the inverter 34, and the acquired first result data, As compared with the second result data stored in the internal memory 22, as a result, when the mutual data do not match, the internal reset of the cores 1 and 2 is performed, so that the IC chip C is generated. It is possible to properly detect anomalies due to internal failures or external attacks.

また、実施例2では、コア2は、データメモリDM2に書き込んだ第2結果データを反転器34を介して取得し、且つ、コア1によりデータメモリDM1に書き込まれた第1結果データをコア1の割込みコントローラ14を介して取得し、取得した互いのデータを比較し、この結果、互いのデータが一致していない場合、コア1,2の内部リセットが実行されるように構成したので、ICチップC内の故障や外部からの攻撃による異常を適切に検出することができる。   Further, in the second embodiment, the core 2 acquires the second result data written in the data memory DM2 via the inverter 34, and the core 1 generates the first result data written in the data memory DM1. , And the obtained mutual data are compared, and as a result, when the mutual data do not match, the internal reset of the cores 1 and 2 is performed so that the IC An abnormality due to a failure in the chip C or an attack from the outside can be appropriately detected.

なお、上記実施形態においては、2つのコアを備えたICチップを例にとって説明したが、3つ以上のコアを備えるマルチコアプロセッサに対しても本発明は適用可能である。   In the above embodiment, an IC chip having two cores has been described as an example, but the present invention is also applicable to a multi-core processor having three or more cores.

1,2 コア
3 反転器
4 RAM
5 不揮発性メモリ
6 ROM
7 I/O回路
8 バス
C ICチップ
1, 2 core 3 inverter 4 RAM
5 Nonvolatile memory 6 ROM
7 I / O circuit 8 bus C IC chip

Claims (10)

命令コードを記憶する不揮発性メモリと、
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、
前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、
を備えることを特徴とする演算装置。
Non-volatile memory for storing instruction code,
The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. An arithmetic unit,
First inverting means for inverting binary logic representing the instruction code output from the non-volatile memory;
An instruction code obtained by inverting the binary logic is acquired by the first inverting means, the acquired instruction code is interpreted by the binary logic opposite to the first arithmetic unit, and the first operation is performed according to the interpreted instruction code. A second operation unit that executes processing with binary logic opposite to the unit and stores second result data indicating the result of the processing in the internal memory;
A computing device comprising:
前記不揮発性メモリは、複数の命令コードから構成される1のプログラムを記憶し、The non-volatile memory stores one program composed of a plurality of instruction codes,
前記第1演算ユニットは、前記1のプログラムに含まれる何れか1の命令コードを前記不揮発性メモリから取得し、取得した前記1の命令コードを解釈し、解釈した前記1の命令コードに従って処理を実行し、The first operation unit acquires any one instruction code included in the one program from the nonvolatile memory, interprets the acquired one instruction code, and processes according to the one instruction code interpreted. Run
前記第2演算ユニットは、前記第1演算ユニットにより取得されて解釈された前記1の命令コードの2値論理が前記第1反転手段により反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行することを特徴とする請求項1に記載の演算装置。The second operation unit acquires an instruction code obtained by the first inverting means by binary logic of the one instruction code acquired and interpreted by the first operation unit, and acquires the acquired instruction code. The operation according to claim 1, characterized in that processing is performed according to an instruction code interpreted according to the interpreted binary code opposite to the first operation unit according to the interpreted instruction code. apparatus.
命令コードを記憶する不揮発性メモリと、
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、
前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、
前記第2演算ユニットから出力された前記第2結果データを表現する2値論理を反転する第2反転手段と、
を備え、
前記不揮発性メモリは、前記第2反転手段により2値論理が反転された前記第2結果データを、所定の記憶領域に記憶することを特徴とする演算装置。
Non-volatile memory for storing instruction code,
The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. An arithmetic unit,
First inverting means for inverting binary logic representing the instruction code output from the non-volatile memory;
An instruction code obtained by inverting the binary logic is acquired by the first inverting means, the acquired instruction code is interpreted by the binary logic opposite to the first arithmetic unit, and the first operation is performed according to the interpreted instruction code. A second operation unit that executes processing with binary logic opposite to the unit and stores second result data indicating the result of the processing in the internal memory;
Second inverting means for inverting binary logic representing the second result data output from the second operation unit;
Equipped with
The nonvolatile memory, the said second result data binary logic is inverted by the second inverting means, arithmetic device you characterized in that a predetermined storage area.
命令コードを記憶する不揮発性メモリと、
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ユニットと、
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転する第1反転手段と、
前記第1反転手段により2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ユニットとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ユニットとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ユニットと、
を備える演算装置であって、
前記第1演算ユニットは、前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込み、
前記演算装置は、前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転する第3反転手段を更に備え、
前記第2演算ユニットは、前記第3反転手段により2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較することを特徴とする演算装置。
Non-volatile memory for storing instruction code,
The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. An arithmetic unit,
First inverting means for inverting binary logic representing the instruction code output from the non-volatile memory;
An instruction code obtained by inverting the binary logic is acquired by the first inverting means, the acquired instruction code is interpreted by the binary logic opposite to the first arithmetic unit, and the first operation is performed according to the interpreted instruction code. A second operation unit that executes processing with binary logic opposite to the unit and stores second result data indicating the result of the processing in the internal memory;
A computing device comprising
The first operation unit writes the first result data to a predetermined storage area in the non-volatile memory,
The arithmetic unit further comprises third inverting means for inverting binary logic representing the first result data output from the non-volatile memory,
The second operation unit is characterized in that it acquires the first result data whose binary logic is inverted by the third inverting means, and compares the acquired first result data with the second result data. It is that arithmetic unit.
命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、
を含むことを特徴とする演算方法。
An arithmetic method in an arithmetic device provided with a non-volatile memory storing an instruction code, the arithmetic method comprising:
The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
Inverting binary logic representing the instruction code output from the non-volatile memory;
The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
A computing method characterized by including.
命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、An arithmetic method in an arithmetic device provided with a non-volatile memory storing an instruction code, the arithmetic method comprising:
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、Inverting binary logic representing the instruction code output from the non-volatile memory;
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
前記第2結果データを表現する2値論理を反転するステップと、Inverting the binary logic representing the second result data;
前記2値論理が反転された前記第2結果データを、前記不揮発性メモリにおける所定の記憶領域に記憶するステップと、Storing the second result data obtained by inverting the binary logic in a predetermined storage area of the non-volatile memory;
を含むことを特徴とする演算方法。A computing method characterized by including.
命令コードを記憶する不揮発性メモリを備える演算装置における演算方法であって、An arithmetic method in an arithmetic device provided with a non-volatile memory storing an instruction code, the arithmetic method comprising:
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、Inverting binary logic representing the instruction code output from the non-volatile memory;
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込むステップと、Writing the first result data to a predetermined storage area in the non-volatile memory;
前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転するステップと、Inverting binary logic representing the first result data output from the non-volatile memory;
前記2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較するステップと、Acquiring the first result data obtained by inverting the binary logic, and comparing the acquired first result data with the second result data;
を含むことを特徴とする演算方法。A computing method characterized by including.
命令コードを記憶する不揮発性メモリを備えるコンピュータに、
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、
を実行させることを特徴とする演算処理プログラム。
To a computer comprising a non-volatile memory storing instruction codes;
The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
Inverting binary logic representing the instruction code output from the non-volatile memory;
The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
An arithmetic processing program characterized by performing.
命令コードを記憶する不揮発性メモリを備えるコンピュータに、To a computer comprising a non-volatile memory storing instruction codes;
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、Inverting binary logic representing the instruction code output from the non-volatile memory;
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
前記第2結果データを表現する2値論理を反転するステップと、Inverting the binary logic representing the second result data;
前記2値論理が反転された前記第2結果データを、前記不揮発性メモリにおける所定の記憶領域に記憶するステップと、Storing the second result data obtained by inverting the binary logic in a predetermined storage area of the non-volatile memory;
を実行させることを特徴とする演算処理プログラム。An arithmetic processing program characterized by performing.
命令コードを記憶する不揮発性メモリを備えるコンピュータに、To a computer comprising a non-volatile memory storing instruction codes;
前記不揮発性メモリから出力された命令コードを取得し、取得した命令コードを解釈し、解釈した命令コードに従って処理を実行し、当該処理の結果を示す第1結果データを内部メモリに記憶する第1演算ステップと、The instruction code output from the non-volatile memory is acquired, the acquired instruction code is interpreted, processing is executed according to the interpreted instruction code, and the first result data indicating the result of the processing is stored in the internal memory. Operation step,
前記不揮発性メモリから出力された前記命令コードを表現する2値論理を反転するステップと、Inverting binary logic representing the instruction code output from the non-volatile memory;
前記2値論理が反転された命令コードを取得し、取得した命令コードを、前記第1演算ステップとは反対の2値論理で解釈し、解釈した命令コードに従って前記第1演算ステップとは反対の2値論理で処理を実行し、当該処理の結果を示す第2結果データを内部メモリに記憶する第2演算ステップと、The instruction code obtained by inverting the binary logic is acquired, and the acquired instruction code is interpreted by binary logic opposite to the first operation step, and the operation code is inverted according to the interpreted instruction code. A second operation step of executing processing in binary logic and storing second result data indicating the result of the processing in the internal memory;
前記第1結果データを前記不揮発性メモリにおける所定の記憶領域に書き込むステップと、Writing the first result data to a predetermined storage area in the non-volatile memory;
前記不揮発性メモリから出力された前記第1結果データを表現する2値論理を反転するステップと、Inverting binary logic representing the first result data output from the non-volatile memory;
前記2値論理が反転された前記第1結果データを取得し、取得した第1結果データと、前記第2結果データとを比較するステップと、Acquiring the first result data obtained by inverting the binary logic, and comparing the acquired first result data with the second result data;
を実行させることを特徴とする演算処理プログラム。An arithmetic processing program characterized by performing.
JP2014114810A 2014-06-03 2014-06-03 Arithmetic device, arithmetic method, and arithmetic processing program Active JP6424473B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014114810A JP6424473B2 (en) 2014-06-03 2014-06-03 Arithmetic device, arithmetic method, and arithmetic processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014114810A JP6424473B2 (en) 2014-06-03 2014-06-03 Arithmetic device, arithmetic method, and arithmetic processing program

Publications (2)

Publication Number Publication Date
JP2015230495A JP2015230495A (en) 2015-12-21
JP6424473B2 true JP6424473B2 (en) 2018-11-21

Family

ID=54887262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014114810A Active JP6424473B2 (en) 2014-06-03 2014-06-03 Arithmetic device, arithmetic method, and arithmetic processing program

Country Status (1)

Country Link
JP (1) JP6424473B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0740348U (en) * 1993-12-29 1995-07-18 株式会社京三製作所 Electronic interlocking device
JP3456894B2 (en) * 1998-06-09 2003-10-14 株式会社山武 Sequence controller
US8516356B2 (en) * 2010-07-20 2013-08-20 Infineon Technologies Ag Real-time error detection by inverse processing

Also Published As

Publication number Publication date
JP2015230495A (en) 2015-12-21

Similar Documents

Publication Publication Date Title
US20170289193A1 (en) Secure smart terminal and an information processing method
TWI619019B (en) Security chip, non-volatile memory control device and non-volatile memory control method
EP2367133B1 (en) Method for checking data consistency in a system on chip
CN104850777A (en) Using authenticated manifests to enable external certification of multi-processor platforms
US20190087584A1 (en) Controlled starting of an electronic circuit
CN101984449B (en) Smart card COS operating system
CN117688622A (en) Trusted computing chip based on blockchain
US10223117B2 (en) Execution flow protection in microcontrollers
US20200371487A1 (en) Operational policies of industrial field devices and distributed databases
EP2817755B1 (en) Directed wakeup into a secured system environment
JP2006522968A (en) Control execution of programs for virtual machines on portable data carriers
CN110851188A (en) Domestic PLC trusted chain implementation device and method based on binary architecture
CN107209840B (en) Secure transactions with connected peripherals
CN104459519A (en) Chip safety testing method and device
US11652662B2 (en) Speculative and accelerated classification based on incomplete feature sets
CN113849238A (en) Data communication method, device, electronic equipment and readable storage medium
JP6424473B2 (en) Arithmetic device, arithmetic method, and arithmetic processing program
US9912471B2 (en) Method for operating a portable data carrier, and such a portable data carrier
US9898301B2 (en) Framework to provide time bound execution of co-processor commands
US9652232B2 (en) Data processing arrangement and method for data processing
CN115516483A (en) Techniques to store and process data for transaction attempts through transaction cards
JP6340935B2 (en) IC chip, abnormality detection processing method, and program
JP6493672B2 (en) Electronic information storage medium, abnormality detection method, abnormality detection program, and IC card
US11645185B2 (en) Detection of faults in performance of micro instructions
JP6358019B2 (en) Arithmetic apparatus, arithmetic method, and arithmetic program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170425

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180413

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: 20180925

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181008

R150 Certificate of patent or registration of utility model

Ref document number: 6424473

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150