JP2017004060A - Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system - Google Patents

Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system Download PDF

Info

Publication number
JP2017004060A
JP2017004060A JP2015114182A JP2015114182A JP2017004060A JP 2017004060 A JP2017004060 A JP 2017004060A JP 2015114182 A JP2015114182 A JP 2015114182A JP 2015114182 A JP2015114182 A JP 2015114182A JP 2017004060 A JP2017004060 A JP 2017004060A
Authority
JP
Japan
Prior art keywords
arithmetic processing
processing system
core
program
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015114182A
Other languages
Japanese (ja)
Inventor
誠悟 村重
Seigo Murashige
誠悟 村重
淳史 倉内
Junji Kurauchi
淳史 倉内
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor 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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2015114182A priority Critical patent/JP2017004060A/en
Publication of JP2017004060A publication Critical patent/JP2017004060A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent an unauthorized program from being executed due to a memory error, intentional alteration, or the like in an arithmetic processing system.SOLUTION: An arithmetic processing system includes: a plurality of arithmetic processing circuits each of which performs arithmetic processing; and memories in which programs that are respectively executed by the arithmetic processing circuits are stored. Each of the arithmetic processing circuits is configured to execute code error check for a storage region in one of the memories in which a program of each different other one of the arithmetic processing circuits is stored.SELECTED DRAWING: Figure 1

Description

本発明は、複数の演算処理部を備える演算処理システム、マルチコアシステム、及びマルチプロセッサシステムに関し、特に、メモリエラーや意図的改ざん等による不正なプログラムが実行されるのを未然に防ぐことのできる、信頼性の高いプログラムチェック機能を有する演算処理システム、マルチコアシステム、及びマルチプロセッサシステムに関する。   The present invention relates to an arithmetic processing system including a plurality of arithmetic processing units, a multicore system, and a multiprocessor system, and in particular, can prevent an unauthorized program from being executed due to a memory error, intentional alteration, or the like. The present invention relates to an arithmetic processing system, a multi-core system, and a multi-processor system having a highly reliable program check function.

従来、CPU(中央処理装置、Central Processing Unit)等の演算処理装置において、メモリエラーや意図的改ざん等による不正なプログラムが実行されるのを未然に防ぐため、プログラムの実行前に当該プログラムの健全性、特にプログラムメモリ内の記憶内容に誤りを生じていないことをチェックする技術として、メモリ内におけるプログラム格納領域を複数のブロックに分割し、当該分割したブロック毎に、当該ブロック内に記憶されている全てのデータ符号値(即ち、コマンドコード等を表す符号データを含む全てのデータ符号値)の総和の2の補数を予め当該ブロックのチェックサム(check sum)として算出して記憶しておくことが知られている。これにより、CPUが起動されるごとに、各ブロック毎に、当該各ブロックの全データ符号値の総和を算出し、当該算出した符号値の総和を上記予め記憶したチェックサムと加算した値が0であればプログラムは健全であり(即ち、データ符号値誤りがなく不正なプログラムでない)、0でなければ健全でない(即ち、誤りがあって不正なプログラムである)と判断される。   Conventionally, in an arithmetic processing unit such as a CPU (Central Processing Unit), in order to prevent an unauthorized program from being executed due to a memory error or intentional alteration, In particular, as a technique for checking that there is no error in the stored contents in the program memory, the program storage area in the memory is divided into a plurality of blocks, and each divided block is stored in the block. The 2's complement of the sum of all data code values (that is, all data code values including code data representing a command code, etc.) is calculated and stored in advance as a check sum of the block. It has been known. Thus, every time the CPU is activated, the sum of all the data code values of each block is calculated for each block, and the sum of the calculated code values and the previously stored checksum is 0. If so, it is determined that the program is healthy (that is, there is no data code value error and is not an illegal program), and if it is not 0, the program is not healthy (that is, there is an error and the program is invalid).

しかしながら、加算値の算出に用いたデータ符号の中に誤りを有するデータ符号が複数存在する場合には、当該加算値とチェックサムとの加算によって符号誤りの存在を検出できる確率は必ずしも十分高いとは言えない。このため、単にブロック毎のデータ符号加算値を用いる上記従来の技術は、誤り検出の方式としての必ずしも信頼性が高いとは言えない。また、同様の理由から、チェックサムとの加算結果が0となるようにプログラムを改ざんしてしまうことも可能であり、意図的な改善に対する耐性も低い。   However, when there are a plurality of data codes having errors in the data code used to calculate the added value, the probability that the presence of a code error can be detected by adding the added value and the checksum is necessarily high. I can't say that. For this reason, it cannot be said that the above-mentioned conventional technique that simply uses the data code addition value for each block is necessarily reliable as an error detection method. For the same reason, it is possible to alter the program so that the addition result with the checksum becomes 0, and the resistance to intentional improvement is low.

上記背景より、演算処理システムにおいて、メモリエラーや意図的改ざん等による不正なプログラムが実行されるのを未然に防ぐことのできる構成の実現が望まれている。   From the above background, it is desired to realize a configuration that can prevent an unauthorized program from being executed due to a memory error, intentional tampering, or the like in an arithmetic processing system.

本発明の一の態様は、それぞれが演算処理を行う複数の演算処理回路と、前記演算処理回路のそれぞれが実行するそれぞれのプログラムが記憶されたメモリと、を備える演算処理システムであって、前記演算処理回路のそれぞれは、それぞれ異なる他の一つの前記演算処理回路のプログラムが記憶された前記メモリ内の記憶領域の符号誤りチェックを実行するよう構成されている。
本発明の他の態様によると、前記演算処理回路のそれぞれは、前記記憶領域にあるデータ符号を2以上の次元のマトリクスを構成するように並べた仮想配列空間に対し、少なくとも2つの異なる方向に沿って前記記憶領域に記憶されたデータ符号値を加算して得た複数の加算値を用いて前記符号誤りチェックを実行するよう構成されている。
本発明の他の態様によると、前記符号誤りチェックは、前記加算値に対応するチェックサムを用いて行われる。
本発明の他の態様によると、前記チェックサムは、前記加算値を表す2真値の、所定の桁数の下位ビットに対応するチェックサムである。
本発明の他の態様によると、前記演算処理回路はプロセッサであって、前記演算処理システムはマルチプロセッサシステムとして構成されている。
本発明の他の態様によると、前記演算処理回路は、プロセッサに集積されたプロセッサコアであって、前記演算処理システムはマルチコアシステムとして構成されている。
本発明の他の態様は、上記に記載のいずれかの演算処理システムを備えた、車両制御を行う電子制御装置である。
本発明の更に他の態様は、それぞれが演算処理を行う複数の演算処理回路と、前記演算処理回路のそれぞれが実行するそれぞれのプログラムが記憶されたメモリと、を備える演算処理システムにおけるプログラムデータ符号値の誤りチェック方法であって、当該方法は、前記演算処理回路のそれぞれが、それぞれ異なる他の一つの前記演算処理回路のプログラムが記憶された前記メモリ内の記憶領域のデータ符号を、2以上の次元のマトリクスを構成するように並べて仮想配列空間を構成するステップと、前記演算処理回路のそれぞれが、少なくとも2つの異なる方向に沿って前記記憶領域に記憶されたデータ符号値を加算して複数の加算値を算出するステップと、前記演算処理回路のそれぞれが、前記算出された加算値と、当該加算値に対応するチェックサムと、を用いて前記プログラムデータ符号値に誤りがないことを検証するステップと、を有する。
One aspect of the present invention is an arithmetic processing system comprising a plurality of arithmetic processing circuits each performing arithmetic processing, and a memory storing each program executed by each of the arithmetic processing circuits, Each of the arithmetic processing circuits is configured to execute a code error check of a storage area in the memory in which a program of another different arithmetic processing circuit is stored.
According to another aspect of the present invention, each of the arithmetic processing circuits is arranged in at least two different directions with respect to a virtual array space in which data codes in the storage area are arranged so as to form a matrix of two or more dimensions. The code error check is executed using a plurality of addition values obtained by adding the data code values stored in the storage area along the line.
According to another aspect of the invention, the code error check is performed using a checksum corresponding to the added value.
According to another aspect of the present invention, the checksum is a checksum corresponding to a low-order bit of a predetermined number of two true values representing the added value.
According to another aspect of the present invention, the arithmetic processing circuit is a processor, and the arithmetic processing system is configured as a multiprocessor system.
According to another aspect of the present invention, the arithmetic processing circuit is a processor core integrated in a processor, and the arithmetic processing system is configured as a multi-core system.
Another aspect of the present invention is an electronic control device that performs vehicle control and includes any of the arithmetic processing systems described above.
According to still another aspect of the present invention, there is provided a program data code in an arithmetic processing system comprising: a plurality of arithmetic processing circuits each performing arithmetic processing; and a memory storing each program executed by each of the arithmetic processing circuits. A value error check method, wherein each of the arithmetic processing circuits sets two or more data codes in a storage area in the memory in which a program of another different arithmetic processing circuit is stored. Arranging the virtual array space by arranging so as to form a matrix of a plurality of dimensions, and each of the arithmetic processing circuits adds a plurality of data code values stored in the storage area along at least two different directions. Each of the calculation processing circuit and the arithmetic processing circuit is configured to calculate the added value and the added value. Has a step of verifying that there is no error in the program data code value by using a checksum, a to, a.

本発明の一実施形態に係るマルチコアシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the multi-core system which concerns on one Embodiment of this invention. 本発明の一実施形態に係るマルチコアシステムにおける、符号誤りチェック処理の手順を示すフロー図である。It is a flowchart which shows the procedure of the code error check process in the multi-core system which concerns on one Embodiment of this invention. 図2に示す符号誤りチェック処理に用いる、データ符号の仮想配列空間の構成を説明するための説明図である。It is explanatory drawing for demonstrating the structure of the virtual arrangement | sequence space of a data code used for the code error check process shown in FIG. 図2に示す符号誤りチェック処理における、図3(a)に示す仮想配列空間についての行方向及び列方向に沿ったデータ符号値の加算処理を模式的に示した図である。FIG. 3 is a diagram schematically showing addition processing of data code values along the row direction and the column direction for the virtual array space shown in FIG. 3A in the code error check processing shown in FIG. 2. 図2に示す符号誤りチェック処理における、図3(a)に示す仮想配列空間についての2つの対角方向に沿ったデータ符号値の加算処理を模式的に示した図である。FIG. 4 is a diagram schematically showing an addition process of data code values along two diagonal directions for the virtual array space shown in FIG. 3A in the code error check process shown in FIG. 2.

以下、図面を参照して、本発明の実施の形態を説明する。本発明の実施形態としてここに示す演算処理システムは、1チップの半導体に集積された、演算処理部であるプロセッサコアを複数備えたマルチコアシステムであって、例えば車両に搭載される電子制御装置内で用いられて当該車両の動作の少なくとも一つを制御するための処理を実行する。ただし、本発明の演算処理システムは、マルチコアシステムに限らず、例えば複数の個別チップのプロセッサ(例えばCPU)を備えたマルチプロセッサシステム等として実施することもでき、且つ、車両用の電子制御装置に限らず、広く一般の電子装置に用いることができる。   Embodiments of the present invention will be described below with reference to the drawings. The arithmetic processing system shown here as an embodiment of the present invention is a multi-core system including a plurality of processor cores, which are arithmetic processing units, integrated in a one-chip semiconductor, for example, in an electronic control device mounted on a vehicle Used to control at least one of the operations of the vehicle. However, the arithmetic processing system according to the present invention is not limited to a multi-core system, and can be implemented as, for example, a multi-processor system including a plurality of individual chip processors (for example, CPUs). The present invention is not limited to this and can be widely used for general electronic devices.

図1は、本発明の一実施形態に係るマルチコアシステムの構成を示すブロック図である。
本マルチコアシステム100は、例えば車両に搭載されて当該車両の動作を制御する電子制御装置内に用いられ、演算を実行する第1コア102及び第2コア104と、第1コア102が実行するプログラムが記憶された第1メモリ106及び第2コア104が実行するプログラムが記憶された第2メモリ108と、第1コア102及び第2コア104が処理を行う際にデータを一時記憶する第3メモリ110と、周辺装置との間でデータ等の入出力を行うための入出力(I/O)ポート回路112と、周辺装置との間で通信を行うための通信インタフェース(通信I/F)回路114と、これらの構成要素間でデータ授受を行うためのバス116と、を備える。
FIG. 1 is a block diagram showing a configuration of a multi-core system according to an embodiment of the present invention.
The multi-core system 100 is used in, for example, an electronic control device that is mounted on a vehicle and controls the operation of the vehicle, and executes a first core 102 and a second core 104 that execute calculations, and a program that the first core 102 executes. Is stored in the first memory 106 and the second memory 108 in which the program executed by the second core 104 is stored, and the third memory temporarily stores data when the first core 102 and the second core 104 perform processing. 110 and an input / output (I / O) port circuit 112 for inputting / outputting data and the like between the peripheral device and a communication interface (communication I / F) circuit for communicating with the peripheral device 114 and a bus 116 for exchanging data between these components.

第1コア102及び第2コア104のそれぞれは、例えば、論理演算や四則演算等の算術処理を行うALU(演算装置、Arithmetic Logic Unit)、上記プログラムに記述された各コマンドに応じた処理をALUにおいて行うためのマイクロプログラムが保存されたメモリ、及びALUの演算処理に用いるデータ符号値を一時保存するレジスタ、等々により構成されている。   Each of the first core 102 and the second core 104 has, for example, an ALU (arithmetic unit, arithmetic logic unit) that performs arithmetic processing such as logical operation or four arithmetic operations, and performs processing according to each command described in the program. And a memory for storing a microprogram to be executed in the memory, a register for temporarily storing a data code value used for ALU arithmetic processing, and the like.

第1メモリ106及び第2メモリ108は、例えばROM(Read Only Memory)及び又は不揮発性メモリ(フラッシュメモリ等)で構成され、それぞれ第1コア102及び第2コア104が実行するプログラムが予め記憶されている。また、第3メモリ110は、例えばRAM(Random Access Memory)及び又は不揮発性メモリ(フラッシュメモリ等)で構成される。   The first memory 106 and the second memory 108 are composed of, for example, a ROM (Read Only Memory) and / or a nonvolatile memory (flash memory or the like), and programs to be executed by the first core 102 and the second core 104 are stored in advance. ing. The third memory 110 is composed of, for example, a RAM (Random Access Memory) and / or a nonvolatile memory (flash memory or the like).

I/Oポート回路112は、一つ又は複数の例えば1ビットの入力ラインで構成されたポート118、及び又は、一つ又は複数の例えば1ビットの出力ラインで構成された出力ポート120を備え、入力ポート118からの入力をバス116に出力し、及び又はバス116から与えられるデータに基づいて出力ポート120から出力する信号を制御する。   The I / O port circuit 112 includes a port 118 configured by one or a plurality of, for example, 1-bit input lines, and / or an output port 120 configured by one or a plurality of, for example, 1-bit output lines, An input from the input port 118 is output to the bus 116 and / or a signal output from the output port 120 is controlled based on data provided from the bus 116.

通信I/F回路114は、例えばSPI(Serial Peripheral Interface)通信を行うためのインタフェース回路である。   The communication I / F circuit 114 is an interface circuit for performing, for example, SPI (Serial Peripheral Interface) communication.

マルチコアシステム100は、電源が供給されると(又は、例えばI/Oポート回路112の入力ポート118の一つを介してリセット信号が与えられると)、第1コア102が第1メモリ106に記憶されたプログラムに従って、第2メモリ108に記憶された第2コア104用のプログラムの記憶領域のデータ符号の記憶誤り(以下、符号誤り)をチェックすると共に、第2コア104は、第2メモリ108に記憶されたプログラムに従って、第1メモリ106に記憶された第1コア102用のプログラムの記憶領域の符号誤りをチェックする。ここで、プログラム記憶領域の符号誤りのチェック(以下、「符号誤りチェック」ともいう)とは、当該記憶領域に記憶されたデータ符号が、当該記憶領域に記憶された当初の内容から変化しているか否かをチェックすることをいい、プログラム記憶領域のデータ符号とは、コマンドコードや引数などのプログラムコードを表す符号データを含む、当該記憶領域に記憶されている全てのデータ符号をいうものとする。   When power is supplied to the multi-core system 100 (or, for example, when a reset signal is given via one of the input ports 118 of the I / O port circuit 112), the first core 102 stores in the first memory 106. In accordance with the programmed program, the storage error of the data code in the storage area of the program for the second core 104 stored in the second memory 108 (hereinafter referred to as a code error) is checked, and the second core 104 In accordance with the program stored in (1), the code error in the storage area of the program for the first core 102 stored in the first memory 106 is checked. Here, the code error check in the program storage area (hereinafter also referred to as “code error check”) means that the data code stored in the storage area is changed from the original content stored in the storage area. The data code of the program storage area means all data codes stored in the storage area including code data representing the program code such as command codes and arguments. To do.

次に、符号誤りチェック処理の手順について、図3〜図5を参照しつつ、図2に示すフロー図に従って説明する。なお、第1コア102及び第2コア104における符号誤りチェック処理は、それぞれ第2メモリ108及び第1メモリ106を対象として同様の手順で行われる。以下では、説明が冗長となるのを避けるため、第1コア102における符号誤りチェック処理を例にとって説明する。   Next, the procedure of the code error check process will be described according to the flowchart shown in FIG. 2 with reference to FIGS. The code error check process in the first core 102 and the second core 104 is performed in the same procedure for the second memory 108 and the first memory 106, respectively. In the following, in order to avoid redundant description, the code error check process in the first core 102 will be described as an example.

マルチコアシステム100に電源が供給されるか、又は例えばI/Oポート回路112の入力ポート118の一つを介してリセット信号が与えられると、まず、第1コア102は、第2メモリ108のプログラム記憶領域内に記憶されている全てのデータ符号を、仮想的にマトリクス状に配列して、例えば2次元の仮想配列空間を構成する(S100)。具体的には、例えば、当該プログラム記憶領域を所定数のデータ符号で構成される複数のブロックに分割し、当該ブロックのそれぞれを行として、これらのブロックを列方向に並べた仮想配列空間を構成する。   When power is supplied to the multi-core system 100 or when a reset signal is given, for example, via one of the input ports 118 of the I / O port circuit 112, the first core 102 first programs the second memory 108. All the data codes stored in the storage area are virtually arranged in a matrix to form, for example, a two-dimensional virtual array space (S100). Specifically, for example, the program storage area is divided into a plurality of blocks composed of a predetermined number of data codes, and a virtual array space is formed in which the blocks are arranged in rows and arranged in the column direction. To do.

さらに具体的には、この仮想配列空間は、プログラム記憶領域内のデータ符号格納場所を表す記憶アドレスを要素とする2次元配列表現を、例えばプログラム内に予め記述しておき、当該記憶アドレスの2次元配列表現に従って構成することができる。なお、本実施形態では、プログラム記憶領域内に記憶された各データ符号の符号長は、1ワード(2バイト、16ビット)とする。ただし、1ワードより長い又は短い長さのデータ符号が用いられるものとしてもよい。   More specifically, in this virtual array space, a two-dimensional array expression having a storage address representing a data code storage location in the program storage area as an element is described in advance in the program, for example, and 2 of the storage address is stored. It can be configured according to a dimensional array representation. In the present embodiment, the code length of each data code stored in the program storage area is 1 word (2 bytes, 16 bits). However, a data code having a length longer or shorter than one word may be used.

図3は、プログラム記憶領域に記憶されたデータ符号を2次元マトリクス状に配列した仮想配列空間を説明するための説明図である。図3(a)には、例えば100個のデータ符号(図には16進値で示している)で構成されるプログラム記憶領域を10個のデータ符号で構成される10個のブロックに分割し、当該ブロックのそれぞれを行として、これらのブロックを列方向に並べることで、図示のように10×10の仮想配列空間が構成されている。そして、この仮想配列空間は、図3(b)に示すような、プログラム記憶領域のアドレスを要素とする10×10の2次元配列をプログラム内に記述しておくことにより、当該2次元配列に従って行うことができる。なお、図3に示す仮想配列空間は一例であって、行方向及び列方向に並ぶデータ符号値の数は、任意に決定して構成することができる。   FIG. 3 is an explanatory diagram for explaining a virtual array space in which data codes stored in the program storage area are arranged in a two-dimensional matrix. In FIG. 3A, for example, a program storage area composed of 100 data codes (indicated by hexadecimal values in the figure) is divided into 10 blocks composed of 10 data codes. The 10 × 10 virtual array space is configured as shown in the figure by arranging these blocks in the column direction with each of the blocks as a row. This virtual array space is described in accordance with the two-dimensional array by describing a 10 × 10 two-dimensional array having the address of the program storage area as an element as shown in FIG. It can be carried out. Note that the virtual array space shown in FIG. 3 is an example, and the number of data code values arranged in the row direction and the column direction can be arbitrarily determined and configured.

図2に戻り、次に、第1コア102は、上記2次元の仮想配列空間において、行方向にデータ符号値を加算して各行のデータ符号値の総和(加算値)を算出して記憶し(S102)、上記2次元の仮想配列空間において、列方向にデータ符号値を加算して各列のデータ符号値の総和(加算値)を算出して記憶する(S104)。   Returning to FIG. 2, next, the first core 102 adds the data code values in the row direction in the two-dimensional virtual array space to calculate and store the sum (added value) of the data code values of each row. (S102) In the two-dimensional virtual array space, the data code values are added in the column direction, and the sum (added value) of the data code values of each column is calculated and stored (S104).

図4は、図3(a)に示す仮想配列空間における行方向及び列方向に沿ったデータ符号値の加算処理を模式的に示した図である。図示の黒い実線矢印は加算方向を示しており、10個の行毎の加算値と、10個の列毎の加算値と、が算出されて記憶される。なお、算出された加算値のデータ長が1ワードを超えるときは、当該算出された値の下位1ワードのデータ符号値を算出結果として記憶する。すなわち、算出した加算値の所定の桁数(本実施形態では16ビット)の下位ビットを記憶する。また、算出した各加算値は、例えば第3メモリ110に記憶されるものとすることができる。   FIG. 4 is a diagram schematically showing a data code value addition process along the row direction and the column direction in the virtual array space shown in FIG. The black solid line arrow in the figure indicates the addition direction, and an addition value for every 10 rows and an addition value for every 10 columns are calculated and stored. When the data length of the calculated added value exceeds 1 word, the data code value of the lower 1 word of the calculated value is stored as the calculation result. That is, the lower bits of a predetermined number of digits (16 bits in this embodiment) of the calculated added value are stored. Further, each calculated addition value can be stored in the third memory 110, for example.

図2に戻り、さらに、第1コア102は、上記2次元の仮想配列空間において、第1の対角方向(例えば、図2(a)における図示左上から図示右下へ向かう対角方向)に沿って、当該第1の対角方向に並んだデータ符号の各サブセットについて、サブセット毎のデータ符号の加算値を算出して記憶し(S106)、第2の対角方向(例えば、図2(a)における図示右上から図示左下へ向かう対角方向)に沿って、当該第2の対角方向に並んだデータ符号の各サブセットについて、サブセット毎のデータ符号の加算値を算出して記憶する(S108)。   Returning to FIG. 2, the first core 102 further has a first diagonal direction (for example, a diagonal direction from the upper left to the lower right in FIG. 2A) in the two-dimensional virtual array space. Then, for each subset of data codes arranged in the first diagonal direction, an addition value of the data code for each subset is calculated and stored (S106), and the second diagonal direction (for example, FIG. For each subset of data codes arranged in the second diagonal direction along the diagonal direction from the upper right in the figure to the lower left in the figure), an addition value of the data code for each subset is calculated and stored ( S108).

図5は、図3(a)に示す仮想配列空間における第1及び第2の対角方向に沿ったデータ符号値の加算処理を模式的に示した図である。第1及び第2の対角方向のそれぞれについて19個のデータ符号のサブセットが存在し、第1の対角方向に沿うデータ符号サブセット毎の19個の加算値と、第2の対角方向に沿うデータ符号サブセット毎の19個の加算値と、が算出されて記憶される。なお、前述したように、算出された加算値のデータ長が1ワードを超えるときは、当該算出された値の下位1ワードのデータ符号値を算出結果とする。また、加算値は、例えば第3メモリ110に記憶されるものとすることができる。   FIG. 5 is a diagram schematically showing an addition process of data code values along the first and second diagonal directions in the virtual array space shown in FIG. There are 19 data code subsets for each of the first and second diagonal directions, 19 additional values for each data code subset along the first diagonal direction, and a second diagonal direction. 19 added values for each data code subset along are calculated and stored. As described above, when the data length of the calculated added value exceeds 1 word, the data code value of the lower 1 word of the calculated value is used as the calculation result. Further, the added value can be stored in the third memory 110, for example.

図2に戻り、次に、第1コア102は、ステップS102からS108において記憶した加算値と、当該加算値に対応するチェックサムとを用いて、プログラム記憶領域に記憶されているデータ符号に記憶誤りがあるか否かをチェックする(S110)。これにより、プログラム記憶領域に記憶されているプログラムの健全性が検証される。具体的には、プログラムを第2メモリ108にインストールした際に、上記行方向、列方向、第1の対角方向、及び第2の対角方向における各加算値を算出し、例えば当該加算値のそれぞれの2の補数を、各方向における各加算値に対応するチェックサムとして記憶しておき、ステップS102〜S108において算出した各加算値と、当該各加算値にそれぞれ対応するチェックサムとを加算して、各加算値についてのチェックサムとの加算結果が全て0であれば、データ符号の記憶誤りはないものと判断することができる。なお、チェックサムは、第2メモリ108にインストールされるプログラム内に記述しておくか、又は第3メモリ110を構成する非揮発性メモリに記憶しておくものとすることができる。   Returning to FIG. 2, next, the first core 102 stores the data value stored in the program storage area using the addition value stored in steps S <b> 102 to S <b> 108 and the checksum corresponding to the addition value. It is checked whether there is an error (S110). Thereby, the soundness of the program stored in the program storage area is verified. Specifically, when the program is installed in the second memory 108, the respective addition values in the row direction, the column direction, the first diagonal direction, and the second diagonal direction are calculated. Is stored as a checksum corresponding to each addition value in each direction, and each addition value calculated in steps S102 to S108 is added to the checksum corresponding to each addition value. If all the addition results with the checksum for each added value are 0, it can be determined that there is no data code storage error. The checksum can be described in a program installed in the second memory 108 or stored in a non-volatile memory that constitutes the third memory 110.

そして、第1コア102は、プログラム記憶領域に記憶されているデータ符号値に記憶誤りがあるときは(S110、Yes)、異常時処理を行い(S112)、記憶誤りがないときは(S110、No)、本処理を正常終了する。   When there is a storage error in the data code value stored in the program storage area (S110, Yes), the first core 102 performs an abnormal process (S112), and when there is no storage error (S110, No), this process ends normally.

なお、前述のとおり、第2コア104においても、第1メモリ106内のプログラム記憶領域に対して本処理と同様の処理を行い、第1メモリ106内のプログラム記憶領域における符号誤りをチェックする。そして、第1コア102による第2メモリ108についての符号誤りチェック処理、及び第2コア104による第1メモリ106についての符号誤りチェック処理がいずれも正常終了したときは、これらの処理により符号誤りがないことが確認された第1メモリ106内及び第2メモリ108内のプログラムに従って、それぞれ第1コア102及び第2コア104が、本マルチコアシステム100を搭載した車両の動作制御を開始する。   As described above, also in the second core 104, the same processing as this processing is performed on the program storage area in the first memory 106, and a code error in the program storage area in the first memory 106 is checked. When both the code error check process for the second memory 108 by the first core 102 and the code error check process for the first memory 106 by the second core 104 are normally completed, the code error is detected by these processes. According to the program in the first memory 106 and the second memory 108 confirmed not to exist, the first core 102 and the second core 104 respectively start operation control of the vehicle on which the multi-core system 100 is mounted.

なお、ステップS112における異常処理では、従来技術に従い、例えばチェックサムを用いてデータ符号値の修復を行ったり、プログラムが改ざんされているものと判断して処理を中止するものとすることができる。   In the abnormal process in step S112, according to the conventional technique, for example, the data code value can be restored using a checksum, or the process can be stopped by determining that the program has been tampered with.

上記の符号誤りチェック処理により、マルチコアシステム100は、プログラム記憶領域のデータ符号値をマトリクス状に並べた2次元仮想配列空間において、行方向、列方向、第1及び第2の対角方向に沿って算出されたデータ符号の加算値を用いて当該プログラム記憶領域のデータ符号の記憶誤りをチェックするので、当該記憶領域のブロック毎の加算値(図4における行方向に沿った加算値に相当)のみを用いてデータ符号誤りをチェックする従来技術に比べて、誤り検出の信頼性を高めることができる。また、同様の理由から、行方向のデータ符号加算値が変化しないように行われる巧妙なプログラム改ざんも検出することができるので、改ざんされた不正なプログラムを実行してしまうことを効果的に防止することができる。   Through the above-described code error check process, the multi-core system 100 follows the row direction, the column direction, and the first and second diagonal directions in the two-dimensional virtual array space in which the data code values in the program storage area are arranged in a matrix. Since the storage error of the data code in the program storage area is checked using the calculated data code addition value, the addition value for each block in the storage area (corresponding to the addition value along the row direction in FIG. 4) The reliability of error detection can be improved as compared with the prior art in which data code errors are checked using only. Also, for the same reason, it is possible to detect clever program alteration that is performed so that the data code addition value in the row direction does not change, so it is possible to effectively prevent execution of a falsified illegal program. can do.

また、本実施形態では、第1コア102及び第2コア104の、2つの演算処理回路を備え、一方のコア(102又は104)が、他方のコア(104又は102)のプログラムが記憶された記憶領域の符号誤りをそれぞれチェックするので、互いのプログラム記憶領域の符号誤りチェックを同時並行的に行うことができ、一方のコア102又は104のみで第1メモリ106及び第2メモリ108のプログラム記憶領域をチェックする場合に比べて迅速に当該チェックを完了することできる。   In the present embodiment, the first core 102 and the second core 104 are provided with two arithmetic processing circuits, and one core (102 or 104) stores the program of the other core (104 or 102). Since the code errors in the storage areas are checked, the code errors in the program storage areas can be checked simultaneously, and the program storage in the first memory 106 and the second memory 108 can be performed only by one core 102 or 104. This check can be completed more quickly than when checking the area.

なお、本実施形態では、プログラム記憶領域のデータ符号をマトリクス状に並べた2次元仮想配列空間について、行方向、列方向、第1の対角方向、及び第2の対角方向に沿ってデータ符号の加算値を算出するものとしたが、これに限らず、これら以外の方向に沿ったデータ符号の加算値を用いるのとすることもできる。例えば、第1及び第2の対角方向に代えて、行方向に対しそれぞれ任意の角度を為す2つの斜め方向に沿って算出されたデータ符号の加算値を用いるものとしても良い。例えば、仮想配列空間において互いに行方向に2つ、列方向に1つだけ離れたデータ符号で構成されるデータ符号系列について加算値を算出する等、行方向に対しそれぞれ任意の角度を為す斜め方向に沿って加算値を算出するものとすることができる。   In the present embodiment, data along the row direction, the column direction, the first diagonal direction, and the second diagonal direction is obtained for the two-dimensional virtual array space in which the data codes of the program storage area are arranged in a matrix. Although the addition value of the code is calculated, the present invention is not limited to this, and the addition value of the data code along other directions may be used. For example, instead of the first and second diagonal directions, an addition value of data codes calculated along two oblique directions each forming an arbitrary angle with respect to the row direction may be used. For example, an oblique direction that forms an arbitrary angle with respect to the row direction, such as calculating an addition value for a data code sequence composed of data codes separated by two in the row direction and one in the column direction in the virtual array space. The added value can be calculated along

また、本実施形態では、行方向、列方向、第1の対角方向、及び第2の対角方向の、合計4つの方向に沿ってデータ符号加算値を算出するものとしたが、これに限らず、少なくとも2方向に沿ってデータ符号加算値を算出して符号誤りチェックを行うものとしても良い。この場合でも、行方向に沿った加算値のみを用いて符号誤りチェックを行う従来技術に比べて、符号誤りチェックの信頼性を高めることができる。   In this embodiment, the data code addition value is calculated along a total of four directions of the row direction, the column direction, the first diagonal direction, and the second diagonal direction. The code error check may be performed by calculating a data code addition value along at least two directions. Even in this case, the reliability of the code error check can be improved as compared with the conventional technique in which the code error check is performed using only the addition value along the row direction.

また、本実施形態では、2次元仮想配列空間として、10×10の正方配列を示したが、これに限らず、正方配列でない(例えば、100×10等の非正方配列の)2次元仮想配列空間を用いることもできる。また、プログラム記憶領域に記憶されているデータ符号の数に依存して、仮想配列空間のすべての位置に必ずしもデータ符号が埋まっている必要はない。例えば、図3(a)において、プログラム記憶領域のデータ符号の数が97個であれば、最後の行(図3(a)の図示右側に示す配列の図示最下行)の右側3個の位置には、データ符号が埋まっていないものとすることができる。この場合、データ符号の加算値算出においては、データ符号が埋まっていない位置は無視する(又は符号「00」が埋まっているものとみなす)ものとすることができる。   In this embodiment, a 10 × 10 square array is shown as the two-dimensional virtual array space. However, the present invention is not limited to this, and the two-dimensional virtual array is not a square array (for example, a non-square array such as 100 × 10). Space can also be used. Further, depending on the number of data codes stored in the program storage area, it is not always necessary to embed data codes at all positions in the virtual array space. For example, in FIG. 3A, if the number of data codes in the program storage area is 97, the three positions on the right side of the last row (the bottom row in the array shown on the right side in FIG. 3A) are shown. May not be filled with a data code. In this case, in the calculation of the added value of the data code, the position where the data code is not filled can be ignored (or the code “00” is regarded as filled).

また、本実施形態では、2次元の仮想配列空間を用いるものとしたが、これに限らず、3以上の次元の仮想配列空間を用いるものとすることもできる。この場合には、仮想配列空間を構成する際に用いる図3(b)に示すアドレス配列を3次元以上の配列とし、加算値算出に用いるデータ系列を、隣接するデータ間における各インデックスの増分又は減少分として定義すればよい。例えば、4次元仮想配列空間は、4次元のアドレス配列をA´(α、β、γ、θ)により定義することができる(即ち、4つのインデックスα、β、γ、θを用いる)。そして、加算値算出に用いるデータ系列を、隣接するデータ間における各インデックスの変分(Δα、Δβ、Δγ、Δθ)により定義する。例えば、変分(1、2、3、4)は、当該4次元仮想配列空間においてインデックスαが1、βが2、γが3、θが4だけ互いに離れた位置にあるデータ符号で構成されるデータ系列を用いて、加算値を算出することを意味するものとすることができる。   In this embodiment, a two-dimensional virtual array space is used. However, the present invention is not limited to this, and a virtual array space having three or more dimensions can also be used. In this case, the address array shown in FIG. 3B used for constructing the virtual array space is a three-dimensional array or more, and the data series used for the addition value calculation is an increment of each index between adjacent data or What is necessary is just to define as a decrement. For example, in the four-dimensional virtual array space, a four-dimensional address array can be defined by A ′ (α, β, γ, θ) (that is, four indexes α, β, γ, θ are used). Then, the data series used for the addition value calculation is defined by the variation (Δα, Δβ, Δγ, Δθ) of each index between adjacent data. For example, the variation (1, 2, 3, 4) is composed of data codes in which the index α is 1, β is 2, γ is 3, and θ is 4 away from each other in the four-dimensional virtual array space. This means that the added value is calculated using the data series.

さらに、本実施形態では、第1コア102と第2コア104の2つのコアを用いる構成としたが、これに限らず、3以上の数のコアを用いるものとし、コアのそれぞれが、それぞれ異なる他の一つのコアのプログラムが記憶されたメモリ内の記憶領域の符号誤りチェックを実行するものとすることができる。   Further, in the present embodiment, the first core 102 and the second core 104 are configured to use two cores. However, the present invention is not limited to this, and three or more cores are used, and each of the cores is different. The code error check of the storage area in the memory in which the program of another one core is stored may be executed.

また、本実施形態では、第1メモリ106と第2メモリ108とに、それぞれ第1コア102及び第2コア104のそれぞれが実行するプログラムが記憶されるものとしたが、これに限らず、第1コア102及び第2コア104のそれぞれが実行するプログラムは、同じ一つのメモリ(例えば第1メモリ)の異なる領域に記憶されているものとすることもできる。   In the present embodiment, the programs executed by the first core 102 and the second core 104 are stored in the first memory 106 and the second memory 108, respectively. The programs executed by each of the first core 102 and the second core 104 may be stored in different areas of the same memory (for example, the first memory).

また、本実施形態では、1チップに集積されたマルチコアシステム100を例として説明したが、本発明は、これに限らず、マルチコアシステム100の各構成要素が個別の回路部品として構成されたシステムとして実施されるものとすることができる。例えば、本発明は、第1コア102及び第2コア104に代えて個別の2つのプロセッサ(CPU)が演算処理部として用いられるマルチプロセッサシステム(マルチCPUシステム)として実施することもできる。   In the present embodiment, the multi-core system 100 integrated on one chip has been described as an example. However, the present invention is not limited to this, and the present invention is not limited to this, but as a system in which each component of the multi-core system 100 is configured as an individual circuit component. Can be implemented. For example, the present invention can be implemented as a multiprocessor system (multi-CPU system) in which two separate processors (CPUs) are used as arithmetic processing units instead of the first core 102 and the second core 104.

100・・・マルチコアシステム、102・・・第1コア、104・・・第2コア、106・・・第1メモリ、108・・・第2メモリ、110・・・第3メモリ、112・・・I/Oポート回路、114・・・通信I/F回路、116・・・バス、118・・・入力ポート、120・・・出力ポート。   DESCRIPTION OF SYMBOLS 100 ... Multi-core system, 102 ... 1st core, 104 ... 2nd core, 106 ... 1st memory, 108 ... 2nd memory, 110 ... 3rd memory, 112 ... -I / O port circuit, 114 ... Communication I / F circuit, 116 ... Bus, 118 ... Input port, 120 ... Output port.

Claims (8)

それぞれが演算処理を行う複数の演算処理回路と、
前記演算処理回路のそれぞれが実行するそれぞれのプログラムが記憶されたメモリと、
を備え、
前記演算処理回路のそれぞれは、それぞれ異なる他の一つの前記演算処理回路のプログラムが記憶された前記メモリ内の記憶領域の符号誤りチェックを実行するよう構成されている、
演算処理システム。
A plurality of arithmetic processing circuits each performing arithmetic processing;
A memory storing each program executed by each of the arithmetic processing circuits;
With
Each of the arithmetic processing circuits is configured to perform a code error check of a storage area in the memory in which a program of another different arithmetic processing circuit is stored.
Arithmetic processing system.
前記演算処理回路のそれぞれは、前記記憶領域にあるデータ符号を2以上の次元のマトリクスを構成するように並べた仮想配列空間に対し、少なくとも2つの異なる方向に沿って前記記憶領域に記憶されたデータ符号値を加算して得た複数の加算値を用いて前記符号誤りチェックを実行するよう構成されている、
請求項1に記載の演算処理システム。
Each of the arithmetic processing circuits is stored in the storage area along at least two different directions with respect to a virtual array space in which data codes in the storage area are arranged so as to form a matrix of two or more dimensions. The code error check is configured to be performed using a plurality of addition values obtained by adding data code values.
The arithmetic processing system according to claim 1.
前記符号誤りチェックは、前記加算値に対応するチェックサムを用いて行われる、
請求項1又は2に記載の演算処理システム。
The code error check is performed using a checksum corresponding to the addition value.
The arithmetic processing system according to claim 1 or 2.
前記チェックサムは、前記加算値を表す2真値の、所定の桁数の下位ビットに対応するチェックサムである、
請求項3に記載の演算処理システム。
The checksum is a checksum corresponding to a low-order bit of a predetermined number of two true values representing the addition value.
The arithmetic processing system according to claim 3.
前記演算処理回路はプロセッサであって、
前記演算処理システムはマルチプロセッサシステムとして構成されている、
請求項1ないし4のいずれか一項に記載の演算処理システム。
The arithmetic processing circuit is a processor,
The arithmetic processing system is configured as a multiprocessor system,
The arithmetic processing system as described in any one of Claims 1 thru | or 4.
前記演算処理回路は、プロセッサに集積されたプロセッサコアであって、
前記演算処理システムはマルチコアシステムとして構成されている、
請求項1ないし4のいずれか一項に記載の演算処理システム。
The arithmetic processing circuit is a processor core integrated in a processor,
The arithmetic processing system is configured as a multi-core system,
The arithmetic processing system as described in any one of Claims 1 thru | or 4.
請求項1ないし6のいずれか一項に記載の演算処理システムを備えた、車両制御を行う電子制御装置。   An electronic control device that performs vehicle control, comprising the arithmetic processing system according to any one of claims 1 to 6. それぞれが演算処理を行う複数の演算処理回路と、前記演算処理回路のそれぞれが実行するそれぞれのプログラムが記憶されたメモリと、を備える演算処理システムにおけるプログラムデータ符号値の誤りチェック方法であって、
前記演算処理回路のそれぞれが、それぞれ異なる他の一つの前記演算処理回路のプログラムが記憶された前記メモリ内の記憶領域のデータ符号を、2以上の次元のマトリクスを構成するように並べて仮想配列空間を構成するステップと、
前記演算処理回路のそれぞれが、少なくとも2つの異なる方向に沿って前記記憶領域に記憶されたデータ符号値を加算して複数の加算値を算出するステップと、
前記演算処理回路のそれぞれが、前記算出された加算値と、当該加算値に対応するチェックサムと、を用いて前記プログラムデータ符号値に誤りがないことを検証するステップと、
を有する、プログラムデータ符号値の誤りチェック方法。
An error check method for a program data code value in an arithmetic processing system, comprising: a plurality of arithmetic processing circuits each performing arithmetic processing; and a memory storing each program executed by each of the arithmetic processing circuits,
Each of the arithmetic processing circuits is arranged in a virtual array space by arranging the data codes of the storage areas in the memory in which the programs of the other different arithmetic processing circuits are stored so as to form a matrix of two or more dimensions. Comprising the steps of:
Each of the arithmetic processing circuits adding a data code value stored in the storage area along at least two different directions to calculate a plurality of added values;
Each of the arithmetic processing circuits verifies that the program data code value has no error using the calculated addition value and a checksum corresponding to the addition value;
An error check method for program data code values.
JP2015114182A 2015-06-04 2015-06-04 Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system Pending JP2017004060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015114182A JP2017004060A (en) 2015-06-04 2015-06-04 Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015114182A JP2017004060A (en) 2015-06-04 2015-06-04 Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system

Publications (1)

Publication Number Publication Date
JP2017004060A true JP2017004060A (en) 2017-01-05

Family

ID=57754730

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015114182A Pending JP2017004060A (en) 2015-06-04 2015-06-04 Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system

Country Status (1)

Country Link
JP (1) JP2017004060A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04160556A (en) * 1990-10-24 1992-06-03 Nec Corp Memory diagnostic system for multiprocessor system
JPH04168564A (en) * 1990-10-31 1992-06-16 Hokkaido Nippon Denki Software Kk Large capacity main memory diagnostic control system by multi-processor
JP2000305859A (en) * 1999-04-22 2000-11-02 Matsushita Electric Ind Co Ltd Processor
JP2003002155A (en) * 2001-06-26 2003-01-08 Keihin Corp Controller of air bag for vehicle
JP2013055558A (en) * 2011-09-05 2013-03-21 Toyota Motor Corp Information processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04160556A (en) * 1990-10-24 1992-06-03 Nec Corp Memory diagnostic system for multiprocessor system
JPH04168564A (en) * 1990-10-31 1992-06-16 Hokkaido Nippon Denki Software Kk Large capacity main memory diagnostic control system by multi-processor
JP2000305859A (en) * 1999-04-22 2000-11-02 Matsushita Electric Ind Co Ltd Processor
JP2003002155A (en) * 2001-06-26 2003-01-08 Keihin Corp Controller of air bag for vehicle
JP2013055558A (en) * 2011-09-05 2013-03-21 Toyota Motor Corp Information processing device

Similar Documents

Publication Publication Date Title
TWI587308B (en) Recovery algorithm in non-volatile memory
JP4960137B2 (en) Soft error location and sensitivity detection for programmable devices
CN111275605B (en) buffer checker
US7529987B2 (en) Integrity control for data stored in a non-volatile memory
US9715601B2 (en) Secure access in a microcontroller system
US8867746B2 (en) Method for protecting a control device against manipulation
CN106372500B (en) For determining that code snippet executes the method for integrality and the method for offer program code abstract representation
JP6289778B2 (en) Test case generation apparatus and test case generation program
CN106415524B (en) Apparatus and method for assigning device pin functionality to a multiprocessor core device
US20120102576A1 (en) Scalable Memory Protection Mechanism
US9880787B2 (en) System and method for memory patching circuits
US20050278551A1 (en) Method for system level protection of field programmable logic devices
CN108108262A (en) Integrated circuit with the hardware check unit for checking selected memory access
US11372803B2 (en) Data processing engine tile architecture for an integrated circuit
CN110277131A (en) Method of calibration, terminal device and storage medium based on NAND FLASH memory
JP2017004060A (en) Arithmetic processing system having highly reliable program check function, multi-core system, and multiprocessor system
TWI649654B (en) Device and method to assign device pin ownership for multi-processor core devices
KR102307955B1 (en) Determining match between data values stored by several arrays
US9652232B2 (en) Data processing arrangement and method for data processing
US10747531B1 (en) Core for a data processing engine in an integrated circuit
US11061673B1 (en) Data selection network for a data processing engine in an integrated circuit
JP2015082671A (en) Semiconductor device
US10733349B2 (en) Electronic device and method for fabricating semiconductor chip
KR20200105536A (en) Determining the match between data values stored by three or more arrays
WO2023035136A1 (en) Data protection method for memory, and storage apparatus thereof

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20170714

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170726

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180731

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190312