JP2020126353A - Vehicle control device and operation clock switching method - Google Patents

Vehicle control device and operation clock switching method Download PDF

Info

Publication number
JP2020126353A
JP2020126353A JP2019017349A JP2019017349A JP2020126353A JP 2020126353 A JP2020126353 A JP 2020126353A JP 2019017349 A JP2019017349 A JP 2019017349A JP 2019017349 A JP2019017349 A JP 2019017349A JP 2020126353 A JP2020126353 A JP 2020126353A
Authority
JP
Japan
Prior art keywords
operation clock
speed
cpu
cpus
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019017349A
Other languages
Japanese (ja)
Other versions
JP7271973B2 (en
Inventor
恒平 成瀬
Kohei Naruse
恒平 成瀬
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 JP2019017349A priority Critical patent/JP7271973B2/en
Publication of JP2020126353A publication Critical patent/JP2020126353A/en
Application granted granted Critical
Publication of JP7271973B2 publication Critical patent/JP7271973B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Multi Processors (AREA)
  • Microcomputers (AREA)
  • Power Sources (AREA)
  • Executing Machine-Instructions (AREA)
  • Hardware Redundancy (AREA)

Abstract

To reliably allow duplicate processing of a task by using a plurality of CPUs mounted in a vehicle control device.SOLUTION: It is monitored whether a plurality of CPUs mounted in a vehicle control device are executing tasks or not, and it is determined that an operation clock can be switched to a slow operation clock in each CPU of the CPUs if the CPU is not executing any task. It is determined whether it has been determined that the operation clock can be switched to the slow operation clock in another CPU or not. If it is determined that the operation clock can be switched to the slow operation clock in another CPU, the operation clock is switched to the slow operation clock there. Thus, partial CPUs of the plurality of CPUs are prevented from falling into a sleep mode. As a result, the plurality of CPUs can be used to reliably perform duplicate processing in response to the occurrence of a task to be subjected to duplicate processing.SELECTED DRAWING: Figure 1

Description

本発明は、複数個のCPU(いわゆる中央演算装置)を搭載した車両制御装置を動作させる技術に関する。 The present invention relates to a technique for operating a vehicle control device equipped with a plurality of CPUs (so-called central processing unit).

今日の車両は、CPU(いわゆる中央演算装置)を搭載した車両制御装置によって制御されている。これら車両制御装置の中には、複数個のCPUを搭載しておき、処理を分担することによって、複雑で且つ高度な制御を実行可能とした車両制御装置も提案されている(特許文献1)。
ここで、車両制御装置に搭載される部品の中では、CPUは比較的電力消費が大きいので、CPUは処理すべきタスクが無くなると、動作の遅い低速動作状態(いわゆるスリープ状態)に移行することによって、電力の消費を抑制することが通常である。
Today's vehicles are controlled by a vehicle controller equipped with a CPU (so-called central processing unit). Among these vehicle control devices, there is also proposed a vehicle control device in which a plurality of CPUs are mounted and processing is shared so that complicated and sophisticated control can be executed (Patent Document 1). ..
Here, among the components mounted in the vehicle control device, the CPU consumes relatively large amount of power, and therefore, when there are no tasks to be processed, the CPU shifts to a slow operating state (so-called sleep state) in which the operation is slow. Therefore, it is usual to suppress the power consumption.

また、複数個のCPUを搭載した車両制御装置では、安全上から重要と考えられる処理に関しては、複数個のCPUで重複して処理することによって、安全性を確保することも提案されている。 Further, in a vehicle control device equipped with a plurality of CPUs, it has been proposed that the safety is ensured by performing redundant processings by a plurality of CPUs for processing considered important for safety.

特開2007−327348号公報JP, 2007-327348, A

しかし、複数個のCPUが搭載されていることを利用して安全性を確保しようとしても、十分な安全性を確保できない事態が生じ得るという問題があった。この理由は、重複処理すべきタスクが発生した時に、一部のCPUがスリープ状態に切り換わっていることがあり、このような場合は、低速動作状態のCPUを除いた残りのCPUで処理しなければならず、重複処理ができない事態が起こり得るためである。 However, there is a problem that even if an attempt is made to ensure safety by utilizing the fact that a plurality of CPUs are mounted, a situation may occur in which sufficient safety cannot be ensured. The reason for this is that some CPUs may have been switched to the sleep state when a task to be duplicated occurs. In such a case, the remaining CPUs except the CPU in the low-speed operating state process This is because there is a possibility that duplicate processing cannot be performed.

この発明は、従来技術における上述した課題を解決するためになされたものであり、車両制御装置に搭載されている複数個のCPUを用いてタスクを重複処理することで、確実に安全性を確保することが可能な技術の提供を目的とする。 The present invention has been made in order to solve the above-mentioned problems in the prior art, and ensures safety by duplicating tasks using a plurality of CPUs mounted in a vehicle control device. The purpose is to provide the technology that can be done.

上述した問題を解決するために本発明の車両制御装置および動作クロック切換方法では、車両制御装置に搭載されている複数個のCPUが、実行するタスクの有無を監視しており、実行するタスクが無い場合は、動作クロックを低速化可能と判断する。そして、他のCPUでも低速化可能と判断されているか否かを判断して、他のCPUでも低速化可能と判断されている場合は、動作クロックを標準速度の標準動作クロックから、標準速度よりも低速の低速動作クロックに切り換える。これに対して、他のCPUでは低速化可能と判断されていない場合は、動作クロックを標準速度の標準動作クロックのままで保持する。 In order to solve the above-mentioned problems, in the vehicle control device and the operation clock switching method of the present invention, a plurality of CPUs mounted in the vehicle control device monitor whether or not there is a task to be executed, and the task to be executed is If not, it is determined that the operation clock can be slowed down. Then, it is determined whether or not it is possible to reduce the speed of the other CPU, and if it is determined that the speed of the other CPU can also be reduced, the operation clock is changed from the standard operation clock of the standard speed to the standard speed. Also switches to a low-speed low-speed operation clock. On the other hand, if the other CPU does not determine that the speed can be reduced, the operation clock is held as the standard operation clock of the standard speed.

こうすれば、車両制御装置に搭載された複数個のCPUの中で、一部のCPUの動作クロックが低速動作クロックに切り換わって、いわゆるスリープ状態になってしまうことが無い。その結果、重複処理すべきタスクが発生すると、複数個のCPUを用いて確実に重複処理することが可能となる。 With this arrangement, the operation clocks of some of the plurality of CPUs mounted on the vehicle control device do not switch to the low-speed operation clocks, and the so-called sleep state does not occur. As a result, when a task to be duplicated occurs, it is possible to reliably perform duplicated processing using a plurality of CPUs.

複数個のCPUを搭載した本実施例の車両制御装置100の大まかな内部構造を示したブロック図である。It is a block diagram showing a rough internal structure of vehicle control device 100 of this example which mounts a plurality of CPUs. 複数個のCPUを搭載した従来の車両制御装置900では、重複処理によって安全性を確保できない事態が生じ得る理由を示した説明図である。In the conventional vehicle control device 900 equipped with a plurality of CPUs, it is an explanatory diagram showing the reason why safety may not be ensured due to duplicate processing. 本実施例の車両制御装置100に搭載されているCPU110、120が動作クロックを低速動作クロックに切り換える処理のフローチャートである。6 is a flowchart of a process in which CPUs 110 and 120 mounted on the vehicle control device 100 according to the present embodiment switch an operation clock to a low speed operation clock. 本実施例の車両制御装置100では、重複処理によって安全性を確保することが可能な理由を示した説明図である。In the vehicle control device 100 of the present embodiment, it is an explanatory diagram showing the reason why safety can be ensured by the overlapping process.

以下では、上述した本発明の内容を明確にするために、本発明の実施例について説明する。
A.装置構成 :
図1には、本実施例の車両制御装置100の大まかな内部構造が示されている。図示されるように、本実施例の車両制御装置100には、複数個(図示した例では2個)のCPU110、120や、これらのCPU110、120に動作クロックを供給する外部クロック生成部130が搭載されている。また、車両制御装置100には、図示しないインターフェース部も搭載されており、CPU110、120は、インターフェース部を介して車載ネットワーク(いわゆるCAN)に接続することによって、外部の機器との間でデータやコマンドを送受信することが可能となっている。更に、各種のスイッチSW1〜SW3の状態も、インターフェース部を介してCPU110、120に入力され、逆に、CPU110、120から外部機器に向かって出力される駆動信号OUT1、OUT2も、インターフェース部を介して出力される。
Hereinafter, in order to clarify the content of the present invention described above, examples of the present invention will be described.
A. Device configuration :
FIG. 1 shows a rough internal structure of a vehicle control device 100 of this embodiment. As shown in the figure, the vehicle control device 100 according to the present embodiment includes a plurality (two in the illustrated example) of CPUs 110 and 120, and an external clock generation unit 130 that supplies an operation clock to these CPUs 110 and 120. It is installed. Further, the vehicle control device 100 is also equipped with an interface unit (not shown), and the CPUs 110 and 120 connect to an in-vehicle network (so-called CAN) via the interface unit so as to exchange data and external devices. It is possible to send and receive commands. Further, the states of the various switches SW1 to SW3 are also input to the CPUs 110 and 120 via the interface unit, and conversely, the drive signals OUT1 and OUT2 output from the CPUs 110 and 120 to the external device are also transmitted via the interface unit. Is output.

また、CPU110は、入出力部111や、タスク実行部112や、クロック切換部113や、内蔵クロック生成部114や、判断部115を内蔵している。同様に、CPU120も、入出力部121や、タスク実行部122や、クロック切換部123や、内蔵クロック生成部124や、判断部125を内蔵している。
尚、これらの「部」は、CPU110、120が、動作クロックを切り換えるために備える機能を便宜的に分類した抽象的な概念であり、CPU110、120の内部が、これらの「部」に物理的に区分されていることを表すものではない。これらの「部」は、CPU110、120の内部に組み込まれたハードウェアとして実現することもできるし、ハードウェア上で実行されるファームウェアとして実現することもできるし、更にはこれらの組合せとして実現することもできる。
Further, the CPU 110 includes an input/output unit 111, a task execution unit 112, a clock switching unit 113, a built-in clock generation unit 114, and a determination unit 115. Similarly, the CPU 120 also includes an input/output unit 121, a task execution unit 122, a clock switching unit 123, a built-in clock generation unit 124, and a determination unit 125.
It should be noted that these "sections" are abstract concepts in which the functions of the CPUs 110 and 120 for switching operation clocks are classified for convenience, and the insides of the CPUs 110 and 120 are physically referred to as "sections". It does not mean that it is divided into. These “units” can be realized as hardware built into the CPUs 110 and 120, can be realized as firmware executed on the hardware, and are also realized as a combination thereof. You can also

入出力部111、121は、上述した図示しないインターフェース部との間で、データやコマンドなどの入出力を行う。
タスク実行部112、122は、入出力部111、112で受け取ったコマンドに基づいて、コマンドに対応するタスクを実行する。タスクは、レジスタと呼ばれる特殊なメモリーに対して、算術演算あるいは論理演算を所定の順序で行うことによって実行されるが、算術演算あるいは論理演算は動作クロックに従って実行される。
The input/output units 111 and 121 perform input/output of data, commands and the like with the interface unit (not shown) described above.
The task execution units 112 and 122 execute the tasks corresponding to the commands based on the commands received by the input/output units 111 and 112. A task is executed by performing an arithmetic operation or a logical operation on a special memory called a register in a predetermined order. The arithmetic operation or the logical operation is executed according to an operation clock.

クロック切換部113、123は、内蔵クロック生成部114、124や、外部クロック生成部130に接続されており、内蔵クロック生成部114、124で生成された動作クロックか、外部クロック生成部130で生成された動作クロックの何れかを選択して、タスク実行部112、122に供給する。外部クロック生成部130は、タスク実行部112、122を標準速度で動作させるための標準動作クロックを生成している。
また、内蔵クロック生成部114、124は、タスク実行部112、122を標準速度よりも低速で動作させるための低速動作クロックを生成している。
The clock switching units 113 and 123 are connected to the built-in clock generation units 114 and 124 and the external clock generation unit 130, and the operation clocks generated by the built-in clock generation units 114 and 124 or generated by the external clock generation unit 130. One of the selected operation clocks is selected and supplied to the task execution units 112 and 122. The external clock generation unit 130 generates a standard operation clock for operating the task execution units 112 and 122 at a standard speed.
Further, the built-in clock generation units 114 and 124 generate a low speed operation clock for operating the task execution units 112 and 122 at a speed lower than the standard speed.

判断部115、125は、タスク実行部112、125で実行中のタスク(および実行待ちのタスク)の有無を監視しており、実行中のタスク(および実行待ちのタスク)が存在しない場合には、動作クロックを低速動作クロックに切換可能と判断する。そして、クロック切換部113、123は、判断部115、125での判断結果に基づいて、タスク実行部112、122に供給する動作クロックを標準動作クロックから低速動作クロックに切り換える。 The determination units 115 and 125 monitor the presence/absence of tasks (and tasks waiting to be executed) in the task execution units 112 and 125, and when there are no tasks (and tasks waiting to be executed) that are being executed. , It is determined that the operation clock can be switched to the low speed operation clock. Then, the clock switching units 113 and 123 switch the operation clocks supplied to the task execution units 112 and 122 from the standard operation clocks to the low speed operation clocks based on the determination results of the determination units 115 and 125.

ここで、本実施例の判断部115および判断部125は互いに通信可能となっており、互いの判断結果を共有している。すなわち、判断部115は、判断部125が低速動作クロックに切換可能と判断したか否かに関する情報を保持しており、判断部125は、判断部115が低速動作クロックに切換可能と判断したか否かに関する情報を保持している。
そして、クロック切換部113は、判断部115が低速動作クロックに切換可能と判断していても、判断部125が低速動作クロックに切換可能と判断していない場合は標準動作クロックを維持しており、判断部115および判断部125が何れも低速動作クロックに切換可能と判断していた場合には、動作クロックを低速動作クロックに切り換える。クロック切換部123についても同様に、判断部125が低速動作クロックに切換可能と判断していても、判断部115が低速動作クロックに切換可能と判断していない場合は標準動作クロックを維持しており、判断部115および判断部125が何れも低速動作クロックに切換可能と判断していた場合には、動作クロックを低速動作クロックに切り換える。
こうすることによって、車両制御装置100に搭載されている複数個のCPU110、120で確実に重複処理を行うことが可能となり、車両を十分に安全に制御することが可能となる。以下、この点について詳しく説明する。
Here, the determination unit 115 and the determination unit 125 of this embodiment can communicate with each other and share the determination results of each other. That is, the determination unit 115 holds information regarding whether or not the determination unit 125 has determined that the low speed operation clock can be switched, and the determination unit 125 determines whether the determination unit 115 has determined that the low speed operation clock can be switched. Holds information about whether or not.
The clock switching unit 113 maintains the standard operation clock when the determination unit 115 determines that the low speed operation clock can be switched to, but the determination unit 125 does not determine that the low speed operation clock can be switched to. If both the determination unit 115 and the determination unit 125 have determined that the low speed operation clock can be switched, the operation clock is switched to the low speed operation clock. Similarly, with respect to the clock switching unit 123, if the determination unit 125 determines that the low speed operation clock can be switched, but the determination unit 115 does not determine that the low speed operation clock can be switched, the standard operation clock is maintained. Therefore, when both the determination unit 115 and the determination unit 125 have determined that the low speed operation clock can be switched, the operation clock is switched to the low speed operation clock.
By doing so, it becomes possible for the plurality of CPUs 110 and 120 mounted in the vehicle control device 100 to reliably perform the overlapping processing, and it is possible to control the vehicle sufficiently safely. Hereinafter, this point will be described in detail.

図2には、判断部115および判断部125が互いの判断結果を共有していない場合に、複数のCPUで重複処理すべきタスクを、重複処理できなくなる場合が存在する理由が示されている。
図2に示した車両制御装置900には、2つのCPUa910、CPUb920が搭載されている。これらのCPUa910、CPUb920にも、図1を用いて前述したCPU110、120と同様に、入出力部や、タスク実行部や、クロック切換部や、内蔵クロック生成部や、切換判断部が内蔵されている。尚、図2では図示が煩雑となることを避ける目的で、これらの「部」は図示が省略されている。但し、CPUa910に内蔵されている切換判断部と、CPUb920に内蔵されている切換判断部とは互いの判断結果を共有しておらず、この点で、図1に示した判断部115および判断部125とは異なっている。
また、車両制御装置900には、CPUa910、CPUb920に標準動作クロックを供給する外部クロック生成部も搭載されているが、この外部クロック生成部についても、図2では図示が省略されている。
FIG. 2 shows the reason why there is a case where a task to be duplicated by a plurality of CPUs cannot be duplicated when the decision units 115 and 125 do not share their decision results. ..
The vehicle control device 900 shown in FIG. 2 is equipped with two CPUs a910 and b920. Similar to the CPUs 110 and 120 described above with reference to FIG. 1, these CPUa910 and CPUb920 also include an input/output unit, a task execution unit, a clock switching unit, a built-in clock generation unit, and a switching determination unit. There is. In FIG. 2, these “sections” are omitted for the purpose of avoiding complication. However, the switching judgment unit built in the CPU a910 and the switching judgment unit built in the CPUb920 do not share the judgment result with each other, and in this respect, the judgment unit 115 and the judgment unit shown in FIG. It is different from 125.
Further, the vehicle control device 900 is also equipped with an external clock generation unit that supplies a standard operation clock to the CPUa 910 and the CPUb 920, but this external clock generation unit is not shown in FIG.

図2(a)では、CPUa910およびCPUb920に対して、複数のタスクa1、b1、b2、a2、s1の処理が要求され、少し時間を空けて新たなタスクa3〜a5の処理が要求された場合が例示されている。車両制御装置900は、CPUa910およびCPUb920で実行するタスクを分担することで、これらのタスクを迅速に実行することができる。 In FIG. 2A, the processing of a plurality of tasks a1, b1, b2, a2, and s1 is requested to the CPU a910 and the CPUb920, and processing of new tasks a3 to a5 is requested after a short time. Is illustrated. The vehicle control device 900 can execute these tasks quickly by sharing the tasks executed by the CPU a 910 and the CPU b 920.

CPUa910が分担するタスク、およびCPUb920が分担するタスクは予め決まっており、図示した例では、タスクa1〜a5はCPUa910が分担し、タスクb1、b2はCPUb920が分担する。また、制御の安全を確保する観点から重要なタスクs1については、CPUa910およびCPUb920で重複して処理するようになっている。従って、図2(a)に例示したように複数のタスクの処理が要求されると、CPUa910は、タスクa1、a2、s1、a3〜a5を処理することになり、CPUb920は、タスクb1、b2、s1を処理することになる。 The tasks assigned to the CPU a910 and the tasks assigned to the CPUb920 are predetermined. In the illustrated example, the tasks a1 to a5 are assigned to the CPUa910, and the tasks b1 and b2 are assigned to the CPUb920. Further, the task s1 that is important from the viewpoint of ensuring the safety of control is processed by the CPU a910 and the CPUb920 in duplicate. Therefore, when processing of a plurality of tasks is requested as illustrated in FIG. 2A, the CPU a910 processes the tasks a1, a2, s1, and a3 to a5, and the CPU b920 processes the tasks b1 and b2. , S1 will be processed.

その後、CPUa910およびCPUb920で、それぞれ3つのタスクの処理が終了したものとする。CPUb920が分担するタスクは3つだったので、CPUb920が分担するべき新たなタスクが生じなければ、CPUb920は処理すべきタスクの無い状態となる。その結果、CPUb920は、動作クロックを低速動作クロックに切り換えることによって、電力消費を抑制した状態(いわゆるスリープ状態)に移行する。図2(b)で、CPUb920が破線で示されているのは、CPUb920がスリープ状態となっていることを表している。
その一方で、CPUa910は未だ処理すべきタスクが残っているので、スリープ状態に移行することなく、タスクの処理を継続している。
After that, it is assumed that the CPU a 910 and the CPU b 920 have respectively finished processing three tasks. Since the CPUb 920 has three tasks shared, the CPUb 920 is in a state in which there is no task to be processed unless a new task to be shared by the CPUb 920 occurs. As a result, the CPU b920 shifts to a state in which power consumption is suppressed (so-called sleep state) by switching the operation clock to the low-speed operation clock. In FIG. 2B, the CPUb 920 indicated by a broken line means that the CPUb 920 is in a sleep state.
On the other hand, the CPU a 910 continues to process the task without transitioning to the sleep state, because the task to be processed still remains.

このような状態(すなわち、一方のCPUa910は未だスリープ状態に移行していないが、他方のCPUb920はスリープ状態に移行した状態)で、安全上の観点から重複処理すべき新たなタスクs2が発生したものとする。この場合、CPUb920はスリープ状態となっているので、CPUa910およびCPUb920で重複処理するためには、CPUb920に供給される動作クロックを標準動作クロックに切り換えることによって、CPUb920を通常の動作状態に復帰させる必要がある。しかし、CPUb920をスリープ状態から通常の動作状態に復帰させるためには時間が掛かるので、タスクs2を迅速に処理することができなくなる。このため、本来は重複処理すべきタスクs2を、CPUa910で単独処理しなければならなくなってしまう。
このような理由から、複数のCPUが搭載された車両制御装置でも、それらのCPUが、低速動作クロックに切換可能か否かの判断結果を共有していない場合には、重複処理すべきタスクを重複処理できなくなる場合が発生し得る。その結果、制御の安全性を確保できない事態が生じ得た。
In such a state (that is, one CPU a 910 has not yet transitioned to the sleep state, but the other CPU b 920 has transitioned to the sleep state), a new task s2 that should be duplicated occurs from a safety point of view. I shall. In this case, since the CPUb 920 is in the sleep state, it is necessary to return the CPUb 920 to the normal operation state by switching the operation clock supplied to the CPUb 920 to the standard operation clock in order for the CPUa 910 and the CPUb 920 to perform redundant processing. There is. However, since it takes time to return the CPUb 920 from the sleep state to the normal operation state, the task s2 cannot be processed quickly. For this reason, the task s2, which is supposed to be redundantly processed, must be independently processed by the CPU a910.
For this reason, even in a vehicle control device equipped with a plurality of CPUs, if the CPUs do not share the determination result of whether or not the CPUs can be switched to the low-speed operation clock, the tasks to be duplicated are processed. There may occur a case where duplicate processing cannot be performed. As a result, a situation may occur in which the safety of control cannot be ensured.

これに対して、図1を用いて前述したように、本実施例の車両制御装置100に搭載されたCPU110、120は、低速動作クロックに切換可能か否かの判断結果を共有しており、以下のような方法で動作クロックを低速動作クロックに切り換えている。このため、重複処理すべきタスクを確実に重複処理することが可能となり、制御の安全性を確保することが可能となっている。 On the other hand, as described above with reference to FIG. 1, the CPUs 110 and 120 mounted on the vehicle control device 100 of the present embodiment share the determination result of whether or not the low-speed operation clock can be switched, The operation clock is switched to the low speed operation clock by the following method. For this reason, it becomes possible to surely perform the duplicated processing of the tasks to be duplicated, and it is possible to secure the control safety.

B.動作クロック切換処理 :
図3には、本実施例の車両制御装置100に搭載されたCPU110、120が、動作クロックを標準動作クロックから低速動作クロックに切り換えるために実行する動作クロック切換処理のフローチャートが示されている。この処理は、CPU110およびCPU120のそれぞれで実行されている。
B. Operation clock switching process:
FIG. 3 shows a flowchart of the operation clock switching process executed by the CPUs 110 and 120 mounted on the vehicle control device 100 of the present embodiment to switch the operation clock from the standard operation clock to the low speed operation clock. This processing is executed by each of the CPU 110 and the CPU 120.

図3に示すように、動作クロック切換処理では先ず始めに、実行するタスクがあるか否かを判断する(S100)。実行するタスクがある場合は(S100:yes)、低速化可能状態に設定されているか否かを判断する(S101)。ここで、低速化可能状態とは、CPU110およびCPU120の内部状態であり、低速化可能状態に設定されている場合は、動作クロックを低速動作クロックに切換可能であることを表している。詳細には後述するが、本実施例のCPU110およびCPU120は、実行するタスクが無くなると、CPU110あるいはCPU120の内部状態を低速化可能状態に設定するようになっている。 As shown in FIG. 3, in the operation clock switching process, first, it is determined whether there is a task to be executed (S100). When there is a task to be executed (S100: yes), it is determined whether or not the speed-down enabling state is set (S101). Here, the speed-reducible state is an internal state of the CPU 110 and the CPU 120, and when the speed-reducible state is set, it means that the operation clock can be switched to the low-speed operation clock. As will be described later in detail, the CPU 110 and the CPU 120 of the present embodiment are configured to set the internal state of the CPU 110 or the CPU 120 to the speed-reducible state when there are no tasks to be executed.

そこで、実行するタスクがある場合は(S100:yes)、内部状態の設定を確認して、内部状態が低速化可能状態に設定されている場合は(S101:yes)、低速化可能状態の設定を解除した後(S102)、標準動作クロックを動作クロックとして選択する(S103)。
これに対して、内部状態が低速化可能状態に設定されていない場合は(S101:no)、低速化可能状態の設定を解除する必要は無いので、そのまま、標準動作クロックを動作クロックとして選択する(S103)。
その結果、CPU110あるいはCPU120は、標準動作クロックに従ってタスクを実行した後(S104)、再び、実行するタスクがあるか否かを判断する(S100)。
Therefore, if there is a task to be executed (S100: yes), the setting of the internal state is confirmed, and if the internal state is set to the speed-reducible state (S101: yes), the speed-reducible state is set. After releasing (S102), the standard operation clock is selected as the operation clock (S103).
On the other hand, when the internal state is not set to the speed-reducible state (S101:no), it is not necessary to cancel the setting of the speed-reducible state, and therefore the standard operation clock is selected as the operation clock as it is. (S103).
As a result, the CPU 110 or the CPU 120 executes a task according to the standard operation clock (S104), and then determines again whether there is a task to be executed (S100).

一方、実行するタスクが無いと判断した場合は(S100:no)、動作クロックを標準動作クロックから低速動作クロックに切換可能と考えられる。そこでこのような場合には(S100:no)、CPU110あるいはCPU120は自らの内部状態を低速化可能状態に設定する(S105)。 On the other hand, when it is determined that there is no task to be executed (S100: no), it is considered that the operation clock can be switched from the standard operation clock to the low speed operation clock. Therefore, in such a case (S100: no), the CPU 110 or the CPU 120 sets its internal state to the speed-reducible state (S105).

本実施例のCPU110およびCPU120は、自らの内部状態を低速化可能状態に設定すると(S105)、今度は、他のCPUも内部状態が低速化可能状態に設定されているか否かを判断する(S106)。すなわち、CPU110は、自らを低速化可能状態に設定した場合には、CPU120も低速化可能状態に設定されているか否かを判断する。同様に、CPU120も、自らを低速化可能状態に設定した場合には、CPU110も低速化可能状態に設定されているか否かを判断する。
尚、CPU110およびCPU120は、自らの低速化可能状態の設定が変更される度に(あるいは一定周期で)自らの内部状態を、他のCPUに対して送信しておき、S106の判断に際しては、他のCPUから送信されてきた内部状態を参照することによって、S106の判断を行うようにしても良い。あるいは、S106の判断に際して、他のCPUに対して内部状態を問い合わせることによって、S106の判断を行うようにしても良い。
その結果、自らの内部状態を低速化可能状態に設定した場合でも(S105)、他のCPUは低速化可能状態に設定されていないと判断した場合は(S106:no)、動作クロックを標準動作クロックに保持したまま、再び処理の先頭に戻って、実行するタスクがあるか否かを判断する(S100)。
When the CPU 110 and the CPU 120 of the present embodiment set their internal states to the speed-reducible state (S105), this time, the other CPUs also determine whether or not the internal state is set to the speed-reducible state (S105). S106). That is, when the CPU 110 sets itself in the speed-reducible state, the CPU 110 determines whether the CPU 120 is also set in the speed-reducible state. Similarly, when the CPU 120 sets itself in the speed-reducible state, it also determines whether the CPU 110 is also set in the speed-reducible state.
It should be noted that the CPU 110 and the CPU 120 send their internal states to other CPUs every time the setting of the speed-reducible state of the CPU 110 is changed (or at a constant cycle). The determination in S106 may be made by referring to the internal state transmitted from another CPU. Alternatively, the determination in S106 may be made by inquiring another CPU about the internal state in the determination in S106.
As a result, even if the internal state of the CPU itself is set to the speed-reducible state (S105), if it is determined that the other CPU is not set to the speed-reducible state (S106: no), the operation clock is set to the standard operation. While holding the clock, the process returns to the beginning to determine whether there is a task to be executed (S100).

これに対して、自らの内部状態を低速化可能状態に設定し(S105)、更に、他のCPUも低速化可能状態に設定されていると判断した場合は(S106:yes)、動作クロックを標準動作クロックから低速動作クロックに切り換える(S107)。
その後、実行するタスクがあるか否かを判断し(S108)、実行するタスクが無い場合は(S108:no)、動作クロックを低速動作クロックに切り換えたままで、S108の判断を繰り返すことによって待機状態となる。
こうして待機している間に、実行するタスクがあると判断した場合は(S108:yes)、S102に戻って、低速化可能状態の設定を解除する(S102)。そして、動作クロックを低速動作クロックから標準動作クロックに切り換えて(S103)、標準動作クロックに従ってタスクを実行する(S104)。
On the other hand, when the internal state of the CPU itself is set to the speed-reducible state (S105) and it is determined that the other CPUs are also set to the speed-reducible state (S106: yes), the operation clock is set. The standard operation clock is switched to the low speed operation clock (S107).
After that, it is determined whether or not there is a task to be executed (S108), and when there is no task to be executed (S108: no), the operation clock is kept switched to the low-speed operation clock, and the determination in S108 is repeated to enter the standby state. Becomes
If it is determined that there is a task to be executed while waiting (S108: yes), the process returns to S102 to cancel the setting of the speed-reducible state (S102). Then, the operation clock is switched from the low-speed operation clock to the standard operation clock (S103), and the task is executed according to the standard operation clock (S104).

以上に説明したように、本実施例のCPU110およびCPU120は、実行するタスクの有無を監視しておき、タスクが無くなると、自らの動作クロックを低速動作クロックに切換可能と判断する。但し、実際に動作クロックを切り換えるに先立って、他のCPUでも、動作クロックを低速動作クロックに切換可能と判断しているか否かを確認し、他のCPUでは低速動作クロックに切換可能と判断していない場合は、動作クロックを標準動作クロックに保持しておく。そして、他のCPUでも低速動作クロックに切換可能と判断していることを確認してから、動作クロックを低速動作クロックに切り換える。その結果、CPU110およびCPU120の動作クロックは、同じタイミングで低速動作クロックに切り換わることになる。
こうすれば、複数のCPU(本実施例ではCPU110およびCPU120)で重複処理すべきタスクが発生したにも拘わらず、一方のCPUがいわゆるスリーブ状態となっていたために、残りのCPUで単独処理しなければならない事態を回避することができるので、制御の安全性を確保することが可能となる。
As described above, the CPU 110 and the CPU 120 of the present embodiment monitor the presence or absence of the task to be executed, and when the task is exhausted, determine that their own operation clock can be switched to the low speed operation clock. However, before actually switching the operating clock, check whether or not other CPUs have determined that the operating clock can be switched to the low-speed operating clock, and determine that the other CPU can switch to the low-speed operating clock. If not, the operation clock is held at the standard operation clock. Then, after confirming that the other CPU can also switch to the low speed operation clock, the operation clock is switched to the low speed operation clock. As a result, the operation clocks of the CPU 110 and the CPU 120 are switched to the low speed operation clock at the same timing.
In this way, even though a plurality of CPUs (CPU 110 and CPU 120 in this embodiment) have tasks to be processed redundantly, one CPU is in a so-called sleeve state, so that the remaining CPUs perform independent processing. Since it is possible to avoid a situation that must be performed, it is possible to ensure the safety of control.

図4には、本実施例の車両制御装置100では、重複処理すべきタスクについては確実に重複処理することが可能な理由が示されている。図2に例示した場合と同様に、図4の場合でも、CPU110およびCPU120に対して複数のタスクa1、b1、b2、a2、s1の処理が要求され、少し時間を空けて新たなタスクa3〜a5の処理が要求された場合が例示されている。これら複数のタスクの中で、タスクa1〜a5はCPU110が分担し、タスクb1、b2はCPU120が分担し、制御の安全を確保する観点から重要なタスクs1については、CPU110およびCPU120で重複して処理するようになっている。このため、図4(a)に示したように、CPU110はタスクa1、a2、s1、a3〜a5を処理することになり、CPU120はタスクb1、b2、s1を処理することになる。 FIG. 4 shows the reason why the vehicle control device 100 according to the present embodiment can surely perform the duplicate processing for the tasks to be duplicated. Similar to the case illustrated in FIG. 2, in the case of FIG. 4 as well, processing of a plurality of tasks a1, b1, b2, a2, and s1 is requested to the CPU 110 and the CPU 120, and a new task a3 to The case where the processing of a5 is requested is illustrated. Among the plurality of tasks, the tasks a1 to a5 are shared by the CPU 110, the tasks b1 and b2 are shared by the CPU 120, and the task s1 important from the viewpoint of ensuring control safety is duplicated by the CPU 110 and the CPU 120. It is supposed to be processed. Therefore, as shown in FIG. 4A, the CPU 110 processes the tasks a1, a2, s1, a3 to a5, and the CPU 120 processes the tasks b1, b2, s1.

その後、CPU110およびCPU120で、それぞれ3つのタスクの処理が終了すると、CPU120では実行するタスクがなくなるので、CPU120は内部状態を低速化可能状態に設定する(図3のS105参照)。しかし、この段階ではCPU110は未だタスクを処理しているため、内部状態が低速化可能状態には設定されていない(図3のS102参照)。従って、CPU120は、CPU110の内部状態が低速化可能状態になっていないと判断して(S106:no)、動作クロックを低速動作クロックに切り換えることがない。
このため、図4(b)に例示したように、安全上の観点から重複処理すべき新たなタスクs2が発生しても、CPU120には標準動作クロックが供給されているので、CPU110およびCPU120を用いてタスクs2を重複処理することが可能となる。
After that, when the CPU 110 and the CPU 120 finish processing the three tasks, respectively, the CPU 120 has no tasks to execute, so the CPU 120 sets the internal state to the speed-reducible state (see S105 in FIG. 3). However, at this stage, since the CPU 110 is still processing the task, the internal state is not set to the speed-reducible state (see S102 in FIG. 3). Therefore, the CPU 120 determines that the internal state of the CPU 110 is not in the speed-reducible state (S106: no) and does not switch the operation clock to the low-speed operation clock.
Therefore, as illustrated in FIG. 4B, even if a new task s2 that should be duplicated occurs from the viewpoint of safety, the standard operating clock is supplied to the CPU 120, so that the CPU 110 and the CPU 120 are It becomes possible to process the task s2 redundantly by using the task s2.

また、CPU110およびCPU120の何れも実行するタスクが無くなって、それぞれの内部状態が低速化可能状態に設定された場合には、図3のS106では「yes」と判断されて、CPU110およびCPU120の何れも動作クロックが低速動作クロックに切り換わる(S107参照)。
そして、このようにして何れのCPU110、120もスリープ状態になった状態で、重複処理すべき新たなタスクが発生した場合には、CPU110およびCPU120は動作クロックを標準動作クロックに切り換えることによって(図3のS103)、スリープ状態から通常の状態に復帰する。こうすることによって、新たなタスクの重複処理を開始することが可能となる。
Further, when there is no task to be executed by either the CPU 110 or the CPU 120 and the internal state of each is set to the speed-reducible state, it is determined as “yes” in S106 of FIG. 3, and either the CPU 110 or the CPU 120 is determined. Also changes the operation clock to the low-speed operation clock (see S107).
In this way, when a new task to be duplicated occurs in a state where all the CPUs 110 and 120 are in the sleep state, the CPU 110 and the CPU 120 switch the operation clock to the standard operation clock (see FIG. 3 (S103), the sleep state is restored to the normal state. By doing so, it becomes possible to start the duplicate processing of a new task.

以上に説明したように、本実施例の車両制御装置100では、複数のCPU110、120で重複処理すべきタスクについては確実に重複処理することができるので、制御の安全性を確保することが可能となる。 As described above, in the vehicle control device 100 according to the present embodiment, the tasks that should be duplicated by the plurality of CPUs 110 and 120 can be reliably duplicated, so that the safety of control can be ensured. Becomes

以上、本発明の実施例について説明したが、本発明は上記の実施例に限られるものではなく、その要旨を逸脱しない範囲において種々の態様で実施することができる。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above embodiments and can be implemented in various modes without departing from the scope of the invention.

100…車両制御装置、 110…CPU、 111…入出力部、
112…タスク実行部、 113…クロック切換部、
114…内蔵クロック生成部、 115…判断部、 120…CPU、
121…入出力部、 122…タスク実行部、 123…クロック切換部、
124…内蔵クロック生成部、 125…判断部、
130…外部クロック生成部、 900…車両制御装置。
100... Vehicle control device, 110... CPU, 111... Input/output unit,
112... Task execution unit, 113... Clock switching unit,
114... Built-in clock generation unit, 115... Judgment unit, 120... CPU,
121... I/O unit, 122... Task execution unit, 123... Clock switching unit,
124... Built-in clock generation unit, 125... Judgment unit,
130... External clock generation unit, 900... Vehicle control device.

Claims (2)

複数個のCPU(110、120)を搭載して車両を制御すると共に、少なくとも一部のタスクについては前記複数個のCPUを用いて重複処理する車両制御装置(100)であって、
前記CPUは、
動作クロックの供給を受けて前記タスクを実行するタスク実行部(112、122)と、
実行する前記タスクの有無を監視して、前記実行するタスクが無い場合には、前記動作クロックを低速化可能と判断する判断部(115、125)と、
前記低速化可能と判断された場合には、前記タスク実行部に供給する前記動作クロックを、標準速度の標準動作クロックから、前記標準速度よりも低速の低速動作クロックに切り換えるクロック切換部(114、124)と
を備え、
前記判断部は、前記低速化可能か否かの判断結果を、前記車両制御装置に搭載された他の前記CPUとの間で共有しており、
前記クロック切換部は、前記複数のCPUの何れでも前記低速化可能と判断されていた場合には前記動作クロックを前記低速動作クロックに切り換えるが、前記複数のCPUの何れかで前記低速化可能と判断されていない場合には前記動作クロックを前記標準動作クロックに保持する
ことを特徴とするCPUを搭載した車両制御装置。
A vehicle control device (100) which mounts a plurality of CPUs (110, 120) to control a vehicle, and at the same time performs at least a part of tasks using the plurality of CPUs in an overlapping manner.
The CPU is
A task execution unit (112, 122) that receives the operation clock and executes the task;
A determination unit (115, 125) that monitors the presence or absence of the task to be executed, and determines that the operation clock can be slowed down if there is no task to be executed;
When it is determined that the speed can be reduced, the operation clock supplied to the task execution unit is switched from the standard operation clock of standard speed to the low speed operation clock of speed lower than the standard speed (114, 124) and
The determination unit shares the determination result of whether or not the speed can be reduced with the other CPU mounted on the vehicle control device,
The clock switching unit switches the operation clock to the low speed operation clock when it is determined that the speed can be decreased by any of the plurality of CPUs, but the speed can be decreased by any of the plurality of CPUs. A vehicle control device equipped with a CPU, characterized in that the operation clock is held at the standard operation clock if not determined.
複数個のCPU(110、120)を搭載して車両を制御する車両制御装置(100)で用いられ、少なくとも一部のタスクについては互いに重複処理する前記複数個のCPUに対して適用されて、前記CPUの動作クロックを切り換える動作クロック切換方法であって、
前記動作クロックに従って前記タスクを実行するタスク実行工程(S102)と、
実行する前記タスクの有無を監視して、前記実行するタスクが無い場合には、前記動作クロックを低速化可能と判断する判断工程(S103)と、
前記低速化可能と判断された場合には、前記タスクを実行するための前記動作クロックを、標準速度の標準動作クロックから、前記標準速度よりも低速の低速動作クロックに切り換える切換工程(S105)と
を備え、
前記判断工程では、前記低速化可能か否かの判断結果を、前記車両制御装置に搭載された他の前記CPUとの間で共有しており、
前記切換工程は、前記複数のCPUの何れでも前記低速化可能と判断されていた場合には前記動作クロックを前記低速動作クロックに切り換えるが、前記複数のCPUの何れかで前記低速化可能と判断されていない場合には前記動作クロックを前記標準動作クロックに保持する
ことを特徴とする動作クロック切換方法。
It is used in a vehicle control device (100) that controls a vehicle by mounting a plurality of CPUs (110, 120), and is applied to the plurality of CPUs that perform overlapping processing for at least some tasks. An operation clock switching method for switching the operation clock of the CPU, comprising:
A task execution step (S102) of executing the task according to the operation clock;
A determination step of monitoring the presence or absence of the task to be executed, and determining that the operation clock can be slowed down if there is no task to be executed (S103),
When it is determined that the speed can be reduced, a switching step (S105) of switching the operation clock for executing the task from the standard operation clock of standard speed to a low speed operation clock lower than the standard speed. Equipped with
In the determination step, the determination result of whether or not the speed can be reduced is shared with another CPU mounted on the vehicle control device,
The switching step switches the operation clock to the low-speed operation clock when it is determined that the speed can be reduced by any of the plurality of CPUs, but it is determined that the speed can be reduced by any of the plurality of CPUs. If not, the operation clock is retained at the standard operation clock.
JP2019017349A 2019-02-01 2019-02-01 VEHICLE CONTROL DEVICE AND OPERATING CLOCK SWITCHING METHOD Active JP7271973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019017349A JP7271973B2 (en) 2019-02-01 2019-02-01 VEHICLE CONTROL DEVICE AND OPERATING CLOCK SWITCHING METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019017349A JP7271973B2 (en) 2019-02-01 2019-02-01 VEHICLE CONTROL DEVICE AND OPERATING CLOCK SWITCHING METHOD

Publications (2)

Publication Number Publication Date
JP2020126353A true JP2020126353A (en) 2020-08-20
JP7271973B2 JP7271973B2 (en) 2023-05-12

Family

ID=72084003

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019017349A Active JP7271973B2 (en) 2019-02-01 2019-02-01 VEHICLE CONTROL DEVICE AND OPERATING CLOCK SWITCHING METHOD

Country Status (1)

Country Link
JP (1) JP7271973B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114684040A (en) * 2020-12-29 2022-07-01 广达电脑股份有限公司 Electronic device for automatic driving and configuration method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005514A1 (en) * 2010-06-30 2012-01-05 Via Technologies, Inc. Multicore processor power credit management in which multiple processing cores use shared memory to communicate individual energy consumption
JP2014099099A (en) * 2012-11-15 2014-05-29 Denso Corp Control system
JP2017199221A (en) * 2016-04-28 2017-11-02 日立オートモティブシステムズ株式会社 Electronic control device
US20190004582A1 (en) * 2017-06-28 2019-01-03 Efraim Rotem System, Apparatus And Method For Loose Lock-Step Redundancy Power Management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005514A1 (en) * 2010-06-30 2012-01-05 Via Technologies, Inc. Multicore processor power credit management in which multiple processing cores use shared memory to communicate individual energy consumption
JP2014099099A (en) * 2012-11-15 2014-05-29 Denso Corp Control system
JP2017199221A (en) * 2016-04-28 2017-11-02 日立オートモティブシステムズ株式会社 Electronic control device
US20190004582A1 (en) * 2017-06-28 2019-01-03 Efraim Rotem System, Apparatus And Method For Loose Lock-Step Redundancy Power Management

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114684040A (en) * 2020-12-29 2022-07-01 广达电脑股份有限公司 Electronic device for automatic driving and configuration method thereof

Also Published As

Publication number Publication date
JP7271973B2 (en) 2023-05-12

Similar Documents

Publication Publication Date Title
US8886978B2 (en) Multiprocessor system and control method where a power saving mode control that safely stops/starts accesses to a shared memory
JP2006221381A (en) Processor system and image forming device provided with this processor system
JPH11184554A (en) Clock control type information processor
US7376853B2 (en) Network apparatus, method for controlling the same, and program for the same
JP2008129846A (en) Data processor, data processing method, and program
JP2007172334A (en) Method, system and program for securing redundancy of parallel computing system
CA2530013A1 (en) A fault tolerant computer system and a synchronization method for the same
CN111585835B (en) Control method and device for out-of-band management system and storage medium
US8060778B2 (en) Processor controller, processor control method, storage medium, and external controller
JP2020126353A (en) Vehicle control device and operation clock switching method
KR100976710B1 (en) Gateway device for car
JP2003296133A (en) Controller
JP2004516547A (en) Suspension control device
JP5783348B2 (en) Control device, control program, and image forming apparatus
US20210360118A1 (en) Communication apparatus, imaging apparatus, control method of the same, and storage medium
US8522060B2 (en) Computer system, method for controlling the same, and program
JP2005275771A (en) Power saving management device
US8621262B2 (en) Semiconductor integrated circuit and method for controlling semiconductor integrated circuit
JP2008009518A (en) Dual operation system
US8677164B2 (en) Microcomputer and control method thereof
JP3782423B2 (en) Transmission line control device multiplexing system and transmission device
JP2517895B2 (en) Job scheduling equipment for multi-system
KR101199378B1 (en) Apparatus and Method for Access between Subsystem in Multi-Core System
JPH0713791A (en) Equalizing method for duplex control system
JPH0793061A (en) Information processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220914

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221025

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221214

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230410

R151 Written notification of patent or utility model registration

Ref document number: 7271973

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151