JP2006079547A - Processor system - Google Patents
Processor system Download PDFInfo
- Publication number
- JP2006079547A JP2006079547A JP2004265914A JP2004265914A JP2006079547A JP 2006079547 A JP2006079547 A JP 2006079547A JP 2004265914 A JP2004265914 A JP 2004265914A JP 2004265914 A JP2004265914 A JP 2004265914A JP 2006079547 A JP2006079547 A JP 2006079547A
- Authority
- JP
- Japan
- Prior art keywords
- timer interrupt
- task
- shared
- delay
- interrupt signal
- 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 processor system for switching tasks according to a timer interrupt signal.
複数のプロセッサを備えたマルチプロセッサシステムにおいて、特定のプロセッサへの負荷が集中しないようにする技術が知られている(特許文献1参照)。 In a multiprocessor system including a plurality of processors, a technique for preventing a load on a specific processor from being concentrated is known (see Patent Document 1).
この特許文献1には、複数のCPUボードでマルチプロセッサシステムを構成している。各CPUボードでは、割り込み受付けから、割り込みタスク処理完了までの時間を測定し、その測定時間により、CPUの負荷を測定する。そして、測定した負荷に応じて、割り込みの遅延時間をきめ細かく制御する。
In
このように、特許文献1は、CPUに対する割り込み処理の負荷を分散させる点に特徴がある。
As described above,
しかしながら、各CPUの負荷が均等になるように割込制御を行っても、各CPUとメモリとの間で送受されるデータ同士が競合するおそれがある。特に、割込信号によりタスクを切り換える際、今まで実行していたタスクに関連するデータを共有メモリに待避する必要があるが、共有メモリへのアクセスが複数のCPUで競合した場合には、共有メモリへのデータの待避に時間がかかることになり、タスクの切替を迅速に行えなくなる。
本発明は、タスク切替時に共有バス上でデータの衝突が起きないようにするプロセッサシステムを提供する。 The present invention provides a processor system that prevents data collision on a shared bus during task switching.
本発明の一態様によれば、タイマ割込信号に従って、タスクの切替を行う複数のプロセッサコアと、前記複数のプロセッサコアにより共有され、タスク切替に伴って各プロセッサコアが今まで使用していたタスク関連データを待避するために利用可能な共有メモリと、前記共有メモリと前記複数のプロセッサコアとの間でデータを送受する共有バスと、前記複数のプロセッサコアのそれぞれに対応して設けられ、各プロセッサコアに供給するタイマ割込信号のタイミングを、対応するプロセッサコアに応じた固有の時間だけそれぞれ遅延させる複数の遅延回路と、を備える。 According to one aspect of the present invention, a plurality of processor cores that perform task switching in accordance with a timer interrupt signal and the plurality of processor cores that are shared by the plurality of processor cores and that each processor core has used so far in accordance with task switching A shared memory that can be used to save task-related data, a shared bus that transmits and receives data between the shared memory and the plurality of processor cores, and a corresponding one of the plurality of processor cores, And a plurality of delay circuits for delaying the timing of the timer interrupt signal supplied to each processor core by a specific time corresponding to the corresponding processor core.
本発明によれば、タイマ割込によるタスク切替時に共有バス上でデータの衝突が起きなくなる。 According to the present invention, data collision does not occur on the shared bus when switching tasks by timer interruption.
以下、図面を参照しながら、本発明の一実施形態について説明する。 Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
図1は本発明の一実施形態に係るプロセッサシステムの概略構成を示すブロック図である。図1のプロセッサシステムは、共有バス1に接続される複数のCPUモジュール2と、共有バス1に接続されて全てのCPUモジュール2が共用する共有メモリ3と、複数のCPUモジュール2へのタイマ割込信号を生成するタイマ割込生成ユニット4とを備えている。
FIG. 1 is a block diagram showing a schematic configuration of a processor system according to an embodiment of the present invention. The processor system of FIG. 1 includes a plurality of
タイマ割込生成ユニット4は、所定間隔ごとにタイマ割込信号を生成する。タイマ割込生成ユニット4で生成されたタイマ割込信号は、ほぼ同タイミングで複数のCPUモジュール2に供給される。CPUモジュール2は、タイマ割込信号に同期して、タスクを実行する。各タスクの実行中は、ローカルメモリを作業領域として利用し、実行中のタスクに関連するデータをローカルメモリに格納する。CPUモジュール2は、タイマ割込信号が入力されると、タスクの切替を行う。
The timer interrupt generation unit 4 generates a timer interrupt signal at predetermined intervals. The timer interrupt signal generated by the timer interrupt generation unit 4 is supplied to the plurality of
複数のCPUモジュール2は同一の内部構成を有する。図2はCPUモジュール2の内部構成の一例を示すブロック図である。図2のCPUモジュール2は、演算処理を行うCPUコア部11と、CPUコア部11による高速アクセスが可能なキャッシュメモリ12と、CPUコア部11がタスク処理に利用するローカルメモリ13と、タイマ割込信号を遅延させる遅延ユニット14と、各CPUモジュール2に特化した所定の処理を行うハードウェア拡張部(HW拡張部)15と、HW拡張部15が利用するローカルメモリ16と、ローカルメモリ13,16と共有メモリ3との間でデータの送受を行うDMAコントローラ17と、共有バス1との間でデータの送受を行うバスインタフェースユニット(BIU)18とを有する。
The plurality of
タイマ割込生成ユニット4で生成されたタイマ割込信号は、各CPUモジュール2内の遅延ユニット14に入力される。各遅延ユニット14には、互いに異なる遅延時間が設定されており、設定された遅延時間だけタイマ割込信号を遅延させる。各CPUモジュール2内のCPUコア部11には、遅延ユニット14で遅延させたタイマ割込信号が供給される。
The timer interrupt signal generated by the timer interrupt generation unit 4 is input to the
CPUコア部11は、遅延ユニット14で遅延させたタイマ割込信号が入力されると、タスクの切替を行う。タスクを切り換える際には、今まで実行していたタスクの関連データをローカルメモリ13から読み出して、共有メモリ3に待避する。ローカルメモリ13から共有メモリ3へのデータの待避は、CPUコア部11の制御下で行ってもよいが、DMAコントローラ17を利用してもよい。DMAコントローラ17を利用してデータの待避を行えば、CPUコア部11の処理負担を軽減でき、タスクの切替処理を高速化できる。
When the timer interrupt signal delayed by the
HW拡張部15は必須の構成要素ではないが、各CPUモジュール2ごとに専用の処理(例えば、画像処理など)を行う場合に設けられる。HW拡張部15にも、対応するローカルメモリ16が設けられ、タスク切替時には、必要に応じて、このローカルメモリ16の内容も共有メモリ3に待避される。
The
図3は遅延ユニット14の内部構成の第1実装例を示すブロック図である。図3の遅延ユニット14は、遅延サイクル数を設定する遅延設定レジスタ21と、比較器22と、OR回路23と、トグルスイッチ24と、セレクタ25と、カウンタレジスタ26と、インクリメンタ27とを有する。
FIG. 3 is a block diagram illustrating a first implementation example of the internal configuration of the
初期状態では遅延設定レジスタ21に0でない値が設定されているものとする。OR回路 23は、タイマ割り込み生成ユニット4で生成されたタイマ割り込みパルスと比較器22の出力との論理和を演算する。 初期状態では、比較器22の出力とタイマ割り込み信号は「0」であり、タイマ割り込みパルスが入力されると OR回路23の出力は1クロック期間だけ「1」になる。
Assume that a non-zero value is set in the
トグルスイッチ24の出力は初期状態では例えば「0」であり、OR回路23から出力される信号のポジティブエッジ(「0」->「1」の遷移)で出力論理を切り替え、反転して「1」になる。
The output of the
セレクタ25は、トグルスイッチ24の出力に基づいて、「0」またはインクリメンタ27の出力を選択する。例えばトグルスイッチ24の出力が「1」であれば、セレクタ25はインクリメンタ27の出力を選択し、トグルスイッチ24の出力が「0」であれば「0」を選択する。セレクタ25の出力はカウンタレジスタ26に設定される。従ってトグルスイッチ24の出力が「1」である間は、カウンタレジスタ26の値は1クロックに1ずつ加算される。
The
比較器22は、遅延設定レジスタ21の設定値とカウンタレジスタ26の値を比較する。 両者が一致しなければ比較器22は「0」を出力し、一致すれば「1」を出力する。 これにより、OR回路23の出力が「0」->「1」へ遷移するので、トグルスイッチ24は再び出力論理を切り替え、反転して「0」になる。
The
このとき、セレクタ25は0を選択するので、次のクロックでカウンタレジスタ26には 0が設定される。すると、比較器22の出力は再び「0」となり、OR 回路23の出力は「0」へ戻って遅延ユニットは初期状態へ戻る。比較器22の出力が遅延されたタイマ割り込みパルスとなる。
At this time, since the
このように、図3の遅延ユニット14は、カウンタレジスタ26の値が遅延設定レジスタ21の設定値と等しくなるまで、「1」ずつインクリメントを繰り返す。すなわち、遅延設定レジスタ21の設定値に応じて、タイマ割込信号の遅延時間が設定される。遅延設定レジスタ21に設定する値を変更することにより、遅延設定レジスタ21のビット値に応じた遅延時間の設定が可能になる。
As described above, the
図4は遅延ユニット14の内部構成の第2実装例を示すブロック図である。図4の遅延ユニット14は、遅延サイクル数の2の補数を設定する遅延設定レジスタ31と、比較器32と、OR回路33と、トグルスイッチ34と、セレクタ35と、カウンタレジスタ36と、インクリメンタ37とを有する。
FIG. 4 is a block diagram showing a second implementation example of the internal configuration of the
図4の遅延ユニット14は、セレクタ35の入力信号と比較器32の入力信号が図3と異なっている。図4のセレクタ35は、遅延設定レジスタ31の設定値またはインクリメンタ37の出力を選択する。比較器32は、カウンタレジスタ36の出力と「0」とを比較する。
The
すなわち、図3のインクリメンタ27は、「0」から遅延設定レジスタ21の設定値までインクリメントを行うのに対して、図4のインクリメンタ37は、遅延設定レジスタ31の設定値から「0」までインクリメントを行う。
That is, the
図3と図4のどちらの回路構成を採用しても、回路規模や動作速度にほとんど違いはないため、どちらの回路構成を採用してもよい。 Whichever circuit configuration of FIGS. 3 and 4 is employed, there is almost no difference in circuit scale and operation speed, so either circuit configuration may be employed.
このように、本実施形態では、複数のCPUモジュール2が同一の共有メモリ3を共用する場合に、タスク割込信号が複数のCPUモジュール2にほぼ同時に入力されると、各CPUモジュール2の内部で個別にタスク割込信号を遅延させて、CPUコア部11に供給するため、各CPUコア部11がタスク切替を行うタイミングを互いにずらすことができる。これにより、タスク切替時のローカルメモリから共有メモリ3にデータを待避している最中に、データ同士が共有バス1上で競合するおそれを軽減できる。
As described above, in this embodiment, when a plurality of
なお、CPUモジュール2内の遅延ユニット14でタイマ割込信号を遅延させる時間をプログラマブルに設定変更できるようにしてもよい。これにより、各CPUモジュール2が実行するタスクの内容に応じて、タイマ割込信号の遅延時間を変更することができる。
The time for delaying the timer interrupt signal by the
また、上述した実施形態において、共有バス1に接続されるCPUモジュール2の数に特に制限はない。さらに、CPUモジュール2の内部構成や遅延ユニット14の内部構成は図示されたものに限定されない。
In the embodiment described above, the number of
1 共有バス
2 CPUモジュール
3 共有メモリ
4 タイマ割込生成ユニット
11 CPUコア部
13,16 ローカルメモリ
14 遅延ユニット
15 HW拡張部
17 DMAコントローラ
DESCRIPTION OF
Claims (5)
前記複数のプロセッサコアにより共有され、タスク切替に伴って各プロセッサコアが今まで使用していたタスク関連データを待避するために利用可能な共有メモリと、
前記共有メモリと前記複数のプロセッサコアとの間でデータを送受する共有バスと、
前記複数のプロセッサコアのそれぞれに対応して設けられ、各プロセッサコアに供給するタイマ割込信号のタイミングを、対応するプロセッサコアに応じた固有の時間だけそれぞれ遅延させる複数の遅延回路と、を備えることを特徴とするプロセッサシステム。 A plurality of processor cores for switching tasks according to a timer interrupt signal;
A shared memory that is shared by the plurality of processor cores and that can be used to save task-related data that each processor core has used so far in accordance with task switching;
A shared bus for transmitting and receiving data between the shared memory and the plurality of processor cores;
A plurality of delay circuits which are provided corresponding to each of the plurality of processor cores and delay the timing of a timer interrupt signal supplied to each processor core by a specific time corresponding to the corresponding processor core. A processor system characterized by the above.
前記複数のプロセッサコアは、タスクを切り換える際、前記ローカルメモリの内容を、前記共有バスを経由して前記共有メモリに待避することを特徴とする請求項1または2に記載のプロセッサシステム。 Provided corresponding to each of the plurality of processor cores, comprising a plurality of local memories that can be used for processing a task being executed,
3. The processor system according to claim 1, wherein when switching tasks, the plurality of processor cores save the contents of the local memory to the shared memory via the shared bus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004265914A JP2006079547A (en) | 2004-09-13 | 2004-09-13 | Processor system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004265914A JP2006079547A (en) | 2004-09-13 | 2004-09-13 | Processor system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006079547A true JP2006079547A (en) | 2006-03-23 |
Family
ID=36158916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004265914A Pending JP2006079547A (en) | 2004-09-13 | 2004-09-13 | Processor system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006079547A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108804218A (en) * | 2017-04-28 | 2018-11-13 | 深圳中电长城信息安全系统有限公司 | The distribution method and system of hard disk |
-
2004
- 2004-09-13 JP JP2004265914A patent/JP2006079547A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108804218A (en) * | 2017-04-28 | 2018-11-13 | 深圳中电长城信息安全系统有限公司 | The distribution method and system of hard disk |
CN108804218B (en) * | 2017-04-28 | 2021-04-06 | 深圳中电长城信息安全系统有限公司 | Hard disk allocation method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5317356B2 (en) | Clock control signal generation circuit, clock selector, and information processing apparatus | |
US6065126A (en) | Method and apparatus for executing plurality of operations per clock cycle in a single processing unit with a self-timed and self-enabled distributed clock | |
JP5102789B2 (en) | Semiconductor device and data processor | |
KR100824792B1 (en) | Command processing devices and method thereof, and systems having the same | |
JP2007048022A (en) | Asynchronous bus interface and its processing method | |
US7653822B2 (en) | Entry into a low power mode upon application of power at a processing device | |
JP4237616B2 (en) | System and method using common reset and slower reset clock | |
JP2007065756A (en) | Clock control circuit, clock control method, semiconductor integrated circuit device, and electronic apparatus | |
JP5025723B2 (en) | Test equipment | |
US7945718B2 (en) | Microcontroller waveform generation | |
JP2006079547A (en) | Processor system | |
JP4831899B2 (en) | Semiconductor integrated circuit and clock control method | |
US6760798B1 (en) | Interface mechanism and method for interfacing a real-time clock with a data processing circuit | |
US6715017B2 (en) | Interruption signal generating apparatus | |
US20190287577A1 (en) | Semiconductor device | |
JP5304510B2 (en) | Arbitration device, bus access arbitration program, and bus access arbitration method | |
US20230384820A1 (en) | Fsm based clock switching of asynchronous clocks | |
JP5489871B2 (en) | Image processing device | |
JP4620492B2 (en) | Bus interface circuit | |
JP2006163864A (en) | Debugging method and device for system lsi | |
JP2022072003A (en) | Register control device | |
JPWO2021016158A5 (en) | ||
JP2003058272A (en) | Semiconductor device and semiconductor chip used in the same | |
JP2005010958A (en) | Semiconductor device | |
JP2005316721A (en) | Clock generation circuit and semiconductor integrated circuit |