JP2020126477A - Electronic control device - Google Patents
Electronic control device Download PDFInfo
- Publication number
- JP2020126477A JP2020126477A JP2019018880A JP2019018880A JP2020126477A JP 2020126477 A JP2020126477 A JP 2020126477A JP 2019018880 A JP2019018880 A JP 2019018880A JP 2019018880 A JP2019018880 A JP 2019018880A JP 2020126477 A JP2020126477 A JP 2020126477A
- Authority
- JP
- Japan
- Prior art keywords
- core
- shared resource
- operation clock
- monitoring
- cores
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Multi Processors (AREA)
- Microcomputers (AREA)
Abstract
Description
本開示は、電子制御装置に関する。 The present disclosure relates to electronic control devices.
従来、特許文献1に開示された、複数のコアを備えた電子制御装置がある。電子制御装置は、複数の異なる周波数を生成可能な周波数生成回路と、複数のコアのそれぞれに対し、周波数生成回路によって生成された複数の異なる周波数のうちのいずれか一の周波数を切り替えて接続可能な切替装置とを備えている。 Conventionally, there is an electronic control device including a plurality of cores disclosed in Patent Document 1. The electronic control unit can connect to each of the frequency generation circuit capable of generating a plurality of different frequencies and the plurality of cores by switching any one of the plurality of different frequencies generated by the frequency generation circuit. And a switching device.
ところで、複数のコアを備えた電子制御装置では、複数のコアがリソースを共有することがある。この場合、電子制御装置は、複数のコアにおける一つのコアが共有リソースを占有することができる。そして、他のコアは、共有リソースを占有しようとした場合、共有リソースを占有しているコアが、共有リソースを解放するのを待たなければならない。 By the way, in an electronic control device having a plurality of cores, the plurality of cores may share resources. In this case, in the electronic control device, one core among the plurality of cores can occupy the shared resource. Then, when another core tries to occupy the shared resource, it has to wait for the core occupying the shared resource to release the shared resource.
よって、特許文献1の電子制御装置は、周波数を遅く設定したコアが共有リソースを占有してしまった場合、共有リソースの解放が遅くなる。つまり、電子制御装置は、共有リソースを占有しようとしているコアが、共有リソースが解放されるのを待つ時間が長くなる。このため、電子制御装置は、リアルタイム性が損なわれる問題がある。 Therefore, in the electronic control device of Patent Document 1, release of the shared resource is delayed when the core whose frequency is set slow occupies the shared resource. That is, the electronic control device takes a long time to wait for the core, which is trying to occupy the shared resource, to release the shared resource. Therefore, the electronic control device has a problem that the real-time property is impaired.
本開示は、上記問題点に鑑みなされたものであり、リアルタイム性が損なわれることを抑制できる電子制御装置を提供することを目的とする。 The present disclosure has been made in view of the above problems, and an object of the present disclosure is to provide an electronic control device that can suppress deterioration of real-time property.
上記目的を達成するために本開示は、
複数の処理部(11、12、13、14)と、
複数の処理部が使用可能な少なくとも一つの共有リソース(40、41、42)と、
各処理部の動作クロックを管理する動作クロック管理部(10、31、32、33、34)と、を備え、
各処理部は、共有リソースの使用権を獲得すると、使用権を解放するまでの間、他の処理部が共有リソースを使用できないように共有リソースを占有し、
動作クロック管理部は、複数の処理部のうち共有リソースを占有している占有処理部を検出するとともに、占有処理部の動作クロックを、共有リソースを占有していない場合よりも高速化することを特徴とする。
In order to achieve the above object, the present disclosure provides
A plurality of processing units (11, 12, 13, 14),
At least one shared resource (40, 41, 42) usable by a plurality of processing units,
An operation clock management unit (10, 31, 32, 33, 34) that manages the operation clock of each processing unit,
When each processing unit acquires the usage right of the shared resource, it occupies the shared resource so that other processing units cannot use the shared resource until the usage right is released.
The operation clock management unit detects an occupancy processing unit that occupies the shared resource among the plurality of processing units, and speeds up the operation clock of the occupancy processing unit as compared with the case where the shared resource is not occupied. Characterize.
このように、本開示は、占有処理部の動作クロックを、共有リソースを占有していない場合よりも高速化するため、占有処理部の動作クロックを高速化しない場合よりも、共有リソースを占有している時間を短くすることができる。よって、本開示は、リアルタイム性が損なわれることを抑制できる。 As described above, according to the present disclosure, the operation clock of the occupancy processing unit is made faster than that in the case where the shared resource is not occupied. The time spent can be shortened. Therefore, the present disclosure can suppress the loss of real-time property.
なお、特許請求の範囲、及びこの項に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。 It should be noted that the claims and the reference numerals in parentheses described in this section indicate the corresponding relationship with the specific means described in the embodiments described below as one aspect, and the technical scope of the present disclosure. Is not limited.
以下において、図面を参照しながら、本開示を実施するための複数の形態を説明する。各形態において、先行する形態で説明した事項に対応する部分には同一の参照符号を付して重複する説明を省略する場合がある。各形態において、構成の一部のみを説明している場合は、構成の他の部分については先行して説明した他の形態を参照し適用することができる。 Hereinafter, a plurality of modes for carrying out the present disclosure will be described with reference to the drawings. In each form, parts corresponding to the matters described in the preceding form may be assigned the same reference numerals and overlapping description may be omitted. In each mode, when only a part of the configuration is described, the other modes described earlier can be applied to other parts of the configuration.
図1〜図5を用いて、本実施形態の電子制御装置に関して説明する。本実施形態では、一例として、ディスプレイシステムにおけるマイコン100を含む電子制御装置に適用した例を採用する。また、ディスプレイシステムは、例えば、車両に搭載されたものを採用できる。しかしながら、本開示は、これに限定されず、表示装置400とは異なる制御対象を制御するシステムに適用することもできる。
The electronic control unit of the present embodiment will be described with reference to FIGS. In this embodiment, as an example, an example applied to an electronic control device including the
図1に示すように、ディスプレイシステムは、マイコン100、発振器200、第1映像演算装置310、第2映像演算装置320、表示装置400などを含んでいる。ディスプレイシステムは、表示装置400における表示制御を行うシステムである。表示装置400は、例えば、液晶ディスプレイや有機ELディスプレイなどを採用できる。
As shown in FIG. 1, the display system includes a
第1映像演算装置310は、第2マイコン311などを備えている。第2映像演算装置320は、第3マイコン321などを備えている。各映像演算装置310、320は、マイコン100からの制御信号に基づいて、各マイコン311、321が演算処理を行う。各マイコン311、321は、演算処理の処理結果に基づいて、表示装置400に描画するための表示制御を行う。
The first
ディスプレイシステムは、表示装置400への描画のリアルタイム性が求められる。つまり、電子制御装置は、表示装置400への描画の指示が発生してから、短時間で、実際に表示装置400に描画することが求められる。また、電子制御装置は、表示装置400とは異なる制御対象を制御する場合、制御対象への制御指示のリアルタイム制が求められる。
The display system is required to have real-time drawing on the
さらに、電子制御装置では、マイコン100の消費電力を抑える必要がある。言い換えると、電子制御装置では、マイコン100が電力を消費することによる発熱を抑える必要がある。
Further, in the electronic control device, it is necessary to reduce the power consumption of the
マイコン100は、監視コア10、第1コア11、第2コア12、第3コア13、第1ROM21、第2ROM22、第3ROM23、第1逓倍器31、第2逓倍器32、第3逓倍器33、共有リソース40、スピンロック部50などを備えている。このように、マイコン100は、複数のコア10〜13を備えているため、マルチコアマイコンと言える。また、マイコン100は、各コア10〜13の動作クロックを生成する発振器200が接続されている。
The
共有リソース40は、複数のコア11〜13が使用可能なリソースである。共有リソース40は、複数のコア11〜13が使用可能であるが、同時に複数のコア11〜13が使用しないように排他処理がなされる。この排他処理に関しては、後程説明する。共有リソース40は、例えばメモリや入出力装置(I/O)などを採用することができる。また、共有リソース40としてのメモリは、メモリ装置の一部の領域であってもよい。なお、本実施形態では、一つの共有リソース40を備えたマイコン100を採用している。しかしながら、マイコン100は、複数の共有リソースを備えていてもよい。
The shared
スピンロック部50は、各コア11〜13が共有リソース40を占有して、排他するための部位である。スピンロック部50は、共有リソース40が占有状態であることを示す態様と、解放状態であることを示す態様とに遷移可能に構成されている。例えば、スピンロック部50は、各コア11〜13によって、スピンロック占有情報として占有状態であることを示す情報と、解放状態であることを示す情報とが格納可能に構成されている。
The
なお、スピンロック部50は、占有状態であることを示す情報と、解放状態であることを示す情報とが同時に格納されることはない。スピンロック部50は、常に、占有状態であることを示す情報と、解放状態であることを示す情報のいずれか一方のみが格納されている。
The
つまり、スピンロック部50は、複数のコア11〜13のうち、共有リソース40の使用権を獲得したコア(以下占有コア)によって、占有状態であることを示す情報が、占有コアと関連付けられて格納される。また、スピンロック部50は、占有コアが共有リソース40を解放した場合に、占有コアによって、解放状態であることを示す情報が格納される。このように、占有状態とは、複数のコア11〜13のいずれかが共有リソース40の使用権を獲得している状態である。一方、解放状態は、占有コアが共有リソース40の使用権を解放した状態である。
That is, the
なお、例えば、スピンロック部50は、占有状態であることを示す情報として1が占有コアに関連付けられて格納されるとともに、解放状態であることを示す情報として0が格納される。よって、スピンロック部50は、例えばレジスタなどを採用できる。スピンロック占有情報は、排他情報とも言える。占有コアは、占有処理部に相当する。
Note that, for example, the
マイコン100は、複数のコア10〜13として、表示装置400の表示制御に関する処理を行なう第1コア11〜第3コア13と、各逓倍器31〜33を用いて各コア11〜13の動作クロックを設定する監視コア10を備えている。
The
第1コア11は、第1コア11用の記憶部として第1ROM21が接続され、且つ、第1コア11用の動作クロックを設定するための部位として第1逓倍器31が接続されている。また、第1コア11は、共有リソース40及びスピンロック部50が接続されている。
The
第1コア11は、第1逓倍器31から動作クロックが供給されて動作する。第1逓倍器31は、第1コア11の動作クロックを独立に変更可能とする部位である。第1逓倍器31は、発振器200から供給された基準クロックの周波数を逓倍するための装置である。第1逓倍器31は、監視コア10によって設定された設定値に応じた周波数の動作クロックを第1コア11に供給する。
The
第1逓倍器31は、例えば、設定値として、高速モード時の設定値と低速モード時の設定値の二つの値が設定可能に構成されている。高速モードと低速モードは、各コア11〜13の動作モードである。高速モードと低速モードは、相対的な動作クロックの違いを示している。よって、高速モードは、低速モードよりも動作クロックが上げられた動作モードを示している。第1コア11は、第1逓倍器31に高速モード時の設定値が設定されていると高速モードで動作し、第1逓倍器31に低速モード時の設定値が設定されていると低速モードで動作する。
The
なお、第1コア11は、第1コア11が共有リソース40の使用権を獲得した場合に、動作モードが高速モードとされ、第1コア11が共有リソース40の使用権を獲得していない場合に、動作モードが低速モードとされる。つまり、第1コア11は、第1コア11が共有リソース40の使用権を獲得していない通常の場合に、動作モードが低速モードとされる。このため、低速モードは、通常モードと言い換えることもできる。
The operation mode of the
第1コア11は、例えば第1ROM21に記憶されたプログラムを実行することで、第1ROM21や共有リソース40に記憶されたデータなどを用いつつ演算処理を実行する。
The
第1コア11は、共有リソース40が解放状態の場合に限って、共有リソース40を使用することができる。第1コア11は、共有リソース40の使用権を獲得できた場合、スピンロック部50に、占有状態であることを示す情報を第1コア11に関連付けて格納する。第1コア11は、共有リソース40の使用権を獲得すると、使用権を解放するまでの間、他のコア12、13が共有リソース40を使用できないように共有リソース40を占有することができる。そして、第1コア11は、共有リソース40を解放する場合、スピンロック部50に解放状態であることを示す情報を格納する。このようにして、第1コア11は、排他処理を行う。なお、排他処理に関しては、上記に限定されず、ミューテックスなどであっても採用できる。
The
第2コア12は、第2コア12用の記憶部として第2ROM22が接続され、且つ、第2コア12用の動作クロックを設定するための部位として第2逓倍器32が接続されている。また、第2コア12は、共有リソース40及びスピンロック部50が接続されている。第3コア13は、第3コア13用の記憶部として第3ROM23が接続され、且つ、第3コア13用の動作クロックを設定するための部位として第3逓倍器33が接続されている。また、第3コア13は、共有リソース40及びスピンロック部50が接続されている。
The
第2コア12と第3コア13は、第1コア11と同様に構成されている。また、第2ROM22と第3ROM23は、第1ROM21と同様に構成されている。さらに、第2逓倍器32と第3逓倍器33は、第1逓倍器31と同様に構成されている。よって、各コアは、共有リソース40の使用権を獲得すると、使用権を解放するまでの間、他のコアが共有リソース40を使用できないように共有リソース40を占有することができる。
The
このように、マイコン100は、ディスプレイシステムの性能上、複数のコア11〜13を備えたマルチコアマイコンとして構成されている。しかしながら、マイコン100は、常時、複数のコア11〜13を高速モードで動作させることは発熱の面から避けることが望ましい。
As described above, the
監視コア10は、共有リソース40の占有状態を検出する機能と、各逓倍器31〜33の設定変更を行う機能を有している。図2には、監視コア10が制御する各コア11〜13の各逓倍器31〜33のステートマシンを図示している。
The
監視コア10は、スピンロック部50に格納されている、共有リソース40の2つの状態(スピンロック状態)を示すスピンロック占有情報を取得する。そして、監視コア10は、そのスピンロック占有情報から、複数のコア11〜13のいずれかが共有リソース40を占有しているか否かを検出する。共有リソース40における1つの状態は、複数のコア11〜13のいずれかが共有リソース40を占有している占有状態である。もう1つの状態は、複数のコア11〜13のいずれも共有リソース40を占有していない状態、すなわち、共有リソース40が解放されている解放状態である。
The
なお、複数のコア11〜13のいずれかが共有リソース40を占有することを、共有リソース40のスピンロック占有とも称する。一方、占有コアが共有リソースを解放することを、共有リソース40のスピンロック解放とも称する。
Note that occupying the shared
また、図2に示すように、監視コア10は、各逓倍器31〜33の設定値を変更することで、各コア11〜13の動作モードを高速モードまたは低速モードに変更する。監視コア10は、共有リソース40を占有している占有コアに対応する逓倍器を高速モードにする。また、監視コア10は、共有リソース40を占有している占有コアが使用権を解放すると、占有コアに対応する逓倍器を低速モードにする。
Further, as shown in FIG. 2, the
なお、第1コア11、第2コア12、第3コア13のそれぞれは、処理部に相当する。監視コア10、第1逓倍器31、第2逓倍器32、第3逓倍器33は、動作クロック管理部に相当する。
Each of the
ここで、図3、図4、図5に基づいて、マイコン100と監視コア10の処理動作に関して説明する。監視コア10は、所定時間毎に、図3のフローチャートに示す処理を実行する。
Here, the processing operation of the
ステップS10では、スピンロック状態を検出する(動作クロック管理部)。監視コア10は、スピンロック部50に格納されているスピンロック占有情報を取得して、取得したスピンロック占有情報に基づいてスピンロック状態を検出する。つまり、監視コア10は、複数のコア11〜13のいずれかが共有リソース40を占有している占有状態であるか、複数のコア11〜13のいずれも共有リソース40を占有していない解放状態であるかを検出する。
In step S10, the spin lock state is detected (operation clock management unit). The
ステップS11では、共有リソースを占有しているコアがあるか否かを判定する(動作クロック管理部)。監視コア10は、ステップS10での検出結果に基づいて、共有リソース40を占有しているコアがあるか否かを判定する。そして、監視コア10は、共有リソース40を占有しているコアが有ると判定した場合はステップS12へ進み、共有リソース40を占有しているコアが有ると判定しなかった場合はステップS17へ進む。
In step S11, it is determined whether or not there is a core occupying the shared resource (operation clock management unit). The
ステップS12では、共有リソースを占有しているコアを特定する(動作クロック管理部)。監視コア10は、ステップS10での検出結果に基づいて、共有リソース40を占有しているコアを特定する。つまり、監視コア10は、スピンロック占有情報に基づいて、複数のコア11〜13のうち、共有リソース40を占有している占有コアを特定する。
In step S12, the core occupying the shared resource is specified (operation clock management unit). The
なお、監視コア10は、今回の占有コアと、前回の占有コアが同一であるか否かを判定するために、特定した占有コアをメモリなどに記憶してもよい。
The
ステップS13では、前回の占有しているコアと同一であるか否かを判定する。監視コア10は、今回の占有コアと前回の占有コアとが同一であると判定しなかった場合はステップS14に進み、今回の占有コアと前回の占有コアとが同一であると判定した場合は図3の処理を終了する。
In step S13, it is determined whether it is the same as the previously occupied core. If the
後程説明するが、監視コア10は、占有コアの動作モードを高速モードに設定する。ただし、監視コア10は、今回の占有コアが前回の占有コアと同一の場合、今回の占有コアの動作モードを高速モードに設定することなく、現在の動作モードを維持する。なお、本開示は、ステップS13を実行しない監視コア10であっても採用できる。また、占有コアが前回と同じ場合には、占有コアの動作モードは、既に高速モードに設定されており、動作モードを変更する必要がない。これによって、本開示は、監視コア10の動作モード変更による処理負荷を削減するために、現在の動作モードを維持する(動作モードの設定を変更しない)。
As will be described later, the
ステップS14では、高速化するコアを決定する(動作クロック管理部)。ここで、図4を用いて、高速化コア決定処理に関して説明する。監視コア10は、ステップS14で高速化するコアを決定する場合、図4のフローチャートで示す処理を実行する。
In step S14, the core to be accelerated is determined (operation clock management unit). Here, the accelerated core determination process will be described with reference to FIG. When determining the core to be accelerated in step S14, the
ステップS20では、共有リソースを占有しているコアを確認する。監視コア10は、スピンロック部50に格納されているスピンロック占有情報に基づいて、共有リソース40を占有しているコアを確認する。そして、監視コア10は、占有コアが第1コア11の場合はステップS21へ進み、占有コアが第2コア12の場合はステップS22へ進み、占有コアが第1コア11の場合はステップS23へ進む。
In step S20, the core occupying the shared resource is confirmed. The
ステップS21では、第1コアを高速化する対象とする。ステップS22では、第2コアを高速化する対象とする。ステップS23では、第3コアを高速化する対象とする。このように、監視コア10は、複数のコア11〜13のうち共有リソース40を占有している占有コアを検出する。なお、監視コア10は、ステップS13を実行しない場合、ステップS12で特定した占有コアを高速化するコアに決定する。
In step S21, the first core is targeted for speed-up. In step S22, the second core is targeted for speed-up. In step S23, the third core is targeted for speeding up. In this way, the
ここで、図3のフローチャートの説明に戻る。監視コア10は、高速化するコアを決定すると、ステップS15へ進む。
Here, the description returns to the flowchart of FIG. When the
ステップS15では、すべてのコアを低速モードに設定する(動作クロック管理部)。監視コア10は、一旦、すべてのコア11〜13を低速モードに設定する。監視コア10は、各逓倍器31〜33に対して、低速モード時の設定値を設定することで、すべてのコア11〜13を低速モードにする。
In step S15, all the cores are set to the low speed mode (operation clock management unit). The
後程説明するが、監視コア10は、占有コアを高速モードに設定する。そこで、監視コア10は、占有コアを検出した場合、すべてのコア11〜13の動作クロックを低速化した後に、占有コアの動作クロックのみを高速化する。これによって、電子制御装置は、占有コアのみを高速化することができるので、確実にマイコン100での消費電力を抑制できる。なお、本開示は、ステップS15を実行しない監視コア10であっても採用できる。
As will be described later, the
ステップS16では、決定したコアを高速モードに設定する(動作クロック管理部)。監視コア10は、占有コアに対応する逓倍器に対して、高速モード時の設定値を設定することで、占有コアを高速モードに設定する。つまり、監視コア10は、占有コアの動作クロックを、共有リソース40を占有していない場合よりも高速化する。このため、占有コアは、高速モードの状態で、共有リソース40を使用する。
In step S16, the determined core is set to the high speed mode (operation clock management unit). The
このように、マイコン100は、占有コアの動作クロックを、共有リソース40を占有していない場合よりも高速化するため、占有コアの動作クロックを高速化しない場合よりも、共有リソース40を占有している時間を短くすることができる。よって、電子制御装置は、リアルタイム性が損なわれることを抑制できる。また、これによって、電子制御装置は、表示装置400に対する描写のリアルタイム性を確保することができる。
In this way, the
つまり、監視コア10は、例えば、スピンロック部50を確認して、占有コアが第1コア11であることを検出した場合、第1逓倍器31を高速モード時の設定値に設定する。これにより、第1コア11は、低速モード時よりも早く動作し、低速モードで動作している場合よりも、共有リソース40を占有する時間を短縮できる。よって、マイコン100は、ディスプレイシステムのリアルタイム性を保つことができる。
That is, for example, when the
次に、ステップS11でNO判定した場合に関して説明する。ステップS17では、復帰条件を満たすか否かを判定する(動作クロック管理部)。監視コア10は、予め決められた復帰条件を満たすか否かを判定し、復帰条件を満たすと判定した場合はステップS18へ進み、復帰条件を満たさないと判定した場合は図3の処理を終了する。復帰条件は、高速モードに設定した占有コアの動作モードを低速モードへ復帰させてもいいか否かを判断するための条件である。復帰条件は、低速化条件に相当する。
Next, the case where NO is determined in step S11 will be described. In step S17, it is determined whether or not the return condition is satisfied (operation clock management unit). The
復帰条件としては、例えば、占有コアが共有リソース40の使用権を解放したことを採用できる。この場合、監視コア10は、スピンロック部50のスピンロック占有情報を確認して、解放状態であることを示す情報が格納されている場合、すなわち、占有コアが共有リソース40の使用権を解放していた場合、低速化条件を満たしたと判定する。つまり、監視コア10は、ステップS11でNO判定したことで、復帰条件を満たしているとみなすことになる。これによって、マイコン100は、占有コアの動作クロックを即座に低速化できるので、消費電力を抑制できる。
As the return condition, for example, the exclusive core releasing the right to use the shared
また、復帰条件としては、例えば、複数のコア11〜13が共有リソース40を占有していない状況が所定時間継続したことを採用できる。言い換えると、復帰条件は、占有コアが共有リソース40を解放して所定時間が経過したことを採用できる。
Further, as the return condition, for example, it is possible to adopt that a situation in which the plurality of
この場合、監視コア10は、スピンロック部50のスピンロック占有情報を確認して、解放状態であることを示す情報が格納されているとタイマーなどを用いて計時を開始する。監視コア10は、計時を開始してから所定時間が経過する前に、占有状態であることを示す情報が格納されると計時した時間をクリアする。そして、監視コア10は、解放状態であることを示す情報が格納されている状況が所定時間継続した場合、復帰条件を満たしたと判定する。これによって、マイコン100は、動作クロックの変化が連続して生じることを抑制できる。なお、本開示は、ステップS17を実行しない監視コア10であっても採用できる。
In this case, the
ステップS18では、すべてのコアを低速モードに設定する(動作クロック管理部)。監視コア10は、占有コアに対応する逓倍器に対して、低速モード時の設定値を設定することで、占有コアを低速モードに設定する。つまり、監視コア10は、占有コアの動作クロックを、共有リソース40を占有している場合よりも低速化する。このため、共有リソース40を解放したコアは、低速モードの状態で処理を行う。これにより、マイコン100は、共有リソース40を解放したコアが高速モード時よりも遅く動作するため消費電力を抑えることができる。
In step S18, all the cores are set to the low speed mode (operation clock management unit). The
また、占有コアに高速モードが設定されている場合、その他のコアは、低速モードに設定されている。このため、監視コア10は、占有コアに対応する逓倍器に対して、低速モード時の設定値を設定することで、すべてのコア11〜13を低速モードに設定することになる。
When the high speed mode is set for the occupied core, the other cores are set for the low speed mode. Therefore, the
ここで、図5を用いて、動作クロックを高速化しない比較例のマイコン(以下比較例)と対比しつつ、本実施形態のマイコン100の効果を説明する。図5は、(a)が比較例の処理動作を示すタイムチャートであり、(b)がマイコン100の処理動作を示すタイムチャートである。なお、以下においては、比較例のマイコン、第1コア〜第3コア、共有リソースに対して、符号を付与せず記載する。
Here, the effect of the
第1コア〜第3コアのそれぞれは、第1コア11〜第3コア13のそれぞれと同じ処理を行なうものとする。しかしながら、第1コア〜第3コアのそれぞれは、第1コア11〜第3コア13のそれぞれと異なり、高速モードで動作することなく、常時、低速モードで動作するものである。
Each of the first core to the third core performs the same processing as that of each of the
図5では、各コアが処理中の期間を白抜き四角、占有コアが共有リソースに対する処理中の期間をハッチング付きの四角で示している。また、図5では、コア処理開始を白抜き矢印、コアと共有リソース間処理を破線矢印で示している。さらに、図5では、共有リソースの占有を丸印、共有リソースの占有失敗をバツ(×)印で示している。 In FIG. 5, the period during which each core is processing is indicated by a white square, and the period during which the dedicated core is processing the shared resource is indicated by a hatched square. Further, in FIG. 5, the core processing start is indicated by a white arrow, and the processing between the core and the shared resource is indicated by a broken arrow. Further, in FIG. 5, the occupation of the shared resource is indicated by a circle, and the failure of occupation of the shared resource is indicated by a cross (x).
例えば、図5(b)の第2コア12は、タイミングt14からタイミングt21の期間で処理を行なっている。図5(b)の第1コア11は、タイミングt12で共有リソース40を占有して、タイミングt16までの期間で共有リソース40に対する処理を行ない、タイミングt16で共有リソース40を解放している。図5(b)の第2コア12は、タイミング15で共有リソース40を占有しようとするが、既に、第1コア11によって共有リソース40が占有されているため、占有失敗となっている。
For example, the
なお、タイミングt1は、タイミングt11に対応している。つまり、図5は、第1コア〜第3コアを備えた比較例のマイコンと、第1コア11〜第3コア13を備えたマイコン100の処理時間を比較した図面と言える。また、図5(b)のタイミングt8は、図5(a)のタイミングt8を示している。
The timing t1 corresponds to the timing t11. That is, FIG. 5 can be said to be a drawing comparing the processing times of the microcomputer of the comparative example including the first to third cores and the
図5(a)に示すように、第1コアは、タイミングt1で処理を開始する。そして、第1コアは、タイミングt2からタイミングt5の期間で共有リソースを占有して、タイミングt5で共有リソースを解放する。第1コアは、動作クロックを高速化しないため、タイミングt1〜t2の間だけでなく、タイミング2〜t5の間も低速モードで動作することになる。 As shown in FIG. 5A, the first core starts processing at timing t1. Then, the first core occupies the shared resource during the period from the timing t2 to the timing t5 and releases the shared resource at the timing t5. Since the first core does not speed up the operation clock, it operates in the low speed mode not only between timings t1 and t2 but also between timings 2 and t5.
一方、図5(b)に示すように、第1コア11は、タイミングt11で処理を開始する。そして、第1コア11は、タイミングt12からタイミングt16の期間で共有リソース40を占有して、タイミングt16で共有リソース40を解放する。
On the other hand, as shown in FIG. 5B, the
このとき、監視コア10は、第1コア11が共有リソース40を占有しているタイミングt13で、第1逓倍器31を高速モード時の設定値に設定する。よって、第1コア11は、動作クロックが高速化された高速モードの状態で、共有リソース40を使用する。
At this time, the
このため、第1コア11は、第1コアと同じ処理を実行するにもかかわらず、第1コアよりも共有リソース40の占有時間が短い。よって、第1コア11が共有リソース40を占有している時間(t12〜t16)は、第1コアが共有リソースを占有している時間(t2〜t5)よりも短い。
Therefore, the
なお、本実施形態では、複数のコア11〜13が共有リソース40を占有していない状況が所定時間継続した場合に、占有コアを低速モードに遷移させる例を採用している。このため、占有コアである第1コア11は、タイミングt17、t20で低速モードが設定される。これにより、マイコン100は、共有リソース40を解放したコアが高速モード時よりも遅く動作するため消費電力を抑えることができる。
It should be noted that the present embodiment adopts an example in which the occupied cores are transited to the low speed mode when a plurality of
上記のように、第1コア11と第1コアは、同じ処理を実行するものであり、且つ、共有リソース40を占有していない場合、低速モードで動作する。このため、タイミングt12は、タイミングt2に対応する。つまり、タイミングt1からタイミングt2までの経過時間は、タイミングt11からタイミングt12までの経過時間と同様である。
As described above, the
また、図5(a)に示すように、第2コアは、タイミングt3で処理を開始して、タイミングt4で共有リソースを占有しようとする。しかしながら、共有リソースは、既に第1コアによって占有されている。このため、第2コアは、占有に失敗し、共有リソースが解放されるまで待機する。 Further, as shown in FIG. 5A, the second core starts processing at timing t3 and tries to occupy the shared resource at timing t4. However, the shared resource is already occupied by the first core. Therefore, the second core fails to occupy and waits until the shared resource is released.
そして、第2コアは、第1コアがタイミングt5で共有リソースを解放した後、タイミングt6で共有リソースを占有する。その後、第2コアは、タイミングt7までの間で共有リソースを占有し、タイミングt7で共有リソースを解放してタイミングt8まで処理を行う。第2コアは、第1コアと同様、動作クロックを高速化しないため、タイミングt3〜t8の全期間において低速モードで動作することになる。 Then, the second core occupies the shared resource at timing t6 after the first core releases the shared resource at timing t5. After that, the second core occupies the shared resource until the timing t7, releases the shared resource at the timing t7, and performs the process until the timing t8. Like the first core, the second core does not speed up the operation clock, and therefore operates in the low speed mode during the entire period from timing t3 to timing t8.
一方、図5(b)に示すように、第2コア12は、タイミングt14で処理を開始して、タイミングt15で共有リソース40を占有しようとする。しかしながら、比較例と同様に、共有リソース40は、既に第1コア11によって占有されている。このため、第2コア12は、占有に失敗し、共有リソース40が解放されるまで待機する。そして、第2コア12は、共有リソースが解放されるまで待機して、タイミングt17で共有リソースを占有する。
On the other hand, as shown in FIG. 5B, the
しかしながら、第1コア11は、上記のように、第1コアよりも、共有リソース40の占有時間が短い。このため、第2コア12は、第2コアよりも、共有リソース40が解放されるまでの待機時間が短い。よって、第2コア12は、第2コアよりも早く共有リソース40を占有することができる。
However, as described above, the
また、監視コア10は、第2コア12が共有リソース40を占有しているタイミングt18で、第2逓倍器32を高速モード時の設定値に設定する。よって、第2コア12は、動作クロックが高速化された高速モードの状態で、共有リソース40を使用する。このため、第2コア12は、第1コア11と同様、第2コアよりも共有リソース40の占有時間を短縮させることができる。よって、第2コア12が共有リソース40を占有している時間(t17〜t19)は、第2コアが共有リソースを占有している時間(t6〜t7)よりも短い。
Further, the
なお、各コア11〜13と比較例の各コアは、同じ処理を実行するものである。このため、第2コア12が処理を開始するタイミングt14は、第2コアが処理を開始するタイミングt3に対応する。つまり、タイミングt1からタイミングt3までの経過時間は、タイミングt11からタイミングt14までの経過時間と同様である。
The
また、第2コア12と第2コアは、同じ処理を実行するものであり、且つ、共有リソース40を占有していない場合、低速モードで動作する。このため、タイミングt7からタイミングt8までの経過時間は、タイミングt19からタイミングt21までの経過時間と同様である。
Further, the
このように、各コア11〜13は、各コアよりも、共有リソース40の占有時間が短くなるだけでなく、共有リソース40が解放されることを待つ待機時間が短くなる。このため、本実施形態の例では、マイコンがタイミングt8で第2コアの処理が完了するのに対して、マイコン100は、タイミングt8よりも早く、タイミングt21で第2コア12の処理が完了する。よって、マイコン100は、リアルタイム性が損なわれることを抑制できる。
In this way, each core 11 to 13 not only has a shorter occupied time of the shared
以上、本開示の好ましい実施形態について説明した。しかしながら、本開示は、上記実施形態に何ら制限されることはなく、本開示の趣旨を逸脱しない範囲において、種々の変形が可能である。以下に、本開示のその他の形態として、第2、第3実施形態に関して説明する。上記実施形態及び第2、第3実施形態は、それぞれ単独で実施することも可能であるが、適宜組み合わせて実施することも可能である。本開示は、実施形態において示された組み合わせに限定されることなく、種々の組み合わせによって実施可能である。 The preferred embodiments of the present disclosure have been described above. However, the present disclosure is not limited to the above embodiment, and various modifications can be made without departing from the spirit of the present disclosure. The second and third embodiments will be described below as other embodiments of the present disclosure. The above-described embodiments and the second and third embodiments can be carried out independently, but can also be carried out in an appropriate combination. The present disclosure is not limited to the combinations shown in the embodiments and can be implemented by various combinations.
(第2実施形態)
図6〜図8を用いて、第2実施形態の電子制御装置に関して説明する。本実施形態の電子制御装置は、マイコン110を備えている点が上記実施形態と異なる。また、マイコン110は、主に、複数の共有リソース41、42を備えている点、監視コア10の処理動作がマイコン100と異なる。なお、図6では、各コア11〜14に対応して設けられたROM21〜23などの図示を省略している。
(Second embodiment)
The electronic control unit according to the second embodiment will be described with reference to FIGS. 6 to 8. The electronic control unit according to the present embodiment is different from the above-described embodiment in that it includes a
なお、本実施形態では、共有リソース41、42を第4コア14、及び、第4コア14に対応して設けられた第4逓倍器34を備えている例を採用している。第4コア14は、上記コア11〜13と同様に動作する。第4逓倍器34は、上記逓倍器31〜33と同様に、監視コア10によって設定された設定値に応じた周波数の動作クロックを第4コア14に供給する。しかしながら、本開示は、第4コア14及び第4逓倍器34を備えていないマイコン110であっても採用できる。
In this embodiment, the shared
各共有リソース41、42は、共有リソース40と同様である。また、各スピンロック部51、52は、スピンロック部50と同様である。そして、監視コア10は、両スピンロック部51、52に格納されているスピンロック占有情報を確認可能に構成されている。
The shared
なお、図6では、第2共有リソース42は、第3コア13のみが使用可能に図示している。しかしながら、第2共有リソース42は、第1コア11、第2コア12、第4コア14が使用可能であってもよい。
Note that in FIG. 6, the second shared
ここで、図7を用いて、監視コア10における高速化コア決定処理に関して説明する。監視コア10は、ステップS14で高速化するコアを決定する場合、図7のフローチャートで示す処理を実行する。
Here, the speed-up core determination process in the
まず、監視コア10は、ステップS30において、第1コア11が第1共有リソース41を占有しているか否かを判定する。そして、監視コア10は、第1コア11が第1共有リソース41を占有していると判定した場合は、ステップS31に進んで、第1コア11を高速化する対象とする。一方、監視コア10は、第1コア11が第1共有リソース41を占有していると判定しなかった場合は、ステップS32に進む。
First, in step S30, the
次に、監視コア10は、ステップS32において、第2コア12が第1共有リソース41を占有しているか否かを判定する。そして、監視コア10は、第2コア12が第1共有リソース41を占有していると判定した場合は、ステップS33に進んで、第2コア12を高速化する対象とする。一方、監視コア10は、第2コア12が第1共有リソース41を占有していると判定しなかった場合は、ステップS34に進む。
Next, the
次に、監視コア10は、ステップS34において、第3コア13が第2共有リソース42を占有しているか否かを判定する。そして、監視コア10は、第3コア13が第2共有リソース42を占有していると判定した場合は、ステップS35に進んで、第3コア13を高速化する対象とする。一方、監視コア10は、第3コア13が第2共有リソース42を占有していると判定しなかった場合は、図7の処理を終了する。
Next, the
監視コア10は、占有コアの動作クロックを高速化している際に、他のコアが他の共有リソースを占有したとしても、他のコアの動作クロックを高速化しない(動作クロック管理部)。第3コア13は、第1共有リソース41ではなく、第2共有リソース42を使用する。よって、第3コア13は、第1コア11または第2コア12が第1共有リソース41を占有していたとしても、第2共有リソース42を占有することができる。同様に、第1コア11または第2コア12は、第3コア13が第2共有リソース42を占有していたとしても、第1共有リソース41を占有することができる。
The
しかしながら、図8に示すように、監視コア10は、第1コア11または第2コア12の動作クロックを高速化している際に、第3コア13が第2共有リソース42を占有したとしても、第3コア13の動作クロックを高速化しない。同様に、監視コア10は、第3コア13の動作クロックを高速化している際に、第1コア11または第2コア12が第1共有リソース41を占有したとしても、第1共有リソース41を占有したコア(第1コア11または第2コア12)の動作クロックを高速化しない。
However, as shown in FIG. 8, in the
つまり、監視コア10は、先に共有リソースを占有しているコアの動作クロックを優先的に高速化する。言い換えると、監視コア10は、いずれの共有リソースも占有されていない状況で、あるコアが共有リソースを占有した場合に、そのコアの動作クロックを優先的に高速化する。このため、監視コア10は、あるコアが共有リソースを占有している場合、他のコアが他の共有リソースを占有したとしても、他のコアの動作クロックを高速化しない。
That is, the
このように、マイコン110は、複数のコア11〜13のうち、動作クロックを高速化するコアを一つとしている。これによって、マイコン110は、複数のコア(例えば第1コア11と第3コア13)の動作クロックを高速化することで消費電力が増大してしまうことを抑制できる。また、マイコン110は、消費電力の増大を抑制できるため、その分、発熱を抑える必要がある。
As described above, the
(変形例)
ここで、図9を用いて、第2実施形態の変形例に関して説明する。変形例の監視コア10は、高速化コア決定処理が第2実施形態と異なる。監視コア10は、ステップS14で高速化するコアを決定する場合、図9のフローチャートで示す処理を実行する。
(Modification)
Here, a modification of the second embodiment will be described with reference to FIG. The modified
監視コア10は、ステップS40において、第1共有リソース41が占有されているか否かを判定する。そして、監視コア10は、第1共有リソース41が占有されていると判定した場合、ステップS41において、第1共有リソース41を占有しているコアを高速化する。この場合、監視コア10は、第1コア11と第2コア12のうちの第1共有リソース41を占有している方の動作クロックを高速化する。一方、監視コア10は、第1共有リソース41が占有されていると判定しなかった場合、ステップS42において、第2共有リソース42を占有しているコアを高速化する。この場合、監視コア10は、第3コア13の動作クロックを高速化する。変形例のマイコン110は、第2実施形態と同様の効果を奏することができる。
In step S40, the
10…監視コア、11…第1コア、12…第2コア、13…第3コア、14…第4コア、21…第1ROM、22…第2ROM、23…第3ROM、31…第1逓倍器、32…第3逓倍器、33…第3逓倍器、34…第4逓倍器、40…共有リソース、41…第1共有リソース、42…第2共有リソース、50…スピンロック部、51…第1スピンロック部、52…第2スピンロック部、100,110…マイコン、200…発振器、310…第1映像演算装置、311…第2マイコン、320…第2映像演算装置、321…第3マイコン、400…表示装置 10... Monitoring core, 11... First core, 12... Second core, 13... Third core, 14... Fourth core, 21... First ROM, 22... Second ROM, 23... Third ROM, 31... First multiplier , 32... Third multiplier, 33... Third multiplier, 34... Fourth multiplier, 40... Shared resource, 41... First shared resource, 42... Second shared resource, 50... Spinlock unit, 51... 1 spin lock part, 52... 2nd spin lock part, 100, 110... Microcomputer, 200... Oscillator, 310... 1st image processing device, 311... 2nd microcomputer, 320... 2nd image processing device, 321... 3rd microcomputer , 400... Display device
Claims (6)
複数の前記処理部が使用可能な少なくとも一つの共有リソース(40、41、42)と、
各処理部の動作クロックを管理する動作クロック管理部(10、31、32、33、34)と、を備え、
各処理部は、前記共有リソースの使用権を獲得すると、前記使用権を解放するまでの間、他の前記処理部が前記共有リソースを使用できないように前記共有リソースを占有し、
前記動作クロック管理部は、複数の前記処理部のうち前記共有リソースを占有している占有処理部を検出するとともに、前記占有処理部の前記動作クロックを、前記共有リソースを占有していない場合よりも高速化する電子制御装置。 A plurality of processing units (11, 12, 13, 14),
At least one shared resource (40, 41, 42) usable by a plurality of the processing units;
An operation clock management unit (10, 31, 32, 33, 34) that manages the operation clock of each processing unit,
Each processing unit, when acquiring the usage right of the shared resource, occupies the shared resource so that the other processing units cannot use the shared resource until the usage right is released,
The operation clock management unit detects an occupation processing unit that occupies the shared resource from among the plurality of processing units, and sets the operation clock of the occupation processing unit to be less than that when the shared resource is not occupied. An electronic control unit that speeds up.
前記動作クロック管理部は、前記占有処理部の前記動作クロックを高速化している際に、他の前記処理部が他の前記共有リソースを占有したとしても、他の前記処理部の前記動作クロックを高速化しない請求項1乃至5のいずれか1項に記載の電子制御装置。 Comprising a plurality of said shared resources,
The operation clock management unit controls the operation clocks of the other processing units even when the other processing units occupy the other shared resources while increasing the operation clocks of the occupation processing units. The electronic control device according to claim 1, wherein the speed is not increased.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019018880A JP2020126477A (en) | 2019-02-05 | 2019-02-05 | Electronic control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019018880A JP2020126477A (en) | 2019-02-05 | 2019-02-05 | Electronic control device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020126477A true JP2020126477A (en) | 2020-08-20 |
Family
ID=72084039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019018880A Pending JP2020126477A (en) | 2019-02-05 | 2019-02-05 | Electronic control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020126477A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022107246A1 (en) * | 2020-11-18 | 2022-05-27 | 三菱電機株式会社 | Control management device |
-
2019
- 2019-02-05 JP JP2019018880A patent/JP2020126477A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022107246A1 (en) * | 2020-11-18 | 2022-05-27 | 三菱電機株式会社 | Control management device |
JPWO2022107246A1 (en) * | 2020-11-18 | 2022-05-27 | ||
JP7496891B2 (en) | 2020-11-18 | 2024-06-07 | 三菱電機株式会社 | Control Management Device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20070118838A1 (en) | Task execution controller, task execution control method, and program | |
US9760411B2 (en) | Switching a locking mode of an object in a multi-thread program | |
WO2009113034A1 (en) | Look-ahead task management | |
US20080295104A1 (en) | Realtime Processing Software Control Device and Method | |
WO2011096163A1 (en) | Information processing system, exclusive control method, and program for exclusive control | |
WO2016202154A1 (en) | Gpu resource allocation method and system | |
WO2016202153A1 (en) | Gpu resource allocation method and system | |
CN115658153A (en) | Sleep lock optimization method and device, electronic equipment and storage medium | |
JP2020126477A (en) | Electronic control device | |
JP4253796B2 (en) | Computer and control method | |
JP2007172611A (en) | Method and storage medium (effective use method for processor in virtual sharing environment) | |
US9223615B2 (en) | Apparatus and method for thread progress tracking | |
JP2001117786A (en) | Process scheduling device and process scheduling method | |
JP2006146758A (en) | Computer system | |
JP2011175378A (en) | Multiprocessor system and operation method for the same | |
US20200379820A1 (en) | Synchronization mechanism for workgroups | |
JP2009075948A (en) | Multicore processor | |
CN113127162B (en) | Automatic task execution method and device, electronic equipment and computer storage medium | |
US20130067482A1 (en) | Method for configuring an it system, corresponding computer program and it system | |
JP4441592B2 (en) | Parallel processing apparatus and exclusive control method | |
JP5332716B2 (en) | Startup control method, information processing apparatus, and program | |
JP6881116B2 (en) | Information processing equipment, information processing methods and programs | |
JP2011248454A (en) | Processor device and control method for processor device | |
JP2014078266A (en) | Multi-core processor system, control method for multi-core processor system, and control program for multi-core processor system | |
US20220156074A1 (en) | Electronic device and multiplexing method of spatial |