JP2006039821A - Method for controlling multiprocessor-equipped system lsi - Google Patents

Method for controlling multiprocessor-equipped system lsi Download PDF

Info

Publication number
JP2006039821A
JP2006039821A JP2004217169A JP2004217169A JP2006039821A JP 2006039821 A JP2006039821 A JP 2006039821A JP 2004217169 A JP2004217169 A JP 2004217169A JP 2004217169 A JP2004217169 A JP 2004217169A JP 2006039821 A JP2006039821 A JP 2006039821A
Authority
JP
Japan
Prior art keywords
processor
processors
task
memory
shared memory
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.)
Withdrawn
Application number
JP2004217169A
Other languages
Japanese (ja)
Inventor
Mamoru Tanaka
守 田中
Kazuki Murakami
和希 村上
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004217169A priority Critical patent/JP2006039821A/en
Publication of JP2006039821A publication Critical patent/JP2006039821A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To generalize and perform the optimization and high speed operation of the multi-task control of a multiprocessor. <P>SOLUTION: This system LSI is constituted of a processor group having a data cache inside the system LSI and a high-capacity external shared memory as hard configuration. The combined candidates of tasks are generated, and the same task is redundantly and speculatively executed by a plurality processors. Inter-processor communication is used as penalty, and the result of the combination of the processor and the task for preventing penalty most is adopted so that it is possible to realize the consistency of the whole system between the data cache and the shared memory while using the most efficient processing procedure. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、複数のCPUすなわちマルチプロセッサを用い、かつ専用ハードウェア回路と共に1つのLSIに組み込んで構成される、いわゆるシステムLSIあるいはシステムオンチップ(SOC)と呼ばれるLSIの構成方法と、このLSI上で異なるプログラムを同時に独立に実行し、プログラム間で通信を行い制御するいわゆるマルチタスクを実行する方法に関する。   The present invention relates to an LSI configuration method called a system LSI or system-on-chip (SOC), which includes a plurality of CPUs, that is, multiprocessors, and is incorporated in one LSI together with a dedicated hardware circuit. It is related with the method of performing what is called multitasking which performs different programs simultaneously and independently and communicates and controls between programs.

近年、半導体製造プロセスの進歩と集積度の向上に伴い、専用ハードウェア回路と共にCPUを1つのLSIに組み込む事で構成される、いわゆるシステムLSIあるいはシステムオンチップ(SOC)と呼ばれるLSIがさかんに利用されるようになってきている。さらに、半導体の集積度の向上により、相対的に複数のCPUの搭載がLSIにおけるCPUの占有面積の点からは容易になってきており、性能を向上させるために数個のCPUを搭載するマルチプロセッサによるSOCが、次第に利用されるようになってきている。今後、さらなる半導体の集積度の向上により、LSIの価格への影響度は、外部に接続するピンの数による制約がより大きくなり、数十から数百といった非常に多数のCPUの搭載が、LSIの面積的な観点からは極めて安価にSOC上で可能になる時代が到来する事が予想される。   In recent years, with the advancement of semiconductor manufacturing processes and integration, LSIs called so-called system LSIs or system-on-chip (SOC), which are configured by incorporating a CPU with a dedicated hardware circuit into a single LSI, are used extensively. It has come to be. Furthermore, with the increase in the degree of integration of semiconductors, it is relatively easy to mount a plurality of CPUs in terms of the area occupied by a CPU in an LSI, and a multi-CPU including a plurality of CPUs is mounted to improve performance. The SOC by the processor is gradually being used. In the future, due to further improvements in the degree of integration of semiconductors, the impact on the price of LSI will be more limited by the number of pins connected to the outside, and mounting of a very large number of CPUs, such as tens to hundreds, From the viewpoint of area, it is expected that an era will be possible on the SOC at a very low cost.

また一方で、デジタル機器で利用されるソフトウェアは相対的に複雑になってきており、プログラムを同時に独立に実行し、プログラム間で通信を行い制御するいわゆるマルチタスクで利用できるオペレーティングシステム(OS)を利用することが多くなってきている。   On the other hand, software used in digital devices has become relatively complex, and an operating system (OS) that can be used in so-called multitasking that executes programs simultaneously and independently and communicates and controls between programs is provided. Use is increasing.

さらに一方で、半導体の物理的性質の限界や消費電力や発熱の観点から、動作周波数をこれ以上、従来のペースで上げ続けるのは困難と見られており、その点からも、SOCに限らず、従来から処理の高速化のためにマルチプロセサによるアプリケーションソフトやマルチプロセッサ用マルチタスクのOS開発と利用が行われており、大規模な並列数値計算に数千のプロセッサを用いたもの、あるいは2個から4個のプロセッサを用いたマルチプロセッサ用マルチタスクのOSなどが利用されている。
特開平9−185593号公報
On the other hand, it is considered difficult to continue to increase the operating frequency at a conventional pace from the viewpoint of the physical properties of semiconductors, power consumption, and heat generation. In the past, application software by multiprocessors and multitasking OS for multiprocessors have been developed and used for high-speed processing. Thousands of processors are used for large-scale parallel numerical calculations, or two. A multitasking multitasking OS using four processors is used.
JP-A-9-185593

しかしながら、従来の方法には以下の課題があった。   However, the conventional method has the following problems.

1)多数個のマルチプロセセッサによるアプリケーションソフトは特定の並列演算が実行可能な例、例えば画像処理や場の方程式を解く数値計算、等に有効であるが、容易に並列分割できない制御系の処理ではアルゴリズムの自動的な並列化が困難であり、例えばマルチタスクのアプリケーションにおける個々のタスクの依存関係は特定のアプリケーション毎に異なる。このような制御系の処理における並列アルゴリズムの生成に関しては、一般解がなく、自動化が難しい。   1) Application software with a large number of multiprocessors is effective in cases where specific parallel operations can be performed, for example, image processing, numerical calculations for solving field equations, etc., but control system processing that cannot be easily divided in parallel However, it is difficult to automatically parallelize algorithms. For example, the dependency of individual tasks in a multitasking application is different for each specific application. There is no general solution for generating parallel algorithms in such control system processing, and automation is difficult.

2)一つの領域のメモリをマルチプロセッサで同時にアクセスする共有メモリを利用する場合、プロセッサ数が多くなると共有メモリへのバスのトラフィックが増大し、アクセス速度が低下する。そのため、キャッシュ機構などのプロセサごとにアクセス可能なローカルな高速メモリへのコピーを用いて高速化を図る必要があるが、この場合は更に各プロセッサごとのキャッシュと共有メモリとの整合性をとることが難しくなる。各プロセッサに近接して分散メモリだけを配置する方法も考えられるが、この場合は、分散メモリ間でのデータの受け渡しが困難であり、一般の制御アルゴリズムにおいて分散メモリの内容の整合性を取ることが困難である。   2) When using a shared memory that simultaneously accesses memory in one area by a multiprocessor, the bus traffic to the shared memory increases and the access speed decreases as the number of processors increases. For this reason, it is necessary to increase the speed by using a copy to a local high-speed memory that can be accessed for each processor such as a cache mechanism. In this case, the consistency between the cache and the shared memory for each processor must be taken. Becomes difficult. Although it is possible to arrange only the distributed memory close to each processor, in this case, it is difficult to exchange data between the distributed memories, and the consistency of the contents of the distributed memory should be ensured in a general control algorithm. Is difficult.

3)複数のプロセッサに複数のタスクを割当てた場合のシステム全体のデータ処理の効率を向上させる為の適切な方法の選択が難しい。   3) It is difficult to select an appropriate method for improving the data processing efficiency of the entire system when a plurality of tasks are assigned to a plurality of processors.

例として、タスクTa、Tb、TcをプロセッサPx、Pyで動作させる場合に、ある一つのタスクTaに関して、一つのプロセッサに割当てて、Px:(Ta)、Py:(Tb、Tc)とする方法があり、また複数のタスクTa、Tbを一つのプロセッサに割当てて、Px:(Ta、Tb)、Py:(Tc)とする方法がある。ここで、タスクTaに関して、前者の方法はプロセッサ内でタスクの遷移が無くプロセッサ内のレジスタデータの入れ替え(コンテキストスイッチ)が不要であるという観点においては、タスクTaは明らかに高速に動作する。ところが一方で、タスクTaとTbの間で互いにメッセージを通信して動作が行なわれる場合、異なるプロセッサ間で同期をとって通信しなければならず、そのためのオーバーヘッドが大きい場合に前者の方法は速度が低下する要因となる。このプロセッサ間の同期のオーバーヘッドは、マルチプロセッサやメモリなどのハードウェアのシステム構成や、マルチタスクのソフトウェアプログラムの制御構成に依存して変化するので、結果として、複雑なタスク数とプロセッサ数の構成になった場合に、前者と後者のどちらの方法がより効率的にデータを処理できるかは、ケースバイケースであると言える。このように、マルチプロセッサへのタスク割当ての方法の選択が困難である。   As an example, when tasks Ta, Tb, and Tc are operated by processors Px and Py, a certain task Ta is assigned to one processor and Px: (Ta), Py: (Tb, Tc) In addition, there is a method in which a plurality of tasks Ta and Tb are assigned to one processor and Px: (Ta, Tb) and Py: (Tc) are set. Here, with respect to the task Ta, the task Ta clearly operates at a high speed from the viewpoint that the former method has no task transition in the processor and does not require register data exchange (context switch) in the processor. On the other hand, when operations are performed by communicating messages between tasks Ta and Tb, communication must be performed between different processors, and when the overhead for that is large, the former method is speedy. Is a factor that decreases. The synchronization overhead between processors varies depending on the hardware system configuration such as multiprocessor and memory, and the control configuration of the multitasking software program. As a result, the configuration of complex tasks and processors In this case, it can be said that it is a case-by-case whether the former method or the latter method can process data more efficiently. As described above, it is difficult to select a method for assigning tasks to multiprocessors.

こうした上記の課題を解決して、安価に膨大なプロセッサを利用できる環境で、共有メモリへのデータ転送速度がボトルネックとならずに、多数の分散メモリのデータの整合性をとりながら、マルチタスクのソフトウェアを高速に実行するアーキテクチャとアルゴリズムが望まれていた。   In such an environment that can solve the above problems and can use a huge number of processors at low cost, the data transfer speed to the shared memory does not become a bottleneck, and the consistency of the data in a large number of distributed memories is achieved. The architecture and algorithm to execute this software at high speed were desired.

本発明は、上述の課題を解決するために、以下の構成であることを特徴とする。   In order to solve the above-mentioned problems, the present invention has the following configuration.

マルチプロセッサと、各プロセッサP1、P2、P3・・・・に対応して直接接続された高速分散メモリと、全てのプロセッサからアクセスできるように共有接続されたバスと、上記バスに接続され、分割領域毎にアドレスオフセットを設けて参照可能な高速内部共有メモリと、バスを通して外部に共有メモリが接続可能なメモリコントローラと、バス上からデータを複製して共有メモリから各分散メモリへ同一データを同時に転送可能なDMAコントローラと、を少なくとも内部に有したシステムLSIの構成とし、マルチタスクの実行において、タスクT1、T2、T3・・・・の各プロセッサへの振り分け方法の候補を振り分け方法テーブルD1、D2、D3・・・・として複数種類用意する手段と、上記振り分け方法テーブルごとに排他的にプロセッサと高速分散メモリと高速内部共有メモリの分割領域とを割当てる手段と、上記テーブルを用いてプロセッサをタスクに割当てる事で同一タスクを複数のプロセッサ上で重複して実行させる手段と、各振り分け方法ごとのタスク間の遷移の進行状況を検知する手段と、前記検知手段に基づいて最も処理が進んだ振り分け方法の処理に用いたプロセッサの分散メモリの内容を前記共有メモリに書き戻す手段と、を持つことを特徴とするマルチプロセッサ搭載システムLSIのマルチタスク制御方法。   A multiprocessor, a high-speed distributed memory directly connected to each of the processors P1, P2, P3,..., A bus connected in a shared manner so as to be accessible from all processors, and a bus connected to the above-mentioned bus A high-speed internal shared memory that can be referenced by providing an address offset for each area, a memory controller that can be connected to the shared memory externally through the bus, and the same data from the shared memory to each distributed memory simultaneously by copying data from the bus A system LSI having at least an internal DMA controller capable of transfer, and in the execution of multitasking, candidates for allocation methods to each processor of tasks T1, T2, T3,. Each of the means for preparing a plurality of types as D2, D3,. A means for allocating a processor, a high-speed distributed memory, and a divided area of a high-speed internal shared memory; and a means for performing the same task on a plurality of processors by assigning a processor to a task using the table. Means for detecting the progress of transition between tasks for each distribution method, and means for writing back the contents of the distributed memory of the processor used for the processing of the distribution method most advanced based on the detection means to the shared memory And a multitask control method for a multiprocessor-mounted system LSI.

以上説明したように、本発明によれば、マルチプロセッサにマルチタスクを割当てる際に、複数の振り分け方法の候補を上げて、それをプロセッサに適用し、最も効率の良いタスク割当ての結果を残す事で、以下の効果が得られる。   As described above, according to the present invention, when assigning a multitask to a multiprocessor, a plurality of distribution method candidates are raised and applied to the processor, and the most efficient task assignment result is left. Thus, the following effects can be obtained.

1)予測困難なマルチプロセッサへのマルチタスクの割当てスケジューリングが最適化される。   1) Multitask allocation scheduling to multiprocessors that are difficult to predict is optimized.

2)履歴(ログ)をとって以降の最適割当てを予測するのではないので、再現性が乏しく統計的予測が困難な状態遷移に関しても、その瞬間の動的な最適割当てがなされる。   2) Since the subsequent optimal allocation is not predicted by taking a history (log), dynamic optimal allocation at that moment is performed even for state transitions that have poor reproducibility and are difficult to predict statistically.

3)プロセッサの個数が増えてもタスクの個数が増えても同一アルゴリズムでスケーラブルに拡張できる。   3) Even if the number of processors increases or the number of tasks increases, it can be scalable with the same algorithm.

特にプロセッサ数が膨大でもパッケージのピン数が少なくて済むようなシステムLSIを利用する場合に有効であり、たとえばタスク数よりもプロセッサの数が十分多いという程プロセッサを多数配置したとしても、プロセッサ数のみではコストに大きく影響しない、という程の高い集積度の構成を利用していく場合や、小さなプロセッサコアを利用する場合には有効である。   This is particularly effective when using a system LSI that requires a small number of package pins even if the number of processors is enormous. For example, even if a large number of processors are arranged so that the number of processors is sufficiently larger than the number of tasks, the number of processors It is effective when using a configuration with a high degree of integration that does not significantly affect the cost, or when using a small processor core.

<実施形態1>
以下、本発明の好適な実施例の一例を挙げてその原理を説明する。以下は、本発明の原理に基づく実施形態を例示しまた理解を助ける為に説明を行ったものであり、本発明の適用範囲が必ずしもこの実施例の詳細によって限定されるものではない。
<Embodiment 1>
Hereinafter, the principle of the present invention will be described with reference to an example of a preferred embodiment of the present invention. In the following, embodiments based on the principle of the present invention are illustrated and described for the purpose of facilitating understanding, and the scope of the present invention is not necessarily limited by the details of the embodiments.

図1は本発明の基本概念を示す図である。   FIG. 1 is a diagram showing the basic concept of the present invention.

図1(a)はシステムLSIのハードウェア構成で、図1(b)はマルチプロセッサ上でどのようにマルチタスクを割当てるかをしめした制御方法を示している。   FIG. 1A shows a hardware configuration of a system LSI, and FIG. 1B shows a control method showing how multitasks are allocated on the multiprocessor.

図1(a)に示す通り、システムLSI内で、バス100上に高速な分散メモリM1、M2、M3・・・・とプロセッサP1、P2、P3・・・・がそれぞれ対応して接続されている。また、バス100にメモリコントローラ(図示せず)を介して外部に共有メモリ200が接続されている。500は各プロセッサPnからの信号を受け取り制御する調停プロセッサ500である。400は共有メモリと高速な分散メモリとの間でデータ転送を行うことができるDMAコントローラ400である。   As shown in FIG. 1A, high-speed distributed memories M1, M2, M3,... And processors P1, P2, P3,. Yes. A shared memory 200 is connected to the bus 100 via a memory controller (not shown). An arbitration processor 500 receives and controls a signal from each processor Pn. A DMA controller 400 is capable of transferring data between the shared memory and the high-speed distributed memory.

600は高速共有メモリ600である。   Reference numeral 600 denotes a high-speed shared memory 600.

300はシステムLSIで構成される部分を示す。一方、プロセッサ上で実行されるソフトウェアプログラムであるタスクはT1、T2、T3・・・・が用意されている。図1(b)にその一部を抜粋して示す。   Reference numeral 300 denotes a part constituted by a system LSI. On the other hand, T1, T2, T3,... Are prepared as tasks that are software programs executed on the processor. FIG. 1 (b) shows a part of it.

ここでは、プロセッサが、10個以上であり、タスクがT1,T2,T3の3個である場合の例について説明する。まず、タスクの振り分けは以下の可能性が考えられる。これを振り分け方法テーブルD1からD5までとして以下に示す。ここで、(タスク・・・)がプロセッサ1個当たりに割当てられるタスクを示す。例えば(T1、T2)は一つのプロセッサにT1,T2のタスクを割当てることを示す。また、{(タスク・・・)・・・}は上記割当てによる全てのタスクのプロセッサへの割当ての振り分け方法を示す。   Here, an example in which there are 10 or more processors and three tasks T1, T2, and T3 will be described. First, there are the following possibilities for task distribution. This is shown below as distribution method tables D1 to D5. Here, (task...) Indicates a task assigned to one processor. For example, (T1, T2) indicates that tasks T1 and T2 are assigned to one processor. {(Task...)...} Indicates a method of assigning all tasks to the processors by the above assignment.

例えば、D2={(T1、T2)、(T3)}は1個のプロセッサにT1,T2のタスクを割当て、もう一つのプロセッサにT3のタスクを割当てることで全てのタスクを実行するという振り分け方法D2を示している。   For example, D2 = {(T1, T2), (T3)} is a distribution method in which tasks T1 and T2 are assigned to one processor, and all tasks are executed by assigning a task T3 to another processor. D2 is shown.

D1={(T1)、(T2)、(T3)}
D2={(T1、T2)、(T3)}
D3={(T2、T3)、(T1)}
D4={(T3、T1)、(T2)}
D5={(T1、T2、T3)}
この例の場合には、例えば以下の通りプロセッサPnにタスクTnを割当てる。
D1 = {(T1), (T2), (T3)}
D2 = {(T1, T2), (T3)}
D3 = {(T2, T3), (T1)}
D4 = {(T3, T1), (T2)}
D5 = {(T1, T2, T3)}
In this example, for example, a task Tn is assigned to the processor Pn as follows.

P1:(T1)
P2:(T2)
P3:(T3)
P4:(T1、T2)
P5:(T2、T3)
P6:(T3、T1)
P7:(T1、T2、T3)
P8:(T3)
P9:(T1)
P10:(T2)
上記の通り、同じ一つのタスクが複数のプロセッサに割当てられている。
P1: (T1)
P2: (T2)
P3: (T3)
P4: (T1, T2)
P5: (T2, T3)
P6: (T3, T1)
P7: (T1, T2, T3)
P8: (T3)
P9: (T1)
P10: (T2)
As described above, the same task is assigned to a plurality of processors.

従って、振り分け方法テーブルDnに対しては、プロセッサは以下のように割当てられていることになる。   Accordingly, the processors are assigned to the distribution method table Dn as follows.

D1={P1、P2、P3}
D2={P4、P8}
D3={P5、P9}
D4={P6、P10}
D5={P7}
ここで、上記の通り、異なる振り分け方法テーブルDnに同じプロセッサPnが割当てられることは無く排他的に割当てられ、従って、振り分け方法テーブル毎にプロセッサは独立している。
D1 = {P1, P2, P3}
D2 = {P4, P8}
D3 = {P5, P9}
D4 = {P6, P10}
D5 = {P7}
Here, as described above, the same processor Pn is not allocated to different distribution method tables Dn, but is exclusively allocated. Therefore, the processors are independent for each distribution method table.

ここで、プロセッサP1からP10までには各々対応する高速な分散メモリM1・・・・M10が直接接続されている。各々の分散メモリと共有メモリは同一の物理アドレス空間の異なる位置にマッピングされているが、各プロセッサに対応する分散メモリは同一アドレス空間として見えるようになっており、例えばP1からM1のアドレス範囲とP2からM2のアドレス範囲は同じようにできる。すなわち、各CPUから対応する分散メモリへのアクセスする場合には、プロセッサからは全て同一アドレス空間として見ることができるようなアドレスオフセットの設定機構を備えている。この機構を利用して、高速分散メモリM1・・・・M10には共有メモリのページデータのコピーを格納し、各プロセッサからは、ユーザの手動による管理のもとで、共有メモリのキャッシュ領域として扱うことができる。   Here, high-speed distributed memories M1... M10 corresponding to the processors P1 to P10 are directly connected to each other. Each distributed memory and shared memory are mapped to different positions in the same physical address space, but the distributed memory corresponding to each processor is seen as the same address space. For example, the address range from P1 to M1 The address range from P2 to M2 can be the same. That is, when accessing the corresponding distributed memory from each CPU, an address offset setting mechanism is provided so that all the processors can see it as the same address space. Using this mechanism, a copy of the page data of the shared memory is stored in the high-speed distributed memory M1... M10, and from each processor as a cache area of the shared memory under the manual management of the user. Can be handled.

まず処理開始シーケンスとして、各高速分散メモリに対して、割当てられたタスクで利用するデータブロック(割当てられたタスク内で利用するスタック領域、割当てられたタスク間のメッセージなど)をDMAコントローラを用いて共有メモリからロードする。   First, as a processing start sequence, for each high-speed distributed memory, the data block used by the assigned task (stack area used within the assigned task, messages between assigned tasks, etc.) is transferred using the DMA controller. Load from shared memory.

また、共有メモリ上でタスク間で共有して処理するデータ領域(画像データ領域など)の部分ブロックを共有高速メモリ600へロードする。   In addition, a partial block of a data area (such as an image data area) to be shared and processed between tasks on the shared memory is loaded into the shared high-speed memory 600.

この際に、共有高速メモリ600は、上記振り分け方法テーブルの数に分割し、分割した高速共有メモリの各区画に、振り分けテーブルごとのプロセッサが割当てられる。上述の例の場合、振り分けテーブルD1からD5までに、5つに分割した高速共有メモリの各区画を割当てる。各区画は、それぞれ異なるアドレスオフセットを持っており、同一の振り分けテーブル内に割当てられたプロセッサ間では共有に利用され、振り分けテーブルが異なるプロセッサ間では排他的に独立した領域として利用される。この方法として、各プロセッサIDからのアクセスに対応して共有高速メモリ600にはアドレスオフセットテーブルが用意されている。   At this time, the shared high-speed memory 600 is divided into the number of the distribution method tables, and a processor for each distribution table is allocated to each partition of the divided high-speed shared memory. In the case of the above example, each partition of the high-speed shared memory divided into five is assigned to the distribution tables D1 to D5. Each partition has a different address offset, and is shared between processors allocated in the same distribution table, and the distribution table is used as an independent area exclusively between different processors. As this method, an address offset table is prepared in the shared high-speed memory 600 corresponding to the access from each processor ID.

プロセッサのうち二つ以上のタスクが割当てられたプロセッサは、図示しないタイマ割り込みによりカーネルがスイッチを行い割当てられたタスク間の遷移を繰り返す。   Of the processors, a processor to which two or more tasks are assigned repeats a transition between assigned tasks by the kernel being switched by a timer interrupt (not shown).

この状態が続く中で、各プロセッサは適切なタスクの巡回停止条件を満たしたときに調停プロセッサに通知して動作を停止(アイドル状態)とする。ここで適切なタスクの巡回停止条件とは、たとえば現在のプロセッサで動作しているタスク以外からのメッセージを要求するような場合である。   While this state continues, each processor notifies the arbitration processor when an appropriate task cyclic stop condition is satisfied, and stops the operation (idle state). Here, an appropriate task cyclic stop condition is, for example, a case where a message from a task other than the task operating in the current processor is requested.

このときの動作を、上記のプロセッサP4にタスクT1、T2が割当てられている場合の例を挙げて説明する。プロセッサP4のOSは自分に割当てられたタスクがT1とT2である事を実行開始時に知っているので、タスクT1が要求したメッセージがタスクT3から獲得するものと判定した時点で、P4はOSを通じて調停プロセッサへ停止状態を通知し、自身はアイドル状態に移行する。   The operation at this time will be described using an example in which tasks T1 and T2 are assigned to the processor P4. Since the OS of the processor P4 knows that the tasks assigned to it are T1 and T2 at the start of execution, when it is determined that the message requested by the task T1 is obtained from the task T3, P4 passes through the OS. The arbitration processor is notified of the stop state, and shifts to the idle state.

このようにして、各プロセッサは自身の内部で動作しているタスク以外の外のタスクからの情報が必要になった場合などに調停プロセッサに知らせて停止する。このようにして次々とプロセッサが停止していく。   In this way, each processor informs the arbitration processor and stops when information from a task other than the task operating inside itself becomes necessary. In this way, the processor stops one after another.

ここで、前項の発明が解決しようとする課題で述べた通り、停止するまでの各タスクのデータ処理量は、プロセッサ1つにタスク1つを割当てた場合にタスク遷移が起こらず最もデータ処理効率が高いとは限らないことに注意する。何故ならば、本構成の場合、高速分散メモリ内にタスク間のメッセージを保持しており、もし一つのプロセッサ内で動作しているタスク間で高速分散メモリ内のメッセージを交換できれば、異なるプロセッサ間で動作するタスク間でのメッセージ通信より処理が高効率になる可能性があるからである。   Here, as described in the problem to be solved by the invention of the previous section, the data processing amount of each task until the stop is the highest in data processing efficiency without task transition when one task is assigned to one processor. Note that is not necessarily expensive. This is because, in this configuration, messages between tasks are held in the high-speed distributed memory, and if the messages in the high-speed distributed memory can be exchanged between tasks operating in one processor, different processors This is because the processing may be more efficient than the message communication between tasks operating in the.

例えば、プロセッサPnとタスクTnにおいて、以下のように割当てられているとする。   For example, it is assumed that the processor Pn and the task Tn are assigned as follows.

P1:(T1)
P2:(T2)
P4:(T1、T2)
このとき、P1、P2はタスクの遷移が無いことに関しては高速だが、プロセッサに直結する分散メモリが異なるため、このタスク間でメッセージ通信が起こった場合、異なるプロセッサと分散メモリ間でのデータの同期をとらなければならず、処理時間がかかる。更に、プロセッサの個数が膨大でありタスク間の通信のしくみが複雑である場合、各分散メモリ間で同期をとることは複雑となる。一方、P4ではタスクが複数でありタスクの遷移が起こるが、このプロセッサ内のタスク間の通信に関しては、同一分散メモリ内でデータの整合性がとれているため、データ同期に要する処理時間は必要ない。従って、どの組み合わせがより効率的かは、実行中の動作にもよりケースバイケースであるといえる。
P1: (T1)
P2: (T2)
P4: (T1, T2)
At this time, although P1 and P2 are high-speed when there is no task transition, since the distributed memory directly connected to the processor is different, when message communication occurs between the tasks, data synchronization between the different processors and the distributed memory Must be taken and processing time is required. Furthermore, when the number of processors is enormous and the communication mechanism between tasks is complicated, it is complicated to synchronize the distributed memories. On the other hand, in P4, there are a plurality of tasks and task transitions occur. However, regarding communication between tasks in this processor, data consistency is ensured in the same distributed memory, so processing time required for data synchronization is necessary. Absent. Therefore, it can be said that which combination is more efficient is more case-by-case than the operation being executed.

ここで、調停プロセッサでは上記の振り分け方法テーブルDnのうち、プロセッサの止まる毎に止まったプロセッサを含むテーブルを無効にしていく。こうして、最後まで生き残ったテーブルのプロセッサの上で動作するタスク群と分散メモリ内容を有効とする。すなわち、この時点では有効として生き残った分散メモリ内のタスク制御に関するデータが有効となる。その後、プロセッサが止まった時点で分散メモリの有効な内容を共有メモリに書き戻す。停止した時点で複数のテーブルが有効な場合は、任意の方法、望ましくはプロセッサの数の少ない振り分けテーブルを選択すれば良い。   Here, the arbitration processor invalidates the table including the stopped processor every time the processor stops in the distribution method table Dn. Thus, the task group operating on the processor of the table that survives to the end and the contents of the distributed memory are validated. That is, at this time, the data related to task control in the distributed memory that has survived becomes valid. Thereafter, when the processor stops, the effective contents of the distributed memory are written back to the shared memory. When a plurality of tables are valid at the time of stopping, an arbitrary method, preferably a sorting table with a small number of processors may be selected.

すなわち、割当てられたタスクで利用するデータブロック(割当てられたタスク内で利用するスタック領域、割当てられたタスク間のメッセージなど)を書き戻す。   That is, the data block used in the assigned task (stack area used in the assigned task, message between assigned tasks, etc.) is written back.

なおここで、動作中に、タスクが自身で有効な振り分けテーブルを指定して調停プロセッサにより全てのプロセッサを停止し、分散メモリデータおよび高速内部共有メモリを書き戻す事ができるような命令、調停プロセッサフラッシュ命令、を持つようにする。   It should be noted that, during the operation, an instruction or arbitration processor that allows the task to specify a valid allocation table by itself and stop all processors by the arbitration processor and write back the distributed memory data and the high-speed internal shared memory. To have a flash instruction ,.

この後、再び処理開始シーケンスに戻り、同様の処理を繰り返せばよい。より大きい共有メモリ上データ領域(画像データ領域など)のデータを処理する場合は、いずれかのタスクが高速内部共有メモリの分割領域サイズのデータの処理を終えた時点で、全プロセッサの動作を停止し、そのタスクを含む振り分け方法のプロセッサを有効として、分散メモリの有効な内容と高速内部共有メモリの有効な内容とを共有メモリに書き戻す。   After this, the process returns to the process start sequence again and the same process may be repeated. When processing data in a larger shared memory data area (image data area, etc.), stop any processor operation when one of the tasks finishes processing the data of the high-speed internal shared memory divided area size. Then, the processor of the distribution method including the task is enabled, and the effective contents of the distributed memory and the effective contents of the high-speed internal shared memory are written back to the shared memory.

この動作のために上述した調停プロセッサフラッシュ命令を用いる。   The arbitration processor flush instruction described above is used for this operation.

この後、共有メモリ上で書き戻したデータに続く位置のデータを、再度、部分ブロックのサイズだけDMAコントローラを用いて高速内部共有メモリへロードする。以上を繰り返すことで、大きい分散メモリ上のデータを処理する。   Thereafter, the data at the position following the data written back on the shared memory is again loaded into the high-speed internal shared memory by the DMA controller by the size of the partial block. By repeating the above, data on a large distributed memory is processed.

また、本発明の構成例においては、入出力データは共有メモリの一部を、入出力データのリングバッファとして用い、リングバッファとI/Oコントローラの制御は調停プロセッサで行ない、データの整合性を保つ。   In the configuration example of the present invention, the input / output data uses a part of the shared memory as a ring buffer for the input / output data, and the ring buffer and the I / O controller are controlled by the arbitration processor to ensure data consistency. keep.

なお、上記の実施例では、タスク3つの場合に、全てのマルチプロセッサの組み合わせの振り分け方法テーブルを生成したが、プロセッサの数とタスクの数の組み合わせにより、適切なテーブル数に制限しても良い。   In the above-described embodiment, the distribution method table for all multiprocessor combinations is generated in the case of three tasks. However, the number of tables may be limited to an appropriate number by combining the number of processors and the number of tasks. .

ハードウェア構成とマルチタスクの制御方法Hardware configuration and multitask control method

符号の説明Explanation of symbols

100 バス
200 共有メモリ
400 DMAコントローラ
500 調停プロセッサ
600 高速共有メモリ
100 bus 200 shared memory 400 DMA controller 500 arbitration processor 600 high-speed shared memory

Claims (1)

マルチプロセッサと、各プロセッサP1、P2、P3・・・・に対応して直接接続された高速分散メモリと、全てのプロセッサからアクセスできるように共有接続されたバスと、
上記バスに接続され、分割領域毎にアドレスオフセットを設けて参照可能な高速内部共有メモリと、バスを通して外部に共有メモリが接続可能なメモリコントローラと、バス上からデータを複製して共有メモリから各分散メモリへ同一データを同時に転送可能なDMAコントローラと、を少なくとも内部に有したシステムLSIの構成とし、
マルチタスクの実行において、タスクT1、T2、T3・・・・の各プロセッサへの振り分け方法の候補を振り分け方法テーブルD1、D2、D3・・・・として複数種類用意する手段と、
上記振り分け方法テーブルごとに排他的にプロセッサと高速分散メモリと高速内部共有メモリの分割領域とを割当てる手段と、
上記テーブルを用いてプロセッサをタスクに割当てる事で同一タスクを複数のプロセッサ上で重複して投機的に実行させる手段と、
各振り分け方法ごとのタスク間の遷移の進行状況を検知する手段と、
前記検知手段に基づいて最も処理が進んだ振り分け方法の処理に用いたプロセッサの分散メモリの内容を前記共有メモリに書き戻す手段と、を持つことを特徴とするマルチプロセッサ搭載システムLSIのマルチタスク制御方法。
A multiprocessor, a high-speed distributed memory directly connected to each of the processors P1, P2, P3,..., A bus connected in a shared manner so as to be accessible from all processors,
A high-speed internal shared memory that is connected to the bus and can be referred to by providing an address offset for each divided area, a memory controller that can connect the shared memory to the outside through the bus, A system LSI having at least an internal DMA controller capable of simultaneously transferring the same data to the distributed memory,
In the execution of multitasking, means for preparing a plurality of types of allocation method candidates to the respective processors T1, T2, T3,... As allocation method tables D1, D2, D3,.
Means for exclusively assigning a processor, a high-speed distributed memory, and a high-speed internal shared memory divided area for each distribution method table;
Means for assigning a processor to a task using the above table and executing the same task on a plurality of processors in a speculative manner;
Means for detecting the progress of transition between tasks for each distribution method;
Multitask control of a multiprocessor-mounted system LSI, characterized by having means for writing back the contents of the distributed memory of the processor used for the processing of the distribution method that has been most advanced based on the detection means to the shared memory Method.
JP2004217169A 2004-07-26 2004-07-26 Method for controlling multiprocessor-equipped system lsi Withdrawn JP2006039821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004217169A JP2006039821A (en) 2004-07-26 2004-07-26 Method for controlling multiprocessor-equipped system lsi

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004217169A JP2006039821A (en) 2004-07-26 2004-07-26 Method for controlling multiprocessor-equipped system lsi

Publications (1)

Publication Number Publication Date
JP2006039821A true JP2006039821A (en) 2006-02-09

Family

ID=35904772

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004217169A Withdrawn JP2006039821A (en) 2004-07-26 2004-07-26 Method for controlling multiprocessor-equipped system lsi

Country Status (1)

Country Link
JP (1) JP2006039821A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007241556A (en) * 2006-03-07 2007-09-20 Mitsubishi Electric Corp Sequence processing execution equipment by two or more arithmetic units
JP2007241434A (en) * 2006-03-06 2007-09-20 Mitsubishi Electric Corp Sequence processing execution device
KR20200045927A (en) * 2018-10-23 2020-05-06 울산과학기술원 Method and apparatus of partitioning memory bandwidth of system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007241434A (en) * 2006-03-06 2007-09-20 Mitsubishi Electric Corp Sequence processing execution device
JP2007241556A (en) * 2006-03-07 2007-09-20 Mitsubishi Electric Corp Sequence processing execution equipment by two or more arithmetic units
JP4547469B2 (en) * 2006-03-07 2010-09-22 三菱電機株式会社 Sequence processing execution apparatus using a plurality of arithmetic units
KR20200045927A (en) * 2018-10-23 2020-05-06 울산과학기술원 Method and apparatus of partitioning memory bandwidth of system
KR102132598B1 (en) 2018-10-23 2020-07-10 울산과학기술원 Method and apparatus of partitioning memory bandwidth of system

Similar Documents

Publication Publication Date Title
US9459874B2 (en) Instruction set architecture-based inter-sequencer communications with a heterogeneous resource
RU2450339C2 (en) Multiprocessor architecture optimised for traffic
CN103197953B (en) Speculate and perform and rollback
US7590774B2 (en) Method and system for efficient context swapping
CN116755778A (en) System, method and apparatus for heterogeneous computing
JP4219369B2 (en) Method and apparatus for separating and managing stacks in a processor system
TW201734758A (en) Multi-core communication acceleration using hardware queue device
JP4645973B2 (en) Method, apparatus and system for instruction set emulation
US20110231616A1 (en) Data processing method and system
JP2005235229A (en) Method and apparatus for processor task migration in multiprocessor system
CN108885586B (en) Processor, method, system, and instruction for fetching data to an indicated cache level with guaranteed completion
JP2005235228A (en) Method and apparatus for task management in multiprocessor system
CN115858017A (en) Processor having multiple cores, shared core extension logic, and shared core extension utilization instructions
EP1955157A1 (en) Compiler-based scheduling optimizations for user-level threads
JP2009519513A (en) Multi-core arithmetic processing method and apparatus using dedicated thread management
JP2006323829A (en) Method and apparatus for dynamic linking program overlay
TW201741867A (en) Memory copy instructions, processors, methods, and systems
JP2009199414A (en) Microcomputer
JP2006039821A (en) Method for controlling multiprocessor-equipped system lsi
JP2005322240A (en) Method and system for access for register with index
CN108845969B (en) Operation control method and operation system suitable for incompletely symmetrical multi-processing microcontroller
JP2024500779A (en) Address mapping aware task processing mechanism
JP2006039822A (en) Method for controlling multiprocessor-equipped system lsi
JP2006039824A (en) Method for controlling multiprocessor-equipped system lsi
JP2011118744A (en) Information processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071002