JP2011237929A - Multi-core processor - Google Patents
Multi-core processor Download PDFInfo
- Publication number
- JP2011237929A JP2011237929A JP2010107384A JP2010107384A JP2011237929A JP 2011237929 A JP2011237929 A JP 2011237929A JP 2010107384 A JP2010107384 A JP 2010107384A JP 2010107384 A JP2010107384 A JP 2010107384A JP 2011237929 A JP2011237929 A JP 2011237929A
- Authority
- JP
- Japan
- Prior art keywords
- processor
- core
- message queue
- access
- job
- 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)
Abstract
Description
本発明は、複数のプロセッサコアが独立して処理を行うことが可能なマルチコア・プロセッサに関する。 The present invention relates to a multi-core processor in which a plurality of processor cores can perform processing independently.
従来、一個のパッケージ内に複数のプロセッサコア(CPUコア)を備えるマルチコア・プロセッサについて実用化が図られている。マルチコア・プロセッサにおいて、各コアは独立して演算処理等を行うことが可能である。従って、特に複数の機能が統合された車載制御装置のように、複数のタスクを同時実行する装置に適用された場合に、高速処理を実現することができる。 Conventionally, a multicore processor having a plurality of processor cores (CPU cores) in one package has been put into practical use. In a multi-core processor, each core can independently perform arithmetic processing and the like. Therefore, high-speed processing can be realized particularly when applied to a device that executes a plurality of tasks simultaneously, such as an in-vehicle control device in which a plurality of functions are integrated.
これに関連した移動体用マルチコアCPUの制御装置についての発明が開示されている(例えば、特許文献1参照)。この制御装置では、処理能力を低下させる異常が発生したことを検出する異常検出手段と、複数のCPUコアに割り当てられた処理の優先度を格納する処理優先度格納手段と、複数のCPUコアの各々の処理能力を調整するための処理能力調整手段とを備え、異常検出手段によって異常が検出されたときに、処理優先度格納手段に格納された処理の優先度が最も高い処理が割り当てられたCPUコア以外のCPUコアの処理能力を低減させるように制御している。 An invention relating to a control device for a multi-core CPU for a moving body related to this is disclosed (for example, see Patent Document 1). In this control device, an abnormality detection unit that detects that an abnormality that reduces processing capacity has occurred, a processing priority storage unit that stores priority of processing assigned to a plurality of CPU cores, and a plurality of CPU cores A processing capacity adjusting means for adjusting each processing capacity, and when an abnormality is detected by the abnormality detecting means, the process having the highest priority stored in the processing priority storing means is assigned. Control is performed to reduce the processing capacity of CPU cores other than the CPU core.
ところで、マルチコア・プロセッサでは、不揮発性メモリ等の共有アクセス対象が存在するのが通常である。このため、複数のプロセッサコアが同時にこうした共有アクセス対象にアクセスしないように制御する必要がある。 By the way, in a multi-core processor, there is usually a shared access target such as a nonvolatile memory. For this reason, it is necessary to control so that a plurality of processor cores do not access such a shared access target at the same time.
特許文献2に記載のマルチコア・プロセッサでは、回路情報に基づいて動的に回路構成を再構成可能な複数のリコンフィギュラブルデバイスを備え、複数のプロセッサコアのいずれかがリコンフィギュラブルデバイスを使用している際には、当該リコンフィギュラブルデバイスがいずれかのプロセッサコアにロックされていることを示すロック情報をメモリに記憶させることによって、排他制御を行っている。
The multi-core processor described in
しかしながら、上記従来の特許文献2に記載のマルチコア・プロセッサのような排他制御を共有アクセス対象について行う場合、各プロセッサコアがロック情報を参照しなければならず、処理が遅延するおそれがある。また、ロック情報が記憶されるメモリへのアクセスに関しても、排他制御を行う必要がある。
However, when exclusive control like the multi-core processor described in the above-mentioned
更に、いずれかのプロセッサコアが共有アクセス対象を占有する結果、プロセッサコア間のスループットが偏ってしまう可能性がある。 Furthermore, as a result of one of the processor cores occupying the shared access target, the throughput between the processor cores may be biased.
本発明はこのような課題を解決するためのものであり、共有アクセス対象へのアクセスに関する調停を確実に行うことが可能なマルチコア・プロセッサを提供することを、主たる目的とする。 The present invention has been made to solve such problems, and a main object of the present invention is to provide a multi-core processor capable of reliably performing arbitration related to access to a shared access target.
上記目的を達成するための本発明の一態様は、
複数のプロセッサコアが独立して処理を行うことが可能なマルチコア・プロセッサであって、
前記複数のプロセッサコアによってアクセス可能なメモリ上に、特定の共有アクセス対象に対するアクセスの内容及び順序を規定するためのメッセージキューが設定され、
前記複数のプロセッサコアは、前記メッセージキューに対する所定の書き込み制御に応じて、前記特定の共有アクセス対象に対するアクセスに関するジョブ情報を排他的に前記メッセージキューに書き込み、
前記複数のプロセッサコアのうち少なくとも一の特定対象アクセス実行用プロセッサコアは、前記メッセージキューに書き込まれたジョブ情報に従って、前記特定の共有アクセス対象に対するアクセスを含む処理を実行することを特徴とする、
マルチコア・プロセッサである。
In order to achieve the above object, one embodiment of the present invention provides:
A multi-core processor in which a plurality of processor cores can perform processing independently,
A message queue for defining the content and order of access to a specific shared access target is set on the memory accessible by the plurality of processor cores,
The plurality of processor cores exclusively write job information related to access to the specific shared access target in the message queue according to predetermined write control on the message queue,
At least one specific target access execution processor core among the plurality of processor cores executes processing including access to the specific shared access target in accordance with job information written in the message queue.
It is a multi-core processor.
この本発明の一態様によれば、複数のプロセッサコアが、所定の書き込み制御に応じて特定の共有アクセス対象に対するアクセスに関するジョブ情報を排他的にメッセージキューに書き込み、特定対象アクセス実行用プロセッサコアが、メッセージキューに書き込まれたジョブ情報に従って特定の共有アクセス対象に対するアクセスを、当該ジョブ情報を書き込んだプロセッサコアに代わって実行するため、共有アクセス対象へのアクセスに関する調停を確実に行うことができる。 According to this aspect of the present invention, a plurality of processor cores exclusively write job information related to access to a specific shared access target in a message queue in accordance with predetermined write control, and the specific target access execution processor core Since access to a specific shared access target is executed on behalf of the processor core that has written the job information in accordance with the job information written in the message queue, arbitration relating to access to the shared access target can be performed reliably.
本発明の一態様において、
前記ジョブ情報は、処理の優先度に関する情報を含んでおり、
前記特定対象アクセス実行用プロセッサコアは、前記ジョブ情報に含まれる処理の優先度に関する情報に基づいて、前記処理を代行する順序を変更することを特徴とするものとすると、好適である。
In one embodiment of the present invention,
The job information includes information on processing priority,
It is preferable that the specific target access execution processor core changes the order of performing the processing based on information on processing priority included in the job information.
こうすれば、優先度に応じた処理順序で、ジョブ情報に含まれる処理を実行することができる。 In this way, the processing included in the job information can be executed in the processing order corresponding to the priority.
また、本発明の一態様において、
前記メッセージキューに対する所定の書き込み制御は、所定の順序に従って、前記メッセージキューにジョブ情報の書き込みを終了したプロセッサコアから、次に前記メッセージキューにジョブ情報の書き込むプロセッサコアに、順次書き込み可能通知を行うことによって排他制御が実現されるものとしてもよい。
In one embodiment of the present invention,
Predetermined write control for the message queue is performed sequentially according to a predetermined order from a processor core that has finished writing job information to the message queue to a processor core that next writes job information to the message queue. Thus, exclusive control may be realized.
また、本発明の一態様において、
前記メッセージキューに対する所定の書き込み制御は、前記複数のプロセッサコアのうち少なくとも一の書込制御用プロセッサコアにおいて保持されている所定の順序に従って、該書込制御用プロセッサコアから各プロセッサコアに順次書き込み可能通知を行うことによって排他制御が実現されるものとしてもよい。
In one embodiment of the present invention,
The predetermined write control for the message queue is sequentially written from the write control processor core to each processor core according to a predetermined order held in at least one of the plurality of processor cores. Exclusive control may be realized by performing a notification of possible.
また、本発明の一態様において、
前記書き込み可能通知は、ソフトウエア割り込みによって行われるものとしてもよいし、前記複数のプロセッサコアによってアクセス可能なメモリ上において、次に前記メッセージキューにジョブ情報の書き込むプロセッサコアを指定することによって行われるものとしてもよい。
In one embodiment of the present invention,
The writable notification may be performed by a software interrupt, or by designating a processor core to which job information is written next in the message queue on a memory accessible by the plurality of processor cores. It may be a thing.
また、本発明の一態様は、
車両に搭載され、前記各プロセッサコアは、車両制御のための処理を行うことを特徴とするものとしてもよい。
One embodiment of the present invention includes
The processor cores mounted on a vehicle may perform processing for vehicle control.
本発明によれば、共有アクセス対象へのアクセスに関する調停を確実に行うことが可能なマルチコア・プロセッサを提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the multi-core processor which can perform the arbitration regarding access to a shared access object reliably can be provided.
以下、本発明を実施するための形態について、添付図面を参照しながら実施例を挙げて説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the accompanying drawings.
<第1実施例>
以下、図面を参照し、本発明の第1実施例に係るマルチコア・プロセッサについて説明する。本実施例のマルチコア・プロセッサは、複数のプロセッサコアが独立して処理を行うことが可能なものであり、例えば複数の機能が統合された車載制御装置のように、複数のタスクを同時実行する装置に好適に適用される。
<First embodiment>
A multi-core processor according to a first embodiment of the present invention will be described below with reference to the drawings. The multi-core processor of this embodiment is capable of processing independently by a plurality of processor cores, and executes a plurality of tasks at the same time, such as an in-vehicle controller integrated with a plurality of functions. It is suitably applied to the device.
[構成]
図1は、本発明の第1実施例に係るマルチコア・プロセッサ1のシステム構成例である。マルチコア・プロセッサ1は、複数のプロセッサコア(個数に特段の制限はないが、本明細書においては3個とする)10、20、30と、共有メモリ40と、特定の共有アクセス対象の一例としての不揮発性メモリ50と、を備える。不揮発性メモリ50は、例えばEEPROM(Electrically Erasable and Programmable Read Only Memory)やフラッシュメモリである。
[Constitution]
FIG. 1 is a system configuration example of a
各プロセッサコアは、図示しないプログラムメモリに格納された命令列をフェッチして一時的に格納する命令バッファ、命令列に格納された命令列をデコード(復号)する命令デコーダ、命令デコーダによりデコードされた命令を実行するための演算器、演算器による演算結果等が格納されるレジスタ、一次キャッシュメモリ等を有しており、それぞれが特定のタスクに係る処理を実行する。 Each processor core fetches an instruction sequence stored in a program memory (not shown) and temporarily stores it, an instruction decoder that decodes the instruction sequence stored in the instruction sequence, and is decoded by the instruction decoder An arithmetic unit for executing an instruction, a register for storing an operation result by the arithmetic unit, a primary cache memory, and the like are included, and each executes processing related to a specific task.
本実施例では、プロセッサコア10は、上記のように命令を実行することにより機能する機能ブロックとして、タイミング生成部11、スケジューラ12、機能モジュール13、14、要求受付部15を備える。ここで、機能モジュールとは、マルチコア・プロセッサ1が本来実行すべき種々のタスクを構成する処理単位である。
In the present embodiment, the
また、プロセッサコア20は、機能ブロックとして、スケジューラ22、機能モジュール23、24、要求受付部25を備える。
Further, the
また、プロセッサコア30は、機能ブロックとして、スケジューラ32、機能モジュール33、34、要求受付部35、ジョブソート部36、ジョブ実行部37、メモリドライバ38を備える。
The
共有メモリ40は、例えばRAM(Random Access Memory)であり、各プロセッサコアにより読み書き可能となっている。共有メモリ40には、例えば機能モジュール毎に、ワーク領域と当該機能モジュールの処理状況を示すジョブ状態を示す領域が設定されている。なお、図1では機能モジュール13、23、33についてのワーク領域の図示を省略した。
The shared
また、共有メモリ40には、特定の共有アクセス対象(本実施例では不揮発性メモリ50)に対するアクセスの内容及び順序を規定するためのメッセージキュー42が設定されている。
In the shared
図2は、メッセージキュー42の概念を、格納されるジョブの状態や処理主体の変化と共に示す概念図である。図示するように、メッセージキュー42には、複数のジョブ情報が、入力順ないし処理順に格納されている。
FIG. 2 is a conceptual diagram showing the concept of the
ジョブの状態は、ジョブ情報として格納される前の「登録待ち」状態から、ジョブ情報として格納された後の「実行待ち」状態、キュー先頭に至って実行順が回ってきた後の「実行中」状態、処理が完了した後の「完了」状態の順に推移する。「登録待ち」状態は、いずれかの要求受付部から入力された状態であり、「実行待ち」状態においてはジョブソート部36によって並べ替えが行われる。そして、「実行中」状態ではジョブ実行部37によって処理が実行される。
The job status is from "Waiting for registration" before being stored as job information, to "Waiting for execution" after being stored as job information, and "In execution" after the order of execution has reached the top of the queue. The status changes in the order of “completed” after the processing is completed. The “Waiting for registration” state is a state inputted from any of the request accepting units. In the “Waiting for execution” state, the
図3は、要求受付部から入力されるメッセージ情報、及び、これにジョブIDが付与されてメッセージキュー42に格納されたジョブ情報のデータ構造を示す図である。本実施例におけるジョブ情報は、いずれかの要求受付部から入力されたメッセージ情報にジョブIDが付与されたものである。
FIG. 3 is a diagram illustrating the data structure of the message information input from the request receiving unit and the job information stored in the
メッセージキュー42は、例えばキューバッファによって実現される。図4は、本実施例に係るメッセージキュー42を実現可能なキューバッファの構造を示す図である。図示するように、キューバッファは、ジョブIC、及び優先度等を含むメッセージ情報からなるマトリクスデータに配列インデクスが付与され、更に、ポインタ44A、44Bによってキューの先頭と末尾がそれぞれ指定されている。ポインタ44A、44Bは、ジョブの実行に応じて移動する構成となっている。図4は、配列インデクス[3]に格納されたジョブが完了した後の状態を示しており、次に実行されるジョブは、配列インデクス[4]に格納された、ジョブIDが「01」のジョブである。この配列インデクス[4]に格納されたジョブの実行が完了すると、ポインタ44Aが一段下に移動する。
The
ジョブソート部36は、例えばジョブ情報に含まれる優先度に従って、メッセージキュー42に格納されたジョブ情報を並べ替える。図5は、図4に示した状態から、ジョブソート部36がジョブ情報を並べ替えた結果を示す図である。
The
そして、前述のように、メッセージキュー42にジョブ情報が格納されたジョブは、プロセッサコア30のジョブ実行部37によって実行される。例えば、プロセッサコア10の要求受付部15によって書き込まれた、不揮発性メモリ50の所定アドレスからデータを読み込むジョブを実行する場合、プロセッサコア30のジョブ実行部37は、不揮発性メモリ50の所定アドレスからデータを読み込んで共有メモリ40におけるプロセッサコア10の、該当する機能モジュールのためのワーク領域にデータを格納する。プロセッサコア30は、不揮発性メモリ50にアクセスするための機能として、メモリドライバ38を備えている。
As described above, the job whose job information is stored in the
このように、本実施例のマルチコア・プロセッサ1では、不揮発性メモリ50へのアクセスに係る処理をプロセッサコア30に一本化して実行させているため、複数のプロセッサコアが同時に不揮発性メモリ50にアクセスすることによって干渉が生じるのを、確実に回避することができる。
As described above, in the
[メッセージキュー42に対する書き込みの制御]
図6は、各プロセッサコアの要求受付部によりメッセージキュー42にメッセージ情報が書き込まれる際の処理の流れを示すタイミングチャートである。プロセッサコア10のタイミング生成部11は、所定周期毎に要求受付開始のための基準タイミング通知を行う。なお、この所定周期は、例えば、各プロセッサコアの機能モジュールの全てが不揮発性メモリ50へのアクセスを行った際の処理時間の合計よりも、十分余裕のある時間に設定される。
[Control of writing to message queue 42]
FIG. 6 is a timing chart showing the flow of processing when message information is written to the
プロセッサコア10のスケジューラ12は、基準タイミング通知を検知すると、要求受付部15に要求受付許可通知を行う(時刻t1)。要求受付部15は、メッセージキュー42に空きがある場合、ジョブ情報をメッセージキュー42に書き込む(時刻t1〜t2)。スケジューラ12は、メッセージ情報の出力が完了すると、要求受付許可通知をプロセッサコア20のスケジューラ22に対して行う(時刻t3)。ここで、要求受付許可通知は、例えばソフトウエア/ハードウエア割り込みによって行われるが、スケジューラ12が共有メモリ40にフラグ等を設定し、スケジューラ22がポーリングすることによって行われても構わない。他のスケジューラ間でも同様である。
When the
プロセッサコア20のスケジューラ22は、要求受付許可通知を検知すると、要求受付部25に起動信号を出力する(時刻t3)。要求受付部25は、メッセージキュー42に空きがある場合、ジョブ情報をメッセージキュー42に書き込む(時刻t3〜t4)。スケジューラ22は、メッセージ情報の出力が完了すると、要求受付許可通知をプロセッサコア30のスケジューラ32に対して行う(時刻t5)。
When the
プロセッサコア30のスケジューラ32は、要求受付許可通知を検知すると要求受付部35に起動信号を出力する(時刻t5)。要求受付部35は、メッセージキュー42に空きがある場合、ジョブ情報をメッセージキュー42に書き込む(時刻t5〜t6)。スケジューラ32は、メッセージ情報の出力が完了すると、ジョブソート部36にジョブ情報の並べ替えを指示する(時刻t7)。ジョブソート部36がジョブ情報の並べ替えを終了すると、ジョブ実行部37によって、メッセージキュー42に格納されたジョブ情報に基づいて、ジョブが実行される(時刻t8)。
When the scheduler 32 of the
このように、プロセッサコア10のタイミング生成部11によって開始信号が出力され、これに応じて各プロセッサコアの要求受付部が順次メッセージ情報の出力を行うように制御される。これによって、ジョブ情報の書き込みに関してプロセッサコア間で干渉が生じるのを回避することができる。
As described above, the start signal is output by the
[各種処理フロー]
以下、各機能ブロックの動作について、それぞれフローチャートに即して説明する。
[Various processing flows]
Hereinafter, the operation of each functional block will be described with reference to flowcharts.
図7は、各プロセッサコアの要求受付部が実行する要求受付処理の流れを示すフローチャートである。本フローは、前述のように要求受付許可通知が検知されたときに、当該プロセッサコアにおいて実行中の機能モジュール毎に実行される。 FIG. 7 is a flowchart showing a flow of request reception processing executed by the request reception unit of each processor core. This flow is executed for each functional module being executed in the processor core when the request acceptance permission notification is detected as described above.
まず、要求受付部は、共有メモリ40における、当該処理に対応するジョブ状態を示す記憶領域に「登録待ち」を書き込む(S100)。 First, the request receiving unit writes “waiting for registration” in the storage area indicating the job status corresponding to the processing in the shared memory 40 (S100).
次に、要求受付部は、メッセージキュー42に空きが存在するか否かを判定する(S102)。本判定は、例えば、外部変数として保持されているポインタ44A、44Bの位置(先頭及び末尾の位置)を参照することにより行う。メッセージキュー42に空きが存在しない場合は、本フローを終了する。
Next, the request reception unit determines whether or not there is a space in the message queue 42 (S102). This determination is performed, for example, by referring to the positions (start and end positions) of the
メッセージキュー42に空きが存在する場合は、ポインタ44Bの位置を1つインクリメントしてキューの末尾の位置を繰り下げ(S104)、今回登録するメッセージ情報にジョブIDを付与してキューの末尾に登録する(S106)。
If there is an empty space in the
そして、共有メモリ40における、当該処理に対応するジョブ状態を示す記憶領域に「実行待ち」を書き込み(S108)、本フローを終了する。 Then, “waiting for execution” is written in the storage area indicating the job status corresponding to the processing in the shared memory 40 (S108), and this flow is ended.
図8は、マルチコア・プロセッサ1の起動時やエラーからの回復時等に実行される初期化処理の流れを示すフローチャートである。本フローは、マルチコア・プロセッサ1の図示しないOS(Operating System)等によって実行される。
FIG. 8 is a flowchart showing a flow of initialization processing executed when the
初期化処理においては、外部変数として保持されている実行状態をアイドル状態とし(S200)、ポインタ44A、44Bの位置をゼロ位置とする(S202、S204)。ここで、「実行状態」とは、メモリドライバ38による不揮発性メモリ50へのアクセス処理の実行状態を示すデータである。
In the initialization process, the execution state held as an external variable is set to the idle state (S200), and the positions of the
図9は、ジョブ実行部37により実行されるジョブ実行処理の流れを示すフローチャートである。本フローは、例えば周期的に繰り返し実行される。
FIG. 9 is a flowchart showing the flow of job execution processing executed by the
まず、ジョブ実行部37は、外部変数として保持されている実行状態がアイドル状態であるか否かを判定する(S300)。
First, the
実行状態がアイドル状態である場合は、メッセージキュー42に実行待ちのジョブ情報が存在するか否かを判定する(S302)。本判定は、例えばポインタ44A、44Bの位置を参照することによって行うことができる。メッセージキュー42に実行待ちのジョブ情報が存在しない場合は、本フローの1ルーチンを終了する。
If the execution state is the idle state, it is determined whether or not there is job information waiting for execution in the message queue 42 (S302). This determination can be made by referring to the positions of the
メッセージキュー42に実行待ちのジョブ情報が存在する場合は、図10に示すジョブ開始処理を実行する(S304)。
If there is job information waiting for execution in the
一方、実行状態がアイドル状態でない場合は、メモリドライバ38がアイドル状態であるか否かを判定する(S306)。メモリドライバ38がアイドル状態でない場合は、本フローの1ルーチンを終了する。メモリドライバ38がアイドル状態でないと判定されるのは、実行状態、メモリドライバ38共にアイドル状態でない場合、すなわち、不揮発性メモリ50へのアクセスが実行中の場合である。
On the other hand, if the execution state is not the idle state, it is determined whether or not the
メモリドライバ38がアイドル状態である場合は、図11に示すジョブ終了処理を実行する(S308)。
If the
図10は、ジョブ実行部37により実行されるジョブ開始処理の流れを示すフローチャートである。
FIG. 10 is a flowchart showing the flow of job start processing executed by the
まず、ジョブ実行部37は、キュー先頭のジョブ情報からメッセージ情報を取り出す(S400)。そして、メッセージ情報に含まれる各データに従って、メモリドライバ38に対してアクセス指示を発行する(S402)。
First, the
次に、実行状態を実行中とし(S404)、当該処理に対応するジョブ状態を示す共有メモリ40の記憶領域に「実行中」を書き込む(S406)。この記憶領域は、前述のように、要求受付部から入力されたメッセージ情報に含まれている。
Next, it is assumed that the execution state is being executed (S404), and “executing” is written in the storage area of the shared
そして、ポインタ44Aの位置を1つインクリメントしてキューの先頭の位置を繰り下げ(S408)、本フローを終了する。
Then, the position of the
図11は、ジョブ実行部37により実行されるジョブ終了処理の流れを示すフローチャートである。
FIG. 11 is a flowchart showing the flow of job end processing executed by the
ジョブ終了処理において、ジョブ実行部37は、ジョブ実行部37は、実行状態をアイドル状態とし(S500)、次に当該処理に対応するジョブ状態を示す共有メモリ40の記憶領域に「完了」を書き込み(S502)、本フローを終了する。
In the job end process, the
[まとめ]
以上説明した本実施例のマルチコア・プロセッサ1によれば、不揮発性メモリ50へのアクセスに係る処理をプロセッサコア30に一本化して実行させているため、複数のプロセッサコアが同時に不揮発性メモリ50にアクセスすることによって干渉が生じるのを、確実に回避することができる。
[Summary]
According to the
また、プロセッサコア10のタイミング生成部11によって基準タイミング通知が行われ、これに応じて各プロセッサコアの要求受付部が順次メッセージ情報の出力を行うように制御されるため、ジョブ情報の書き込みに関してプロセッサコア間で干渉が生じるのを回避することができる。
Further, the
なお、図12は、従来のマルチコア・プロセッサにおいて、複数のプロセッサコアが同時に特定の共有アクセス対象にアクセスすることによって干渉が生じる様子を示す図である。これに対し、図13は、本実施例のマルチコア・プロセッサ1において、干渉が生じるのが回避される様子を示す図である。
FIG. 12 is a diagram illustrating a state in which interference occurs when a plurality of processor cores simultaneously access a specific shared access target in a conventional multi-core processor. On the other hand, FIG. 13 is a diagram showing how interference is avoided in the
<第2実施例>
以下、図面を参照し、本発明の第2実施例に係るマルチコア・プロセッサについて説明する。本実施例のマルチコア・プロセッサは、複数のプロセッサコアが独立して処理を行うことが可能なものであり、例えば複数の機能が統合された車載制御装置のように、複数のタスクを同時実行する装置に好適に適用される。
<Second embodiment>
A multi-core processor according to a second embodiment of the present invention will be described below with reference to the drawings. The multi-core processor of this embodiment is capable of processing independently by a plurality of processor cores, and executes a plurality of tasks at the same time, such as an in-vehicle controller integrated with a plurality of functions. It is suitably applied to the device.
[構成]
本実施例のマルチコア・プロセッサ2は、構成、及び各構成要素の基本的機能において第1実施例と共通するため、図1を援用することとし、各構成要素について同一の符号を付し、第1実施例との相違点を中心に説明する。
[Constitution]
Since the
本実施例のマルチコア・プロセッサ2においても、不揮発性メモリ50へのアクセスに係る処理をプロセッサコア30に一本化して実行させているため、複数のプロセッサコアが同時に不揮発性メモリ50にアクセスすることによって干渉が生じるのを、確実に回避することができる。
Also in the
[メッセージキュー42に対する書き込みの制御、各種処理フロー]
各プロセッサコアの要求受付部によりメッセージキュー42にメッセージ情報が書き込まれる際の処理の流れについても、第1実施例と同様であり、図6を援用する。
[Control of writing to
The flow of processing when message information is written to the
但し、本実施例では、メッセージキュー42に対する書き込みの制御において、スケジューラ間の通知の流れが第1実施例と異なっている。
However, in this embodiment, in the control of writing to the
図14は、各コア間でメッセージキュー42に対する書き込みの制御が行われる様子を示すシーケンス図である。
FIG. 14 is a sequence diagram illustrating a state in which writing control for the
まず、プロセッサコア10は、図15に示すようなリソースアクセス待ち処理を実行する(S600)。なお、本図における「リソース」とは、共有メモリ40を指している。
First, the
リソースアクセス待ち処理が終了すると、プロセッサコア10は、第1実施例において図7で説明した要求受付処理を、機能モジュール13、14のそれぞれについて実行する(S602、S604)。
When the resource access waiting process ends, the
要求受付処理が終了すると、プロセッサコア10は、図16に示すようなリソース振り分け処理を実行する(S606)。ここでは、対象コアはプロセッサコア20となる。
When the request acceptance process ends, the
リソース振り分け処理においてプロセッサコア10からプロセッサ20に対して要求受付許可通知が行われると、プロセッサ20は図17に示すようなリソース占有開始処理を実行する(S610)。
When a request acceptance permission notification is sent from the
リソースアクセス待ち処理が終了すると、プロセッサコア20は、第1実施例において図7で説明した要求受付処理を、機能モジュール23、24のそれぞれについて実行する(S612、S614)。
When the resource access wait process ends, the
要求受付処理が終了すると、プロセッサコア20は、図18に示すようなリソース占有終了処理を実行する(S616)。
When the request acceptance process ends, the
リソース占有終了処理においてプロセッサコア20からプロセッサ10に対してリソース占有終了通知が行われると、プロセッサ10は、図16に示すようなリソース振り分け処理を実行する(S618)。ここでは、対象コアはプロセッサコア30となる。
When a resource occupation end notification is sent from the
リソース振り分け処理においてプロセッサコア10からプロセッサ30に対して要求受付許可通知が行われると、プロセッサ30は図17に示すようなリソース占有開始処理を実行する(S620)。
When a request acceptance permission notification is sent from the
リソースアクセス待ち処理が終了すると、プロセッサコア30は、第1実施例において図7で説明した要求受付処理を、機能モジュール33、34のそれぞれについて実行する(S622、S624)。
When the resource access waiting process ends, the
要求受付処理が終了すると、ジョブソート部36がジョブソートを実行し(S626)、ジョブ実行部37がジョブを実行する(S628)。
When the request acceptance process is completed, the
そして、プロセッサコア30のスケジューラ32は、図18に示すようなリソース占有終了処理を実行する(S630)。
Then, the scheduler 32 of the
リソース占有終了処理においてプロセッサコア30からプロセッサ10に対してリソース占有終了通知が行われると、プロセッサ10は、図19に示すようなリソースアクセス終了処理を実行する(S640)。
When a resource occupation end notification is sent from the
図15は、プロセッサコア10のスケジューラ12によって実行されるリソースアクセス待ち処理の流れを示すフローチャートである。
FIG. 15 is a flowchart showing the flow of the resource access wait process executed by the
まず、スケジューラ12は、タイミング生成部11によって基準タイミング通知がなされるまで待機する(S700)。
First, the
基準タイミング通知がなされると、リソースアクセスが終了状態であるか否かを判定する(S702)。リソースアクセスが終了状態でなければエラー処理を行い(S704)、S700に戻る。 When the reference timing notification is made, it is determined whether the resource access is in an end state (S702). If the resource access is not finished, error processing is performed (S704), and the process returns to S700.
リソースアクセスが終了状態である場合は、リソースアクセスを開始状態とする(S706)。 If the resource access is in the end state, the resource access is set in the start state (S706).
図16は、プロセッサコア10のスケジューラ12によって実行されるリソースアクセス振り分け処理の流れを示すフローチャートである。
FIG. 16 is a flowchart showing a flow of resource access distribution processing executed by the
リソースアクセス振り分け処理において、スケジューラ12は、スケジュール(本実施例の場合は、プロセッサコア10→プロセッサコア20→プロセッサコア30と規定されている)に従って、対象プロセッサコアに要求受付許可通知を行う(S800)。
In the resource access distribution process, the
図17は、プロセッサコア20、30のスケジューラ22、32によって実行されるリソース占有開始処理の流れを示すフローチャートである。
FIG. 17 is a flowchart showing the flow of resource occupation start processing executed by the
リソース占有開始処理において、プロセッサコア20、30のスケジューラ22、32は、自コアのアクセルタスクを起床する(S900)。
In the resource occupation start process, the
図18は、プロセッサコア20、30のスケジューラ22、32によって実行されるリソース占有終了処理の流れを示すフローチャートである。
FIG. 18 is a flowchart showing the flow of the resource occupation end processing executed by the
リソース占有終了処理において、プロセッサコア20、30のスケジューラ22、32は、プロセッサコア10に対して自コアの占有終了を通知し(S1000)、自コアのアクセスタスクを終了する(S1002)。
In the resource occupation end process, the
図19は、プロセッサコア10のスケジューラ12によって実行されるリソースアクセス終了処理の流れを示すフローチャートである。
FIG. 19 is a flowchart showing the flow of resource access end processing executed by the
リソースアクセス振り分け処理において、スケジューラ12は、リソースアクセスを終了状態とする(S1100)。
In the resource access distribution process, the
このように、プロセッサコア10のタイミング生成部11によって開始信号が出力され、これに応じて各プロセッサコアの要求受付部が順次メッセージ情報の出力を行うように制御される。これによって、ジョブ情報の書き込みに関してプロセッサコア間で干渉が生じるのを回避することができる。
As described above, the start signal is output by the
[まとめ]
以上説明した本実施例のマルチコア・プロセッサ2によれば、不揮発性メモリ50へのアクセスに係る処理をプロセッサコア30に一本化して実行させているため、複数のプロセッサコアが同時に不揮発性メモリ50にアクセスすることによって干渉が生じるのを、確実に回避することができる。
[Summary]
According to the
また、プロセッサコア20のタイミング生成部11によって基準タイミング通知が行われ、これに応じて各プロセッサコアの要求受付部が順次メッセージ情報の出力を行うように制御されるため、ジョブ情報の書き込みに関してプロセッサコア間で干渉が生じるのを回避することができる。
Further, the
以上、本発明を実施するための最良の形態について実施例を用いて説明したが、本発明はこうした実施例に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 The best mode for carrying out the present invention has been described above with reference to the embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the scope of the present invention. And substitutions can be added.
例えば、特定の共有アクセス対象の例として不揮発性メモリ50を挙げたが、これに限らず、ソークタイマIC等、他の機器が特定の共有アクセス対象に該当するものとしてもよい。ソークタイマICとは、車載制御装置において、キーをオフしている時間を計測したり、キーオフ中の所定時刻に車載制御装置の電源をオン状態としたりする機能を有するものである。
For example, the
また、各プロセッサコアが要求受付部に相当する機能を有する構成としたが、プロセッサ間の共通関数として保持されるものとしてもよい。 Further, each processor core has a function corresponding to a request reception unit, but may be held as a common function between processors.
また、特定の共有アクセス対象以外の共有アクセス対象について、各プロセッサコアが独立してアクセス可能としてもよい。図20は、第1実施例及び第2実施例に付加機能として追加され得る部分構成図である。図示するように、外部I/Oポート等、レイテンシの短い機器については、各プロセッサコアがドライバを備え、独立してアクセス可能であってもよい。図21は、各プロセッサコアがI/Oポートにアクセスする際の処理の流れを示すタイミングチャートである。係る変形は、スタンバイRAMについても同様である。図22は、第1実施例及び第2実施例に付加機能として追加され得る部分構成図である。 In addition, each processor core may independently access a shared access target other than a specific shared access target. FIG. 20 is a partial configuration diagram that can be added as an additional function to the first embodiment and the second embodiment. As shown in the figure, for a short latency device such as an external I / O port, each processor core may be provided with a driver and independently accessible. FIG. 21 is a timing chart showing the flow of processing when each processor core accesses an I / O port. This modification is the same for the standby RAM. FIG. 22 is a partial configuration diagram that can be added as an additional function to the first embodiment and the second embodiment.
1、2 マルチコア・プロセッサ
10、20、30 プロセッサコア
11 タイミング生成部
12、22、32 スケジューラ
13、14、23、24、33、34 機能モジュール
15、25、35 要求受付部
40 共有メモリ
50 不揮発性メモリ
1, 2,
Claims (7)
前記複数のプロセッサコアによって読み書き可能なメモリ上に、特定の共有アクセス対象に対するアクセスの内容及び順序を規定するためのメッセージキューが設定され、
前記複数のプロセッサコアは、前記メッセージキューに対する所定の書き込み制御に応じて、前記特定の共有アクセス対象に対するアクセスに関するジョブ情報を排他的に前記メッセージキューに書き込み、
前記複数のプロセッサコアのうち少なくとも一の特定対象アクセス実行用プロセッサコアは、前記メッセージキューに書き込まれたジョブ情報に従って、前記特定の共有アクセス対象に対するアクセスを実行することを特徴とする、
マルチコア・プロセッサ。 A multi-core processor in which a plurality of processor cores can perform processing independently,
A message queue for defining the content and order of access to a specific shared access target is set on the memory that can be read and written by the plurality of processor cores,
The plurality of processor cores exclusively write job information related to access to the specific shared access target in the message queue according to predetermined write control on the message queue,
At least one specific target access execution processor core among the plurality of processor cores executes access to the specific shared access target according to job information written in the message queue.
Multi-core processor.
前記ジョブ情報は、処理の優先度に関する情報を含んでおり、
前記特定対象アクセス実行用プロセッサコアは、前記ジョブ情報に含まれる処理の優先度に関する情報に基づいて、前記処理を代行する順序を変更することを特徴とする、
マルチコア・プロセッサ。 The multi-core processor according to claim 1, comprising:
The job information includes information on processing priority,
The specific target access execution processor core changes the order of performing the processing based on information on processing priority included in the job information.
Multi-core processor.
前記メッセージキューに対する所定の書き込み制御は、所定の順序に従って、前記メッセージキューにジョブ情報の書き込みを終了したプロセッサコアから、次に前記メッセージキューにジョブ情報の書き込むプロセッサコアに、順次書き込み可能通知を行うことによって実現される、
マルチコア・プロセッサ。 A multi-core processor according to claim 1 or 2,
Predetermined write control for the message queue is performed sequentially according to a predetermined order from a processor core that has finished writing job information to the message queue to a processor core that next writes job information to the message queue. Realized by
Multi-core processor.
前記メッセージキューに対する所定の書き込み制御は、前記複数のプロセッサコアのうち少なくとも一の書込制御用プロセッサコアにおいて保持されている所定の順序に従って、該書込制御用プロセッサコアから各プロセッサコアに順次書き込み可能通知を行うことによって実現される、 A multi-core processor according to claim 1 or 2,
The predetermined write control for the message queue is sequentially written from the write control processor core to each processor core according to a predetermined order held in at least one of the plurality of processor cores. Realized by making possible notifications,
前記書き込み可能通知は、ソフトウエア割り込みによって行われる、
マルチコア・プロセッサ。 A multi-core processor according to claim 3 or 4,
The writable notification is performed by a software interrupt.
Multi-core processor.
前記書き込み可能通知は、前記複数のプロセッサコアによってアクセス可能なメモリ上において、次に前記メッセージキューにジョブ情報の書き込むプロセッサコアを指定することによって行われる、
マルチコア・プロセッサ。 A multi-core processor according to claim 3 or 4,
The writable notification is performed by designating a processor core to which job information is to be written next in the message queue on a memory accessible by the plurality of processor cores.
Multi-core processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010107384A JP2011237929A (en) | 2010-05-07 | 2010-05-07 | Multi-core processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010107384A JP2011237929A (en) | 2010-05-07 | 2010-05-07 | Multi-core processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011237929A true JP2011237929A (en) | 2011-11-24 |
Family
ID=45325853
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010107384A Pending JP2011237929A (en) | 2010-05-07 | 2010-05-07 | Multi-core processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011237929A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014002177A1 (en) * | 2012-06-26 | 2014-01-03 | 東芝三菱電機産業システム株式会社 | Data collection system, data collection device, data collection system program, and data collection program |
US9355506B2 (en) | 2014-06-27 | 2016-05-31 | Continental Automotive France | Method for managing fault messages of a motor vehicle |
US9460133B2 (en) | 2012-06-26 | 2016-10-04 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data management apparatus, data management method and data management program |
US9710537B2 (en) | 2012-06-26 | 2017-07-18 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data collection system and data collection system program |
US10055477B2 (en) | 2012-06-26 | 2018-08-21 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data collection apparatus and data collection program |
CN110830386A (en) * | 2019-11-14 | 2020-02-21 | 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) | Method, device and system for preserving order of messages |
KR20220085578A (en) * | 2020-12-15 | 2022-06-22 | 현대오토에버 주식회사 | System and method of linking core in muti-core environment |
-
2010
- 2010-05-07 JP JP2010107384A patent/JP2011237929A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014002177A1 (en) * | 2012-06-26 | 2014-01-03 | 東芝三菱電機産業システム株式会社 | Data collection system, data collection device, data collection system program, and data collection program |
CN103988137A (en) * | 2012-06-26 | 2014-08-13 | 东芝三菱电机产业系统株式会社 | Data collection system, data collection device, data collection system program, and data collection program |
KR101445531B1 (en) | 2012-06-26 | 2014-09-29 | 도시바 미쓰비시덴키 산교시스템 가부시키가이샤 | Data collection system, data collection device, recording medium for data collection system program, and recording medium for data collection program |
JP5684950B2 (en) * | 2012-06-26 | 2015-03-18 | 東芝三菱電機産業システム株式会社 | Data collection system and data collection system program |
JPWO2014002177A1 (en) * | 2012-06-26 | 2016-05-26 | 東芝三菱電機産業システム株式会社 | Data collection system and data collection system program |
US9460133B2 (en) | 2012-06-26 | 2016-10-04 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data management apparatus, data management method and data management program |
US9710537B2 (en) | 2012-06-26 | 2017-07-18 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data collection system and data collection system program |
US10055477B2 (en) | 2012-06-26 | 2018-08-21 | Toshiba Mitsubishi-Electric Industrial Systems Corporation | Data collection apparatus and data collection program |
US9355506B2 (en) | 2014-06-27 | 2016-05-31 | Continental Automotive France | Method for managing fault messages of a motor vehicle |
CN110830386A (en) * | 2019-11-14 | 2020-02-21 | 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) | Method, device and system for preserving order of messages |
KR20220085578A (en) * | 2020-12-15 | 2022-06-22 | 현대오토에버 주식회사 | System and method of linking core in muti-core environment |
KR102497255B1 (en) | 2020-12-15 | 2023-02-06 | 현대오토에버 주식회사 | System and method of linking core in muti-core environment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2011237929A (en) | Multi-core processor | |
US7412590B2 (en) | Information processing apparatus and context switching method | |
US7716391B2 (en) | Data transfer apparatus, data transfer method, and program | |
JP5498505B2 (en) | Resolving contention between data bursts | |
JP5316718B1 (en) | Multi-core processor | |
US8095742B2 (en) | Microcomputer with address translation circuit | |
KR100902977B1 (en) | Hardware sharing system and method | |
JP4457047B2 (en) | Multiprocessor system | |
CN103329102A (en) | Multiprocessor system | |
US10545890B2 (en) | Information processing device, information processing method, and program | |
JP2007219816A (en) | Multiprocessor system | |
EP2839374A1 (en) | Information processing device, information processing method, and storage medium storing program for executing information processing method | |
KR101673247B1 (en) | Processor with assignable general purpose register set | |
US20120166682A1 (en) | Memory mapping apparatus and multiprocessor system on chip platform including the same | |
JP2008532167A (en) | Data processing system having interrupt controller and interrupt control method | |
JP2001005676A (en) | Interruption processor | |
WO2013148439A1 (en) | Hardware managed allocation and deallocation evaluation circuit | |
JP5289688B2 (en) | Processor system and operating system program processing method for operating processor system | |
US10528388B1 (en) | Data flow control in a parallel processing system | |
US9946665B2 (en) | Fetch less instruction processing (FLIP) computer architecture for central processing units (CPU) | |
US10740150B2 (en) | Programmable state machine controller in a parallel processing system | |
JP4017005B2 (en) | Arithmetic unit | |
US20080222336A1 (en) | Data processing system | |
US7076641B2 (en) | Programmable controller | |
JPH06230985A (en) | Task control circuit and microprocessor |