JP2018041402A - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP2018041402A
JP2018041402A JP2016176821A JP2016176821A JP2018041402A JP 2018041402 A JP2018041402 A JP 2018041402A JP 2016176821 A JP2016176821 A JP 2016176821A JP 2016176821 A JP2016176821 A JP 2016176821A JP 2018041402 A JP2018041402 A JP 2018041402A
Authority
JP
Japan
Prior art keywords
data
abnormality detection
detection circuit
ecc
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016176821A
Other languages
Japanese (ja)
Other versions
JP6658417B2 (en
Inventor
英治 松岡
Eiji Matsuoka
英治 松岡
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 JP2016176821A priority Critical patent/JP6658417B2/en
Publication of JP2018041402A publication Critical patent/JP2018041402A/en
Application granted granted Critical
Publication of JP6658417B2 publication Critical patent/JP6658417B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Detection And Correction Of Errors (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technique for efficiently using a memory and determining whether or not an ECC device is in a normal state.SOLUTION: A data generation part 133 is configured so as to acquire data from a memory 131 and generate diagnostic data which indicates data in which, 2 or more of a bit is reversed in the data. A data input part 11 is configured to input the diagnostic data as read data, to an abnormality detection circuit 132 which outputs abnormality detection information which indicates a fact that, there is abnormality in the read data when there is an error of 2 bits or more, between written data which indicates the data when being written in the memory when reading the data from the memory, and read data which indicates data when read from the memory. A normal determination part 11 is configured to determine that, the abnormality detection circuit is in a normal state, when the diagnostic data is input to the abnormality detection circuit, and when abnormality detection information is output from the abnormality detection circuit.SELECTED DRAWING: Figure 1

Description

本開示は、ECC機能を有するメモリを備えた電子制御装置に関する。   The present disclosure relates to an electronic control device including a memory having an ECC function.

従来、例えばROMのようにデータ書き換え不可能なメモリに備えられた回路であって、書き込まれたデータを読み出す際に書き込まれたデータの誤りを検出し訂正を行うECC機能を有するECC装置を備えた電子制御装置が知られている。ECCとは、Error Correction Codeの略である。   2. Description of the Related Art Conventionally, for example, a circuit provided in a memory such as a ROM that cannot rewrite data is provided with an ECC device having an ECC function that detects and corrects errors in written data when reading written data. Electronic control devices are known. ECC is an abbreviation for Error Correction Code.

特許文献1には、読み出された際にエラーとなるテストデータをROMの予め定められたアドレスに記録しておき、ECC装置にテストデータを読み出しさせた際にECC装置がエラーを検出した場合、該ECC装置が正常であると診断する技術が開示されている。   Japanese Patent Application Laid-Open No. 2004-228561 records test data that causes an error when read out at a predetermined address in a ROM, and the ECC device detects an error when the ECC device reads the test data. A technique for diagnosing that the ECC device is normal is disclosed.

特開2009−282849号公報JP 2009-282849 A

しかしながら、上記特許文献1に記載の技術では、テストデータを予めメモリに記録しておく必要があるためメモリを有効に利用することができない、という問題があった。
本発明はこのような問題に鑑みてなされたものであり、メモリを有効に利用し、且つ、ECC装置が正常であるか否かを判断する技術を提供する。
However, the technique described in Patent Document 1 has a problem that the memory cannot be used effectively because test data needs to be recorded in the memory in advance.
The present invention has been made in view of such problems, and provides a technique for effectively using a memory and determining whether or not an ECC device is normal.

本開示の電子制御装置(10)は、データ生成部(133)と、データ入力部(11、S20)と、正常判断部(11、S260)と、を備える。
データ生成部は、メモリ(131)からデータを取得し、該データにおける2以上のビットを反転させたデータを表す診断データを生成するように構成されている。データ入力部は、メモリからデータを読み出す際にメモリに書き込まれたときのデータを示す書き込みデータとメモリから読み出すときのデータを示す読み出しデータとの間に2ビット以上の誤りがある場合に読み出しデータに異常がある旨を表す異常検出情報を出力する異常検出回路(132)に、診断データを読み出しデータとして入力するように構成されている。正常判断部は、診断データが異常検出回路に入力され、異常検出回路から異常検出情報が出力された場合に、異常検出回路が正常であると判断するように構成されている。
The electronic control device (10) of the present disclosure includes a data generation unit (133), a data input unit (11, S20), and a normality determination unit (11, S260).
The data generation unit is configured to acquire data from the memory (131) and generate diagnostic data representing data obtained by inverting two or more bits in the data. The data input unit reads data when there is an error of 2 bits or more between the write data indicating the data written to the memory and the read data indicating the data read from the memory when the data is read from the memory. The diagnosis data is input as read data to the abnormality detection circuit (132) that outputs abnormality detection information indicating that there is an abnormality. The normality determination unit is configured to determine that the abnormality detection circuit is normal when diagnostic data is input to the abnormality detection circuit and abnormality detection information is output from the abnormality detection circuit.

このような構成によれば、メモリから読み出すデータに意図的に誤りを生じさせた診断データを異常検出回路に入力して異常検出回路が誤りを検出した場合に該異常検出回路が正常であると判断する。このため、従来技術のように意図的に誤りを生じさせたデータをメモリに予め記録させておく必要が無くなり、メモリを有効に利用し、且つ異常検出回路が正常であるか否かを判断することができる。   According to such a configuration, if the abnormality detection circuit detects an error when diagnostic data that intentionally causes an error in the data read from the memory is input to the abnormality detection circuit, the abnormality detection circuit is normal. to decide. For this reason, it is not necessary to previously record data in which an error is intentionally generated as in the prior art, it is possible to effectively use the memory and determine whether the abnormality detection circuit is normal. be able to.

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

第1実施形態のECU及びマイコンの構成を示すブロック図。The block diagram which shows the structure of ECU and microcomputer of 1st Embodiment. 反転装置の構成を示す図。The figure which shows the structure of an inversion apparatus. ECC診断処理のフローチャート。The flowchart of an ECC diagnostic process. 例外処理のフローチャート。The flowchart of exception processing. 通常診断処理のフローチャート。The flowchart of a normal diagnostic process. 第2実施形態のECU及びマイコンの構成を示すブロック図。The block diagram which shows the structure of ECU of 2nd Embodiment, and a microcomputer. 例外前処理を示すフローチャート。The flowchart which shows exception pre-processing. 例外後処理を示すフローチャート。The flowchart which shows an exception post-process. 他の実施形態のECC診断処理を示すフローチャート。The flowchart which shows the ECC diagnostic process of other embodiment.

以下、図面を参照しながら、本開示の実施形態を説明する。
[1.第1実施形態]
[1−1.構成]
図1に示す制御システム1は、車両に搭載されるシステムである。制御システム1は、電子制御装置(以下、ECU)5を備える。制御システム1は、クランク角センサ6、インジェクタ7、警告灯8を備えていてもよい。ECUは、Electronic Control Unitの略である。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[1. First Embodiment]
[1-1. Constitution]
A control system 1 shown in FIG. 1 is a system mounted on a vehicle. The control system 1 includes an electronic control unit (hereinafter referred to as ECU) 5. The control system 1 may include a crank angle sensor 6, an injector 7, and a warning light 8. ECU is an abbreviation for Electronic Control Unit.

クランク角センサ6は、図示しないエンジンの回転数や図示しないクランクシャフトの回転角を検出する。インジェクタ7は、エンジン内に燃料を噴射する。
ECU5は、クランク角センサ6により検出されるエンジンの回転数やクランクシャフトの回転角等を用いて、インジェクタ7による燃料噴射量の制御を行う。
The crank angle sensor 6 detects the rotational speed of an engine (not shown) and the rotation angle of a crankshaft (not shown). The injector 7 injects fuel into the engine.
The ECU 5 controls the fuel injection amount by the injector 7 using the engine speed detected by the crank angle sensor 6 and the rotation angle of the crankshaft.

警告灯8は、本実施形態では、車両のインスツルメントパネルに設けられ、ECU5から出力される制御信号に従って点灯または消灯のいずれかに切り替えられる。
ECU5は、マイクロコンピュータ(以下、マイコン)10を備える。
In the present embodiment, the warning light 8 is provided on the instrument panel of the vehicle, and is switched on or off according to a control signal output from the ECU 5.
The ECU 5 includes a microcomputer (hereinafter referred to as a microcomputer) 10.

マイコン10は、CPU11と、ROM12と、RAM13と、異常注入モジュール14と、信号の入出力を行う入出力回路15と、これらを相互に接続するバス16と、を備える。   The microcomputer 10 includes a CPU 11, a ROM 12, a RAM 13, an abnormal injection module 14, an input / output circuit 15 that inputs and outputs signals, and a bus 16 that connects these components to each other.

マイコン10は、CPU11が非遷移的実体的記録媒体に格納されたプログラムを実行することにより各種機能を実現する。ここでいう各種機能には、ECU5が備える各種機能も含まれうる。この例では、ROM12が、プログラムを格納した非遷移的実体的記録媒体に該当する。また、このプログラムが実行されることで、プログラムに対応する方法が実行される。なお、ECU5を構成するマイコン10の数は1つでも複数でもよい。   The microcomputer 10 implements various functions by the CPU 11 executing a program stored in a non-transitional tangible recording medium. The various functions here may include various functions provided in the ECU 5. In this example, the ROM 12 corresponds to a non-transitional tangible recording medium that stores a program. Also, by executing this program, a method corresponding to the program is executed. The number of microcomputers 10 constituting the ECU 5 may be one or plural.

各種機能を実現する手法はソフトウェアに限るものではなく、その一部又は全部の要素について、一つあるいは複数のハードウェアを用いて実現してもよい。例えば、上記機能がハードウェアである電子回路によって実現される場合、その電子回路は多数の論理回路を含むデジタル回路、又はアナログ回路、あるいはこれらの組合せによって実現してもよい。   The method of realizing various functions is not limited to software, and some or all of the elements may be realized using one or a plurality of hardware. For example, when the above function is realized by an electronic circuit that is hardware, the electronic circuit may be realized by a digital circuit including a large number of logic circuits, an analog circuit, or a combination thereof.

RAM13は、揮発性メモリであり、CPU11の演算結果等を示すデータを一時的に記録する。RAM13は、記録領域部131と、ECC装置132と、反転装置133とを備える。   The RAM 13 is a volatile memory, and temporarily records data indicating the calculation result of the CPU 11 and the like. The RAM 13 includes a recording area unit 131, an ECC device 132, and a reversing device 133.

記録領域部131は、データ用領域201とECC用領域202とを備える。データ用領域201とは、データが記録される領域を示す。ECC用領域202とは、データに対応する誤り訂正符号(以下、ECC)が記録される領域を示す。ECCについては後述する。   The recording area unit 131 includes a data area 201 and an ECC area 202. The data area 201 indicates an area where data is recorded. The ECC area 202 is an area in which an error correction code (hereinafter, ECC) corresponding to data is recorded. The ECC will be described later.

ECC装置132は、RAM13へデータを書き込むときに、書き込むデータ(以下、書き込みデータ)に基づいて、誤り訂正用のデータとなる誤り訂正符号(以下、ECC)を生成する。書き込みデータとは、記録領域部131に書き込まれたときのデータを示す。以下では、書き込みデータ、つまりECCの生成の際に用いられたデータを元データともいう。そしてECC装置132は、生成したECCと元データとを対応付けてROM12に書き込む。   When writing data to the RAM 13, the ECC device 132 generates an error correction code (hereinafter referred to as ECC) serving as error correction data based on the data to be written (hereinafter referred to as write data). The write data indicates data when written in the recording area unit 131. Hereinafter, write data, that is, data used when generating ECC is also referred to as original data. Then, the ECC device 132 associates the generated ECC with the original data and writes them in the ROM 12.

またECC装置132は、ROM12から元データを読み出すときに、この元データとともに、対応するECCを読み出す。そしてECC装置132は、読み出したECCと、読み出した元データを用いて生成したECCとを比較することにより、誤りが発生したか否かを検出する。   Further, when reading out the original data from the ROM 12, the ECC device 132 reads out the corresponding ECC together with the original data. Then, the ECC device 132 detects whether an error has occurred by comparing the read ECC with the ECC generated using the read original data.

ECC装置132は、検出結果に基づいて、誤りが発生していないと判断した場合には、読み出した元データをそのままへ出力する。
またECC装置132は、1ビットの誤りを検出した場合には、読み出したECCを用いて、読み出した元データを訂正して、訂正後の元データを出力する。
When it is determined that no error has occurred based on the detection result, the ECC device 132 outputs the read original data as it is.
When the ECC device 132 detects a 1-bit error, the ECC device 132 corrects the read original data using the read ECC, and outputs the corrected original data.

またECC装置132は、元データと読み出した元データとの間に2ビット以上の誤りを検出した場合に、異常検出情報をCPU11へ出力する。
異常検出情報とは、読み出した元データに異常がある旨を示す情報を表す。ここでいう情報には、例えば、読み出した元データで誤りを検出したビットの数を示すエラービット数や、異常があることを示す1または0で表されるフラグ等が含まれうる。
The ECC device 132 outputs abnormality detection information to the CPU 11 when an error of 2 bits or more is detected between the original data and the read original data.
The abnormality detection information represents information indicating that the read original data has an abnormality. The information here may include, for example, an error bit number indicating the number of bits in which an error is detected in the read original data, a flag represented by 1 or 0 indicating that there is an abnormality, and the like.

また、ECC装置132は、異常アドレス通知部134を備えており、該異常アドレス通知部134は、元データと読み出した元データとの間に2ビット以上の誤りが検出された場合に、異常アドレスを記録するとともに該異常アドレスをCPU11へ出力する。異常アドレスとは、RAM13において、誤りが検出された元データ、すなわち、誤りが検出された読み出した元データが記憶されているアドレスを示す。   The ECC device 132 also includes an abnormal address notification unit 134. The abnormal address notification unit 134 detects an abnormal address when an error of 2 bits or more is detected between the original data and the read original data. And the abnormal address is output to the CPU 11. The abnormal address indicates an address in the RAM 13 where original data where an error is detected, that is, read original data where an error is detected is stored.

反転装置133は、記録領域部131からデータの読み出しが行われる際に記録領域部131から取得されるデータ及びECCが反転装置133を経由してECC装置132へ入力されるように、記録領域部131とECC装置132との間に設けられている。   The reversing device 133 is configured so that the data and ECC acquired from the recording region 131 when the data is read from the recording region 131 are input to the ECC device 132 via the reversing device 133. 131 and the ECC device 132 are provided.

反転装置133は、記録領域部131からデータを取得し、診断データを生成するように構成されている。診断データとは、記録領域部131から取得したデータに、ECC装置132にて訂正不可能な2ビット以上の誤りを生じさせるように、該データにおける2以上のビットを反転させたデータを表す。   The reversing device 133 is configured to acquire data from the recording area unit 131 and generate diagnostic data. The diagnostic data represents data obtained by inverting two or more bits in the data so that an error of two or more bits that cannot be corrected by the ECC device 132 is generated in the data acquired from the recording area unit 131.

具体的には、図2に示すように、反転装置133は、記録領域部131から取得されたデータ及びECCをECC装置132へ出力する複数の経路のうち予め定められた経路において、反転素子51を備える。   Specifically, as illustrated in FIG. 2, the reversing device 133 includes a reversing element 51 in a predetermined route among a plurality of routes for outputting data and ECC acquired from the recording area unit 131 to the ECC device 132. Is provided.

反転素子51は、インバータとしての機能を有する素子である。反転素子51は、入力部511と出力部512とイネーブル端子513とを備え、イネーブル端子513へ入力されるイネーブル信号に従って、イネーブル信号が入力されるとインバータとして作動するよう構成されている。   The inverting element 51 is an element having a function as an inverter. The inverting element 51 includes an input unit 511, an output unit 512, and an enable terminal 513, and is configured to operate as an inverter when an enable signal is input in accordance with an enable signal input to the enable terminal 513.

イネーブル信号とは、CPUの指示により異常注入モジュール14が反転素子51に対して入力する信号である。
すなわち、反転素子51は、イネーブル端子513にイネーブル信号が入力されている場合に、入力部511に入力された電圧の論理レベルを逆転させて出力部512から出力する周知のインバータとして作動する。反転素子51は、イネーブル端子513にイネーブル信号が出力されていない場合に、入力部511に入力された電圧の論理レベルをそのままの状態で出力部512から出力する。
The enable signal is a signal that the abnormal injection module 14 inputs to the inverting element 51 in accordance with an instruction from the CPU.
That is, the inverting element 51 operates as a well-known inverter that reverses the logic level of the voltage input to the input unit 511 and outputs it from the output unit 512 when an enable signal is input to the enable terminal 513. The inverting element 51 outputs the logic level of the voltage input to the input unit 511 from the output unit 512 as it is when no enable signal is output to the enable terminal 513.

反転素子51における入力部511は、信号線53によって記録領域部131に接続され、出力部512は信号線54によってECC装置132に接続される。
反転素子51は、データを構成する複数のビットをビット毎に記録領域部131から出力する複数の信号線(以下、データ信号線)53、およびECCを構成する一又は複数のビットをビット毎に記録領域部131から出力する一又は複数の信号線(以下、ECC信号線)53のうちの、予め定められた信号線に対して設けられうる。
The input unit 511 in the inverting element 51 is connected to the recording area unit 131 by the signal line 53, and the output unit 512 is connected to the ECC device 132 by the signal line 54.
The inverting element 51 outputs, for each bit, a plurality of signal lines (hereinafter referred to as data signal lines) 53 that output a plurality of bits constituting data from the recording area unit 131 for each bit, and one or a plurality of bits constituting the ECC for each bit. It can be provided for a predetermined signal line among one or a plurality of signal lines (hereinafter referred to as ECC signal lines) 53 output from the recording area 131.

以下の説明においては、同一の構成を区別する場合は信号線53aのように添え字を付して記載し、区別しない場合は添え字を省略して記載する。図2では、例えば、信号線53a−53cがデータ信号線に相当し、図2では、信号線53d−53eがデータ信号線に相当する。   In the following description, when the same configuration is distinguished, a suffix is added as in the signal line 53a, and when not distinguished, the suffix is omitted. In FIG. 2, for example, the signal lines 53a to 53c correspond to data signal lines, and in FIG. 2, the signal lines 53d to 53e correspond to data signal lines.

なお、データがM個のビットで構成され、ECCがN個のビットで構成されているものとすると、記録領域部131から取得されたデータ及びECCをECC装置132へ出力する複数の経路は、M本のデータ信号線53と、N本のECC信号線53とを備える。M、Nは自然数であり、MはNより大きい値に設定されている。   If the data is composed of M bits and the ECC is composed of N bits, a plurality of paths for outputting the data and ECC acquired from the recording area unit 131 to the ECC device 132 are as follows: M data signal lines 53 and N ECC signal lines 53 are provided. M and N are natural numbers, and M is set to a value larger than N.

本実施形態では、反転素子51は、M本のデータ信号線53及びN本のECC信号線53の全てに対して設けられている。ただし、これに限定されるものではなく、反転素子51は、M本のデータ信号線53のうち予め定められた少なくとも2本の信号線に設けられうる。また、反転素子51は、N本のECC信号線53のうち予め定められた一または複数の経路に設けられうる。   In the present embodiment, the inverting elements 51 are provided for all of the M data signal lines 53 and the N ECC signal lines 53. However, the present invention is not limited to this, and the inverting elements 51 can be provided on at least two predetermined signal lines among the M data signal lines 53. Further, the inverting element 51 can be provided on one or a plurality of predetermined paths among the N ECC signal lines 53.

異常注入モジュール14は、反転装置133が備える反転素子51のイネーブル端子513に対して、CPU11からの指示に従ってイネーブル信号を出力するように構成されている。   The abnormal injection module 14 is configured to output an enable signal according to an instruction from the CPU 11 to the enable terminal 513 of the inverting element 51 provided in the inverting device 133.

具体的には、異常注入モジュール14は、図示しないが、反転素子51のそれぞれに対応するスイッチを備えている。該スイッチは切り替え信号に従ってオン又はオフされるよう構成されている。異常注入モジュール14では、該スイッチがオンされると、対応する反転素子51にイネーブル信号が出力されるよう構成されている。   Specifically, the abnormal injection module 14 includes a switch corresponding to each of the inverting elements 51, although not shown. The switch is configured to be turned on or off according to a switching signal. The abnormal injection module 14 is configured to output an enable signal to the corresponding inverting element 51 when the switch is turned on.

異常注入モジュール14は、CPU11からの指示に従って、どの反転素子51に対応するスイッチをオンするかを特定し、特定したスイッチをオンする切り替え信号を出力するよう構成されている。   The abnormal injection module 14 is configured to specify which inverting element 51 is to be turned on in accordance with an instruction from the CPU 11 and to output a switching signal to turn on the specified switch.

本実施形態では、異常注入モジュール14は、後述するようにCPU11が反転装置133を有効に設定する場合、CPU11からの指示に従って、データにおける最上位ビットを示すM番目のビット(以下、Mビット)と、M−1番目のビット(以下、(M−1)ビット)に対応する信号線53a、53bに接続する反転素子51a、51bにイネーブル信号を入力するよう構成されている。   In the present embodiment, the abnormal injection module 14, as will be described later, when the CPU 11 sets the inverting device 133 to be valid, according to an instruction from the CPU 11, an Mth bit (hereinafter referred to as M bit) indicating the most significant bit in the data The enable signal is input to the inverting elements 51a and 51b connected to the signal lines 53a and 53b corresponding to the M-1th bit (hereinafter referred to as (M-1) bit).

これにより、反転装置133が有効に設定されると、反転装置133では、記録領域部131から取得したデータを用いて、Mビット目及び(M−1)ビット目において誤りが生じた診断データが生成され、生成された診断データがECC装置132へ入力される。   As a result, when the inverting device 133 is set to be effective, the inverting device 133 uses the data acquired from the recording area unit 131 to generate diagnostic data in which an error has occurred in the Mth bit and the (M−1) th bit. The generated diagnostic data is input to the ECC device 132.

また本実施形態では、異常注入モジュール14は、CPU11が反転装置133を無効に設定する場合、CPU11からの指示に従って、全ての信号線53に対応する反転素子51にイネーブル信号を入力しないよう構成されている。これにより、反転装置133が無効に設定される場合、反転装置133では、診断データが生成されず、記録領域部131から取得したデータがそのままECC装置132へ入力される。   In this embodiment, the abnormal injection module 14 is configured not to input an enable signal to the inverting elements 51 corresponding to all the signal lines 53 in accordance with an instruction from the CPU 11 when the CPU 11 sets the inverting device 133 to be invalid. ing. Accordingly, when the reversing device 133 is set to be invalid, the reversing device 133 does not generate diagnostic data, and the data acquired from the recording area unit 131 is input to the ECC device 132 as it is.

この様に構成されたマイコン10では、CPU11が、ROM12に記録されたプログラムに基づいて、燃料噴射量の制御等といったECU5の有する機能を実現する処理や、後述するECC診断処理、通常診断処理といった、各種処理を実行する。   In the microcomputer 10 configured as described above, the CPU 11 performs processing for realizing the functions of the ECU 5 such as control of the fuel injection amount based on a program recorded in the ROM 12, ECC diagnosis processing, and normal diagnosis processing described later. Various processes are executed.

[1−2.処理]
[ECC診断処理]
ECU5においてマイコン10が実行するECC診断処理について、図3のフローチャートを用いて説明する。ECC診断処理は、ECC装置132が正常に機能しているか否かを診断する処理である。
[1-2. processing]
[ECC diagnosis processing]
The ECC diagnosis process executed by the microcomputer 10 in the ECU 5 will be described with reference to the flowchart of FIG. The ECC diagnosis process is a process for diagnosing whether or not the ECC device 132 is functioning normally.

ECC診断処理は、予め定められた所定期間毎に実行されうる。また、ECC診断処理は、マイコン10が初期化される初期化処理、またはマイコン10がシャットダウンされるシャットダウン処理が開始されることや、マイコン10にてプログラムを実行する際にアイドル期間が生じたこと、等をきっかけとして実行されうる。   The ECC diagnosis process can be executed every predetermined period. In addition, the ECC diagnosis process starts an initialization process in which the microcomputer 10 is initialized or a shutdown process in which the microcomputer 10 is shut down, or an idle period occurs when the microcomputer 10 executes a program. , Etc. can be executed as a trigger.

CPU11は、はじめにS5では、反転装置133を無効に設定する。具体的には、CPU11は、異常注入モジュール14に対して、全ての反転素子51に対応するスイッチをオフさせる指示を出力する。これにより、全ての反転素子51に対してイネーブル信号が出力されなくなり、反転装置133は、記録領域部131から出力されたデータ及びECCをそのままECC装置132へ出力するよう作動する。   First, in S5, the CPU 11 disables the reversing device 133. Specifically, the CPU 11 outputs an instruction to turn off the switches corresponding to all the inverting elements 51 to the abnormal injection module 14. As a result, the enable signal is not output to all the inverting elements 51, and the inverting device 133 operates to output the data and ECC output from the recording area 131 to the ECC device 132 as they are.

CPU11は、続くS10では、予め定められたアドレス(以下、指定アドレス)のデータを初期化する。具体的には、CPU11は、記録領域部131の指定アドレスに0を書き込む。つまり、CPU11は、本ステップでは、後述するS20にて反転装置133が有効に設定されて該反転装置133がデータを記録領域部131から取得する前に、反転装置133が記録領域部131から取得しようとするデータの全てのビットを0に書き換えている。   In the subsequent S10, the CPU 11 initializes data at a predetermined address (hereinafter, designated address). Specifically, the CPU 11 writes 0 in the designated address of the recording area unit 131. That is, in this step, the CPU 11 acquires the reversing device 133 from the recording area 131 before the reversing device 133 is set to be effective in S20 described later and the reversing device 133 acquires data from the recording area 131. All bits of the data to be written are rewritten to 0.

このとき、指定アドレスのデータ領域には0がデータとして記録され、ECC領域には該データに対応するECCが記録される。なお、指定アドレスは、本実施形態では、RAM13の記録領域部131に記録されているのではなく、本ECC診断処理を表すプログラムにて予め指定されている。   At this time, 0 is recorded as data in the data area of the designated address, and ECC corresponding to the data is recorded in the ECC area. In the present embodiment, the designated address is not recorded in the recording area 131 of the RAM 13, but is designated in advance by a program representing the ECC diagnosis processing.

CPU11は、続くS15では、診断状態フラグをセットする。また、CPU11は、診断結果フラグをセットする。
診断状態フラグは、本ECC診断処理が実行中であるか否かを示すフラグであり、セットされている場合に本ECC診断処理が実行中であること、つまり診断中であることを示す。診断結果フラグは、本ECC診断処理によるECC装置132の診断結果が正常であるか異常であるかを示すフラグであり、セットされている場合にECC装置132の診断結果が異常であることを示す。
In subsequent S15, the CPU 11 sets a diagnosis state flag. Further, the CPU 11 sets a diagnosis result flag.
The diagnosis status flag is a flag indicating whether or not the ECC diagnosis processing is being executed. When the diagnosis status flag is set, the ECC diagnosis processing is being executed, that is, the diagnosis is being executed. The diagnostic result flag is a flag indicating whether the diagnostic result of the ECC device 132 by the ECC diagnostic processing is normal or abnormal, and when set, indicates that the diagnostic result of the ECC device 132 is abnormal. .

CPU11は、続くS20では、反転装置133を有効に設定し、ECC装置132に、診断データを読み出しデータとして入力する。読み出しデータとは、CPU11が記録領域部131から読み出すときのデータを示す。反転装置133を有効に設定するとは、反転装置133に記録領域部131からデータを取得させ、取得したデータにECC装置132にて訂正不可能な2ビット以上の誤りを生じさせるように、該データにおける2以上のビットを反転させたデータを表す診断データを反転装置133に生成させることを表す。   In the subsequent S20, the CPU 11 sets the reversing device 133 to be valid, and inputs diagnostic data to the ECC device 132 as read data. The read data indicates data when the CPU 11 reads from the recording area unit 131. When the inverting device 133 is set to be valid, the data is so set that the inverting device 133 acquires data from the recording area 131 and an error of 2 bits or more that cannot be corrected by the ECC device 132 is generated in the acquired data. This indicates that the inverting device 133 generates diagnostic data representing data obtained by inverting two or more bits in.

本実施形態では、前述のように、CPU11は、異常注入モジュール14に対して、データにおけるMビットと(M−1)ビットに対応する信号線に接続する反転素子51にイネーブル信号を入力するよう指示を出力し、反転装置133に診断データを生成させる。   In the present embodiment, as described above, the CPU 11 inputs an enable signal to the inverting element 51 connected to the signal line corresponding to the M bit and the (M−1) bit in the data to the abnormal injection module 14. An instruction is output to cause the inverting device 133 to generate diagnostic data.

なお、ここでいう診断データには、データ及び該データに対応するECCにおいて、ECCにおける一または複数のビットを反転させることにより、データにECC装置132にて訂正不可能な2ビット以上の誤りを生じさせたデータが含まれうる。また、ここでいう診断データには、データ及び該データに対応するECCにおいて、データにおける一または複数のビットと、ECCにおける一または複数のビットとを反転させることにより、データにECC装置132にて訂正不可能な2ビット以上の誤りを生じさせたデータが含まれうる。   In the diagnosis data here, one or a plurality of bits in the ECC are inverted in the data and the ECC corresponding to the data, so that an error of 2 bits or more that cannot be corrected by the ECC device 132 is added to the data. The generated data can be included. Further, the diagnostic data referred to herein includes data in the ECC device 132 by inverting one or more bits in the data and one or more bits in the ECC in the ECC corresponding to the data. Data that causes an error of 2 bits or more that cannot be corrected can be included.

CPU11は、いずれの診断データを生成する場合においても、反転装置133を有効に設定する際は、反転させるビットに対応する信号線に接続された反転素子51に対してイネーブル信号を出力させるよう異常注入モジュール14に対して指示を出力するように構成されればよい。   In any case where the CPU 11 generates any diagnostic data, when the inversion device 133 is set to be effective, the CPU 11 abnormally outputs an enable signal to the inversion element 51 connected to the signal line corresponding to the bit to be inverted. What is necessary is just to be comprised so that an instruction | indication may be output with respect to the injection | pouring module 14. FIG.

CPU11は、続くS25では、記録領域部131における指定アドレスのデータを読み出す。このとき、指定アドレスのデータ領域に記録されている元データは0であるが、本ステップの実行時には反転装置133が有効となっているので、この元データに2ビット以上の誤りを生じさせたデータを示す診断データが反転装置133にて生成され、該診断データが読み出しデータとしてECC装置132に入力される。   In the subsequent S25, the CPU 11 reads the data at the designated address in the recording area 131. At this time, the original data recorded in the data area of the designated address is 0, but since the inverting device 133 is valid at the time of executing this step, an error of 2 bits or more is caused in the original data. Diagnostic data indicating data is generated by the reversing device 133, and the diagnostic data is input to the ECC device 132 as read data.

そして、このとき、ECC装置132が正常に機能している場合にはCPU11へ異常検出情報が出力され、ECC装置132が正常に機能していない場合にはCPU11へ異常検出情報が出力されない。   At this time, when the ECC device 132 functions normally, abnormality detection information is output to the CPU 11, and when the ECC device 132 does not function normally, abnormality detection information is not output to the CPU 11.

CPU11は、続くS30では、異常検出情報が出力されたか否かを判断する。CPU11は、異常検出情報が出力されなかった場合に処理をS35へ移行させ、異常検出情報が出力された場合に処理をS40へ移行させる。   In the subsequent S30, the CPU 11 determines whether or not abnormality detection information has been output. When the abnormality detection information is not output, the CPU 11 shifts the process to S35, and when the abnormality detection information is output, the CPU 11 shifts the process to S40.

ここで、CPU11は、診断データがECC装置132に入力され、ECC装置132から異常検出情報が出力されなかった場合に移行するS35では、ECC装置132が異常であると判断する。そして、CPU11は、警告灯8に対して該警告灯8を点灯させる指示を出力し、ECC装置132が異常であることを警告灯8の点灯により車両の乗員に報知した後に、処理をS45へ移行させる。   Here, the CPU 11 determines that the ECC device 132 is abnormal in S <b> 35 when the diagnostic data is input to the ECC device 132 and the abnormality detection information is not output from the ECC device 132. Then, the CPU 11 outputs an instruction to turn on the warning light 8 to the warning light 8, and notifies the vehicle occupant that the ECC device 132 is abnormal by turning on the warning light 8, and then the process proceeds to S45. Transition.

一方、CPU11は、診断データがECC装置132に入力され、ECC装置132から異常検出情報が出力された場合に移行するS35では、例外処理を実行する。つまり、CPU11は、本ECC診断処理では、ECC装置132に診断データが入力されているときに異常検出情報が出力された場合に、つまり該ECC装置132が正常に機能していると判断される場合に例外処理を実行する。   On the other hand, the CPU 11 executes an exception process in S35 that is shifted to when the diagnostic data is input to the ECC device 132 and the abnormality detection information is output from the ECC device 132. That is, in this ECC diagnostic process, the CPU 11 determines that abnormality detection information is output when diagnostic data is input to the ECC device 132, that is, the ECC device 132 is functioning normally. Exception processing is executed in case.

例外処理は、詳細については後述するが、異常アドレス通知部134が正常に機能しているか否かを判断し、異常アドレス通知部134が正常に機能している場合にECC装置132が正常であると、最終的に判断する処理である。CPU11は、例外処理を実行した後に処理をS45へ移行させる。   Although the details of the exception processing will be described later, it is determined whether or not the abnormal address notification unit 134 is functioning normally. When the abnormal address notification unit 134 functions normally, the ECC device 132 is normal. This is the final determination process. After executing the exception process, the CPU 11 shifts the process to S45.

CPU11は、S45では、反転装置133を無効に設定する。具体的には、CPU11は、反転装置133における全ての信号線53に対応する反転素子51に対してイネーブル信号を入力しないよう、異常注入モジュール14に指示を出力する。CPU11は、反転装置133を無効に設定した後に処理をS50へ移行させる。   In S45, the CPU 11 sets the reversing device 133 to invalid. Specifically, the CPU 11 outputs an instruction to the abnormal injection module 14 so as not to input an enable signal to the inverting elements 51 corresponding to all the signal lines 53 in the inverting device 133. The CPU 11 shifts the process to S50 after setting the reversing device 133 to invalid.

CPU11は、S50では、診断状態フラグをリセットする。リセットされた診断状態フラグは、本ECC診断処理による診断終了を示す。CPU11は、診断状態フラグをリセットした後に本ECC診断処理を終了する。   In S50, the CPU 11 resets the diagnosis state flag. The reset diagnosis state flag indicates the end of diagnosis by the ECC diagnosis process. The CPU 11 ends the ECC diagnosis process after resetting the diagnosis state flag.

[例外処理]
次に、ECC診断処理のS45にて実行される例外処理について図4のフローチャートを用いて説明する。例外処理は、ECC装置132から異常検出情報が出力されている場合に実行される処理である。
[Exception handling]
Next, the exception process executed in S45 of the ECC diagnosis process will be described with reference to the flowchart of FIG. The exception process is a process executed when abnormality detection information is output from the ECC device 132.

CPU11は、S110では、反転回路を無効に設定する。
CPU11は、続くS120では、診断状態フラグに基づいて、本ECC診断処理が実行中であるか否かを判断する。CPU11は、診断状態フラグがセットされている場合に本ECC診断処理による診断中であると判断して処理をS140へ移行させ、セットされていない場合に処理をS130へ移行させる。
In S110, the CPU 11 disables the inverting circuit.
In subsequent S120, the CPU 11 determines whether or not the ECC diagnosis processing is being executed based on the diagnosis state flag. If the diagnosis status flag is set, the CPU 11 determines that the diagnosis by the ECC diagnosis process is being performed, and shifts the process to S140. If not set, the process shifts the process to S130.

CPU11は、S130では、ECC装置132から異常検出情報が出力されており、且つ、診断状態フラグが診断終了を示すときに、テスト結果フラグをセットして処理をS180へ移行させる。テスト結果フラグは、RAM13の記録領域部131に異常が生じているか否かを示すフラグである。テスト結果フラグは、セットされている場合に異常が生じていることを示し、リセットされている場合に正常であることを示す。   In S130, when the abnormality detection information is output from the ECC device 132 and the diagnosis status flag indicates the end of diagnosis, the CPU 11 sets a test result flag and shifts the processing to S180. The test result flag is a flag indicating whether or not an abnormality has occurred in the recording area 131 of the RAM 13. The test result flag indicates that an abnormality has occurred when it is set, and indicates that it is normal when it has been reset.

なお、ECC診断処理においてS40にて実行される本例外処理では、診断状態フラグは診断中を示すようセットされているため、本ステップに移行することはない。ただし、本例外処理は、後述する通常診断処理等においても共通に利用されうる処理である。後述する通常診断処理等においては、ECC装置132から異常検出情報が出力されており、且つ、診断状態フラグが診断終了を示すときに、本ステップが実行される。   In this exception process executed in S40 in the ECC diagnosis process, since the diagnosis state flag is set to indicate that the diagnosis is being performed, the process does not proceed to this step. However, this exception process is a process that can be used in common in the normal diagnosis process and the like to be described later. In normal diagnosis processing, which will be described later, this step is executed when abnormality detection information is output from the ECC device 132 and the diagnosis state flag indicates the end of diagnosis.

CPU11は、S140では、診断データがECC装置132に入力された後に、診断アドレスと異常アドレスとが一致しているか否かを判断する。診断アドレスとは、診断データを生成する際にデータが取得された記録領域部131のアドレスを示す。本実施形態では、指定アドレスが診断アドレスに相当する。異常アドレスは異常アドレス通知部134に記録されている。   In S <b> 140, the CPU 11 determines whether or not the diagnostic address matches the abnormal address after the diagnostic data is input to the ECC device 132. The diagnostic address indicates the address of the recording area 131 from which data was acquired when generating diagnostic data. In the present embodiment, the designated address corresponds to the diagnostic address. The abnormal address is recorded in the abnormal address notification unit 134.

CPU11は、診断アドレスと異常アドレスとが一致していない場合に処理をS150へ移行させ、一致している場合に処理をS160へ移行させる。
CPU11は、診断データがECC装置132に入力されてECC装置132から異常検出情報が出力され、且つ、診断アドレスと異常アドレスとが一致していないと判断された場合に移行するS150では、ECC装置132が異常であると判断し、診断結果フラグを、異常を示すようセットする。CPU11は、診断結果フラグをセットした後に処理をS170へ移行させる。
The CPU 11 shifts the process to S150 when the diagnostic address and the abnormal address do not match, and shifts the process to S160 when they match.
The CPU 11 proceeds to S150 when the diagnosis data is input to the ECC device 132, abnormality detection information is output from the ECC device 132, and it is determined that the diagnosis address does not match the abnormality address. 132 is determined to be abnormal, and the diagnosis result flag is set to indicate abnormality. The CPU 11 shifts the processing to S170 after setting the diagnosis result flag.

CPU11は、診断データがECC装置132に入力されてECC装置132から異常検出情報が出力され、且つ、診断アドレスと異常アドレスとが一致していると判断された場合に移行するS160では、ECC装置132が正常であると判断し、診断結果フラグをリセットする。診断結果フラグは、リセットされた場合にECC装置132の診断結果が正常であることを示す。   In step S160, the CPU 11 shifts to the ECC device when diagnostic data is input to the ECC device 132, abnormality detection information is output from the ECC device 132, and it is determined that the diagnostic address matches the abnormal address. 132 is determined to be normal, and the diagnosis result flag is reset. The diagnosis result flag indicates that the diagnosis result of the ECC device 132 is normal when reset.

また、CPU11は、診断状態フラグをリセットする。CPU11は、診断結果フラグをリセットし、診断状態フラグをリセットした後に処理をS170へ移行させる。
CPU11は、S170では、テスト結果フラグをリセットし、処理をS180へ移行させる。
Further, the CPU 11 resets the diagnosis state flag. The CPU 11 resets the diagnosis result flag, and after the diagnosis state flag is reset, the process proceeds to S170.
In S170, the CPU 11 resets the test result flag and shifts the process to S180.

CPU11は、続くS180では、RAM13の記録領域部131が正常であるか否かを判断する。具体的には、CPU11は、テスト結果フラグがリセットされている場合に、RAM13の記録領域部131が正常であると判断する。CPU11は、RAM13の記録領域部131が正常である場合に本例外処理を終了し、異常である場合に処理をS190へ移行させる。   In subsequent S180, the CPU 11 determines whether or not the recording area 131 of the RAM 13 is normal. Specifically, the CPU 11 determines that the recording area 131 of the RAM 13 is normal when the test result flag is reset. The CPU 11 ends the exception process when the recording area 131 of the RAM 13 is normal, and shifts the process to S190 when it is abnormal.

CPU11は、S190では、フェールセーフ処理を実行する。フェールセーフ処理とは、RAM13の記録領域部131が異常であると判断された場合に実行されるよう予め設定された処理である。フェールセーフ処理には、例えば、ECU5による燃料噴射量の制御を中止させる処理や、定期的にマイコン10をリセットするためにマイコン10のリセットが行われたからの時間を計測するタイマを停止させる処理、といった処理が含まれうる。CPU11は、フェールセーフ処理を実行した後に、本例外処理を終了する。   In S190, the CPU 11 executes fail-safe processing. The fail safe process is a process set in advance to be executed when it is determined that the recording area 131 of the RAM 13 is abnormal. The fail-safe process includes, for example, a process for stopping the control of the fuel injection amount by the ECU 5 and a process for stopping a timer for measuring the time since the microcomputer 10 was reset in order to reset the microcomputer 10 periodically. Such processing may be included. After executing the fail safe process, the CPU 11 ends the exception process.

[通常診断処理]
なお、前述の例外処理は、ECC診断処理が実行されていないときに、RAM13の記録領域部131に異常が生じているか否かを判断する処理(以下、通常診断処理)にて用いられてもよい。次に、CPU11が実行する通常診断処理について図5のフローチャートを用いて説明する。通常診断処理は、マイコン10の電源が入力されている間、CPU11によって前述のECC診断処理が実行されていない場合に実行される処理であり、CPU11がRAM13の記録領域部131からデータを読み出す毎に実行される処理である。
[Normal diagnosis processing]
The exception processing described above may be used in processing (hereinafter referred to as normal diagnostic processing) for determining whether or not an abnormality has occurred in the recording area 131 of the RAM 13 when the ECC diagnostic processing is not executed. Good. Next, normal diagnosis processing executed by the CPU 11 will be described with reference to the flowchart of FIG. The normal diagnosis process is a process executed when the above-described ECC diagnosis process is not executed by the CPU 11 while the power source of the microcomputer 10 is being input. Each time the CPU 11 reads data from the recording area 131 of the RAM 13. It is a process to be executed.

なお、通常診断処理の開始時は、診断状態フラグは診断終了を示すようリセットされている。
CPU11は、S210では、RAM13の記録領域部131からデータを読み出す。
At the start of the normal diagnosis process, the diagnosis state flag is reset to indicate the end of diagnosis.
In S210, the CPU 11 reads data from the recording area 131 of the RAM 13.

CPU11は、S220では、ECC装置132から異常検出情報が出力されたか否かを判断する。CPU11は、ECC装置132から異常検出情報が出力されていない場合、本RAM診断処理を終了し、ECC装置132から異常検出情報が出力されていない場合に処理をS230へ移行させる。   In S <b> 220, the CPU 11 determines whether abnormality detection information has been output from the ECC device 132. When the abnormality detection information is not output from the ECC device 132, the CPU 11 ends the RAM diagnosis process, and when the abnormality detection information is not output from the ECC device 132, the CPU 11 shifts the processing to S230.

CPU11は、S230では、例外処理を実行し、例外処理を終了した後に本通常診断処理を終了する。
つまり、本通常診断処理では、ECC診断処理が実行されていないため診断状態フラグは診断終了を示すようリセットされており、S220で異常検出情報が検出された場合には、S230で実行する例外処理におけるS120にて否定判断されS130へ移行する。そして、CPU11は例外処理におけるS130にてテスト結果フラグを、異常を示すようセットし、本通常診断処理を終了する。
In S230, the CPU 11 executes the exception process, and ends the normal diagnosis process after the exception process is ended.
That is, in this normal diagnosis process, since the ECC diagnosis process is not executed, the diagnosis state flag is reset to indicate the end of diagnosis, and when abnormality detection information is detected in S220, the exception process executed in S230. In S120, a negative determination is made and the process proceeds to S130. Then, the CPU 11 sets the test result flag to indicate an abnormality in S130 in the exception process, and ends the normal diagnosis process.

CPU11は、このように通常診断処理を実行することにより、RAM13の記録領域部131に異常が生じているか否かを判断してもよい。なお、CPU11は、本通常診断処理のテスト結果フラグに基づいて、各種制御を行う処理を実行するよう構成されてもよい。   The CPU 11 may determine whether or not an abnormality has occurred in the recording area 131 of the RAM 13 by executing the normal diagnosis process in this way. The CPU 11 may be configured to execute processing for performing various controls based on the test result flag of the normal diagnostic processing.

[1−3.効果]
以上詳述した第1実施形態によれば、以下の効果を奏する。
(1a)反転装置133は、RAM13の記録領域部131からデータを取得し、該データにおける2以上のビットを反転させたデータを表す診断データを生成する。CPU11は、S20では、RAM13の記録領域部131からデータを読み出す際に記録領域部131に書き込まれたときのデータを示す書き込みデータと記録領域部131から読み出すときのデータを示す読み出しデータとの間に2ビット以上の誤りがある場合に読み出しデータに異常がある旨を表す異常検出情報を出力するECC装置132に、診断データを読み出しデータとして入力する。
[1-3. effect]
According to the first embodiment described in detail above, the following effects are obtained.
(1a) The inverting device 133 acquires data from the recording area 131 of the RAM 13, and generates diagnostic data representing data obtained by inverting two or more bits in the data. In S <b> 20, when reading data from the recording area 131 of the RAM 13, the CPU 11 reads data between the write data indicating the data written in the recording area 131 and the read data indicating the data read from the recording area 131. When there is an error of 2 bits or more, diagnostic data is input as read data to the ECC device 132 that outputs abnormality detection information indicating that the read data is abnormal.

CPU11は、S260では、診断データがECC装置132に入力され、ECC装置132から異常検出情報が出力された場合に、ECC装置132が正常であると判断する。   In S <b> 260, the CPU 11 determines that the ECC device 132 is normal when diagnostic data is input to the ECC device 132 and abnormality detection information is output from the ECC device 132.

これによれば、RAM13の記録領域部131から読み出したデータに意図的に誤りを生じさせた診断データをECC装置132に入力してECC装置132が誤りを検出した場合に該ECC装置132が正常であると判断する構成を備える。このため、従来技術のように意図的に誤りを生じさせたデータをRAM13の記録領域部131に予め記録させておく必要が無くなり、RAM13の記録領域部131を有効に利用し、且つECC装置132が正常であるか否かを判断することができる。   According to this, when the ECC device 132 detects an error when diagnostic data that intentionally causes an error in the data read from the recording area 131 of the RAM 13 is input to the ECC device 132, the ECC device 132 is normal. The structure which judges that it is. For this reason, it is not necessary to preliminarily record the data in which the error is intentionally generated as in the prior art in the recording area 131 of the RAM 13, the recording area 131 of the RAM 13 is effectively used, and the ECC device 132 is used. It can be determined whether or not is normal.

(1b)ECU5では、CPU11は、S35において、診断データがECC装置132に入力され、ECC装置132から異常検出情報が出力されなかった場合に、ECC装置132が異常であると判断してもよい。   (1b) In the ECU 5, the CPU 11 may determine that the ECC device 132 is abnormal when diagnostic data is input to the ECC device 132 and abnormality detection information is not output from the ECC device 132 in S35. .

これによれば、ECC装置132の異常を検出することができる。
(1c)ECU5では、CPU11は、S35において、ECC装置132が異常であると判断された場合に、ECC装置132が異常であることを警告灯8により報知させてもよい。
According to this, an abnormality of the ECC device 132 can be detected.
(1c) In the ECU 5, the CPU 11 may notify the warning lamp 8 that the ECC device 132 is abnormal when it is determined in S35 that the ECC device 132 is abnormal.

これによれば、ECC装置132が異常であることを、運転者を含む車両の乗員等に知らせることができる。
(1d)ECC装置132は、書き込みデータと読み出しデータとの間に2ビット以上の誤りがある場合に、記録領域部131における読み出しデータを読み出したアドレスを異常アドレスとして出力してもよい。
According to this, it is possible to notify the passengers of the vehicle including the driver that the ECC device 132 is abnormal.
(1d) When there is an error of 2 bits or more between the write data and the read data, the ECC device 132 may output the address from which the read data is read in the recording area 131 as an abnormal address.

ECU5において、CPU11は、S140では、診断データがECC装置132に入力された後に、診断データを生成する際にデータが取得されたメモリのアドレスを示す診断アドレスと異常アドレスとが一致しているか否かを判断してもよい。   In the ECU 5, in S140, after the diagnostic data is input to the ECC device 132, the CPU 11 determines whether or not the diagnostic address indicating the address of the memory from which the data is acquired when the diagnostic data is generated matches the abnormal address. It may be judged.

CPU11は、S160では、診断データがECC装置132に入力されてECC装置132から異常検出情報が出力され、且つ、診断アドレスと異常アドレスとが一致している場合に、ECC装置132が正常であると判断してもよい。   In S160, when the diagnostic data is input to the ECC device 132, the abnormality detection information is output from the ECC device 132, and the diagnostic address matches the abnormal address, the CPU 11 is normal. You may judge.

これによれば、診断アドレスと異常アドレスとが一致する場合にECC装置132が正常であると判断する構成を備えるので、ECC装置132における異常アドレスを出力する機能が正常であることを確認した上でECC装置132が正常であると判断することができる。   According to this configuration, since the ECC device 132 is determined to be normal when the diagnostic address matches the abnormal address, it is confirmed that the function of outputting the abnormal address in the ECC device 132 is normal. Thus, it can be determined that the ECC device 132 is normal.

(1e)CPU11は、S10では、反転装置133がデータを記録領域部131から取得する前に、反転装置133が記録領域部131から取得しようとするデータの全てのビットを0に書き換えてもよい。   (1e) In S10, the CPU 11 may rewrite all the bits of the data that the inversion device 133 intends to acquire from the recording area unit 131 to 0 before the inversion device 133 acquires the data from the recording area unit 131. .

これによれば、記録領域部131に記録されているデータを初期化してから該記録領域部131のデータを用いて診断データを生成するので、診断データを生成する対象となる記録領域部131が揮発していることにより判断結果を誤ることを抑制することができる。   According to this, since the data recorded in the recording area part 131 is initialized and then the diagnostic data is generated using the data in the recording area part 131, the recording area part 131 that is the target for generating the diagnostic data is It is possible to suppress erroneous determination results due to volatilization.

[2.第2実施形態]
[2−1.構成]
第2実施形態は、基本的な構成は第1実施形態と同様であるため、相違点について以下に説明する。なお、第1実施形態と同じ符号は、同一の構成を示すものであって、先行する説明を参照する。
[2. Second Embodiment]
[2-1. Constitution]
Since the basic configuration of the second embodiment is the same as that of the first embodiment, differences will be described below. Note that the same reference numerals as those in the first embodiment indicate the same configuration, and the preceding description is referred to.

第2実施形態では、マイコン20が備えるRAM23において、RAM13の記録領域部131が2つの領域に区切られている点で、第1実施形態と相違する。
具体的には、図6に示すように、RAM23では、RAM13における記録領域部131が、予め定められた大きさの領域を示す第1記録領域部131aと、第1領域を除く領域を示す第2記録領域部131bとに分けられている。
The second embodiment is different from the first embodiment in that the recording area 131 of the RAM 13 is divided into two areas in the RAM 23 provided in the microcomputer 20.
Specifically, as shown in FIG. 6, in the RAM 23, the recording area 131 in the RAM 13 includes a first recording area 131 a indicating an area having a predetermined size and an area excluding the first area. It is divided into two recording area portions 131b.

マイコン20は、ECC装置132と反転装置133と同様に構成された第1ECC装置132a、第2ECC装置132bと、第1反転装置133a、第1反転装置133aとを、第1記録領域部131a及び第2記録領域部131bのそれぞれに対応して備えている。第1ECC装置132a、及び第1反転装置133aが第1記録領域部131aに対応する装置であり、第2ECC装置132b、及び第2反転装置133bが第2記録領域部131bに対応する装置である。   The microcomputer 20 includes a first ECC device 132a, a second ECC device 132b, a first reversing device 133a, and a first reversing device 133a configured in the same manner as the ECC device 132 and the reversing device 133. 2 corresponding to each of the two recording area portions 131b. The first ECC device 132a and the first reversing device 133a are devices corresponding to the first recording area 131a, and the second ECC device 132b and the second reversing device 133b are devices corresponding to the second recording area 131b.

また、反転装置133aは第1ECC装置132aに診断データを読み出しデータとして入力可能に構成されている。また、反転装置133bは、第2ECC装置132bに診断データを読み出しデータとして入力可能に構成されている。   The reversing device 133a is configured to be able to input diagnostic data as read data to the first ECC device 132a. The reversing device 133b is configured to be able to input diagnostic data as read data to the second ECC device 132b.

本実施形態では特に、CPU11は、第1ECC装置132a及び第2ECC装置132bのうちの予め定められた一方のECC装置132(以下、指定ECC装置)に診断データを入力可能に、他方のECC装置132に診断データを入力しないように構成されている。   Particularly in the present embodiment, the CPU 11 can input diagnostic data to one of the predetermined ECC devices 132 (hereinafter referred to as a designated ECC device) of the first ECC device 132a and the second ECC device 132b, and the other ECC device 132. Is configured not to input diagnostic data.

具体的には、CPU11は、例えば、第1ECC装置132aを指定ECC装置として設定する場合、第2ECC装置132bにおける反転装置133bに対してはイネーブル信号を出力させないように異常注入モジュール14に対して指示を出力するよう構成されうる。   Specifically, for example, when the first ECC device 132a is set as the designated ECC device, the CPU 11 instructs the abnormal injection module 14 not to output the enable signal to the inverting device 133b in the second ECC device 132b. May be configured to output.

また、CPU11は、第2ECC装置132bを指定ECC装置として設定する場合、第1ECC装置132aにおける反転装置133aに対してはイネーブル信号を出力させないように異常注入モジュール14に対して指示を出力するよう構成されうる。   In addition, when the second ECC device 132b is set as the designated ECC device, the CPU 11 is configured to output an instruction to the abnormal injection module 14 so as not to output an enable signal to the inverting device 133a in the first ECC device 132a. Can be done.

CPU11は、図3に示すECC診断処理においては、指定ECC装置におけるアドレスを「指定アドレス」として、処理を実行するよう構成されうる。つまり、本実施形態では、ECC診断処理を表すプログラムにて、指定ECC装置における記録領域部のアドレスが「指定アドレス」として予め指定されていてもよい。   In the ECC diagnosis process shown in FIG. 3, the CPU 11 can be configured to execute the process with the address in the designated ECC device as the “designated address”. That is, in the present embodiment, the address of the recording area in the designated ECC device may be designated in advance as a “designated address” in the program representing the ECC diagnosis process.

これにより、CPU11が、例えば第1ECC装置132aを指定ECC装置として設定する場合は、第1記録領域部131a、第1ECC装置132a、第1反転装置133aが上記実施形態における記録領域部131、ECC装置132、反転装置133と同様に作動する。つまり、第1記録領域部131aに対応する第1ECC装置132aについて異常であるか否かが診断される。   Thereby, for example, when the CPU 11 sets the first ECC device 132a as the designated ECC device, the first recording area portion 131a, the first ECC device 132a, and the first reversing device 133a are the recording area portion 131 and the ECC device in the above embodiment. 132, operates in the same manner as the reversing device 133. That is, it is diagnosed whether or not the first ECC device 132a corresponding to the first recording area 131a is abnormal.

また、第2記録領域部131bは診断データが読み出しデータとして入力されないよう構成されるので、CPU11の演算結果等を示すデータを一時的に記録するために、例えばスタック領域としても、第2記録領域部131bを利用することができる。   Further, since the second recording area 131b is configured so that diagnostic data is not input as read data, the second recording area may be used as a stack area in order to temporarily record data indicating the calculation result of the CPU 11, for example. The unit 131b can be used.

同様に、CPU11が、例えば第2ECC装置132bを指定ECC装置として設定する場合は、第2記録領域部131bに対応する第2ECC装置132bについて異常であるか否かが診断される。   Similarly, when the CPU 11 sets the second ECC device 132b as the designated ECC device, for example, it is diagnosed whether the second ECC device 132b corresponding to the second recording area 131b is abnormal.

また、第1記録領域部131aは診断データが読み出しデータとして入力されないよう構成されるので、CPU11の演算結果等を示すデータを一時的に記録するために、例えばスタック領域としても、第1記録領域部131aを利用することができる。   In addition, since the first recording area 131a is configured so that diagnostic data is not input as read data, the first recording area may be used as a stack area in order to temporarily record data indicating the calculation result of the CPU 11, for example. The unit 131a can be used.

[2−2.効果]
以上詳述した第2実施形態によれば、前述した第1実施形態の効果(1a)−(1e)を奏し、さらに、以下の効果を奏する。
[2-2. effect]
According to the second embodiment described in detail above, the effects (1a) to (1e) of the first embodiment described above are achieved, and the following effects are further achieved.

(2a)RAM13における記録領域部131は、予め定められた大きさの領域を示す第1記録領域部131aと、第1領域を除く領域を示す第2記録領域部131bとに分けられていてもよい。   (2a) The recording area 131 in the RAM 13 may be divided into a first recording area 131a indicating an area having a predetermined size and a second recording area 131b indicating an area excluding the first area. Good.

ECU5は、ECC装置132と反転装置133とを第1記録領域部131a及び第2記録領域部131bのそれぞれに対応して備えていてもよい。反転装置133は、第1記録領域部131aに対応するECC装置132を示す第1ECC装置132a及び第2記録領域部131bに対応するECC装置132を示す第2ECC装置132bに診断データを読み出しデータとして入力可能に構成されている。CPU11は、第1ECC装置132a及び第2ECC装置132bのうちの予め定められた一方のECC装置132に診断データを入力し、他方のECC装置132に診断データを入力しないように構成されている。   The ECU 5 may include an ECC device 132 and a reversing device 133 corresponding to each of the first recording area 131a and the second recording area 131b. The reversing device 133 inputs diagnostic data as read data to the first ECC device 132a indicating the ECC device 132 corresponding to the first recording area 131a and the second ECC device 132b indicating the ECC device 132 corresponding to the second recording area 131b. It is configured to be possible. The CPU 11 is configured to input diagnostic data to one predetermined ECC device 132 out of the first ECC device 132 a and the second ECC device 132 b and not to input diagnostic data to the other ECC device 132.

このため、例えばCPU11は、汎用レジスタの値を、第1記録領域部131a及び第2記録領域部131bのうちのいずれかの領域であって、第1ECC装置132a及び第2ECC装置132bのうち指定ECC装置でないECC装置132に対応する領域、に退避させることが可能となる。   For this reason, for example, the CPU 11 sets the value of the general-purpose register in one of the first recording area 131a and the second recording area 131b, and the designated ECC of the first ECC device 132a and the second ECC device 132b. It is possible to retreat to an area corresponding to the ECC device 132 that is not a device.

ここで、RAM13が第1記録領域部131aのみを有し、反転装置133が第1記録領域部131aに対応する第1ECC装置132aに診断データを読み出しデータとして入力すると仮定する。そして、例えば図7におけるS510及び図8におけるS520に示すように、前述のECC診断処理におけるS40にて実行される例外処理の前においてCPU11の汎用レジスタの値をスタック領域に退避させる例外前処理を行い、且つ、例外処理の後にスタック領域に退避させた値を汎用レジスタの値として復帰させる例外後処理を行うものとする。   Here, it is assumed that the RAM 13 has only the first recording area 131a, and the reversing device 133 inputs diagnostic data as read data to the first ECC device 132a corresponding to the first recording area 131a. For example, as shown in S510 in FIG. 7 and S520 in FIG. 8, exception preprocessing for saving the value of the general-purpose register of the CPU 11 to the stack area before the exception processing executed in S40 in the ECC diagnosis processing described above. And post-exception processing for returning the value saved in the stack area after exception processing as the value of the general-purpose register.

この場合、第1反転装置133aが有効に設定されていると、第1記録領域部131aのスタック領域に退避時に書き込まれた値を読み出すときに反転装置133によって誤りを生じさせた値がECC装置132に入力されてしまうという問題が生じうる。   In this case, if the first reversing device 133a is set to be valid, the value that causes an error by the reversing device 133 when reading the value written at the time of saving to the stack area of the first recording area 131a is the ECC device. The problem of being input to 132 may occur.

本実施形態では、前述のように、CPU11は、第1ECC装置132a及び第2ECC装置132bのうちの予め定められた一方のECC装置132に診断データを入力し、他方のECC装置132に診断データを入力しないように構成されている。これによれば、RAM13における第1記録領域部131a及び第2記録領域部131bのうち、一方の領域については、対応するECC装置132の診断を行うことができる。且つ、他方の領域については、汎用レジスタの値等を記録させることが可能な通常の記録領域として利用することができる。   In the present embodiment, as described above, the CPU 11 inputs diagnostic data to one of the predetermined ECC devices 132 of the first ECC device 132a and the second ECC device 132b, and sends the diagnostic data to the other ECC device 132. It is configured not to input. According to this, the diagnosis of the corresponding ECC device 132 can be performed for one of the first recording area 131 a and the second recording area 131 b in the RAM 13. The other area can be used as a normal recording area in which the value of the general-purpose register can be recorded.

[3.他の実施形態]
以上、本開示の実施形態について説明したが、本開示は上述の実施形態に限定されることなく、種々変形して実施することができる。
[3. Other Embodiments]
As mentioned above, although embodiment of this indication was described, this indication is not limited to the above-mentioned embodiment, and can carry out various modifications.

(3a)上記実施形態では、CPU11は、S10にて、RAM13における記録領域部131の指定アドレスを初期化した後に、該指定アドレスのデータを用いて診断データを生成していたが、これに限定されるものではない。   (3a) In the above embodiment, the CPU 11 generates diagnostic data using the data of the designated address after initializing the designated address of the recording area 131 in the RAM 13 in S10. However, the present invention is not limited to this. Is not to be done.

例えば、指定アドレスのデータを初期化する前に、該指定アドレスのデータを読み出し、一時的に保持してから、該指定アドレスの初期化を実行してもよい。このような場合にCPU11が実行するECC判断処理を図9に示すフローチャートを用いて説明する。図9に示すフローチャートは、図3に示すフローチャートに、指定アドレスのデータの退避と、指定アドレスのデータの書き戻しを追加したものである。なお、以下の説明では、図3における処理と同様の処理については、説明を一部簡略化している。   For example, before initializing the data of the designated address, the data of the designated address may be read and temporarily held, and then the designated address may be initialized. The ECC determination process executed by the CPU 11 in such a case will be described with reference to the flowchart shown in FIG. The flowchart shown in FIG. 9 is the same as the flowchart shown in FIG. 3 except that saving of data at a specified address and writing back of data at a specified address are added. In the following description, a part of the description of the same process as the process in FIG. 3 is simplified.

CPU11は、S310では、S10と同様に、診断状態フラグ及び診断結果フラグを設定する。
CPU11は、続くS315では、図3に示すS10に代えて、指定アドレスのデータを読み出し、コア内の汎用レジスタ、または、RAM13内のスタックに一時的に記録する。このとき、指定アドレスのデータに異常が生じていると、ECC装置132が正常である場合には異常検出情報が出力される。
In S310, the CPU 11 sets a diagnosis state flag and a diagnosis result flag in the same manner as in S10.
In the subsequent S315, instead of S10 shown in FIG. 3, the CPU 11 reads the data at the designated address and temporarily records it in a general-purpose register in the core or a stack in the RAM 13. At this time, if an abnormality has occurred in the data at the designated address, the abnormality detection information is output when the ECC device 132 is normal.

CPU11は、続くS320では、異常検出情報が出力されたか否かを判断する。CPU11は、異常検出情報が出力された場合に処理をS325へ移行させ、異常検出情報が出力されていない場合に処理をS330へ移行させる。   In the subsequent S320, the CPU 11 determines whether or not abnormality detection information has been output. The CPU 11 shifts the process to S325 when the abnormality detection information is output, and shifts the process to S330 when the abnormality detection information is not output.

S325では、CPU11は例外処理を実行する。本実施形態では、例外処理では、S140にて異常アドレスと診断アドレスが一致しているかに基づいて、ECC装置132が正常であるか否かが判断される。つまり、S320にて異常検出情報が出力された要因が、ECC装置132が異常であることによるものであるか、記録領域部131におけるデータの揮発等による異常であるかを、例外処理のS140にて判断する。   In S325, the CPU 11 executes exception processing. In the present embodiment, in the exception processing, it is determined whether the ECC device 132 is normal based on whether the abnormal address matches the diagnostic address in S140. That is, whether the cause of the abnormality detection information output in S320 is due to abnormality in the ECC device 132 or abnormality due to data volatilization in the recording area 131 or the like is determined in S140 of exception processing. Judgment.

CPU11は、例外処理のS140では、異常アドレスと診断アドレスとが一致していない場合は、S320にて異常検出情報が出力された要因がECC装置132の異常によるものであると判断し、S150にて診断結果フラグを、異常を示すようセットする。   In S140 of the exception process, if the abnormal address and the diagnostic address do not match, the CPU 11 determines that the cause of the abnormality detection information output in S320 is due to the abnormality of the ECC device 132, and the process proceeds to S150. Set the diagnosis result flag to indicate an abnormality.

また、CPU11は、例外処理のS140では、異常アドレスと診断アドレスとが一致している場合は、S320にて異常検出情報が出力された要因がECC装置132の異常によるものではないと判断し、S160にて診断結果フラグを、正常を示すようリセットする。   In S140 of the exception processing, the CPU 11 determines that the cause of the abnormality detection information output in S320 is not due to the abnormality of the ECC device 132 when the abnormality address matches the diagnosis address. In S160, the diagnosis result flag is reset to indicate normality.

CPU11は、続くS330では、診断結果フラグが、ECC装置132が正常であることを示しているか否かを判断する。CPU11は、診断結果フラグが、ECC装置132が正常であることを示している場合に、処理をS390へ移行させる。また、CPU11は、診断結果フラグが、ECC装置132が異常であることを示している場合に、処理をS340へ移行させる。   In subsequent S330, the CPU 11 determines whether or not the diagnosis result flag indicates that the ECC device 132 is normal. When the diagnosis result flag indicates that the ECC device 132 is normal, the CPU 11 shifts the process to S390. Further, when the diagnosis result flag indicates that the ECC device 132 is abnormal, the CPU 11 shifts the process to S340.

CPU11は、続くS340−S380では、図3に示すS5−45と同様の処理を実行する。ただし、S340−S380では、図3におけるS15に相当する処理が削除され、図3におけるS45を実行する前に指定アドレスのデータを書き戻す処理であるS375が追加されている。   In subsequent S340 to S380, the CPU 11 executes the same processing as S5-45 shown in FIG. However, in S340-S380, the process corresponding to S15 in FIG. 3 is deleted, and S375, which is a process of writing back data at the designated address before executing S45 in FIG. 3, is added.

CPU11は、S390では、診断状態フラグを、診断終了を示すようリセットし、本診断処理を終了する。
マイコン10は、上記実施形態では揮発性のRAMを備えていたが、これに限定されるものではなく、不揮発性のRAMも備えるよう構成されうる。このとき、揮発性のRAMは、不揮発性のRAMのデータを保持するバックアップRAMとして利用されることが有りうる。このような場合、バックアップRAMとして利用される揮発性のRAMは、定期的に初期化されうる。
In S390, the CPU 11 resets the diagnosis state flag to indicate the end of diagnosis, and ends this diagnosis process.
Although the microcomputer 10 includes the volatile RAM in the above embodiment, the microcomputer 10 is not limited to this and may be configured to include a nonvolatile RAM. At this time, the volatile RAM may be used as a backup RAM that holds data of the nonvolatile RAM. In such a case, a volatile RAM used as a backup RAM can be periodically initialized.

仮に、上記実施形態のRAM13が前述のようなバックアップRAMとして利用される場合、ECC診断処理を実行するために指定アドレスのデータが初期化されることは好ましいことではない。   If the RAM 13 of the above embodiment is used as the backup RAM as described above, it is not preferable that the data of the designated address is initialized in order to execute the ECC diagnosis process.

本変形例によれば、このように指定アドレスのデータが初期化されることは好ましくない場合には、指定アドレスのデータを一時的に退避させた上でECC診断処理を実行することができる。   According to this modification, when it is not preferable that the data at the designated address is initialized in this way, the ECC diagnosis process can be executed after temporarily saving the data at the designated address.

(3b)上記通常診断処理において、S210にてRAM13の記録領域部131からデータを読み出した際、S230にて実行する例外処理において、該データを読み出したアドレス(以下、読み出しアドレス)に対応する記録領域部131に異常が生じていると判断された場合は、CPU11は次のように処理を実行してもよい。つまり、CPU11は、S130にてテスト結果フラグが異常を示すようセットされた場合は、これ以降に通常診断処理を実行する際は、該異常が生じていると判断された読み出しアドレス以外のアドレスに対してS210にてデータを読み出すよう構成されてもよい。これによれば、異常が生じていると判断された読み出しアドレスについて例外処理が繰り返されることが抑制さえる。   (3b) In the normal diagnosis process, when data is read from the recording area 131 of the RAM 13 in S210, a record corresponding to an address (hereinafter referred to as a read address) from which the data is read in the exception process executed in S230. When it is determined that an abnormality has occurred in the area 131, the CPU 11 may execute the process as follows. In other words, when the test result flag is set to indicate an abnormality in S130, the CPU 11 sets an address other than the read address at which it is determined that the abnormality has occurred when performing normal diagnosis processing thereafter. On the other hand, the data may be read out in S210. According to this, it is possible to suppress the exception processing from being repeated for the read address determined to be abnormal.

(3c)上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。なお、特許請求の範囲に記載した文言から特定される技術思想に含まれるあらゆる態様が本開示の実施形態である。   (3c) A plurality of functions of one constituent element in the above embodiment may be realized by a plurality of constituent elements, or a single function of one constituent element may be realized by a plurality of constituent elements. . Further, a plurality of functions possessed by a plurality of constituent elements may be realized by one constituent element, or one function realized by a plurality of constituent elements may be realized by one constituent element. Moreover, you may abbreviate | omit a part of structure of the said embodiment. In addition, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of the other embodiment. In addition, all the aspects included in the technical idea specified from the wording described in the claims are embodiments of the present disclosure.

(3d)上述したECU5、マイコン10、マイコン20、CPU11、CPU11を機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実態的記録媒体、制御方法など、種々の形態で本開示を実現することもできる。   (3d) The present disclosure is disclosed in various forms such as the ECU 5, the microcomputer 10, the microcomputer 20, the CPU 11, the program for causing the CPU 11 to function, the non-transitory actual recording medium such as a semiconductor memory in which the program is recorded, and the control method. Can also be realized.

[4.実施形態と特許請求の範囲との対応]
記録領域部131、第1記録領域部131a、第2記録領域部131bがメモリに相当し、ECC装置132、第1ECC装置132a、第2ECC装置132bが異常検出回路に相当し、反転装置133、第1反転装置133a、第2反転装置133bがデータ生成部に相当する。また、警告灯8が報知装置に相当し、第1記録領域部131aが第1領域に相当し、第2記録領域部131bが第2領域に相当する。
[4. Correspondence between Embodiment and Claims]
The recording area 131, the first recording area 131a, and the second recording area 131b correspond to a memory, the ECC device 132, the first ECC device 132a, and the second ECC device 132b correspond to an abnormality detection circuit, and the reversing device 133, the first The first inversion device 133a and the second inversion device 133b correspond to the data generation unit. The warning lamp 8 corresponds to a notification device, the first recording area 131a corresponds to a first area, and the second recording area 131b corresponds to a second area.

また、CPU11が、データ入力部、正常判断部、異常判断部、報知指示部、一致判断部、初期化部に相当する。また、S20がデータ入力部としての処理に相当し、S260が正常判断部としての処理に相当し、S260が正常判断部としての処理に相当し、S35が異常判断部としての処理に相当し、S35が報知指示部としての処理に相当し、S240が一致判断部としての処理に相当し、S10が初期化部としての処理に相当する。   The CPU 11 corresponds to a data input unit, a normality determination unit, an abnormality determination unit, a notification instruction unit, a coincidence determination unit, and an initialization unit. Further, S20 corresponds to the processing as the data input unit, S260 corresponds to the processing as the normality determination unit, S260 corresponds to the processing as the normality determination unit, and S35 corresponds to the processing as the abnormality determination unit, S35 corresponds to processing as a notification instruction unit, S240 corresponds to processing as a coincidence determination unit, and S10 corresponds to processing as an initialization unit.

5 ECU、11 CPU、131 記録領域部、132 ECC装置、133 反転装置。   5 ECU, 11 CPU, 131 recording area, 132 ECC device, 133 reversing device.

Claims (6)

メモリ(131)からデータを取得し、該データにおける2以上のビットを反転させたデータを表す診断データを生成するように構成されたデータ生成部(133)と
前記メモリからデータを読み出す際に前記メモリに書き込まれたときのデータを示す書き込みデータと前記メモリから読み出すときのデータを示す読み出しデータとの間に2ビット以上の誤りがある場合に前記読み出しデータに異常がある旨を表す異常検出情報を出力する異常検出回路(132)に、前記診断データを前記読み出しデータとして入力するように構成されたデータ入力部(11、S20)と、
前記診断データが前記異常検出回路に入力され、前記異常検出回路から前記異常検出情報が出力された場合に、前記異常検出回路が正常であると判断するように構成された正常判断部(11、S260)と、
を備える電子制御装置(5)。
A data generation unit (133) configured to acquire data from the memory (131) and generate diagnostic data representing data obtained by inverting two or more bits in the data; and when reading the data from the memory Abnormality detection information indicating that there is an abnormality in the read data when there is an error of 2 bits or more between the write data indicating the data written to the memory and the read data indicating the data read from the memory A data input unit (11, S20) configured to input the diagnostic data as the read data to the abnormality detection circuit (132) that outputs
When the diagnostic data is input to the abnormality detection circuit and the abnormality detection information is output from the abnormality detection circuit, a normality determination unit (11, 11) configured to determine that the abnormality detection circuit is normal S260)
An electronic control device (5) comprising:
請求項1に記載の電子制御装置であって、
前記診断データが前記異常検出回路に入力され、前記異常検出回路から前記異常検出情報が出力されなかった場合に、前記異常検出回路が異常であると判断するように構成された異常判断部(11、S35)と
を更に備える電子制御装置。
The electronic control device according to claim 1,
An abnormality determination unit (11) configured to determine that the abnormality detection circuit is abnormal when the diagnostic data is input to the abnormality detection circuit and the abnormality detection information is not output from the abnormality detection circuit. , S35) and an electronic control device.
請求項1または請求項2に記載の電子制御装置であって、
前記異常検出回路が異常であると判断された場合に、前記異常検出回路が異常であることを報知装置(8)に報知させるように構成された報知指示部(11、S35)
を更に備える電子制御装置。
The electronic control device according to claim 1 or 2,
A notification instructing unit (11, S35) configured to notify the notification device (8) that the abnormality detection circuit is abnormal when it is determined that the abnormality detection circuit is abnormal.
An electronic control device further comprising:
請求項1から請求項3のいずれか一項に記載の電子制御装置であって、
前記異常検出回路は、前記書き込みデータと前記読み出しデータとの間に2ビット以上の誤りがある場合に、前記メモリにおける前記読み出しデータを読み出したアドレスを異常アドレスとして出力するように構成されており、
前記データ入力部により前記診断データが前記異常検出回路に入力された後に、前記診断データを生成する際にデータが取得されたメモリのアドレスを示す診断アドレスと前記異常アドレスとが一致しているか否かを判断するように構成された一致判断部(11、S240)を更に備え、
前記正常判断部は、前記診断データが前記異常検出回路に入力されて前記異常検出回路から前記異常検出情報が出力され、且つ、前記一致判断部により前記診断アドレスと前記異常アドレスとが一致していると判断された場合に、前記異常検出回路が正常であると判断するように構成された
電子制御装置。
The electronic control device according to any one of claims 1 to 3,
The abnormality detection circuit is configured to output an address from which the read data is read in the memory as an abnormal address when there is an error of 2 bits or more between the write data and the read data.
After the diagnostic data is input to the abnormality detection circuit by the data input unit, whether or not the diagnostic address indicating the address of the memory from which the data was acquired when the diagnostic data is generated matches the abnormal address A match determination unit (11, S240) configured to determine whether or not
The normality determination unit inputs the diagnostic data to the abnormality detection circuit, outputs the abnormality detection information from the abnormality detection circuit, and matches the diagnosis address and the abnormal address by the coincidence determination unit. An electronic control unit configured to determine that the abnormality detection circuit is normal when it is determined that the abnormality detection circuit is normal.
請求項1から請求項4のいずれか一項に記載の電子制御装置であって、
前記データ生成部がデータを前記メモリから取得する前に、前記データ生成部が前記メモリから取得しようとするデータの全てのビットを0に書き換えるように構成された初期化部(11、S10)
を更に備える電子制御装置。
The electronic control device according to any one of claims 1 to 4,
An initialization unit (11, S10) configured to rewrite all bits of data to be acquired by the data generation unit to 0 before the data generation unit acquires the data from the memory.
An electronic control device further comprising:
請求項1から請求項5のいずれか一項に記載の電子制御装置であって、
前記メモリは、予め定められた大きさの領域を示す第1領域と、第1領域を除く領域を示す第2領域とに分けられており、
当該電子制御装置は、前記異常検出回路と前記データ生成部とを前記第1領域及び前記第2領域のそれぞれに対応して備えており、
前記データ入力部は、前記第1領域に対応する異常検出回路を示す第1異常検出回路及び前記第2領域に対応する異常検出回路を示す第2異常検出回路に前記診断データを前記読み出しデータとして入力可能に構成されており、前記第1異常検出回路及び前記第2異常検出回路のうちの予め定められた一方の異常検出回路に前記診断データを入力し、他方の異常検出回路に前記診断データを入力しないように構成された
電子制御装置。
An electronic control device according to any one of claims 1 to 5,
The memory is divided into a first area indicating an area of a predetermined size and a second area indicating an area excluding the first area;
The electronic control device includes the abnormality detection circuit and the data generation unit corresponding to each of the first region and the second region,
The data input unit outputs the diagnostic data as read data to a first abnormality detection circuit indicating an abnormality detection circuit corresponding to the first region and a second abnormality detection circuit indicating an abnormality detection circuit corresponding to the second region. The diagnosis data is configured to be input, and the diagnosis data is input to one predetermined abnormality detection circuit of the first abnormality detection circuit and the second abnormality detection circuit, and the diagnosis data is input to the other abnormality detection circuit. Electronic control device configured not to input
JP2016176821A 2016-09-09 2016-09-09 Electronic control unit Active JP6658417B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016176821A JP6658417B2 (en) 2016-09-09 2016-09-09 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016176821A JP6658417B2 (en) 2016-09-09 2016-09-09 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2018041402A true JP2018041402A (en) 2018-03-15
JP6658417B2 JP6658417B2 (en) 2020-03-04

Family

ID=61626366

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016176821A Active JP6658417B2 (en) 2016-09-09 2016-09-09 Electronic control unit

Country Status (1)

Country Link
JP (1) JP6658417B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262302A (en) * 2019-04-11 2019-09-20 汉腾汽车有限公司 A kind of detection method of electric machine controller MCU
JP2019212124A (en) * 2018-06-06 2019-12-12 株式会社デンソー Electronic control device
JP2020166376A (en) * 2019-03-28 2020-10-08 ラピスセミコンダクタ株式会社 Semiconductor device and test method of the same
JP2021033700A (en) * 2019-08-26 2021-03-01 株式会社デンソー Electronic controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03252828A (en) * 1990-03-02 1991-11-12 Fujitsu Ltd System for verifying fault information
JPH04251339A (en) * 1990-04-18 1992-09-07 Internatl Business Mach Corp <Ibm> Dynamic method for generating biased pseudo- random test pattern for verifying function of hardware
JPH0652008A (en) * 1992-08-03 1994-02-25 Nec Corp Edc lsi checking device
JP2005078431A (en) * 2003-09-01 2005-03-24 Toshiba Corp Semiconductor device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03252828A (en) * 1990-03-02 1991-11-12 Fujitsu Ltd System for verifying fault information
JPH04251339A (en) * 1990-04-18 1992-09-07 Internatl Business Mach Corp <Ibm> Dynamic method for generating biased pseudo- random test pattern for verifying function of hardware
JPH0652008A (en) * 1992-08-03 1994-02-25 Nec Corp Edc lsi checking device
JP2005078431A (en) * 2003-09-01 2005-03-24 Toshiba Corp Semiconductor device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019212124A (en) * 2018-06-06 2019-12-12 株式会社デンソー Electronic control device
JP7091853B2 (en) 2018-06-06 2022-06-28 株式会社デンソー Electronic control device
JP2020166376A (en) * 2019-03-28 2020-10-08 ラピスセミコンダクタ株式会社 Semiconductor device and test method of the same
JP7382151B2 (en) 2019-03-28 2023-11-16 ラピスセミコンダクタ株式会社 Semiconductor device and its testing method
CN110262302A (en) * 2019-04-11 2019-09-20 汉腾汽车有限公司 A kind of detection method of electric machine controller MCU
JP2021033700A (en) * 2019-08-26 2021-03-01 株式会社デンソー Electronic controller

Also Published As

Publication number Publication date
JP6658417B2 (en) 2020-03-04

Similar Documents

Publication Publication Date Title
JP6496562B2 (en) Semiconductor device, diagnostic test method and diagnostic test circuit
JP6658417B2 (en) Electronic control unit
JP4998681B2 (en) Information processing apparatus, operation method of information processing apparatus, and program
JP6462870B2 (en) Semiconductor device and diagnostic test method
JP4834721B2 (en) Memory control device and memory control method
JP6341795B2 (en) Microcomputer and microcomputer system
JP2007041665A (en) Ecc functional test circuit and ecc functional test method
JP5986474B2 (en) Memory failure diagnosis device and memory failure diagnosis method
JP5915490B2 (en) Electronic control unit
JP2013257640A (en) Configuration controller, configuration control method and configuration control program
US8352817B2 (en) Method for testing a memory device, as well as a control device having means for testing a memory
JP2019168835A (en) Electronic control device
JP5579257B2 (en) Apparatus and method for restoring information in main memory
JP5176646B2 (en) Error correction function confirmation circuit, error correction function confirmation method, computer program thereof, and storage device
JP6463445B1 (en) In-vehicle control device
JP2009282849A (en) Microcomputer
JP4639920B2 (en) Electronic control unit
JP2014056396A (en) Electronic controller
US20200300915A1 (en) Semiconductor device, method for diagnosing semiconductor device, and diagnosis program for semiconductor device
JP5924195B2 (en) Electronic equipment
JP6512156B2 (en) Control device
JP2021033700A (en) Electronic controller
JP6358122B2 (en) Microcomputer
JP2019028714A (en) Vehicle control device
JPH04109340A (en) False fault generating circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181102

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190723

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190820

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191016

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200120

R151 Written notification of patent or utility model registration

Ref document number: 6658417

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