JP7106868B2 - electronic controller - Google Patents

electronic controller Download PDF

Info

Publication number
JP7106868B2
JP7106868B2 JP2018004234A JP2018004234A JP7106868B2 JP 7106868 B2 JP7106868 B2 JP 7106868B2 JP 2018004234 A JP2018004234 A JP 2018004234A JP 2018004234 A JP2018004234 A JP 2018004234A JP 7106868 B2 JP7106868 B2 JP 7106868B2
Authority
JP
Japan
Prior art keywords
task
unit
processing time
processing
task processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018004234A
Other languages
Japanese (ja)
Other versions
JP2019125093A (en
Inventor
孝司 阿部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2018004234A priority Critical patent/JP7106868B2/en
Publication of JP2019125093A publication Critical patent/JP2019125093A/en
Application granted granted Critical
Publication of JP7106868B2 publication Critical patent/JP7106868B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

この明細書の開示は、ヘテロジニアスマルチコアを採用した電子制御装置に関する。 The disclosure of this specification relates to an electronic control device that employs a heterogeneous multicore.

自動運転や自動駐車などの先進安全への要求が高まっており、より高機能な車載電子制御装置が求められている。車両に入力される情報に対する演算は制御プロセッサにより実行されるが、入力される情報の多様化や制御すべき対象の高度化に伴い、特定の機能に特化したプロセッサ(例えば画像処理に特化したGPGPUなど)を必要な機能ごとに備えた、ヘテロジニアスマルチコアを採用した電子制御装置が用いられつつある。 The demand for advanced safety, such as automatic driving and automatic parking, is increasing, and more sophisticated in-vehicle electronic control units are in demand. Calculations for information input to vehicles are performed by control processors. An electronic control device employing a heterogeneous multi-core, which includes a GPGPU for each necessary function, is being used.

ヘテロジニアスマルチコアを採用する場合、タスクの実行前の段階でコアごとにタスクの割り当てを決める必要がある。しかしながら、負荷を事前に予測し完璧にタスクの振り分けを行うことは困難である。そこで、第1CPUで所定時間内に処理しきれない可能性がある場合に、第2CPUにタスクの移動を行い実行(処理)させる方式が考えられる。 When adopting heterogeneous multi-core, it is necessary to determine task allocation for each core before task execution. However, it is difficult to predict the load in advance and distribute the tasks perfectly. Therefore, when there is a possibility that the first CPU cannot finish processing within a predetermined time, a method of transferring the task to the second CPU and executing (processing) it is conceivable.

特許文献1の開示は、第1CPUおよび第2CPUと、第1CPUに対応した第1メモリおよび第2CPUに対応した第2メモリと、を有するマイクロコンピュータにおいて、第1メモリ内にデータ領域を持つようにプログラムされたタスクが第2メモリに転送されて第2CPUで実行される場合に、該タスクによる第1メモリへのアクセスが第2メモリへのアクセスとなるように、第2CPUから出力されたアドレスを変換するためのアドレス変換回路を有する。これにより、負荷分散のためCPU間でタスクを移行する場合の演算性能の低下を回避することができる。 Patent Document 1 discloses a microcomputer having a first CPU, a second CPU, and a first memory corresponding to the first CPU and a second memory corresponding to the second CPU, in which a data area is provided in the first memory. When the programmed task is transferred to the second memory and executed by the second CPU, the address output from the second CPU is changed so that the access to the first memory by the task becomes the access to the second memory. It has an address conversion circuit for converting. As a result, it is possible to avoid a decrease in computational performance when tasks are transferred between CPUs for load distribution.

また、ソフトウェアが各タスクの処理時間を管理し、CPUごとの実行可否を判定する支援装置を有する構成も考えられる。 Also, a configuration is conceivable in which software manages the processing time of each task and has a support device that determines whether or not each CPU can execute the task.

特開2009-199414号公報JP 2009-199414 A

しかしながら、実際の処理においては、類似したタスクであってもその処理時間は一律ではなく、関連するソフトアーキテクチャやハードアーキテクチャによって実行時間に大きなばらつきが生じる虞がある。このため、アクセス先のメモリを変更した際のアクセスサイクルを削減したり、処理帯域の監視によりスループットの低下を抑制したりする手段では、スループットの向上には十分ではない。 However, in actual processing, even similar tasks do not take the same processing time, and the execution time may vary greatly depending on the related software architecture and hardware architecture. For this reason, means for reducing the access cycle when the memory to be accessed is changed or suppressing the decrease in throughput by monitoring the processing band are not sufficient for improving the throughput.

また、処理時間のばらつきは、タスクの移行やメモリへのアクセスに係る処理増加させる虞があり、処理にかかる消費電力の増加を誘発する場合がある。 In addition, variations in processing time may increase processing related to task migration and memory access, and may induce an increase in power consumption related to processing.

そこで、この明細書の開示は、ヘテロジニアスマルチコアを採用した電子制御装置において、より効果的にタスクの割り当てが可能な電子制御装置を提供することを目的とする。 Therefore, an object of the disclosure of this specification is to provide an electronic control device that can assign tasks more effectively in an electronic control device that employs a heterogeneous multi-core.

この明細書の開示は、上記目的を達成するために以下の技術的手段を採用する。なお、特許請求の範囲およびこの項に記載した括弧内の符号は、ひとつの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、技術的範囲を限定するものではない。 The disclosure of this specification employs the following technical means to achieve the above object. It should be noted that the symbols in parentheses described in the claims and this section indicate the corresponding relationship with the specific means described in the embodiment described later as one aspect, and limit the technical scope. is not.

上記目的を達成するために、この明細書に開示される電子制御装置は、複数の演算処理装置(10,30,50)を含み、入力信号に基づいて処理を実行し出力信号を出力する制御部(70)と、制御部が実行する処理におけるタスクごとに、該タスクを特徴付ける特徴量を抽出するとともに、特徴量に対応する実際のタスク処理時間を学習するタスク処理時間予測部(80)と、を備え、タスク処理時間予測部は、タスクを実行する際に、実行すべきタスクに紐づく特徴量に基づいて、特徴量に対応するタスク処理時間を予測し、予測されたタスク処理時間に応じて、演算処理装置におけるタスクが実行可能な空き領域に処理を追加する。 In order to achieve the above object, the electronic control device disclosed in this specification includes a plurality of arithmetic processing units (10, 30, 50), and performs control for executing processing based on input signals and outputting output signals. a task processing time prediction unit (80) for extracting a feature quantity characterizing the task for each task in the processing executed by the control unit and learning the actual task processing time corresponding to the feature quantity; and a task processing time prediction unit, when executing a task, predicts a task processing time corresponding to the feature amount based on the feature amount associated with the task to be executed, and predicts the predicted task processing time , the process is added to a free area in which the task can be executed in the arithmetic processing unit.

これによれば、特徴量に基づいてタスク処理時間を学習させるので、類似したタスクであってもタスクの処理時間をより精度良く予測することができる。そして、精度良く予測されたタスク処理時間に基づいてタスクの割り当てを決定することができるので、ヘテロジニアスマルチコアを採用したマイコンにおけるスループットを向上することができる。 According to this, since the task processing time is learned based on the feature amount, it is possible to predict the task processing time with high accuracy even for similar tasks. Since task assignment can be determined based on the task processing time predicted with high accuracy, the throughput of a microcomputer employing a heterogeneous multicore can be improved.

また、演算処理装置において処理が実行されていない空き領域に、効率よく処理を割り当てることができるので、メモリアクセスの回数を抑制できるとともに処理待ちの時間を抑制できる。このため、電子制御装置としての電力消費量を抑制することができる。 In addition, it is possible to efficiently allocate processing to empty areas in which processing is not being executed in the arithmetic processing unit, so that the number of memory accesses can be reduced and the processing waiting time can be reduced. Therefore, the power consumption of the electronic control device can be suppressed.

電子制御装置の概略構成を示す図である。It is a figure which shows schematic structure of an electronic control unit. 電子制御装置の機能ブロックを示すブロック図である。3 is a block diagram showing functional blocks of an electronic control unit; FIG. 制御部の動作を示すフローチャートである。4 is a flow chart showing the operation of a control unit; タスク処理時間予測部の動作を示すフローチャートである。4 is a flow chart showing the operation of a task processing time prediction unit; 学習データ取得部の動作を示すフローチャートである。4 is a flow chart showing the operation of a learning data acquisition unit; 機械学習部の動作を示すフローチャートである。4 is a flow chart showing the operation of a machine learning unit; 処理追加部の動作を示すフローチャートである。8 is a flow chart showing the operation of a processing addition unit; タスク監視処理部の動作を示すフローチャートである。4 is a flow chart showing the operation of a task monitoring processing unit; 電子制御装置の動作を示すタイミングチャートである。4 is a timing chart showing the operation of the electronic control unit;

以下に、図面を参照しながら本開示を実施するための複数の形態を説明する。各形態において先行する形態で説明した事項に対応する部分には同一の参照符号を付して重複する説明を省略する場合がある。各形態において構成の一部のみを説明している場合は、構成の他の部分については先行して説明した他の形態を適用することができる。各形態で具体的に組み合わせが可能であることを明示している部分同士の組み合わせばかりではなく、特に組み合わせに支障が生じなければ、明示していなくても形態同士を部分的に組み合せることも可能である。 A plurality of modes for carrying out the present disclosure will be described below with reference to the drawings. In each form, the same reference numerals may be given to the parts corresponding to the matters described in the preceding form, and overlapping explanations may be omitted. When only a part of the configuration is described in each form, the previously described other forms can be applied to other parts of the configuration. In addition to the combination of parts that clearly indicate that each form can be combined, if there is no particular problem with the combination, it is also possible to partially combine the forms even if it is not specified. It is possible.

(第1実施形態)
最初に、図1および図2を参照して、本実施形態に係る電子制御装置の概略構成について説明する。
(First embodiment)
First, with reference to FIGS. 1 and 2, a schematic configuration of an electronic control unit according to this embodiment will be described.

この電子制御装置100は、車両における制御対象を制御するECU、例えばエンジンECU200などに搭載されるマイコンを含むものであり、外部からの入力信号に対して出力信号を発出し、もってアクチュエータ等を制御する。 The electronic control unit 100 includes an ECU that controls objects to be controlled in the vehicle, for example, a microcomputer mounted on the engine ECU 200 or the like. do.

入力信号とは例えば車両の走行状態に関する各種情報であり、電子制御装置100は入力された情報に基づいて適切なエンジン制御をさせるための出力信号を発出する。出力信号に基づいてエンジン回転数やスロットル開度が決定される。また別の例では、入力信号は例えば車両周辺の映像であり、電子制御装置100は、入力された車両周辺の映像に基づいて車両の周囲の駐車スペースの状態を解析して出力信号を発出する。出力信号に基づいて車輪の角度や車両速度が制御され、車両が適切な位置に駐車する。 The input signal is, for example, various information relating to the running state of the vehicle, and the electronic control unit 100 issues an output signal for appropriate engine control based on the input information. The engine speed and throttle opening are determined based on the output signal. In another example, the input signal is, for example, an image around the vehicle, and the electronic control unit 100 analyzes the state of the parking space around the vehicle based on the input image around the vehicle and issues an output signal. . The wheel angle and vehicle speed are controlled based on the output signal, and the vehicle is parked in an appropriate position.

まず、図1を参照して、電子制御装置100のハードウェア構成について説明する。この電子制御装置100は、複数のCPU10と、PMU20と、GPGPU30と、キャッシュ40と、演算ユニット50と、メモリ60と、を備えている。そして、これらの各要素は、バス110によって相互に接続されている。 First, the hardware configuration of the electronic control unit 100 will be described with reference to FIG. The electronic control unit 100 includes a plurality of CPUs 10, PMUs 20, GPGPUs 30, caches 40, arithmetic units 50, and memories 60. FIG. These elements are interconnected by a bus 110 .

CPU10は中央演算処理装置であり、入力された入力信号に基づいてプログラムを実行して出力信号を出力している。CPU10は、後述するメモリ60に格納されたプログラムを読み込んで実行することで、入力信号を処理して出力信号に変換している。本実施形態におけるCPU10は、同一構成のコアを複数備えたマルチコア構成であり、実行すべき処理を複数のコアで分散処理している。これにより、比較的高負荷な処理であっても短時間に出力信号を出力することができる。なお、CPU10を構成するアーキテクチャの種類は限定されないし、後述するキャッシュ40とは別に独自のキャッシュメモリを有していても良い。 A CPU 10 is a central processing unit that executes a program based on an input signal and outputs an output signal. The CPU 10 reads and executes a program stored in a memory 60, which will be described later, to process an input signal and convert it into an output signal. The CPU 10 in this embodiment has a multi-core configuration including a plurality of cores having the same configuration, and the processing to be executed is distributed to the plurality of cores. As a result, an output signal can be output in a short period of time even with relatively high-load processing. The type of architecture that configures the CPU 10 is not limited, and it may have its own cache memory separate from the cache 40 described later.

PMU20はプロセシングモニタユニットであり、CPU10のほか、後述のGPGPU30や演算ユニット50の演算の状況を監視する部分である。PMU20は、プログラムカウンタごとに処理に係るトレースログや実行に要した時間を抽出し、キャッシュ40やメモリ60などの記憶装置に保持する。 The PMU 20 is a processing monitor unit, and is a part that monitors the operation status of the CPU 10 as well as the GPGPU 30 and the operation unit 50, which will be described later. The PMU 20 extracts a trace log related to processing and the time required for execution for each program counter, and stores them in a storage device such as the cache 40 or the memory 60 .

ここで、トレースログとは、プログラムの進行状況が記載されたログデータであり、特許請求の範囲に記載の特徴量に相当する情報を含むデータである。ひとつのタスクの処理は、1つ以上のアドレスで実行される処理集まりであり、PMU20は、タスクごとにトレースログを紐付ける。すなわち、タスクごとに特徴量を収集する。 Here, the trace log is log data describing the progress of the program, and is data including information corresponding to the feature amount described in the scope of claims. Processing of one task is a collection of processing executed at one or more addresses, and the PMU 20 associates a trace log with each task. That is, the feature amount is collected for each task.

また、実行に要した時間とは、プログラムカウンタにより指定されたアドレスで実行された処理に要した時間である。PMU20は、上記した特徴量と同様に、タスクごとに処理に要した時間を収集する。これにより収集された時間は、タスクに対応したものであり、特許請求の範囲に記載のタスク処理時間に相当する。 Also, the time required for execution is the time required for the process executed at the address designated by the program counter. The PMU 20 collects the time required for processing for each task in the same manner as the feature amount described above. The time thus collected corresponds to the task and corresponds to the task processing time described in the claims.

GPGPU30はジェネラルパーパスグラフィックプロセシングユニットであり、ヘテロジニアスマルチコアを構成するプロセッサの一例として電子制御装置100に含まれている。GPGPU30は、画像処理に最適化された処理装置であり、入力信号としての静止画または動画の処理に用いられる。なお、GPGPU30を構成するアーキテクチャの種類は限定されないし、後述するメモリ60とは別に独自のメモリを有していても良い。 The GPGPU 30 is a general purpose graphic processing unit, and is included in the electronic control unit 100 as an example of a processor forming a heterogeneous multicore. The GPGPU 30 is a processing device optimized for image processing, and is used for processing still images or moving images as input signals. The type of architecture that configures the GPGPU 30 is not limited, and it may have its own memory separate from the memory 60 described later.

キャッシュ40は記憶装置であり、転送元のハードウェアと転送先のハードウェアとの間でプログラムやその他データの一部または全部およびその参照を一時的に保持する機能を有している。キャッシュ40は、例えばCPU10やPMU20、GPGPU30が接続されたバス110に接続されており、各ハードウェア間で送受信されるデータを一時的に保持する。キャッシュ40は記憶階層の上位レベルであるCPU10のキャッシュメモリと、下位レベルであるメモリ60とを仲介する記憶階層に位置している。 The cache 40 is a storage device, and has a function of temporarily holding part or all of programs and other data and their references between source hardware and destination hardware. The cache 40 is connected to the bus 110 to which the CPU 10, the PMU 20, and the GPGPU 30 are connected, for example, and temporarily holds data transmitted and received between each piece of hardware. The cache 40 is located in a memory hierarchy that mediates between the cache memory of the CPU 10, which is the upper level of the memory hierarchy, and the memory 60, which is the lower level.

演算ユニット50は、CPU10やGPGPU30と同様に入力信号に対して処理を実行して出力信号を発出するものであるが、ソフトウェアを実装するCPU10やGPGPU30とは異なり、ハードウェア実装により処理を実行する専用ユニットである。演算ユニット50には、例えば、ハードウェアアクセラレータなどがある。演算ユニット50もヘテロジニアスマルチコアを構成するプロセッサの一例として電子制御装置100に含まれている。 Like the CPU 10 and the GPGPU 30, the arithmetic unit 50 executes processing on an input signal and outputs an output signal. It is a dedicated unit. The arithmetic unit 50 includes, for example, a hardware accelerator. Arithmetic unit 50 is also included in electronic control unit 100 as an example of a processor forming a heterogeneous multicore.

メモリ60は記憶装置であり、例えばフラッシュメモリ、ハードディスク、SSDなどのROMや、DRAMやSRAMといったランダムアクセスメモリ(RAM)である。メモリ60はプログラムやその他のデータを保持している。メモリ60は、CPU10やGPGPU30で演算された結果や、収集される学習データ等を保持している。CPU10やGPGPU30が命令を実行する際には、求められたタスクに応じてメモリ60からプログラムが読み出され、メモリ60あるいはキャッシュ40に一時的に保持された入力信号が読み出されたプログラムに基づいて処理される。 The memory 60 is a storage device such as a flash memory, a hard disk, a ROM such as an SSD, or a random access memory (RAM) such as a DRAM or SRAM. Memory 60 holds programs and other data. The memory 60 holds the results calculated by the CPU 10 and the GPGPU 30, the learning data to be collected, and the like. When the CPU 10 or the GPGPU 30 executes an instruction, a program is read from the memory 60 according to the requested task, and the input signal temporarily held in the memory 60 or the cache 40 is based on the read program. processed by

本実施形態においては、複数のCPU10、GPGPU30、および演算ユニット50が、特許請求の範囲に記載の演算処理装置に相当し、制御部を構成する。 In this embodiment, the plurality of CPUs 10, GPGPUs 30, and arithmetic units 50 correspond to the arithmetic processing device described in the claims, and constitute a control unit.

次いで、図2を参照して、電子制御装置100が備える機能ブロックについて説明する。なお、以下に説明する各機能は、ハードウェア、ソフトウェアのいずれによって実現されてもよい。 Next, with reference to FIG. 2, functional blocks included in the electronic control unit 100 will be described. Note that each function described below may be realized by either hardware or software.

図2に示すように、電子制御装置100は、機能ブロックとして、制御部70と、タスク処理時間予測部80と、を備えている。タスク処理時間予測部80は、内部の機能ブロックとして、監視部81、学習データ取得部82、機械学習部83、処理追加部84、および、タスク監視処理部85を有している。 As shown in FIG. 2, the electronic control unit 100 includes a control unit 70 and a task processing time prediction unit 80 as functional blocks. The task processing time prediction unit 80 has a monitoring unit 81, a learning data acquisition unit 82, a machine learning unit 83, a processing addition unit 84, and a task monitoring processing unit 85 as internal functional blocks.

制御部70は、入力信号に基づいて処理を実行し、出力信号を生成および発出する部位である。制御部70の上記機能は主にプロセッサによって実行されるのであり、CPU10、GPGPU30、演算ユニット50によって実現される。制御部70は、プログラムカウンタをカウントアップしながら入力信号に基づいたプログラムを実行し、入力信号に対する処理を行うとともに、プログラムの内容に応じた出力信号を出力する。 The control unit 70 is a part that executes processing based on an input signal and generates and issues an output signal. The above functions of the control unit 70 are mainly executed by the processor, and are realized by the CPU 10, the GPGPU 30, and the arithmetic unit 50. FIG. The control unit 70 executes a program based on the input signal while counting up the program counter, processes the input signal, and outputs an output signal according to the content of the program.

タスク処理時間予測部80は、制御部70により実行される処理をプログラムカウンタごとに監視し、タスクの処理に要する時間を機械学習アルゴリズムにより学習し、その結果を以ってタスク処理時間を予測する。上記のとおり、タスク処理時間予測部80は、内部の機能ブロックとして、監視部81、学習データ取得部82、機械学習部83、処理追加部84、および、タスク監視処理部85を有している。 The task processing time prediction unit 80 monitors the processing executed by the control unit 70 for each program counter, learns the time required for task processing using a machine learning algorithm, and predicts the task processing time based on the result. . As described above, the task processing time prediction unit 80 has, as internal functional blocks, a monitoring unit 81, a learning data acquisition unit 82, a machine learning unit 83, a processing addition unit 84, and a task monitoring processing unit 85. .

監視部81は、制御部70が実行するタスクに含まれる処理をプログラムカウンタごとに監視する部位である。具体的には、監視部81は、制御部70が実行する処理に関するトレースログを取得し、処理に要する時間を計測している。監視部81の機能は、おもにPMU20が担当する。トレースログに含まれる要素としては、例えば、実行サイクル数(Processing cycle)、全実行命令数(Number of instruction)、条件分岐のtakenの割合(Branch taken)、L1Dキャッシュのヒット率(Hit ration of Level1 data)、L1Iキャッシュのヒット率(Hit ration of Level1 Instruction)、L2Dキャッシュのヒット率(Hit ration of Level2 data)、L2Iキャッシュのヒット率(Hit ration of Level2 Instruction)、条件分岐命令中における分岐先の処理率(Predictable branch speculatively executed)などがある。なお、L1Dキャッシュ、L1Iキャッシュ、L2Dキャッシュ、L2Iキャッシュは、キャッシュ40に含まれるキャッシュに属しても良いし、CPU10を構成するチップ内に内蔵されるキャッシュメモリに属しても良い。 The monitoring unit 81 is a unit that monitors the processing included in the task executed by the control unit 70 for each program counter. Specifically, the monitoring unit 81 acquires a trace log regarding the processing executed by the control unit 70 and measures the time required for the processing. The function of the monitoring unit 81 is mainly handled by the PMU 20 . Elements included in the trace log include, for example, the number of execution cycles (Processing cycle), the total number of instructions executed (Number of instructions), the ratio of conditional branch taken (Branch taken), and the L1D cache hit ratio (Hit ratio of Level 1 data), hit ratio of L1I cache (Hit ratio of Level 1 Instruction), hit ratio of L2D cache (Hit ratio of Level 2 data), hit ratio of L2I cache (Hit ratio of Level 2 Instruction), branch destination during conditional branch instruction Processing rate (Predictable branch speculatively executed), etc. The L1D cache, the L1I cache, the L2D cache, and the L2I cache may belong to the cache included in the cache 40, or may belong to the cache memory built in the chip constituting the CPU 10. FIG.

トレースログの取得サイクルは、本実施形態のようにプログラムカウンタごととしても良いし、単位時間あたりに設定したり、関数ごと、タスクごとに設定したりしても良い。 The trace log acquisition cycle may be set for each program counter as in the present embodiment, or may be set for each unit time, for each function, or for each task.

監視部81はトレースログおよびタスク処理時間を学習データ取得部82に渡す。ここで、トレースログの各項目のうち、タスクの処理時間に影響を与えるものを特徴量と称する。上記したトレースログの例はすべてタスクの処理時間に影響を及ぼすものであり、特徴量の例でもある。特徴量は、ハードウェア単体の情報だけでも、ソフトウェア単体の情報だけでもなく、ハードウェアとソフトウェアの協業による双方の特徴を畳み込んだ制御全体としての特徴を示すパラメータである。よって、ハードウェアやソフトウェアが変更になれば特徴量の値も変化するし、ノイズ、電子制御装置100が置かれる環境温度、入力信号などの外的要因によっても変化する。 The monitoring unit 81 passes the trace log and task processing time to the learning data acquisition unit 82 . Here, among the items of the trace log, those that affect the task processing time are referred to as feature amounts. All of the trace log examples described above affect task processing time and are also examples of feature amounts. The feature quantity is a parameter that indicates the characteristics of the control as a whole, in which the characteristics of both hardware and software are convoluted, not only the information of the hardware alone or the information of the software alone. Therefore, if the hardware or software is changed, the value of the feature amount will also change, and it will also change depending on external factors such as noise, the environmental temperature in which the electronic control unit 100 is placed, and the input signal.

学習データ取得部82は、監視部81から特徴量およびタスク処理時間の情報を取得し、学習データとして統計的に整理する部位である。タスク処理時間の情報は、後に詳述するタスク監視処理部85からも取得する。学習データは、必ずしも電子制御装置100自身の備えるメモリ60に格納される必要はなく、例えば、クラウド上に格納され、他のECU等と学習データを共有しても良い。 The learning data acquisition unit 82 is a part that acquires information on feature amounts and task processing times from the monitoring unit 81 and statistically organizes them as learning data. Information on the task processing time is also obtained from the task monitoring processor 85, which will be described in detail later. The learning data does not necessarily have to be stored in the memory 60 provided in the electronic control unit 100 itself. For example, the learning data may be stored in the cloud and shared with other ECUs or the like.

機械学習部83は、所定のタスクに関連する特徴量を抽出し、その特徴量を有した状態で実行されたタスクのタスク処理時間と特徴量とを関連付けて学習する部位である。この学習は機械学習アルゴリズムを利用して行われる。機械学習アルゴリズムは、例えば、k近似法、SVM(support vector machine)、決定木、ランダムフォレストなどを用いた統計的分類アルゴリズムである。機械学習部83により、実行されるタスクに対応して入力される特徴量(説明変数)に対して、タスク処理時間が目的変数として紐付けられる。 The machine learning unit 83 is a part that extracts a feature amount related to a predetermined task and learns by associating the task processing time of a task executed with the feature amount with the feature amount. This learning is done using machine learning algorithms. The machine learning algorithm is, for example, a statistical classification algorithm using k-approximation, SVM (support vector machine), decision tree, random forest, or the like. The machine learning unit 83 associates the feature amount (explanatory variable) input corresponding to the task to be executed with the task processing time as an objective variable.

なお、タスクによっては、特徴量がほぼ同一であってもタスク処理時間が大きくばらつく場合があるが、ばらつくという事実自体も学習する。すなわち、特徴量に対して、タスク処理時間が略一定なのか、あるいは一定しないのかも学習する。 Depending on the task, even if the feature amount is substantially the same, the task processing time may vary greatly, but the fact of variation itself is also learned. That is, it also learns whether the task processing time is substantially constant or not constant with respect to the feature amount.

機械学習部83は、特徴量とタスク処理時間との紐付けを機械学習アルゴリズムにより行うとともに、入力された特徴量に対して、予測されるタスク処理時間を出力して処理追加部84に渡す。 The machine learning unit 83 associates the feature amount with the task processing time by a machine learning algorithm, outputs the predicted task processing time for the input feature amount, and passes it to the processing addition unit 84 .

処理追加部84は、予測されたタスク処理時間に応じて、CPU10やGPGPU30における、タスクが実行可能な空き領域に別の処理を追加する部位である。処理追加部84は、予測されたタスク処理時間に応じて追加すべき処理を決定し、その処理を実行可能なCPU10あるいはGPGPU30などのプロセッサに処理を追加する。 The process addition unit 84 is a part that adds another process to a task-executable empty area in the CPU 10 or the GPGPU 30 according to the predicted task processing time. The processing adding unit 84 determines processing to be added according to the predicted task processing time, and adds the processing to a processor such as the CPU 10 or GPGPU 30 that can execute the processing.

タスク監視処理部85は、予測したタスク処理時間の正答率を算出して学習データに反映させ、学習データにおける所定のタスクに対するタスク処理時間のばらつきを検出し、予測したタスク処理時間に基づいて投入した別の処理が実際に処理を完了できたか否かを検証する部位である。ここで、正答率とは、例えば、予測されたタスク処理時間と実際に実行されたときのタスク処理時間との差の絶対値が所定の許容値以下であるときを正答とし、差の絶対値が許容値より大きいときを誤答として、正答と誤答の総計に対する正答の数の割合として算出されるものである。タスク監視処理部85は、タスク処理時間の情報を監視部81から取得している。 The task monitoring processing unit 85 calculates the correct answer rate of the predicted task processing time and reflects it in the learning data, detects the variation in the task processing time for a predetermined task in the learning data, and inputs based on the predicted task processing time. This is a part that verifies whether or not another process that has been executed has actually completed the process. Here, the percentage of correct answers means, for example, a correct answer when the absolute value of the difference between the predicted task processing time and the task processing time when the task is actually executed is equal to or less than a predetermined allowable value, and the absolute value of the difference It is calculated as the ratio of the number of correct answers to the total number of correct answers and incorrect answers, when is greater than the allowable value. The task monitoring processing unit 85 acquires task processing time information from the monitoring unit 81 .

次に、図3~図9を参照して、本実施形態にかかる電子制御装置100の具体的な動作フローについて説明する。図3は制御部70の動作を示すフローチャートであり、図4~図8はタスク処理時間予測部80の動作を示すフローチャートであり、図9は制御部70の実行に係るタイミングチャートである。 Next, a specific operation flow of the electronic control unit 100 according to this embodiment will be described with reference to FIGS. 3 to 9. FIG. 3 is a flow chart showing the operation of the control unit 70, FIGS. 4 to 8 are flow charts showing the operation of the task processing time prediction unit 80, and FIG. 9 is a timing chart relating to the execution of the control unit 70.

図3は、電子制御装置100が入力信号に対して出力信号を発出するフローを示す図である。図3に示すように、ステップS1において電子制御装置100に入力信号が入力されると、ステップS2に示すように制御部70が入力信号に応じた処理を行う。制御部70はプログラムを読み込むなどして入力信号を加工し、ステップS3に示すように出力信号を生成して発出する。 FIG. 3 is a diagram showing a flow in which the electronic control unit 100 issues an output signal in response to an input signal. As shown in FIG. 3, when an input signal is input to the electronic control unit 100 in step S1, the control section 70 performs processing according to the input signal as shown in step S2. The control unit 70 processes the input signal by reading a program or the like, and generates and issues an output signal as shown in step S3.

図4は、タスク処理時間予測部80の全体的な動作フローを示す図である。本実施形態では、タスク処理時間予測部80が、制御部70が実行するプログラムの進行に応じてカウントアップするプログラムカウンタ毎に図4に示すフローを実施して、タスクに対応した処理時間の学習ならびに予測を行う例について説明する。ここで学習の対象とされるタスクは、図9に示す例では、「TASK A」「TASK B」「TASK C」と示された処理である。 FIG. 4 is a diagram showing an overall operational flow of the task processing time prediction unit 80. As shown in FIG. In this embodiment, the task processing time prediction unit 80 executes the flow shown in FIG. and an example of making a prediction will be described. In the example shown in FIG. 9, the tasks to be learned here are the processes indicated as "TASK A", "TASK B", and "TASK C".

図4に示すように、タスク処理時間予測部80は、ステップS100を実行する。ステップS100は、学習データ取得部82が監視部81から特徴量およびタスク処理時間の情報を取得し、学習データとして統計的に整理するステップであり、図5に示すフローに従う。図を参照して詳しく説明する。 As shown in FIG. 4, the task processing time prediction unit 80 executes step S100. Step S100 is a step in which the learning data acquiring unit 82 acquires information on feature amounts and task processing times from the monitoring unit 81, and statistically organizes them as learning data according to the flow shown in FIG. A detailed description will be given with reference to the drawings.

図5に示すように、まずステップS101が実行される。ステップS101は、学習データ取得部82が監視部81から特徴量およびタスク処理時間の情報を取得するステップである。特徴量は、上記したとおり、例えばトレースログに含まれる情報であり、例えば実行サイクル数やキャッシュのヒット率等が含まれる。 As shown in FIG. 5, step S101 is executed first. Step S<b>101 is a step in which the learning data acquiring unit 82 acquires information on feature amounts and task processing time from the monitoring unit 81 . As described above, the feature amount is, for example, information contained in the trace log, and includes, for example, the number of execution cycles, cache hit rate, and the like.

次いで、ステップS102が実行される。ステップS102は、学習すべき対象のタスクが以前にステップS102を実行した時点から遷移しているか否かを判定するステップである。タスクが遷移していればステップS102はYES判定となり、ステップS103に進む。 Then step S102 is executed. Step S102 is a step of determining whether or not the target task to be learned has transitioned since step S102 was previously executed. If the task has transitioned, a YES determination is made in step S102, and the process proceeds to step S103.

ステップS103は、ステップS101で取得した特徴量およびタスク処理時間を格納するメモリ60上の格納領域を変更するステップである。ステップS102がYES判定であれば、ステップS103において該当する格納領域に特徴量およびタスク処理時間が格納されるように、その格納先を変更する。すなわち、特徴量およびタスク処理時間は、実行されるタスク毎に分類されて所定の格納領域に格納されるようになっている。よって、ステップS102がNO判定であれば、ステップS103を介さずにフローが進行する。 Step S103 is a step of changing the storage area on the memory 60 for storing the feature amount and the task processing time acquired in step S101. If step S102 determines YES, the storage destination is changed so that the feature amount and the task processing time are stored in the corresponding storage area in step S103. That is, the feature amount and the task processing time are classified for each task to be executed and stored in a predetermined storage area. Therefore, if the determination in step S102 is NO, the flow proceeds without going through step S103.

ステップS102がNO判定か、あるいはステップS103を実行した後、ステップS104が実行される。ステップS104は、タスクごとに設定されたメモリ60上の格納領域に特徴量およびタスク処理時間を格納するステップである。ステップS104によりタスクごとに分類された特徴量およびタスク処理時間を学習データと称する。 After step S102 determines NO or step S103 is executed, step S104 is executed. Step S104 is a step of storing the feature amount and the task processing time in the storage area on the memory 60 set for each task. The feature amount and task processing time classified for each task in step S104 are referred to as learning data.

以上のステップS101~ステップS104を含むステップS100を経て、学習データが得られる。 Learning data is obtained through step S100 including steps S101 to S104.

次に、図4に示すように、タスク処理時間予測部80は、ステップS200を実行する。ステップS200は、機械学習部83が、特徴量とタスク処理時間との紐付けを機械学習アルゴリズムにより行うとともに、入力された特徴量に対してタスク処理時間を予測するステップであり、図6に示すフローに従う。図を参照して詳しく説明する。 Next, as shown in FIG. 4, the task processing time prediction unit 80 executes step S200. Step S200 is a step in which the machine learning unit 83 associates the feature amount and the task processing time by a machine learning algorithm, and predicts the task processing time for the input feature amount. Follow the flow. A detailed description will be given with reference to the drawings.

図6に示すように、まずステップS201が実行される。ステップS201は、機械学習部83が学習データ取得部82から学習データを受け取り、タスクごとに学習データに含まれる特徴量およびタスク処理時間の情報を抽出するステップである。学習データは、ステップS100においてタスクごとに所定の格納領域に格納されているので、機械学習部83は、タスク処理時間の予測が必要なタスクに対して学習データを取得し、特徴量およびタスク処理時間の情報を抽出する。 As shown in FIG. 6, step S201 is first executed. Step S201 is a step in which the machine learning unit 83 receives learning data from the learning data acquiring unit 82, and extracts information on the feature quantity and task processing time included in the learning data for each task. Since the learning data is stored in the predetermined storage area for each task in step S100, the machine learning unit 83 acquires the learning data for the task requiring prediction of the task processing time, and calculates the feature amount and the task processing. Extract time information.

次いで、ステップS202が実行される。ステップS202は、タスク処理時間に影響を与える特徴量を選択するステップである。機械学習部83は、特徴量とタスク処理時間とを紐付けて学習する機能とともに、入力される特徴量に対するタスク処理時間を与える関数の機能を有するのであり、特徴量が説明変数、タスク処理時間が目的変数となる。ステップS202は、特徴量のうち、説明変数と成り得る特徴量を選択するステップである。なお、特徴量が同一であってもタスクの処理時間が一定であるとは限らないため、機械学習部83における関数は全単射であるとは限らない。すなわち、特徴量に対してタスク処理時間にばらつきを生じることもあるし、ばらつき以上に明らかに異なる2つ以上のタスク処理時間が学習されることもある。これはタスク監視処理部85により監視される。 Then step S202 is executed. Step S202 is a step of selecting a feature amount that affects the task processing time. The machine learning unit 83 has a function of learning by associating the feature amount and the task processing time, and a function of giving the task processing time for the input feature amount. is the target variable. Step S202 is a step of selecting a feature amount that can be an explanatory variable from among the feature amounts. It should be noted that the function in the machine learning unit 83 is not necessarily bijective because the task processing time is not always constant even if the feature amount is the same. That is, the task processing time may vary with respect to the feature amount, and two or more task processing times that are clearly different than the variation may be learned. This is monitored by the task monitoring processor 85 .

次いで、ステップS203が実行される。ステップS203は、タスクに対して特徴量が複数含まれる場合において、特徴量を統合するなどして次元を削減するステップである。具体的には、タスク処理時間と相関を有する多数の特徴量から、多変量解析により、タスク処理時間をもっともよく表す主成分を合成する操作であり、例えば主成分分析を採用することができる。ステップS203を経ることにより、学習に用いる変数の量を削減できるため、学習に係る負荷ならびにタスク処理時間の予測に係る負荷を軽減することができる。 Then step S203 is executed. Step S203 is a step of reducing dimensions by, for example, integrating feature amounts when a task includes a plurality of feature amounts. Specifically, it is an operation of synthesizing a principal component that best represents the task processing time by multivariate analysis from a large number of feature values that are correlated with the task processing time. For example, principal component analysis can be employed. By going through step S203, the amount of variables used for learning can be reduced, so the load related to learning and the load related to prediction of task processing time can be reduced.

次いで、ステップS204が実行される。ステップS204は、特徴量あるいは主成分分析により合成された説明変数に対応する、目的変数たるタスク処理時間を作成するステップである。 Then step S204 is executed. Step S204 is a step of creating a task processing time, which is an objective variable, corresponding to explanatory variables synthesized by feature amounts or principal component analysis.

次いで、ステップS205が実行される。ステップS205は、機械学習アルゴリズムに基づいて、抽出された特徴量あるいは生成された説明変数と、目的変数たるタスク処理時間とを統計的に紐付けるステップである。また、ステップS205では、入力された特徴量に対して、機械学習により予測されたタスク処理時間を出力するステップでもある。機械学習アルゴリズムとしては、例えばk近似法、SVM(support vector machine)、決定木、ランダムフォレストなどを採用できる。ステップS205を経ることにより、特徴量(説明変数)とタスク処理時間(目的変数)とが対応付けされるとともに、入力された特徴量に対して、タスク処理時間を予測して出力する。 Then step S205 is executed. Step S205 is a step of statistically linking the extracted feature amount or the generated explanatory variable with the task processing time, which is the objective variable, based on the machine learning algorithm. Step S205 is also a step of outputting the task processing time predicted by machine learning with respect to the input feature amount. As a machine learning algorithm, for example, k-approximation method, SVM (support vector machine), decision tree, random forest, etc. can be adopted. Through step S205, the feature amount (explanatory variable) and the task processing time (objective variable) are associated with each other, and the task processing time is predicted and output with respect to the input feature amount.

次に、図4に示すように、タスク処理時間予測部80は、ステップS300を実行する。ステップS300は、処理追加部84が予測されたタスク処理時間に応じて、CPU10やGPGPU30などのプロセッサにおける、タスクが実行可能な空き領域に処理を追加するステップであり、図7に示すフローに従う。図を参照して詳しく説明する。なお、ステップS300は、タスクの実行が要求されたことに対して処理を追加するステップであるから、タスクごとに実行されるフローである。 Next, as shown in FIG. 4, the task processing time prediction unit 80 executes step S300. Step S300 is a step in which the process addition unit 84 adds a process to a task-executable free area in a processor such as the CPU 10 or the GPGPU 30 according to the predicted task processing time, and follows the flow shown in FIG. A detailed description will be given with reference to the drawings. Note that step S300 is a step for adding processing in response to a request to execute a task, so the flow is executed for each task.

図7に示すように、まずステップS301が実行される。ステップS301は、処理追加部84が、所定のタスクにおいて、予測されたタスク処理時間の、予測の正答率が所定の閾値よりも高いが否かを判定するステップである。 As shown in FIG. 7, step S301 is first executed. Step S301 is a step in which the process addition unit 84 determines whether or not the correct answer rate of the predicted task processing time for a given task is higher than a given threshold.

正答率は、以下のように例えば計算される。すなわち、予測されたタスク処理時間と実際に実行されたときのタスク処理時間との差の絶対値が所定の許容値以下であるときを正答とし、差の絶対値が許容値より大きいときを誤答とする。正答の頻度(a)と誤答の頻度(b)の総計(a+b)に対する正答の頻度の割合として算出される。つまり、正答率Rは、R=a/(a+b)と定義される。正答率Rの計算は学習データの監視を担うステップS400で実行されるので、詳細は後述する。なお、正答率Rの更新はステップS300の後に実行されるステップS400で実行されるが、ステップS300で用いられる正答率Rは、過去に実行されたステップS400で計算された最新のデータが参照される。 The correct answer rate is calculated, for example, as follows. In other words, if the absolute value of the difference between the predicted task processing time and the actual task processing time is less than or equal to a predetermined allowable value, the answer is correct. answer. It is calculated as a ratio of the frequency of correct answers to the total (a+b) of the frequency of correct answers (a) and the frequency of incorrect answers (b). That is, the correct answer rate R is defined as R=a/(a+b). Since the calculation of the percentage of correct answers R is executed in step S400 responsible for monitoring learning data, the details will be described later. Note that the correct answer rate R is updated in step S400 executed after step S300, but the correct answer rate R used in step S300 refers to the latest data calculated in step S400 performed in the past. be.

ステップS301においては、正答率と比較する閾値を例えば90%としている。ステップS301では、実行されるべきタスクに紐付けられた正答率Rと、閾値である90%が比較されて、R>90%であればYES判定となる。R≦90%の場合にはNO判定となる。ステップS301がNO判定のときは、プロセッサの空き領域に処理を追加しても実行が間に合わない可能性があるため、処理の追加を行わない。 In step S301, the threshold for comparison with the percentage of correct answers is set to 90%, for example. In step S301, the percentage of correct answers R associated with the task to be executed is compared with a threshold value of 90%, and if R>90%, a YES determination is made. If R≦90%, the determination is NO. If the determination in step S301 is NO, there is a possibility that even if the process is added to the free area of the processor, it will not be executed in time, so the process is not added.

ステップS301がYES判定のとき、ステップS302に進む。ステップS302は、予測されたタスク処理時間が所定の時間以上か否かを判定するステップである。所定の時間は任意に設定されるものであるが、ステップS302では例えば10μsとされている。予測されたタスク処理時間が10μsより短い場合にはステップS302はNO判定となりステップS303に進み、「処理1」を空き領域のあるプロセッサに追加するよう指示する。タスク処理時間が10μsより短いと予測されたときには、プロセッサが比較的空いている状態であると想定できるので、「処理1」は比較的高負荷な処理を選択できる。ステップS302がYES判定の場合にはステップS304に進む。 When step S301 determines YES, the process proceeds to step S302. Step S302 is a step of determining whether or not the predicted task processing time is longer than or equal to a predetermined time. Although the predetermined time is set arbitrarily, it is set to 10 μs, for example, in step S302. If the predicted task processing time is shorter than 10 μs, a NO determination is made in step S302, and the process advances to step S303 to instruct a processor with free space to add "process 1". When the task processing time is predicted to be shorter than 10 μs, it can be assumed that the processor is relatively idle, so "process 1" can select relatively high-load processing. When step S302 determines YES, the process proceeds to step S304.

ステップS304は、ステップS302と同様に、予測されたタスク処理時間が所定の時間以上か否かを判定するステップである。所定の時間は任意に設定されるものであるが、ステップS304では例えば20μsとされている。予測されたタスク処理時間が20μsより短い場合にはステップS304はNO判定となりステップS305に進み、「処理2」を空き領域のあるプロセッサに追加するよう指示する。「処理2」に利用できる時間は「処理1」よりも短くなると想定できるので、「処理2」は「処理1」よりも軽負荷な処理となる。ステップS304がYES判定の場合にはステップS306に進む。 Step S304, like step S302, is a step of determining whether or not the predicted task processing time is equal to or longer than a predetermined time. Although the predetermined time is set arbitrarily, it is set to 20 μs, for example, in step S304. If the predicted task processing time is shorter than 20 μs, a NO determination is made in step S304, and the process advances to step S305 to instruct a processor with free space to add "processing 2". Since it can be assumed that the time available for "processing 2" is shorter than that for "processing 1", "processing 2" has a lighter load than "processing 1". When step S304 is YES determination, it progresses to step S306.

ステップS306は、ステップS302およびステップS304と同様に、予測されたタスク処理時間が所定の時間以上か否かを判定するステップである。所定の時間は任意に設定されるものであるが、ステップS306では例えば30μsとされている。予測されたタスク処理時間が30μsより短い場合にはステップS306はNO判定となりステップS307に進み、「処理3」を空き領域のあるプロセッサに追加するよう指示する。「処理3」に利用できる時間は「処理2」よりも短くなると想定できるので、「処理3」は「処理2」よりも軽負荷な処理となる。ステップS306がYES判定の場合には、プロセッサの空き領域に処理を追加しても実行が間に合わない可能性があるため、処理追加部84は処理の追加を指示しない。 Step S306 is a step of determining whether or not the predicted task processing time is equal to or longer than a predetermined time, similar to steps S302 and S304. Although the predetermined time is set arbitrarily, it is set to 30 μs, for example, in step S306. If the predicted task processing time is shorter than 30 μs, a NO determination is made in step S306, and the process advances to step S307 to instruct a processor with free space to add "processing 3". Since it can be assumed that the time available for "processing 3" is shorter than that for "processing 2", "processing 3" has a lighter load than "processing 2". If the determination in step S306 is YES, the process adding unit 84 does not instruct addition of the process because there is a possibility that the process will not be executed in time even if the process is added to the free area of the processor.

ここで、追加される処理1、処理2、処理3は、図9に示す「ADD TASK」に相当する。なお、上記した例では、タスク処理時間のクラス分類として、0μs-10μs、10μs-20μs、20μs-30μs、30μs以上、という4段階を例示したが、クラス分類の数はプロセッサや実行されるタスクの種類によって適宜設定できるものである。 Processing 1, processing 2, and processing 3 to be added here correspond to "ADD TASK" shown in FIG. In the above example, four stages of 0 μs-10 μs, 10 μs-20 μs, 20 μs-30 μs, and 30 μs or more were exemplified as task processing time class classifications. It can be appropriately set depending on the type.

次に、図4に示すように、タスク処理時間予測部80は、ステップS400を実行する。ステップS400は、予測したタスク処理時間の正答率を算出して学習データに反映させ、学習データにおける所定のタスクに対するタスク処理時間のばらつきを検出し、予測したタスク処理時間に基づいて投入した別の処理が実際に処理を完了できたか否かを検証するステップである。ステップS400は図8に示すフローに従う。図を参照して詳しく説明する。 Next, as shown in FIG. 4, the task processing time prediction unit 80 executes step S400. A step S400 calculates the correct answer rate of the predicted task processing time and reflects it in the learning data, detects the variation in the task processing time for a predetermined task in the learning data, and detects another input based on the predicted task processing time. This is the step of verifying whether the process could actually complete the process. Step S400 follows the flow shown in FIG. A detailed description will be given with reference to the drawings.

図8に示すように、まずステップS401が実行される。ステップS401は、タスク監視処理部85が、監視部81から取得した実際のタスク処理時間と、機械学習部83により予測されたタスク処理時間とを比較して、その差異を検証するステップである。具体的には、あるタスクが実行された場合において、実際のタスク処理時間と予測されたタスク処理時間との差の絶対値(Δt)と、予め決められた許容値(T)と、を比較する。Δt≦Tであれば、予測値と実測値との差異が許容できる範囲にあることになり正答となる。正答の場合にはステップS402に進み、正答率がアップするように正答率が更新される。Δt>Tであれば、予測値が実測値から許容できない程度にずれていることになり誤答となる。誤答の場合にはステップS403に進み、正答率がダウンするように正答率が更新される。 As shown in FIG. 8, step S401 is first executed. Step S401 is a step in which the task monitoring processing unit 85 compares the actual task processing time acquired from the monitoring unit 81 and the task processing time predicted by the machine learning unit 83, and verifies the difference. Specifically, when a certain task is executed, the absolute value (Δt) of the difference between the actual task processing time and the predicted task processing time is compared with a predetermined allowable value (T). do. If .DELTA.t.ltoreq.T, the difference between the predicted value and the measured value is within an allowable range, and the answer is correct. In the case of a correct answer, the process proceeds to step S402, and the correct answer rate is updated so as to increase the correct answer rate. If .DELTA.t>T, the predicted value deviates from the measured value to an unacceptable extent, resulting in an erroneous answer. In the case of an incorrect answer, the process proceeds to step S403, and the correct answer rate is updated so as to decrease the correct answer rate.

次いで、ステップS404が実行される。ステップS404は、監視部81から取得した実際のタスク処理時間と、更新された正答率と、を学習データ取得部82に発出して学習データに反映させるステップである。 Then step S404 is executed. Step S404 is a step of outputting the actual task processing time acquired from the monitoring unit 81 and the updated percentage of correct answers to the learning data acquisition unit 82 and reflecting them in the learning data.

次いで、ステップS405が実行される。ステップS405は、学習データに含まれるタスク処理時間(目的変数)の統計的なばらつきを検証するステップである。統計的なばらつきを表す特性値としては、例えば分散や標準偏差などを採用できるが、いずれの特性値を採用するかは任意である。ここで、タスク処理時間のばらつきが所定の許容値よりも大きいときにはステップS406に進み、使用者に対してタスク処理時間のばらつきが大きい旨の報知を行う。 Then step S405 is executed. Step S405 is a step of verifying statistical variations in the task processing time (objective variable) included in the learning data. As the characteristic value representing the statistical variation, for example, dispersion or standard deviation can be used, but any characteristic value can be used arbitrarily. Here, if the variation in task processing time is greater than the predetermined allowable value, the process proceeds to step S406 to notify the user that the variation in task processing time is large.

次いで、ステップS407が実行される。ステップS407は、追加した処理の終了時間が所定の閾値より大きいか否かを判定するステップである。ここで、所定の閾値とは、追加した処理の後に実行されるタスクが開始される時間であり、追加した処理の終了時間が所定の閾値より大きいとは、追加した処理が実際には実行しきれなかったことを示す(図9に示す最下段のような状態)。このような場合にはステップS408に進む。ステップS408は、プログラムカウンタをアイドル状態のタスクのアドレスに切り替えることによって追加処理を中断し、ステップS409に進んで正答率をリセットする。 Then step S407 is executed. Step S407 is a step of determining whether or not the end time of the added process is longer than a predetermined threshold. Here, the predetermined threshold is the time at which the task to be executed after the added process is started, and the fact that the end time of the added process is greater than the predetermined threshold means that the added process is not actually executed. It indicates that it could not be cut (state like the bottom stage shown in FIG. 9). In such a case, the process proceeds to step S408. A step S408 interrupts the additional processing by switching the program counter to the address of the task in the idle state, and proceeds to a step S409 to reset the percentage of correct answers.

一方、追加した処理の終了時間が所定の閾値以下とは、追加した処理が実際に実行できたことを示し(図9に示す中段のような状態)、ステップS407はNO判定となってステップS408およびステップS409を経ずにフローを継続する。 On the other hand, if the end time of the added process is equal to or less than the predetermined threshold value, it means that the added process has actually been executed (the state shown in the middle part of FIG. 9), and step S407 results in NO determination and step S408. And the flow continues without going through step S409.

次に、本実施形態における電子制御装置100を採用することによる作用効果について説明する。 Next, the effects of employing the electronic control unit 100 according to this embodiment will be described.

この電子制御装置100は、特徴量に基づいてタスク処理時間を学習させるので、類似したタスクであっても特性値に基づいたタスク処理時間を予測に用いることでより精度良くタスクの空きを予測することができる。そして、精度良く予測されたタスク処理時間に基づいてタスクの割り当てを決定することができるので、ヘテロジニアスマルチコアを採用したマイコンにおけるスループットを向上することができる。 Since the electronic control unit 100 learns the task processing time based on the feature amount, even for similar tasks, the task vacancy can be predicted with higher accuracy by using the task processing time based on the characteristic value for prediction. be able to. Since task assignment can be determined based on the task processing time predicted with high accuracy, the throughput of a microcomputer employing a heterogeneous multicore can be improved.

また、演算処理装置(プロセッサ)において処理が実行されていない空き領域に、効率よく処理を割り当てることができるので、メモリアクセスの回数を抑制できるとともに処理待ちの時間を抑制できる。このため、電子制御装置としての電力消費量を抑制することができる。 In addition, it is possible to efficiently allocate processing to empty areas in which processing is not being executed in the arithmetic processing unit (processor), so that the number of memory accesses can be reduced and the processing waiting time can be reduced. Therefore, the power consumption of the electronic control device can be suppressed.

とくに、本実施形態における電子制御装置100においては、タスク処理時間を予測するための特徴量について、主成分分析による次元の削減を行うので、学習に用いる変数の量を削減できる。このため、学習に係る負荷ならびにタスク処理時間の予測に係る負荷を軽減することができる。 In particular, in the electronic control unit 100 according to the present embodiment, dimension reduction is performed by principal component analysis on the feature amount for predicting the task processing time, so the amount of variables used for learning can be reduced. Therefore, the load related to learning and the load related to prediction of task processing time can be reduced.

さらに、本実施形態における電子制御装置100においては、予測されたタスク処理時間に対して、正答率を算出して学習データに反映している。予測されたタスク処理時間の正答率が低い場合には、プロセッサの空き領域に処理の追加を実行しても、処理が完了できない虞があり、処理の追加を行う処理自体が無駄な処理になる虞がある。これに対して、電子制御装置100は、正答率が比較的高いタスクにおいて処理の追加を実行するので、追加した処理の完遂についての信頼性を向上することができる。 Furthermore, in the electronic control unit 100 of the present embodiment, the correct answer rate is calculated for the predicted task processing time and reflected in the learning data. If the correct answer rate of the predicted task processing time is low, even if processing is added to the free space of the processor, the processing may not be completed, and the processing of adding the processing itself becomes useless processing. There is fear. On the other hand, the electronic control unit 100 adds processing to a task with a relatively high percentage of correct answers, so it is possible to improve the reliability of completion of the added processing.

さらに、本実施形態における電子制御装置100においては、収集された学習データにおけるタスク処理時間のばらつきを検証し、ばらつきが大きい場合には使用者に報知するようになっている。機械学習によって、特徴量とタスク処理時間との紐付けが出来ている場合でも、統計的なばらつきが大きいと、追加できる処理の見積もり(ランク分類)が困難になる場合がある。電子制御装置100は、この可能性を使用者に報知することができる。 Furthermore, in the electronic control unit 100 of this embodiment, the variation in the task processing time in the collected learning data is verified, and if the variation is large, the user is notified. Even if machine learning can associate feature values with task processing times, it may be difficult to estimate additional processing (rank classification) if there is a large statistical variation. The electronic control unit 100 can notify the user of this possibility.

さらに、本実施形態における電子制御装置100においては、追加した処理が、実際に処理しきれなかった場合には、正答率をリセットするようになっている。すなわち、タスク処理時間の予測に誤りがある場合には、正答率が意図せずに高く算出されている虞があるため、正答率をリセットすることで処理追加の精度の低下を抑制することができる。 Furthermore, in the electronic control unit 100 according to the present embodiment, when the added processing cannot be actually processed, the percentage of correct answers is reset. That is, if there is an error in the prediction of the task processing time, the correct answer rate may be unintentionally calculated to be high. Therefore, by resetting the correct answer rate, it is possible to suppress the decrease in the accuracy of the process addition. can.

(その他の実施形態)
この明細書および図面等における開示は、例示された実施形態に制限されない。開示は、例示された実施形態と、それらに基づく当業者による変形態様を包含する。例えば、開示は、実施形態において示された部品および/または要素の組み合わせに限定されない。開示は、多様な組み合わせによって実施可能である。開示は、実施形態に追加可能な追加的な部分をもつことができる。開示は、実施形態の部品および/または要素が省略されたものを包含する。開示は、ひとつの実施形態と他の実施形態との間における部品および/または要素の置き換え、または組み合わせを包含する。開示される技術的範囲は、実施形態の記載に限定されない。開示されるいくつかの技術的範囲は、請求の範囲の記載によって示され、さらに請求の範囲の記載と均等の意味及び範囲内での全ての変更を含むものと解されるべきである。
(Other embodiments)
The disclosure in this specification, drawings, etc. is not limited to the illustrated embodiments. The disclosure encompasses the illustrated embodiments and variations thereon by those skilled in the art. For example, the disclosure is not limited to the combinations of parts and/or elements shown in the embodiments. The disclosure can be implemented in various combinations. The disclosure can have additional parts that can be added to the embodiments. The disclosure encompasses omitting parts and/or elements of the embodiments. The disclosure encompasses permutations or combinations of parts and/or elements between one embodiment and another. The disclosed technical scope is not limited to the description of the embodiments. The disclosed technical scope is indicated by the description of the claims, and should be understood to include all changes within the meaning and range of equivalents to the description of the claims.

上記した実施形態では、機械学習部83が、特徴量に対して次元を削減するステップを実行する例について説明したが、次元の削減は必ずしも必要ではない。ただし、次元を削減することにより電子制御装置100の処理負荷が軽減されることは、上記したとおりである。また、主成分分析の方法についてはある一つの方法に限定するものではない。 In the above-described embodiment, an example in which the machine learning unit 83 executes the step of reducing the dimension of the feature quantity has been described, but the reduction of the dimension is not necessarily required. However, as described above, the processing load of the electronic control unit 100 is reduced by reducing the dimensions. Also, the principal component analysis method is not limited to one method.

また、処理追加部84が処理の追加に際して、正答率が所定の値よりも高いことを要求する例について説明したが、処理の追加は、正答率と関係なく行うことができる。ただし、正答率に基づいて処理の追加の有無を判断することで、追加した処理の完了可否の不確かさを軽減することができることは、上記したとおりである。 Also, an example has been described in which the process adding unit 84 requests that the correct answer rate be higher than a predetermined value when adding a process, but the process can be added regardless of the correct answer rate. However, as described above, it is possible to reduce the uncertainty of whether or not the added process can be completed by determining whether or not to add the process based on the percentage of correct answers.

また、追加した処理が完遂できなかった場合に正答率をリセットする例を説明したが、正答率をリセットしなくても実質的なフローの継続は可能である。 Also, an example of resetting the percentage of correct answers when the added processing cannot be completed has been described, but the flow can be substantially continued without resetting the percentage of correct answers.

10…CPU,20…PMU,30…GPGPU,40…キャッシュ,50…演算ユニット,60…メモリ,70…制御部,80…タスク処理時間予測部,81…監視部,82…学習データ取得部,83…機械学習部,84…処理追加部,85…タスク監視処理部 DESCRIPTION OF SYMBOLS 10... CPU, 20... PMU, 30... GPGPU, 40... Cache, 50... Operation unit, 60... Memory, 70... Control part, 80... Task processing time prediction part, 81... Monitoring part, 82... Learning data acquisition part, 83... Machine learning unit, 84... Processing addition unit, 85... Task monitoring processing unit

Claims (7)

複数の演算処理装置(10,30,50)を含み、入力信号に基づいて処理を実行し出力信号を出力する制御部(70)と、
前記制御部が実行する処理におけるタスクごとに、該タスクを特徴付ける特徴量を抽出するとともに、前記特徴量に対応する実際のタスク処理時間を学習するタスク処理時間予測部(80)と、を備え、
前記タスク処理時間予測部は、タスクを実行する際に、実行すべきタスクに紐づく前記特徴量に基づいて、前記特徴量に対応するタスク処理時間を予測し、
予測されたタスク処理時間に応じて、前記演算処理装置におけるタスクが実行可能な空き領域に処理を追加する、電子制御装置。
a control unit (70) that includes a plurality of arithmetic processing units (10, 30, 50), executes processing based on an input signal, and outputs an output signal;
A task processing time prediction unit (80) that extracts a feature amount that characterizes the task for each task in the process executed by the control unit and learns the actual task processing time corresponding to the feature amount,
The task processing time prediction unit predicts the task processing time corresponding to the feature amount based on the feature amount associated with the task to be executed when executing the task,
An electronic control unit that adds processing to a task-executable free area in the arithmetic processing unit according to a predicted task processing time.
前記タスク処理時間予測部は、前記タスクごとの前記特徴量および前記実際のタスク処理時間を取得し、学習データとして統計的に記録する学習データ取得部(82)と、
前記学習データに基づいて、所定の機械学習アルゴリズムによりタスクに対応するタスク処理時間を予測する機械学習部(83)と、
前記機械学習部により予測されたタスク処理時間に応じて、前記演算処理装置におけるタスクが実行可能な空き領域に処理を追加する処理追加部(84)と、を有する、請求項1に記載の電子制御装置。
a learning data acquisition unit (82) in which the task processing time prediction unit acquires the feature amount and the actual task processing time for each task and statistically records them as learning data;
a machine learning unit (83) that predicts a task processing time corresponding to a task by a predetermined machine learning algorithm based on the learning data;
2. The method according to claim 1, further comprising a processing addition unit (84) for adding processing to a task-executable free space in said arithmetic processing unit according to the task processing time predicted by said machine learning unit. electronic controller.
前記機械学習部は、前記特徴量の主成分分析を実行して次元の削減する、請求項2に記載の電子制御装置。 3. The electronic control device according to claim 2, wherein said machine learning unit performs principal component analysis of said feature quantity to reduce dimensionality. 前記タスク処理時間予測部は、タスク監視処理部(85)をさらに有し、
前記タスク監視処理部は、前記機械学習部が予測したタスク処理時間と、実際に実行されたときのタスク処理時間とを比較して予測の正答率を算出し、
前記正答率が所定の閾値よりも高い場合において、前記処理追加部が前記演算処理装置におけるタスクが実行可能な空き領域に処理を追加する、請求項2または請求項3に記載の電子制御装置。
The task processing time prediction unit further has a task monitoring processing unit (85),
The task monitoring processing unit compares the task processing time predicted by the machine learning unit with the task processing time when the task is actually executed to calculate the correct answer rate of the prediction,
4. The electronic control unit according to claim 2, wherein, when the percentage of correct answers is higher than a predetermined threshold, the processing addition unit adds processing to a task-executable free space in the arithmetic processing unit.
前記正答率は、予測されたタスク処理時間と実際に実行されたときのタスク処理時間との差の絶対値が所定の許容値以下であるときを正答とし、前記差の絶対値が前記許容値より大きいときを誤答として、正答と誤答の総計に対する正答の数の割合として算出され、
前記学習データは算出された前記正答率を含む、請求項4に記載の電子制御装置。
The percentage of correct answers is defined as a correct answer when the absolute value of the difference between the predicted task processing time and the task processing time when the task is actually executed is equal to or less than a predetermined allowable value, and the absolute value of the difference is the allowable value. Calculated as the ratio of the number of correct answers to the total number of correct and incorrect answers,
5. The electronic control device according to claim 4, wherein said learning data includes said calculated percentage of correct answers.
前記タスク監視処理部は、各タスクに対する前記機械学習部により予測されたタスク処理時間のばらつきを算出し、
前記ばらつきが、所定の許容範囲を超える場合に警告を発出する、請求項4または請求項5に記載の電子制御装置。
The task monitoring processing unit calculates a variation in task processing time predicted by the machine learning unit for each task,
6. The electronic control unit according to claim 4, wherein a warning is issued when the variation exceeds a predetermined allowable range.
前記タスク監視処理部は、前記処理追加部により追加された処理に要した時間が所定の許容値を超える場合において、前記正答率をリセットする、請求項4~6のいずれか1項に記載の電子制御装置。 The task monitoring processing unit according to any one of claims 4 to 6, wherein the task monitoring processing unit resets the correct answer rate when the time required for the processing added by the processing adding unit exceeds a predetermined allowable value. electronic controller.
JP2018004234A 2018-01-15 2018-01-15 electronic controller Active JP7106868B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018004234A JP7106868B2 (en) 2018-01-15 2018-01-15 electronic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018004234A JP7106868B2 (en) 2018-01-15 2018-01-15 electronic controller

Publications (2)

Publication Number Publication Date
JP2019125093A JP2019125093A (en) 2019-07-25
JP7106868B2 true JP7106868B2 (en) 2022-07-27

Family

ID=67399382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018004234A Active JP7106868B2 (en) 2018-01-15 2018-01-15 electronic controller

Country Status (1)

Country Link
JP (1) JP7106868B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7136460B2 (en) * 2019-09-05 2022-09-13 Necプラットフォームズ株式会社 Information processing device, data processing method and data processing program
US11461135B2 (en) 2019-10-25 2022-10-04 International Business Machines Corporation Dynamically modifying the parallelism of a task in a pipeline

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001256064A (en) 2000-03-10 2001-09-21 Mitsubishi Electric Corp Optimization scheduling system of plural periodic performance tasks
JP2013130104A (en) 2011-12-21 2013-07-04 Toyota Motor Corp Control device of internal combustion engine
JP2014182606A (en) 2013-03-19 2014-09-29 Denso Corp Arithmetic device and program
JP2015108877A (en) 2013-12-03 2015-06-11 日本電気株式会社 Prediction time distribution generation device, control method, and program
WO2017188419A1 (en) 2016-04-28 2017-11-02 日本電気株式会社 Computational resource management device, computational resource management method, and computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001256064A (en) 2000-03-10 2001-09-21 Mitsubishi Electric Corp Optimization scheduling system of plural periodic performance tasks
JP2013130104A (en) 2011-12-21 2013-07-04 Toyota Motor Corp Control device of internal combustion engine
JP2014182606A (en) 2013-03-19 2014-09-29 Denso Corp Arithmetic device and program
JP2015108877A (en) 2013-12-03 2015-06-11 日本電気株式会社 Prediction time distribution generation device, control method, and program
WO2017188419A1 (en) 2016-04-28 2017-11-02 日本電気株式会社 Computational resource management device, computational resource management method, and computer-readable recording medium

Also Published As

Publication number Publication date
JP2019125093A (en) 2019-07-25

Similar Documents

Publication Publication Date Title
US11176438B2 (en) Neural network system, application processor having the same, and method of operating the neural network system
US8949663B2 (en) Multi-core processor including a monitored processor core whose process result is to be monitored by a number of processors based on processing load
US9870228B2 (en) Prioritising of instruction fetching in microprocessor systems
US10778605B1 (en) System and methods for sharing memory subsystem resources among datacenter applications
US8195885B2 (en) Electronic unit for saving state of task to be run in stack
CN105765541B (en) Controller for motor vehicle
JP7106868B2 (en) electronic controller
US8108862B2 (en) Out-of-order thread scheduling based on processor idle time thresholds
CN101089832A (en) Unified memory system
CN103329102A (en) Multiprocessor system
CN113760531A (en) Scheduler, method of operating scheduler, and accelerator apparatus including scheduler
JP2017211928A (en) Distribution processing control system and distribution processing control method
JP5533789B2 (en) In-vehicle electronic control unit
US7558990B2 (en) Semiconductor circuit device and method of detecting runaway
CN116414542B (en) Task scheduling method, device, equipment and storage medium
US20080184258A1 (en) Data processing system
JP2010122752A (en) Control device
JP5699896B2 (en) Information processing apparatus and abnormality determination method
CN115668222A (en) Data processing method and device of neural network
US20230143270A1 (en) Apparatus and method with scheduling
JP2006215621A (en) Dma controller
JP6771272B2 (en) In-vehicle electronic control device and stack usage
JP2020086807A (en) Vehicle control device and program execution method
Wetzelsberger et al. Real-time image processing for motion planning based on realistic sensor data
JP2011233085A (en) Processor, electronic control unit, and load distribution method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211028

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220419

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220602

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220627

R151 Written notification of patent or utility model registration

Ref document number: 7106868

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151