JP2012185541A - In-vehicle device, scheduling program, and scheduling method - Google Patents

In-vehicle device, scheduling program, and scheduling method Download PDF

Info

Publication number
JP2012185541A
JP2012185541A JP2011046452A JP2011046452A JP2012185541A JP 2012185541 A JP2012185541 A JP 2012185541A JP 2011046452 A JP2011046452 A JP 2011046452A JP 2011046452 A JP2011046452 A JP 2011046452A JP 2012185541 A JP2012185541 A JP 2012185541A
Authority
JP
Japan
Prior art keywords
state
task
vehicle
tasks
vehicle device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011046452A
Other languages
Japanese (ja)
Inventor
Takahiro Shidai
尊裕 司代
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2011046452A priority Critical patent/JP2012185541A/en
Publication of JP2012185541A publication Critical patent/JP2012185541A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Hybrid Electric Vehicles (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an in-vehicle device and the like which can efficiently use a CPU and perform task scheduling.SOLUTION: A control program 1 of an ECU 100 has: A and B tasks 21 and 22 for controlling a motor and the like; and a C task 31 for controlling power windows and the like. Also, the control program 1 generates cyclic timing, and regards each cycle as a time slice (TS), then in each TS, gives an execution right to each task for a 1TS operation time which is individually preset. Then, the ECU 100 has 5 operational states based on IG switch operations: an ACC OFF state; an ACC ON state; an IG ON just after state; an IG ON steady state; and an IG OFF just after state. The control program 1 increases an operation frequency of a task which is estimated to have a high processing load in each state, by changing the 1TS operation time of each task according to the operational state of the ECU 100.

Description

本発明は、タスクのスケジューリングを行う車載装置等に関する。   The present invention relates to an in-vehicle device that performs task scheduling.

車両には、エンジンやブレーキ等の制御を行う制御系ECUや、メータやパワーウインドウ等の制御を行うボデー系ECUや、ナビゲーション装置等の情報系ECU等といった異なる種類のECUが搭載されている。近年では、車両の高機能化に伴いこれらのECUの数が増加し、車両の開発コストや製造コストが増加しているため、複数のECUを一台に統合し、制御系,ボデー系,情報系といった異なる種類の機能を一台のECUで実現することが提案されている。しかしながら、ECUのプログラムにはリアルタイム性が要求されており、特に制御系の機能に関しては、リアルタイム性が損なわれることで安全上の問題が生じる危険性があるため、他の機能に比べてより厳しい時間的制約が課せられる。   Different types of ECUs such as a control system ECU that controls engines and brakes, a body system ECU that controls meters and power windows, an information system ECU such as a navigation device, and the like are mounted on the vehicle. In recent years, the number of these ECUs has increased as the functions of vehicles have increased, and the development and manufacturing costs of vehicles have increased. Therefore, a plurality of ECUs have been integrated into a single control system, body system, and information system. It has been proposed to implement different types of functions such as systems with a single ECU. However, the ECU program is required to have real-time characteristics, and particularly with respect to the functions of the control system, there is a risk that safety problems may occur due to the loss of real-time characteristics. Time constraints are imposed.

ここで、特許文献1には、CPUの動作時間を均等に分割して一つに連なったタイムスライスを生成し、これらのタイムスライスを各プロセスに静的に割り当てるスケジューリング方法について記載されている。このようなスケジューリング方法によれば、各プロセスに割り当てられるCPUの動作時間が保証されるため、動画配信処理等といった時間的制約が課せられた複数の処理を並行して行う場合であっても、各処理のサービス品質を保証することが可能となる。そして、該スケジューリング方法を異なる種類の機能を備える上述のECUに適用することで、各機能に対応するタスクの動作時間を保証することができ、制御系の機能における厳しい時間的制約を満たすことができると考えられる。   Here, Patent Document 1 describes a scheduling method in which CPU operation times are equally divided to generate a series of time slices, and these time slices are statically assigned to each process. According to such a scheduling method, since the operation time of the CPU allocated to each process is guaranteed, even when performing a plurality of processes in which time constraints such as a video distribution process are imposed in parallel, It becomes possible to guarantee the service quality of each process. Then, by applying the scheduling method to the above-mentioned ECU having different types of functions, it is possible to guarantee the operation time of tasks corresponding to each function, and satisfy severe time constraints in the functions of the control system. It is considered possible.

特開平11−293694号公報JP 11-293694 A

ところで、制御系の機能は、エンジンの稼動状況等に応じて処理負荷が大きく変動すると考えられ、該機能のリアルタイム性を保証するためには、処理負荷が最大となる場合を想定して対応するタスクに動作時間を割り当てる必要がある。これにより、エンジンを安全に制御することが可能となるが、その反面、処理負荷が低い場合には該タスクに過剰に動作時間が割り当てられてしまい、CPUの使用効率が悪化してしまう。   By the way, it is considered that the processing load of the control system greatly varies depending on the operating state of the engine, and in order to guarantee the real-time performance of the function, it is assumed that the processing load is maximized. It is necessary to allocate operation time to the task. As a result, the engine can be controlled safely, but on the other hand, when the processing load is low, the operation time is excessively allocated to the task, and the use efficiency of the CPU deteriorates.

本願発明は上記課題に鑑みてなされたものであり、CPUを効率良く使用しつつ、タスクのスケジューリングを行うことができる車載装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to provide an in-vehicle device that can perform task scheduling while efficiently using a CPU.

上記課題に鑑みてなされた請求項1に記載の車載装置は、複数のタスクに対して順次実行権を付与することで、これらのタスクを並行して動作させるよう構成されており、自車両の状態を判別する判別手段と、判別手段により判別された自車両の状態に応じて、それぞれのタスクを動作させる頻度を変更する変更手段と、を備えることを特徴とする。   The in-vehicle device according to claim 1, which has been made in view of the above problems, is configured to operate these tasks in parallel by sequentially granting an execution right to a plurality of tasks. And a changing unit that changes the frequency of operating each task in accordance with the state of the host vehicle determined by the determining unit.

このような車載装置によれば、自車両の状態毎に各タスクの処理負荷を予め測定し、各状態において、処理負荷が高くなるタスクが動作する頻度を上げると共に、処理負荷が低くなるタスクが動作する頻度を下げることができる。このため、CPUを効率良く使用しつつ、タスクのスケジューリングを行うことが可能となる。そして、これにより、CPUの性能を下げても十分なパフォーマンスを得ることができ、車載装置のコストを低減させることが可能となる。   According to such a vehicle-mounted device, the processing load of each task is measured in advance for each state of the host vehicle, and in each state, the frequency at which a task with a high processing load operates is increased and a task with a low processing load is provided. The frequency of operation can be lowered. Therefore, task scheduling can be performed while using the CPU efficiently. As a result, sufficient performance can be obtained even if the CPU performance is lowered, and the cost of the in-vehicle device can be reduced.

なお、自車両のエンジンの稼動状態に応じて、エンジンやブレーキ等を制御するタスクの処理負荷が大きく変動することが考えられる。
そこで、請求項2に記載の車載装置では、車両の状態を、イグニッションスイッチやスタータスイッチ等といった、自車両の運転を開始させるためのスイッチの操作に基づく状態としている。
Note that it is conceivable that the processing load of the task for controlling the engine, the brake, and the like varies greatly depending on the operating state of the engine of the host vehicle.
Therefore, in the in-vehicle device according to the second aspect, the state of the vehicle is based on the operation of a switch such as an ignition switch or a starter switch for starting the operation of the host vehicle.

また、エンジンとモータとから駆動力を得るハイブリット車においては、該エンジンやモータの稼動状態に応じて、これらに関連するタスクの処理負荷が大きく変動することが考えられる。   Further, in a hybrid vehicle that obtains driving force from an engine and a motor, it is conceivable that the processing load of tasks related to these fluctuates greatly depending on the operating state of the engine and motor.

そこで、請求項3に記載の車載装置では、自車両が、駆動力を得るためのエンジンとモータとが搭載されたハイブリッド車として構成されている場合において、自車両の状態を、エンジン及びモータの稼動状態に基づく状態としている。   Therefore, in the in-vehicle device according to the third aspect, in the case where the host vehicle is configured as a hybrid vehicle on which an engine and a motor for obtaining driving force are mounted, the state of the host vehicle is set to the state of the engine and the motor. The state is based on the operating state.

このような状態に応じて各タスクが動作する頻度を変更することで、CPUを効率良く使用することが可能となる。
また、車載装置は、次のようにして各タスクが動作する頻度を変更しても良い。
By changing the frequency at which each task operates in accordance with such a state, the CPU can be used efficiently.
The in-vehicle device may change the frequency with which each task operates as follows.

すなわち、請求項4に記載されているように、車載装置は、周期的に到来するタイミングを生成して基準サイクルとし、該基準サイクルの1周期であるタイムスライスにおいてタスクに順次実行権を付与すると共に、タスクに対し、それぞれ、各タイムスライスにおいて実行権が付与される時間である1周期内動作時間と、各タイムスライスにおいて実行権が付与される順番である優先順位を設定しても良い。そして、変更手段は、1周期内動作時間と優先順位とのうちの少なくとも一つを変更することで、それぞれのタスクを動作させる頻度を変更しても良い。   In other words, as described in claim 4, the in-vehicle device generates a periodically arrived timing as a reference cycle, and sequentially grants execution rights to tasks in a time slice that is one cycle of the reference cycle. At the same time, for each task, an operation time within one cycle that is a time during which execution rights are granted in each time slice, and a priority order that is the order in which execution rights are given at each time slice may be set. The changing unit may change the frequency of operating each task by changing at least one of the operation time within one cycle and the priority order.

また、請求項5に記載されているように、それぞれのタスクには、単位時間あたりに実行権が付与される時間である動作時間が設定されている場合であれば、変更手段は、タスクに設定されている動作時間を変更することで、それぞれのタスクを動作させる頻度を変更しても良い。   In addition, as described in claim 5, if each task is set with an operation time that is a time for which an execution right is granted per unit time, the changing means is assigned to the task. The frequency of operating each task may be changed by changing the set operation time.

このような構成によれば、車両の状態に応じて各タスクが動作する頻度を柔軟に変更することができる。
また、仮想化技術により既存の車載装置のコンピュータを仮想化すると共に、仮想化されたコンピュータ上で該車載装置に搭載されているOSやアプリケーションを動作させることで、該車載装置を容易に再現できることが知られている。そして、仮想化技術により、既存の車載装置を再現するプログラムである仮想マシンを複数作成すると共に、これらの仮想マシンを1台の車載装置で稼動させることで、複数の車載装置を1台に統合することが提案されている。また、このようにして1台の車載装置で複数の仮想マシンを稼動させる場合には、各仮想マシンをタスクとしてスケジューリングを行うことが考えられる。
According to such a configuration, the frequency at which each task operates can be flexibly changed according to the state of the vehicle.
In addition, the in-vehicle device can be easily reproduced by virtualizing the computer of the existing in-vehicle device using the virtualization technology and operating the OS or application installed in the in-vehicle device on the virtualized computer. It has been known. And by creating multiple virtual machines that are programs that reproduce existing in-vehicle devices using virtualization technology, and operating these virtual machines with one in-vehicle device, multiple in-vehicle devices are integrated into one. It has been proposed to do. Further, when a plurality of virtual machines are operated with one in-vehicle device in this way, it is conceivable to perform scheduling using each virtual machine as a task.

そこで、請求項6に記載の車載装置は、タスクは、ある装置において実現される機能を再現するためのプログラムである仮想マシンとして構成されている。
こうすることにより、例えば、1台の車載装置で複数の仮想マシンを並行して稼動させる場合において、CPUを効率良く使用することが可能となる。
Therefore, in the in-vehicle device according to the sixth aspect, the task is configured as a virtual machine that is a program for reproducing a function realized in a certain device.
In this way, for example, when a plurality of virtual machines are operated in parallel with one in-vehicle device, the CPU can be used efficiently.

なお、請求項7には、請求項1に記載の車載装置におけるタスクのスケジューリングを行うスケジューリングプログラムが記載されている。このようなスケジューリングプログラムによれば、CPUを効率良く使用することが可能となる。   Note that, in claim 7, a scheduling program for performing task scheduling in the in-vehicle device according to claim 1 is described. According to such a scheduling program, the CPU can be used efficiently.

また、請求項8には、請求項1に記載の車載装置におけるタスクのスケジューリング方法が記載されている。このような方法によれば、CPUを効率良く使用することが可能となる。   Further, claim 8 describes a task scheduling method in the in-vehicle device according to claim 1. According to such a method, the CPU can be used efficiently.

第一実施形態のECUと制御プログラムの構成を示すブロック図である。It is a block diagram which shows the structure of ECU of 1st embodiment, and a control program. 第一実施形態における運転状態についての状態遷移図と、各運転状態に対応するスケジュールテーブルを示す表である。It is a table | surface which shows the state transition diagram about the driving | running state in 1st embodiment, and the schedule table corresponding to each driving | running state. 第一実施形態において、運転状態に応じて各タスクの動作時間が変化することを示すタイミングチャートである。In 1st embodiment, it is a timing chart which shows that the operation time of each task changes according to a driving | running state. 第一実施形態における状態変化検知処理についてのフローチャートと、テーブル切替処理についてのフローチャートである。It is the flowchart about the state change detection process in 1st embodiment, and the flowchart about a table switching process. 第二実施形態のECUと制御プログラムの構成を示すブロック図である。It is a block diagram which shows the structure of ECU and control program of 2nd embodiment. 第二実施形態における各運転状態に対応するスケジュールテーブルを示す表である。It is a table | surface which shows the schedule table corresponding to each driving | running state in 2nd embodiment. 第二実施形態において、運転状態に応じて各VMの動作時間が変化することを示すタイミングチャートである。In 2nd embodiment, it is a timing chart which shows that the operating time of each VM changes according to a driving | running state. 第三実施形態におけるハイブリッド車のエンジン,モータの駆動状態についての状態遷移図である。It is a state transition diagram about the drive state of the engine and motor of a hybrid car in a third embodiment.

以下、本発明の実施形態について図面を用いて説明する。なお、本発明の実施の形態は、下記の実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態を採りうる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The embodiment of the present invention is not limited to the following embodiment, and can take various forms as long as they belong to the technical scope of the present invention.

[第一実施形態]
[構成の説明]
まず、第一実施形態について説明する。
[First embodiment]
[Description of configuration]
First, the first embodiment will be described.

第一実施形態のECU100は、エンジンにより駆動される車両に搭載されており、エンジン,ABS機能を有するブレーキ,エアバック等を制御する制御系の機能と、メータ,エアコン,キーレスエントリーシステム等を制御するボデー系の機能を有している。また、ECU100は、これらの機能以外にも、オーディオとしての機能やナビゲーション機能等といった情報系の機能を有していても良い。   The ECU 100 according to the first embodiment is mounted on a vehicle driven by an engine, and controls a control system function for controlling the engine, a brake having an ABS function, an air bag, and the like, a meter, an air conditioner, a keyless entry system, and the like. It has the function of body system. In addition to these functions, the ECU 100 may have information-related functions such as an audio function and a navigation function.

なお、これらの機能はいずれもリアルタイム性が要求されるが、制御系の機能に関しては、リアルタイム性が損なわれることで安全上の問題が生じるおそれがあるため、これらの機能の中で最もハードなリアルタイム性が要求される(換言すれば、制御系の機能には、最も厳しい時間的制約が課される)。また、ボデー系の機能に関しては、リアルタイム性が損なわれることで利便性や快適性等が悪化し、自車両の運転が困難となるおそれがあるが、情報系の機能に関しては、リアルタイム性が損なわれても利便性や娯楽性等が低下するといった程度であり、ボデー系の機能は、情報系の機能に比べより高いリアルタイム性が要求される。   All of these functions are required to have real-time characteristics. However, regarding the functions of the control system, there is a risk that safety problems may occur due to the loss of real-time characteristics. Real-time characteristics are required (in other words, the most severe time constraint is imposed on the function of the control system). In addition, regarding the functions of the body system, convenience and comfort may deteriorate due to the loss of real-time characteristics, and driving of the host vehicle may become difficult. However, the real-time characteristics of the information system functions are impaired. However, convenience and amusement are reduced, and the body functions are required to have higher real-time performance than the information functions.

図1には、上記ECU100の概略構成と、ECU100を制御する制御プログラム1の構成を示すブロック図が記載されている。
ECU100は、IG端子,ACC端子,+B端子の三つの電源端子を有しており、電源管理ECU200は、自車両のイグニッションスイッチ(IGスイッチ)の操作状態に応じて異なる電源端子からECU100に電力を供給する。また、ECU100は、制御プログラム1を実行するCPU110と、各種機能を実現するための物理デバイス120とを有しており、制御プログラム1は、物理デバイス120における、フラッシュメモリ等の記憶保持動作が不要なデバイスから構成された記憶部(図示なし)に記憶されている。
FIG. 1 is a block diagram showing a schematic configuration of the ECU 100 and a configuration of a control program 1 that controls the ECU 100.
The ECU 100 has three power terminals, an IG terminal, an ACC terminal, and a + B terminal, and the power management ECU 200 supplies power to the ECU 100 from different power terminals according to the operation state of the ignition switch (IG switch) of the host vehicle. Supply. Further, the ECU 100 includes a CPU 110 that executes the control program 1 and a physical device 120 for realizing various functions. The control program 1 does not require a memory holding operation such as a flash memory in the physical device 120. Is stored in a storage unit (not shown) composed of various devices.

そして、制御プログラム1は、制御系の機能を実現するための制御系アプリ20と、ボデー系の機能を実現するためのボデー系アプリ30と、これらのアプリケーションを動作させるOS10とを有している。このOS10は、リアルタイムOSとして構成されており、制御系アプリ20を構成するAタスク21,Bタスク22や、ボデー系アプリ30を構成するCタスク31のスケジューリングを行うスケジューリング部11と、物理デバイス120からの信号を各アプリケーションに通知すると共に、各アプリケーションからの指示に応じて物理デバイス120を制御するデバイス制御部12とを有している。また、スケジューリング部11は、各タスクに実行権が付与される時間(動作時間)や、各タスクの優先順位を設定するスケジューラ設定部11aと、設定された動作時間や優先順位に従い各タスクに実行権を付与することで、これらのタスクを並行して動作させるスケジューラ実行部11bとを有している。   The control program 1 includes a control system application 20 for realizing a control system function, a body system application 30 for realizing a body system function, and an OS 10 for operating these applications. . The OS 10 is configured as a real-time OS, and includes a scheduling unit 11 that schedules the A task 21 and the B task 22 that configure the control system application 20 and the C task 31 that configures the body system application 30, and the physical device 120. And a device control unit 12 for controlling the physical device 120 in accordance with an instruction from each application. In addition, the scheduling unit 11 executes time for each task (execution time) (scheduling time), scheduler setting unit 11a for setting the priority of each task, and execution for each task according to the set operation time and priority. It has a scheduler execution unit 11b that operates these tasks in parallel by granting the right.

[動作の説明]
次に、第一実施形態の制御プログラム1の動作について説明する。
(1)IGスイッチの操作状態について
既に述べたように、電源管理ECU200は、IGスイッチの操作状態に応じて異なる電源端子からECU100に電力を供給するが、ECU100は、IGスイッチの操作に基づく(換言すれば、電力供給に用いられる電源端子に基づく)以下の運転状態を有する。
[Description of operation]
Next, operation | movement of the control program 1 of 1st embodiment is demonstrated.
(1) Regarding the operation state of the IG switch As described above, the power management ECU 200 supplies power to the ECU 100 from different power supply terminals according to the operation state of the IG switch, but the ECU 100 is based on the operation of the IG switch ( In other words, it has the following operating conditions (based on the power supply terminal used for power supply).

すなわち、図2(a)に記載されているように、運転状態として、IGスイッチがOFFに設定されたACC OFF状態(+B端子のみから電力が供給される)と、IGスイッチがACCに設定されたACC ON状態,IG OFF直後状態(+B端子とACC端子とから電力が供給される)と、IGスイッチがON或いはSTARTに設定されたIG ON直後状態,IG ON定常状態(+B端子、ACC端子、及びIG端子から電力が供給される)とが設けられている。   That is, as described in FIG. 2A, as an operation state, when the IG switch is set to ACC OFF state (power is supplied only from the + B terminal), the IG switch is set to ACC. ACC ON state, state immediately after IG OFF (power is supplied from + B terminal and ACC terminal), state immediately after IG ON when IG switch is set to ON or START, steady state of IG ON (+ B terminal, ACC terminal) And power is supplied from the IG terminal).

そして、運転状態がACC OFF状態である場合にIGスイッチがACCに設定されると(ACC ON)、運転状態はACC ON状態となる。
また、運転状態がACC ON状態である場合においては、IGスイッチがON或いはSTARTに設定されると(IG ON)、運転状態はIG ON直後状態となり、IGスイッチがOFFに設定されると(ACC OFF)、運転状態はACC OFF状態となる。
When the operating state is the ACC OFF state and the IG switch is set to ACC (ACC ON), the operating state becomes the ACC ON state.
Further, when the operation state is the ACC ON state, when the IG switch is set to ON or START (IG ON), the operation state is a state immediately after the IG ON, and when the IG switch is set to OFF (ACC OFF), the driving state is the ACC OFF state.

また、運転状態がIG ON直後状態である場合においては、当該状態となった後、予め定められた初期時間(例えば100ms)が経過すると、運転状態はIG ON定常状態となると共に、IGスイッチがACCに設定されると(IG OFF)、運転状態はIG OFF直後状態となる。   In addition, when the operation state is a state immediately after IG ON, when the predetermined initial time (for example, 100 ms) has elapsed after entering the state, the operation state becomes the IG ON steady state and the IG switch is turned on. When set to ACC (IG OFF), the operating state is the state immediately after IG OFF.

また、運転状態がIG ON定常状態である場合においては、IGスイッチがACCに設定されると(IG OFF)、運転状態はIG OFF直後状態となる。
また、運転状態がIG OFF直後状態である場合においては、当該状態となった後、予め定められた終了時間(例えば100ms)が経過すると、運転状態はACC ON状態となると共に、IGスイッチがON或いはSTARTに設定されると(IG ON)、運転状態はIG ON直後状態となる。
In the case where the operation state is the IG ON steady state, when the IG switch is set to ACC (IG OFF), the operation state becomes a state immediately after IG OFF.
In addition, when the operation state is a state immediately after IG OFF, when the predetermined end time (for example, 100 ms) has elapsed after entering the state, the operation state becomes the ACC ON state and the IG switch is turned ON. Alternatively, when set to START (IG ON), the operating state is the state immediately after IG ON.

(2)スケジューリングについて
次に、ECU100に搭載されている制御プログラム1のスケジューリング部11にて行われる、各アプリケーションを構成するタスクのスケジューリングについて説明する。
(2) Scheduling Next, scheduling of tasks constituting each application performed in the scheduling unit 11 of the control program 1 mounted on the ECU 100 will be described.

既に述べたように、制御系アプリ20,ボデー系アプリ30にはリアルタイム性が要求されており、これらのタスクには所定周期毎に割り当てられる動作時間を保証する必要がある。   As described above, the control system application 20 and the body system application 30 are required to have real-time characteristics, and it is necessary to guarantee the operation time allocated to each task at predetermined intervals.

このため、スケジューリング部11は、周期的に到来するタイミングを生成して基準サイクルとすると共に、該基準サイクルの1周期をタイムスライス(TS(Time Sliceの略)とも記載)とし、さらに、各タスクについて、TSにおける動作時間である1周期内動作時間と、実行権が付与される順番である優先順位とを設定する。そして、各TSにおいて、優先順位に沿った順番で各タスクに実行権を付与すると共に、各タスクの動作時間(実行権が付与される時間)を、各自に設定された1周期内動作時間とすることで、リアルタイム性を保証した状態で各アプリケーションを動作させる。なお、このようなスケジューリング方法を、Definite Scheduling(DSとも記載)と記載する。   For this reason, the scheduling unit 11 generates a periodically arrived timing as a reference cycle, and sets one cycle of the reference cycle as a time slice (also referred to as TS (abbreviation of Time Slice)). Is set to the operation time within one cycle that is the operation time in TS and the priority that is the order in which the execution right is given. Then, in each TS, the execution right is given to each task in the order according to the priority order, and the operation time of each task (the time during which the execution right is given) is set to the operation time within one period set for each task. By doing so, each application is operated in a state where real-time performance is guaranteed. Such a scheduling method is referred to as Definite Scheduling (also referred to as DS).

また、IGスイッチがOFF或いはACCに設定されるACC OFF状態,ACC ON状態,IG OFF直後状態においては、エンジンが停止するため、制御系アプリの処理負荷が低下する。このため、スケジューリング部11は、運転状態に応じて各アプリケーションを構成するタスクの動作時間を変更するよう構成されている。   Further, in the ACC OFF state, the ACC ON state, and the state immediately after IG OFF in which the IG switch is set to OFF or ACC, the engine is stopped, so the processing load of the control system application is reduced. For this reason, the scheduling part 11 is comprised so that the operation time of the task which comprises each application may be changed according to a driving | running state.

すなわち、図2(b)に記載されているように、スケジューリング部11では、運転状態に応じて異なる長さのTSが設定されていると共に、A〜Cタスクの1TS内動作時間,優先順位が設定されたスケジューリングテーブルが、運転状態毎に個別に設けられている。   That is, as described in FIG. 2B, in the scheduling unit 11, TSs having different lengths are set according to the operation state, and the operation time and priority in the 1TS of the A to C tasks are set. The set scheduling table is individually provided for each operation state.

各スケジュールテーブルでは、対応する運転状態において予測される処理負荷に基づき各タスクの優先順位,1TS内動作時間が設定されている。具体的には、エンジンが稼動しているIG ON直後状態,IG ON定常状態や、IG OFFがなされた直後の状態であり、エンジンを停止させるための各種処理が行われるIG OFF直後状態では、制御系アプリ20を構成するA,Bタスクは、ボデー系アプリ30を構成するCタスクよりも、1TS内動作時間が長く設定されると共に、優先順位が高く設定される。一方、エンジンが停止した後、終了時間が経過したACC ON状態,ACC OFF状態では、A,Bタスクは、Cタスクよりも1TS内動作時間が短く設定されると共に、優先順位が低く設定される。   In each schedule table, the priority of each task and the operation time in 1TS are set based on the processing load predicted in the corresponding operation state. Specifically, in the state immediately after the IG ON where the engine is operating, the IG ON steady state, or the state immediately after the IG OFF is performed, in the state immediately after the IG OFF in which various processes for stopping the engine are performed, The A and B tasks configuring the control system application 20 are set to have a higher operation time within 1 TS and higher priority than the C task configuring the body system application 30. On the other hand, in the ACC ON state and the ACC OFF state in which the end time has elapsed after the engine has stopped, the A and B tasks are set to have a shorter operation time within 1 TS than the C task, and the priority order is set lower. .

そして、スケジューリング部11は、運転状態に応じてTSを切り替えると共に、運転状態に対応するスケジューリングテーブルを選択し、選択したスケジューリングテーブルに従いA〜Cタスクに実行権を付与する。   And the scheduling part 11 switches TS according to a driving | running state, selects the scheduling table corresponding to a driving | running state, and gives an execution right to A-C task according to the selected scheduling table.

また、図3には、運転状態の変化により各タスクの動作時間が変化する様子を示すタイミングチャートが記載されている。該タイミングチャートが示すように、運転状態がACC ON状態である場合には、スケジューリング部11のスケジューラ設定部11aは、TSを5msとすると共に、ACC ON状態に対応するスケジューリングテーブル(図2(b−2))を選択する。そして、スケジューラ実行部11bは、選択されたスケジューリングテーブルに従い、各TSにおいて、Cタスク31,Aタスク21,Bタスク22の順に、それぞれ、3ms,0.5ms,0.5msの動作時間を割り当てる。   FIG. 3 also shows a timing chart showing how the operation time of each task changes due to a change in the driving state. As shown in the timing chart, when the operation state is the ACC ON state, the scheduler setting unit 11a of the scheduling unit 11 sets TS to 5 ms and sets a scheduling table corresponding to the ACC ON state (FIG. 2B). -2)) is selected. Then, according to the selected scheduling table, the scheduler execution unit 11b allocates operation times of 3 ms, 0.5 ms, and 0.5 ms in the order of the C task 31, the A task 21, and the B task 22 in each TS.

そして、IGスイッチの操作により運転状態がIG ON直後状態となると、スケジューラ設定部11aは、TSを1msとすると共に、IG ON直後状態に対応するスケジューリングテーブル(図2(b−4))を選択する。そして、スケジューラ実行部11bは、選択されたスケジューリングテーブルに従い、各TSにおいて、Aタスク21,Bタスク22,Cタスク31の順に、それぞれ、0.4ms,0.4ms,0.1msの動作時間を割り当てる。   When the operating state becomes the state immediately after IG ON by operating the IG switch, the scheduler setting unit 11a sets TS to 1 ms and selects the scheduling table (FIG. 2 (b-4)) corresponding to the state immediately after IG ON. To do. Then, according to the selected scheduling table, the scheduler execution unit 11b sets operation times of 0.4 ms, 0.4 ms, and 0.1 ms in the order of A task 21, B task 22, and C task 31, respectively, in each TS. assign.

その後、初期時間が経過し、運転状態がIG ON定常状態となると、スケジューラ設定部11aは、TSを1msのまま維持し、IG ON定常状態に対応するスケジューリングテーブル(図2(b−5))を選択する。そして、スケジューラ実行部11bは、選択されたスケジューリングテーブルに従い、各TSにおいて、Aタスク21,Bタスク22,Cタスク31の順に、それぞれ、0.4ms,0.2ms,0.1msの動作時間を割り当てる。   Thereafter, when the initial time elapses and the operation state becomes the IG ON steady state, the scheduler setting unit 11a maintains TS at 1 ms, and the scheduling table corresponding to the IG ON steady state (FIG. 2 (b-5)). Select. Then, according to the selected scheduling table, the scheduler execution unit 11b sets operation times of 0.4 ms, 0.2 ms, and 0.1 ms in order of the A task 21, the B task 22, and the C task 31, respectively, in each TS. assign.

(3)各タスクの動作時間の変更について
次に、運転状態に応じて各タスクに割り当てられる動作時間を変更する処理について、詳細に説明する。なお、以下の説明では、制御プログラム1を構成する部位が処理を行うといった記載がなされているが、これは、該部位に従い動作するCPU110により処理が行われるということを意味する。
(3) About change of operation time of each task Next, the process which changes the operation time allocated to each task according to a driving | running state is demonstrated in detail. In the following description, it is described that a part constituting the control program 1 performs processing. This means that processing is performed by the CPU 110 operating according to the part.

(3−1)状態変化検知処理について
まず、運転状態の変化を検知する状態変化検知処理について、図4(a)に記載のフローチャートを用いて説明する。なお、本処理は、制御プログラム1のスケジューリング部11のスケジューラ設定部11aにて定期的に実行される処理である。
(3-1) About state change detection processing First, the state change detection processing which detects the change of a driving | running state is demonstrated using the flowchart as described in Fig.4 (a). This process is a process periodically executed by the scheduler setting unit 11a of the scheduling unit 11 of the control program 1.

S305では、スケジューラ設定部11aは、デバイス制御部12を介して検出した各電源端子の電圧値に基づき現在の運転状態を判別すると共に、運転状態の変化を検知する。そして、運転状態が変化した場合には(S305:Yes)、S310に処理を移行し、運転状態が変化していない場合には(S305:No)、本処理を終了する。   In S305, the scheduler setting unit 11a determines the current operation state based on the voltage value of each power supply terminal detected via the device control unit 12, and detects a change in the operation state. If the operating state has changed (S305: Yes), the process proceeds to S310. If the operating state has not changed (S305: No), this process ends.

S310では、スケジューラ設定部11aは、スケジュールテーブル変更フラグをONし、S315に処理を移行する。
S315では、スケジューラ設定部11aは、現在の運転状態を記憶し、本処理を終了する。
In S310, the scheduler setting unit 11a turns on the schedule table change flag, and proceeds to S315.
In S315, the scheduler setting part 11a memorize | stores the present driving | running state, and complete | finishes this process.

(3−2)テーブル切替処理について
次に、運転状態の変化に応じてTSやスケジュールテーブルを切り替えるテーブル切替処理について、図4(b)に記載のフローチャートを用いて説明する。なお、本処理は、スケジューラ設定部11aにて定期的に実行される処理である。
(3-2) Table switching process Next, a table switching process for switching a TS or a schedule table in accordance with a change in the operation state will be described with reference to the flowchart shown in FIG. This process is a process periodically executed by the scheduler setting unit 11a.

S405では、スケジューラ設定部11aは、スケジュールテーブル変更フラグがONか否かを判定し、肯定判定が得られた場合には(S405:Yes)、S410に処理を移行すると共に、否定判定が得られた場合には(S405:No)、本処理を終了する。   In S405, the scheduler setting unit 11a determines whether or not the schedule table change flag is ON. If an affirmative determination is obtained (S405: Yes), the process proceeds to S410 and a negative determination is obtained. If this happens (S405: No), this process ends.

S410では、スケジューラ設定部11aは、現在の運転状態に応じてTSとスケジュールテーブルとを設定し、S415に処理を移行する。
S415では、スケジューラ設定部11aは、スケジュールテーブル変更フラグをクリアし、本処理を終了する。
In S410, the scheduler setting unit 11a sets a TS and a schedule table according to the current operation state, and the process proceeds to S415.
In S415, the scheduler setting unit 11a clears the schedule table change flag, and ends this process.

[第二実施形態]
[構成の説明]
第二実施形態においても、ECUは、第一実施形態と同様の制御系の機能とボデー系の機能を有するが、制御プログラムの構成が異なっており、第二実施形態では、各機能が仮想マシン(VM(Virtual Machineの略)とも記載)により実現される。
[Second Embodiment]
[Description of configuration]
Also in the second embodiment, the ECU has the same control system function and body system function as in the first embodiment, but the configuration of the control program is different. In the second embodiment, each function is a virtual machine. (Also described as VM (abbreviation of Virtual Machine)).

ここで、VMについて説明する。VMとは、所定の装置において実現される機能の全部または一部を再現するためのプログラムであり、該装置に搭載されているプログラムの全部または一部をバイナリコードの状態で移植したプログラムや、後述する仮想CPU等から構成される。第二実施形態の制御プログラムは、制御系のECUを仮想化した第一VMと、ボデー系のECUを仮想化した第二VMとを有しており、これらのVMを並行して動作させることにより、制御系のECUとボデー系のECUにおいて実現されていた機能を、一つのECUにおいて同時に実現させる。   Here, the VM will be described. The VM is a program for reproducing all or a part of the functions realized in a predetermined device, and a program in which all or a part of the program installed in the device is transplanted in the state of binary code, It is composed of a virtual CPU, which will be described later. The control program of the second embodiment has a first VM that virtualizes a control system ECU and a second VM that virtualizes a body system ECU, and operates these VMs in parallel. Thus, the functions realized in the control ECU and the body ECU are simultaneously realized in one ECU.

図5には、第二実施形態におけるECU100の概略構成と、ECU100を制御する制御プログラム500の構成を示すブロック図が記載されている。
ECU100は、第一実施形態と同様に構成されている。
FIG. 5 is a block diagram illustrating a schematic configuration of the ECU 100 and a configuration of a control program 500 that controls the ECU 100 in the second embodiment.
The ECU 100 is configured similarly to the first embodiment.

また、第二実施形態の制御プログラム500は、上述の第一VM520,第二VM530と、これらのVMを動作させるVM制御管理部510とを有している。
まず、第一,第二VMについて説明する。
The control program 500 according to the second embodiment includes the first VM 520 and the second VM 530 described above, and a VM control management unit 510 that operates these VMs.
First, the first and second VMs will be described.

第一VM520は、制御系のECUで稼動していたプログラムをバイナリコードの状態で移植したものであるエンジン制御系アプリ521,OS522と、これらをエミュレートするプログラムであり、いわゆる仮想化されたハードウェアに相当する仮想デバイス523,仮想CPU524を有している。また、エンジン制御系アプリ521は、Aタスク521aやBタスク521b等から構成されている。   The first VM 520 is a program that emulates an engine control system application 521 and an OS 522 that are transplanted in a binary code state of a program that was running on the control system ECU, and is a so-called virtual hardware. A virtual device 523 corresponding to hardware, and a virtual CPU 524. The engine control system application 521 includes an A task 521a and a B task 521b.

OS522は、Aタスク521a,Bタスク521b等のスケジューリングを行う周知のOSであり、リアルタイムOSとして構成されている。
また、仮想CPU524は、エンジン制御系アプリ521やOS522のバイナリコードを解析して実行するプログラムとして構成されている。
The OS 522 is a well-known OS that performs scheduling of the A task 521a, the B task 521b, and the like, and is configured as a real-time OS.
The virtual CPU 524 is configured as a program that analyzes and executes binary codes of the engine control system application 521 and the OS 522.

また、仮想デバイス523は、エンジン制御系アプリ521,OS522と、ECU100の物理デバイス120との間のI/Fとなるプログラムであり、エンジン制御系アプリ521,OS522は、仮想デバイス523にアクセスすることで物理デバイス120を制御する。   The virtual device 523 is a program that is an I / F between the engine control system application 521 and the OS 522 and the physical device 120 of the ECU 100, and the engine control system application 521 and the OS 522 access the virtual device 523. To control the physical device 120.

また、第二VM530についても、ボデー系のECUで稼動していたプログラムをバイナリコードの状態で移植したものであるボデー系アプリ531,OS532と、第一VM520と同様の仮想デバイス523,仮想CPU524を有している。また、ボデー系アプリ531は、Cタスク531a等から構成されている。   As for the second VM 530, a body application 531 and OS 532, which are transplanted programs in the body system ECU in a binary code state, and a virtual device 523 and a virtual CPU 524 similar to those of the first VM 520 are provided. Have. The body application 531 includes a C task 531a and the like.

次に、VM制御管理部510について説明する。
VM制御管理部510は、VMのスケジューリングを行うスケジューリング部511と、物理デバイス120からの信号を各VMの仮想デバイスに通知すると共に、該仮想デバイスからの指示に応じて物理デバイス120を制御するデバイス制御部512とを有している。また、スケジューリング部511は、各VMに実行権が付与される時間(動作時間)や、各VMの優先順位を設定するスケジューラ設定部511aと、設定された動作時間や優先順位に従い各VMに実行権を付与することで、これらのVMを並行して動作させるスケジューラ実行部511bとを有している。
Next, the VM control management unit 510 will be described.
The VM control management unit 510 notifies a scheduling unit 511 that performs VM scheduling, a signal from the physical device 120 to the virtual device of each VM, and controls the physical device 120 according to an instruction from the virtual device And a control unit 512. In addition, the scheduling unit 511 executes a time (operation time) when an execution right is given to each VM and a scheduler setting unit 511a for setting the priority of each VM, and executes each VM according to the set operation time and priority. It has a scheduler execution unit 511b that operates these VMs in parallel by granting the right.

[動作の説明]
次に、第二実施形態の制御プログラム500の動作について説明する。
第二実施形態のECU100も、第一実施形態と同様、エンジンにより駆動される車両に搭載されると共に、電源管理ECU200から電力供給が行われ、運転状態として、ACC OFF状態,ACC ON状態,IG OFF直後状態,IG ON直後状態,IG ON定常状態が設けられており、該運転状態は、IGスイッチの操作等に応じて変化する。
[Description of operation]
Next, the operation of the control program 500 of the second embodiment will be described.
Similarly to the first embodiment, the ECU 100 of the second embodiment is mounted on a vehicle driven by an engine, and is supplied with power from the power management ECU 200, and the operation states are the ACC OFF state, the ACC ON state, and the IG. A state immediately after OFF, a state immediately after IG ON, and an IG ON steady state are provided, and the operating state changes according to the operation of the IG switch and the like.

また、第一,第二VM520,530にはリアルタイム性が要求されているため、第一実施形態と同様にDSにより各VMが動作される。すなわち、スケジューリング部511は、各VMについて、TSにおける動作時間である1周期内動作時間と、実行権が付与される順番である優先順位とを設定し、各TSにおいて、優先順位に応じた順番で各VMに実行権を付与すると共に、各VMの動作時間を各自に設定された1周期内動作時間とする。   Further, since the first and second VMs 520 and 530 are required to have real-time properties, each VM is operated by the DS as in the first embodiment. That is, the scheduling unit 511 sets, for each VM, the operation time within one cycle that is the operation time in the TS and the priority order that is the order in which the execution right is given, and the order according to the priority order in each TS. Then, the execution right is given to each VM, and the operation time of each VM is set to the operation time within one period set for each VM.

また、IGスイッチがOFF或いはACCに設定されるACC OFF状態,ACC ON状態においては、エンジンが停止するため、エンジン制御系アプリ521が搭載されている第一VM520の処理負荷が低下する。このため、スケジューリング部511は、第一実施形態と同様にして、運転状態に応じて各VMの動作時間を変更するよう構成されている。   Further, in the ACC OFF state and the ACC ON state in which the IG switch is set to OFF or ACC, the engine is stopped, so the processing load on the first VM 520 in which the engine control system application 521 is mounted is reduced. For this reason, the scheduling unit 511 is configured to change the operation time of each VM in accordance with the operation state, as in the first embodiment.

すなわち、図6に記載されているように、スケジューリング部511では、運転状態に応じて異なる長さのTSが設定されていると共に、第一,第二VMの1TS内動作時間,優先順位が設定されたスケジューリングテーブルが、運転状態毎に個別に設けられている。第一実施形態と同様、各スケジュールテーブルでは、対応する運転状態において予測される処理負荷に基づき、各VMの優先順位,1TS内動作時間の長さが設定されている。そして、運転状態に応じてTSを切り替えると共に、運転状態に対応するスケジューリングテーブルを選択し、選択したスケジューリングテーブルに従い第一,第二VMに実行権を付与する。   That is, as described in FIG. 6, in the scheduling unit 511, TSs having different lengths are set according to the operation state, and the operation time and priority in the 1TS of the first and second VMs are set. The scheduling table thus prepared is individually provided for each operating state. Similar to the first embodiment, in each schedule table, the priority order of each VM and the length of the operation time in 1TS are set based on the processing load predicted in the corresponding operation state. And while switching TS according to a driving | running state, the scheduling table corresponding to a driving | running state is selected, and the execution right is provided to 1st, 2nd VM according to the selected scheduling table.

また、図7には、運転状態の変化により各VMの動作時間が変化する様子を示すタイミングチャートが記載されている。該タイミングチャートが示すように、運転状態がACC ON状態である場合には、スケジューリング部511のスケジューラ設定部511aは、TSを5msとすると共に、ACC ON状態に対応するスケジューリングテーブル(図6(b))を選択する。そして、スケジューラ実行部511bは、選択されたスケジューリングテーブルに従い、各TSにおいて、第二VM530,第一VM520の順に、それぞれ、3ms,1msの動作時間を割り当てる。   FIG. 7 also shows a timing chart showing how the operating time of each VM changes due to a change in operating state. As shown in the timing chart, when the operation state is the ACC ON state, the scheduler setting unit 511a of the scheduling unit 511 sets the TS to 5 ms and sets a scheduling table corresponding to the ACC ON state (FIG. 6B). )). Then, according to the selected scheduling table, the scheduler execution unit 511b allocates operation times of 3 ms and 1 ms in each TS in the order of the second VM 530 and the first VM 520, respectively.

そして、IGスイッチの操作により運転状態がIG ON直後状態となると、スケジューラ設定部511aは、TSを1msとすると共に、IG ON直後状態に対応するスケジューリングテーブル(図6(d))を選択する。そして、スケジューラ実行部511bは、選択されたスケジューリングテーブルに従い、各TSにおいて、第一VM520,第二VM530の順に、それぞれ、0.8ms,0.1msの動作時間を割り当てる。   When the operating state becomes the state immediately after IG ON by operating the IG switch, the scheduler setting unit 511a sets TS to 1 ms and selects the scheduling table (FIG. 6D) corresponding to the state immediately after IG ON. Then, according to the selected scheduling table, the scheduler execution unit 511b assigns operating times of 0.8 ms and 0.1 ms in the order of the first VM 520 and the second VM 530, respectively, in each TS.

その後、初期時間が経過し、運転状態がIG ON定常状態となると、スケジューラ設定部511aは、TSを1msのまま維持し、IG ON定常状態に対応するスケジューリングテーブル(図6(e))を選択する。そして、スケジューラ実行部511bは、選択されたスケジューリングテーブルに従い、各TSにおいて、第一VM520,第二VM530の順に、それぞれ、0.6ms,0.1msの動作時間を割り当てる。   After that, when the initial time has elapsed and the operation state becomes the IG ON steady state, the scheduler setting unit 511a maintains TS at 1 ms and selects the scheduling table corresponding to the IG ON steady state (FIG. 6 (e)). To do. Then, according to the selected scheduling table, the scheduler execution unit 511b allocates operation times of 0.6 ms and 0.1 ms in the order of the first VM 520 and the second VM 530, respectively, in each TS.

また、第二実施形態の制御プログラム500のスケジューラ設定部511aでは、それぞれ、第一実施形態と同様の状態変化検知処理,テーブル切替処理が実行される。これらの処理により、運転状態に応じてTSやスケジュールテーブルの変更が行われる。   In the scheduler setting unit 511a of the control program 500 of the second embodiment, the same state change detection process and table switching process as those of the first embodiment are executed. With these processes, the TS and the schedule table are changed according to the operating state.

[第三実施形態]
第一,第二実施形態では、エンジンにより駆動される車両に搭載されたECUでのタスクやVMのスケジューリングにおいて、運転状態に応じて、TS,優先順位,1TS内動作時間を変更することで、各タスク或いはVMが動作する頻度を変更するという構成について説明した。しかしながら、運転状態に限らず、他の車両の状態に応じて各タスク等が動作する頻度を変更しても良い。
[Third embodiment]
In the first and second embodiments, in the task and VM scheduling in the ECU mounted on the vehicle driven by the engine, the TS, the priority, and the operation time in 1TS are changed according to the driving state. The configuration of changing the frequency at which each task or VM operates has been described. However, not only the driving state but also the frequency at which each task or the like operates may be changed according to the state of another vehicle.

具体例を挙げると、エンジン及びモータにより駆動力を得るハイブリッド車に搭載され、運転手の操作に応じて該エンジン及びモータを制御することで車速を制御する1台の車速制御ECUにおいて、エンジン,モータのいずれから駆動力を得ているか(駆動状態とも記載)に応じて各タスク(或いはVM)が動作する頻度を変更しても良い。すなわち、車速制御ECUでは、エンジンを制御する1または複数のタスク(エンジン制御タスク)と、モータを制御する1または複数のタスク(モータ制御タスク)が設けられていると共に、第一実施形態の制御プログラム1と同様のOSが設けられており、該OSは、DSによりこれらのタスクを動作させる。   As a specific example, in one vehicle speed control ECU that is mounted on a hybrid vehicle that obtains driving force by an engine and a motor and controls the vehicle speed by controlling the engine and the motor according to the operation of the driver, The frequency at which each task (or VM) operates may be changed depending on from which motor the driving force is obtained (also described as the driving state). That is, the vehicle speed control ECU is provided with one or more tasks (engine control task) for controlling the engine and one or more tasks (motor control task) for controlling the motor, and the control of the first embodiment. An OS similar to the program 1 is provided, and the OS operates these tasks by DS.

また、図8に記載されているように、ハイブリッド車では、駆動状態として、エンジン,モータの双方から駆動力を得ていない停止状態と、エンジンのみから駆動力を得ているエンジン駆動状態と、モータのみから駆動力を得ているモータ駆動状態と、エンジン,モータの双方から駆動力を得ているエンジン/モータ駆動状態の4つの状態が存在し、各状態につき個別にスケジュールテーブルが設けられている。そして、第一,第二実施形態と同様、各スケジュールテーブルでは、各駆動状態において予測される処理負荷に基づき、各タスクの優先順位,1TS内動作時間が設定されている。   Further, as described in FIG. 8, in the hybrid vehicle, as a driving state, a stopped state where driving force is not obtained from both the engine and the motor, and an engine driving state where driving force is obtained only from the engine, There are four states: a motor drive state where the drive force is obtained only from the motor, and an engine / motor drive state where the drive force is obtained from both the engine and motor, and a schedule table is provided for each state. Yes. As in the first and second embodiments, in each schedule table, the priority order of each task and the operation time in 1TS are set based on the processing load predicted in each driving state.

そして、エンジン/モータ駆動状態,停止状態に対応するスケジュールテーブルでは、エンジン制御タスクの1TS内動作時間とモータ制御タスクの1TS内動作時間が同程度に設定される。   In the schedule table corresponding to the engine / motor driving state and the stopped state, the operation time in the 1TS of the engine control task and the operation time in the 1TS of the motor control task are set to be approximately the same.

一方、エンジン駆動状態に対応するスケジュールテーブルでは、エンジン制御タスクの優先順位をモータ制御タスクよりも高く設定すると共に、エンジン制御タスクの1TS内動作時間を、モータ制御タスクの1TS内動作時間よりも長く設定する。   On the other hand, in the schedule table corresponding to the engine driving state, the priority of the engine control task is set higher than that of the motor control task, and the operation time in 1TS of the engine control task is longer than the operation time in 1TS of the motor control task. Set.

また、モータ駆動状態に対応するスケジュールテーブルでは、モータ制御タスクの優先順位をエンジン制御タスクよりも高く設定すると共に、エンジン制御タスクの1TS内動作時間を、モータ制御タスクの1TS内動作時間よりも短く設定する。   In the schedule table corresponding to the motor drive state, the priority of the motor control task is set higher than that of the engine control task, and the operation time in 1TS of the engine control task is shorter than the operation time in 1TS of the motor control task. Set.

そして、運転状態を駆動状態に置き換えて、第一実施形態と同様の状態変化検知処理,テーブル切替処理が実行され、駆動状態に応じたスケジュールテーブルにより各タスクのスケジューリングが行われる。   Then, the driving state is replaced with the driving state, the same state change detection processing and table switching processing as those in the first embodiment are executed, and each task is scheduled by the schedule table corresponding to the driving state.

こうすることにより、ハイブリット車に搭載される車速制御ECUにおいて、駆動状態に応じて各タスクが動作する頻度を変更することができる。
[効果]
第一〜第三実施形態のECUによれば、IGスイッチの操作に基づく運転状態やエンジンやモータの駆動状態といった、自車両の状態に応じたスケジュールテーブルが個別に設けられている。そして、各スケジュールテーブルでは、予測される処理負荷に基づき各タスク或いはVMの優先順位,1TS内動作時間が設定されており、現在の自車両の状態に応じたスケジュールテーブルを用いてスケジューリングが行われる。
By doing so, in the vehicle speed control ECU mounted on the hybrid vehicle, the frequency at which each task operates can be changed according to the driving state.
[effect]
According to the ECUs of the first to third embodiments, the schedule table corresponding to the state of the host vehicle such as the driving state based on the operation of the IG switch and the driving state of the engine or the motor is individually provided. In each schedule table, the priority of each task or VM and the operation time within 1TS are set based on the predicted processing load, and scheduling is performed using the schedule table according to the current state of the host vehicle. .

このため、現在の自車両の状態に応じた最適な頻度で各タスク或いはVMを動作させることができ、CPUを効率良く使用することが可能となる。そして、これにより、CPUの性能を下げても十分なパフォーマンスを得ることができ、ECUのコストを低減させることが可能となる。   For this reason, each task or VM can be operated with the optimal frequency according to the current state of the host vehicle, and the CPU can be used efficiently. Thus, even if the CPU performance is lowered, sufficient performance can be obtained, and the cost of the ECU can be reduced.

[他の実施形態]
(1)第一,第二実施形態のECUは、エンジンで駆動される車両に搭載されているが、これに限定されることは無く、該ECUは、例えば、ハイブリット車や電気自動車に搭載されていても良い。また、このような場合であれば、IGスイッチの操作に基づく運転状態に替えて、自車両を駆動するモータやエンジンを起動するスタータスイッチの操作に基づく運転状態に応じて、タスクやVMが動作する頻度を変更しても良い。このような場合であっても、同様の効果を得ることができる。
[Other Embodiments]
(1) The ECUs of the first and second embodiments are mounted on a vehicle driven by an engine. However, the ECU is not limited to this. For example, the ECU is mounted on a hybrid vehicle or an electric vehicle. May be. In such a case, the task and the VM operate according to the operation state based on the operation of the starter switch for starting the motor and the engine for driving the vehicle or the engine instead of the operation state based on the operation of the IG switch. You may change the frequency. Even in such a case, the same effect can be obtained.

(2)また、第一,第二実施形態では、リアルタイム性が要求されるタスク或いはVMを対象としてスケジューリングが行われている。しかしながら、本発明は、リアルタイム性が要求されないタスクを対象とする場合や、リアルタイム性が要求されるタスクとされないタスクが混在している場合に適用しても、同様の効果を得ることができる。また、スケジューリングの対象として、タスクとVMとが混在している場合であっても、本発明を適用することで同様の効果を得ることができる。   (2) In the first and second embodiments, scheduling is performed for a task or VM that requires real-time performance. However, the present invention can achieve the same effect even when applied to a task that does not require real-time property or a task that does not require real-time property. Further, even when tasks and VMs are mixed as scheduling targets, the same effect can be obtained by applying the present invention.

(3)また、第一〜第三実施形態では、TSと、各タスク或いはVMの1TS内動作時間と優先順位とを変更することで、車両の状態に応じて各タスク等が動作する頻度を変更している。しかしながら、各タスク等の優先順位のみを変更しても良いし、1TS内動作時間のみを変更しても良い。また、TSを変更せず、各タスク等の優先順位及び1TS内動作時間を変更しても良い。このような場合であっても、同様の効果を得ることができる。   (3) In the first to third embodiments, by changing the operation time and priority within each TS or each task or VM, the frequency with which each task or the like operates according to the state of the vehicle is changed. It has changed. However, only the priority order of each task or the like may be changed, or only the operation time within 1 TS may be changed. Further, the priority of each task and the operation time within 1 TS may be changed without changing the TS. Even in such a case, the same effect can be obtained.

(4)第一〜第三実施形態では、DSによりタスク或いはVMのスケジューリングが行われるが、スケジューリング方法はこれに限定されることは無い。具体的には、例えば、付与された実行権を自発的に放棄するようにタスク等を構成すると共に、各タスク等の1TS内動作時間を、その総和がTSよりも長くなるように設定し、ハードなリアルタイム性が要求されるタスクに対してのみ、各TSにて1TS内動作時間が割り当てられることを保証するように構成しても良い。そして、運転状態等の車両の状態に応じて各タスク等の優先順位,1TS内動作時間のうちの少なくとも一方を変更し、各TSでは、優先順位に沿った順番で、各タスクに対し、各自の1TS内動作時間にわたり実行権を付与しても良い。このような場合であっても、車両の状態に応じて各タスクが動作する頻度を変更することができ、同様の効果を得ることができる。   (4) In the first to third embodiments, scheduling of tasks or VMs is performed by DS, but the scheduling method is not limited to this. Specifically, for example, the task is configured to voluntarily abandon the granted execution right, and the operation time within 1 TS of each task is set so that the sum is longer than TS, It may be configured to guarantee that the operation time within 1 TS is allocated in each TS only for a task that requires hard real-time property. Then, at least one of the priority order of each task and the operation time within one TS is changed according to the vehicle state such as the driving state, and each TS is assigned to each task in the order according to the priority order. The execution right may be given over the operation time within 1 TS. Even in such a case, the frequency with which each task operates can be changed according to the state of the vehicle, and similar effects can be obtained.

[特許請求の範囲との対応]
上記実施形態の説明で用いた用語と、特許請求の範囲の記載に用いた用語との対応を示す。
[Correspondence with Claims]
The correspondence between the terms used in the description of the above embodiment and the terms used in the description of the claims is shown.

第一,第三実施形態におけるOSと、第二実施形態におけるVM制御管理部が、スケジューリングプログラムに相当し、第一〜第三実施形態におけるECUが、車載装置に相当する。   The OS in the first and third embodiments and the VM control management unit in the second embodiment correspond to a scheduling program, and the ECU in the first to third embodiments corresponds to an in-vehicle device.

また、第一,第二実施形態における運転状態と、第三実施形態のエンジン及びモータの稼動状態が、自車両の状態に相当する。
また、第一,第三実施形態におけるタスクと、第二実施形態におけるVMが、タスクに相当する。
Moreover, the driving | running state in 1st, 2nd embodiment and the operating state of the engine and motor of 3rd embodiment correspond to the state of the own vehicle.
The tasks in the first and third embodiments and the VM in the second embodiment correspond to tasks.

また、状態変化検知処理のS305が判別手段,判別手順に、テーブル切替処理のS410が変更手段,変更手順に相当する。   Further, S305 of the state change detection process corresponds to a determination unit and a determination procedure, and S410 of the table switching process corresponds to a change unit and a change procedure.

1…制御プログラム、10…OS、11…スケジューリング部、11a…スケジューラ設定部、11b…スケジューラ実行部、12…デバイス制御部、20…制御系アプリ、21…Aタスク、22…Bタスク、30…ボデー系アプリ、31…Cタスク、100…ECU、110…CPU、120…物理デバイス、200…電源管理ECU、500…制御プログラム、510…VM制御管理部、511…スケジューリング部、511a…スケジューラ設定部、511b…スケジューラ実行部、512…デバイス制御部、520…第一VM、521…エンジン制御系アプリ、521a…Aタスク、521b…Bタスク、522…OS、523…仮想デバイス、524…仮想CPU、530…第二VM、531…ボデー系アプリ、531a…Cタスク、532…OS、533…仮想デバイス、534…仮想CPU。   DESCRIPTION OF SYMBOLS 1 ... Control program, 10 ... OS, 11 ... Scheduling part, 11a ... Scheduler setting part, 11b ... Scheduler execution part, 12 ... Device control part, 20 ... Control system application, 21 ... A task, 22 ... B task, 30 ... Body application, 31 ... C task, 100 ... ECU, 110 ... CPU, 120 ... physical device, 200 ... power management ECU, 500 ... control program, 510 ... VM control management unit, 511 ... scheduling unit, 511a ... scheduler setting unit 511b: Scheduler execution unit, 512 ... Device control unit, 520 ... First VM, 521 ... Engine control system application, 521a ... A task, 521b ... B task, 522 ... OS, 523 ... Virtual device, 524 ... Virtual CPU, 530 ... Second VM, 531 ... Body app, 531a ... C Tas , 532 ... OS, 533 ... virtual device, 534 ... virtual CPU.

Claims (8)

複数のタスクに対して順次実行権を付与することで、これらのタスクを並行して動作させる車載装置であって、
自車両の状態を判別する判別手段と、
前記判別手段により判別された前記自車両の状態に応じて、それぞれの前記タスクを動作させる頻度を変更する変更手段と、
を備えることを特徴とする車載装置。
It is an in-vehicle device that operates these tasks in parallel by giving execution rights to multiple tasks in sequence,
A discriminating means for discriminating the state of the host vehicle;
Changing means for changing the frequency of operating each of the tasks according to the state of the host vehicle determined by the determining means;
A vehicle-mounted device comprising:
請求項1に記載の車載装置において、
前記自車両の状態とは、自車両の運転を開始させるためのスイッチの操作に基づく状態であること、
を特徴とする車載装置。
The in-vehicle device according to claim 1,
The state of the host vehicle is a state based on an operation of a switch for starting driving of the host vehicle,
In-vehicle device characterized by
請求項1に記載の車載装置において、
自車両は、駆動力を得るためのエンジンとモータとが搭載されたハイブリッド車として構成されており、
前記自車両の状態とは、前記エンジン及び前記モータの稼動状態に基づく状態であること、
を特徴とする車載装置。
The in-vehicle device according to claim 1,
The host vehicle is configured as a hybrid vehicle equipped with an engine and a motor for obtaining driving force.
The state of the host vehicle is a state based on operating states of the engine and the motor;
In-vehicle device characterized by
請求項1から請求項3のうちのいずれか1項に記載の車載装置において、
前記車載装置は、周期的に到来するタイミングを生成して基準サイクルとし、該基準サイクルの1周期であるタイムスライスにおいて、前記タスクに順次前記実行権を付与し、
前記タスクには、それぞれ、前記タイムスライスにおいて前記実行権が付与される時間である1周期内動作時間と、前記タイムスライスにおいて前記実行権が付与される順番である優先順位とが設定されており、
前記変更手段は、前記1周期内動作時間と前記優先順位とのうちの少なくとも一つを変更することで、それぞれの前記タスクを動作させる頻度を変更すること、
を特徴とする車載装置。
In the in-vehicle device according to any one of claims 1 to 3,
The in-vehicle device generates a timing that periodically arrives as a reference cycle, and in the time slice that is one cycle of the reference cycle, sequentially grants the execution right to the task,
Each of the tasks is set with an operation time within one cycle, which is the time during which the execution right is granted in the time slice, and a priority, which is the order in which the execution right is granted in the time slice. ,
The changing means changes the frequency of operating each of the tasks by changing at least one of the operation time within one cycle and the priority.
In-vehicle device characterized by
請求項1から請求項3のうちのいずれか1項に記載の車載装置において、
それぞれの前記タスクには、単位時間あたりに前記実行権が付与される時間である動作時間が設定されており、
前記変更手段は、前記タスクに設定されている前記動作時間を変更することで、それぞれの前記タスクを動作させる頻度を変更すること、
を特徴とする車載装置。
In the in-vehicle device according to any one of claims 1 to 3,
Each of the tasks is set with an operation time which is a time for which the execution right is granted per unit time.
The change means changes the frequency of operating each task by changing the operation time set for the task,
In-vehicle device characterized by
請求項1から請求項5のうちのいずれか1項に記載の車載装置において、
前記タスクは、ある装置において実現される機能を再現するためのプログラムである仮想マシンとして構成されていること、
を特徴とする車載装置。
The in-vehicle device according to any one of claims 1 to 5,
The task is configured as a virtual machine which is a program for reproducing a function realized in a certain device;
In-vehicle device characterized by
複数のタスクに対して順次実行権を付与することで、これらのタスクを並行して動作させる車載装置用のスケジューリングプログラムであって、
自車両の状態を判別する判別手順と、
前記判別手順により判別された前記自車両の状態に応じて、それぞれの前記タスクを動作させる頻度を変更する変更手順と、
をコンピュータに実行させることを特徴とするスケジューリングプログラム。
A scheduling program for in-vehicle devices that operates these tasks in parallel by sequentially granting execution rights to a plurality of tasks,
A determination procedure for determining the state of the host vehicle;
A change procedure for changing the frequency of operating each of the tasks according to the state of the host vehicle determined by the determination procedure;
A scheduling program for causing a computer to execute the program.
複数のタスクに対して順次実行権を付与することで、これらのタスクを並行して動作させる車載装置におけるスケジューリング方法であって、
自車両の状態を判別する判別手順と、
前記判別手段により判別された前記自車両の状態に応じて、それぞれの前記タスクを動作させる頻度を変更する変更手順と、
を有することを特徴とするスケジューリング方法。
A scheduling method in an in-vehicle device that operates these tasks in parallel by sequentially granting execution rights to a plurality of tasks,
A determination procedure for determining the state of the host vehicle;
A change procedure for changing the frequency of operating each of the tasks according to the state of the host vehicle determined by the determining means;
A scheduling method characterized by comprising:
JP2011046452A 2011-03-03 2011-03-03 In-vehicle device, scheduling program, and scheduling method Pending JP2012185541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011046452A JP2012185541A (en) 2011-03-03 2011-03-03 In-vehicle device, scheduling program, and scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011046452A JP2012185541A (en) 2011-03-03 2011-03-03 In-vehicle device, scheduling program, and scheduling method

Publications (1)

Publication Number Publication Date
JP2012185541A true JP2012185541A (en) 2012-09-27

Family

ID=47015601

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011046452A Pending JP2012185541A (en) 2011-03-03 2011-03-03 In-vehicle device, scheduling program, and scheduling method

Country Status (1)

Country Link
JP (1) JP2012185541A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150090439A (en) * 2014-01-29 2015-08-06 한국전자통신연구원 Method for scheduling a task in hypervisor for many-core systems
JP2015152987A (en) * 2014-02-12 2015-08-24 株式会社日立製作所 control device
WO2020031611A1 (en) * 2018-08-06 2020-02-13 日立オートモティブシステムズ株式会社 Vehicle control device
EP3862878A1 (en) * 2020-02-04 2021-08-11 Toyota Jidosha Kabushiki Kaisha Vehicle control device, vehicle control method and storage medium storing vehicle control program
JP2021174368A (en) * 2020-04-28 2021-11-01 株式会社デンソー Real-time arithmetic processing device
JP2021179722A (en) * 2020-05-12 2021-11-18 株式会社デンソー Electronic control device
WO2022196322A1 (en) * 2021-03-18 2022-09-22 株式会社オートネットワーク技術研究所 In-vehicle apparatus, information processing method, and computer program
DE112022000894T5 (en) 2021-07-05 2023-11-30 Hitachi Astemo, Ltd. ELECTRONIC CONTROL DEVICE AND INTERNAL VEHICLE SYSTEM

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11301291A (en) * 1998-02-19 1999-11-02 Hitachi Ltd Transmission gear, and vehicle and bicycle using it
JP2000242512A (en) * 1999-02-19 2000-09-08 Hitachi Ltd Computer executing plural operating systems
JP2006281900A (en) * 2005-03-31 2006-10-19 Xanavi Informatics Corp On-vehicle information system and application execution method
JP2010262444A (en) * 2009-05-01 2010-11-18 Denso Corp Vehicle-mounted device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11301291A (en) * 1998-02-19 1999-11-02 Hitachi Ltd Transmission gear, and vehicle and bicycle using it
JP2000242512A (en) * 1999-02-19 2000-09-08 Hitachi Ltd Computer executing plural operating systems
JP2006281900A (en) * 2005-03-31 2006-10-19 Xanavi Informatics Corp On-vehicle information system and application execution method
JP2010262444A (en) * 2009-05-01 2010-11-18 Denso Corp Vehicle-mounted device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150090439A (en) * 2014-01-29 2015-08-06 한국전자통신연구원 Method for scheduling a task in hypervisor for many-core systems
KR102193747B1 (en) 2014-01-29 2020-12-21 한국전자통신연구원 Method for scheduling a task in hypervisor for many-core systems
JP2015152987A (en) * 2014-02-12 2015-08-24 株式会社日立製作所 control device
WO2020031611A1 (en) * 2018-08-06 2020-02-13 日立オートモティブシステムズ株式会社 Vehicle control device
EP3862878A1 (en) * 2020-02-04 2021-08-11 Toyota Jidosha Kabushiki Kaisha Vehicle control device, vehicle control method and storage medium storing vehicle control program
JP2021124902A (en) * 2020-02-04 2021-08-30 トヨタ自動車株式会社 Vehicle controller, vehicle control method, and vehicle control program
JP2021174368A (en) * 2020-04-28 2021-11-01 株式会社デンソー Real-time arithmetic processing device
JP7331768B2 (en) 2020-04-28 2023-08-23 株式会社デンソー Real-time processor
JP2021179722A (en) * 2020-05-12 2021-11-18 株式会社デンソー Electronic control device
JP7331774B2 (en) 2020-05-12 2023-08-23 株式会社デンソー electronic controller
WO2022196322A1 (en) * 2021-03-18 2022-09-22 株式会社オートネットワーク技術研究所 In-vehicle apparatus, information processing method, and computer program
DE112022000894T5 (en) 2021-07-05 2023-11-30 Hitachi Astemo, Ltd. ELECTRONIC CONTROL DEVICE AND INTERNAL VEHICLE SYSTEM

Similar Documents

Publication Publication Date Title
JP2012185541A (en) In-vehicle device, scheduling program, and scheduling method
US11416293B2 (en) Control unit having a scheduler for scheduling a plurality of virtual machines, and methods for scheduling a plurality of virtual machines
CN103383651A (en) Semiconductor device
JP5624084B2 (en) Computer, virtualization mechanism, and scheduling method
JP2011028559A (en) Relay program and electronic control device
US10095544B2 (en) Method and apparatus for hosting a multitasking guest on a host system
JP4985662B2 (en) Program and control device
JP2013003724A (en) In-vehicle electronic control unit
US9128757B2 (en) Method and lightweight mechanism for mixed-critical applications
CN105474174B (en) Controlling time-intensive instructions
JPWO2019239522A1 (en) Control controller and vehicle control system
JP7151631B2 (en) VEHICLE CONTROL DEVICE, VEHICLE DISPLAY SYSTEM, AND VEHICLE DISPLAY CONTROL METHOD
JP7447782B2 (en) In-vehicle computer, computer execution method and computer program
Gu et al. Design and implementation of an automotive telematics gateway based on virtualization
US20210240512A1 (en) Vehicle control device, vehicle control method and storage medium storing vehicle control program
JP2019074851A (en) Electronic control device
CN103003763A (en) Computation apparatus with coordination of the access to an internal memory and operating method
WO2020213401A1 (en) Vehicular device, and control method for vehicular device
Mishra et al. Dynamic task scheduling on multicore automotive ECUs
JP7463947B2 (en) On-vehicle ECU, program, and information processing method
WO2022102383A1 (en) Onboard ecu, program, and information processing method
CN112486142B (en) Method and system for integrating virtualized IO architecture and automobile application in ECU
JP7439773B2 (en) In-vehicle computer, computer execution method and computer program
WO2022196322A1 (en) In-vehicle apparatus, information processing method, and computer program
JP2023102188A (en) Information processing apparatus, vehicle, information processing method, and information processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140311

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140708