JP6243266B2 - Electronic control device and memory diagnostic method - Google Patents

Electronic control device and memory diagnostic method Download PDF

Info

Publication number
JP6243266B2
JP6243266B2 JP2014058826A JP2014058826A JP6243266B2 JP 6243266 B2 JP6243266 B2 JP 6243266B2 JP 2014058826 A JP2014058826 A JP 2014058826A JP 2014058826 A JP2014058826 A JP 2014058826A JP 6243266 B2 JP6243266 B2 JP 6243266B2
Authority
JP
Japan
Prior art keywords
memory
core
diagnosis
memory diagnosis
area
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
JP2014058826A
Other languages
Japanese (ja)
Other versions
JP2015184796A (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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2014058826A priority Critical patent/JP6243266B2/en
Publication of JP2015184796A publication Critical patent/JP2015184796A/en
Application granted granted Critical
Publication of JP6243266B2 publication Critical patent/JP6243266B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、自動車等の車両に搭載する電子制御装置及びそのメモリ診断方法に関する。   The present invention relates to an electronic control device mounted on a vehicle such as an automobile and a memory diagnosis method thereof.

自動車等の車両に搭載する電子制御装置(ECU(Electronic Control Unit))等の一部には、システムの起動時にメモリの診断を行う機種がある。そして、複数のプロセッサを用いて、システムの起動時に初期化処理やメモリ診断処理にかかる時間を並列処理により短縮する技術が提案されている(例えば、特許文献1参照)。   Some models of electronic control units (ECUs) mounted on vehicles such as automobiles perform memory diagnosis when the system is started. And the technique which shortens the time concerning initialization processing and memory diagnostic processing at the time of starting of a system by parallel processing using a plurality of processors is proposed (for example, refer to patent documents 1).

特開平6−325007号公報JP-A-6-325007

しかし、単に並列処理をしたのでは、プロセッサのスペック等に応じて処理時間に差が生じて終了時間がばらつきやすくなり、待ち時間が発生しやすくなる。   However, if parallel processing is simply performed, the processing time varies depending on the processor specifications and the like, the end time tends to vary, and a waiting time tends to occur.

そこで、本発明は、自動車等の車両に搭載する電子制御装置において、メモリ診断の効率化を図ることができる技術を提供することを目的とする。   Accordingly, an object of the present invention is to provide a technique capable of improving the efficiency of memory diagnosis in an electronic control device mounted on a vehicle such as an automobile.

本発明による電子制御装置は、複数の演算装置と、データを記憶するメモリとを含む電子制御装置であって、各々の演算装置は、メモリを複数の領域に分割して所定のメモリ診断をする際、複数の定周期のジョブの実行中に何れかのジョブの中で各々の演算装置の処理能力に基づいて割り振られたメモリの領域を、個別に診断し、メモリ診断の結果が異常であった場合には、該異常を診断した演算装置とは異なる他の演算装置が、異常と診断されたメモリの領域に対してメモリ診断を再度行う。 An electronic control device according to the present invention is an electronic control device including a plurality of arithmetic devices and a memory for storing data, and each arithmetic device divides the memory into a plurality of areas and performs a predetermined memory diagnosis. During execution of multiple periodic jobs, the memory area allocated based on the processing capacity of each arithmetic unit in any job is individually diagnosed, and the memory diagnosis result is abnormal. In such a case, another arithmetic device different from the arithmetic device that diagnosed the abnormality performs the memory diagnosis again on the memory area diagnosed as abnormal.

本発明によれば、メモリ診断の効率化を図ることができる技術を提供できる。   According to the present invention, it is possible to provide a technique capable of improving the efficiency of memory diagnosis.

電子制御装置のハード構成例を示す図である。It is a figure which shows the hardware structural example of an electronic controller. 従来のマルチコアプロセッサにおけるメモリ診断の一例を説明する図である。It is a figure explaining an example of the memory diagnosis in the conventional multi-core processor. 第1実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 1st Embodiment. 第1実施形態におけるメモリ診断のタイミングチャートの一例を説明する図である。It is a figure explaining an example of the timing chart of the memory diagnosis in 1st Embodiment. 第2実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 2nd Embodiment. 第3実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 3rd Embodiment. 第3実施形態におけるメモリ診断のタイミングチャートの一例を説明する図である。It is a figure explaining an example of the timing chart of the memory diagnosis in 3rd Embodiment. 第4実施形態におけるメモリ診断のタイミングチャート例を説明する図である。It is a figure explaining the timing chart example of the memory diagnosis in 4th Embodiment. 第5実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 5th Embodiment. 第5実施形態におけるメモリ診断の処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of the memory diagnosis in 5th Embodiment. 第5実施形態におけるメモリ診断の処理の一例を示すサブルーチンのフローチャートである。It is a flowchart of the subroutine which shows an example of the process of the memory diagnosis in 5th Embodiment. 第5実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 5th Embodiment. 第5実施形態におけるメモリ診断の処理の一例を示すサブルーチンのフローチャートである。It is a flowchart of the subroutine which shows an example of the process of the memory diagnosis in 5th Embodiment. 第6実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 6th Embodiment. 第6実施形態におけるメモリ診断のタイミングチャートの一例を説明する図である。It is a figure explaining an example of the timing chart of the memory diagnosis in 6th Embodiment. 第6実施形態におけるメモリ診断の処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of the memory diagnosis in 6th Embodiment. 第8実施形態におけるメモリ診断の処理の一例を説明する図である。It is a figure explaining an example of the process of the memory diagnosis in 8th Embodiment.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
先ず、電子制御装置のハード構成例について、説明する。
図1に示す電子制御装置100は、例えば、自動車に搭載され、エンジン、自動変速機、燃料ポンプなどを電子制御するデバイスである。
電子制御装置100は、プロセッサ1と、ROM(Read Only Memory)2と、RAM(Random Access Memory)3と、バス4とを備える。プロセッサ1、ROM2及びRAM3は、バス4を介して、互いに接続されている。
Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings.
First, a hardware configuration example of the electronic control device will be described.
An electronic control device 100 shown in FIG. 1 is a device that is mounted on, for example, an automobile and electronically controls an engine, an automatic transmission, a fuel pump, and the like.
The electronic control device 100 includes a processor 1, a ROM (Read Only Memory) 2, a RAM (Random Access Memory) 3, and a bus 4. The processor 1, ROM 2, and RAM 3 are connected to each other via a bus 4.

プロセッサ1は、電子制御装置100の統括的な制御を行うものである。ここで、プロセッサ1は、1つのCPUのパッケージに複数のCPUコア(例えば第1コア11、第2コア12)を搭載しており、物理的にCPUコアの数を増やすことで処理の高速化等を図るマルチコアプロセッサである。図1に示すプロセッサ1では、2つのCPUコアを搭載したデュアルコアを例示しているが、これに限定されず、例えば、3つのCPUコアを搭載したトリプルコア、4つのCPUコアを搭載したクアッドコアであってもよい。また、さらに多くのCPUコアを搭載してもよい。なお、CPUコア(例えば第1コア11、第2コア12)は、演算装置の一例である。   The processor 1 performs overall control of the electronic control device 100. Here, the processor 1 has a plurality of CPU cores (for example, the first core 11 and the second core 12) mounted in one CPU package, and the processing speed is increased by physically increasing the number of CPU cores. It is a multi-core processor that aims to The processor 1 shown in FIG. 1 exemplifies a dual core having two CPU cores. However, the present invention is not limited to this. For example, a triple core having three CPU cores and a quad core having four CPU cores are provided. It may be. Further, more CPU cores may be mounted. The CPU core (for example, the first core 11 and the second core 12) is an example of an arithmetic device.

ROM2は、例えば、フラッシュROM等、電源供給を遮断してもデータが保持される不揮発性の半導体メモリである。また、ROM2は、第1コア用領域21と、第2コア用領域22とを含む。第1コア用領域21及び第2コア用領域22は、例えば、プロセッサ1(第1コア11、第2コア12等)の処理能力に応じて、メモリ診断対象のメモリの領域が設定される。   The ROM 2 is a non-volatile semiconductor memory such as a flash ROM that retains data even when power supply is cut off. The ROM 2 includes a first core area 21 and a second core area 22. In the first core area 21 and the second core area 22, for example, a memory area targeted for memory diagnosis is set according to the processing capability of the processor 1 (the first core 11, the second core 12, etc.).

RAM3は、例えば、演算処理等に用いられるデータの一時的な作業領域となるメモリであって、電源供給が遮断されると、記憶内容が消える揮発性メモリである。より詳細には、RAM3は、アドレス等による番地情報に基づいて、任意の番地のメモリーセルに対して読み出しや書き込みといった操作ができる記憶装置である。なお、RAM3は、例えば、ダイナミックRAMやスタティックRAMであってもよい。バス4は、例えば、メモリアクセスバスを含む。   The RAM 3 is, for example, a memory serving as a temporary work area for data used for arithmetic processing and the like, and is a volatile memory whose stored contents disappear when power supply is interrupted. More specifically, the RAM 3 is a storage device that can perform operations such as reading and writing on a memory cell at an arbitrary address based on address information such as an address. Note that the RAM 3 may be, for example, a dynamic RAM or a static RAM. The bus 4 includes, for example, a memory access bus.

また、電子制御装置100は、プロセッサ1、ROM2、RAM3等のハードウェアと、制御プログラム等のソフトウェアとが協働することにより、各種機能を実現する。この制御プログラムには、本実施形態のメモリ診断等の処理を行うプログラムが含まれる。したがって、プロセッサ1は、第1コア11及び第2コア12が制御プログラムを実行することで、メモリ診断等の処理が実現される。   In addition, the electronic control device 100 realizes various functions through the cooperation of hardware such as the processor 1, the ROM 2, and the RAM 3, and software such as a control program. This control program includes a program for performing processing such as memory diagnosis of the present embodiment. Accordingly, in the processor 1, the first core 11 and the second core 12 execute the control program, thereby realizing processing such as memory diagnosis.

[従来例との比較]
ここで、本件に開示する技術をより深く理解するため、従来のマルチコアプロセッサにおけるメモリ診断について簡単に説明する。
図2に示すように、従来のマルチコアプロセッサにおけるメモリ診断では、一例として、メモリ2aの診断領域を均等に2分割し、マルチコアプロセッサの第1コア11が第1ROM領域21aを診断し、マルチコアプロセッサの第2コアが第2ROM領域22aを診断する。診断の仕方としては、例えばいわゆるチェックサム方式を採用している。チェックサム方式は、一例として、第1ROM領域21a、第2ROM領域22aのブロック毎に算出したチェックサム(合計値)と、予め算出しておいたチェックサム(期待値)とを各々比較する。チェックサム(合計値)とチェックサム(期待値)とが一致すれば、正常であると診断される。
[Comparison with conventional example]
Here, in order to better understand the technology disclosed in the present case, a memory diagnosis in a conventional multi-core processor will be briefly described.
As shown in FIG. 2, in the memory diagnosis in the conventional multi-core processor, as an example, the diagnosis area of the memory 2a is equally divided into two, the first core 11 of the multi-core processor diagnoses the first ROM area 21a, and the multi-core processor The second core diagnoses the second ROM area 22a. As a diagnosis method, for example, a so-called checksum method is adopted. As an example, the checksum method compares a checksum (total value) calculated for each block of the first ROM area 21a and the second ROM area 22a with a checksum (expected value) calculated in advance. If the checksum (total value) matches the checksum (expected value), it is diagnosed as normal.

ここで、第1コア11と第2コア12とにおいて、例えば、演算処理能力の目安となるクロック周波数(動作周波数)が異なると、メモリの診断等の処理時間にばらつきが生じやすくなるため、上述した通り、先にメモリ診断を終了したコアは、他のコアによるメモリ診断の終了まで無駄な待ち時間が発生することとなる。   Here, for example, if the first core 11 and the second core 12 have different clock frequencies (operating frequencies) that serve as a guide for the arithmetic processing capability, the processing time for memory diagnosis or the like tends to vary. As described above, the core that has completed the memory diagnosis first generates a wasteful waiting time until the memory diagnosis by other cores is completed.

そこで、以下に説明する実施形態において、メモリ診断の効率化を図ることができる技術等について説明する。また、例えばメモリ診断の高速化や異常時の処理についても説明する。   Therefore, in the embodiment described below, a technique capable of improving the efficiency of memory diagnosis will be described. In addition, for example, speeding up of memory diagnosis and processing at the time of abnormality will be described.

[第1実施形態]
図3では、第1実施形態におけるメモリ診断の処理の一例として、ROM2の領域を模式的に示している。なお、図3では、図2に示したようなブロック毎のチェックサムにおける期待値の領域の図示を省略している(以下、同様とする)。また、図3では、第2コア12が診断するメモリのブロックを斜線で例示している。ここで、第1実施形態では、第1コア11の第1クロック周波数(f)を、一例として、240MHzとし、第2コア12の第2クロック周波数(f)を、一例として、80MHzとする。
[First embodiment]
FIG. 3 schematically shows the area of the ROM 2 as an example of the memory diagnosis process in the first embodiment. In FIG. 3, the expected value area in the checksum for each block as shown in FIG. 2 is not shown (hereinafter the same). In FIG. 3, the blocks of the memory diagnosed by the second core 12 are illustrated by diagonal lines. Here, in the first embodiment, the first clock frequency (f 1 ) of the first core 11 is 240 MHz as an example, and the second clock frequency (f 2 ) of the second core 12 is 80 MHz as an example. To do.

また、第1実施形態では、説明をわかりやすくするため、ROM2のメモリ領域を20ブロックに分割する(図3参照)。なお、メモリ領域を複数の領域に分割する仕方は一例であって、物理空間に応じて分割してもよく、又は、論理空間に応じて分割してもよい。つまり、メモリ診断の効率化に寄与すれば、メモリ領域を複数の領域に分割する仕方は、特に限定されない。
ここで、一例として20ブロックに分割した場合、第1コア11がメモリ診断する領域の比率rは、
=f/(f+f)=240MHz/(240+80)MHz=0.75
となる。
In the first embodiment, the memory area of the ROM 2 is divided into 20 blocks for easy understanding (see FIG. 3). Note that the method of dividing the memory area into a plurality of areas is an example, and may be divided according to the physical space or may be divided according to the logical space. In other words, the method of dividing the memory area into a plurality of areas is not particularly limited as long as it contributes to efficient memory diagnosis.
Here, when divided into 20 blocks as an example, the ratio r 1 of the area in which the first core 11 performs memory diagnosis is:
r 1 = f 1 / (f 1 + f 2 ) = 240 MHz / (240 + 80) MHz = 0.75
It becomes.

一方、第2コア12がメモリ診断する領域の比率rは、
=f/(f+f)=80MHz/(240+80)MHz=0.25
となる。これにより、第1コア11がメモリ診断する領域のブロック数Bは、B=20×0.75=15ブロックとなる。また、第2コア12がメモリ診断する領域のブロック数Bは、B=20×0.25=5ブロックとなる。
なお、上記比率の場合、図1に示す第1コア用領域21のブロック数が15ブロックとなり、第2コア用領域22のブロック数が5ブロックとなる。
したがって、図3に示す通り、クロック周波数が、第2コア12よりも3倍高い第1コア11の方が、その分多くのブロックを単位時間当たりで診断することができる。この点に関し、図4を用いてより詳細に説明する。
On the other hand, the ratio r 2 of the area where the second core 12 performs memory diagnosis is
r 2 = f 2 / (f 1 + f 2 ) = 80 MHz / (240 + 80) MHz = 0.25
It becomes. As a result, the number of blocks B 1 in the area where the first core 11 performs memory diagnosis is B 1 = 20 × 0.75 = 15 blocks. Further, the number of blocks B 2 in the area where the second core 12 performs memory diagnosis is B 2 = 20 × 0.25 = 5 blocks.
In the case of the above ratio, the number of blocks in the first core area 21 shown in FIG. 1 is 15 blocks, and the number of blocks in the second core area 22 is 5 blocks.
Therefore, as shown in FIG. 3, the first core 11 whose clock frequency is three times higher than the second core 12 can diagnose more blocks per unit time. This point will be described in more detail with reference to FIG.

図4に示すメモリ診断のタイミングチャートにおいて、横軸は、時間軸を表しており、縦軸は、図1に示す第1コア11及び第2コア12が実行するブロックの診断時間を模式的に長方形で表している。具体的には、図1では、長方形の面積が大きいほど、診断時間を要することを示している。ここでは、電子制御装置100の起動時のメモリ診断を例示している。
図4(a)は、比較例として、第1コア11と第2コア12とで、診断領域を等分(10ブロックづつ)にした場合を例示している。図4(b)は、図3に示す通り、第1コア11が15ブロックを診断し、第2コア12が5ブロックを診断した場合を例示している。
In the timing chart of the memory diagnosis shown in FIG. 4, the horizontal axis represents the time axis, and the vertical axis schematically represents the diagnosis time of the blocks executed by the first core 11 and the second core 12 shown in FIG. It is represented by a rectangle. Specifically, FIG. 1 indicates that the larger the rectangular area, the longer the diagnosis time is required. Here, the memory diagnosis at the time of starting of the electronic control apparatus 100 is illustrated.
FIG. 4A illustrates, as a comparative example, a case where the diagnostic region is equally divided (in 10 blocks) between the first core 11 and the second core 12. FIG. 4B illustrates a case where the first core 11 diagnoses 15 blocks and the second core 12 diagnoses 5 blocks, as shown in FIG.

図4(a)の場合、第1コア11は、第2コア12と比較して、クロック周波数が3倍高いので、メモリの診断時間が略3分の1の時間で終了することになる。この場合、第1コア11は、第2コア12のメモリ診断のジョブが終了しないと、次のジョブを実行できない場合、無駄な待ち時間が発生する。   In the case of FIG. 4A, since the clock frequency of the first core 11 is three times higher than that of the second core 12, the diagnosis time of the memory is completed in about one-third of the time. In this case, if the first core 11 cannot execute the next job unless the memory diagnosis job of the second core 12 is completed, a wasteful waiting time occurs.

一方、図4(b)の場合、第1コア11が15ブロックを診断し、第2コア12が5ブロックを診断する。これにより、第1コア11のメモリ診断の終了時と、第2コア12のメモリ診断の終了時とが、略一致する。
つまり、第1コア11と第2コア12とは、ROM2の領域を分割して、予め定められたチェックサム等を利用してメモリ診断をする際、各々のコアのクロック周波数に基づいて割り振られたメモリのブロックを、個別に診断する。したがって、第1実施形態では、クロック周波数によって、メモリ診断の領域の比率を変えることにより、マルチコアプロセッサにおけるメモリ診断の効率化を実現できる。この結果、第1実施形態では、メモリ診断の高速化も実現できる。なお、上記の比率の計算やメモリのブロックの割り振りは、例えば第1コア11と第2コア12との何れか一方が行えばよい。
On the other hand, in the case of FIG. 4B, the first core 11 diagnoses 15 blocks and the second core 12 diagnoses 5 blocks. Thereby, the end of the memory diagnosis of the first core 11 and the end of the memory diagnosis of the second core 12 substantially coincide.
That is, the first core 11 and the second core 12 are allocated based on the clock frequency of each core when the ROM 2 area is divided and memory diagnosis is performed using a predetermined checksum or the like. Diagnose each block of memory individually. Therefore, in the first embodiment, the efficiency of the memory diagnosis in the multi-core processor can be realized by changing the ratio of the memory diagnosis area according to the clock frequency. As a result, in the first embodiment, the memory diagnosis can be speeded up. Note that the ratio calculation and the memory block allocation may be performed by, for example, one of the first core 11 and the second core 12.

[第2実施形態]
第2実施形態では、各コアの演算処理の負荷(以下「処理負荷」という)に基づいて、診断する領域の比率を決定する。なお、電子制御装置100の動作時において、第1コア11、第2コア12は、各々演算処理にかかる負荷率を管理している。
[Second Embodiment]
In the second embodiment, the ratio of the areas to be diagnosed is determined based on the processing load (hereinafter referred to as “processing load”) of each core. During the operation of the electronic control unit 100, the first core 11 and the second core 12 each manage the load factor for the arithmetic processing.

図5に示すメモリ診断の処理の一例として、具体的には、第1コア11の負荷率を60%とし、第2コア12の負荷率を20%とする。換言すると、各コアの使用可能な割合を示す余裕率が、第1コア11の場合、40%であり、第2コア12の場合、80%となる。また、第2実施形態でも、ROM2のメモリの領域を20ブロックに分割する場合について説明する。ここで、第2実施形態では、第1コア11の余裕率(s)を、一例として、40%とし、第2コア12の余裕率(s)を、一例として、80%とする。このようにした場合、第1コア11がメモリ診断する領域の比率rは、
=s/(s+s)=40/(40+80)=0.333≒33%
となる。
As an example of the memory diagnosis process shown in FIG. 5, specifically, the load factor of the first core 11 is set to 60%, and the load factor of the second core 12 is set to 20%. In other words, the margin ratio indicating the usable ratio of each core is 40% in the case of the first core 11 and 80% in the case of the second core 12. In the second embodiment, the case where the memory area of the ROM 2 is divided into 20 blocks will be described. Here, in the second embodiment, the margin ratio (s 1 ) of the first core 11 is 40% as an example, and the margin ratio (s 2 ) of the second core 12 is 80% as an example. In this case, the ratio r 1 of the area where the first core 11 performs memory diagnosis is
r 1 = s 1 / (s 1 + s 2 ) = 40 / (40 + 80) = 0.333≈33%
It becomes.

一方、第2コア12がメモリ診断する領域の比率rは、
=s/(s+s)=80/(40+80)=0.666≒67%
となる。これにより、第1コア11がメモリ診断する領域のブロック数Bは、B=20×0.33=6.6≒7ブロックとなる。また、第2コア12がメモリ診断する領域のブロック数Bは、B=20×0.67=13.4≒13ブロックとなる。
なお、この場合、図5に示す通り、高負荷(負荷率60%)の第1コア11が7ブロックのメモリ診断をし、低負荷(負荷率40%)の第2コア12が13ブロックのメモリ診断を行う。これにより、第2実施形態においても、各コアの処理負荷によって、メモリ診断の領域の比率を変えることにより、メモリ診断の効率化を実現できる。
On the other hand, the ratio r 2 of the area where the second core 12 performs memory diagnosis is
r 2 = s 2 / (s 1 + s 2 ) = 80 / (40 + 80) = 0.666≈67%
It becomes. As a result, the number of blocks B 1 in the area where the first core 11 performs memory diagnosis is B 1 = 20 × 0.33 = 6.6≈7 blocks. Further, the number of blocks B 2 in the area where the second core 12 performs memory diagnosis is B 2 = 20 × 0.67 = 13.4≈13 blocks.
In this case, as shown in FIG. 5, the first core 11 having a high load (load factor 60%) performs a memory diagnosis of 7 blocks, and the second core 12 having a low load (load factor 40%) is 13 blocks. Perform memory diagnostics. Thereby, also in the second embodiment, the efficiency of the memory diagnosis can be realized by changing the ratio of the memory diagnosis area according to the processing load of each core.

[第3実施形態]
第3実施形態では、各コアのクロック周波数及び処理負荷を考慮して、メモリ診断を行う。
[Third embodiment]
In the third embodiment, memory diagnosis is performed in consideration of the clock frequency and processing load of each core.

図6に示す第3実施形態におけるメモリ診断の処理の一例では、第1実施形態と同様、第1コア11の第1クロック周波数(f)を、240MHzとし、第2コア12の第2クロック周波数(f)を、80MHzとする。また、第1コア11の余裕率を40%とし、第2コア12の余裕率を80%とする。
ここで、各コアのクロック周波数及び処理負荷を考慮するため、第1コア11の場合、先ず、第1実施形態で算出した75%と第2実施形態で算出した33%とを乗算することにより、24.75%の値(r)が得られる。また、第2コア12の場合、先ず、第1実施形態で算出した25%と第2実施形態で算出した67%とを乗算することにより、16.75%の値(r)が得られる。
In the example of the memory diagnosis process in the third embodiment shown in FIG. 6, the first clock frequency (f 1 ) of the first core 11 is 240 MHz and the second clock of the second core 12 is the same as in the first embodiment. The frequency (f 2 ) is 80 MHz. The margin ratio of the first core 11 is 40%, and the margin ratio of the second core 12 is 80%.
Here, in order to consider the clock frequency and processing load of each core, in the case of the first core 11, first, 75% calculated in the first embodiment is multiplied by 33% calculated in the second embodiment. A value (r 3 ) of 24.75% is obtained. Further, in the case of the second core 12, first, the value (r 4 ) of 16.75% is obtained by multiplying 25% calculated in the first embodiment by 67% calculated in the second embodiment. .

続いて、第1コア11がメモリ診断する領域の比率rは、
=r/(r+r)=24.75/(24.75+16.75)
=0.5963≒60%となる。
一方、第2コア12がメモリ診断する領域の比率rは、
=r/(r+r)=16.75/(24.75+16.75)
=0.4036≒40%となる。
Subsequently, the ratio r 1 of the area in which the first core 11 performs memory diagnosis is:
r 1 = r 3 / (r 3 + r 4 ) = 24.75 / (24.75 + 16.75)
= 0.5963≈60%.
On the other hand, the ratio r 2 of the area where the second core 12 performs memory diagnosis is
r 2 = r 4 / (r 3 + r 4 ) = 16.75 / (24.75 + 16.75)
= 0.4036≈40%.

したがって、図6に示す通り、第1コア11がメモリ診断する領域のブロック数Bは、B=20×0.60=12ブロックとなり、第2コア12がメモリ診断する領域のブロック数Bは、B=20×0.40=8ブロックとなる。
図7では、第3実施形態におけるメモリ診断のタイミングチャートの一例を示している。ただし、説明の便宜上、図7では、待ち時間を省略し、太線の鎖線で区切った20ブロック単位のメモリの診断時間を例示している。具体的には、図7(a)は、比較例として、第1コア11と第2コア12とにおいて、メモリ診断の領域を等分(10ブロック)に分割した場合を例示している。図7(b)は、図6に示す通り、第1コア11が12ブロックをメモリ診断し、第2コア12が8ブロックをメモリ診断した場合を例示している。
これにより、第3実施形態では、各コアのクロック周波数及び処理負荷を考慮してメモリ診断の領域の比率を変えることにより、第1、2実施形態よりもさらにメモリ診断を効率化し、また、高速化も実現できる。
Therefore, as shown in FIG. 6, the number of blocks B 1 in the area in which the first core 11 performs memory diagnosis is B 1 = 20 × 0.60 = 12 blocks, and the number of blocks in the area in which the second core 12 performs memory diagnosis B 2 is B 2 = 20 × 0.40 = 8 blocks.
FIG. 7 shows an example of a timing chart of memory diagnosis in the third embodiment. However, for convenience of explanation, FIG. 7 illustrates the diagnosis time of the memory in units of 20 blocks in which the waiting time is omitted and divided by a thick chain line. Specifically, FIG. 7A illustrates, as a comparative example, a case where the memory diagnosis area is divided equally (10 blocks) in the first core 11 and the second core 12. FIG. 7B illustrates a case where the first core 11 performs memory diagnosis on 12 blocks and the second core 12 performs memory diagnosis on 8 blocks, as illustrated in FIG. 6.
As a result, in the third embodiment, by changing the ratio of the memory diagnosis area in consideration of the clock frequency and processing load of each core, the memory diagnosis is more efficient than the first and second embodiments, and the speed is increased. Can also be realized.

[第4実施形態]
第4実施形態では、定周期のジョブの実行中にメモリ診断を実行する。
図8では、第4実施形態におけるメモリ診断のタイミングチャートの一例を示しており、プロセッサ1(第1コア11、第2コア12等)は、一例として、実行時間がそれぞれ2msec毎のジョブAと、5msec毎のジョブBと、10msec毎のジョブC等のジョブを実行する。なお、ジョブの優先度は、高い順番からジョブA、ジョブB、ジョブCとする。また、図8では、斜線のブロックで待ち時間を表している。ただし、図8では、説明の便宜上、ジョブCの待ち時間とジョブBの一部の待ち時間を、斜線のブロックであらわしている。また、図8に示す通り、2msec毎のジョブAは、A1、A2、A3、A4、A5、・・・というように、10msecの間に5回起動する。また、5msec毎のジョブBは、B1、B2、・・・というように、10msecの間に2回起動する。また、10msec毎のジョブCは、C1、・・・というように、10msecの間に1回起動する。
[Fourth embodiment]
In the fourth embodiment, memory diagnosis is executed during the execution of a job with a fixed period.
FIG. 8 shows an example of a timing chart of memory diagnosis in the fourth embodiment. As an example, the processor 1 (the first core 11, the second core 12, etc.) Jobs such as job B every 5 msec and job C every 10 msec are executed. Note that the job priorities are job A, job B, and job C in descending order. Further, in FIG. 8, the waiting time is indicated by hatched blocks. However, in FIG. 8, for convenience of explanation, the waiting time of job C and a part of waiting time of job B are represented by hatched blocks. Further, as shown in FIG. 8, job A every 2 msec is activated five times during 10 msec, such as A1, A2, A3, A4, A5,. Further, the job B every 5 msec is activated twice during 10 msec, such as B1, B2,. Further, job C every 10 msec is activated once every 10 msec, such as C1,.

そして、プロセッサ1は、一例として、実行時間が10msec等の定周期のジョブCの実行中にメモリ診断を行う場合、そのジョブCの中でメモリ診断の処理を並列に行う。
なお、図8(a)において、プロセッサ1は、時間0のタイミングで、ジョブA1を起動し、その後、10msec内に、2msec毎に起動するジョブA2からA5を実行する。また、プロセッサ1は、ジョブB1を時間0のタイミングで起動するが、待ち時間により、ジョブA1の終了後にジョブB1を実行する。また、プロセッサ1は、ジョブB2を時間軸で5msecのタイミングで起動するが、途中、ジョブA4の起動により待ち時間が発生したため、2回に分けて実行する。
さらに、プロセッサ1は、ジョブC1を時間0のタイミングで起動するが、待ち時間により、10msecの間に4回に分けて実行する。
For example, when performing memory diagnosis during execution of a job C having a fixed period such as 10 msec, the processor 1 performs memory diagnosis processing in parallel in the job C.
In FIG. 8A, the processor 1 starts job A1 at time 0, and then executes jobs A2 to A5 that are started every 2 msec within 10 msec. In addition, the processor 1 starts the job B1 at the timing of time 0, but executes the job B1 after the end of the job A1 due to the waiting time. Further, the processor 1 starts the job B2 at a timing of 5 msec on the time axis, but since the waiting time is generated due to the start of the job A4, the processor 1 executes it in two steps.
Further, the processor 1 starts the job C1 at the timing of time 0, but executes the job C1 in four times during 10 msec depending on the waiting time.

図8(b)は、ジョブA、B及びCの各実行時間の合計を示している。以上より、プロセッサ1は、定周期のジョブの実行中にメモリ診断を行う場合、そのジョブの中でメモリ診断の処理を並列に行うので、メモリ診断の効率化を実現できる。   FIG. 8B shows the total execution time of jobs A, B, and C. As described above, when the memory diagnosis is performed during execution of a job with a fixed period, the memory diagnosis is performed in parallel in the job, so that the efficiency of the memory diagnosis can be realized.

なお、図8において、単位時間(T1)、実行時間(T2)、空き時間(T3)とした場合、負荷率(%)=(T2)/(T1)となり、余裕率(%)=(T1)/(T2)となる。この場合、プロセッサ1は、実行時間(T2)+空き時間(T3)の期間内の負荷率(又は、余裕率)に基づいて、次の周期でのメモリ診断における比率を決定してもよい。これにより、メモリ診断の効率化がさらに図られる。   In FIG. 8, when the unit time (T1), the execution time (T2), and the idle time (T3) are assumed, the load factor (%) = (T2) / (T1) and the margin rate (%) = (T1) ) / (T2). In this case, the processor 1 may determine the ratio in the memory diagnosis in the next cycle based on the load factor (or margin rate) within the period of execution time (T2) + free time (T3). This further increases the efficiency of memory diagnosis.

[第5実施形態]
第5実施形態では、各コアのクロック周波数及び処理負荷を考慮して、メモリ診断する領域の比率を決定する。
[Fifth Embodiment]
In the fifth embodiment, the ratio of areas for memory diagnosis is determined in consideration of the clock frequency and processing load of each core.

図9に示すメモリ診断の処理の一例において、プロセッサ1は、メモリ診断する領域のブロックの比率を1度決定した場合(図9(a)参照)、全領域のメモリ診断が終了するまで、その比率を変えずにメモリ診断をしてもよい(図9(b)、(c)参照)。
具体的には、図9に示す処理において、10msecの定周期のジョブでメモリ診断をする場合、プロセッサ1(第1コア11、第2コア12等)は、図10に示すフローチャートの処理(以下「フローの処理」という)を実行する。
In the example of the memory diagnosis process shown in FIG. 9, when the processor 1 determines the block ratio of the area to be subjected to memory diagnosis once (see FIG. 9A), the memory diagnosis is performed until the memory diagnosis for all areas is completed. Memory diagnosis may be performed without changing the ratio (see FIGS. 9B and 9C).
Specifically, in the process shown in FIG. 9, when performing memory diagnosis with a job with a fixed period of 10 msec, the processor 1 (the first core 11, the second core 12, etc.) performs the process of the flowchart shown in FIG. "Flow process").

ステップS101:プロセッサ1は、所定の演算処理を実行する。具体的には、プロセッサ1では、例えば、各コアが処理負荷を算出する。
ステップS102:プロセッサ1は、メモリ診断処理のサブルーチンを実行する。
そして、プロセッサ1は、図10に示すフローの処理を一旦終了する。そして、プロセッサ1は、再度、10msecの定周期のジョブでメモリ診断を行うため、図10に示すフローの処理を開始する。
Step S101: The processor 1 executes a predetermined calculation process. Specifically, in the processor 1, for example, each core calculates a processing load.
Step S102: The processor 1 executes a subroutine of memory diagnosis processing.
Then, the processor 1 once ends the processing of the flow shown in FIG. Then, the processor 1 again starts the processing of the flow shown in FIG. 10 in order to perform memory diagnosis with a job having a fixed period of 10 msec.

次に、図11に示すメモリ診断処理のサブルーチンについて、説明する。
ステップS103:プロセッサ1は、ROM2内で当該診断対象となるメモリの全領域について診断が終了したか否かを判定する。診断が終了していない場合(ステップS103:No)、後述するステップS107に移行する。一方、診断が終了した場合(ステップS103:Yes)、ステップS104の処理に移行する。
ステップS104:プロセッサ1は、各コアのクロック周波数及び処理負荷に基づいて、診断領域の分担を決定する。
ステップS105:プロセッサ1は、各領域の診断済みの情報を消去する。
ステップS106:プロセッサ1は、カウンタXの初期化処理を行う。なお、カウンタXは、例えば、メモリブロックのカウンタ値である(以下、同様とする)。
ステップS107:プロセッサ1は、第Nコアの分担領域の診断が終了したか否かを判定する。ここでは、図1に示す通り、プロセッサ1は、デュアルコアプロセッサであるので、ここでは、第1コア11、第2コア12が対象となる。診断が終了した場合(ステップS107:Yes)、メモリ診断処理のサブルーチンを終了し、ステップS102に戻り、図10に示すフローの処理を一旦終了する。一方、診断が終了していない場合(ステップS107:No)、ステップS108の処理に移行する。
ステップS108:プロセッサ1は、カウンタXに基づいて、分割したブロックのメモリの領域Xを診断する。ここで、カウンタXとメモリの領域Xとは、アドレス番号等で関連付けられている。
ステップS109:プロセッサ1は、カウンタXの更新処理を行う。そして、メモリ診断処理のサブルーチンを終了し、ステップS102に戻り、図10に示すフローの処理を一旦終了する。
Next, a subroutine of the memory diagnosis process shown in FIG. 11 will be described.
Step S103: The processor 1 determines whether or not diagnosis has been completed for all areas of the memory to be diagnosed in the ROM 2. When the diagnosis is not completed (step S103: No), the process proceeds to step S107 described later. On the other hand, when the diagnosis is completed (step S103: Yes), the process proceeds to step S104.
Step S104: The processor 1 determines the sharing of the diagnosis area based on the clock frequency and the processing load of each core.
Step S105: The processor 1 deletes the diagnosed information in each area.
Step S106: The processor 1 initializes the counter X. The counter X is, for example, a counter value of the memory block (hereinafter the same).
Step S107: The processor 1 determines whether or not the diagnosis of the shared area of the Nth core has been completed. Here, as shown in FIG. 1, the processor 1 is a dual-core processor, and therefore, here, the first core 11 and the second core 12 are targeted. When the diagnosis ends (step S107: Yes), the memory diagnosis process subroutine ends, the process returns to step S102, and the process of the flow shown in FIG. On the other hand, when the diagnosis is not completed (step S107: No), the process proceeds to step S108.
Step S108: The processor 1 diagnoses the memory area X of the divided block based on the counter X. Here, the counter X and the memory area X are associated by an address number or the like.
Step S109: The processor 1 performs update processing of the counter X. Then, the subroutine of the memory diagnosis process is terminated, the process returns to step S102, and the process of the flow shown in FIG. 10 is temporarily terminated.

以上より、プロセッサ1は、メモリ診断する領域のブロックの比率を1度決定した場合、全領域のメモリ診断が終了するまで、その比率を変えずにメモリ診断することができる。ただし、メモリ診断の最中に処理負荷が変動した場合、メモリ診断の時間にばらつきが生じるおそれがある。   As described above, when the ratio of the block of the area to be subjected to the memory diagnosis is determined once, the processor 1 can perform the memory diagnosis without changing the ratio until the memory diagnosis of all the areas is completed. However, if the processing load fluctuates during the memory diagnosis, the memory diagnosis time may vary.

そこで、図12において、プロセッサ1は、メモリ診断する領域のブロックの比率を、メモリ診断の周期毎に見直してもよい。具体的には、メモリ診断の開始時には、図12(a)に示す通り、ROM2のメモリにおいて、第1コア11がメモリ診断する領域(第1コア用領域21)は、60%であり、第2コア12がメモリ診断する領域(第2コア用領域22)は、40%である。その後、図12(b)に示す通り、第1コア11の処理負荷が減った場合、プロセッサ1は、メモリ診断する領域のブロックの比率について、第1コア11の分担の比率を60%から70%に増やし、第2コア11の分担の比率を40%から30%に減らす。そして、プロセッサ1は、メモリ診断を最後まで実行する(図12(c)参照)。   Therefore, in FIG. 12, the processor 1 may review the ratio of the blocks in the memory diagnosis area for each memory diagnosis cycle. Specifically, at the start of the memory diagnosis, as shown in FIG. 12A, in the memory of the ROM 2, the area where the first core 11 performs the memory diagnosis (first core area 21) is 60%, The area where the two cores 12 perform memory diagnosis (second core area 22) is 40%. After that, as shown in FIG. 12B, when the processing load of the first core 11 is reduced, the processor 1 changes the ratio of the allocation of the first core 11 from 60% to 70 with respect to the block ratio of the area to be subjected to memory diagnosis. The ratio of the second core 11 is reduced from 40% to 30%. Then, the processor 1 executes the memory diagnosis to the end (see FIG. 12C).

具体的には、10msecの定周期のジョブでメモリ診断を行う場合、プロセッサ1は、上述した図10に示すフローの処理を行う。ただし、ステップS102のメモリ診断処理におけるサブルーチンの処理が、上述した図11に示すサブルーチンと一部異なるので、以下、図13に示すサブルーチンのフローチャートに基づいて説明する。   Specifically, when performing memory diagnosis with a job with a fixed period of 10 msec, the processor 1 performs the processing of the flow shown in FIG. 10 described above. However, the subroutine processing in the memory diagnosis processing in step S102 is partially different from the subroutine shown in FIG. 11 described above, and will be described below based on the subroutine flowchart shown in FIG.

ステップS201:プロセッサ1は、ROM2における当該対象のメモリの全領域について診断が終了したか否かを判定する。診断が終了していない場合(ステップS201:No)、後述するステップS204に移行する。一方、診断が終了した場合(ステップS201:Yes)、ステップS202の処理に移行する。
ステップS202:プロセッサ1は、各領域の診断済みの情報を消去する。
ステップS203:プロセッサ1は、カウンタXの初期化処理を実行する。
ステップS204:プロセッサ1は、各コアのクロック周波数及び処理負荷に基づいて、診断領域の分担を決定する。
ステップS205:プロセッサ1は、第Nコア(第1コア11、第2コア12)の分担領域の診断が終了したか否かを判定する。診断が終了した場合(ステップS205:Yes)、メモリ診断処理のサブルーチンを終了し、ステップS101に戻り、図10に示すフローの処理を一旦終了する。一方、診断が終了していない場合(ステップS205:No)、ステップS206の処理に移行する。
ステップS206:プロセッサ1は、カウンタXに基づいて、分割したブロックのメモリの領域Xを診断する。
ステップS207:プロセッサ1は、カウンタXの更新処理を行う。そして、メモリ診断処理のサブルーチンを終了し、ステップS102に戻り、図10に示すフローの処理を一旦終了する。
Step S201: The processor 1 determines whether or not diagnosis has been completed for all areas of the target memory in the ROM 2. When the diagnosis is not completed (step S201: No), the process proceeds to step S204 described later. On the other hand, when the diagnosis is completed (step S201: Yes), the process proceeds to step S202.
Step S202: The processor 1 deletes the diagnosed information in each area.
Step S203: The processor 1 executes an initialization process for the counter X.
Step S204: The processor 1 determines the sharing of the diagnosis area based on the clock frequency and the processing load of each core.
Step S205: The processor 1 determines whether or not the diagnosis of the shared area of the Nth core (the first core 11 and the second core 12) has been completed. When the diagnosis is finished (step S205: Yes), the memory diagnosis process subroutine is finished, the process returns to step S101, and the process of the flow shown in FIG. 10 is once finished. On the other hand, when the diagnosis is not completed (step S205: No), the process proceeds to step S206.
Step S206: The processor 1 diagnoses the memory area X of the divided block based on the counter X.
Step S207: The processor 1 performs update processing of the counter X. Then, the subroutine of the memory diagnosis process is terminated, the process returns to step S102, and the process of the flow shown in FIG. 10 is temporarily terminated.

なお、メモリ診断の周期毎に比率を見直す場合、例えば、10msec毎であってもよく、又は、100msec毎であってもよく、メモリ診断に適した時間であれば、任意に設定してよい。
以上より、第5実施形態では、各コアのクロック周波数及び処理負荷を考慮して、メモリ診断する領域のブロックの比率を決定するので、メモリ診断の効率化や高速化を実現できる。
When reviewing the ratio for each memory diagnosis cycle, for example, it may be every 10 msec or every 100 msec, and may be arbitrarily set as long as it is suitable for memory diagnosis.
As described above, in the fifth embodiment, the ratio of the blocks in the memory diagnosis area is determined in consideration of the clock frequency and the processing load of each core, so that the memory diagnosis can be made more efficient and faster.

[第6実施形態]
第6実施形態では、メモリ診断する領域のブロックの比率を予め決定せずに、各コアのバックグランド処理により、メモリ診断を行う。つまり、第1コア11及び第2コア12は、当該ブロックの診断が終了した場合、次の未診断ブロックを診断する。
[Sixth Embodiment]
In the sixth embodiment, the memory diagnosis is performed by the background processing of each core without predetermining the block ratio of the area for memory diagnosis. That is, the first core 11 and the second core 12 diagnose the next undiagnosed block when the diagnosis of the block is completed.

図14に示す第6実施形態におけるメモリ診断の処理の一例において、図14(a)に示す通り、第1コア11がROM2の第1ブロック目(n=1)の診断を開始し、第2コア12がROM2の第2ブロック目(n=2)の診断を開始する。なお、説明をわかりやすくするため、図14(a)から図14(c)において、各ブロックに通し番号を付与している。
ここで、図14(b)において、第1コア11が第1ブロック目の診断を終了した場合、第2コア12が第2ブロック目を診断中であれば、第1コア11は、次の未診断の第3ブロック目(n=3)を診断する。また、図14(c)において、第2コア12が第2ブロック目の診断を終了した場合、第1コア11が例えば第6ブロック目(n=6)を診断中であれば、第2コア11は、次の未診断の第7ブロック目(n=7)を診断する。以下、同様に処理をしていく。
In the example of the memory diagnosis process in the sixth embodiment shown in FIG. 14, the first core 11 starts diagnosis of the first block (n = 1) of the ROM 2 as shown in FIG. The core 12 starts diagnosis of the second block (n = 2) of the ROM 2. In order to make the explanation easy to understand, serial numbers are given to the respective blocks in FIGS.
Here, in FIG. 14B, when the first core 11 completes the diagnosis of the first block, if the second core 12 is diagnosing the second block, the first core 11 An undiagnosed third block (n = 3) is diagnosed. In FIG. 14C, when the second core 12 finishes the diagnosis of the second block, if the first core 11 is diagnosing the sixth block (n = 6), for example, the second core 11 diagnoses the next undiagnosed seventh block (n = 7). Thereafter, the same processing is performed.

なお、診断済みのブロックの判定方法は、例えば、メモリブロック毎に対になるフラグを持つことにより実現できる。診断開始フラグは、診断開始時にセットし、診断終了時に診断終了フラグをセットする。これにより、第1コア11、第2コア12は、診断開始フラグがセットされていないブロックを未診断のブロックであると判断できる。   Note that the diagnosed block determination method can be realized, for example, by having a paired flag for each memory block. The diagnosis start flag is set at the start of diagnosis, and the diagnosis end flag is set at the end of diagnosis. Thereby, the 1st core 11 and the 2nd core 12 can judge that the block in which the diagnosis start flag is not set is an undiagnosed block.

図15に示す第6実施形態におけるメモリ診断のタイミングチャートの一例において、第1コア11、第2コア12は、空き時間(T3)にメモリ診断の処理を行う。
具体的には、プロセッサ1は、図16に示すバックグランド処理のフローの処理を行う。なお、図15は、図8と同様のタイミングチャートであるが、バックグランド処理が追加されている。
In the example of the timing chart of the memory diagnosis in the sixth embodiment shown in FIG. 15, the first core 11 and the second core 12 perform the memory diagnosis process in the free time (T3).
Specifically, the processor 1 performs the processing of the background processing flow shown in FIG. FIG. 15 is a timing chart similar to that of FIG. 8, but background processing is added.

ステップS301:プロセッサ1は、ROM2を分割したブロックのメモリの領域Xを診断する。
ステップS302:プロセッサ1は、ROM2における当該対象のメモリの全領域について診断が終了したか否かを判定する。診断が終了していない場合(ステップS302:No)、後述するステップS305に移行する。一方、診断が終了した場合(ステップS302:Yes)、ステップS303の処理に移行する。
ステップS303:プロセッサ1は、各領域の診断済みの情報を消去する。
ステップS304:プロセッサ1は、カウンタXの初期化を行う。そして、図16に示すフローの処理を終了する。そして、プロセッサ1は、再度バックグランドの処理の実行時に、図16に示すフローの処理を開始する。つまり、図16のフローの処理は、終了の指示がない限り、常に繰り返されて実行される。
ステップS305:プロセッサ1は、カウンタXの更新処理を行う。
ステップS306:プロセッサ1は、領域Xが末診断であるか否かを判定する。領域Xが診断済みである場合(ステップS306:No)、ステップS302の処理に戻る。一方、領域Xが末診断の場合(ステップS306:Yes)、図16に示すフローの処理を終了する。そして、プロセッサ1は、再度バックグランドの処理の実行時に、図16に示すフローの処理を開始する。
以上より、第6実施形態では、空き時間にバックグランド処理にてメモリ診断を行うことにより、メモリ診断の効率化を実現できる。
Step S301: The processor 1 diagnoses the memory area X of the block into which the ROM 2 is divided.
Step S302: The processor 1 determines whether or not diagnosis has been completed for all areas of the target memory in the ROM 2. When the diagnosis is not completed (step S302: No), the process proceeds to step S305 described later. On the other hand, when the diagnosis is completed (step S302: Yes), the process proceeds to step S303.
Step S303: The processor 1 deletes the diagnosed information in each area.
Step S304: The processor 1 initializes the counter X. Then, the process of the flow shown in FIG. 16 ends. Then, the processor 1 starts the processing of the flow shown in FIG. 16 again when the background processing is executed. That is, the process of the flow in FIG. 16 is always repeated and executed unless an end instruction is given.
Step S305: The processor 1 performs update processing of the counter X.
Step S306: The processor 1 determines whether or not the region X is a final diagnosis. When the region X has been diagnosed (step S306: No), the process returns to step S302. On the other hand, when the region X is a final diagnosis (step S306: Yes), the processing of the flow shown in FIG. Then, the processor 1 starts the processing of the flow shown in FIG. 16 again when the background processing is executed.
As described above, in the sixth embodiment, the efficiency of memory diagnosis can be realized by performing memory diagnosis by background processing in the idle time.

[第7実施形態]
第7実施形態では、複数コアにより、相互にメモリ診断を行う。例えば、第1コア11によるメモリ診断の結果が異常であった場合には、その異常を診断した第1コア11とは異なる第2コア12が、異常と診断されたメモリの領域に対してメモリ診断を再度行う。
[Seventh embodiment]
In the seventh embodiment, memory diagnosis is performed mutually by a plurality of cores. For example, if the result of the memory diagnosis by the first core 11 is abnormal, the second core 12 different from the first core 11 that has diagnosed the abnormality is stored in the memory area diagnosed as abnormal. Perform the diagnosis again.

また、図1において、第1コア11が第2コア用領域22のメモリ診断を行い、第2コア12が第1コア用領域21のメモリ診断を行うようにしてもよい。また、第7実施形態では、各コアが使用するROM2の領域について、そのROM2の領域を使用しない他のコアがメモリ診断を行えればよい。   Further, in FIG. 1, the first core 11 may perform memory diagnosis of the second core area 22, and the second core 12 may perform memory diagnosis of the first core area 21. In the seventh embodiment, for the ROM2 area used by each core, other cores that do not use the ROM2 area may perform memory diagnosis.

以上より、第7実施形態によれば、例えば、第1コア11の方に異常が発生した場合、第2コア12が第1コア用領域21のメモリ診断することで、正常であれば、第1コア11の方に異常が発生したことがわかる。したがって、異常が発生した第1コア11が、その領域を正常と誤診断することを防ぐことができるので、メモリ診断の効率化を実現できる。なお、図1において、第1コア11、第2コア12がそれぞれ、第1コア用領域21及び第2コア領域22についてクロスチェックを行うようにしてもよい。これにより、メモリ診断の精度を向上させることができる。   As described above, according to the seventh embodiment, for example, when an abnormality occurs in the first core 11, the second core 12 performs the memory diagnosis of the first core area 21. It can be seen that an abnormality occurred in one core 11. Therefore, it is possible to prevent the first core 11 in which an abnormality has occurred from erroneously diagnosing the area as normal, so that it is possible to improve the efficiency of memory diagnosis. In FIG. 1, the first core 11 and the second core 12 may perform a cross check on the first core region 21 and the second core region 22, respectively. Thereby, the accuracy of memory diagnosis can be improved.

[第8実施形態]
第8実施形態では、メモリ診断に関して、RAM3で行う。第8実施形態におけるメモリ診断の処理の一例において、図17に示す第1コア11と第2コア12とは、RAM3のメモリ診断の領域を例えば均等に2つに分割して、それぞれ、メモリ診断を行う。具体的には、第1コア11は、第1RAM領域31をメモリ診断し、第2コア12は、第2RAM領域32をメモリ診断する。この際、第1コア11と第2コア12とは、上記実施形態の何れかのメモリ診断方法を適宜適用することができる。
[Eighth embodiment]
In the eighth embodiment, the memory diagnosis is performed by the RAM 3. In an example of the memory diagnosis process in the eighth embodiment, the first core 11 and the second core 12 shown in FIG. 17 divide the memory diagnosis area of the RAM 3 into two equally, for example. I do. Specifically, the first core 11 performs memory diagnosis on the first RAM area 31, and the second core 12 performs memory diagnosis on the second RAM area 32. At this time, the first core 11 and the second core 12 can appropriately apply the memory diagnostic method of any of the above embodiments.

なお、第1コア11と第2コア12とは、RAM診断の一例として、検査値を読み込んでから読み出して比較するベリファイ方式で行う。図17から明らかなように、各コアが分担して診断すれば、全領域の診断終了までの時間が短縮できる。さらに、第8実施形態では、上述したROM2のメモリ診断と同様、メモリ診断する領域の分担比率を変えることにより、効率的に診断できる。また、第8実施形態では、デュアルコアを例示しているが、これに限定されず、他のマルチコアの構成であってもよい。
以上より、第8実施形態によれば、RAM3のメモリ診断においても、上述したROM2のメモリ診断と同様の効果が得られる。
In addition, the 1st core 11 and the 2nd core 12 are performed by the verification system which reads and compares a test value as an example of RAM diagnosis. As can be seen from FIG. 17, if the diagnosis is shared by each core, the time until the diagnosis of the entire region can be shortened. Furthermore, in the eighth embodiment, similar to the memory diagnosis of the ROM 2 described above, the diagnosis can be performed efficiently by changing the share ratio of the area to be subjected to the memory diagnosis. In the eighth embodiment, a dual core is exemplified, but the present invention is not limited to this, and other multi-core configurations may be used.
As described above, according to the eighth embodiment, the same effect as the memory diagnosis of the ROM 2 described above can be obtained in the memory diagnosis of the RAM 3.

1…プロセッサ
11…第1コア
12…第2コア
2…ROM
21…第1コア用領域
22…第2コア用領域
3…RAM
4…バス
100…電子制御装置
DESCRIPTION OF SYMBOLS 1 ... Processor 11 ... 1st core 12 ... 2nd core 2 ... ROM
21 ... First core area 22 ... Second core area 3 ... RAM
4 ... Bus 100 ... Electronic control device

Claims (3)

複数の演算装置と、データを記憶するメモリとを含む電子制御装置であって、
各々の前記演算装置は、前記メモリを複数の領域に分割して所定のメモリ診断をする際、複数の定周期のジョブの実行中に何れかのジョブの中で各々の前記演算装置の処理能力に基づいて割り振られた前記メモリの領域を、個別に診断し、
前記メモリ診断の結果が異常であった場合には、該異常を診断した演算装置とは異なる他の演算装置が、前記異常と診断されたメモリの領域に対して前記メモリ診断を再度行うことを特徴とする電子制御装置。
An electronic control unit including a plurality of arithmetic units and a memory for storing data,
When each of the arithmetic devices divides the memory into a plurality of areas and performs a predetermined memory diagnosis, the processing capability of each of the arithmetic devices in any job during the execution of a plurality of fixed-cycle jobs the region of the memory allocated on the basis of, diagnose individually,
When the result of the memory diagnosis is abnormal, another arithmetic device different from the arithmetic device that diagnosed the abnormality performs the memory diagnosis again on the memory area diagnosed as abnormal. Electronic control device characterized.
前記演算装置の前記処理能力は、前記演算装置の動作周波数と処理負荷との少なくとも一方である請求項1に記載の電子制御装置。   The electronic control device according to claim 1, wherein the processing capability of the arithmetic device is at least one of an operating frequency and a processing load of the arithmetic device. 電子制御装置の複数の演算装置が、メモリを複数の領域に分割して所定のメモリ診断をする際、複数の定周期のジョブの実行中に何れかのジョブの中で各々の前記演算装置の処理能力に基づいて割り振られた前記メモリの領域を、個別に診断し、
前記メモリ診断の結果が異常であった場合には、該異常を診断した演算装置とは異なる他の演算装置が、前記異常と診断されたメモリの領域に対して前記メモリ診断を再度行うことを特徴とするメモリ診断方法。
When a plurality of arithmetic units of the electronic control unit divide the memory into a plurality of areas and perform a predetermined memory diagnosis, during execution of a plurality of jobs with a fixed period, each of the arithmetic units Individually diagnosing the areas of the memory allocated based on processing power,
When the result of the memory diagnosis is abnormal, another arithmetic device different from the arithmetic device that diagnosed the abnormality performs the memory diagnosis again on the memory area diagnosed as abnormal. A memory diagnostic method.
JP2014058826A 2014-03-20 2014-03-20 Electronic control device and memory diagnostic method Active JP6243266B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014058826A JP6243266B2 (en) 2014-03-20 2014-03-20 Electronic control device and memory diagnostic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014058826A JP6243266B2 (en) 2014-03-20 2014-03-20 Electronic control device and memory diagnostic method

Publications (2)

Publication Number Publication Date
JP2015184796A JP2015184796A (en) 2015-10-22
JP6243266B2 true JP6243266B2 (en) 2017-12-06

Family

ID=54351288

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014058826A Active JP6243266B2 (en) 2014-03-20 2014-03-20 Electronic control device and memory diagnostic method

Country Status (1)

Country Link
JP (1) JP6243266B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017097633A (en) 2015-11-25 2017-06-01 日立オートモティブシステムズ株式会社 Vehicle controller
CN109976937A (en) * 2019-01-30 2019-07-05 浙江中控技术股份有限公司 A kind of diagnostic method and system of multicore shared resource
JP7259666B2 (en) * 2019-09-17 2023-04-18 株式会社デンソー In-vehicle control device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6258354A (en) * 1985-09-09 1987-03-14 Nec Corp Test method for main memory
JPH04256033A (en) * 1991-02-07 1992-09-10 Nec Corp Memory diagnostic system
JP2004227488A (en) * 2003-01-27 2004-08-12 Denso Corp Electronic equipment
JP2009211543A (en) * 2008-03-05 2009-09-17 Toshiba Corp Information processing apparatus, inspection method, inspection program and inspection system

Also Published As

Publication number Publication date
JP2015184796A (en) 2015-10-22

Similar Documents

Publication Publication Date Title
CN107077407B (en) Vehicle control device
CN106569891B (en) Method and device for scheduling and executing tasks in storage system
CN108351840B (en) Vehicle control device
JP5994679B2 (en) Processing device and control method of processing device
JP6243266B2 (en) Electronic control device and memory diagnostic method
CN104718531A (en) Parallel computing device
CN106339458B (en) Stage partitioning method and terminal based on elastic distributed data set
CN116257345B (en) Deep learning task scheduling method and device
US20090113439A1 (en) Method and Apparatus for Processing Data
WO2020121840A1 (en) Arithmetic control device
JP2007504987A (en) Energy management method
JP5533789B2 (en) In-vehicle electronic control unit
JP6654230B2 (en) Vehicle control device
JP2011008702A (en) Fault processor
JP6365387B2 (en) Electronic control unit
CN116521266A (en) Management method and device for vehicle-mounted application starting configuration, vehicle and storage medium
US11640321B2 (en) Method and apparatus for memory allocation in a multi-core processor system, and recording medium therefor
JP7204443B2 (en) VEHICLE CONTROL DEVICE AND PROGRAM EXECUTION METHOD
JP5561241B2 (en) Microcomputer
JP6168847B2 (en) Multi-core system
CN113302592A (en) Method for controlling an engine control unit having a multi-core processor
JP6762411B2 (en) Electronic control unit for automobiles
JP2012226409A (en) Multi-core processor
US20220197686A1 (en) Information processing device, control method, non-transitory storage medium, and vehicle
EP4369182A1 (en) Ota upgrade method and apparatus, electronic device, medium, and vehicle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160913

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170523

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170724

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170808

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171006

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171109

R150 Certificate of patent or registration of utility model

Ref document number: 6243266

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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