JP5594416B1 - Electronic control unit - Google Patents

Electronic control unit Download PDF

Info

Publication number
JP5594416B1
JP5594416B1 JP2013187517A JP2013187517A JP5594416B1 JP 5594416 B1 JP5594416 B1 JP 5594416B1 JP 2013187517 A JP2013187517 A JP 2013187517A JP 2013187517 A JP2013187517 A JP 2013187517A JP 5594416 B1 JP5594416 B1 JP 5594416B1
Authority
JP
Japan
Prior art keywords
time
task
partition
cycle
length
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
JP2013187517A
Other languages
Japanese (ja)
Other versions
JP2015054550A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2013187517A priority Critical patent/JP5594416B1/en
Application granted granted Critical
Publication of JP5594416B1 publication Critical patent/JP5594416B1/en
Publication of JP2015054550A publication Critical patent/JP2015054550A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】 この発明は、タスクの実行時間が変化する場合に、時間パーティションの長さをタスクの実行時間に対応して設定し、時間パーティション内の空き時間を減らすことを目的とする。
【解決手段】 本発明に係る電子制御装置201は、非安全関連アプリケーションプログラム210と、安全関連アプリケーションプログラム211、212との、両アプリケーションプログラムに含まれる各タスクの実行に割り当てられる時間パーティションをアプリケーションプログラム毎に設定するOS213が、記憶部206に格納されたタスク実行時間決定情報208に基づき、タスクの実行時間に対応した時間パーティションの長さを導出する変換部214により導出された時間パーティションの長さに従って、アプリケーションプログラムに時間パーティションを設定するものである。
【選択図】 図1
PROBLEM TO BE SOLVED: To reduce the free time in a time partition by setting the length of the time partition corresponding to the task execution time when the task execution time changes.
An electronic control unit 201 according to the present invention uses a time partition allocated to the execution of each task included in both application programs of a non-safety-related application program 210 and safety-related application programs 211 and 212 as an application program. The time partition length derived by the conversion unit 214 that the OS 213 set for each time derives the length of the time partition corresponding to the task execution time based on the task execution time determination information 208 stored in the storage unit 206. To set the time partition in the application program.
[Selection] Figure 1

Description

本発明は、時間パーティションを用いて、アプリケーションプログラムに含まれるタスクの実行を制御する電子制御装置に関する。   The present invention relates to an electronic control device that controls execution of a task included in an application program using a time partition.

自動車や船舶には、エンジンの点火時期やステアリングモータの制御を行うための電子制御装置(Electronic Control Unit:以下、ECU)が搭載されている。制御の高度化に伴い、ECUに実装されるアプリケーションソフトウェア(以下、アプリケーションS/W)の複雑化が進んでいる。さらに近年、ECUの機能安全規格ISO26262への対応が求められるようになってきている。機能安全規格ISO26262は、何らかの異常が発生した場合にも、安全を確保するための機能を備え、安全性を確保することを目的として定められたものである。   An automobile or a ship is equipped with an electronic control unit (hereinafter referred to as ECU) for controlling the ignition timing of the engine and the steering motor. With the advancement of control, application software (hereinafter referred to as application S / W) implemented in the ECU is becoming more complicated. In recent years, it has been demanded that the ECU conform to the functional safety standard ISO26262. The functional safety standard ISO 26262 has a function for ensuring safety even when some abnormality occurs, and is defined for the purpose of ensuring safety.

従来、ECUの複雑なアプリケーションS/Wを、機能安全規格を満たしながら効率よく開発するために、アプリケーションS/Wを、安全関連S/Wコンポーネントと、非安全関連S/Wコンポーネントの2種類のS/Wコンポーネントに分ける方法がある。
安全関連S/Wコンポーネントとは、機能安全規格が求める手法を実装した安全監視や安全制御を行うS/W部分のことである。さらに安全関連S/Wコンポーネントは、安全要求に応じて異なる安全度水準を持つ複数のS/Wコンポーネントに分割される場合もある。一方、非安全関連S/Wコンポーネントとは、自動車や船舶の通常制御を行うS/W部分のことである。
Conventionally, in order to efficiently develop a complex application S / W of an ECU while satisfying the functional safety standard, the application S / W is divided into two types of safety-related S / W components and non-safety-related S / W components. There is a method of dividing into S / W components.
The safety-related S / W component is an S / W portion that performs safety monitoring and safety control in which a method required by the functional safety standard is implemented. Further, the safety-related S / W component may be divided into a plurality of S / W components having different safety levels according to safety requirements. On the other hand, the non-safety-related S / W component is an S / W portion that performs normal control of automobiles and ships.

このように各S/Wコンポーネントを分けて、互いの独立性を保証することにより、通常制御を行うS/Wコンポーネントを機能安全規格の適用対象から除外した非安全関連S/Wコンポーネントとし、既存のS/Wを流用することができる。また、安全関連S/Wコンポーネントを安全度水準毎に分割することによって、各S/Wコンポーネントに、各安全度水準に適した安全手法を適用することができる。このように、S/Wコンポーネントをその内容に応じて分けることによって、S/Wコンポーネントを効率良く開発することができる。   By separating each S / W component in this way and ensuring its independence, the S / W component that performs normal control is defined as a non-safety-related S / W component that is excluded from the application of functional safety standards. S / W can be diverted. Further, by dividing the safety-related S / W component for each safety level, a safety technique suitable for each safety level can be applied to each S / W component. In this way, the S / W component can be efficiently developed by dividing the S / W component according to its contents.

同一マイクロコントローラ上に複数のS/Wコンポーネントを実装する場合、実行時間を複数に区切る時間パーティションと実行領域を複数に区切る空間パーティションを用いることで、これらS/Wコンポーネント間の独立性を保証することができる。ここでは、時間パーティションを用いたS/Wコンポーネント間の独立について図13を用いて説明する。図13は、背景技術にかかる、S/Wコンポーネントのタスクに対する時間パーティションの割り当てを示すタイムチャートである。この時間パーティションには、各S/Wコンポーネントにおける実行単位である、タスクが割り当てられる。タスクは、1つのS/Wコンポーネントに1つ以上存在し、異なるS/Wコンポーネントのタスクは異なる時間パーティションに割り当てる必要がある。同じS/Wコンポーネントのタスクは、複数の時間パーティションへ割り当ててもよい。   When a plurality of S / W components are mounted on the same microcontroller, independence between these S / W components is ensured by using a time partition that divides the execution time into a plurality of times and a spatial partition that divides the execution region into a plurality of areas. be able to. Here, independence between S / W components using a time partition will be described with reference to FIG. FIG. 13 is a time chart showing allocation of time partitions to S / W component tasks according to the background art. A task, which is an execution unit in each S / W component, is assigned to this time partition. One or more tasks exist in one S / W component, and tasks of different S / W components need to be assigned to different time partitions. Tasks with the same S / W component may be assigned to multiple time partitions.

図13では、非安全関連S/Wコンポーネントのタスクaとタスクb、安全関連S/Wコンポーネント1のタスクc、別の安全関連S/Wコンポーネント2のタスクdが、それぞれ時間パーティション1〜3に割り当てられている。
それぞれの時間パーティションには、開始時間と終了時間が設定され、その間の時間内においてのみ、時間パーティション内に割り当てられたタスクは実行される。これにより、例えば非安全関連S/Wコンポーネントのタスクbを実行中にエラーが発生し、タスクbが暴走しても、時間パーティションの区切りでハードウェアの機能を利用して強制的にタスクbの動作を終了させることができ、時間パーティション2や時間パーティション3に割り当てられた安全関連S/Wコンポーネントのタスクcやタスクdの動作に影響しないことを保証できる。よって各タスクがCPUの処理時間において混在することがなく、各S/Wコンポーネントが独立しているといえる。
In FIG. 13, task a and task b of the non-safety-related S / W component, task c of the safety-related S / W component 1, and task d of another safety-related S / W component 2 are assigned to time partitions 1 to 3, respectively. Assigned.
Each time partition is set with a start time and an end time, and tasks assigned in the time partition are executed only within the time between them. As a result, for example, even if an error occurs during execution of task b of the non-safety-related S / W component and task b runs away, the task b is forced to use the hardware function at the time partition break. The operation can be terminated, and it can be ensured that the operations of the task c and task d of the safety-related S / W component assigned to the time partition 2 and the time partition 3 are not affected. Therefore, it can be said that the tasks are not mixed in the processing time of the CPU, and each S / W component is independent.

時間パーティションを用いたタスクの実行を制御する方法として、例えば特許文献1では、固定長の安全関連時間パーティションと固定長の非安全関連時間パーティションから構成される通常制御スケジュールを、一定周期のサイクルで繰り返す方法が提案されている。各時間パーティションの長さは、正常時にはタスクの実行を確実に完了できるように、タスクの最悪実行時間以上に設定しておく必要があり、いずれのサイクルにおいてもその必要があるため、時間パーティションに設定される各サイクル共通の固定長は必然的に長くなってしまう。そのため、最悪実行時間までかからずにタスクが完了した場合は、時間パーティション内に不要な空き時間が生じてしまう。空き時間とは、時間パーティション内において、タスクの実行が完了してからその時間パーティションの終了時間までの、プロセッサが実行するタスクが他に存在しない時間のことを言う。
異常が検知された場合に通常制御スケジュールから安全制御スケジュールに切り替わることで、1サイクルにおける時間パーティションの編成が変更されるが、通常制御スケジュール時と同様に、時間パーティションの固定長は、全サイクルにおけるタスクの最悪実行時間のうち最も長い時間に合わせて設定されるため、時間パーティション内に不要な空き時間が生じることがあることに変わりはない。(特許文献1の図5参照)
As a method for controlling the execution of a task using a time partition, for example, in Patent Document 1, a normal control schedule composed of a fixed-length safety-related time partition and a fixed-length non-safety-related time partition is set to a constant cycle. A method of repeating has been proposed. The length of each time partition must be set to be equal to or greater than the worst execution time of the task to ensure that the task execution can be completed normally. The fixed length common to each set cycle inevitably increases. Therefore, when a task is completed without taking the worst execution time, unnecessary free time is generated in the time partition. Free time refers to the time in the time partition from the completion of task execution to the end time of the time partition when no other task is executed by the processor.
By switching from the normal control schedule to the safety control schedule when an abnormality is detected, the organization of the time partition in one cycle is changed. As with the normal control schedule, the fixed length of the time partition is Since it is set in accordance with the longest time of the worst execution time of the task, unnecessary free time may be generated in the time partition. (See FIG. 5 of Patent Document 1)

そこで、特許文献2では、各時間パーティションの長さは固定長であるものの、同一時間パーティション内に同一S/Wコンポーネントに属する複数のタスクを割り当てることによって、1つのタスクが終了しても、同一時間パーティション内で別のタスクを実行するようにし、この時間パーティションの空き時間を減らす方法が提案されている。(特許文献2の図15参照)   Therefore, in Patent Document 2, although the length of each time partition is fixed, even if one task is completed by assigning a plurality of tasks belonging to the same S / W component in the same time partition, the same time partition is used. A method has been proposed in which another task is executed in the time partition and the free time of the time partition is reduced. (See FIG. 15 of Patent Document 2)

特開2010−271759号公報JP 2010-271759 A 特許第5136695号公報Japanese Patent No. 5136695

上記の特許文献1、2のようなECUの制御では、周期的に実行されるタスクのサイクル番号や、車両の状態を示す入力情報や、以前の演算結果などによって、タスクの実行時間が変化する場合がある。
例えばECU起動直後において、他のECUは自身の起動を完了するまでは情報を送信しないため、他のECUからの情報を用いて演算するタスクはすぐに演算処理を終了することで実行時間が短くなったり、逆に初期化処理などを行うために実行時間が長くなったりする。また、例えば電波を送信して前方車両を検出することを目的として、様々な周波数を送信するようなレーダECUでは、偶数サイクルと奇数サイクルで異なる周波数を用いるために実行時間が変化する場合がある。特許文献1はこの変化に対応できず、その解決策として特許文献2が提案されていた。
In the control of the ECU as in the above Patent Documents 1 and 2, the task execution time varies depending on the cycle number of the periodically executed task, the input information indicating the state of the vehicle, the previous calculation result, and the like. There is a case.
For example, immediately after the ECU is started, other ECUs do not transmit information until their own startup is completed. Therefore, a task that is calculated using information from other ECUs immediately ends the calculation process, thereby shortening the execution time. Or, on the contrary, the execution time becomes longer due to initialization processing. For example, a radar ECU that transmits various frequencies for the purpose of detecting a vehicle ahead by transmitting radio waves may change the execution time because different frequencies are used in even cycles and odd cycles. . Patent Document 1 cannot cope with this change, and Patent Document 2 has been proposed as a solution.

しかし、ある時間パーティションに割り当てられるタスクが1つしかなく、このタスクの実行時間が前述のように変化する場合においては、同一時間パーティション内に複数のタスクを必要とする特許文献2の方法は適用できず、空き時間を減らすことはできない。
また、ある時間パーティションに割り当てられたタスクが複数あり、それらタスクの実行時間の総和が変化する場合に特許文献2の方法を適用しても、時間パーティションの長さが充分長く設定されていた場合、時間パーティション内のすべてのタスクを実行してもなお、空き時間が生じる恐れがある。
いずれにおいても、タスクの実行時間が変化する一方で、時間パーティションが固定長であるため、時間パーティション内の不要な空き時間が生じるという問題がある。
However, when there is only one task assigned to a certain time partition and the execution time of this task changes as described above, the method of Patent Document 2 that requires a plurality of tasks in the same time partition is applied. You can't reduce your free time.
Also, when there are multiple tasks assigned to a certain time partition and the total time of those tasks changes, even if the method of Patent Document 2 is applied, the time partition length is set sufficiently long Running all the tasks in the time partition can still cause free time.
In any case, there is a problem that unnecessary execution time in the time partition is generated because the time partition has a fixed length while the task execution time changes.

本発明は、上記の課題を解決するためになされたものであり、タスクの実行時間が変化する場合に、周期的に実行されるタスクのサイクル番号や、車両の状態を示す入力情報、以前の演算結果などのタスクの実行時間が決まるための情報に基づき、時間パーティションの長さをタスクの実行時間に対応して設定することにより、時間パーティション内の空き時間を減らすことを目的としている。   The present invention has been made to solve the above problems, and when the execution time of the task changes, the cycle number of the task that is periodically executed, the input information indicating the state of the vehicle, the previous The purpose is to reduce the free time in the time partition by setting the length of the time partition corresponding to the execution time of the task based on information for determining the execution time of the task such as the calculation result.

本発明に係る電子制御装置は、演算処理手段と、通常時における制御対象の制御の実行に関連する非安全関連アプリケーションプログラムと、制御対象の異常監視又は異常時における制御対象の制御の実行に関連する安全関連アプリケーションプログラムの、少なくとも2種のアプリケーションプログラムと、アプリケーションプログラムに含まれるタスクの実行に割り当てられる時間パーティションをアプリケーションプログラム毎に設定するシステムプログラムと、タスクの実行時間が決まるためのタスク実行時間決定情報が格納される記憶部と、タスク実行時間決定情報に基づき、タスクの実行時間に対応した時間パーティションの長さを導出する変換部と、を備え、システムプログラムは、変換部により導出された時間パーティションの長さに従ってアプリケーションプログラムに時間パーティションを設定し、演算処理手段は、システムプログラムに設定された時間パーティションに従ってタスクを実行するものである。   The electronic control device according to the present invention relates to arithmetic processing means, a non-safety related application program related to execution of control of the control target at normal time, and monitoring of control target abnormality or execution of control of control target at the time of abnormality At least two types of safety-related application programs to be executed, a system program for setting a time partition allocated for execution of tasks included in the application program for each application program, and task execution time for determining task execution time A storage unit that stores the determination information; and a conversion unit that derives the length of the time partition corresponding to the task execution time based on the task execution time determination information. The system program is derived by the conversion unit Time party The set time partition to the application program according to the length, the processing means is for performing a task according to the configured time partition system program.

本発明に係る電子制御装置によれば、タスクの実行時間が変化する場合に、周期的に実行されるタスクのサイクル番号や、車両の状態を示す入力情報、以前の演算結果などのタスクの実行時間が決まるための情報に基づき、時間パーティションの長さをタスクの実行時間に対応して設定することにより、時間パーティション内の空き時間を減らすことができる。   According to the electronic control device of the present invention, when the execution time of the task changes, the execution of the task such as the cycle number of the periodically executed task, the input information indicating the state of the vehicle, the previous calculation result, etc. By setting the length of the time partition corresponding to the task execution time based on the information for determining the time, the free time in the time partition can be reduced.

本発明の実施の形態1に係るレーダECUの構成図である。1 is a configuration diagram of a radar ECU according to a first embodiment of the present invention. サイクル番号情報に基づく時間パーティションの長さを示す変換テーブルAである。It is the conversion table A which shows the length of the time partition based on cycle number information. 本発明の実施の形態1に係る、時間パーティションの割り当てを示す基本タイムチャートである。It is a basic time chart which shows the allocation of the time partition based on Embodiment 1 of this invention. 参考例に係る、時間パーティションの割り当てを示すタイムチャートである。It is a time chart which shows allocation of the time partition based on a reference example. 本発明の実施の形態1に係る、時間パーティションの割り当てを示すエラー発生時タイムチャートである。It is a time chart at the time of the error generation which shows allocation of the time partition based on Embodiment 1 of this invention. 参考例に係る、時間パーティションの割り当てを示すエラー発生時タイムチャートである。It is a time chart at the time of error occurrence which shows allocation of a time partition concerning a reference example. 本発明の実施の形態2に係るレーダECUの構成図である。It is a block diagram of radar ECU which concerns on Embodiment 2 of this invention. スリープフラグがセットされている場合の、信号処理プログラムにおける時間パーティションの長さを示す変換テーブルBである。It is the conversion table B which shows the length of the time partition in a signal processing program when a sleep flag is set. データ数減少フラグがセットされている場合の、信号処理プログラムにおけるサイクル番号情報が奇数時の時間パーティションの長さを示す変換テーブルCである。It is a conversion table C showing the length of the time partition when the cycle number information in the signal processing program is an odd number when the data number reduction flag is set. 実施の形態2に係る、信号処理プログラムのタスクに割り当てられる時間パーティションの長さを設定するOSの動作を示すフローチャートである。10 is a flowchart showing the operation of the OS for setting the length of the time partition allocated to the task of the signal processing program according to the second embodiment. スリープフラグセット時の、時間パーティションの割り当てを示すタイムチャートである。It is a time chart which shows allocation of a time partition at the time of a sleep flag setting. データ数減少フラグセット時の、時間パーティションの割り当てを示すタイムチャートである。It is a time chart which shows allocation of a time partition at the time of a data number reduction flag set. 背景技術にかかる、S/Wコンポーネントのタスクに対する時間パーティションの割り当てを示すタイムチャートである。It is a time chart which shows allocation of the time partition with respect to the task of S / W component concerning background art.

以下、本発明の実施の形態について図面を参照しながら説明する。なお、図中における同等または対応する要素については同番号を付す。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the same number is attached | subjected about the equivalent or corresponding element in a figure.

実施の形態1.
以下に、本発明の実施の形態1に係る車載のレーダECU201について説明する。レーダECU201は、電波を送受信し、送受信した電波の周波数の差から、前方車両を検出し、自車との距離や相対速度を算出する機能を備える。ここでは電子制御装置として車載のレーダECU201を採用したが、これに限らず、船舶や飛行機、ロボット等の各種電子制御装置を採用できる。
Embodiment 1 FIG.
The on-vehicle radar ECU 201 according to Embodiment 1 of the present invention will be described below. The radar ECU 201 has a function of transmitting / receiving radio waves, detecting a preceding vehicle from a difference in frequency of the transmitted / received radio waves, and calculating a distance and a relative speed from the own vehicle. Here, the in-vehicle radar ECU 201 is employed as the electronic control device, but the present invention is not limited to this, and various electronic control devices such as a ship, an airplane, and a robot can be employed.

図1は本発明の実施の形態1に係るレーダECUの構成図である。レーダECU201は、演算処理を行うプロセッサ202、送信アンテナ203と受信アンテナ204、送信アンテナ203と受信アンテナ204を制御する送受信ドライバ205、読み込みと書き込みが可能な揮発メモリ(以下、RAM) 206、読み込み専用の不揮発メモリ(以下、ROM)207を備える。   FIG. 1 is a configuration diagram of a radar ECU according to Embodiment 1 of the present invention. The radar ECU 201 includes a processor 202 that performs arithmetic processing, a transmission antenna 203 and a reception antenna 204, a transmission / reception driver 205 that controls the transmission antenna 203 and the reception antenna 204, a volatile memory (hereinafter referred to as RAM) 206 that can be read and written, and a read-only Non-volatile memory (hereinafter referred to as ROM) 207.

プロセッサ202は、ROM207に格納されたアプリケーションプログラムを実行する。送信アンテナ203と受信アンテナ204は、電波の送受信を行う。送受信ドライバ205は、プロセッサ202でのアプリケーションプログラムの実行によって設定される電波の送信タイミングや送信周波数に従って、送信アンテナ203から電波を送信し、受信アンテナ204から受信した電波の周波数(測定データ)をRAM206へ格納する。RAM206には、サイクル番号情報208と、送受信ドライバ205からの測定データ209が格納される。ROM207には、信号処理プログラム210、安全監視プログラム211、ECU管理プログラム212、オペレーティングシステムプログラム(OS)213、変換テーブルA214、が格納されている。   The processor 202 executes an application program stored in the ROM 207. The transmission antenna 203 and the reception antenna 204 transmit and receive radio waves. The transmission / reception driver 205 transmits a radio wave from the transmission antenna 203 according to the transmission timing and transmission frequency of the radio wave set by the execution of the application program in the processor 202, and stores the frequency (measurement data) of the radio wave received from the reception antenna 204 in the RAM 206. To store. The RAM 206 stores cycle number information 208 and measurement data 209 from the transmission / reception driver 205. The ROM 207 stores a signal processing program 210, a safety monitoring program 211, an ECU management program 212, an operating system program (OS) 213, and a conversion table A214.

ここで、プロセッサ202、RAM206はそれぞれ特許請求の範囲に記載の、演算処理手段、記憶部に相当する。ROM207に格納される信号処理プログラム210、安全監視プログラム211およびECU管理プログラム212はいずれもアプリケーションプログラムの1つであり、OS213はシステムプログラムである。   Here, the processor 202 and the RAM 206 correspond to an arithmetic processing unit and a storage unit described in the claims. The signal processing program 210, the safety monitoring program 211, and the ECU management program 212 stored in the ROM 207 are all application programs, and the OS 213 is a system program.

信号処理プログラム210は、送信アンテナ203からの電波の送信タイミングを設定したり、受信アンテナ204を用いて取得した測定データ209を基に、前方車両と自車との距離や相対速度を演算したりするアプリケーションプログラムであり、通常時における制御対象の制御の実行に関連する非安全関連アプリケーションプログラムである。
信号処理プログラム210のタスクは、定期的に測定と演算を行うために、一定周期で実行開始する必要がある。また、送信アンテナ203から送信する電波の周波数帯域は、偶数サイクルと奇数サイクルで異なるように設定するものとする。
The signal processing program 210 sets the transmission timing of the radio wave from the transmission antenna 203, calculates the distance and relative speed between the vehicle ahead and the own vehicle based on the measurement data 209 acquired using the reception antenna 204. The application program is a non-safety related application program related to the execution of control of the control target in a normal time.
The task of the signal processing program 210 needs to be started at a constant cycle in order to perform measurement and calculation periodically. In addition, the frequency band of the radio wave transmitted from the transmission antenna 203 is set to be different between the even cycle and the odd cycle.

偶数サイクルでは、近距離の測定を目的とした周波数帯域の電波を送信し、奇数サイクルでは、遠距離(広範囲)の測定を目的とした周波数帯域の電波を送信する。さらに、近距離の測定結果の精度を上げるため、測定する周波数のサンプリング数を、遠距離よりも多くとる。したがって、サンプリング数が多い偶数サイクルでは、信号処理プログラム210におけるタスクの実行時間が奇数サイクルよりも長くなる。   In the even cycle, radio waves in a frequency band intended for short-distance measurement are transmitted, and in the odd cycle, radio waves in a frequency band intended for long-range (wide range) measurement are transmitted. Furthermore, in order to increase the accuracy of the measurement result at a short distance, the sampling frequency of the frequency to be measured is larger than that at a long distance. Therefore, in an even cycle with a large number of samplings, the task execution time in the signal processing program 210 is longer than in an odd cycle.

安全監視プログラム211は、送受信ドライバ205の動作状態や、信号処理プログラム210の実行を監視するアプリケーションプログラムであり、各サイクルで実行する必要がある。この安全監視プログラム211は、安全関連アプリケーションプログラムの1つである。   The safety monitoring program 211 is an application program that monitors the operation state of the transmission / reception driver 205 and the execution of the signal processing program 210 and needs to be executed in each cycle. The safety monitoring program 211 is one of safety-related application programs.

ECU管理プログラム212は、安全監視プログラム211の実行結果に基づき、レーダECU201をスリープさせたり、シャットダウンさせたりするアプリケーションプログラムである。ECU管理プログラム212は、2サイクルに1回、実行する必要がある。このECU管理プログラム212も、安全関連アプリケーションプログラムの1つである。   The ECU management program 212 is an application program that causes the radar ECU 201 to sleep or shut down based on the execution result of the safety monitoring program 211. The ECU management program 212 needs to be executed once every two cycles. This ECU management program 212 is also one of safety-related application programs.

ここでは説明を簡単にするために、プロセッサ202に実行される信号処理プログラム210、安全監視プログラム211、ECU管理プログラム212には、それぞれ1つのタスクが含まれているものとする。ただし、これらのアプリケーションプログラムにはそれぞれ複数のタスクが含まれることも当然ある。   Here, to simplify the description, it is assumed that the signal processing program 210, the safety monitoring program 211, and the ECU management program 212 executed by the processor 202 each include one task. Of course, each of these application programs may include a plurality of tasks.

OS213は、サイクル番号情報208を用いて変換テーブルA214を参照し、信号処理プログラム210、安全監視プログラム211、ECU管理プログラム212を割り当てる各時間パーティションの開始時間と終了時間を設定する。サイクル番号情報208は、OS213が、信号処理プログラム210の開始前に1ずつインクリメントするサイクルカウンタ(図示しない)によって情報が更新される。前述のように、信号処理プログラム210は一定周期で実行を開始する必要があり、安全監視プログラム211、ECU管理プログラム212の実行時間も考慮して、1サイクルは50ms周期とする。   The OS 213 refers to the conversion table A214 using the cycle number information 208, and sets the start time and end time of each time partition to which the signal processing program 210, the safety monitoring program 211, and the ECU management program 212 are assigned. The cycle number information 208 is updated by a cycle counter (not shown) that the OS 213 increments by one before the signal processing program 210 is started. As described above, it is necessary to start the signal processing program 210 at a constant cycle. Considering the execution time of the safety monitoring program 211 and the ECU management program 212, one cycle is set to 50 ms.

変換テーブルA214は、サイクル番号情報208に対して、信号処理プログラム210、安全監視プログラム211及びECU管理プログラム212における時間パーティションの長さの対応関係を示すものである。この変換テーブルA214を図2に示す。
サイクル番号情報208が偶数である場合、信号処理プログラム210のタスク、安全監視プログラム211のタスク、ECU管理プログラム212のタスクが割り当てられる時間パーティションの長さは、それぞれ、45ms、5ms、0msである。すなわち、ECU管理プログラム212は偶数サイクルでは実行されない。
一方、サイクル番号情報208が奇数である場合、信号処理プログラム210のタスク、安全監視プログラム211のタスク、ECU管理プログラム212のタスクが割り当てられる時間パーティションの長さは、それぞれ、40ms、5ms、5msである。
The conversion table A214 indicates the correspondence relationship between the lengths of the time partitions in the signal processing program 210, the safety monitoring program 211, and the ECU management program 212 with respect to the cycle number information 208. This conversion table A214 is shown in FIG.
When the cycle number information 208 is an even number, the lengths of the time partitions to which the signal processing program 210 task, the safety monitoring program 211 task, and the ECU management program 212 task are assigned are 45 ms, 5 ms, and 0 ms, respectively. That is, the ECU management program 212 is not executed in even cycles.
On the other hand, when the cycle number information 208 is an odd number, the lengths of the time partitions to which the task of the signal processing program 210, the task of the safety monitoring program 211, and the task of the ECU management program 212 are assigned are 40 ms, 5 ms, and 5 ms, respectively. is there.

前述の通り、信号処理プログラム210のタスクの実行時間は、偶数サイクルの方が奇数サイクルよりも長くなるため、時間パーティションの長さも、偶数サイクルでは奇数サイクルより5ms長く設定している。すなわちここでは、偶数サイクルにおける信号処理プログラム210の最悪実行時間に若干余裕を持たせて45ms、奇数サイクルにおけるそれを40msとしている。なお、これらの時間パーティションの長さは、各アプリケーションプログラム(信号処理プログラム210、安全監視プログラム211、ECU管理プログラム212)の処理ステップ数から見積もったり、実測したりして、あらかじめ設定されるものである。   As described above, since the task execution time of the signal processing program 210 is longer in the even cycle than in the odd cycle, the length of the time partition is set to 5 ms longer than the odd cycle in the even cycle. In other words, here, the worst execution time of the signal processing program 210 in the even cycle is given a margin of 45 ms, and that in the odd cycle is 40 ms. Note that the lengths of these time partitions are set in advance by estimating or actually measuring from the number of processing steps of each application program (signal processing program 210, safety monitoring program 211, ECU management program 212). is there.

時間パーティションの割り当て方法を、プロセッサ202が演算を処理する時間、すなわち演算処理時間を時間軸とした、図3のタイムチャートを用いて説明する。
例えばサイクル番号情報208が2のとき、サイクル番号情報208が偶数であるため、変換テーブルA214において、「信号処理プログラム210の時間パーティションの長さが45ms、安全監視プログラム211の時間パーティションの長さが5ms、ECU管理プログラム212には時間パーティションの割り当てなし」がOS213に参照される。OS213はこの情報に従って、演算処理時間が100ms〜150msの間に各アプリケーションプログラムの時間パーティションを割り当てる。プロセッサ202は、OS213が設定した時間パーティションに従って、100〜145msの間に信号処理プログラム210のタスクが、145ms〜150msの間に安全監視プログラム211のタスクが、それぞれ実行されるように、各タスクの起動と終了を行う。
A time partition allocation method will be described with reference to the time chart of FIG. 3, in which the time for which the processor 202 processes an operation, that is, the operation processing time is a time axis.
For example, when the cycle number information 208 is 2, since the cycle number information 208 is an even number, in the conversion table A214, “the length of the time partition of the signal processing program 210 is 45 ms, and the length of the time partition of the safety monitoring program 211 is The OS 213 refers to “5 ms, no time partition assigned to the ECU management program 212”. In accordance with this information, the OS 213 allocates a time partition for each application program during an arithmetic processing time of 100 ms to 150 ms. The processor 202 executes each task so that the task of the signal processing program 210 is executed during 100 to 145 ms and the task of the safety monitoring program 211 is executed during 145 to 150 ms according to the time partition set by the OS 213. Start and stop.

またサイクル番号情報208が3のとき、サイクル番号情報208が奇数であるため、変換テーブルA214において、「信号処理プログラム210の時間パーティションの長さが40ms、安全監視プログラム211とECU管理プログラム212の時間パーティションの長さがそれぞれ5ms」がOS213に参照される。OS213はこの情報に従って、演算処理時間が150ms〜200msの間に各アプリケーションプログラムの時間パーティションを割り当てる。プロセッサ202は、OS213が設定した時間パーティションに従って、150〜190msの間に信号処理プログラム210のタスクが、190ms〜195msの間に安全監視プログラム211のタスクが、195ms〜200msの間にECU管理プログラム212のタスクが、それぞれ実行されるように、各タスクの起動と終了を行う。   When the cycle number information 208 is 3, the cycle number information 208 is an odd number. Therefore, in the conversion table A214, “the time partition length of the signal processing program 210 is 40 ms, the times of the safety monitoring program 211 and the ECU management program 212 are The OS 213 refers to the partition length of 5 ms each. In accordance with this information, the OS 213 allocates a time partition for each application program during a computation processing time of 150 ms to 200 ms. According to the time partition set by the OS 213, the processor 202 performs the task of the signal processing program 210 during 150 to 190 ms, the task of the safety monitoring program 211 during 190 ms to 195 ms, and the ECU management program 212 during 195 ms to 200 ms. Each task is started and finished so that each task is executed.

OS213が上記時間パーティションを設定することにかかる実行時間は、図3のタイムチャートには明示していないが、各サイクルの境界において、次サイクルの各時間パーティションの開始時間と終了時間の設定を周期的に実行しているものである。ただし、この時間パーティションの設定は、例えば各時間パーティションの境界ごとに次の時間パーティションを設定するものでもよい。
なお、ここではOS213は絶対時間を参照して時間パーティションの開始時間と終了時間を設定しているが、サイクル開始時からの相対時間で設定するものであってもよい。
Although the execution time required for the OS 213 to set the time partition is not clearly shown in the time chart of FIG. 3, the start time and end time of each time partition of the next cycle are set at the cycle at the boundary of each cycle. Is what you are doing. However, this time partition may be set, for example, by setting the next time partition for each time partition boundary.
Here, the OS 213 sets the start time and end time of the time partition with reference to the absolute time, but may be set as a relative time from the start of the cycle.

時間パーティションを割り当てられた上で実行される、信号処理プログラム210のタスクの実行時間の例を図3の下部に示す。サイクル番号情報208が0、1、2、3でのタスクの実行時間は、それぞれ43ms、36ms、44ms、38msである。このようにタスクの実行時間はサイクル番号情報が偶数時に45ms以下、奇数時には40ms以下に決まるものである。このタスクの実行時間に対応して設定された各時間パーティションでの空き時間は、2ms、4ms、1ms、2msとなっている。ここで、各タスクは各時間パーティションの開始と同時に実行を開始している。   An example of the execution time of the task of the signal processing program 210 executed after the time partition is assigned is shown in the lower part of FIG. The task execution times when the cycle number information 208 is 0, 1, 2, 3 are 43 ms, 36 ms, 44 ms, and 38 ms, respectively. Thus, the task execution time is determined to be 45 ms or less when the cycle number information is an even number and 40 ms or less when the cycle number information is an odd number. The free time in each time partition set corresponding to the execution time of this task is 2 ms, 4 ms, 1 ms, and 2 ms. Here, each task starts executing simultaneously with the start of each time partition.

ここで参考例として、本発明を適用せず、特許文献1の制御にあるような、いずれのサイクルにおいても時間パーティションの長さが固定であった場合の、時間パーティションの割り当て方法のタイムチャートを図4に示す。本発明の構成との比較のため、信号処理プログラム210の各サイクルにおけるタスクの実行時間は図3と同じであるとする。信号処理プログラム210のタスクが割り当てられる時間パーティションの長さは、どのサイクルでもタスク実行完了できるよう、偶数サイクルにおける最悪実行時間にあわせて設定するため、45msとする。安全監視プログラム211とECU管理プログラム212のタスクが割り当てられる時間パーティションの長さは5msである。したがって、1サイクルの長さは55msとなる。   Here, as a reference example, a time chart of a time partition allocation method when the length of the time partition is fixed in any cycle as in the control of Patent Document 1 without applying the present invention. As shown in FIG. For comparison with the configuration of the present invention, it is assumed that the task execution time in each cycle of the signal processing program 210 is the same as in FIG. The length of the time partition to which the task of the signal processing program 210 is assigned is set to 45 ms in order to set it in accordance with the worst execution time in the even cycle so that the task execution can be completed in any cycle. The length of the time partition to which the tasks of the safety monitoring program 211 and the ECU management program 212 are assigned is 5 ms. Therefore, the length of one cycle is 55 ms.

その結果、信号処理プログラム210のタスクが実行される時間パーティションの空き時間は、2ms、9ms、1ms、7msとなっており、図3と比較すると、空き時間が増加してしまうことがわかる。さらに、ECU管理プログラム212のタスクは、2サイクルに1回実行すればよいため、いずれのサイクルにおいても時間パーティションが割り当てられているものの、偶数サイクルでは実行されない。そのため、この不必要に設けられた時間パーティションの長さ(擬似的空き時間)も追加すると、各サイクルでの空き時間と擬似的空き時間の総和は、7ms、9ms、6ms、7msとなり、図3と比較すると、サイクル番号情報208が0〜4での空き時間の総和に対して3倍以上(2+4+1+2=9ms、7+9+6+7=29ms)になり、プロセッサ202の使用効率が低下していることがわかる。   As a result, the free time of the time partition in which the task of the signal processing program 210 is executed is 2 ms, 9 ms, 1 ms, and 7 ms, and it can be seen that the free time increases as compared with FIG. Further, since the task of the ECU management program 212 only needs to be executed once every two cycles, a time partition is assigned in any cycle, but is not executed in an even cycle. Therefore, if the length of the unnecessary time partition (pseudo free time) is also added, the sum of the free time and the pseudo free time in each cycle becomes 7 ms, 9 ms, 6 ms, and 7 ms. As compared with the above, it can be seen that the cycle number information 208 is three times or more (2 + 4 + 1 + 2 = 9 ms, 7 + 9 + 6 + 7 = 29 ms) with respect to the total free time at 0 to 4, and the use efficiency of the processor 202 is reduced.

以上のように、この実施の形態1に記載された電子制御装置201は、演算処理手段202と、通常時における制御対象の制御の実行に関連する非安全関連アプリケーションプログラム210と、制御対象の異常監視又は異常時における制御対象の制御の実行に関連する安全関連アプリケーションプログラム211、212の、少なくとも2種のアプリケーションプログラムと、これらアプリケーションプログラムに含まれるタスクの実行に割り当てられる時間パーティションを、いずれのアプリケーションプログラムにも設定するシステムプログラム213と、タスクの実行時間が決まるためのタスク実行時間決定情報208が格納される記憶部206と、タスク実行時間決定情報208に基づき、タスクの実行時間に対応した時間パーティションの長さを導出する変換部214とを備える。ここで、システムプログラム213は、変換部214に導出された時間パーティションの長さに従ってアプリケーションプログラムに時間パーティションを設定するものであり、演算処理手段202は、システムプログラム213を実行することによって、時間パーティション内に割り当てられたタスクを実行するものである。
この構成により、アプリケーションプログラム(信号処理プログラム210、安全監視プログラム211、ECU管理プログラム212)間の独立性を保ちながら、各時間パーティション内の不要な空き時間を減らすことができる。
As described above, the electronic control device 201 described in the first embodiment includes the arithmetic processing unit 202, the non-safety related application program 210 related to the execution of the control target in the normal time, and the control target abnormality. At least two types of safety-related application programs 211 and 212 related to the execution of the control of the control target at the time of monitoring or abnormality, and the time partition allocated to the execution of the tasks included in these application programs, any application A system program 213 that is also set in the program, a storage unit 206 that stores task execution time determination information 208 for determining the task execution time, and a time corresponding to the task execution time based on the task execution time determination information 208 Parte And a conversion unit 214 to derive the length of Deployment. Here, the system program 213 sets the time partition in the application program according to the length of the time partition derived to the conversion unit 214, and the arithmetic processing unit 202 executes the system program 213 to thereby execute the time partition. The task assigned in is executed.
With this configuration, unnecessary free time in each time partition can be reduced while maintaining independence among application programs (signal processing program 210, safety monitoring program 211, and ECU management program 212).

以上の効果を有する構成に加えて、本発明では、演算処理手段202による演算処理時間の1サイクルには、複数の時間パーティションが含まれ、変換部214は、複数の時間パーティションの長さを導出する変換テーブルAからなっており、複数の時間パーティションのうち、少なくとも1つの時間パーティションについて、タスク実行時間決定情報208に基づき、タスクの実行時間に対応した時間パーティションの長さを導出している。さらに、システムプログラム213は所定の周期でサイクル内の時間パーティションを設定している。
この構成により、例えば信号処理プログラム210のタスクを一定周期で実行開始する必要がある場合等に対応が容易となり、1サイクルをまとめて時間パーティション設定することが可能なため設定回数を減らし、さらに所定の周期での設定であるため、制御が複雑になることがない。また、予め設定された変換テーブルであるため、時間パーティションの設定に要する時間が短く、その設定が複雑になることがない。
In addition to the configuration having the above effects, in the present invention, one cycle of calculation processing time by the calculation processing unit 202 includes a plurality of time partitions, and the conversion unit 214 derives the lengths of the plurality of time partitions. The length of the time partition corresponding to the task execution time is derived based on the task execution time determination information 208 for at least one time partition among the plurality of time partitions. Further, the system program 213 sets a time partition in the cycle at a predetermined period.
With this configuration, for example, when it is necessary to start execution of a task of the signal processing program 210 at a fixed period, it is easy to cope with it, and it is possible to set a time partition for one cycle at a time. Therefore, the control is not complicated. Further, since the conversion table is set in advance, the time required for setting the time partition is short, and the setting does not become complicated.

また、演算処理時間の1サイクルに従って、周期的にインクリメントされるサイクルカウンタを備え、タスク実行時間決定情報208は、サイクルカウンタの値に基づくものである。
この構成により、偶奇数周期やスタートアップ時におけるタスクの処理内容が変化することでタスクの実行時間が変化する場合に、この実行時間の変化に適応して、各時間パーティション内の不要な空き時間を減らすことができる。
In addition, a cycle counter that is periodically incremented according to one cycle of the arithmetic processing time is provided, and the task execution time determination information 208 is based on the value of the cycle counter.
With this configuration, if the task execution time changes due to even odd cycles or changes in task processing at startup, the unused free time in each time partition is adjusted to accommodate this change in execution time. Can be reduced.

さらにまた、それぞれのサイクルには対応するアプリケーションプログラム(信号処理プログラム210)の時間パーティションが含まれ、この時間パーティションの長さがサイクルによって異なり、この対応する時間パーティションの長さの長短の差を利用して、対応する時間パーティションとは異なるアプリケーションプログラム(ECU管理プログラム212)の時間パーティションがサイクル内に含まれている。
この構成により、1サイクルの長さを短縮しつつ、1サイクル内で実行できるタスク数を増加することができる。具体的には、信号処理プログラム210の時間パーティションの長さが短い奇数サイクルでは、短くなった分、すなわち、対応する時間パーティションの長さの長短の差を利用して、ECU管理プログラム212の時間パーティションを加えることができ、プロセッサ202の使用効率を向上させることができる。そのうえ、1サイクルの時間が参考例の図4よりも短くなるため、信号処理プログラム210の実行頻度を増やすことができる。レーダECU201においては、所定のサイクル周期で前方車両と自車との距離や相対速度の算出を行っているため、その算出頻度が増え、きめ細かい制御が可能になる。
Furthermore, each cycle includes a time partition of the corresponding application program (signal processing program 210). The length of the time partition varies depending on the cycle, and the difference between the lengths of the corresponding time partitions is used. Thus, a time partition of an application program (ECU management program 212) different from the corresponding time partition is included in the cycle.
With this configuration, the number of tasks that can be executed in one cycle can be increased while shortening the length of one cycle. Specifically, in the odd cycle in which the length of the time partition of the signal processing program 210 is short, the time of the ECU management program 212 is calculated by using the short time, that is, the difference in the length of the corresponding time partition. Partitions can be added, and the usage efficiency of the processor 202 can be improved. In addition, since the time of one cycle is shorter than that of FIG. 4 of the reference example, the execution frequency of the signal processing program 210 can be increased. Since the radar ECU 201 calculates the distance and relative speed between the preceding vehicle and the host vehicle at a predetermined cycle period, the calculation frequency increases and fine control is possible.

また、本実施の形態1では、1サイクルごとの所定周期で、変換部に導出された時間パーティションの長さに従ってアプリケーションプログラムに時間パーティションを設定したがこれに限らず、不定期で、または特定のサイクル番号のみを、変換部を用いた本発明の設定方法によって設定するものであってもよい。この具体例については実施の形態2に後述する。また、本実施の形態1では、1サイクル内において信号処理プログラム210のみの時間パーティションの長さを可変としたが、1サイクル内において複数のアプリケーションプログラムの時間パーティションの長さを可変とするものでもよく、安全関連アプリケーションプログラムの時間パーティションの長さも可変にできる。さらに、時間パーティション内に複数のタスクがあり、それらタスクの実行時間の総和に対応して時間パーティションの長さを導出するものでもよい。   In the first embodiment, the time partition is set in the application program according to the length of the time partition derived to the conversion unit at a predetermined cycle for each cycle. However, the present invention is not limited to this. Only the cycle number may be set by the setting method of the present invention using the conversion unit. A specific example will be described later in the second embodiment. In the first embodiment, the length of the time partition of only the signal processing program 210 is variable within one cycle. However, the length of the time partition of a plurality of application programs may be variable within one cycle. Often, the length of the time partition of a safety-related application program can be made variable. Further, there may be a plurality of tasks in the time partition, and the length of the time partition may be derived corresponding to the total execution time of these tasks.

さらにまた、変換部で導出される時間パーティションの長さは絶対量に限らず、基本的な時間パーティションの長さに対する相対的な変化量であってもよい。例えば、1サイクルにおける各時間パーティションとその長さの編成を定めた基本テーブルを用意し、特定のサイクル番号の場合に、基本テーブルで定めた時間パーティションの長さに対する変化量を変換部で導出し、この変化量(相対量)と基本テーブルにおける時間パーティションの長さ(絶対量)から得られる特定のサイクル番号における時間パーティションの長さ(絶対量)に従って、アプリケーションプログラムに時間パーティションを設定するものであってもよい。   Furthermore, the length of the time partition derived by the conversion unit is not limited to the absolute amount, and may be a relative change amount with respect to the length of the basic time partition. For example, a basic table that defines the organization of each time partition and its length in one cycle is prepared. In the case of a specific cycle number, the conversion unit derives the amount of change with respect to the time partition length defined in the basic table. The time partition is set in the application program according to the time partition length (absolute amount) at a specific cycle number obtained from this change amount (relative amount) and the time partition length (absolute amount) in the basic table. There may be.

また、サイクル番号情報を偶数と奇数の2つに分類して信号処理プログラム210の時間パーティションの長さを長い方と短い方にそれぞれ設定したが、例えばサイクル番号情報を3つ以上に分類することに対応して、時間パーティションの長さを3つ以上に異ならせて設定してもよい。また、レーダECU201による制御開始直後であるサイクル番号情報208が小さい数字の場合に、初期化処理実行のために時間パーティションの長さを長く設定するものであっても良い。   In addition, the cycle number information is classified into even and odd numbers, and the time partition length of the signal processing program 210 is set to the longer and shorter ones. For example, the cycle number information is classified into three or more. Correspondingly, the length of the time partition may be set to be different from three or more. Further, when the cycle number information 208 immediately after the start of the control by the radar ECU 201 is a small number, the length of the time partition may be set long in order to execute the initialization process.

本実施の形態1では、記憶部に格納されるタスク実行時間決定情報であるサイクル番号情報0、1、2・・・を用いてシステムプログラムが偶数、奇数を判断し、変換部を参照して時間パーティションを設定しているが、変換部が偶数、奇数を判断したり、時間パーティションの長さを算出したりするものであってもよく、記憶部はサイクル番号情報から得られる偶数、奇数といった二次情報を格納するものでもよい。   In the first embodiment, the system program uses the cycle number information 0, 1, 2,... That is task execution time determination information stored in the storage unit to determine whether the system program is even or odd, and refers to the conversion unit. Although the time partition is set, the conversion unit may determine even or odd numbers, or calculate the length of the time partition, and the storage unit may be even number or odd number obtained from the cycle number information. Secondary information may be stored.

なお、タスク実行時間決定情報によってタスクの実行時間が決まるとは、例えば43msや36msというように一点に決まるものに限らず、上記で説明した45ms以下や40ms以下のように、ある幅をもって決まるものでもよく、この決定によって時間パーティションの空き時間が減少するものであればよい。   The task execution time determined by the task execution time determination information is not limited to one point such as 43 ms or 36 ms, but is determined with a certain width such as 45 ms or less or 40 ms or less as described above. However, it is sufficient if the free time of the time partition is reduced by this determination.

次に、図1に示したレーダECUを用いて、信号処理プログラム210のタスク実行中にエラーが発生し、割り当てられた時間パーティション内でタスクが完了しない場合について、図5を用いて説明する。図5は、本実施の形態1にかかる、エラー発生時における時間パーティションの割り当てを示すタイムチャートである。図5の下部には信号処理プログラム210のタスクの実行時間も記している。
サイクル番号情報208が1となるサイクルにおいて、すなわち、信号処理プログラム210の時間パーティションの長さが40msの場合において、信号処理プログラム210のタスクの実行時間が36msの時点で、エラーが発生し、タスクの実行が完了しないとする。このとき、エラー発生から4ms後には、信号処理プログラム210の時間パーティションが強制的に終了する。信号処理プログラム210の後に割り当てられていた安全監視プログラム211がすぐさま実行されることによって信号処理プログラム210のタスクが完了していないことが検出され、エラーが発生していると判断される。
Next, a case where an error occurs during task execution of the signal processing program 210 using the radar ECU shown in FIG. 1 and the task is not completed within the assigned time partition will be described with reference to FIG. FIG. 5 is a time chart showing time partition assignment when an error occurs according to the first embodiment. The lower part of FIG. 5 also shows the task execution time of the signal processing program 210.
In the cycle in which the cycle number information 208 is 1, that is, when the length of the time partition of the signal processing program 210 is 40 ms, an error occurs when the task execution time of the signal processing program 210 is 36 ms. Suppose that execution of is not completed. At this time, the time partition of the signal processing program 210 is forcibly terminated after 4 ms from the occurrence of the error. When the safety monitoring program 211 assigned after the signal processing program 210 is immediately executed, it is detected that the task of the signal processing program 210 is not completed, and it is determined that an error has occurred.

この図5の状況に対して、本発明を適用していない場合として、図4に記載した参考例においてエラーが発生した場合について、参考例として図6を用いて説明する。図6は、参考例にかかる、エラー発生時における時間パーティションの割り当てを示すタイムチャートである。図6の下部には信号処理プログラム210のタスクの実行時間も記している。
各信号処理プログラム210の時間パーティションの長さはいずれも45msに設定されている。エラー発生時点は、図5と同じ36msとすると、信号処理プログラム210の時間パーティションの長さが図5よりも長い分、エラー発生から9ms後に、信号処理プログラム210の時間パーティションが強制的に終了する。その後に割り当てられていた安全監視プログラム211が実行することによってエラーが発生しているとようやく判断される。
With respect to the situation of FIG. 5, a case where an error occurs in the reference example shown in FIG. 4 as a case where the present invention is not applied will be described with reference to FIG. FIG. 6 is a time chart showing time partition allocation when an error occurs according to the reference example. The task execution time of the signal processing program 210 is also shown at the bottom of FIG.
The length of the time partition of each signal processing program 210 is set to 45 ms. If the error occurrence time is 36 ms, which is the same as that in FIG. 5, the time partition of the signal processing program 210 is forcibly terminated 9 ms after the occurrence of the error, because the time partition length of the signal processing program 210 is longer than that in FIG. . It is finally determined that an error has occurred by executing the safety monitoring program 211 assigned thereafter.

このように図5と図6を比較することで分かるように、図5では本発明を適用することによって、アプリケーションプログラムに含まれるタスクの実行時間に対応させて時間パーティションの長さを設定できるため、時間パーティション内でエラーが発生した場合に、エラーを検出するまでの時間が短くなり、その結果、エラーに対して早く処理を開始できる。   As can be seen by comparing FIG. 5 and FIG. 6, the time partition length can be set in accordance with the task execution time included in the application program in FIG. 5 by applying the present invention. When an error occurs in the time partition, the time until the error is detected is shortened, and as a result, the processing can be started early with respect to the error.

実施の形態2.
次に、本発明の実施の形態2に関して、以下に図を用いて説明する。実施の形態1と同様なものについては説明を省略し、実施の形態1と異なる点、新たな点について詳述する。図7は、実施の形態2に係るレーダECUの構成図である。
Embodiment 2. FIG.
Next, a second embodiment of the present invention will be described with reference to the drawings. The description of the same components as those in the first embodiment will be omitted, and differences and new points from the first embodiment will be described in detail. FIG. 7 is a configuration diagram of the radar ECU according to the second embodiment.

本実施の形態2に係るレーダECU801は、実施の形態1で説明した機能に加えて、次の2つの機能を備える。1つ目は、レーダECU801が他のECU(図示せず)とCAN(Controller Area Network)を介して接続しており、他のECUから測定停止シグナルを受信した場合に、送受信ドライバ205の設定を変更して、送信アンテナ203や受信アンテナ204での電波の送受信と、測定データ209を用いた演算の実行を停止するようにした後、レーダECU801を消費電力の低いスリープ状態へ移行する機能である。2つ目は、自車前方の遠距離の測定時に物体が検出されなかった場合、次の遠距離の測定時には受信した電波のサンプリング数を下げて、演算処理にかかる時間を短くする機能である。   The radar ECU 801 according to the second embodiment has the following two functions in addition to the functions described in the first embodiment. First, when the radar ECU 801 is connected to another ECU (not shown) via a CAN (Controller Area Network), and the measurement stop signal is received from the other ECU, the setting of the transmission / reception driver 205 is performed. This is a function to change the radar ECU 801 to a sleep state with low power consumption after stopping the transmission / reception of radio waves at the transmission antenna 203 and the reception antenna 204 and executing the calculation using the measurement data 209. . The second function is to shorten the time required for calculation processing by reducing the number of received radio waves when the object is not detected when measuring a long distance ahead of the host vehicle. .

レーダECU801は、CAN通信コントローラ802を備える。CAN通信コントローラ802は、他のECUと通信プロトコルCANに従ってメッセージの送受信を行う。なお、通信プロトコルはCANに限定されるものではなく、FlexRayやLINなど、他の通信プロトコルであってもよい。このCAN通信コントローラ802は、外部装置から情報を受け取る情報入力手段の一具体例である。   The radar ECU 801 includes a CAN communication controller 802. The CAN communication controller 802 transmits and receives messages according to the communication protocol CAN with other ECUs. The communication protocol is not limited to CAN, and may be another communication protocol such as FlexRay or LIN. The CAN communication controller 802 is a specific example of an information input unit that receives information from an external device.

RAM803には、サイクル番号情報208と測定データ209に加えて、スリープフラグ804とデータ数減少フラグ805が格納される。
スリープフラグ804は、ECU管理プログラム808によってセットあるいはクリアされる。セットされている場合には、次のECU管理プログラム808のタスク実行時に、レーダECU801がスリープ状態へ移行することを示している。
データ数減少フラグ805は、信号処理プログラム807によってセットあるいはクリアされる。セットされている場合には、次の奇数サイクルにおいて、信号処理プログラム807におけるサンプリング数を減らすことを示す。
The RAM 803 stores a sleep flag 804 and a data number decrease flag 805 in addition to the cycle number information 208 and the measurement data 209.
The sleep flag 804 is set or cleared by the ECU management program 808. When set, it indicates that the radar ECU 801 shifts to the sleep state when the next ECU management program 808 is executed.
The data number reduction flag 805 is set or cleared by the signal processing program 807. When set, it indicates that the sampling number in the signal processing program 807 is reduced in the next odd cycle.

スリープフラグ804のセットの有無、およびデータ減少フラグ805のセットの有無が、特許請求の範囲に記載のタスク実行時間決定情報であり、ここではサイクル番号情報208と合わせて、3種類のタスク実行時間決定情報が利用されている。このスリープフラグ804、データ数減少フラグ805及びサイクル番号情報208に対して優先度をつけ、この優先度に従って参照する変換テーブルを決定している。   Whether or not the sleep flag 804 is set and whether or not the data decrease flag 805 is set is the task execution time determination information described in the claims, and here, together with the cycle number information 208, three types of task execution times Decision information is used. Priorities are assigned to the sleep flag 804, the data number reduction flag 805, and the cycle number information 208, and a conversion table to be referred to is determined according to the priorities.

ROM806には、信号処理プログラム807、安全監視プログラム211、ECU管理プログラム808、変換テーブルA214、オペレーティングシステム(OS)809に加えて、変換テーブルB810と変換テーブルC811が格納されている。   In addition to the signal processing program 807, the safety monitoring program 211, the ECU management program 808, the conversion table A 214, and the operating system (OS) 809, the ROM 806 stores a conversion table B 810 and a conversion table C 811.

信号処理プログラム807は、各サイクルの最初に、スリープフラグ804がセットされているか確認し、セットされている場合には、送受信ドライバ205の設定を変更して、電波の送受信を停止し、測定データ209を用いた演算の実行は行わない。
また、信号処理プログラム807は、遠距離の測定データ209を用いた演算結果により、自車前方に物体を検出しなかった場合には、RAM803のデータ数減少フラグ805をセットする。
また、遠距離の測定データ209を用いた演算を行う奇数サイクルの最初に、データ数減少フラグ805がセットされているか確認し、セットされている場合には、サンプリング数を下げるように送受信ドライバ205を設定するとともに、減少したサンプリング数に対応する演算処理を実行する。
The signal processing program 807 confirms whether the sleep flag 804 is set at the beginning of each cycle. If it is set, the signal processing program 807 changes the setting of the transmission / reception driver 205 to stop transmission / reception of radio waves and measure data The calculation using 209 is not executed.
Further, the signal processing program 807 sets a data number reduction flag 805 in the RAM 803 when an object is not detected in front of the host vehicle based on a calculation result using the long-distance measurement data 209.
In addition, at the beginning of an odd cycle in which the calculation using the long-distance measurement data 209 is performed, it is confirmed whether the data number reduction flag 805 is set. And the arithmetic processing corresponding to the decreased sampling number is executed.

ECU管理プログラム808は、CAN通信コントローラ802から測定停止シグナルを受信すると、スリープフラグ804をセットする。また、スリープフラグ804をセットした後、次にECU管理プログラム808が実行される2サイクル経過後に消費電力を下げるためにプロセッサ202の動作を停止し、レーダECU801をスリープさせる。スリープフラグ804がセットされてから、スリープに入るまでに、他のアプリケーションプログラム(信号処理プログラム807、安全監視プログラム211)は、スリープに向けた終了処理などを行うことができる。   When the ECU management program 808 receives a measurement stop signal from the CAN communication controller 802, the ECU management program 808 sets a sleep flag 804. In addition, after the sleep flag 804 is set, the operation of the processor 202 is stopped and the radar ECU 801 is put to sleep in order to reduce power consumption after two cycles when the ECU management program 808 is executed next. Other application programs (the signal processing program 807 and the safety monitoring program 211) after the sleep flag 804 is set and before entering the sleep state can perform an end process for the sleep.

変換テーブルB810は、スリープフラグ804がセットされている場合の、信号処理プログラム807における時間パーティションの長さを示すものである。この変換テーブルB810を図8に示す。このとき、信号処理プログラム807は、送信アンテナ203や受信アンテナ204からの電波の送受信を停止するため、送受信ドライバ205の設定変更のみを行い、測定データ209を用いた演算は行わない。したがって実行時間が短くなることから、信号処理プログラム807に割り当てられる時間パーティションの長さは15msとなり、変換テーブルA214と比較すると、割り当てられる時間パーティションの長さが短くなっている。   The conversion table B 810 indicates the length of the time partition in the signal processing program 807 when the sleep flag 804 is set. This conversion table B810 is shown in FIG. At this time, since the signal processing program 807 stops transmission / reception of radio waves from the transmission antenna 203 and the reception antenna 204, only the setting change of the transmission / reception driver 205 is performed, and the calculation using the measurement data 209 is not performed. Therefore, since the execution time is shortened, the length of the time partition assigned to the signal processing program 807 is 15 ms, and the assigned time partition is shorter than the conversion table A214.

変換テーブルC811は、データ数減少フラグ805がセットされている場合の、信号処理プログラム807におけるサイクル番号情報が奇数時の時間パーティションの長さを示すものである。この変換テーブルC811を図9に示す。このとき、信号処理プログラム807に割り当てられる時間パーティションの長さは30msである。データ数が減少しており、信号処理プログラム807の実行時間は短くなることから、変換テーブルA214と比較すると、割り当てられる時間パーティションの長さが短くなっている。   The conversion table C811 indicates the length of the time partition when the cycle number information in the signal processing program 807 is odd when the data number reduction flag 805 is set. This conversion table C811 is shown in FIG. At this time, the length of the time partition allocated to the signal processing program 807 is 30 ms. Since the number of data is reduced and the execution time of the signal processing program 807 is shortened, the time partition to be assigned is shorter than the conversion table A214.

続いて、本実施の形態2に係るOS809が、信号処理プログラム807のタスクに割り当てられる時間パーティションの長さを設定する際の動作を、図10のフローチャートを用いて説明する。   Next, the operation when the OS 809 according to the second embodiment sets the length of the time partition allocated to the task of the signal processing program 807 will be described with reference to the flowchart of FIG.

OS809は、信号処理プログラム807のタスクに割り当てられる時間パーティションの設定を開始すると、まずステップS1101において、スリープフラグ804を参照する。スリープフラグ804がセットされている場合にはステップS1105に進み、セットされていない場合にはステップS1102に進む。   When starting the setting of the time partition assigned to the task of the signal processing program 807, the OS 809 first refers to the sleep flag 804 in step S1101. If the sleep flag 804 is set, the process proceeds to step S1105. If the sleep flag 804 is not set, the process proceeds to step S1102.

ステップS1102に進んだ場合には、OS809はサイクル番号情報208を参照する。そしてサイクル番号情報208が偶数である場合にはステップS1106へ進み、奇数の場合にはステップS1103に進む。   When the processing proceeds to step S1102, the OS 809 refers to the cycle number information 208. If the cycle number information 208 is an even number, the process proceeds to step S1106. If the cycle number information 208 is an odd number, the process proceeds to step S1103.

ステップS1103に進んだ場合には、OS809はさらにデータ数減少フラグ805を参照する。そしてデータ数減少フラグ805がセットされている場合にはステップS1107に進み、セットされていない場合にはステップS1104に進む。ステップS1104に進んだ場合には、変換テーブルA214を参照し、時間パーティションの長さを40msに設定して、信号処理プログラム807に対する時間パーティションの長さの設定処理を終了する。   When the processing proceeds to step S1103, the OS 809 refers to the data number reduction flag 805. If the data number reduction flag 805 is set, the process proceeds to step S1107. If not set, the process proceeds to step S1104. If the process proceeds to step S1104, the conversion table A214 is referred to, the time partition length is set to 40 ms, and the time partition length setting process for the signal processing program 807 is terminated.

一方、ステップS1101においてスリープフラグ804がセットされており、ステップS1105に進んだ場合には、変換テーブルB810を参照し、時間パーティションの長さを15msに設定して、信号処理プログラム807に対する時間パーティションの長さの設定処理を終了する。   On the other hand, if the sleep flag 804 is set in step S1101 and the process proceeds to step S1105, the conversion table B810 is referred to, the time partition length is set to 15 ms, and the time partition of the signal processing program 807 is set. The length setting process ends.

また、ステップS1102においてサイクル番号情報208が偶数であり、ステップS1106に進んだ場合には、変換テーブルA214を参照し、時間パーティションの長さを45msに設定して、信号処理プログラム807に対する時間パーティションの長さの設定処理を終了する。   When the cycle number information 208 is an even number in step S1102 and the process proceeds to step S1106, the conversion table A214 is referred to, the length of the time partition is set to 45 ms, and the time partition for the signal processing program 807 is set. The length setting process ends.

ステップS1103においてデータ数減少フラグ805がセットされており、ステップS1107に進んだ場合には、変換テーブルC811を参照し、時間パーティションの長さを30msに設定して、信号処理プログラム807に対する時間パーティションの長さの設定処理を終了する。   When the data number reduction flag 805 is set in step S1103 and the process proceeds to step S1107, the conversion table C811 is referred to, the time partition length is set to 30 ms, and the time partition for the signal processing program 807 is set. The length setting process ends.

このように、OS809は右記の各タスク実行時間決定情報を、スリープフラグ804、サイクル番号情報208、データ数減少フラグ805の順に高い優先度をつけて、参照する変換テーブルを決定し、時間パーティションの長さを設定する。   In this way, the OS 809 assigns each task execution time determination information on the right to the sleep table 804, the cycle number information 208, and the data number reduction flag 805 in order of priority, determines the conversion table to be referenced, and sets the time partition information. Set the length.

次に、図11に示すタイムチャートを用いて、他のECUから測定停止シグナルを受信したときの、図10のフローチャートによるOS809の一連の処理を説明する。図11は、スリープフラグセット時の、時間パーティションの割り当てを示すタイムチャートである。   Next, a series of processes of the OS 809 according to the flowchart of FIG. 10 when a measurement stop signal is received from another ECU will be described using the time chart shown in FIG. FIG. 11 is a time chart showing time partition allocation when the sleep flag is set.

サイクル番号情報208が1のときにおいて、ECU管理プログラム808のタスク実行時に、ECU管理プログラム808が、CAN通信コントローラ802から測定停止シグナルを受信し、スリープフラグ804をセットしたとする。次に、OS809はECU管理プログラム808の時間パーティションを終了し、サイクル番号情報208を2にインクリメントするとともに、次の信号処理プログラム807の時間パーティションの設定を開始する。   Assume that when the cycle number information 208 is 1, the ECU management program 808 receives a measurement stop signal from the CAN communication controller 802 and sets the sleep flag 804 when the ECU management program 808 executes a task. Next, the OS 809 ends the time partition of the ECU management program 808, increments the cycle number information 208 to 2, and starts setting the time partition of the next signal processing program 807.

そしてステップS1101において、スリープフラグ804がセットされているか確認する。ここで、ECU管理プログラム808によって既にセットされているため、ステップS1105に進む。次に変換テーブルB810を参照し、信号処理プログラム807の時間パーティションの長さを15msに設定して処理を終了する。サイクル番号情報208が偶数のため、安全監視プログラム211時間パーティションの長さは5msに設定され、ECU管理プログラムの時間パーティションは設定されない。   In step S1101, it is confirmed whether the sleep flag 804 is set. Here, since it is already set by the ECU management program 808, the process proceeds to step S1105. Next, referring to the conversion table B810, the length of the time partition of the signal processing program 807 is set to 15 ms, and the process ends. Since the cycle number information 208 is an even number, the length of the safety monitoring program 211 time partition is set to 5 ms, and the time partition of the ECU management program is not set.

続いて信号処理プログラム807のタスクが起動すると、送受信ドライバ205の設定を変更して、電波の送受信を停止する。測定データ209を用いた演算の実行は行わないため、実行時間が短くなり、15ms以内に処理を終了する。
その結果、実施の形態1において図4の参考例で示した、時間パーティションの長さが45msで固定された状態で停止処理を行う場合と比較すると、信号処理プログラム807の時間パーティションにおける不要な空き時間は30ms短縮できることがわかる。
Subsequently, when the task of the signal processing program 807 is activated, the setting of the transmission / reception driver 205 is changed and transmission / reception of radio waves is stopped. Since the calculation using the measurement data 209 is not executed, the execution time is shortened and the process is finished within 15 ms.
As a result, compared with the case where the stop process is performed in the state where the length of the time partition is fixed at 45 ms as shown in the reference example of FIG. 4 in the first embodiment, unnecessary empty space in the time partition of the signal processing program 807 is obtained. It can be seen that the time can be shortened by 30 ms.

次のサイクル番号情報208が3のときにおいて、信号処理プログラム807におけるレーダECU801のスリープに向けた動作も、タスクの実行時間が短くなるため、信号処理プログラム807の時間パーティションの長さを15msに設定する。安全監視プログラム211、ECU管理プログラム808の時間パーティションの長さは、サイクル番号情報208が奇数のため、いずれも5msに設定される。この設定された時間パーティション内で各タスクが実行することで、図4に示した参考例に比べて30ms以上時間を短縮して、レーダECU801をスリープ状態にすることが可能となる。   When the next cycle number information 208 is 3, the operation for the sleep of the radar ECU 801 in the signal processing program 807 also shortens the task execution time, so the time partition length of the signal processing program 807 is set to 15 ms. To do. The length of the time partition of the safety monitoring program 211 and the ECU management program 808 is set to 5 ms because the cycle number information 208 is an odd number. By executing each task within the set time partition, the time can be shortened by 30 ms or more compared to the reference example shown in FIG. 4, and the radar ECU 801 can be put in the sleep state.

このように、本実施の形態2における上記の発明は、他のECUから受信したシグナル情報に基づいて、信号処理プログラム807のタスクを実行する時間パーティションの長さを変更している。すなわち、タスク実行時間決定情報(スリープフラグ804のセットの有無)は、情報入力手段が外部装置から受け取る情報に基づくものであり、このタスク実行時間決定情報に基づきタスクの実行時間に対応した時間パーティションの長さが導出される。
このことにより、外部装置からの車両状態情報などに応じてタスクの処理内容が変化することでタスクの実行時間が変化する場合にも対応して、アプリケーションプログラム(信号処理プログラム807、安全監視プログラム211、ECU管理プログラム808)間の独立性を保ちながら、時間パーティション内の不要な空き時間を減らすことができる。
As described above, the above-described invention according to the second embodiment changes the length of the time partition for executing the task of the signal processing program 807 based on the signal information received from another ECU. That is, the task execution time determination information (whether the sleep flag 804 is set) is based on information received from the external device by the information input means, and a time partition corresponding to the task execution time based on the task execution time determination information Is derived.
As a result, the application program (signal processing program 807, safety monitoring program 211 is also adapted to the case where the task execution time changes due to the change of the task processing content according to the vehicle state information from the external device. Unnecessary idle time in the time partition can be reduced while maintaining independence between the ECU management programs 808).

また、同時にデータ数減少フラグ805がセットされている場合であっても、スリープフラグ804の状態を優先的に確認することにより、信号処理プログラム807のタスクの実行時間に適した時間パーティションを設定している。すなわち、複数の種類のタスク実行時間決定情報がそれぞれ優先度を持ち、優先度に応じて、変換部において時間パーティションの長さの導出に利用されるタスク実行時間決定情報を決定している。
そのため、複数種のタスク実行時間決定情報から、時間パーティション内の不要な空き時間を減らす量や実行されるタスクの緊急度合等に応じて、空き時間を適切に減らすことができる。
Even if the data count reduction flag 805 is set at the same time, a time partition suitable for the task execution time of the signal processing program 807 is set by checking the state of the sleep flag 804 with priority. ing. That is, a plurality of types of task execution time determination information each have a priority, and according to the priority, the task execution time determination information used for deriving the length of the time partition is determined by the conversion unit.
Therefore, the idle time can be appropriately reduced according to the amount of reduction in unnecessary idle time in the time partition, the urgency level of the task to be executed, and the like from the plural types of task execution time determination information.

次に、図12に示すタイムチャートを用いて、自車前方の遠距離の測定時に物体が検出されなかったときの、図10のフローチャートによるOS809の一連の処理を説明する。このとき、他のECUから測定停止シグナルは受信せず、スリープフラグ804はセットされていないものとする。図12は、データ数減少フラグセット時の、時間パーティションの割り当てを示すタイムチャートである。   Next, a series of processing of the OS 809 according to the flowchart of FIG. 10 when an object is not detected when measuring a long distance ahead of the host vehicle will be described using the time chart shown in FIG. At this time, it is assumed that a measurement stop signal is not received from another ECU and the sleep flag 804 is not set. FIG. 12 is a time chart showing time partition assignment when the data number reduction flag is set.

サイクル番号情報208が1のときにおいて、信号処理プログラム807のタスクでは、遠距離用の電波の送受信と演算処理を実行する。ここで、自車遠方に物体が検出されなかったため、信号処理プログラム807はデータ数減少フラグ805をセットする。その後、サイクル番号情報208が2、3にインクリメントされる度に、OS809は、次の信号処理プログラム807の時間パーティションの設定を開始し、ステップS1101において、スリープフラグ804がセットされているか確認する。スリープフラグ804はセットされていないため、ステップS1102に進み、サイクル番号情報208を参照する。そしてサイクル番号情報208が奇数の3となったとき、ステップS1103に進む。
なお、奇数サイクルにおける、自車前方の遠距離の測定時に物体が検出されなかったという演算結果が、特許請求の範囲における、以前のタスクの実行結果に相当する。
When the cycle number information 208 is 1, the task of the signal processing program 807 executes transmission / reception of long-distance radio waves and arithmetic processing. Here, since no object is detected far away from the vehicle, the signal processing program 807 sets the data number reduction flag 805. Thereafter, each time the cycle number information 208 is incremented to 2 or 3, the OS 809 starts setting the time partition of the next signal processing program 807, and confirms whether the sleep flag 804 is set in step S1101. Since the sleep flag 804 is not set, the process proceeds to step S1102, and the cycle number information 208 is referred to. When the cycle number information 208 is an odd number 3, the process proceeds to step S1103.
In addition, the calculation result that an object was not detected at the time of measuring a long distance ahead of the host vehicle in an odd cycle corresponds to the execution result of the previous task in the claims.

ステップS1103において、OS809はデータ数減少フラグ805がセットされているか確認する。データ数減少フラグ805はサイクル番号情報208が1のときにセットしているため、ステップS1107に進み、OS809は変換テーブルC811を参照し、信号処理プログラム807の時間パーティションの長さを30msに設定して処理を終了する。安全監視プログラム211、ECU管理プログラム808の時間パーティションの長さは、実施の形態1と同様に、サイクル番号情報208が奇数のため、いずれも5msに設定される。   In step S1103, the OS 809 checks whether the data number reduction flag 805 is set. Since the data number reduction flag 805 is set when the cycle number information 208 is 1, the process advances to step S1107, the OS 809 refers to the conversion table C811, and sets the time partition length of the signal processing program 807 to 30 ms. To finish the process. The length of the time partition of the safety monitoring program 211 and the ECU management program 808 is set to 5 ms because the cycle number information 208 is an odd number as in the first embodiment.

続いて信号処理プログラム807のタスクが起動すると、送受信ドライバ205の設定を変更して、測定サンプリング数を下げ、その分減少した測定データ209に対して演算処理を実行する。減少した分、実行時間が短くなり、30ms以内に処理を終了する。
その結果、図4で示した、時間パーティションの長さが45msで固定されている参考例と比較すると、信号処理プログラム807の時間パーティションの不要な空き時間は15ms短縮できることがわかる。
Subsequently, when the task of the signal processing program 807 is activated, the setting of the transmission / reception driver 205 is changed to reduce the number of measurement samplings, and the arithmetic processing is executed on the measurement data 209 that is reduced by that amount. Due to the decrease, the execution time is shortened and the processing is completed within 30 ms.
As a result, as compared with the reference example shown in FIG. 4 in which the length of the time partition is fixed at 45 ms, it can be seen that the unnecessary free time of the time partition of the signal processing program 807 can be reduced by 15 ms.

このように、本実施の形態2におけるもう1つの発明は、以前のタスクの実行結果として、奇数サイクルにおいて、自車前方の遠距離の測定時に物体が検出されなかった場合、データ数減少フラグ805がセットされ、次の奇数サイクルにおいて、信号処理プログラム807のタスクを実行する時間パーティションの長さを変更している。すなわち、タスク実行時間決定情報(データ数減少フラグ805のセットの有無)は、以前のタスクの実行結果に基づくものであり、このタスク実行時間決定情報に基づきタスクの実行時間に対応した時間パーティションの長さが導出される。
このことにより、以前のタスクの実行結果に応じてタスクの内容が変化することでタスクの実行時間が変化する場合にも対応して、アプリケーションプログラム(信号処理プログラム807、安全監視プログラム211、ECU管理プログラム808)間の独立性を保ちながら、時間パーティション内の不要な空き時間を減らすことができる。
As described above, another invention according to the second embodiment is that, as an execution result of the previous task, if no object is detected during long distance measurement in front of the host vehicle in the odd cycle, the data number reduction flag 805 Is set, and the length of the time partition for executing the task of the signal processing program 807 is changed in the next odd cycle. That is, the task execution time determination information (whether or not the data count reduction flag 805 is set) is based on the previous task execution result, and the time partition corresponding to the task execution time based on the task execution time determination information is determined. The length is derived.
As a result, the application program (signal processing program 807, safety monitoring program 211, ECU management) can be used even when the task execution time changes due to the change of the task content according to the previous task execution result. Unnecessary free time in the time partition can be reduced while maintaining independence among the programs 808).

なお、図11や図12のタイムチャートでは、信号処理プログラム807の時間パーティションが短くなった分、同じサイクル内で処理を実行しない時間が増加している。ここには実施の形態1に示したように、他の時間パーティションを割り当てて、他のアプリケーションプログラムのタスクを実行するようにしても良いため、時間パーティションの割り当ての自由度が向上する。   In the time charts of FIGS. 11 and 12, the time during which processing is not executed in the same cycle increases as the time partition of the signal processing program 807 is shortened. Here, as shown in the first embodiment, another time partition may be assigned and a task of another application program may be executed, so that the degree of freedom of time partition assignment is improved.

また、本実施の形態2では、外部装置からの入力情報として、ネットワークを介して受信した情報を用いたが、本発明はこれに限定されるものではない。例えば、レーダECU801に直接接続されたセンサからの情報を用いて、時間パーティションの長さを変更するものであってもよい。   In the second embodiment, information received via a network is used as input information from an external device, but the present invention is not limited to this. For example, the length of the time partition may be changed using information from a sensor directly connected to the radar ECU 801.

以上に説明した実施の形態1、2の構成、動作に限定されることはなく、本発明の範囲内にある限り、別な構成、動作へ変更を加えて実施してもよい。   The present invention is not limited to the configurations and operations of Embodiments 1 and 2 described above, and may be implemented by changing other configurations and operations as long as they are within the scope of the present invention.

201、801 レーダECU
202 プロセッサ
206、803 RAM
208 サイクル番号情報
210、807 信号処理プログラム
211 安全監視プログラム
212、808 ECU管理プログラム
213、809 オペレーティングシステムプログラム(OS)
214 変換テーブルA
802 CAN通信コントローラ
804 スリープフラグ
805 データ数減少フラグ
810 変換テーブルB
811 変換テーブルC
201, 801 Radar ECU
202 Processor 206, 803 RAM
208 Cycle number information 210, 807 Signal processing program 211 Safety monitoring program 212, 808 ECU management program 213, 809 Operating system program (OS)
214 Conversion table A
802 CAN communication controller 804 Sleep flag 805 Data number decrease flag 810 Conversion table B
811 Conversion table C

Claims (7)

演算処理手段と、
通常時における制御対象の制御の実行に関連する非安全関連アプリケーションプログラムと、前記制御対象の異常監視又は異常時における前記制御対象の制御の実行に関連する安全関連アプリケーションプログラムの、少なくとも2種のアプリケーションプログラムと、
前記アプリケーションプログラムに含まれるタスクの実行に割り当てられる時間パーティションを前記アプリケーションプログラム毎に設定するシステムプログラムと、
前記タスクの実行時間が決まるためのタスク実行時間決定情報が格納される記憶部と、
前記タスク実行時間決定情報に基づき、前記タスクの実行時間に対応した時間パーティションの長さを導出する変換部と、
を備え、
前記システムプログラムは、前記変換部により導出された前記時間パーティションの長さに従って前記アプリケーションプログラムに前記時間パーティションを設定し、
前記演算処理手段は、前記システムプログラムに設定された前記時間パーティションに従って前記タスクを実行する
ことを特徴とする電子制御装置。
Arithmetic processing means;
At least two types of applications, that is, a non-safety related application program related to execution of control of the controlled object at normal time and a safety related application program related to execution of control of the controlled object at the time of abnormality monitoring of the controlled object Program and
A system program that sets, for each application program, a time partition that is allocated to the execution of tasks included in the application program;
A storage unit for storing task execution time determination information for determining the execution time of the task;
Based on the task execution time determination information, a conversion unit for deriving the length of the time partition corresponding to the execution time of the task;
With
The system program sets the time partition in the application program according to the length of the time partition derived by the conversion unit,
The electronic control device, wherein the arithmetic processing means executes the task according to the time partition set in the system program.
前記演算処理手段による演算処理時間の1サイクルには、複数の前記時間パーティションが含まれ、
前記変換部は、前記複数の時間パーティションの長さを導出する変換テーブルを有すると共に、前記複数の時間パーティションのうち、少なくとも1つの前記時間パーティションについて、前記タスク実行時間決定情報に基づき、前記タスクの実行時間に対応した前記時間パーティションの長さを導出し、
前記システムプログラムは所定の周期で前記サイクル内の前記時間パーティションを設定する
ことを特徴とする請求項1に記載の電子制御装置。
One cycle of the calculation processing time by the calculation processing means includes a plurality of the time partitions,
The conversion unit has a conversion table for deriving the lengths of the plurality of time partitions, and at least one of the plurality of time partitions is based on the task execution time determination information for the task. Deriving the length of the time partition corresponding to the execution time,
The electronic control apparatus according to claim 1, wherein the system program sets the time partition in the cycle at a predetermined period.
前記演算処理手段による演算処理時間の1サイクルには、複数の前記時間パーティションが含まれ、
前記1サイクルに従って、周期的にインクリメントされるサイクルカウンタを備え、
前記タスク実行時間決定情報は、前記サイクルカウンタの値に基づくものである
ことを特徴とする請求項1又は2に記載の電子制御装置。
One cycle of the calculation processing time by the calculation processing means includes a plurality of the time partitions,
A cycle counter that is periodically incremented according to the one cycle;
The electronic control device according to claim 1, wherein the task execution time determination information is based on a value of the cycle counter.
それぞれの前記サイクルには対応する時間パーティションが含まれ、
前記対応する時間パーティションの長さが前記サイクルによって異なり、前記対応する時間パーティションの長さの長短の差を利用して、前記対応する時間パーティションとは異なる前記時間パーティションが前記サイクル内に含まれる
ことを特徴とする請求項2又は3に記載の電子制御装置。
Each said cycle contains a corresponding time partition,
The length of the corresponding time partition varies depending on the cycle, and the time partition different from the corresponding time partition is included in the cycle by using the difference in length between the corresponding time partitions. The electronic control device according to claim 2 or 3.
外部装置から情報を受け取る情報入力手段を備え、
前記タスク実行時間決定情報は、前記情報入力手段で受け取る情報に基づくものである
ことを特徴とする請求項1乃至4のいずれかに記載の電子制御装置。
Comprising an information input means for receiving information from an external device;
The electronic control device according to claim 1, wherein the task execution time determination information is based on information received by the information input unit.
前記タスク実行時間決定情報は、以前の前記タスクの実行結果に基づくものである
ことを特徴とする請求項1乃至5のいずれかに記載の電子制御装置。
6. The electronic control device according to claim 1, wherein the task execution time determination information is based on a previous execution result of the task.
複数の種類の前記タスク実行時間決定情報はそれぞれ優先度を持ち、
前記優先度に応じて、前記変換部において前記時間パーティションの長さの導出に利用される前記タスク実行時間決定情報が決定する
ことを特徴とする請求項1乃至6のいずれかに記載の電子制御装置。
Each type of task execution time determination information has a priority,
7. The electronic control according to claim 1, wherein the task execution time determination information used for deriving the length of the time partition is determined in the conversion unit according to the priority. apparatus.
JP2013187517A 2013-09-10 2013-09-10 Electronic control unit Active JP5594416B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013187517A JP5594416B1 (en) 2013-09-10 2013-09-10 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013187517A JP5594416B1 (en) 2013-09-10 2013-09-10 Electronic control unit

Publications (2)

Publication Number Publication Date
JP5594416B1 true JP5594416B1 (en) 2014-09-24
JP2015054550A JP2015054550A (en) 2015-03-23

Family

ID=51702079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013187517A Active JP5594416B1 (en) 2013-09-10 2013-09-10 Electronic control unit

Country Status (1)

Country Link
JP (1) JP5594416B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6424797B2 (en) * 2015-11-02 2018-11-21 株式会社デンソー In-vehicle device

Also Published As

Publication number Publication date
JP2015054550A (en) 2015-03-23

Similar Documents

Publication Publication Date Title
US8417990B2 (en) Multi-core processing system for vehicle control or an internal combustion engine controller
US11416293B2 (en) Control unit having a scheduler for scheduling a plurality of virtual machines, and methods for scheduling a plurality of virtual machines
JP5671388B2 (en) Communication system and communication apparatus
US20110022809A1 (en) Consolidated electronic control unit and relay program implemented in the same
JP5829890B2 (en) Semiconductor data processing apparatus, time trigger communication system, and communication system
US10503544B2 (en) Efficient mapping from task graphs to dynamic system platforms
US10764372B2 (en) Vehicular communication device
CN110990034A (en) ECU upgrading method and system, electronic equipment and storage medium
EP3037303A1 (en) Vehicle control device
US11115232B2 (en) Method and device for operating a control unit
JP5533789B2 (en) In-vehicle electronic control unit
JP4985662B2 (en) Program and control device
JP5594416B1 (en) Electronic control unit
US9128757B2 (en) Method and lightweight mechanism for mixed-critical applications
JP5595571B1 (en) Control device
CN116521266A (en) Management method and device for vehicle-mounted application starting configuration, vehicle and storage medium
JP6243266B2 (en) Electronic control device and memory diagnostic method
KR102097386B1 (en) Method for synchronizing communication clocks and apparatus thereof
CN109062702B (en) Computing resource allocation method, related device and readable storage medium
US20080126497A1 (en) Controller Apparatus with Shared Expansion Connection and Method for the same
WO2023195384A1 (en) Vehicle-mounted control device, control method, and control program
JP6009518B2 (en) Electronic control unit
US10403350B2 (en) Control unit having radio interference avoiding function
CN103514126A (en) Method, system and device for receiving data
JP6168847B2 (en) Multi-core system

Legal Events

Date Code Title Description
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: 20140708

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140721

R151 Written notification of patent or utility model registration

Ref document number: 5594416

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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