Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6558317B2 - Electronic equipment - Google Patents
[go: Go Back, main page]

JP6558317B2 - Electronic equipment - Google Patents

Electronic equipment Download PDF

Info

Publication number
JP6558317B2
JP6558317B2 JP2016137794A JP2016137794A JP6558317B2 JP 6558317 B2 JP6558317 B2 JP 6558317B2 JP 2016137794 A JP2016137794 A JP 2016137794A JP 2016137794 A JP2016137794 A JP 2016137794A JP 6558317 B2 JP6558317 B2 JP 6558317B2
Authority
JP
Japan
Prior art keywords
variable
core
calculation
unit
occurred
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
JP2016137794A
Other languages
Japanese (ja)
Other versions
JP2018010425A (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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2016137794A priority Critical patent/JP6558317B2/en
Publication of JP2018010425A publication Critical patent/JP2018010425A/en
Application granted granted Critical
Publication of JP6558317B2 publication Critical patent/JP6558317B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Retry When Errors Occur (AREA)
  • Multi Processors (AREA)
  • Microcomputers (AREA)

Description

本発明は、演算を実行する電子装置に関する。   The present invention relates to an electronic device that performs an operation.

従来、演算を実行する電子装置の一例として、特許文献1に開示された車載制御装置がある。この車載制御装置は、非数が発生した変数を初期化するとともに、同変数を参照して算出される変数など、非数が発生した変数によって影響を受ける変数を一括して初期化する。   Conventionally, there is an in-vehicle control device disclosed in Patent Document 1 as an example of an electronic device that executes a calculation. This in-vehicle control device initializes a variable in which a non-number has occurred, and initializes variables affected by the variable in which a non-number has occurred, such as a variable calculated by referring to the variable.

特開2011−164814号公報JP 2011-164814 A

ところで、電子装置には、演算を並行実行する複数の処理部を備えたものがある。このような電子装置では、演算結果が非数になるなど演算にエラーが発生した変数と、この変数の影響を受ける変数とが、異なる処理部に配置されていることもある。また、処理部は、複数の処理部における他の処理部で変数が演算されると、その変数の値を保持し、その後、保持しておいた値を用いて他の変数の演算を行う。   Incidentally, some electronic devices include a plurality of processing units that execute operations in parallel. In such an electronic apparatus, a variable in which an operation error has occurred, for example, the operation result becomes non-numeric, and a variable affected by this variable may be arranged in different processing units. In addition, when a variable is calculated in another processing unit of the plurality of processing units, the processing unit holds the value of the variable, and then performs calculation of another variable using the stored value.

よって、処理部は、他の処理部での演算にエラーが発生した場合、エラーが発生前の変数値を保持することがある。このため、処理部は、エラーが発生した演算で得られた変数が他の処理部によって初期化され、且つ、この変数の影響を受ける変数を初期化したとしても、保持しておいたエラーが発生前の演算で得られた変数値を用いて他の変数の演算を行なってしまう。従って、電子装置は、エラーが発生前の演算で得られた変数値を用いて演算された変数が初期化されないという問題がある。   Therefore, when an error occurs in a calculation in another processing unit, the processing unit may hold a variable value before the error occurs. For this reason, even if the variable obtained by the operation in which the error has occurred is initialized by another processing unit, and the variable affected by this variable is initialized, the stored error is The calculation of other variables is performed using the variable value obtained by the calculation before the occurrence. Therefore, the electronic device has a problem that the variable calculated using the variable value obtained by the calculation before the error is not initialized.

本開示は、上記問題点に鑑みなされたものであり、変数の演算を並行実行する複数の処理部が、エラーが発生した演算で得られた変数に加えて、この変数を用いて演算された変数を初期化することができる電子装置を提供することを目的とする。   The present disclosure has been made in view of the above-described problem, and a plurality of processing units that execute variable operations in parallel are calculated using this variable in addition to the variable obtained by the operation in which the error occurred. An object is to provide an electronic device capable of initializing variables.

上記目的を達成するために本開示は、
複数の処理部を備えた電子装置であって、
各処理部は、
変数を演算する演算部(S10、S22)と、
自処理部における演算部での演算にエラーが発生したか否かを判定する判定部(S11、S23)と、
判定部にてエラーが発生したと判定された場合、エラーが発生したと判定された演算で得られた自処理部の変数を初期化する第1初期化部(S14、S26)と、を備え、
他処理部における演算部の演算で得られた変数値を保持しつつ、他処理部の演算した変数に関連する変数を、保持した変数値を用いて演算部が演算するものであり、
さらに、
演算部の演算が複数の処理部間で並行実行され、判定部にてエラーが発生したと判定された場合、エラーが発生したことを複数の処理部間で共有するために、エラーが発生したことを記憶するエラー記憶部(S13、S25)と、
エラー記憶部を確認することで、他処理部の演算部での演算にエラーが発生しているか否かを監視する監視部(S15、S27)と、
監視部での監視でエラーが発生していた場合、該エラーが発生している演算で得られた変数に関連する自処理部の変数を初期化する第2初期化部(S16、S28)と、備えていることを特徴とする。
In order to achieve the above object, the present disclosure
An electronic device including a plurality of processing units,
Each processing unit
A calculation unit (S10, S22) for calculating a variable;
A determination unit (S11, S23) for determining whether or not an error has occurred in the calculation in the calculation unit in the processing unit;
A first initialization unit (S14, S26) that initializes a variable of the processing unit obtained by an operation in which it is determined that an error has occurred when the determination unit determines that an error has occurred; ,
While holding the variable value obtained by the calculation of the calculation unit in the other processing unit, the calculation unit calculates the variable related to the variable calculated by the other processing unit using the held variable value,
further,
When the calculation of the calculation unit is executed in parallel between multiple processing units and the determination unit determines that an error has occurred, an error has occurred in order to share that the error has occurred among the multiple processing units An error storage unit (S13, S25) for storing
A monitoring unit (S15, S27) for monitoring whether or not an error has occurred in the calculation in the calculation unit of the other processing unit by checking the error storage unit;
A second initialization unit (S16, S28) that initializes a variable of the self-processing unit related to a variable obtained by an operation in which the error has occurred when an error has occurred in monitoring by the monitoring unit; It is characterized by having.

このように、本開示は、自処理部における演算部での演算にエラーが発生したか否かを判定し、エラーが発生したと判定した場合、エラーが発生したと判定された演算で得られた自処理部の変数を初期化する。また、本開示は、エラーが発生したと判定された場合、エラーが発生したことを複数の処理部間で共有するために、エラーが発生したことを記憶部に記憶し、この記憶部を確認して、他処理部の演算部での演算にエラーが発生しているか否かを監視する。   As described above, the present disclosure is obtained by the operation in which it is determined that an error has occurred when it is determined whether or not an error has occurred in the operation in the operation unit in the processing unit. Initialize the variables of the self-processing section. In addition, when it is determined that an error has occurred, the present disclosure stores the fact that an error has occurred in a storage unit in order to share the occurrence of the error among a plurality of processing units, and confirms this storage unit. Then, it is monitored whether or not an error has occurred in the calculation in the calculation unit of the other processing unit.

このため、本開示の各処理部は、自処理部における演算部での演算で用いる変数が、エラーが発生している演算で得られた変数であるか否かを把握することができる。そして、本開示は、監視部で監視してエラーが発生していた場合、エラーが発生している演算で得られた変数に関連する自処理部の変数を初期化する。よって、本開示は、変数の演算を実行する複数の処理部が、エラーが発生した演算で得られた変数に加えて、この変数を用いて演算された変数を初期化することができる。   For this reason, each processing unit of the present disclosure can grasp whether or not the variable used in the calculation in the calculation unit in the self-processing unit is a variable obtained by the calculation in which an error has occurred. And this indication initializes the variable of the self-processing part relevant to the variable obtained by the calculation in which the error has generate | occur | produced, when the monitoring part monitors and the error has generate | occur | produced. Therefore, according to the present disclosure, a plurality of processing units that execute a variable calculation can initialize a variable calculated using this variable in addition to the variable obtained by the calculation in which the error has occurred.

なお、特許請求の範囲、及びこの項に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、発明の技術的範囲を限定するものではない。   It should be noted that the reference numerals in parentheses described in the claims and in this section indicate the correspondence with the specific means described in the embodiments described later as one aspect, and the technical scope of the invention It is not limited.

実施形態におけるマイコンの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the microcomputer in embodiment. 実施形態におけるマイコンの処理動作を示すシーケンス図である。It is a sequence diagram which shows the processing operation of the microcomputer in embodiment. 実施形態における第1コアの処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the 1st core in embodiment. 実施形態における第2コアの処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the 2nd core in embodiment.

以下において、図面を参照しながら、発明を実施するための形態を説明する。図1に示すように、ECU200は、マイクロコンピュータ100が設けられている。なお、ECU200は、マイコン100の他にも、各種電子素子が設けられていてもよい。   Hereinafter, embodiments for carrying out the invention will be described with reference to the drawings. As shown in FIG. 1, the ECU 200 is provided with a microcomputer 100. The ECU 200 may be provided with various electronic elements in addition to the microcomputer 100.

マイクロコンピュータ100は、電子装置に相当する。以下においては、マイクロコンピュータ100をマイコン100と略称で記載する。マイコン100は、第1コア10、第1コア用RAM12、第2コア20、第2コア用RAM22、共有RAM30などを備えて構成されている。このように、マイコン100は、所謂デュアルコアマイコンである。しかしながら、本発明は、三つ以上のコアを含むマルチコアマイコンでも採用できる。   The microcomputer 100 corresponds to an electronic device. In the following, the microcomputer 100 is abbreviated as the microcomputer 100. The microcomputer 100 includes a first core 10, a first core RAM 12, a second core 20, a second core RAM 22, a shared RAM 30, and the like. Thus, the microcomputer 100 is a so-called dual core microcomputer. However, the present invention can also be adopted in a multi-core microcomputer including three or more cores.

第1コア10と第2コア20のそれぞれは、処理部に相当する。各コア10,20は、予め定められた演算順序に従って予め定められたプログラムを実行する。また、各コア10,20は、浮動小数点演算を実行可能に構成されている。なお、コアは、演算プロセッサやCPUコアと言い換えることもできる。各コア10,20の処理動作に関しては、後程詳しく説明する。   Each of the first core 10 and the second core 20 corresponds to a processing unit. Each of the cores 10 and 20 executes a predetermined program in accordance with a predetermined calculation order. Each of the cores 10 and 20 is configured to be able to execute a floating point operation. The core can also be called an arithmetic processor or a CPU core. The processing operations of the cores 10 and 20 will be described in detail later.

第1コア10は、第1コアフラグが記憶された記憶領域である第1フラグ領域11を含んでいる。第1コアフラグは、第1コア10によって値が設定されるフラグである。また、第1コアフラグは、第1コア10による演算にエラーが発生したか否か、すなわち第1コア10の演算状態を示すフラグである。よって、第1コアフラグは、第1コア10による演算にエラーが発生したか否かによって値が書き換えられる。この第1コアフラグは、第1コア10のみが値を設定できる。このため、第2コア20は、第1コアフラグの値を設定できない。   The first core 10 includes a first flag area 11 that is a storage area in which a first core flag is stored. The first core flag is a flag whose value is set by the first core 10. The first core flag is a flag indicating whether or not an error has occurred in the calculation by the first core 10, that is, the calculation state of the first core 10. Therefore, the value of the first core flag is rewritten depending on whether or not an error has occurred in the calculation performed by the first core 10. Only the first core 10 can set the value of the first core flag. For this reason, the second core 20 cannot set the value of the first core flag.

なお、第1コア10は、自コア10の演算でエラーが発生したと判定した場合、第1コアフラグをオンし、エラーが発生したと判定していない場合、第1コアフラグをオフすると言える。また、第1コア10は、第1コアフラグをオンすることでエラー状態を書き込み、第1コアフラグをオフすることで非エラー状態を書き込むと言える、
一方、第2コア20は、第2コアフラグが記憶された記憶領域である第2フラグ領域21を含んでいる。第2コアフラグは、第2コア20によって値が設定されるフラグである。また、第2コアフラグは、第2コア20による演算にエラーが発生したか否か、すなわち第2コア20の演算状態を示すフラグである。よって、第2コアフラグは、第2コア20による演算にエラーが発生したか否かによって値が書き換えられる。この第2コアフラグは、第2コア20のみが値を設定できる。このため、第1コア10は、第2コアフラグの値を設定できない。
It can be said that the first core 10 turns on the first core flag when it is determined that an error has occurred in the calculation of its own core 10 and turns off the first core flag when it is not determined that an error has occurred. The first core 10 can be said to write an error state by turning on the first core flag and write a non-error state by turning off the first core flag.
On the other hand, the second core 20 includes a second flag area 21 which is a storage area in which a second core flag is stored. The second core flag is a flag whose value is set by the second core 20. The second core flag is a flag indicating whether or not an error has occurred in the calculation by the second core 20, that is, the calculation state of the second core 20. Therefore, the value of the second core flag is rewritten depending on whether or not an error has occurred in the calculation by the second core 20. Only the second core 20 can set the value of the second core flag. For this reason, the first core 10 cannot set the value of the second core flag.

なお、第2コア20は、自コア20の演算でエラーが発生したと判定した場合、第2コアフラグをオンし、エラーが発生したと判定していない場合、第2コアフラグをオフすると言える。また、第2コア20は、第2コアフラグをオンすることでエラー状態を書き込み、第2コアフラグをオフすることで非エラー状態を書き込むと言える。   It can be said that the second core 20 turns on the second core flag when it is determined that an error has occurred in the calculation of its own core 20 and turns off the second core flag when it is not determined that an error has occurred. Further, it can be said that the second core 20 writes an error state by turning on the second core flag and writes a non-error state by turning off the second core flag.

このように、各コア10,20は、自コアの演算にエラーが発生したことを記憶可能に構成されている。なお、各コアフラグの設定に関しては、後程、各コア10,20の処理動作とともに説明する。   As described above, each of the cores 10 and 20 is configured to be able to store the fact that an error has occurred in the calculation of the own core. The setting of each core flag will be described later together with the processing operations of the cores 10 and 20.

第1コア用RAM12(以下、第1RAM12)は、第1コア10専用の記憶装置である。第1RAM12には、第1コア10のみが用いる変数などが記憶されている。一方、第2コア用RAM22(以下、第2RAM22)は、第2コア20専用の記憶装置である。   The first core RAM 12 (hereinafter referred to as the first RAM 12) is a storage device dedicated to the first core 10. The first RAM 12 stores variables used only by the first core 10. On the other hand, the second core RAM 22 (hereinafter, the second RAM 22) is a storage device dedicated to the second core 20.

また、第2RAM22は、記憶領域として変数領域22aを含んでおり、第2コア20のみが用いる変数などが記憶されている。例えば、変数領域22aには、第2コア20のみが用いる変数dが記憶されている。変数dは、第2コア20によって演算されて、値が書き換えられる。変数領域22aは、変数記憶部に相当する。   The second RAM 22 includes a variable area 22a as a storage area, and stores variables used only by the second core 20. For example, the variable area 22a stores a variable d used only by the second core 20. The variable d is calculated by the second core 20 and the value is rewritten. The variable area 22a corresponds to a variable storage unit.

共有RAM30は、第1コア10と第2コア20に共通に設けられた記憶装置である。共有RAM30は、記憶領域として、第1共有領域31、第2共有領域32、第3共有領域33を含んでいる。また、第1共有領域31には、第1コア10によって値が設定される第1フラグが記憶されている。第2共有領域32には、第2コア20によって値が設定される第2フラグが記憶されている。よって、第1コア10は、第2フラグの値を参照することはできる。同様に、第2コア20は、第1フラグの値を参照することはできる。   The shared RAM 30 is a storage device provided in common for the first core 10 and the second core 20. The shared RAM 30 includes a first shared area 31, a second shared area 32, and a third shared area 33 as storage areas. The first shared area 31 stores a first flag whose value is set by the first core 10. The second shared area 32 stores a second flag whose value is set by the second core 20. Therefore, the first core 10 can refer to the value of the second flag. Similarly, the second core 20 can refer to the value of the first flag.

なお、第1フラグは、第1コアフラグと同様に、第1コア10による演算にエラーが発生したか否かを示すフラグである。よって、第1フラグの値は、第1コアフラグと同じ第1コア10の演算状態を示している。このため、第2コア20は、第1フラグの値を参照することで、第1コア10の演算状態を認識できる。   The first flag is a flag indicating whether or not an error has occurred in the calculation performed by the first core 10, similarly to the first core flag. Therefore, the value of the first flag indicates the same calculation state of the first core 10 as the first core flag. For this reason, the second core 20 can recognize the calculation state of the first core 10 by referring to the value of the first flag.

一方、第2フラグは、第2コアフラグと同様に、第2コア20による演算にエラーが発生したか否かを示すフラグである。よって、第2フラグの値は、第2コアフラグと同じ第2コア20の演算状態を示している。このため、第1コア10は、第2フラグの値を参照することで、第2コア20の演算状態を認識できる。   On the other hand, the second flag is a flag indicating whether or not an error has occurred in the calculation by the second core 20, similarly to the second core flag. Therefore, the value of the second flag indicates the same calculation state of the second core 20 as the second core flag. Therefore, the first core 10 can recognize the calculation state of the second core 20 by referring to the value of the second flag.

なお、第1コア10は、自コア10の演算でエラーが発生したと判定した場合、第1フラグをオンし、エラーが発生したと判定していない場合、第1フラグをオフすると言える。同様に、第2コア20は、自コア20の演算でエラーが発生したと判定した場合、第2フラグをオンし、エラーが発生したと判定していない場合、第2フラグをオフすると言える。   It can be said that the first core 10 turns on the first flag when it is determined that an error has occurred in the calculation of its own core 10 and turns off the first flag when it is not determined that an error has occurred. Similarly, it can be said that the second core 20 turns on the second flag when it is determined that an error has occurred in the calculation of its own core 20 and turns off the second flag when it is not determined that an error has occurred.

また、第3共有領域33には、第1コア10と第2コア20の両方が用いる変数が記憶されている。例えば、第3共有領域33には、第1コア10と第2コア20が用いる変数cが記憶されている。変数cは、第1コア10によって演算されて、値が書き換えられる。   The third shared area 33 stores variables used by both the first core 10 and the second core 20. For example, the third shared area 33 stores a variable c used by the first core 10 and the second core 20. The variable c is calculated by the first core 10 and the value is rewritten.

ところで、各コア10,20が実行する浮動小数点演算は、浮動小数点型データを用いた演算である。演算結果の浮動小数点型データは、第1RAM12や、第2RAM22や、共有RAM30に記憶される。この演算結果の浮動小数点型データは、変数に相当する。よって、上記変数cと変数dは、浮動小数点型データである。   By the way, the floating point calculation executed by each of the cores 10 and 20 is an operation using floating point type data. The floating-point type data as a result of the operation is stored in the first RAM 12, the second RAM 22, or the shared RAM 30. The floating point type data of the calculation result corresponds to a variable. Therefore, the variable c and variable d are floating point type data.

変数cは、第1コア10が浮動小数点演算を行うことで得られる。つまり、第1コア10は、第3共有領域33に記憶された変数cを演算するとともに、演算で得られた値に変数cを更新する。よって、第1コア10は、第3共有領域33の変数cを演算結果の値で書き換えると言える。   The variable c is obtained when the first core 10 performs a floating point operation. That is, the first core 10 calculates the variable c stored in the third shared area 33 and updates the variable c to a value obtained by the calculation. Therefore, it can be said that the first core 10 rewrites the variable c of the third shared region 33 with the value of the calculation result.

一方、変数dは、第2コア20が浮動小数点演算を行うことで得られる。つまり、第2コア20は、変数領域22aに記憶された変数dを演算するとともに、演算で得られた値に変数dを更新する。よって、第2コア20は、変数領域22aの変数dを演算結果の値で書き換えると言える。さらに、第2コア20は、変数cの値を保持しつつ、保持した値を用いて変数dを演算する。このため、変数cは、他処理部における演算部の演算で得られた変数に相当する。変数dは、保持した変数に関連する変数に相当する。また、変数cと変数dは、関連する変数と言える。   On the other hand, the variable d is obtained when the second core 20 performs a floating point operation. That is, the second core 20 calculates the variable d stored in the variable area 22a and updates the variable d to a value obtained by the calculation. Therefore, it can be said that the second core 20 rewrites the variable d in the variable area 22a with the value of the calculation result. Further, the second core 20 calculates the variable d using the held value while holding the value of the variable c. For this reason, the variable c corresponds to a variable obtained by calculation of the calculation unit in the other processing unit. The variable d corresponds to a variable related to the held variable. Moreover, it can be said that the variable c and the variable d are related variables.

このように、変数cは、第1コア10と第2コア20の両方で用いられるため、共有RAM30の第3共有領域33に記憶されている。一方、変数dは、第1コア10で用いられず、共有RAM30に記憶されている必要がないため、第2RAM22に記憶されている。   Thus, the variable c is stored in the third shared area 33 of the shared RAM 30 because it is used by both the first core 10 and the second core 20. On the other hand, the variable d is stored in the second RAM 22 because it is not used by the first core 10 and does not need to be stored in the shared RAM 30.

各コア10,20は、例えば、IEEE754規格に従ったデータ形式で、浮動小数点型データを表す。IEEE754規格に従う単精度の浮動小数点型データは、1ビットの符号部、8ビットの指数部、23ビットの仮数部で構成される。   Each of the cores 10 and 20 represents floating point type data in a data format in accordance with, for example, the IEEE754 standard. Single-precision floating-point data conforming to the IEEE 754 standard is composed of a 1-bit sign part, an 8-bit exponent part, and a 23-bit mantissa part.

この規格の浮動小数点データでは、例えば、数値として表現できない演算結果を非数として表現できるようになっている。0で除する演算や、∞(無限大)を用いた演算等の演算結果が、数値として表現できない演算結果の一例として挙げられる。   In the floating point data of this standard, for example, an operation result that cannot be expressed as a numerical value can be expressed as a non-number. An operation result such as an operation that divides by 0 or an operation that uses ∞ (infinity) is an example of an operation result that cannot be expressed as a numerical value.

例えばこの規格では、指数部の8ビットが全て1で、すなわち指数部が10進表記の255で、仮数部が0以外の場合、この浮動小数点型データを非数と表す。また、この規格では、指数部の8ビットが全て1で仮数部が0の場合、この浮動小数点型データを無限大と表す。なお、0で除する演算や、無限大を用いた演算のような、数値として表現できない演算結果となる演算は、無効な演算と言える。   For example, in this standard, when all the 8 bits of the exponent part are 1, that is, when the exponent part is 255 in decimal notation and the mantissa part is other than 0, this floating point type data is represented as a non-number. Also, in this standard, when all 8 bits of the exponent part are 1 and the mantissa part is 0, this floating point type data is represented as infinity. Note that an operation that results in an operation that cannot be expressed as a numerical value, such as an operation that divides by 0 or an operation that uses infinity, is an invalid operation.

また、各コア10,20で演算したデータが非数か無限大の場合に、各コア10,20での演算にエラーが発生したと言うことができる。さらに、各コア10,20での演算が無効な演算であった場合に、各コア10,20での演算にエラーが発生したと言うことができる。   Further, when the data calculated by the cores 10 and 20 is non-numeric or infinite, it can be said that an error has occurred in the calculation by the cores 10 and 20. Furthermore, when the calculation in each of the cores 10 and 20 is an invalid calculation, it can be said that an error has occurred in the calculation in each of the cores 10 and 20.

なお、以下においては、演算にエラーが発生した一例として、各コア10,20で演算した浮動小数点型データが非数であった場合を採用する。よって、第1コアフラグ及び第1フラグは、第1コア10の演算で得られた変数が非数であるか否かを示しているものとする。一方、第2コアフラグ及び第2フラグは、第2コア20の演算で得られた変数が非数であるか否かを示しているものとする。   In the following, a case where the floating point type data calculated by each of the cores 10 and 20 is a non-numeric is adopted as an example in which an error has occurred in the calculation. Therefore, it is assumed that the first core flag and the first flag indicate whether or not the variable obtained by the calculation of the first core 10 is non-numeric. On the other hand, the second core flag and the second flag indicate whether or not the variable obtained by the calculation of the second core 20 is non-numeric.

ここで、図2、図3、図4を用いて、第1コア10と第2コア20の処理動作に関して説明する。第1コア10と第2コア20とは、図2に示すように演算を並行実行する。本実施形態では、一例として、第1コア10で非数が発生し、第2コア20で非数が発生しない場合を採用する。   Here, processing operations of the first core 10 and the second core 20 will be described with reference to FIGS. 2, 3, and 4. The first core 10 and the second core 20 execute operations in parallel as shown in FIG. In the present embodiment, as an example, a case where a non-number occurs in the first core 10 and a non-number does not occur in the second core 20 is employed.

まず、図3を用いて第1コア10の処理動作に関して説明する。第1コア10は、所定の実行タイミングで図3のフローチャートをスタートする。   First, the processing operation of the first core 10 will be described with reference to FIG. The first core 10 starts the flowchart of FIG. 3 at a predetermined execution timing.

ステップS10では、変数cを演算する(演算部)。第1コア10は、処理を開始すると、変数cを演算する。   In step S10, the variable c is calculated (calculation unit). When the first core 10 starts processing, the first core 10 calculates a variable c.

ステップS11では、非数が発生したか否かを判定する(判定部)。第1コア10は、ステップS10での演算で非数が発生したか否かを判定する。言い換えると、第1コア10は、自コア10における演算にエラーが発生したか否かを判定する。第1コア10は、例えばc=9/0の場合、非数が発生する。   In step S11, it is determined whether or not a non-number has occurred (determination unit). The first core 10 determines whether or not a non-number has occurred in the calculation in step S10. In other words, the first core 10 determines whether an error has occurred in the calculation in the own core 10. In the first core 10, for example, when c = 9/0, a non-number occurs.

第1コア10は、ステップS11で非数が発生したと判定した場合、ステップS12へ進む。ステップS12では、第2コア20に非数状態を通知する。第1コア10は、ステップS11で非数が発生したと判定した場合、第2コア20に対して、自コア10で非数が発生したことを通知する。なお、本発明は、ステップS12を省略しても目的を達成できる。   If the first core 10 determines that a non-number has occurred in step S11, the process proceeds to step S12. In step S12, the second core 20 is notified of the non-number state. If the first core 10 determines that a non-number has occurred in step S <b> 11, the first core 10 notifies the second core 20 that a non-number has occurred in its own core 10. Note that the present invention can achieve the object even if step S12 is omitted.

ステップS13では、第1フラグをオンする(エラー記憶部)。第1コア10は、ステップS11で非数が発生したと判定した場合、第1共有領域31の第1フラグをオンする。言い換えると、第1コア10は、非数状態を第1共有領域31に書き込む。   In step S13, the first flag is turned on (error storage unit). The first core 10 turns on the first flag of the first shared area 31 when it is determined in step S11 that the non-number has occurred. In other words, the first core 10 writes a non-numbered state in the first shared area 31.

このように、第1コア10は、第2コア20と演算を並行実行しており、非数が発生したと判定した場合、非数が発生したことを第2コア20との間で共有するために、非数が発生したことを共有RAM30に記憶すると言える。また、第1コア10は、第1共有領域31の第1フラグをオンすることで、演算を並行実行している第2コア20との間で、自コア10で非数が発生したことを共有すると言える。なお、第1コア10は、ステップS11で非数が発生したと判定した場合、第1コアフラグをオンするとともに、第1共有領域31の第1フラグをオンする。   As described above, the first core 10 performs the operation in parallel with the second core 20, and when it is determined that a non-number has occurred, the first core 10 shares that the non-number has occurred with the second core 20. Therefore, it can be said that the occurrence of the non-number is stored in the shared RAM 30. In addition, the first core 10 turns on the first flag of the first shared area 31 to indicate that a non-number has occurred in the own core 10 with the second core 20 that is executing operations in parallel. Share it. In addition, the 1st core 10 turns on the 1st flag of the 1st shared area 31 while turning ON a 1st core flag, when it determines with the non-number having generate | occur | produced at step S11.

ステップS14では、変数cを初期化する(第1初期化部)。第1コア10は、非数が発生した変数cを初期化する。つまり、第1コア10は、非数が発生したと判定した場合、非数が発生したと判定された演算で得られた自コア10の変数cを初期化する。   In step S14, the variable c is initialized (first initialization unit). The first core 10 initializes the variable c in which the non-number has occurred. That is, when the first core 10 determines that a non-number has occurred, the first core 10 initializes the variable c of the own core 10 obtained by the operation determined that the non-number has occurred.

第1コア10は、ステップS11で非数が発生したと判定していない場合、ステップS15へ進む。ステップS15では、第2フラグがオンであるか否かを判定する(監視部)。第1コア10は、第2共有領域32を確認することで、すなわち、第2フラグを確認することで、他処理部である第2コア20での演算で非数が発生しているか否かを監視する。   If the first core 10 does not determine that a non-number has occurred in step S11, the first core 10 proceeds to step S15. In step S15, it is determined whether or not the second flag is on (monitoring unit). Whether the first core 10 confirms the second shared area 32, that is, confirms the second flag, whether or not a non-number has occurred in the calculation in the second core 20 that is another processing unit. To monitor.

第1コア10は、第2フラグがオンであると判定した場合、ステップS16へ進み、第2フラグがオンであると判定しなかった場合、ステップS17へ進む。なお、後程説明するが、第2コア20は、第1コア10と同様に、自コア20での演算で非数が発生した場合、第2フラグをオンする。   If the first core 10 determines that the second flag is on, the process proceeds to step S16. If the first core 10 does not determine that the second flag is on, the process proceeds to step S17. As will be described later, the second core 20 turns on the second flag when a non-number occurs in the calculation in the own core 20 as in the first core 10.

ステップS16では、変数cを初期化する(第2初期化部)。第1コア10は、ステップS15で第2フラグがオンであり、第2コア20での演算で非数が発生していたと判定した場合、非数が発生している変数dに関連する変数cを初期化する。第1コア10は、例えばc=0とする。第1コア10は、例えばプログラムの内容などによって、変数cが変数dに関連するか否かを確認できる。なお、第1コア10は、変数cが変数dに関連しないと判定した場合、ステップS16を行う必要がない。   In step S16, the variable c is initialized (second initialization unit). If the first core 10 determines in step S15 that the second flag is on and an arithmetic operation in the second core 20 has caused a non-number, the variable c related to the variable d in which the non-number has occurred. Is initialized. The first core 10 is set to c = 0, for example. The first core 10 can confirm whether or not the variable c is related to the variable d, for example, according to the contents of the program. In addition, the 1st core 10 does not need to perform step S16, when it determines with the variable c not relating to the variable d.

ステップS17では、変数cに演算結果を書き込む。第1コア10は、ステップS10での演算結果を第3共有領域33に書き込む。   In step S17, the calculation result is written in the variable c. The first core 10 writes the calculation result in step S <b> 10 in the third shared area 33.

次に、図4を用いて第2コア20の処理動作に関して説明する。第2コア20は、所定の実行タイミングで図4のフローチャートをスタートする。   Next, the processing operation of the second core 20 will be described with reference to FIG. The second core 20 starts the flowchart of FIG. 4 at a predetermined execution timing.

ステップS20では、変数cをラッチする。第2コア20は、第3共有領域33に記憶されている変数cを読み込んで、第2RAM22に記憶(保持)しておく。   In step S20, the variable c is latched. The second core 20 reads the variable c stored in the third shared area 33 and stores (holds) the variable c in the second RAM 22.

ステップS21では、通知により変数dを初期化する。第2コア20は、第1コア10から非数状態の通知がなされた場合、変数dを初期化する。第2コア20は、例えばd=0とする。当然ながら、第2コア20は、第1コア10から非数状態の通知がなかった場合、変数dの初期化を行わない。   In step S21, the variable d is initialized by notification. When the second core 20 is notified of the non-number state from the first core 10, the second core 20 initializes the variable d. The second core 20 has d = 0, for example. Naturally, the second core 20 does not initialize the variable d when there is no notification of the non-number state from the first core 10.

ステップS22では、変数dを演算する(演算部)。第2コア20は、ステップS20でラッチした変数cを用いて変数dを演算する。このように、第2コア20は、第1コア10における演算で得られた変数cを保持しつつ、保持した変数cに関連する変数dを、保持した変数cを用いて演算する。   In step S22, the variable d is calculated (calculation unit). The second core 20 calculates the variable d using the variable c latched in step S20. As described above, the second core 20 calculates the variable d related to the held variable c using the held variable c while holding the variable c obtained by the calculation in the first core 10.

ステップS23では、非数が発生したか否かを判定する(判定部)。第2コア20は、自コア20における演算にエラーが発生したか否かを判定する。第2コア20は、ステップS23で非数が発生したと判定した場合、ステップS24へ進む。   In step S23, it is determined whether or not a non-number has occurred (determination unit). The second core 20 determines whether or not an error has occurred in the calculation in the own core 20. If the second core 20 determines that a non-number has occurred in step S23, the process proceeds to step S24.

ステップS24では、第1コア10に非数情報を通知する。なお、第2コア20は、ステップS24を省略しても目的を達成できる。   In step S24, the first core 10 is notified of non-numeric information. The second core 20 can achieve its purpose even if step S24 is omitted.

ステップS25では、第2フラグをオンする(エラー記憶部)。第2コア20は、ステップS23で非数が発生したと判定した場合、第2共有領域32の第2フラグをオンする。言い換えると、第2コア20は、非数状態を第2共有領域32に書き込む。   In step S25, the second flag is turned on (error storage unit). The second core 20 turns on the second flag of the second shared area 32 when it is determined in step S23 that the non-number has occurred. In other words, the second core 20 writes the non-number state in the second shared area 32.

このように、第2コア20は、第1コア10と演算を並行実行しており、非数が発生したと判定した場合、非数が発生したことを第1コア10との間で共有するために、非数が発生したことを共有RAM30に記憶すると言える。また、第2コア20は、第2共有領域32の第2フラグをオンすることで、演算を並行実行している第1コア10との間で、自コア20で非数が発生したことを共有すると言える。なお、第2コア20は、ステップS23で非数が発生したと判定した場合、第2コアフラグをオンするとともに、第2共有領域32の第2フラグをオンする。   As described above, the second core 20 performs the operation in parallel with the first core 10, and when it is determined that a non-number has occurred, the second core 20 shares that the non-number has occurred with the first core 10. Therefore, it can be said that the occurrence of the non-number is stored in the shared RAM 30. In addition, the second core 20 turns on the second flag of the second shared area 32, so that a non-number has occurred in the own core 20 with the first core 10 that is executing operations in parallel. Share it. If the second core 20 determines that a non-number has occurred in step S23, the second core 20 turns on the second core flag and turns on the second flag of the second shared region 32.

ステップS26では、変数dを初期化する(第1初期化部)。第2コア20は、非数が発生した変数dを初期化する。つまり、第2コア20は、非数が発生したと判定した場合、非数が発生したと判定された演算で得られた自コア20の変数dを初期化する。   In step S26, the variable d is initialized (first initialization unit). The second core 20 initializes the variable d in which the non-number has occurred. That is, when the second core 20 determines that a non-number has occurred, the second core 20 initializes the variable d of the own core 20 obtained by the operation determined that the non-number has occurred.

第2コア20は、ステップS23で非数が発生したと判定していない場合、ステップS27へ進む。ステップS27では、第1フラグがオンであるか否かを判定する(監視部)。第2コア20は、第1共有領域31を確認することで、すなわち、第1フラグを確認することで、他処理部である第1コア10での演算で非数が発生しているか否かを監視する。第2コア20は、第1フラグがオンであると判定した場合、ステップS28へ進み、第1フラグがオンであると判定しなかった場合、ステップS29へ進む。   If the second core 20 does not determine that a non-number has occurred in step S23, the process proceeds to step S27. In step S27, it is determined whether or not the first flag is on (monitoring unit). Whether the second core 20 confirms the first shared area 31, that is, confirms the first flag, whether or not a non-number has occurred in the calculation in the first core 10 that is another processing unit. To monitor. If the second core 20 determines that the first flag is on, the process proceeds to step S28. If the second core 20 does not determine that the first flag is on, the process proceeds to step S29.

ステップS28では、変数dを初期化する(第2初期化部)。第2コア20は、ステップS27で第1フラグがオンであり、第1コア10での演算で非数が発生していたと判定した場合、非数が発生している変数cに関連する変数dを初期化する。つまり、第2コア20は、他コア10が演算した変数cに非数が発生していた場合、自コア20が変数cを用いて演算する変数dを初期化する。第2コア20は、例えばd=0とする。第2コア20は、例えばプログラムの内容などによって、変数dが変数cに関連するか否かを確認できる。   In step S28, the variable d is initialized (second initialization unit). If the second core 20 determines that the first flag is on in step S27 and that a non-number has occurred in the calculation in the first core 10, the variable d related to the variable c in which the non-number has occurred. Is initialized. That is, the second core 20 initializes the variable d calculated by the own core 20 using the variable c when a non-number has occurred in the variable c calculated by the other core 10. The second core 20 has d = 0, for example. The second core 20 can confirm whether or not the variable d is related to the variable c, for example, based on the contents of the program.

なお、第2コア20は、変数dとは異なる変数に関しても、変数cを用いて演算を行うものであってもよい。この第2コア20が変数cを用いて演算を行う変数は、第2RAM22や共有RAM30に記憶されている。この場合、ステップS28では、第2コア20は、変数dだけでなく、変数cを用いて演算を行う全ての変数を初期化してもよい。   Note that the second core 20 may perform a calculation using the variable c even for a variable different from the variable d. Variables that are calculated by the second core 20 using the variable c are stored in the second RAM 22 and the shared RAM 30. In this case, in step S <b> 28, the second core 20 may initialize not only the variable d but also all variables that perform the calculation using the variable c.

また、第2コア20は、ステップS22で変数dを演算した場合、ステップS27よりも先に、変数領域22aの変数dを演算によって得られた値に更新してもよい。しかしながら、本実施形態では、ステップS27で第1フラグがオンであると判定した場合、変数領域22aの変数dを演算によって得られた値に更新する前に、変数領域22aの変数dを初期化する。これによって、マイコン100は、変数領域22aの変数dが二度更新されることを抑制できる。また、マイコン100は、変数領域22aの変数dが、非数が発生した変数cを用いて演算された値に更新されることを抑制できる。   In addition, when the variable d is calculated in step S22, the second core 20 may update the variable d in the variable region 22a to a value obtained by the calculation before step S27. However, in this embodiment, when it is determined in step S27 that the first flag is on, the variable d in the variable area 22a is initialized before the variable d in the variable area 22a is updated to a value obtained by the calculation. To do. Thereby, the microcomputer 100 can suppress the variable d of the variable area 22a being updated twice. Further, the microcomputer 100 can suppress the variable d in the variable area 22a from being updated to a value calculated using the variable c in which a non-number has occurred.

なお、各コア10,20で演算された変数c,dは、各種制御に用いられるものであってもよい。この場合、マイコン100は、変数領域22aの変数dが、非数が発生した変数cを用いて演算された値に更新されることを抑制できるため、変数dを用いる制御の信頼性を向上できる。   The variables c and d calculated by the cores 10 and 20 may be used for various controls. In this case, the microcomputer 100 can prevent the variable d in the variable area 22a from being updated to a value calculated using the variable c in which a non-number has occurred, and thus can improve the reliability of control using the variable d. .

ステップS29では、変数dに演算結果を書き込む。第2コア20は、ステップS22での演算結果を変数領域22aに書き込む。   In step S29, the calculation result is written in the variable d. The second core 20 writes the calculation result in step S22 in the variable area 22a.

次に、図2のシーケンス図を用いて、第1コア10と第2コア20の処理動作を説明する。タイミングt1では、第1コア10と第2コア20とが処理を開始する。よって、第1コアは、ステップS10の処理を実行し、第2コア20がステップS20を実行する。   Next, processing operations of the first core 10 and the second core 20 will be described with reference to the sequence diagram of FIG. At timing t1, the first core 10 and the second core 20 start processing. Therefore, the first core executes the process of step S10, and the second core 20 executes step S20.

タイミングt2では、第1コア10がステップS11、S12を実行し、第2コア20が非数状態の通知を受けてステップS21を実行する。タイミングt3では、第1コア10がステップS13を実行し、第2コア20がステップS22を実行する。このとき、第2コア20は、ステップS20でラッチした変数cを用いて、変数dを演算することになる。   At timing t2, the first core 10 executes steps S11 and S12, and the second core 20 receives the notification of the non-number state and executes step S21. At timing t3, the first core 10 executes step S13, and the second core 20 executes step S22. At this time, the second core 20 calculates the variable d using the variable c latched in step S20.

タイミングt4では、第1コア10がステップS14を実行し、第2コア20がステップS23を実行する。タイミングt5では、第2コア20がステップS27を実行する。そして、タイミングt6では、ステップS28を実行する。なお、タイミングt6では、第1コア10はアイドル状態となる。   At timing t4, the first core 10 executes step S14, and the second core 20 executes step S23. At timing t5, the second core 20 executes step S27. At timing t6, step S28 is executed. Note that at the timing t6, the first core 10 is in an idle state.

このように、マイコン100は、第1コア10における演算に非数が発生したか否かを判定し、非数が発生したと判定した場合、非数が発生したと判定された演算で得られた自コア10の変数cを初期化する。同様に、マイコン100は、第2コア20における演算に非数が発生したか否かを判定し、非数が発生したと判定した場合、非数が発生したと判定された演算で得られた自コア20の変数dを初期化する。   As described above, the microcomputer 100 determines whether or not a non-number has occurred in the calculation in the first core 10, and when it is determined that a non-number has occurred, the microcomputer 100 can obtain the calculation that has determined that the non-number has occurred. The variable c of the own core 10 is initialized. Similarly, the microcomputer 100 determines whether or not a non-number has occurred in the calculation in the second core 20, and when it is determined that a non-number has occurred, the microcomputer 100 is obtained by the operation determined to have generated the non-number. The variable d of the own core 20 is initialized.

また、マイコン100は、非数が発生したと判定された場合、非数が発生したことを第1コア10と第2コア20との間で共有するために、非数が発生したことを共有RAM30に記憶する。そして、マイコン100は、各コア10,20が共有RAM30を確認して、他コアでの演算に非数が発生しているか否かを監視する。   In addition, when it is determined that the non-number has occurred, the microcomputer 100 shares that the non-number has occurred in order to share the occurrence of the non-number between the first core 10 and the second core 20. Store in the RAM 30. Then, the microcomputer 100 checks whether the cores 10 and 20 check the shared RAM 30 and whether or not an innumerable number is generated in the calculation in the other cores.

このため、各コア10,20は、自コアにおける演算で用いる変数が、非数が発生している演算で得られた変数であるか否かを把握することができる。そして、マイコン100は、上記のように監視して非数が発生していた場合、非数が発生している演算で得られた変数cに関連する自コア20の変数dを初期化する。よって、マイコン100は、変数の演算を実行する複数のコア10,20が、非数が発生した演算で得られた変数cに加えて、この変数cを用いて演算された変数dを初期化することができる。つまり、マイコン100は、他コアの非数発生に応じて、関連する自コアの変数を一括初期化できるとも言える。   For this reason, each core 10 and 20 can grasp | ascertain whether the variable used by the calculation in a self-core is the variable obtained by the calculation in which the non-number generate | occur | produced. Then, the microcomputer 100 initializes the variable d of the own core 20 related to the variable c obtained by the operation in which the non-number occurs when the non-number is generated by monitoring as described above. Therefore, the microcomputer 100 initializes the variable d calculated by using the variable c in addition to the variable c obtained by the arithmetic operation in which the plurality of cores 10 and 20 executing the calculation of the variable are innumerable. can do. That is, it can be said that the microcomputer 100 can collectively initialize the related variables of its own core according to the occurrence of a non-number of other cores.

また、各コア10,20で演算された変数c,dは、各種制御に用いられるものであってもよい。上記のように、マイコン100は、非数が発生した変数cを初期化できるだけでなく、他コア20が変数cを用いて演算した変数dを初期化できる。このため、マイコン100は、非数が発生した変数cを用いて演算された変数dが初期化されないまま用いられるよりも、変数dを用いる制御の信頼性を向上できる。   The variables c and d calculated by the cores 10 and 20 may be used for various controls. As described above, the microcomputer 100 can not only initialize the variable c in which the innumerable number is generated, but also can initialize the variable d calculated by the other core 20 using the variable c. For this reason, the microcomputer 100 can improve the reliability of control using the variable d, compared with the case where the variable d calculated using the variable c in which the non-number is generated is used without being initialized.

なお、本実施形態では、処理部としてのコア10,20を備えたデュアルコアマイコンに適用した例を採用した。しかしながら、本発明はこれに限定されない。本発明は、処理部としてのマイコンを複数備えた電子装置であっても適用できる。   In this embodiment, an example applied to a dual core microcomputer provided with cores 10 and 20 as processing units is adopted. However, the present invention is not limited to this. The present invention can also be applied to an electronic apparatus including a plurality of microcomputers as processing units.

また、第2RAM22には、変数dの他にも、変数cを用いて演算されない複数の変数を記憶している。第2コア20は、ステップS28で変数dを初期化する際に、変数dだけではなく、変数cを用いて演算されない他の変数も含めて全ての変数を初期化してもよい。つまり、第2コア20は、ステップS28で第2RAM22に記憶されている全ての変数を初期化してもよい。この場合、第2コア20は、変数cを用いて演算する変数dを第2RAM22から選択する必要がない。よって、マイコン100は、変数cを用いて演算する変数を第2RAM22から選択するよりも容易に変数dを初期化することができる。   In addition to the variable d, the second RAM 22 stores a plurality of variables that are not calculated using the variable c. When the variable d is initialized in step S28, the second core 20 may initialize not only the variable d but also all variables including other variables that are not calculated using the variable c. That is, the second core 20 may initialize all variables stored in the second RAM 22 in step S28. In this case, the second core 20 does not need to select the variable d to be calculated using the variable c from the second RAM 22. Therefore, the microcomputer 100 can initialize the variable d more easily than selecting a variable to be calculated using the variable c from the second RAM 22.

以上、本発明の好ましい実施形態について説明した。しかしながら、本発明は、上記実施形態に何ら制限されることはなく、本発明の趣旨を逸脱しない範囲において、種々の変形が可能である。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiment, and various modifications can be made without departing from the spirit of the present invention.

10…第1コア、11…第1フラグ領域、12…第1コア用RAM、20…第2コア、21…第2フラグ領域、22…第2コア用RAM、22a…変数領域、30…共有RAM、
31…第1共有領域、32…第2共有領域、33…第3共有領域、100…マイコン、200…ECU
DESCRIPTION OF SYMBOLS 10 ... 1st core, 11 ... 1st flag area | region, 12 ... RAM for 1st cores, 20 ... 2nd core, 21 ... 2nd flag area | region, 22 ... RAM for 2nd cores, 22a ... Variable area | region, 30 ... Sharing RAM,
31 ... 1st shared area, 32 ... 2nd shared area, 33 ... 3rd shared area, 100 ... Microcomputer, 200 ... ECU

Claims (4)

複数の処理部を備えた電子装置であって、
各処理部は、
変数を演算する演算部(S10、S22)と、
自処理部における前記演算部での演算にエラーが発生したか否かを判定する判定部(S11、S23)と、
前記判定部にてエラーが発生したと判定された場合、エラーが発生したと判定された演算で得られた前記自処理部の変数を初期化する第1初期化部(S14、S26)と、を備え、
他処理部における前記演算部の演算で得られた変数値を保持しつつ、他処理部の演算した変数に関連する変数を、保持した変数値を用いて前記演算部が演算するものであり、
さらに、
前記演算部の演算が複数の前記処理部間で並行実行され、前記判定部にてエラーが発生したと判定された場合、エラーが発生したことを複数の前記処理部間で共有するために、エラーが発生したことを記憶するエラー記憶部(S13、S25)と、
前記エラー記憶部を確認することで、他処理部の前記演算部での演算にエラーが発生しているか否かを監視する監視部(S15、S27)と、
前記監視部での監視でエラーが発生していた場合、該エラーが発生している演算で得られた変数に関連する前記自処理部の変数を初期化する第2初期化部(S16、S28)と、備えている電子装置。
An electronic device including a plurality of processing units,
Each processing unit
A calculation unit (S10, S22) for calculating a variable;
A determination unit (S11, S23) for determining whether or not an error has occurred in the calculation in the calculation unit in the processing unit;
A first initialization unit (S14, S26) that initializes a variable of the processing unit obtained by an operation in which it is determined that an error has occurred when the determination unit determines that an error has occurred; With
While holding the variable value obtained by the calculation of the calculation unit in the other processing unit, the calculation unit calculates the variable related to the variable calculated by the other processing unit using the held variable value,
further,
In order to execute the calculation of the calculation unit in parallel between the plurality of processing units, and when the determination unit determines that an error has occurred, in order to share that the error has occurred among the plurality of processing units, An error storage unit (S13, S25) for storing that an error has occurred;
A monitoring unit (S15, S27) for monitoring whether or not an error has occurred in the calculation in the calculation unit of another processing unit by checking the error storage unit;
If an error has occurred during monitoring by the monitoring unit, a second initialization unit (S16, S28) that initializes a variable of the self-processing unit related to a variable obtained by a calculation in which the error has occurred. ) And the electronic device provided.
複数の前記処理部は、一つのマイコンに設けられたコアである請求項1に記載の電子装置。   The electronic device according to claim 1, wherein the plurality of processing units are cores provided in one microcomputer. 変数値が記憶された変数記憶部を備えており、
前記演算部は、前記変数記憶部に記憶された変数を演算するとともに、演算で得られた値に変数を更新し、
前記監視部は、前記自処理部における前記演算部の演算によって得られた値に変数を更新する前に前記エラー記憶部を確認し、
前記第2初期化部は、前記監視部での監視でエラーが発生していた場合、前記自処理部における前記演算部の演算によって得られた値に変数を更新する前に、前記変数記憶部に記憶された、前記自処理部の変数を初期化する請求項1又は2に記載の電子装置。
A variable storage unit in which variable values are stored;
The calculation unit calculates a variable stored in the variable storage unit, updates the variable to a value obtained by the calculation,
The monitoring unit checks the error storage unit before updating the variable to the value obtained by the calculation of the calculation unit in the self-processing unit,
When an error has occurred during monitoring by the monitoring unit, the second initialization unit may update the variable storage unit before updating the variable to a value obtained by the calculation of the calculation unit in the processing unit. The electronic device according to claim 1, wherein the variable of the self-processing unit stored in is initialized.
前記第2初期化部は、他処理部の前記演算部での演算にエラーが発生していた場合、該エラーが発生している演算で得られた変数に関連する前記自処理部の変数を含む、前記自処理部における全ての変数を初期化する請求項1又は2に記載の電子装置。   The second initialization unit, when an error occurs in the calculation in the calculation unit of another processing unit, the variable of the self-processing unit related to the variable obtained in the calculation in which the error occurs The electronic device according to claim 1, wherein all of the variables in the processing unit are initialized.
JP2016137794A 2016-07-12 2016-07-12 Electronic equipment Active JP6558317B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016137794A JP6558317B2 (en) 2016-07-12 2016-07-12 Electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016137794A JP6558317B2 (en) 2016-07-12 2016-07-12 Electronic equipment

Publications (2)

Publication Number Publication Date
JP2018010425A JP2018010425A (en) 2018-01-18
JP6558317B2 true JP6558317B2 (en) 2019-08-14

Family

ID=60995507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016137794A Active JP6558317B2 (en) 2016-07-12 2016-07-12 Electronic equipment

Country Status (1)

Country Link
JP (1) JP6558317B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4158566B2 (en) * 2003-03-18 2008-10-01 株式会社デンソー Electronic control device having floating point arithmetic function
JP4356650B2 (en) * 2005-05-16 2009-11-04 株式会社デンソー Data communication method and data communication system
JP4920015B2 (en) * 2008-09-03 2012-04-18 日立オートモティブシステムズ株式会社 Control software for distributed control and electronic control device
JP5379712B2 (en) * 2010-02-08 2013-12-25 日立オートモティブシステムズ株式会社 In-vehicle control device

Also Published As

Publication number Publication date
JP2018010425A (en) 2018-01-18

Similar Documents

Publication Publication Date Title
JP6744913B2 (en) Rounding of floating point numbers
JP5776688B2 (en) Information processing apparatus and task switching method
US5684728A (en) Data processing system having a saturation arithmetic operation function
US8484520B2 (en) Processor capable of determining ECC errors
JP7541526B2 (en) Handling overflow or underflow of anchor data values
CN108701031B (en) Register Access Control
JP6558317B2 (en) Electronic equipment
JP2011008702A (en) Fault processor
CN113342671B (en) Method, device, electronic device and medium for verifying computing module
CN118069224B (en) Address generation method, device, computer equipment and storage medium
JP6332091B2 (en) Electronic control unit
CN112433914B (en) Method and system for obtaining parallel computing task progress
US20100077383A1 (en) Simulation method and storage medium for storing program
JP5732139B2 (en) Conditional selection of data elements
JP6519530B2 (en) Verification apparatus, verification program, and verification method
JP2010160622A (en) Simulator
CN120994254B (en) Branch prediction result determination method and electronic equipment
CN116802635A (en) Electronic device BIOS update
US10817288B2 (en) Combined instruction for addition and checking of terminals
US9747074B2 (en) Division circuit and microprocessor
JP2008530679A (en) Electronic parallel processing circuit
JP4893340B2 (en) Calculation apparatus and calculation program
JP6127883B2 (en) Semiconductor device and semiconductor device operation control method
JP2015121953A (en) Microcomputer and electronic control device
JPH0233173B2 (en)

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190529

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190701

R151 Written notification of patent or utility model registration

Ref document number: 6558317

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250