JP3999943B2 - Multi-bank access control device and multi-bank access control method - Google Patents

Multi-bank access control device and multi-bank access control method Download PDF

Info

Publication number
JP3999943B2
JP3999943B2 JP2001071103A JP2001071103A JP3999943B2 JP 3999943 B2 JP3999943 B2 JP 3999943B2 JP 2001071103 A JP2001071103 A JP 2001071103A JP 2001071103 A JP2001071103 A JP 2001071103A JP 3999943 B2 JP3999943 B2 JP 3999943B2
Authority
JP
Japan
Prior art keywords
command
memory access
issued
processor
bank
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.)
Expired - Fee Related
Application number
JP2001071103A
Other languages
Japanese (ja)
Other versions
JP2002268942A (en
Inventor
滋博 浅野
治郎 雨宮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2001071103A priority Critical patent/JP3999943B2/en
Publication of JP2002268942A publication Critical patent/JP2002268942A/en
Application granted granted Critical
Publication of JP3999943B2 publication Critical patent/JP3999943B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数のプロセッサあるいは複数のスレッドから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御装置及びマルチバンクアクセス制御方法に関する。
【0002】
【従来の技術】
マルチプロセッサシステムにおいて複数のプロセッサからアクセスされるメモリは、高速化のために複数バンクを同時にアクセスするのが一般的である。例えば、あるプロセッサからメモリがアクセスされる場合、プロセッサからのアクセスは各バンクへのアクセスに分解され、各バンクがそれぞれ独立にアクセスされる。プロセッサからのアクセスは、キャッシュミスなどの比較的短いデータをアクセスする場合と、DMAなどで比較的長いデータをアクセスする場合がある。また、アドレスによるバンクの割り当ては、連続したアドレスが複数のバンクにまたがってアクセスされ、バンド幅が大きくとれるようにインターリーブして割り当てられるのが一般的である。
【0003】
【発明が解決しようとする課題】
各プロセッサから複数のメモリアクセスが発生する場合、他のプロセッサからの要求とバンクが衝突するために、必ずしもメモリのアクセス順序がプロセッサから発行された順序で終了するとは限らない。しかしながら、メモリのアクセスが終わったことを知る何らかの方法がなければ、これらのメモリアクセスの結果を使った命令を実行することができない。
【0004】
そこで、メモリアクセスが必ず発行順に終了するように、メモリアクセスの実行に制限をかける方法があるが、この方法では、メモリアクセス自体の処理効率が低下し、プロセッサのパフォーマンスを低下させる問題点があった。
【0005】
また、制限をかけないためには、全てのメモリアクセスについて、例えばバンクアクセスが終了したときなどに割り込みを発生させて、終了を検知する必要がある。しかし、この割り込みを用いる方法でも、各メモリアクセスが終了するごとに割り込みが発生するので、プロセッサのパフォーマンスを低下させる問題点があった。
【0006】
本発明は、上記事情を考慮してなされたもので、効率良いマルチバンクアクセスを実現するとともに、必要に応じてメモリアクセスコマンドの終了を検知することを可能とするマルチバンクアクセス制御装置及びマルチバンクアクセス制御方法を提供することを目的とする。
【0007】
【課題を解決するための手段】
本発明は、複数のプロセッサから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御装置であって、複数の前記プロセッサに対応して1つずつ設けられ、対応する前記プロセッサから発行されたバンクアクセスに関係するコマンドを蓄積する第1の蓄積手段と、複数の前記メモリバンクに対応して1つずつ設けられ、対応する前記メモリバンクに対するマイクロコマンドを蓄積する第2の蓄積手段と、前記第1の蓄積手段に蓄積されたメモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する前記第2の蓄積手段へ発行する制御手段と、前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を管理することによって、各々の前記メモリアクセスコマンドの終了を検出する第1の検出手段と、前記第1の検出手段による検出結果に基づいて、前記第1の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記プロセッサが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出手段とを備え、前記第2の検出手段は、複数の前記プロセッサに対応して1組ずつ設けられ、対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含み、前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記プロセッサに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とする。
【0008】
好ましくは、前記制御手段は、前記メモリアクセスコマンドを前記マイクロコマンドに細分化するのに先立って、該メモリアクセスコマンドに割り当てるべき識別情報を取得し、細分化された前記マイクロコマンドを前記第2の蓄積手段へ発行するにあたり、該マイクロコマンドに、その元となった前記メモリアクセスコマンドに割り当てられた前記識別情報を付加し、前記第1の検出手段は、前記マイクロコマンドに付加された前記識別情報に基づいて前記マイクロコマンドの発行及び終了を管理することによって、該識別情報を割り当てられた前記メモリアクセスコマンドの終了を検出するようにしてもよい。
【0010】
また、本発明は、複数のスレッドから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御装置であって、複数の前記スレッドに対応して1つずつ設けられ、対応する前記スレッドから発行されたバンクアクセスに関係するコマンドを蓄積する第1の蓄積手段と、複数の前記メモリバンクに対応して1つずつ設けられ、対応する前記メモリバンクに対するマイクロコマンドを蓄積する第2の蓄積手段と、前記第1の蓄積手段に蓄積されたメモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する前記第2の蓄積手段へ発行する制御手段と、前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を管理することによって、各々の前記メモリアクセスコマンドの終了を検出する第1の検出手段と、前記第1の検出手段による検出結果に基づいて、前記第1の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記スレッドが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出手段とを備え、前記第2の検出手段は、複数の前記スレッドに対応して1組ずつ設けられ、対応する前記スレッドから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記スレッドから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含み、前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記スレッドに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記スレッドに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記スレッドに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とする。
【0011】
また、本発明は、複数のプロセッサから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御方法であって、前記プロセッサからバンクアクセスに関係するコマンドが発行された場合に、該コマンドを、該プロセッサに対応する第1の蓄積手段に蓄積するステップと、制御手段、複数の前記プロセッサに対応する前記第1の蓄積手段のうちのいずれかから蓄積されたコマンドを取り込み、該コマンドがメモリアクセスコマンドである場合には、該メモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する第2の蓄積手段へ発行するステップと1の検出手段、前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を検出することによって、前記メモリアクセスコマンドの終了を検出する第 1 の検出ステップと2の検出手段、前記第1の検出手段による検出結果に基づいて、前記第2の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記プロセッサが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出ステップとを有し、
前記第2の検出手段は、複数の前記プロセッサに対応して1組ずつ設けられ、対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含むものであり、前記第2の検出ステップにおいて前記第2の検出手段は、前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記プロセッサに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とする。
【0012】
なお、装置に係る本発明は方法に係る発明としても成立し、方法に係る本発明は装置に係る発明としても成立する。
【0013】
本発明では、メモリアクセスコマンドの終了を、該メモリアクセスコマンドに対応するマイクロコマンドの発行・終了を管理することによって、検出するとともに、各プロセッサ(スレッド)ごとに、未終了のメモリアクセスコマンドの数と未終了の同期コマンドの有無を管理することによって、同期コマンドを発行したプロセッサが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する。これによって、メモリアクセスとそれを使用するコマンドの順序関係を保証することができるようになる。この結果、プロセッサのパフォーマンスを向上させることができる。
【0014】
【発明の実施の形態】
以下、図面を参照しながら発明の実施の形態を説明する。
【0015】
本実施形態では、マルチプロセッサシステムを例に説明するが、複数のプロセッサの代わりに、マルチスレッドプロセッサシステム(例えば、複数のスレッドに制御される複数のDMAコントローラを持つシステム)にも本発明を適用することが可能である。
【0016】
本実施形態では、プロセッサからのメモリアクセスコマンドが複数存在するときに、それらのメモリアクセスが終了したときのみ後続するコマンド(命令)を実行できる同期コマンド(SYNCコマンド)を導入する。また、この同期コマンドを実現するために、プロセッサごとに同期用の同期カウンタを設け、同期カウンタはメモリアクセスコマンドが発行されるとインクリメントされ、対応する応答が返ってくるとデクリメントされ、0になったら同期コマンドを通過できるようにプロセッサが制御される。従って、プロセッサからのメモリアクセスコマンドが複数存在するときに、従来のような全コマンドに対する割り込み処理によらなくても、メモリアクセスとそれを使用する命令(後続するコマンド)の順序関係を保証することができるようになる。これによって、プロセッサのパフォーマンスを向上させることができる。
【0017】
図1に、本発明の一実施形態に係るマルチプロセッサシステムの構成例を示す。図1に示されるように、本実施形態のマルチプロセッサシステムでは、m個(mは複数、図1はm=4の例)のプロセッサ(Processor)1と、メモリコントローラ(Memory Controller)2とが、バス(Bus)3で接続され、メモリコントローラ2は、n個(nは複数、図1はn=4の例)のメモリバンク(bank)4へのアクセスを制御する。
【0018】
なお、図1の例では、プロセッサ数とバンク数とが同じになっているが、もちろん、プロセッサ数とバンク数とが異なってもよい。
【0019】
また、メモリバンクと実メモリ(例えばメモリチップあるいはメモリユニット)とはどのような関係であっても構わない。例えば、図2(a)に例示するように、全バンクを、1つのメモリを複数の領域に分割したものに対応させるようにしてもよいし、図2(b)に例示するように、一部のバンクを、1つのメモリを複数の領域に分割したものに対応させるようにしてもよいし、図2(c)に例示するように、1つのバンクを、複数のメモリに対応させるようにしてもよい。また、バンクとメモリとの対応関係が、バンク毎あるいはメモリ毎に異なっていてもよい。
【0020】
図3に、本発明の一実施形態に係るメモリコントローラ2の構成例を示す。図3に示されるように、本実施形態のメモリコントローラ2は、バスインタフェース(Bus Interface)21、各プロセッサ1に対応して設けられるm個(mは複数、図3はm=4の例)のコマンドキュー(Command Queue)22、インターリーブユニット(Interleave Unit)23、各メモリバンク2に対応して設けられるn個(nは複数、図3はn=4の例)バンクキュー(Bank Queue)24、データバッファ(Data Buffer)25、終了コントローラ(Completion Controller)26、同期コントローラ(SYNC Controller)27を含む。
【0021】
図3のコマンドキュー(0)〜(3)は、それぞれ、図1のプロセッサ(0)〜(3)に対応している。また、図3のバンクキュー(0)〜(3)は、それぞれ、図1のメモリバンク(0)〜(3)に対応している。
【0022】
さて、各プロセッサ1からのメモリアクセスコマンドは、当該プロセッサに対応するコマンドキュー22に、バスインタフェース21を経由して投入される。図1及び図3の例では、プロセッサ(0)からのメモリアクセスコマンドは、当該プロセッサ(0)に対応するコマンドキュー(0)に投入される。同様に、プロセッサ(1)〜(3)からのメモリアクセスコマンドは、それぞれ、対応するコマンドキュー(1)〜(3)に投入される。
【0023】
なお、各プロセッサ(i)からの同期コマンドも、当該プロセッサ(i)に対応するコマンドキュー(i)に入れられる。
【0024】
各々のコマンドキュー22内では、コマンドは、プロセッサ1が発行した順序で保持され、その順序でインターリーブユニット23に取り込まれる(すなわち、FIFOとする)。
【0025】
インターリーブユニット23は、コマンドキュー22を1つ選択し、その先頭のコマンドを取り込み、該コマンドがメモリアクセスコマンドか同期コマンドかによって、それに応じた処理を行う。コマンドキュー22は、例えば、ラウンド・ロビン方式で順番に選択していってもよい(空のコマンドキュー22はスキップする)。また、例えば、コマンドキュー22に優先順位を付し該順位の高いものから優先的に選択する方法や、ランダムに選択する方法など、他の方法も可能である。
【0026】
なお、インターリーブユニット23は、まず、候補とするコマンドキュー22を選択し、そのコマンドキュー22にコマンドが保持されていればその先頭のコマンドを取り込み、そのコマンドキュー22にコマンドが保持されていれば次の候補を選択するという手順にしてもよいし、まず、コマンドを保持しているコマンドキュー22を調べ(これは、コマンドキュー22にコマンドを保持しているか問い合わせをして返答を受けるなどの能動的な形態であってもよいし、コマンドを保持したコマンドキュー22から通知を受けるなどの受動的な形態であってもよい)、それらのうちから1つを選択し、その先頭のコマンドを取り込むという手順にしてもよいし、その他の方法も可能である。
【0027】
インターリーブユニット23は、各プロセッサ1から発行されたメモリアクセスコマンドに対しては、該メモリアクセスコマンドをバンクごとに分けたコマンド(マイクロコマンド)に細分化する働きをする(なお、幾つのマイクロコマンドが生成されるかは、メモリアクセスコマンドに応じて異なる(1つのこともあり得る))。
【0028】
ただし、本実施形態では、1つのメモリアクセスコマンドに属する全マイクロコマンドに対し該メモリアクセスコマンドに割り当てた識別番号(後述)を付して各、マイクロコマンドが属するメモリアクセスコマンドを特定するが、識別番号には上限があるので、識別番号に空きがあって初めて、メモリアクセスコマンドを、マイクロコマンドに細分化することができる。識別番号は、終了コントローラ26から与えられる(例えば、終了コントローラ26に識別番号を要求し、空きがあれば識別番号が返され、空きがなければその旨が返される)。
【0029】
生成されたマイクロコマンドは、当該マイクロコマンドがアクセスすべきメモリバンク4に対応するバンクキュー24に発行される。
【0030】
例えば、図1及び図3の例で1バンクにて連続する128バイトのアクセスをサポートする構成を採用した場合において、プロセッサ(1)から、「メモリ・アドレス“0x1000”〜“0x1fff”の4096バイトを、プロセッサ(1)に転送する」というメモリアクセスコマンドが来たとすると、4096/128=32個のマイクロコマンドが発行される。そして、32個のマイクロコマンドは、それぞれが割り当てられた1つのバンクをアクセスするため、該当するバンクキュー24に発行される(例えば、バンクキュー(0)〜(3)にはそれぞれ8つずつのマイクロコマンドが入れられる)。
【0031】
各々のバンクキュー24内では、マイクロコマンドは、投入された発行で保持され、その順序でメモリバンク4に発行される(すなわち、FIFOとする)。
【0032】
なお、各々のバンクキュー24内では、同一のプロセッサ1が発行した異なるメモリアクセスコマンドに属するマイクロコマンドが混在し得るだけでなく、異なるプロセッサ1が発行したメモリアクセスコマンドに属するマイクロコマンドも混在し得る。
【0033】
ところで、アドレスの割付には種々の方法が可能であるが、例えば、上記の例では、連続したアドレスで複数のバンクからアクセスし、スループットを発揮するためにバンクのインターリーブを行うために、一例として、次のようなアドレスの割付が考えられる。1回のバンクアクセスで128バイトのデータをサポートしていると仮定して、アドレスの第0ビットから第6ビットまでの7ビットが、128バイト中のオフセット(128バイト中のどの1バイトか)を示し、第8ビットと第7ビットの2ビットが、4つのバンクのうちのどのバンクかを示し、第9ビットから第31ビットの23ビットが、当該バンク内のどの128バイトかを示している。また、この例では、第8ビットと第7ビットの2ビットは、マイクロコマンドをインタリーブユニット23からバンクキュー24へ投入する際に該当するバンクキュー24の選択のために参照され、第9ビットから第31ビットの23ビットが実際のバンクアクセスの際にメモリバンク内の該当する128バイトを選択するために参照される(なお、この例では、第0ビットから第6ビットまでの7ビットは、プロセッサ内で使用するフィールドである)。
【0034】
バンクキュー24からそれぞれ対応するメモリバンク4に発行されたマイクロコマンドは、メモリバンク4をアクセスし、リード(Read)アクセスのときは、該当アドレスのデータがメモリバンク4からデータバッファ25に書き込まれ、ライト(Write)アクセスのときは、書き込むべきデータがデータバッファ25からメモリバンク4に書き込まれる。データバッファ25は、バスインタフェース21を経由してバス、プロセッサ1との間でデータの受け渡しを行う。
【0035】
メモリバンク4からのリードについては、コマンドキュー22からインターリーブユニット23へコマンドが発行されるとき、該コマンドには対応するプロセッサ1のプロセッサ番号が付される。また、インターリーブユニット23からバンクキュー24へマイクロコマンドが発行されるとき、該マイクロコマンドには対応するプロセッサ1のプロセッサ番号及びそれが属するメモリアクセスコマンドに対応する識別番号が付される。さらに、メモリバンク4からの応答(例えば、128バイトデータ)をデータバッファ25から返すときに、該データには対応するプロセッサ1のプロセッサ番号及び応答しているアドレスが付加され、プロセッサ側でどのパケットを受け取るべきかを識別できる。
【0036】
メモリバンク4へのライトについては、上記と同様に、コマンドキュー22からインターリーブユニット23へコマンドが発行されるとき、該コマンドには対応するプロセッサ1のプロセッサ番号が付され、インターリーブユニット23からバンクキュー24へマイクロコマンドが発行されるとき、該マイクロコマンドには対応するプロセッサ1のプロセッサ番号及び識別番号が付される。また、インターリーブユニット23からバンクキュー24へマイクロコマンドが発行されるとき、対応するプロセッサ1のプロセッサ番号及びアドレスがライトリクエスト(Write Request)としてバスインタフェース21を介してバス3に送出され、該当するプロセッサ1は書き込むべきデータをバス3に送出する。この書き込むべきデータは、バスインタフェース21を介してデータバッファ25に入れられる。
【0037】
各プロセッサ1がデータを送出するタイミングをどの時点にするかについては、例えば、プロセッサ1がコマンドを送る時点とする方法がある。また、例えば、インターリーブユニット23からバンクキュー24にマイクロコマンドを発行する時点とする方法もある。後者の方法は、前者の方法に比べて、データバッファ25のメモリ量を減らすことができる。
【0038】
バンクキュー24から各メモリバンク4に書き込み命令が出るときに、データバッファ25から対応するデータが出力される。
【0039】
なお、データバッファ25には、バンクキュー24に対応するライト用のバッファを設けるようにすると好ましい。
【0040】
図4に、インターリーブユニット23の処理手順の一例を示す。
【0041】
インターリーブユニット23は、空でないコマンドキュー22があるかどうかをチェックしている(ステップS1)。
【0042】
空でないコマンドキュー22があるならば(ステップS1)、空でないコマンドキュー22を1つ選択する(ステップS2)。
【0043】
選択したコマンドキュー22の先頭に保持されているコマンドが同期コマンドである場合には(ステップS3)、同期カウンタへの通知を行い(ステップS4)、ステップS1に戻り、処理を続ける。
【0044】
選択したコマンドキュー22の先頭に保持されているコマンドがメモリアクセスコマンドである場合には(ステップS3)、メモリアクセスコマンドに割り当てる識別番号に空きがなければ(ステップS5)、ステップS1に戻り、処理を続ける。
【0045】
メモリアクセスコマンドに割り当てる識別番号に空きがあれば(ステップS5)、選択したコマンドキュー22の先頭のコマンドを取り出す(ステップS6)。そして、取り出したメモリアクセスコマンドに基づいて、マイクロコマンドを生成し、生成したマイクロコマンドを、該当するバンクキュー24に投入する(ステップS7)。また、当該メモリアクセスコマンドについての同期コントローラ27への通知を行う(ステップS7)。また、当該メモリアクセスコマンドから生成されたマイクロコマンドについての終了コントローラ26への通知を行う(ステップS7)。そして、ステップS1に戻り、処理を続ける。
【0046】
前述したように、プロセッサ1からのメモリアクセスのコマンドは、複数のマイクロコマンドに分解される。そして、本実施形態では、各プロセッサ1からの各メモリアクセスコマンドの終了を検知するため、当該メモリアクセスコマンドに属する全マイクロコマンドの生成・終了を管理する終了コントローラ26と、1つの同期コマンドに対する全メモリアクセスコマンドが終了したこと検知し、当該同期コマンドが終了してこれを通過可能である旨を該当するプロセッサ1に通知するための同期コントローラ27を設けている。
【0047】
まず、同期コントローラ27について説明する。
【0048】
図5に、本実施形態の同期コントローラ27の構成例を示す。図5に示されるように、本同期コントローラ27は、アウトプットデコーダ(Output Decoder)271、各プロセッサ1に対応して設けられるm個(mは複数、図5はm=4の例)の同期カウンタ(SYNC Counter)272及び同期ビット(SYNC Bit)273、インプットデコーダ(Input Decoder)274を含む。
【0049】
図5の同期カウンタ(0)〜(3)は、それぞれ、図1のプロセッサ(0)〜(3)に対応している。また、図5の同期ビット(0)〜(3)は、それぞれ、図1のプロセッサ(0)〜(3)に対応している。
【0050】
ここでは、図1のプロセッサ(0)に対応する図3の同期カウンタ(0)及び同期ビット(0)を例にとって説明する。
【0051】
同期コントローラ27においては、インターリーブユニット23から、プロセッサ(0)からの1つのメモリアクセスコマンドが新たに通知されると、同期コントローラ27の該プロセッサ(0)に対応する同期カウンタ(0)はインクリメントされる。また、終了コントローラ26でプロセッサ(0)からの1つのメモリアクセスコマンドの終了が検出されると、該同期カウンタ(0)はデクリメントされる。
【0052】
一方、同期コマンドがインターリーブユニット23に入ると、同期ビット(0)がセットされる(例えば、1になる)。
【0053】
同期コマンドに先行するメモリアクセスコマンドがすべて終了した旨(すなわち当該同期コマンドが終了した旨)の該当するプロセッサ1への通知は、次のような条件で行われる。
・同期カウンタ(0)のカウンタ値が0の状態において、同期コマンドがコマンドキュー(0)からインターリーブユニット23に出たときは、プロセッサ(0)に、当該同期コマンドに対応するメモリアクセスコマンドがすべて終了したことを通知する。このとき、同期ビット(0)は、セットしない(なお、一旦セットし直ちに通知条件の成立を検知しそして直ちにリセットするようにしてもよい)。
・同期ビット(0)が1の状態において、(メモリアクセスコマンドが終了し)同期カウンタ(0)の値が0になったときは、プロセッサ(0)に、当該同期コマンドに対応するメモリアクセスコマンドがすべて終了したことを通知し、同期ビット(0)をリセットする(例えば、0にする)。
・同期ビット(0)が0の状態において、(メモリアクセスコマンドが終了し)同期カウンタ(0)の値が0になったときは、プロセッサには通知しない。
【0054】
以上、プロセッサ(0)を例にとって説明したが、他のプロセッサについても同様である。
【0055】
ところで、プロセッサ1側での同期コマンドの扱いには、種々の方法があるが、例えば、プロセッサ1は、同期コマンドをメモリコントローラ2(のコマンドキュー22)に送った際に、ビジーウェイト状態になり、メモリコントローラ2(の同期コントローラ27)から同期コマンド終了の応答が返ってた際に、ビジーウェイト状態を解除するようにしてもよい。また、例えば、同期コマンドの終了について、割り込みを用いるようにしてもよい(従来は、すべてのコマンドについて割り込みを用いる必要があったが、本実施形態では、同期コマンドについてのみ割り込みを用いればよい)。
また、マルチスレッドプロセッサの場合には、同期コマンドでスレッドの切り替えを行ってもよい。この場合、例えば、同期コマンドを実行したスレッドを待避させ、同期コントローラから同期コマンド終了の応答が返ってきた際に、該応答に対応する同期コマンドを実行したスレッドを、復帰させる(あるいは、復帰可能な状態にする)。
【0056】
例えば、プロセッサ(0)が実行するプログラムが次のようであったとする。

DMAコマンド1
DMAコマンド2
同期コマンド
DMAコマンド3

この例では、DMAコマンド1とDMAコマンド2の両方が終了した後に、DMAコマンド3を実行させるため、DMAコマンド1及びDMAコマンド2とDMAコマンド3の間で同期コマンドが記述されている。この場合、DMAコマンド1とDMAコマンド2が終了され(かつ同期コマンドが発行され)た後に、メモリコントローラ2から該当するプロセッサ1へ同期コマンド終了が通知される。
【0057】
通知を受けたプロセッサ1では、例えば、ビジーウェイト状態が解除され、DMAコマンド3が実行されることになる。
【0058】
また、マルチスレッドプロセッサの場合には、同期コマンドを実行したスレッドが、復帰可能となり、復帰された後に、DMAコマンド3が実行されることになる。
【0059】
図6に、同期コントローラ27における通知を受けたときの同期カウンタ272又は同期ビット273に対する処理手順の一例を示す。
【0060】
同期コントローラ27は、インターリーブユニット23または終了コントローラ26から通知があったかどうかをチェックしている(ステップS11)。
【0061】
通知があった場合に(ステップS11)、該通知がインターリーブユニット23からのメモリアクセスコマンドの発行の通知であるならば(ステップS12)、通知に係るプロセッサ1に対応する同期カウンタ272をインクリメントし(ステップS13)、ステップS11に戻り、処理を続ける。
【0062】
該通知が終了コントローラ26からのメモリアクセスコマンドの終了の通知であるならば(ステップS12)、通知に係るプロセッサ1に対応する同期カウンタ272をデクリメント(ステップS14)し、ステップS11に戻り、処理を続ける。
【0063】
該通知がインターリーブユニット23からの同期コマンドの通知であるときは(ステップS12)、通知に係るプロセッサ1に対応する同期カウンタ272の値が1以上ならば(ステップS15)、通知に係るプロセッサ1に対応する同期フラグ273をセットし(ステップS16)、ステップS11に戻り、処理を続ける。対応する同期カウンタの値が0ならば(ステップS15)、対応する同期フラグ273をセットせずに、ステップS11に戻り、処理を続ける。
【0064】
図7に、同期コントローラ27からプロセッサへの通知に関する処理手順の一例を示す。
【0065】
同期コントローラ27は、同期カウンタ272又は同期ビット273の状態が変化したかどうかおよび同期コマンドの通知を受けたかどうか(イベントの発生)をチェックしている(ステップS21)。
【0066】
もし、あるプロセッサ1に対応する同期カウンタ272の値が0のときに、該プロセッサ1からの同期コマンドの通知を受けたならば(ステップS22)、プロセッサ1への通知を行い(ステップS23)、ステップS21に戻り、処理を続ける。
【0067】
もし、あるプロセッサ1に対応する同期ビットがセットされているときに、該プロセッサ1に対応する同期カウンタが0になったならば(ステップS24)、プロセッサ1への通知を行うとともに、該同期ビット273をリセットし(ステップS23)、ステップS21に戻り、処理を続ける。
【0068】
その他のイベントであった場合には、何もしない(ステップS21に戻り、処理を続ける)。
【0069】
なお、図6において、ステップS12で同期コマンドの通知であった場合には、対応する同期カウンタ272の値にかかわらずに、対応する同期フラグ273をセットするようにしてもよい。この場合には、図7のステップS22/S23では、あるプロセッサ1に対応する同期カウンタ272の値が0のときに、対応する同期フラグ273がセットされたならば(ステップS22)、プロセッサ1への通知を行うとともに、該同期ビット273をリセットするようにすればよい(この場合、ステップS21では、同期カウンタ272又は同期ビット273の状態が変化したかどうかをチェックし、同期コマンドの通知を受けたかどうかはチェックしない)。
【0070】
次に、終了コントローラ26について説明する。
【0071】
インターリーブユニット23では、メモリアクセスコマンドをマイクロコマンドに分解し、複数のプロセッサ1からのマイクロコマンドがバンクキュー24で競合するので、マイクロコマンドの終了順序は、インターリーブユニット23からの発行順序とは一般的には異なることになる(結果的に同じになることもある)。終了コントローラ26では、1つのメモリアクセスコマンドに対応する複数のマイクロコマンドがすべて終了した場合に、当該1つのメモリアクセスコマンドが終了したとして、同期コントローラ27に通知する。
【0072】
図8に、本実施形態の終了コントローラ26の構成例を示す。図8に示されるように、本終了コントローラ26は、第1のデコーダ(Decoder_A)261、k個(kは複数、図8の例ではK=6)のマイクロカウンタ(MicroCount)262及びプロセッサ番号保持部(Proc Num)263、第2のデコーダ(Decoder_B)264を含む。
【0073】
まず、メモリアクセスコマンドがインターリーブユニット23でマイクロコマンドに分解されるとき、デコーダ(Decoder_A)261が識別番号を発行する。識別番号は、図8のマイクロカウンタ/プロセッサ番号保持部毎に固有に割り当てらたものであり、例えば、マイクロカウンタ(0)/プロセッサ番号保持部(0)〜マイクロカウンタ(5)/プロセッサ番号保持部(5)の各組に、それぞれ、識別番号0〜5が割り当てられる。マイクロカウンタ/プロセッサ番号保持部の組の数(最大発行できる識別番号の個数)は、必ずしもプロセッサの数と一致している必要はない(プロセッサの数と一致していてもよい)。
【0074】
識別番号は対応するマイクロカウンタ/プロセッサ番号保持部が空きの状態のときに発行されるが、識別番号に空きがないとき(マイクロカウンタ/プロセッサ番号保持部に空きがないとき)は識別番号が発行されないので、後者の場合にインターリーブユニット23がマイクロコマンドを生成することがないように制御される。
【0075】
インターリーブユニット23が識別番号の獲得に成功すると、メモリアクセスコマンドに識別番号の割り当てが可能になり、マイクロコマンドが生成可能になる。マイクロコマンドが一つ生成されるごとに、当該識別番号に対応するマイクロカウンタ262がインクリメントされる。また、メモリアクセスコマンドに識別番号が割り当てられたときには、プロセッサ番号保持部263にメモリアクセスコマンドを発行したプロセッサ1のプロセッサ番号がセットされ、後に当該メモリアクセスコマンドが終了したとき、このプロセッサ番号が通知のために使用される。
【0076】
インターリーブユニット23から生成されるマイクロコマンドは、獲得された識別番号が付与されている。バンクキュー24から出てメモリから応答が返ってくると、この識別番号によってマイクロカウンタ262が選択され、選択されたマイクロカウンタ262がデクリメントされる。すなわち、マイクロカウンタ262は、対応するメモリアクセスコマンドについて、マイクロコマンドが生成されるとインクリメントされ、マイクロコマンドが終了するとデクリメントされることにより、メモリアクセスコマンドの終了を知ることができる。
【0077】
マイクロカウンタ262のカウント値が0になったとき、デコーダ(Decoder_A)261が、対応するプロセッサ番号を同期コントローラ27に通知する。
【0078】
図9に、終了コントローラ26における処理手順の一例を示す。
【0079】
終了コントローラ26は、マイクロコマンドが発生されたかおよび終了されたか(イベントの発生)をチェックしている(ステップS31)。
【0080】
マイクロコマンドが生成された場合には(ステップS32)、該マイクロコマンドに割り当てられた識別子に対応するマイクロカウンタ262をインクリメントし(ステップS33)、ステップS31に戻り、処理を続ける。
【0081】
マイクロコマンドが終了された場合には(ステップS32)、該マイクロコマンドに割り当てられた識別子に対応するマイクロカウンタ262をデクリメントする(ステップS34)。そして、該マイクロカウンタ262が0になったならば、該マイクロカウンタ262に対応するプロセッサ番号保持部263に保持されているプロセッサ番号に対応する1つのメモリアクセスコマンドが終了した旨を同期コントローラ27へ通知する(ステップS36)。また、該識別番号を解放し、該識別番号及び対応するマイクロカウンタ262/プロセッサ番号保持部263を未使用の状態する(ステップS36)。そして、ステップS31に戻り、処理を続ける。
【0082】
以上のように本実施形態によれば、メモリアクセスをバンクアクセスにインターリーブし、インターリーブしたアクセスがメモリアクセスの順序に従わず効率良いアクセスをしながら、必要に応じてメモリアクセスが終了したことを知ることができる。
【0083】
なお、本実施形態では、マルチプロセッサシステムを例に説明したが、マルチスレッドプロセッサシステム(図1のプロセッサをスレッド(ハードウェアスレッド)にしたものに相当)に対するメモリコントローラに本発明を適用したものは、基本的には、これまで説明したものと同様である(説明において、プロセッサをスレッドに読み替えればよい)。
【0084】
なお、この発明の実施の形態で例示した構成は一例であって、それ以外の構成を排除する趣旨のものではなく、例示した構成の一部を他のもので置き換えたり、例示した構成の一部を省いたり、例示した構成に別の機能あるいは要素を付加したり、それらを組み合わせたりすることなどによって得られる別の構成も可能である。また、例示した構成と論理的に等価な別の構成、例示した構成と論理的に等価な部分を含む別の構成、例示した構成の要部と論理的に等価な別の構成なども可能である。また、例示した構成と同一もしくは類似の目的を達成する別の構成、例示した構成と同一もしくは類似の効果を奏する別の構成なども可能である。
また、この発明の実施の形態で例示した各種構成部分についての各種バリエーションは、適宜組み合わせて実施することが可能である。
また、この発明の実施の形態は、個別装置としての発明、関連を持つ2以上の装置についての発明、システム全体としての発明、個別装置内部の構成部分についての発明、またはそれらに対応する方法の発明等、種々の観点、段階、概念またはカテゴリに係る発明を包含・内在するものである。
従って、この発明の実施の形態に開示した内容からは、例示した構成に限定されることなく発明を抽出することができるものである。
【0085】
本発明は、上述した実施の形態に限定されるものではなく、その技術的範囲において種々変形して実施することができる。
【0086】
【発明の効果】
本発明によれば、効率良いマルチバンクアクセスを実現するとともに、必要に応じてメモリアクセスコマンドの終了を検知することが可能になる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係るマルチプロセッサシステムの構成例を示す図
【図2】バンクとメモリとの関係について説明するための図
【図3】同実施形態に係るメモリコントローラの構成例を示す図
【図4】同実施形態に係るインターリーブユニットの処理手順の一例を示すフローチャート
【図5】同実施形態に係る同期コントローラの構成例を示す図
【図6】同実施形態に係る同期コントローラの第1の処理手順の一例を示すフローチャート
【図7】同実施形態に係る同期コントローラの第2の処理手順の一例を示すフローチャート
【図8】同実施形態に係る終了コントローラの構成例を示す図
【図9】同実施形態に係る終了コントローラの処理手順の一例を示すフローチャート
【符号の説明】
1…プロセッサ
2…メモリコントローラ
3…バス
4…メモリバンク
21…バスインタフェース
22…コマンドキュー
23…インターリーブユニット
24…バンクキュー
25…データバッファ
26…終了コントローラ
27…同期コントローラ
261…第1のコーダ
262…マイクロカウンタ
263…プロセッサ番号保持部
264…第2のデコーダ
271…アウトプットデコーダ
272…同期カウンタ
273…同期ビット
274…インプットデコーダ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a multi-bank access control apparatus and a multi-bank access control method for controlling access to a plurality of memory banks accessed in common by a plurality of processors or a plurality of threads.
[0002]
[Prior art]
In a multiprocessor system, a memory accessed from a plurality of processors generally accesses a plurality of banks simultaneously for speeding up. For example, when a memory is accessed from a certain processor, the access from the processor is divided into accesses to each bank, and each bank is accessed independently. Access from the processor may access relatively short data such as a cache miss, or may access relatively long data using DMA or the like. Banks are generally assigned by addresses in such a manner that consecutive addresses are accessed across a plurality of banks and interleaved so that the bandwidth can be increased.
[0003]
[Problems to be solved by the invention]
When a plurality of memory accesses are generated from each processor, a bank conflicts with a request from another processor, so that the memory access order does not necessarily end in the order issued by the processor. However, if there is no way to know that the memory access is completed, an instruction using the result of these memory accesses cannot be executed.
[0004]
Therefore, there is a method of restricting the execution of memory access so that the memory access always ends in the issue order. However, this method has a problem that the processing efficiency of the memory access itself is lowered and the performance of the processor is lowered. It was.
[0005]
In order not to limit, it is necessary to detect the end of all memory accesses by generating an interrupt, for example, when the bank access ends. However, even in the method using this interrupt, an interrupt is generated every time each memory access is completed, so that there is a problem that the performance of the processor is lowered.
[0006]
The present invention has been made in view of the above circumstances, and implements an efficient multi-bank access and a multi-bank access control device and a multi-bank capable of detecting the end of a memory access command as required An object is to provide an access control method.
[0007]
[Means for Solving the Problems]
  The present invention is a multi-bank access control device that performs access control to a plurality of memory banks that are accessed in common by a plurality of processors, and is provided one by one for each of the plurality of processors. First storage means for storing commands related to issued bank accesses, and second storage means for storing microcommands for the corresponding memory banks provided one by one corresponding to the plurality of memory banks. And subdividing the memory access command stored in the first storage means into one or a plurality of microcommands for accessing the memory bank according to the contents, and subdividing each microcommand, It issues to the second storage means corresponding to the memory bank to be accessed Control means, first detection means for detecting the end of each of the memory access commands by managing issuance and termination of the microcommand corresponding to the memory access command, and detection by the first detection means Based on the result, it is detected whether or not all the memory access commands issued prior to the synchronization command by the processor that has issued the synchronization command fetched from the first storage means to the control means have been completed. With second detection meansThe second detection means is provided in a set corresponding to a plurality of the processors, and the number of the memory access commands issued from the corresponding processors and fetched into the control means but not yet finished. And a flag indicating the presence / absence of a synchronization command issued from the corresponding processor and fetched into the control means but not yet finished, and when the memory access command is fetched into the control means The counter corresponding to the processor that issued the memory access command is incremented, and when the end of the memory access command is detected by the first detection means, the memory access command is issued. The counter is decremented and the sync command is When incorporated into the control means, when said counter corresponding to the processor that issued the synchronous command is not the initial state, child in a state indicating that the synchronization command has not been completed the corresponding said flag still existsAnd features.
[0008]
Preferably, the control means obtains identification information to be assigned to the memory access command prior to subdividing the memory access command into the microcommand, and the subdivided microcommand is converted into the second microcommand. When issuing to the storage means, the identification information assigned to the memory access command that is the source of the microcommand is added to the microcommand, and the first detection means adds the identification information added to the microcommand. The end of the memory access command to which the identification information is assigned may be detected by managing the issuance and termination of the microcommand based on
[0010]
  Further, the present invention is a multi-bank access control device that performs access control to a plurality of memory banks that are commonly accessed from a plurality of threads, and is provided one by one corresponding to the plurality of threads, A first accumulator for accumulating commands related to bank access issued by a thread; and a second accumulator provided for each of the plurality of memory banks and for accumulating microcommands for the corresponding memory banks. The memory access command stored in the storage means and the first storage means is subdivided into one or a plurality of microcommands for accessing the memory bank according to the contents, and each microcommand subdivided Is issued to the second storage means corresponding to the memory bank to be accessed Control means, first detection means for detecting the end of each of the memory access commands by managing issuance and termination of the microcommand corresponding to the memory access command, and detection by the first detection means Based on the result, it is detected whether or not all the memory access commands issued prior to the synchronization command by the thread that issued the synchronization command fetched from the first storage unit to the control unit have ended. With second detection meansThe second detection means is provided for each of the plurality of threads, and the number of the memory access commands issued from the corresponding thread and taken into the control means but not yet finished. And a flag indicating the presence / absence of a synchronization command issued from the corresponding thread and fetched into the control means but not yet terminated, and when the memory access command is fetched into the control means The counter corresponding to the thread that issued the memory access command is incremented, and when the end of the memory access command is detected by the first detection means, the memory access command is issued. Decrementing the counter, the synchronization command is the control means When incorporated, when the counter corresponding to the thread that issued the synchronous command is not the initial state, child in a state indicating that the synchronization corresponding the flag is not yet completed command existsAnd features.
[0011]
  The present invention is also a multi-bank access control method for controlling access to a plurality of memory banks accessed in common by a plurality of processors, and when a command related to bank access is issued from the processor, The command is stored in the first storage means corresponding to the processorSteps to do, Control meansButA command stored from any one of the first storage means corresponding to the plurality of processors is fetched, and if the command is a memory access command, the memory access command is The memory bank is subdivided into one or a plurality of microcommands to be accessed, and each subdivided microcommand corresponds to the memory bank to be accessed.FirstIssued to 2 storage meansSteps to do,First1 detection meansButDetecting the end of the memory access command by detecting the issuance and termination of the microcommand corresponding to the memory access commandFirst 1 Detection step and,First2 detection meansButThe memory access command issued prior to the synchronization command by the processor that has issued the synchronization command fetched from the second storage means to the control means based on the detection result by the first detection means is: Check if everything is finishedA second detection step to issue,
  The second detection means is provided in a set corresponding to a plurality of the processors, and holds the number of the memory access commands issued from the corresponding processors and fetched into the control means but not yet finished. And a flag indicating the presence / absence of a synchronization command issued from the corresponding processor and fetched into the control means but not yet finished, and the second detection means in the second detection step When the memory access command is fetched by the control means, the counter corresponding to the processor that issued the memory access command is incremented, and the end of the memory access command is detected by the first detection means. To the processor that issued the memory access command When the counter corresponding to the processor that issued the synchronization command is not in an initial state when the corresponding counter is decremented and the synchronization command is fetched into the control means, the corresponding flag has not been terminated yet. State that there are no sync commandsIt is characterized by that.
[0012]
The present invention relating to the apparatus is also established as an invention relating to a method, and the present invention relating to a method is also established as an invention relating to an apparatus.
[0013]
In the present invention, the end of the memory access command is detected by managing the issuance / end of the microcommand corresponding to the memory access command, and the number of unfinished memory access commands for each processor (thread). By managing the presence / absence of unsynchronized synchronization commands, it is detected whether or not all the memory access commands issued prior to the synchronization command by the processor that issued the synchronization command have been completed. This makes it possible to guarantee the order relationship between the memory access and the command that uses the memory access. As a result, the performance of the processor can be improved.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the invention will be described with reference to the drawings.
[0015]
In this embodiment, a multiprocessor system will be described as an example, but the present invention is also applied to a multithread processor system (for example, a system having a plurality of DMA controllers controlled by a plurality of threads) instead of a plurality of processors. Is possible.
[0016]
In the present embodiment, when there are a plurality of memory access commands from the processor, a synchronization command (SYNC command) that can execute a subsequent command (instruction) only when the memory access is completed is introduced. In order to realize this synchronization command, a synchronization counter for synchronization is provided for each processor. The synchronization counter is incremented when a memory access command is issued, and is decremented when a corresponding response is returned to 0. Then the processor is controlled so that the synchronization command can be passed. Therefore, when there are a plurality of memory access commands from the processor, the order relationship between the memory access and the instruction (following command) using the memory access is ensured without using interrupt processing for all the commands as in the prior art. Will be able to. As a result, the performance of the processor can be improved.
[0017]
FIG. 1 shows a configuration example of a multiprocessor system according to an embodiment of the present invention. As shown in FIG. 1, in the multiprocessor system of this embodiment, m (m is a plurality, FIG. 1 is an example where m = 4) processors (Processors) 1 and memory controllers (Memory Controllers) 2 are provided. The memory controller 2 controls the access to n memory banks 4 (where n is a plurality and n = 4 in FIG. 1).
[0018]
In the example of FIG. 1, the number of processors and the number of banks are the same, but of course, the number of processors and the number of banks may be different.
[0019]
Further, the memory bank and the real memory (for example, a memory chip or a memory unit) may have any relationship. For example, as illustrated in FIG. 2A, all the banks may correspond to one obtained by dividing one memory into a plurality of areas, or as illustrated in FIG. One bank may correspond to one obtained by dividing one memory into a plurality of areas, or one bank may correspond to a plurality of memories as illustrated in FIG. May be. Further, the correspondence relationship between the bank and the memory may be different for each bank or each memory.
[0020]
FIG. 3 shows a configuration example of the memory controller 2 according to an embodiment of the present invention. As shown in FIG. 3, the memory controller 2 of this embodiment includes a bus interface (bus interface) 21 and m pieces provided corresponding to each processor 1 (m is a plurality, FIG. 3 is an example of m = 4). Command queue 22, interleave unit 23, and n (n is a plurality, FIG. 3 shows an example of n = 4) bank queue 24 provided corresponding to each memory bank 2. A data buffer 25, a completion controller 26, and a synchronization controller 27.
[0021]
The command queues (0) to (3) in FIG. 3 correspond to the processors (0) to (3) in FIG. 1, respectively. Also, the bank queues (0) to (3) in FIG. 3 correspond to the memory banks (0) to (3) in FIG. 1, respectively.
[0022]
A memory access command from each processor 1 is input to the command queue 22 corresponding to the processor via the bus interface 21. In the example of FIGS. 1 and 3, the memory access command from the processor (0) is input to the command queue (0) corresponding to the processor (0). Similarly, memory access commands from the processors (1) to (3) are input to the corresponding command queues (1) to (3), respectively.
[0023]
A synchronization command from each processor (i) is also placed in the command queue (i) corresponding to the processor (i).
[0024]
Within each command queue 22, commands are held in the order issued by the processor 1, and are taken into the interleave unit 23 in that order (that is, FIFO).
[0025]
The interleave unit 23 selects one command queue 22 and fetches the head command, and performs a process corresponding to the command depending on whether the command is a memory access command or a synchronization command. For example, the command queue 22 may be sequentially selected in a round-robin manner (the empty command queue 22 is skipped). Also, for example, other methods such as a method of giving priority to the command queue 22 and preferentially selecting the command queue 22 from a higher priority, or a method of selecting at random are also possible.
[0026]
The interleave unit 23 first selects a command queue 22 as a candidate. If the command is held in the command queue 22, the interleave unit 23 takes the head command, and if the command is held in the command queue 22. The procedure may be to select the next candidate, or first, the command queue 22 that holds the command is examined (this is an inquiry about whether the command is held in the command queue 22 and a response is received) It may be an active form or a passive form such as receiving a notification from the command queue 22 holding the command), and one of them is selected and the head command is selected. The procedure of importing may be used, and other methods are also possible.
[0027]
The interleave unit 23 functions to subdivide the memory access command issued from each processor 1 into commands (microcommands) divided into banks (note that some microcommands are not Whether it is generated depends on the memory access command (it may be one).
[0028]
However, in this embodiment, an identification number (described later) assigned to each memory access command is assigned to all microcommands belonging to one memory access command, and each memory access command to which the microcommand belongs is specified. Since the number has an upper limit, the memory access command can be subdivided into microcommands only when there is a free identification number. The identification number is given from the termination controller 26 (for example, the identification number is requested from the termination controller 26, and if there is a vacancy, the identification number is returned, and if there is no vacancy, this is returned).
[0029]
The generated microcommand is issued to the bank queue 24 corresponding to the memory bank 4 to be accessed by the microcommand.
[0030]
For example, in the example of FIG. 1 and FIG. 3, when adopting a configuration that supports 128-byte continuous access in one bank, 4096 bytes of “memory addresses“ 0x1000 ”to“ 0x1fff ”” from the processor (1). Is transferred to the processor (1) ", 4096/128 = 32 microcommands are issued. The 32 microcommands are issued to the corresponding bank queue 24 in order to access one assigned bank (for example, eight each in the bank queues (0) to (3)). Microcommands can be entered).
[0031]
In each bank queue 24, the microcommand is held by the issued issue and is issued to the memory bank 4 in that order (ie, FIFO).
[0032]
In each bank queue 24, not only microcommands belonging to different memory access commands issued by the same processor 1 can be mixed, but also microcommands belonging to memory access commands issued by different processors 1 can be mixed. .
[0033]
By the way, although various methods are possible for address allocation, for example, in the above example, access is made from a plurality of banks with consecutive addresses, and bank interleaving is performed as an example in order to exhibit throughput. The following address assignment can be considered. Assuming that 128 bytes of data are supported in one bank access, 7 bits from the 0th bit to the 6th bit of the address are offset in 128 bytes (which one byte in 128 bytes) 8 bits and 7 bits indicate which bank of the four banks, 23 bits from 9th bit to 31st bit indicate which 128 bytes in the bank. Yes. In this example, the 2nd bit of the 8th bit and the 7th bit is referred to for selecting the corresponding bank queue 24 when the microcommand is input from the interleave unit 23 to the bank queue 24, and from the 9th bit. The 31th bit, 23 bits, is referred to select the corresponding 128 bytes in the memory bank during the actual bank access (in this example, 7 bits from the 0th bit to the 6th bit are Field used in the processor).
[0034]
The microcommand issued from the bank queue 24 to the corresponding memory bank 4 accesses the memory bank 4, and at the time of read access, the data at the corresponding address is written from the memory bank 4 to the data buffer 25, At the time of write access, data to be written is written from the data buffer 25 to the memory bank 4. The data buffer 25 exchanges data with the bus and the processor 1 via the bus interface 21.
[0035]
For reading from the memory bank 4, when a command is issued from the command queue 22 to the interleave unit 23, the processor number of the corresponding processor 1 is attached to the command. When a microcommand is issued from the interleave unit 23 to the bank queue 24, the processor number of the corresponding processor 1 and an identification number corresponding to the memory access command to which the microcommand is attached are attached to the microcommand. Further, when a response (for example, 128-byte data) from the memory bank 4 is returned from the data buffer 25, the processor number of the corresponding processor 1 and the responding address are added to the data, and which packet is sent on the processor side. Can be identified.
[0036]
As for the write to the memory bank 4, when a command is issued from the command queue 22 to the interleave unit 23 as described above, the processor number of the corresponding processor 1 is attached to the command, and the interleave unit 23 sends the bank queue to the command. When a microcommand is issued to 24, the processor number and identification number of the corresponding processor 1 are attached to the microcommand. When a microcommand is issued from the interleave unit 23 to the bank queue 24, the processor number and address of the corresponding processor 1 are sent to the bus 3 via the bus interface 21 as a write request, and the corresponding processor 1 sends data to be written to the bus 3. The data to be written is input to the data buffer 25 via the bus interface 21.
[0037]
The timing at which each processor 1 sends data is set at a time when the processor 1 sends a command, for example. Also, for example, there is a method of setting a time when a microcommand is issued from the interleave unit 23 to the bank queue 24. The latter method can reduce the memory capacity of the data buffer 25 as compared with the former method.
[0038]
When a write command is issued from the bank queue 24 to each memory bank 4, the corresponding data is output from the data buffer 25.
[0039]
The data buffer 25 is preferably provided with a write buffer corresponding to the bank queue 24.
[0040]
FIG. 4 shows an example of the processing procedure of the interleave unit 23.
[0041]
The interleave unit 23 checks whether there is a non-empty command queue 22 (step S1).
[0042]
If there is a non-empty command queue 22 (step S1), one non-empty command queue 22 is selected (step S2).
[0043]
If the command held at the head of the selected command queue 22 is a synchronous command (step S3), the synchronous counter is notified (step S4), the process returns to step S1, and the processing is continued.
[0044]
If the command held at the head of the selected command queue 22 is a memory access command (step S3), if there is no empty identification number assigned to the memory access command (step S5), the process returns to step S1 and processed. Continue.
[0045]
If there is a free identification number assigned to the memory access command (step S5), the head command of the selected command queue 22 is taken out (step S6). Then, based on the extracted memory access command, a microcommand is generated, and the generated microcommand is put into the corresponding bank queue 24 (step S7). In addition, the synchronous controller 27 is notified of the memory access command (step S7). In addition, the end controller 26 is notified of the microcommand generated from the memory access command (step S7). And it returns to step S1 and continues a process.
[0046]
As described above, the memory access command from the processor 1 is broken down into a plurality of microcommands. In this embodiment, in order to detect the end of each memory access command from each processor 1, the end controller 26 that manages the generation / end of all microcommands belonging to the memory access command and all the synchronization commands. A synchronization controller 27 is provided for detecting the end of the memory access command and notifying the corresponding processor 1 that the synchronization command is completed and can be passed.
[0047]
First, the synchronization controller 27 will be described.
[0048]
FIG. 5 shows a configuration example of the synchronization controller 27 of the present embodiment. As shown in FIG. 5, the synchronization controller 27 includes output decoders (Output Decoders) 271 and m (m is plural, FIG. 5 is an example of m = 4) provided corresponding to each processor 1. A counter (SYNC Counter) 272, a synchronization bit (SYNC Bit) 273, and an input decoder (Input Decoder) 274 are included.
[0049]
The synchronization counters (0) to (3) in FIG. 5 correspond to the processors (0) to (3) in FIG. 1, respectively. Also, the synchronization bits (0) to (3) in FIG. 5 correspond to the processors (0) to (3) in FIG. 1, respectively.
[0050]
Here, the synchronization counter (0) and the synchronization bit (0) in FIG. 3 corresponding to the processor (0) in FIG. 1 will be described as an example.
[0051]
In the synchronous controller 27, when one memory access command from the processor (0) is newly notified from the interleave unit 23, the synchronous counter (0) corresponding to the processor (0) of the synchronous controller 27 is incremented. The When the end controller 26 detects the end of one memory access command from the processor (0), the synchronous counter (0) is decremented.
[0052]
On the other hand, when the synchronization command enters the interleave unit 23, the synchronization bit (0) is set (for example, becomes 1).
[0053]
The notification to the corresponding processor 1 that all the memory access commands preceding the synchronization command have been completed (that is, that the synchronization command has been completed) is performed under the following conditions.
When the counter value of the synchronization counter (0) is 0 and a synchronization command is output from the command queue (0) to the interleave unit 23, all memory access commands corresponding to the synchronization command are sent to the processor (0). Notify that it has finished. At this time, the synchronization bit (0) is not set (Note that it may be set once and immediately detected that the notification condition is met and reset immediately).
When the value of the synchronization counter (0) becomes 0 when the synchronization bit (0) is 1 (when the memory access command is completed), the memory access command corresponding to the synchronization command is sent to the processor (0). Is completed, and the synchronization bit (0) is reset (for example, set to 0).
When the synchronization bit (0) is 0 (when the memory access command is completed) and the value of the synchronization counter (0) becomes 0, the processor is not notified.
[0054]
The processor (0) has been described above as an example, but the same applies to other processors.
[0055]
By the way, there are various methods for handling the synchronization command on the processor 1 side. For example, when the processor 1 sends the synchronization command to the memory controller 2 (command queue 22 thereof), the processor 1 enters a busy wait state. The busy wait state may be canceled when a response to the end of the synchronization command is returned from the memory controller 2 (the synchronization controller 27). Further, for example, an interrupt may be used for the end of the synchronous command (in the past, it was necessary to use an interrupt for all commands, but in the present embodiment, an interrupt may be used only for the synchronous command). .
In the case of a multi-thread processor, threads may be switched using a synchronization command. In this case, for example, the thread that executed the synchronous command is saved, and when the response of the synchronous command end is returned from the synchronous controller, the thread that executed the synchronous command corresponding to the response is restored (or can be restored). ).
[0056]
For example, assume that the program executed by the processor (0) is as follows.
:
DMA command 1
DMA command 2
Synchronous command
DMA command 3
:
In this example, in order to execute the DMA command 3 after both the DMA command 1 and the DMA command 2 are completed, a synchronization command is described between the DMA command 1 and the DMA command 2 and the DMA command 3. In this case, after the DMA command 1 and the DMA command 2 are ended (and the synchronization command is issued), the memory controller 2 notifies the corresponding processor 1 of the end of the synchronization command.
[0057]
In the processor 1 that has received the notification, for example, the busy wait state is canceled and the DMA command 3 is executed.
[0058]
In the case of a multi-thread processor, the thread that executed the synchronization command can be restored, and after the restoration, the DMA command 3 is executed.
[0059]
FIG. 6 shows an example of a processing procedure for the synchronization counter 272 or the synchronization bit 273 when the notification in the synchronization controller 27 is received.
[0060]
The synchronous controller 27 checks whether there is a notification from the interleave unit 23 or the end controller 26 (step S11).
[0061]
When there is a notification (step S11), if the notification is a notification of issuance of a memory access command from the interleave unit 23 (step S12), the synchronization counter 272 corresponding to the processor 1 related to the notification is incremented ( Step S13), returning to step S11, the processing is continued.
[0062]
If the notification is a notification of the end of the memory access command from the end controller 26 (step S12), the synchronization counter 272 corresponding to the processor 1 related to the notification is decremented (step S14), and the process returns to step S11 to perform the processing. to continue.
[0063]
When the notification is a notification of a synchronization command from the interleave unit 23 (step S12), if the value of the synchronization counter 272 corresponding to the processor 1 related to the notification is 1 or more (step S15), the processor 1 related to the notification is notified. The corresponding synchronization flag 273 is set (step S16), the process returns to step S11, and the processing is continued. If the value of the corresponding synchronization counter is 0 (step S15), the corresponding synchronization flag 273 is not set and the process returns to step S11 to continue the processing.
[0064]
FIG. 7 shows an example of a processing procedure regarding notification from the synchronous controller 27 to the processor.
[0065]
The synchronization controller 27 checks whether the state of the synchronization counter 272 or the synchronization bit 273 has changed and whether a notification of a synchronization command has been received (occurrence of an event) (step S21).
[0066]
If the value of the synchronization counter 272 corresponding to a certain processor 1 is 0 and if a synchronization command notification is received from the processor 1 (step S22), the processor 1 is notified (step S23), Returning to step S21, the processing is continued.
[0067]
If the synchronization counter corresponding to a certain processor 1 is set and the synchronization counter corresponding to the processor 1 becomes 0 (step S24), the processor 1 is notified and the synchronization bit is set. 273 is reset (step S23), and the process returns to step S21 to continue the processing.
[0068]
If it is another event, nothing is done (return to step S21 and continue the process).
[0069]
In FIG. 6, when the notification of the synchronization command is made in step S <b> 12, the corresponding synchronization flag 273 may be set regardless of the value of the corresponding synchronization counter 272. In this case, in steps S22 / S23 of FIG. 7, if the corresponding synchronization flag 273 is set when the value of the synchronization counter 272 corresponding to a certain processor 1 is 0 (step S22), the process goes to the processor 1. The synchronization bit 273 may be reset (in this case, in step S21, it is checked whether the state of the synchronization counter 272 or the synchronization bit 273 has changed, and the notification of the synchronization command is received). Do not check).
[0070]
Next, the end controller 26 will be described.
[0071]
In the interleave unit 23, the memory access command is decomposed into micro commands, and the micro commands from the plurality of processors 1 compete in the bank queue 24. Therefore, the end order of the micro commands is generally the issue order from the interleave unit 23. Will be different (and may be the same as a result). In the end controller 26, when all the plurality of microcommands corresponding to one memory access command are ended, the synchronization controller 27 is notified that the one memory access command is ended.
[0072]
FIG. 8 shows a configuration example of the end controller 26 of the present embodiment. As shown in FIG. 8, the end controller 26 includes a first decoder (Decoder_A) 261, k (k is plural, K = 6 in the example of FIG. 8) microcounter 262, and processor number holding. Part (Proc Num) 263 and a second decoder (Decoder_B) 264.
[0073]
First, when the memory access command is decomposed into microcommands by the interleave unit 23, the decoder (Decoder_A) 261 issues an identification number. The identification number is uniquely assigned to each microcounter / processor number holding unit in FIG. 8, for example, microcounter (0) / processor number holding unit (0) to microcounter (5) / processor number holding. Identification numbers 0 to 5 are assigned to the respective groups of the part (5). The number of pairs of microcounter / processor number holding units (the maximum number of identification numbers that can be issued) does not necessarily need to match the number of processors (may match the number of processors).
[0074]
The identification number is issued when the corresponding microcounter / processor number holding unit is empty, but when the identification number is empty (when the microcounter / processor number holding unit is empty), the identification number is issued. In the latter case, the interleave unit 23 is controlled so as not to generate a microcommand.
[0075]
When the interleave unit 23 successfully acquires the identification number, the identification number can be assigned to the memory access command, and the microcommand can be generated. Each time one microcommand is generated, the microcounter 262 corresponding to the identification number is incremented. Further, when an identification number is assigned to the memory access command, the processor number of the processor 1 that issued the memory access command is set in the processor number holding unit 263, and this processor number is notified when the memory access command ends later. Used for.
[0076]
Acquired identification numbers are assigned to the microcommands generated from the interleave unit 23. When a response is returned from the memory out of the bank queue 24, the microcounter 262 is selected by this identification number, and the selected microcounter 262 is decremented. In other words, the micro counter 262 is incremented when the micro command is generated for the corresponding memory access command, and is decremented when the micro command is completed, so that the end of the memory access command can be known.
[0077]
When the count value of the micro counter 262 reaches 0, the decoder (Decoder_A) 261 notifies the synchronous controller 27 of the corresponding processor number.
[0078]
FIG. 9 shows an example of a processing procedure in the end controller 26.
[0079]
The end controller 26 checks whether the microcommand has been generated and ended (occurrence of an event) (step S31).
[0080]
If a microcommand is generated (step S32), the microcounter 262 corresponding to the identifier assigned to the microcommand is incremented (step S33), the process returns to step S31, and the processing is continued.
[0081]
When the microcommand is terminated (step S32), the microcounter 262 corresponding to the identifier assigned to the microcommand is decremented (step S34). If the microcounter 262 reaches 0, the synchronous controller 27 is notified that one memory access command corresponding to the processor number held in the processor number holding unit 263 corresponding to the microcounter 262 has ended. Notification is made (step S36). Further, the identification number is released, and the identification number and the corresponding microcounter 262 / processor number holding unit 263 are unused (step S36). And it returns to step S31 and continues a process.
[0082]
As described above, according to the present embodiment, the memory access is interleaved with the bank access, and the interleaved access is efficiently accessed without following the order of the memory access, and the memory access is completed as necessary. be able to.
[0083]
In this embodiment, the multiprocessor system is described as an example. However, the present invention is applied to a memory controller for a multithread processor system (corresponding to a thread (hardware thread) of the processor in FIG. 1). Basically, it is the same as that described so far (in the description, the processor may be read as a thread).
[0084]
Note that the configuration illustrated in the embodiment of the present invention is an example, and is not intended to exclude other configurations, and a part of the illustrated configuration may be replaced with another or one of the illustrated configurations. Other configurations obtained by omitting a part, adding another function or element to the illustrated configuration, or combining them are also possible. Also, another configuration that is logically equivalent to the exemplified configuration, another configuration that includes a portion that is logically equivalent to the exemplified configuration, another configuration that is logically equivalent to the main part of the illustrated configuration, and the like are possible. is there. Further, another configuration that achieves the same or similar purpose as the illustrated configuration, another configuration that achieves the same or similar effect as the illustrated configuration, and the like are possible.
In addition, various variations of various components illustrated in the embodiment of the present invention can be implemented in appropriate combination.
Further, the embodiment of the present invention is an invention of an invention as an individual device, an invention of two or more related devices, an invention of the entire system, an invention of components within an individual device, or a method corresponding thereto. The invention includes inventions according to various viewpoints, stages, concepts, or categories.
Therefore, the present invention can be extracted from the contents disclosed in the embodiments of the present invention without being limited to the exemplified configuration.
[0085]
The present invention is not limited to the embodiment described above, and can be implemented with various modifications within the technical scope thereof.
[0086]
【The invention's effect】
According to the present invention, it is possible to realize efficient multi-bank access and to detect the end of a memory access command as necessary.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration example of a multiprocessor system according to an embodiment of the present invention.
FIG. 2 is a diagram for explaining the relationship between banks and memories;
FIG. 3 is a view showing a configuration example of a memory controller according to the embodiment;
FIG. 4 is a flowchart showing an example of a processing procedure of an interleave unit according to the embodiment.
FIG. 5 is a view showing a configuration example of a synchronous controller according to the embodiment;
FIG. 6 is a flowchart showing an example of a first processing procedure of the synchronous controller according to the embodiment;
FIG. 7 is a flowchart showing an example of a second processing procedure of the synchronous controller according to the embodiment;
FIG. 8 is a view showing a configuration example of an end controller according to the embodiment;
FIG. 9 is a flowchart showing an example of a processing procedure of the end controller according to the embodiment;
[Explanation of symbols]
1 ... Processor
2 ... Memory controller
3 ... Bus
4 ... Memory bank
21 ... Bus interface
22 ... Command queue
23 ... Interleave unit
24 ... Bank Queue
25 ... Data buffer
26: End controller
27 ... Synchronous controller
261: First coder
262 ... Micro counter
263: Processor number holding unit
H.264 second decoder
271: Output decoder
272 ... Synchronous counter
273 ... Synchronization bit
274 ... Input decoder

Claims (11)

複数のプロセッサから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御装置であって、
複数の前記プロセッサに対応して1つずつ設けられ、対応する前記プロセッサから発行されたバンクアクセスに関係するコマンドを蓄積する第1の蓄積手段と、
複数の前記メモリバンクに対応して1つずつ設けられ、対応する前記メモリバンクに対するマイクロコマンドを蓄積する第2の蓄積手段と、
前記第1の蓄積手段に蓄積されたメモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する前記第2の蓄積手段へ発行する制御手段と、
前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を管理することによって、各々の前記メモリアクセスコマンドの終了を検出する第1の検出手段と、
前記第1の検出手段による検出結果に基づいて、前記第1の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記プロセッサが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出手段とを備え、
前記第2の検出手段は、
複数の前記プロセッサに対応して1組ずつ設けられ、対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含み、
前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記プロセッサに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とするマルチバンクアクセス制御装置。
A multi-bank access control device that performs access control to a plurality of memory banks accessed in common by a plurality of processors,
A first storage unit that is provided one by one for each of the plurality of processors, and stores a command related to bank access issued from the corresponding processor;
A second storage unit that is provided one by one corresponding to the plurality of memory banks, and stores microcommands for the corresponding memory banks;
The memory access command stored in the first storage means is subdivided into one or a plurality of microcommands for accessing the memory bank according to the contents, and each subdivided microcommand is Control means for issuing to the second storage means corresponding to the memory bank to be accessed;
First detecting means for detecting the end of each memory access command by managing the issuance and termination of the microcommand corresponding to the memory access command;
Based on the detection result by the first detection means, all the memory access commands issued prior to the synchronization command by the processor that issued the synchronization command fetched from the first storage means to the control means are all Second detecting means for detecting whether or not the processing has ended,
The second detection means includes
A counter provided for each of the plurality of processors, a counter for holding the number of memory access commands issued from the corresponding processor and fetched into the control means but not yet completed, and the corresponding processor Including a flag indicating the presence or absence of a synchronization command issued from and taken into the control means but not yet terminated,
When the memory access command is taken into the control means, the counter corresponding to the processor that issued the memory access command is incremented, and the end of the memory access command is detected by the first detection means The counter corresponding to the processor that issued the memory access command is decremented, and the counter corresponding to the processor that issued the synchronization command is initialized when the counter is fetched by the control means. when not in state, corresponding the flag yet completed have no synchronization command, wherein the to luma Ruchi bank access controller to the state indicating that there is.
前記未だ終了していない同期コマンドが有ることを示す状態にあるフラグに対応する前記カウンタがデクリメントされて初期状態になった場合には、該カウンタ及び該フラグに対応する前記プロセッサに対して当該同期コマンドに先行して発行されメモリアクセスコマンドが全て終了した旨を通知することを特徴とする請求項に記載のマルチバンクアクセス制御装置。When the counter corresponding to the flag in a state indicating that there is an unfinished synchronization command is decremented to an initial state, the synchronization is performed with respect to the counter and the processor corresponding to the flag. multi-bank access control apparatus according to claim 1, prior to the command issued memory access command and notifies that it has completed. 前記同期コマンドが前記制御手段に取り込まれたときに、該同期コマンドを発行した前記プロセッサに対応する前記カウンタが初期状態であった場合に、該カウンタ及び該フラグに対応する前記プロセッサに対して当該同期コマンドに先行して発行されメモリアクセスコマンドが全て終了した旨を通知することを特徴とする請求項に記載のマルチバンクアクセス制御装置。If the counter corresponding to the processor that issued the synchronization command is in an initial state when the synchronization command is taken into the control unit, the counter and the processor corresponding to the flag multi-bank access control apparatus according to claim 1, synchronization commands in prior to the issued memory access command and notifies that it has completed. 前記未だ終了していない同期コマンドが無いことを示す状態にあるフラグに対応する前記カウンタがデクリメントされて初期状態になった場合には、該カウンタ及び該フラグに対応する前記プロセッサに対して前記通知は行わないことを特徴とする請求項に記載のマルチバンクアクセス制御装置。When the counter corresponding to the flag in a state indicating that there is no synchronization command that has not been completed has been decremented to the initial state, the notification to the counter and the processor corresponding to the flag is performed. 2. The multi-bank access control device according to claim 1 , wherein the multi-bank access control device is not performed. 前記制御手段は、前記メモリアクセスコマンドを前記マイクロコマンドに細分化するのに先立って、該メモリアクセスコマンドに割り当てるべき識別情報を取得し、細分化された前記マイクロコマンドを前記第2の蓄積手段へ発行するにあたり、該マイクロコマンドに、その元となった前記メモリアクセスコマンドに割り当てられた前記識別情報を付加し、
前記第1の検出手段は、前記マイクロコマンドに付加された前記識別情報に基づいて前記マイクロコマンドの発行及び終了を管理することによって、該識別情報を割り当てられた前記メモリアクセスコマンドの終了を検出することを特徴とする請求項1ないし4のいずれか 1 項に記載のマルチバンクアクセス制御装置。
Prior to subdividing the memory access command into the microcommand, the control means acquires identification information to be assigned to the memory access command, and sends the subdivided microcommand to the second storage means. When issuing the microcommand, the identification information assigned to the memory access command that is the source of the microcommand is added,
The first detection means detects the end of the memory access command to which the identification information is assigned by managing the issuance and termination of the microcommand based on the identification information added to the microcommand. it multi-bank access controller according to any one of claims 1 to 4, wherein the.
前記第1の検出手段は、
予め定められた個数の前記識別情報に対応するカウンタを含み、
前記マイクロコマンドが発行された場合に、該マイクロコマンドに付加された前記識別情報に対応する該カウンタをインクリメントし、前記マイクロコマンドが終了した場合に、該マイクロコマンドに付加された前記識別情報に対応する該カウンタをデクリメントし、該カウンタの値が初期状態に戻った場合に、該カウンタに対応する前記識別情報を割り当てられた前記メモリアクセスコマンドが終了したことを検出することを特徴とする請求項に記載のマルチバンクアクセス制御装置。
The first detection means includes
A counter corresponding to a predetermined number of the identification information,
When the microcommand is issued, the counter corresponding to the identification information added to the microcommand is incremented. When the microcommand is completed, the counter corresponds to the identification information added to the microcommand. The counter is decremented, and when the value of the counter returns to the initial state, it is detected that the memory access command to which the identification information corresponding to the counter is assigned is completed. 5. The multi-bank access control device according to 5.
前記第1の検出手段は、
前記識別情報に対応する前記カウンタと対応付けて、該識別情報に対応する前記メモリアクセスコマンドを発行した前記プロセッサを特定するための情報を保持し、
前記メモリアクセスコマンドが終了したことを検出した場合に、終了が検出された該メモリアクセスに付加された前記識別情報に対応して保持されている前記プロセッサを特定するための情報を、前記第2の検出手段に通知することを特徴とする請求項に記載のマルチバンクアクセス制御装置。
The first detection means includes
In association with the counter corresponding to the identification information, holding information for specifying the processor that issued the memory access command corresponding to the identification information,
When it is detected that the memory access command has ended, information for specifying the processor held in correspondence with the identification information added to the memory access for which the end has been detected, The multi-bank access control apparatus according to claim 6 , wherein the detection means is notified.
前記制御手段は、所定の選択基準に従って、複数の前記第1の蓄積手段のうちからコマンドを取り込むべきものを選択することを特徴とする請求項1に記載のマルチバンクアクセス制御装置。  2. The multi-bank access control apparatus according to claim 1, wherein the control unit selects a command to be fetched from a plurality of the first storage units according to a predetermined selection criterion. 前記制御手段は、前記識別情報が全て使用されているために取得できない間は、前記メモリアクセスコマンドに対する処理を行わないことを特徴とする請求項1に記載のマルチバンクアクセス制御装置。  2. The multi-bank access control apparatus according to claim 1, wherein the control unit does not perform processing for the memory access command while the identification information cannot be acquired because all the identification information is used. 複数のスレッドから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御装置であって、
複数の前記スレッドに対応して1つずつ設けられ、対応する前記スレッドから発行されたバンクアクセスに関係するコマンドを蓄積する第1の蓄積手段と、
複数の前記メモリバンクに対応して1つずつ設けられ、対応する前記メモリバンクに対するマイクロコマンドを蓄積する第2の蓄積手段と、
前記第1の蓄積手段に蓄積されたメモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する前記第2の蓄積手段へ発行する制御手段と、
前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を管理することによって、各々の前記メモリアクセスコマンドの終了を検出する第1の検出手段と、
前記第1の検出手段による検出結果に基づいて、前記第1の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記スレッドが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出手段とを備え、
前記第2の検出手段は、
複数の前記スレッドに対応して1組ずつ設けられ、対応する前記スレッドから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記スレッドから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含み、
前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記スレッドに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記スレッドに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記スレッドに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とするマルチバンクアクセス制御装置。
A multi-bank access control device that performs access control to a plurality of memory banks accessed in common from a plurality of threads,
1st accumulation means which is provided one by one corresponding to the plurality of threads, and accumulates commands related to bank access issued from the corresponding threads;
A second storage unit that is provided one by one corresponding to the plurality of memory banks, and stores microcommands for the corresponding memory banks;
The memory access command stored in the first storage means is subdivided into one or a plurality of microcommands for accessing the memory bank according to the contents, and each subdivided microcommand is Control means for issuing to the second storage means corresponding to the memory bank to be accessed;
First detecting means for detecting the end of each memory access command by managing the issuance and termination of the microcommand corresponding to the memory access command;
Based on the detection result by the first detection means, all the memory access commands issued prior to the synchronization command by the thread that issued the synchronization command fetched from the first storage means to the control means are all Bei give a second detection means for detecting whether or not it is completed,
The second detection means includes
A counter provided for each of the plurality of threads, a counter for holding the number of the memory access commands issued from the corresponding thread and fetched into the control means but not yet terminated, and the corresponding thread Including a flag indicating the presence or absence of a synchronization command issued from and taken into the control means but not yet terminated,
When the memory access command is taken into the control means, the counter corresponding to the thread that issued the memory access command is incremented, and the end of the memory access command is detected by the first detection means The counter corresponding to the thread that issued the memory access command is decremented, and the counter corresponding to the thread that issued the synchronization command is initialized when the counter is fetched by the control means. when not in a state, the corresponding multi-bank access control device, characterized that you to the state shown yet that finished non synchronization command is present the flag.
複数のプロセッサから共通にアクセスされる複数のメモリバンクに対するアクセス制御を行うマルチバンクアクセス制御方法であって、
前記プロセッサからバンクアクセスに関係するコマンドが発行された場合に、該コマンドを、該プロセッサに対応する第1の蓄積手段に蓄積するステップと
制御手段、複数の前記プロセッサに対応する前記第1の蓄積手段のうちのいずれかから蓄積されたコマンドを取り込み、該コマンドがメモリアクセスコマンドである場合には、該メモリアクセスコマンドを、その内容に応じて前記メモリバンクをアクセス対象とする1又は複数のマイクロコマンドに細分化し、細分化された各々のマイクロコマンドを、それがアクセス対象とする前記メモリバンクに対応する第2の蓄積手段へ発行するステップと
1の検出手段、前記メモリアクセスコマンドに対応する前記マイクロコマンドの発行及び終了を検出することによって、前記メモリアクセスコマンドの終了を検出する第 1 の検出ステップと
2の検出手段、前記第1の検出手段による検出結果に基づいて、前記第2の蓄積手段から前記制御手段へ取り込まれた同期コマンドを発行した前記プロセッサが該同期コマンドに先行して発行したメモリアクセスコマンドが、全て終了したか否かを検出する第2の検出ステップとを有し、
前記第2の検出手段は、複数の前記プロセッサに対応して1組ずつ設けられ、対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない前記メモリアクセスコマンドの個数を保持するカウンタ、及び対応する前記プロセッサから発行され前記制御手段に取り込まれたが未だ終了していない同期コマンドの有無を示すフラグを含むものであり、
前記第2の検出ステップにおいて前記第2の検出手段は、前記メモリアクセスコマンドが前記制御手段に取り込まれた場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをインクリメントし、前記第1の検出手段によって前記メモリアクセスコマンドの終了が検出された場合に、該メモリアクセスコマンドを発行した前記プロセッサに対応する前記カウンタをデクリメントし、前記同期コマンドが前記制御手段に取り込まれた場合に、該同期コマンドを発行した前記プロセッサに対応する前記カウンタが初期状態でないときには、対応する前記フラグを未だ終了していない同期コマンドが有ることを示す状態にすることを特徴とするマルチバンクアクセス制御方法。
A multi-bank access control method for controlling access to a plurality of memory banks accessed in common by a plurality of processors,
When a command related to bank access is issued from the processor, the command is stored in a first storage means corresponding to the processor;
Control means captures the stored commands from one of said first storage means corresponding to a plurality of said processors, said command if a memory access command, the memory access command, the contents subdivided into one or more micro-commands and accessed the memory bank in response to the micro-command of each subdivided, it to the second storage means that corresponds to the memory bank to be accessed Issuing step ;
By the first detecting means, for detecting the issuance and termination of the micro command corresponding to the memory access command, a first detecting step of detecting the completion of the memory access command,
Second detecting means, the first based on the result of detection by the detecting means, and said processor which has issued the synchronization command fetched into the control unit from the second storage means prior to the synchronizing command issued memory access commands are, and a second detection step of detect whether or not completed,
The second detection means is provided in a set corresponding to a plurality of the processors, and holds the number of the memory access commands issued from the corresponding processors and fetched into the control means but not yet finished. And a flag indicating the presence / absence of a synchronization command issued from the corresponding processor and fetched into the control means but not yet finished,
In the second detection step, when the memory access command is fetched by the control means, the second detection means increments the counter corresponding to the processor that issued the memory access command, and When the end of the memory access command is detected by one detection means, the counter corresponding to the processor that issued the memory access command is decremented, and when the synchronization command is taken into the control means, when the counter corresponding to the processor that issued the synchronous command is not the initial state, the corresponding multi-bank access control method according to claim to Rukoto the state indicating that the synchronization flag is not yet completed command exists .
JP2001071103A 2001-03-13 2001-03-13 Multi-bank access control device and multi-bank access control method Expired - Fee Related JP3999943B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001071103A JP3999943B2 (en) 2001-03-13 2001-03-13 Multi-bank access control device and multi-bank access control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001071103A JP3999943B2 (en) 2001-03-13 2001-03-13 Multi-bank access control device and multi-bank access control method

Publications (2)

Publication Number Publication Date
JP2002268942A JP2002268942A (en) 2002-09-20
JP3999943B2 true JP3999943B2 (en) 2007-10-31

Family

ID=18928872

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001071103A Expired - Fee Related JP3999943B2 (en) 2001-03-13 2001-03-13 Multi-bank access control device and multi-bank access control method

Country Status (1)

Country Link
JP (1) JP3999943B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8996782B2 (en) 2012-03-23 2015-03-31 Kabushiki Kaisha Toshiba Memory system and bank interleaving method

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2417105B (en) * 2004-08-13 2008-04-09 Clearspeed Technology Plc Processor memory system
US7500045B2 (en) * 2005-03-23 2009-03-03 Qualcomm Incorporated Minimizing memory barriers when enforcing strongly-ordered requests in a weakly-ordered processing system
US9026744B2 (en) 2005-03-23 2015-05-05 Qualcomm Incorporated Enforcing strongly-ordered requests in a weakly-ordered processing
JP4836488B2 (en) * 2005-05-09 2011-12-14 株式会社東芝 Data transfer device and semiconductor integrated circuit device
JP4839749B2 (en) * 2005-09-20 2011-12-21 日本電気株式会社 Computer, portable terminal device, power control method, power control program
JP4388005B2 (en) 2005-10-06 2009-12-24 パナソニック株式会社 Context switching device
US7783817B2 (en) * 2006-08-31 2010-08-24 Qualcomm Incorporated Method and apparatus for conditional broadcast of barrier operations
GB2447690B (en) 2007-03-22 2011-06-08 Advanced Risc Mach Ltd A Data processing apparatus and method for performing multi-cycle arbitration
JP2009193107A (en) 2008-02-12 2009-08-27 Panasonic Corp Memory access device
WO2012070319A1 (en) * 2010-11-25 2012-05-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Memory access device for memory sharing among plurality of processors, and access method for same
JP2014211662A (en) * 2011-09-01 2014-11-13 パナソニック株式会社 Access control device and access control method
JP6233287B2 (en) * 2014-12-11 2017-11-22 京セラドキュメントソリューションズ株式会社 Memory access device, image processing device
JP2020016954A (en) 2018-07-23 2020-01-30 キオクシア株式会社 Memory system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8996782B2 (en) 2012-03-23 2015-03-31 Kabushiki Kaisha Toshiba Memory system and bank interleaving method
US9304691B2 (en) 2012-03-23 2016-04-05 Kabushiki Kaisha Toshiba Memory system and bank interleaving method

Also Published As

Publication number Publication date
JP2002268942A (en) 2002-09-20

Similar Documents

Publication Publication Date Title
JP3999943B2 (en) Multi-bank access control device and multi-bank access control method
TWI512464B (en) Access scheduler
TWI498918B (en) Access buffer
KR100898710B1 (en) Multi-bank scheduling to improve performance on tree accesses in a dram based random access memory subsystem
JP4695761B2 (en) Command reordering system
US8095744B2 (en) Device for controlling access from a plurality of masters to shared memory composed of a plurality of banks each having a plurality of pages
US9727497B2 (en) Resolving contention between data bursts
US20070226422A1 (en) Multi-master system and data transfer system
JPH10228417A (en) Data processor
JPH1091357A (en) Data storage device and method therefor
JP2007079789A (en) Computer system and event processing method
JPH01303543A (en) Memory access control system
JP2002530743A (en) Use the page tag register to track the state of a physical page in a memory device
JP2009211248A (en) Dma transfer device
JP2012043031A (en) Shared cache memory device
US9104531B1 (en) Multi-core device with multi-bank memory
JP5040121B2 (en) Information processing apparatus, cache control method, and program
JP2001134542A (en) Array of processors sharing collective memory
CN108920192B (en) Cache data consistency implementation method and device based on distributed limited directory
JP5500272B2 (en) Relay device, relay history recording method, and data processing device
JP4789269B2 (en) Vector processing apparatus and vector processing method
JPH06348593A (en) Data transfer controller
EP1704487B1 (en) Dmac issue mechanism via streaming id method
JP4335327B2 (en) Arbitration apparatus and method
JP4924970B2 (en) Data processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070507

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070515

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070717

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070807

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070810

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100817

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100817

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110817

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees