JP2004157865A - Multiprocessor system - Google Patents

Multiprocessor system Download PDF

Info

Publication number
JP2004157865A
JP2004157865A JP2002324183A JP2002324183A JP2004157865A JP 2004157865 A JP2004157865 A JP 2004157865A JP 2002324183 A JP2002324183 A JP 2002324183A JP 2002324183 A JP2002324183 A JP 2002324183A JP 2004157865 A JP2004157865 A JP 2004157865A
Authority
JP
Japan
Prior art keywords
processor
bank
access
register
control
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
Application number
JP2002324183A
Other languages
Japanese (ja)
Inventor
Katsuji Shimura
勝治 志村
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2002324183A priority Critical patent/JP2004157865A/en
Publication of JP2004157865A publication Critical patent/JP2004157865A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a multiprocessor system preventing getting wrong data due to simultaneous access when transferring data between processors. <P>SOLUTION: An access bank control register 111 is provided to which control data is written by a first processor 101 determining which of a first bank 103 or a second bank 104 is accessed by own processor 101 or a second processor 102 and the control data can only be read from the second processor 102. Furthermore, a first memory controller 112 is provided making the first or the second processor possible to access only the first bank 103 which is allotted by the control data set to the access bank control register. Moreover, a second memory controller 113 is provided making the first or the second processor possible to access only the second bank 104 which is allotted by the control data set by the access bank control registor. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、複数のプロセッサでメモリを共有するマルチプロセッサシステムに係り、特に、複数のプロセッサにより共有されるメモリのアクセス制御に関するものである。
【0002】
ASIC設計においては、LSIで要求される機能を達成すべく、1チップに複数のプロセッサを組み込むケースが近年増加してきている。
組み込まれるプロセッサは、要求される処理能力と、プロセッサの規模・消費電力等のバランスを考慮して、異なるプロセッサであったり、クロック周波数、バスシステム(バスアーキテクチャ、ビット幅等)が異なる、という場合も少なくない。
【0003】
上記のような場合、複数のプロセッサ間でのデータ受け渡し手段の1つとしてメモリを利用する方法が考えられ、システムとしては、以下のような2つの構成方法が知られている。
【0004】
第1の方法は、共有に展開して、データ交換用のメモリは共有上に置く方法である。
図20は、この第1の方法を採用したマルチプロセッサシステムの構成例を示す図である。
このマルチプロセッサシステム10は、図20に示すように、第1プロセッサ(PRC−A)11、第2プロセッサ(PRC−B)12、たとえばSRAMからなる共有メモリ(SRAM)13、共有バス(SBS)14、第1プロセッサバス(BS−A)15、第2プロセッサバス(BS−B)16、共有バスブリッジ(SBRG)17、および共有アクセスアービタ(ARBTR)18を有している。
【0005】
図20のマルチプロセッサシステム10は、各プロセッサ11,12からのバスに共有バス16に接続するためのブリッジ回路17を持たせ、メモリアクセス自体は共有バス16に展開し、アクセス要求を時分割して割り当てる方式である。
【0006】
第2の方法は、プロセッサ間のデータ受け渡しメモリとして、デュアルポートRAMを使用する既設計タイプでも取られた手法である。
【0007】
図21は、第2の方法を採用したマルチプロセッサシステムの第1の構成例を示す図である。
【0008】
このマルチプロセッサシステム20は、図21に示すように、第1プロセッサ(PRC−A)21、第2プロセッサ(PRC−B)22、たとえばデュアルポートSRAMからなる第1共有メモリ(SRAM1)23、デュアルポートSRAMからなる第2共有メモリ(SRAM2)24、第1プロセッサバス(BS−A)25、および第2プロセッサバス(BS−B)26を有している。
【0009】
図21のマルチプロセッサシステム20は、共有メモリとして1ライト/1リード(1Write/1Read)のデュアルポートSRAM2個を使用した場合のケースである。
マルチプロセッサシステム20において、第1共有メモリ23は、第2プロセッサ22からは、第2プロセッサバス26、ライトポート(WPO)23Wを介して書き込み(ライト)専用、第1プロセッサ21からはリードポート(RPO)23Rを介して読み出し(リード)専用のRAMとして機能するように構成されている。同様に、第2共有メモリ24は、第1プロセッサ21からは、第1プロセッサバス25、ライトポート(WPO)24Wを介してライト専用、第2プロセッサ22からは第2プロセッサバス26、リードポート(RPO)24Rを介してリード専用のRAMとして機能するように構成されている。
【0010】
また、図22は、第2の方法を採用したマルチプロセッサシステムの第2の構成例を示す図である。
【0011】
図22のマルチプロセッサシステム20Aは、共有メモリ27として2ライト/2リード(2Write/2Read)のデュアルポートSRAM1個を使用した場合のケースである。
マルチプロセッサシステム20Aにおいて、共有メモリ27は、第1プロセッサ22からは、第1プロセッサバス25、リードライトポート(R/WPO)27RW−1を介してリードまたはライトされる。第2プロセッサ22からはリードライトポート(R/WPO)27RW−2を介してリードまたはライトされる。
【0012】
また、従来のマルチプロセッサシステムとして、共有メモリ内の2つのメモリは、共有メモリという閉じた機能ブロック内で、マスター・スレーブの関係を構築し、片方のプロセッサからのライト/リード(Write/Read)をもう一方のプロセッサに、比較・伝達することで、アクセスデータを保証しているものがある(特許文献1)。
【0013】
また、従来のマルチプロセッサシステムとして、共有メモリに対するアクセスを要求の到着順に切り替える調停方式を採用したものもある(特許文献2)。
【0014】
【特許文献1】
特開平11−312126号公報
【特許文献2】
特開2000−10901号公報
【0015】
【発明が解決しようとする課題】
ところが、図20に示すマルチプロセッサシステムは、以下のような不利益がある。
要求が重なった場合の制御用に、バスアクセスのアービタ機能を持たせなければならない。アービタは、プロセッサの個数が増えるにつれ複雑化し、設計が困難となる。
また、バスを時分割するため、プロセッサの数が増えるに従い、オーバーヘッド(アクセス不可時間)が増大してしまう。
また、各プロセッサからのバスと共有バスのブリッジを、それぞれのプロセッサバスに合わせて設計する必要があり、設計にかかる手間が増す。
【0016】
また、図21および図22に示すマルチプロセッサシステムは、以下のような不利益がある。
いずれの場合においても、最大の問題点は、一方のプロセッサの書き込みと他方のプロセッサの読み出しのアドレスが重なったときの解決法である。
単純に、完全にアクセスアドレスが重なった場合のみ回避するのは、どちらか一方を待たせてしまえば良いことから、比較的容易に解決できる。
しかしながら、アクセスレートが異なるバスシステムで、ある瞬間からアクセスが重なった場合には、その時点からデータの更新が入れ替わってしまう事態が発生してしまう。これを避けるためには、プロセッサ同士で、互いのアクセス状況を把握しあわなければならない。
解決策としては、ソフトウェア的に、各プロセッサのアクセスタイミングを決めてしまうことが容易な手段となる。また、デュアルポートRAMはシングルポートRAMに比較して、当然のことながら面積(規模)が大きくなる。さらにデュアルポートRAMは、ASICベンダやプロセスのテクノロジによって、機能・アクセス仕様が異なる場合が多く、この例をそのまま当てはめようとしても、1ライト/1リード(1Write/1Read)あるいは2ライト/2リード(2Write/2Read)のデュアルポートRAMが無い場合には、構成・RAMコントローラの仕様を考え直さなければならない。
【0017】
また、特許文献1に記載されたマルチプロセッサシステムでは、共有メモリ内の2つのメモリは、共有メモリという閉じた機能ブロック内で、マスター・スレーブの関係を有することから、共有メモリ間バスが必要で、各メモリを必ずアクセスする必要があり、また、比較・転送処理等の煩雑な処理が要することから、アクセス制御の自由度や柔軟性に劣るという不利益がある。
【0018】
また、特許文献2に記載されたマルチプロセッサシステムでは、上述した図20のシステムと同様に、アービタ機能を持たせなければならないことから、プロセッサの個数が増えるにつれ複雑化し、設計が困難となる。
【0019】
本発明の目的は、プロセッサ間のデータ受け渡しを行う場合に、異なるプロセッサからのライト・リードの同時アクセスによる、データの取り違えを抑制することができ、アクセス制御の自由度や柔軟性に優れ、しかも設計が容易なマルチプロセッサシステムを提供することにある。
【0020】
【課題を解決するための手段】
上記目的を達成するため、本発明の第1の観点は、複数のプロセッサでメモリを共有するマルチプロセッサシステムであって、上記メモリは、少なくとも2つ以上の複数のバンクを含み、上記複数のプロセッサの各々が、上記複数のバンクのいずれにアクセスするかを決定する制御データが設定され、当該制御データは書き換え可能な制御データ設定手段と、上記各プロセッサからの上記バンク構成を有する上記メモリに対するアクセスが発生した際には、各プロセッサからは、必然的に、上記制御データ設定手段に設定された制御データにより割り当てられているバンクにのみアクセス可能となるような制御を行う制御手段とを有する。
【0021】
本発明では、上記制御データ設定手段に設定される制御データは、上記複数のバンクのうち一つの上記バンクには一つの上記プロセッサからのアクセス、他の一つの上記バンクには、異なるプロセッサからのアクセスを受け付けるように上記制御手段に指示するデータを含む。
【0022】
本発明では、上記複数のプロセッサのうちの一つの上記プロセッサのみが上記各バンクに対するのアクセスの決定権を有し、当該優位性を持つ一つのプロセッサからのみ上記制御データを上記制御データ設定手段に設定し、他の上記プロセッサは、上記制御データ設定手段に設定された制御データで割り当てられたバンクをアクセスする。
好適には、上記一つのプロセッサの優位性の決定は、チップのアーキテクチャとして決定されている。
また、上記一つのプロセッサの優位性の決定は、プロセッサ同士の設定により制御される。
【0023】
好適には、上記各プロセッサは、他のプロセッサに対して、即時性のある信号を発行し、アクセス制御に関する情報を伝達する手段を有する。
【0024】
また、上記各プロセッサは、自分のプロセッサからは書き込みおよび読み出しが可能、他のプロセッサからは読み出しのみが可能な伝達レジスタをそれぞれ有し、他のプロセッサへのアクセス制御に関する伝達情報を対応する上記伝達レジスタに書き込む
【0025】
好適には、上記各プロセッサは、他のプロセッサに対して、割り込み信号を発行するための割り込みレジスタと、自分のプロセッサからは書き込みおよび読み出しが可能、他のプロセッサからは読み出しのみが可能な伝達レジスタとをそれぞれ有する。
【0026】
好適には、上記各プロセッサは、他のプロセッサへのアクセス制御に関する伝達情報を対応する上記伝達レジスタに書き込んだ後、上記割り込みレジスタに割り込み信号を設定して、他のプロセッサに伝達情報がある旨を報知する。
【0027】
また、好適には、上記制御手段は、上記各プロセッサからのバンクへのアクセスを切り替える場合、クロック信号を含めた、バンクにかかわる信号の全てを切り替える。
上記各プロセッサは、それぞれ異なるクロックに同期して動作する。
【0028】
本発明の第2の観点に係るマルチプロセッサシステムは、第1プロセッサと、第2プロセッサと、共有メモリを区分けした第1バンクおよび第2バンクと、上記第1プロセッサにより上記第1バンクおよび上記第2バンクのうちのいずれかを自プロセッサおよび上記第2プロセッサがアクセスするかを決定する制御データが書き込まれ、上記第2プロセッサから制御データの読み出しのみが可能なアクセスバンク制御レジスタと、上記第1または第2のプロセッサからの上記第1バンクに対するアクセスが発生した際には、上記第1または第2のプロセッサからは、必然的に、上記アクセスバンク制御レジスタに設定された制御データにより割り当てられている第1バンクにのみアクセス可能となるような制御を行う第1メモリコントローラと、上記第1または第2のプロセッサからの上記第2バンクに対するアクセスが発生した際には、上記第1または第2のプロセッサからは、必然的に、上記アクセスバンク制御レジスタに設定された制御データにより割り当てられている第2バンクにのみアクセス可能となるような制御を行う第2メモリコントローラとを有する。
【0029】
好適には、上記第1プロセッサから上記第2プロセッサに伝達すべき内容を書き込みかつ変更可能で、上記第2プロセッサから内容をリード可能な第1伝達レジスタと、上記第2プロセッサから上記第1プロセッサに伝達すべき内容を書き込みかつ変更可能で、上記第1プロセッサから内容をリード可能な第2伝達レジスタとを有する。
【0030】
また、好適には、上記第1プロセッサから上記第2プロセッサに伝達すべき内容を書き込み可能で、上記第2プロセッサから内容を読み出しのみが可能な第1伝達レジスタと、上記第1プロセッサから上記第2プロセッサに対して割り込み発行するための第1割り込み信号発生レジスタと、上記第2プロセッサから上記第1プロセッサに伝達すべき内容を書き込み可能で、上記第1プロセッサから内容を読み出しのみが可能な第2伝達レジスタと、上記第2プロセッサから上記第1プロセッサに対して割り込み発行するための第2割り込み信号発生レジスタとを有する。
【0031】
好適には、上記第1または第2プロセッサは、他の上記第2または第1プロセッサへのアクセス制御に関する伝達情報を対応する上記第1または第2伝達レジスタに書き込んだ後、上記第1または第2割り込みレジスタに割り込み信号を設定して、他の上記第2またた第1プロセッサに伝達情報がある旨を報知する。
【0032】
本発明によれば、たとえば優位性を持つ一つのプロセッサにより制御データ設定手段に対して、複数のプロセッサの各々が、複数のバンクのいずれにアクセスするかを決定する制御データが設定される。この制御データは制御手段に与えられる。
制御手段では、各プロセッサからのバンク構成を有するメモリに対するアクセスが発生した際には、各プロセッサからは、必然的に、制御データ設定手段に設定された制御データにより割り当てられているバンクにのみアクセス可能となるような切り替え制御が行われる。
具体的には、複数のバンクのうち一つのバンクには一つのプロセッサからのアクセス、他の一つのバンクには、異なるプロセッサからのアクセスを受け付けるように制御される。
この制御により、各プロセッサから見た共有メモリのアドレス領域は、アドレスマップ上では、バンクの区別は存在しない。
【0033】
このように、本発明によれば、たとえばプロセッサからの設定により、共有メモリを構成する複数のバンクには、その時点で、アクセス対象となるプロセッサを定義する構成によりデータを保証する。このアクセス対象の定義は、上述したように、あらかじめ優位性を定められたプロセッサからの設定によって行われることとしている。この優位性自体も、システム仕様として決めても良いし、ソフトウェア的に定義しても良い。
また、アクセス権の切り替えを司っているのはプロセッサであるという構成上、アクセスの調停はソフトウェア制御となり、要求の到着順に切り替えるのはもちろんのこと、アクセス要求が発生した時点でのシステムの状況により、アクセス権切り替えのタイミング、順位、順序等、自由度を高くすることが可能である。
【0034】
【発明の実施の形態】
以下、本発明の実施形態を添付図面を参照して詳細に説明する。
【0035】
第1実施形態
図1は、本発明に係るマルチプロセッサシステムの第1の実施形態を示す構成図である。
本第1の実施形態においては、搭載プロセッサは2つ、共有メモリのバンク構成も2バンクの場合を例に説明する。
【0036】
本マルチプロセッサシステム100は、図1に示すように、第1プロセッサ(PRC−A)101、第2プロセッサ(PRC−B)102、たとえばシングルポートSRAMからなる第1メモリバンク(BNK1)103、シングルポートSRAMからなる第2メモリバンク(BNK2)104、第1プロセッサバス(BS−A)105、第2プロセッサバス(BS−B)106、第1割り込み信号発生レジスタ(IRPTREG1)107、第2割り込み信号発生レジスタ(IRPTREG2)108、第1パラメータ伝達レジスタ(TRFREG1)109、第2パラメータ伝達レジスタ(TRFREG2)110、アクセスバンク制御レジスタ(CTLREG)111、第1メモリコントローラ(MCTL1)112、第2メモリコントローラ(MCTL2)113、およびローカルバス114〜127を有している。
これらの構成要素のうち、アクセスバンク制御レジスタ(CTLREG)111により制御データ設定手段が構成され、第1メモリコントローラ(MCTL1)112および第2メモリコントローラ(MCTL2)113により制御手段が構成される。
【0037】
本第1の実施形態に係るマルチプロセッサシステム100において、第1プロセッサ101は、第1パラメータ伝達レジスタ109およびアクセスバンク制御レジスタ111に対して読み出し(リード)および書き込み(ライト)が可能で、第2パラメータ伝達レジスタ110に対してはリードのみ可能(Read Only)である。
一方、第2プロセッサ102は、第1パラメータ伝達レジスタ109およびアクセスバンク制御レジスタ111に対してはリードのみ可能(Read Only)で、第2パラメータ伝達レジスタ110に対してリードおよびライトが可能である。
【0038】
また、本実施形態においては、第1プロセッサ101および第2プロセッサ102は、異なる周波数のクロックに同期して動作する。たとえば、第1プロセッサ101はクロックCLK−Aに同期して動作し、第2プロセッサ102はクロックCLK−Bに同期して動作する。
また、本実施形態においては、第1プロセッサ101側のバスアーキテクチャと第2プロセッサ側のバスアーキテクチャとは異なる。
また、たとえば第1プロセッサ101と第2プロセッサ102は、クロック周波数は可変、かつ、異なる周波数でも動作可能な形態で実装することも可能である。
【0039】
本マルチプロセッサシステム100は、第1および第2プロセッサ101,102からのバンク構成を持つ共有メモリに対するアクセスが発生した際には、各プロセッサ101,102からは、必然的に、その時に割り当てられているバンクにのみアクセス可能となるような制御を行うように構成されている。この制御により、各プロセッサから見た共有メモリのアドレス領域は、アドレスマップ上では、バンクの区別は存在しない。
また、共有メモリの第1および第2のメモリバンク(以下、単にバンクという)103,104に対するアクセス権の設定は、優位性が決定されている1つのプロセッサ(本実施形態では第1プロセッサ101)からのみ制御され、第2プロセッサ102からは、メモリアクセス権の制御は行わない。
このように、プロセッサ設定によるアクセス権制御により、アクセス権切り替えのタイミング制御、順位制御は、ソフトウェアにより自在に制御可能となっている。
【0040】
第1プロセッサ101は、アクセスバンク制御レジスタ111に、ローカルバス114、第1プロセッサバス105、およびローカルバス120を介して、2つある第1バンク103および第2バンク104のうちのいずれかを自プロセッサ101および第2プロセッサ102がアクセスするかを決定する制御データを書き込む。
アクセスバンク制御レジスタ111に書き込まれた制御データは、第2プロセッサ102によりローカルバス121、第2プロセッサバス106、およびローカルバス126を介して読み出される。第2プロセッサ102は、読み出した制御データに基づいてアクセス可能なバンクを認識する。
【0041】
たとえば、第1プロセッサ101によりアクセスバンク制御レジスタ111に対して、自プロセッサ101に第1バンク103を割り当て、第2プロセッサ102にバンク104を割り当てた場合、図2に示すように、第1プロセッサ101が、ローカルバス114、第1プロセッサバス105、ローカルバス122、および第1メモリコントローラ112を通してバンク103に対してアクセス(リードおよびライト)可能で、第2プロセッサ102が、ローカルバス126、第2プロセッサバス106、ローカルバス125、および第2メモリコントローラ113を通してバンク104に対してアクセス(リードおよびライト)可能である構成となる。
実際にプロセッサ間でデータ受け渡しを行う場合には、第1プロセッサ101は、この制御データによるバンク切り替えを繰り返し行うことによって実現する。
【0042】
第1プロセッサ101は、即時性のある信号、本実施形態では、第1割り込み信号を、ローカルバス114、第1プロセッサバス105、およびローカルバス115を介して第1割り込み信号発生レジスタ107にセットし、第2プロセッサ102に対して第1割り込み信号を発行する。
第1プロセッサ101が、第2プロセッサ102に対して第1割り込み信号を発行するケースとしては、たとえばデータ受け渡し用共有メモリである第1バンク103または第2バンク104にアクセスを開始するとき、第1バンク103または第2バンク104へのアクセスが完了したとき、第1バンク103または第2バンク104へのアクセス権設定を変更したとき、がある。
【0043】
また、第1プロセッサ101は、第1パラメータ伝達レジスタ109に、自プロセッサの状態・リクエストの内容等、詳細情報を伝達するためのパラメータを、ローカルバス114、第1プロセッサバス105、およびローカルバス116を介して書き込む。この第1パラメータ伝達レジスタ109に書き込まれた伝達パラメータは、第1割り込み信号の発行先である第2プロセッサ102が、ローカルバス117、第2プロセッサバス106、およびローカルバス126を介して読み出す。
第1プロセッサ101は、第1割り込み信号発生レジスタ107と第1パラメータ伝達レジスタ109とを併用する。
具体的には、第1プロセッサ101は、第1パラメータ伝達レジスタ109の内容を書き換えた後、該当する第1割り込み信号を第2プロセッサ102に対して発行する。その後、第2プロセッサ102が第1パラメータ伝達レジスタ109の内容を読み込むことで、第2プロセッサ102に、自プロセッサ101の状態・リクエストの内容等、詳細情報を伝達することができる。
【0044】
第2プロセッサ102は、第2割り込み信号を、ローカルバス126、第2プロセッサバス106、およびローカルバス127を介して第2割り込み信号発生レジスタ108にセットし、第1プロセッサ101に対して第2割り込み信号を発行する。
第2プロセッサ102が、第1プロセッサ101に対して第2割り込み信号を発行するケースとしては、たとえばデータ受け渡し用共有メモリである第1バンク103または第2バンク104にアクセスを開始するとき、第1バンク103または第2バンク104へのアクセスが完了したとき、第1バンク103または第2バンク104へのアクセス権設定を変更してほしいとき、がある。
【0045】
また、第2プロセッサ102は、第2パラメータ伝達レジスタ110に、自プロセッサの状態・リクエストの内容等、詳細情報を伝達するためのパラメータを、ローカルバス126、第2プロセッサバス106、およびローカルバス119を介して書き込む。この第2パラメータ伝達レジスタ110に書き込まれた伝達パラメータは、第2割り込み信号の発行先である第1プロセッサ101が、ローカルバス118、第1プロセッサバス105、およびローカルバス114を介して読み出す。
第2プロセッサ102は、第2割り込み信号発生レジスタ108と第2パラメータ伝達レジスタ110とを併用する。
具体的には、第2プロセッサ102は、第2パラメータ伝達レジスタ110の内容を書き換えた後、該当する第2割り込み信号を第1プロセッサ101に対して発行する。その後、第1プロセッサ101が第2パラメータ伝達レジスタ110の内容を読み込むことで、第1プロセッサ101に、自プロセッサ102の状態・リクエストの内容等、詳細情報を伝達することができる。
【0046】
第1割り込み信号発生レジスタ107およびアクセスバンク制御レジスタ111は、第1プロセッサ101のコントロールレジスタに相当する。
【0047】
図3は、第1プロセッサのコントロールレジスタの構成例を示す図である。
このコントロールレジスタは、図3に示すように、ビット0〜7の8ビットで構成され、ビット0(LSB)とビット7(MSB)の2ビットのみを使用している。
ビット7が第1割り込み信号発生レジスタ107に相当するビットであり、ビット0がアクセスバンク制御レジスタ111に相当する制御ビットである。
【0048】
ビット7(INT)は、第2プロセッサ102に対して割り込み要求を発生させ、データの転送が完了したことを示すビットである。
たとえば、ビット7に「0」が設定されているときは無効であり、「1」が設定されているときが第2プロセッサ102への割り込み要求を発生しているときである。たとえば、ビット7は、「1」を設定した後、自動的に「0」に戻る。
【0049】
ビット0(BNK)は、具体的には、第1バンク103および第2バンク104のどちらをアクセスするかを制御するビットである。
図4は、バンクアクセス制御ビットに設定される制御データに応じた2つのバンクの2つのプロセッサへの割り当て例を示す図である。
図4に示すように、たとえば本第1の実施形態では、第1プロセッサ101がビット0に制御データとして「0」を設定し場合には、第1プロセッサ101が第1バンク103側をアクセスし、第2プロセッサ102が第2バンク104側をアクセスする。
一方、第1プロセッサ101がビット0に制御データとして「1」を設定し場合には、第1プロセッサ101が第2バンク104側をアクセスし、第2プロセッサ102が第1バンク103側をアクセスする。
【0050】
なお、バンクを切り替える際には、第2プロセッサインタフェースオンレジスタにより、第2プロセッサインタフェースがオンしている必要がある。
【0051】
図5は、第2プロセッサインタフェースオンレジスタの構成例を示す図である。
この第2プロセッサインタフェースオンレジスタは、図5に示すように、ビット0〜7の8ビットで構成され、ビット0(LSB)のみを使用している。
ビット0が第2プロセッサインタフェースのオン・オフを制御するビットである。
たとえば本実施形態では、図6に示すように、ビット0に「0」が書き込まれたときに第2プロセッサインタフェースオフであり、ビット0に「1」が書き込まれたときに第2プロセッサインタフェースオンである。
第2プロセッサインタフェースを使用しない場合は、このビット0に「0」を書き込むことにより、第2プロセッサインタフェースでの消費電力を抑えることができる。
【0052】
また、第2割り込み信号発生レジスタ108およびアクセスバンク制御レジスタ111は、第2プロセッサ102のコントロールレジスタに相当する。
【0053】
図7は、第2プロセッサのコントロールレジスタの構成例を示す図である。
このコントロールレジスタは、図7に示すように、ビット0〜15の16ビットで構成され、ビット0とビット7の2ビットのみを使用している。
ビット7が第2割り込み信号発生レジスタ108に相当するビットであり、ビット0がアクセスバンク制御レジスタ111に相当する制御ビットである。
【0054】
ビット7(INT)は、第1プロセッサ101に対して割り込み要求を発生させるビットである。
たとえば、ビット7に「0」が設定されているときは無効であり、「1」が設定されているときが第1プロセッサ101への割り込み要求を発生しているときである。たとえばビット7は、「1」を設定した場合、パルスを発生したら自動的に「0」に戻る。
【0055】
ビット0(BNK)は、具体的には、第1バンク103および第2バンク104のどちらをアクセスするかを制御するビットである。このビット0は読み出し専用である。したがって、第2プロセッサ102側から第1バンク103および第2バンク104を切り替えることはできない。
図8は、バンクアクセス制御ビットに設定される制御データに応じた共有メモリの選択バンクの第2プロセッサへの割り当て例を示す図である。
図8に示すように、たとえば本第1の実施形態では、ビット0に制御データとして「0」が設定された場合には、第2プロセッサ102側に第2バンク104側が選択されていることを示す。
一方、ビット0に制御データとして「1」が設定された場合には、第2プロセッサ102側に第1バンク103側が選択されていることを示す。
【0056】
第1メモリコントローラ112は、第1プロセッサ101によりアクセスバンク制御レジスタ111に設定された制御データに応じて、第1バンク103へのアクセスが、第1プロセッサバス105に接続された第1プロセッサ101側または第2プロセッサバス106に接続された第2プロセッサ102側となるように切り替え制御を行う。
図4に関連付けた例では、第1メモリコントローラ112は、制御データが「0」の場合には、第1バンク103へのアクセスを、第1プロセッサバス105に接続された第1プロセッサ101側に切り替える。一方、第1メモリコントローラ112は、制御データが「1」の場合には、第1バンク103へのアクセスを、第2プロセッサバス106に接続された第2プロセッサ102側に切り替える。
第1メモリコントローラ112は、第1プロセッサ101または第2プロセッサ102からの第1バンク103へのアクセスの切り替えは、クロック信号を含めた、第1バンク103にかかわる信号の全てを切り替える。これにより、第1プロセッサ101または第2プロセッサ102のバスシステム、クロックの同期に関する制限は無い。
第1メモリコントローラ112は、切り替え制御を行った後、担当する第1プロセッサ101または第2プロセッサ102と第1バンク103間におけるアドレス、データ、制御信号等の授受の制御を行う。
【0057】
第2メモリコントローラ113は、第1プロセッサ101によりアクセスバンク制御レジスタ111に設定された制御データに応じて、第1バンク103へのアクセスが、第1プロセッサバス105に接続された第1プロセッサ101側または第2プロセッサバス106に接続された第2プロセッサ102側となるように切り替え制御を行う。
図4に関連付けた例では、第2メモリコントローラ113は、制御データが「0」の場合には、第2バンク104へのアクセスを、第2プロセッサバス106に接続された第2プロセッサ102側に切り替える。一方、第2メモリコントローラ113は、制御データが「1」の場合には、第2バンク104へのアクセスを、第1プロセッサバス105に接続された第1プロセッサ101側に切り替える。
第2メモリコントローラ113は、第1プロセッサ101または第2プロセッサ102からの第2バンク104へのアクセスの切り替えは、クロック信号を含めた、第2バンク104にかかわる信号の全てを切り替える。これにより、第1プロセッサ101または第2プロセッサ102のバスシステム、クロックの同期に関する制限は無い。
第2メモリコントローラ113は、切り替え制御を行った後、担当する第1プロセッサ101または第2プロセッサ102と第2バンク104間におけるアドレス、データ、制御信号等の授受の制御を行う。
【0058】
以上の機能を有する第1メモリコントローラ112と第2メモリコントローラ113は、基本的には同様の構成を有する。
【0059】
図9は、本第1の実施形態に係るメモリコントローラの具体的な構成例を示す図である。
このメモリコントローラ200(112,113)は、図9に示すように、第1バンクコントローラ(BNKCTL−A)201、第2バンクコントローラ(BNKCTL−B)202、第1切り替えスイッチ203、および第2切り替えスイッチ204を有する。
【0060】
第1バンクコントローラ201は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、第1プロセッサバス(BS−A)105を通して供給される第1プロセッサ101によるアドレスADR、ライトデータWDT、制御信号WE(Write Enable),IH(Chip Enable)等を受けて所定のタイミングでアクセスすべき第1バンク103または第2バンク104側に出力し、第1バンク103または第2バンク104から読み出されたデータを所定のタイミングで第1プロセッサバス(BS−A)105に送出する。
【0061】
第2バンクコントローラ202は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、第2プロセッサバス(BS−B)106を通して供給される第2プロセッサ102によるアドレスADR、ライトデータWDT、制御信号WE,IH等を受けて所定のタイミングでアクセスすべき第1バンク103または第2バンク104側に出力し、第1バンク103または第2バンク104から読み出されたデータを所定のタイミングで第2プロセッサバス(BS−B)106に送出する。
【0062】
第1切り替えスイッチ203は、端子aが第1バンク103または第2バンク104の入力端子に接続されたバス205に接続され、端子bが第1バンクコントローラ201のバンク側への出力端子に接続されたバス206に接続され、端子cが第2バンクコントローラ202のバンク側への出力端子に接続されたバス207に接続されている。
そして、第1切り替えスイッチ203は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、端子aと端子bとを接続して、第1バンクコントローラ201が所定のタイミングでバス206に送出した第1プロセッサ101によるアドレスADR、ライトデータWDT、制御信号WE,IH等をバス205に伝播させて第1バンク103または第2バンク104に入力させる。
一方、第1切り替えスイッチ203は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、端子aと端子cとを接続して、第2バンクコントローラ202が所定のタイミングでバス207に送出した第2プロセッサ102によるアドレスADR、ライトデータWDT、制御信号WE,IH等をバス205に伝播させて第1バンク103または第2バンク104に入力させる。
【0063】
第2切り替えスイッチ204は、端子aが第1バンク103または第2バンク104のクロック入力端子に接続され、端子bが第1プロセッサ101用のクロックCLK−Aの供給ラインに接続され、端子cが第2プロセッサ102用のクロックCLK−Bの供給ラインに接続されている。
そして、第2切り替えスイッチ204は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、端子aと端子bとを接続して、クロックCLK−Aを第1バンク103または第2バンク104に入力させる。
一方、第2切り替えスイッチ204は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、端子aと端子cとを接続して、クロックCLK−Bを第1バンク103または第2バンク104に入力させる。
【0064】
このように、本実施形態に係るバンクコントローラ200は、対応するバンクを、第1プロセッサ101または第2プロセッサ102のどちらからのコントロールを受け付けるかを選択し、かつ、バンクへのクロックも、それぞれのプロセッサ(バス)に同期したクロックを選択してバンクに分配する。このため、2つのプロセッサのバスアーキテクチャが全く異なったものでも対応が容易で、クロックの同期/ 非同期に関係なく、制御を切り替えることができる。
【0065】
共有メモリを構成する第1バンク103および第2バンク104は、前述したように、シングルポートSRAMにより構成される。
【0066】
図10は、シングルポートSRAMの具体的な構成例を示すブロック図である。
このシングルポートSRAM300は、図10に示すように、メモリセルアレイ(MCARY)301、ワードラインバッファ(WLB)302、カラムセレクタ(CSEL)303、ローデコーダ(RDEC)304、カラムデコーダ(CDEC)305、アドレスレジスタ(AREG)306、クロックバッファ(CBUF)307、パルスジェネレータ(PGEN)308、入力データレジスタ(IDG)309、出力データバッファ(ODB)310、ライトアンプ(WAMP)311、およびセンスアンプ(SAMP)312を有する。
また、図10において、IAはアドレスレジスタ306へのアドレス入力、CKはクロックバッファ307に入力されるクロック、IHはローレベルでアクティブのチップイネーブル信号、WEはローレベルでアクティブのライトイネーブル信号、Iは入力データレジスタ309へのデータ入力、およびAは出力データバッファ310からのデータ出力をそれぞれ示している。
【0067】
シングルポートSRAM300は、図11に示すように、動作モードとしては、リード、ライト、セットアップ、およびスタンバイの4つのモードを有する。
【0068】
図11に示すように、チップイネーブル信号IHがハイレベルの期間では、クロックCKおよびライトイネーブル信号WEのレベルにかかわりなくスタンバイモードとなる。このとき、アドレスレジスタ306にアドレスIAxがラッチされ、入力データ(ライトデータ)Ixが入力データレジスタ309にラッチされ、出力データバッファ310には前回のリード時のデータがラッチされている。
【0069】
図11に示すように、チップイネーブル信号IHがローレベルで、クロックCKがローレベルの場合、ライトイネーブル信号WEのレベルにかかわりなくセットアップモードとなる。このとき、入力アドレスIAxがアドレスレジスタ306に取り込まれ、入力データ(ライトデータ)Ixが入力データレジスタ309に取り込まれ、出力データバッファ310には前回のリード時のデータがラッチされている。
【0070】
リードモードでは、クロックバッファ307に供給されるチップイネーブル信号IHがローレベル、図11および図12(D)に示すように、ライトイネーブル信号WEがハイレベルで、リードサイクルに入る。
このとき、図12(A),(B),(D)に示すように、クロックCKがローベルであり、ライトイネーブル信号WEの立上がりのタイミングから時間tSAの間、セットアップモードとなり、アドレスレジスタ306にアドレスIAxが取り込まれる。
そして、図12(A),(B)に示すように、クロックCKの立上がりのタイミングでリードモードとなり、クロックCKの立上がりから時間tHAの間に、アドレスIAxがアドレスレジスタ306にラッチされる。アドレスレジスタ306にラッチされたアドレスは、ローデコーダ304およびカラムデコーダ305に供給される。
チップイネーブル信号IH、ライトイネーブル信号WE、クロックCKはクロックバッファ307にバッファリングされる。そして、クロックCKがパルスジェネレータ308に供給されて波形整形され、ローデコーダ304およびセンスアンプ312に供給される。
ローデコーダ304では、供給されたクロックCKに同期して動作し、入力アドレスからローアドレスがデコードされワードラインバッファ302に供給される。そして、ワードラインバッファ302でアドレス指定されたメモリセルが接続されたワードラインが所定時間活性化される。
また、カラムデコーダ305では、供給されたクロックCKに同期して動作し、入力アドレスからカラムアドレスがデコードされ、カラムセレクタ303に供給される。そして、アドレス指定されたメモリセルが接続されたビット線のカラムスイッチがオンにされる。
これにより、アドレス指定されたメモリセルの記憶データがビット線、カラムスイッチを通してセンサアンプ312に供給され、ここでセンス増幅されて、出力データバッファ310にバッファリングされる。
そして、図12(A),(C)に示すように、クロックCKの立上がりから所定時間tpd経過後に、現在のアドレスのメモリセルからの読み出しデータが出力データバッファ310から出力され有効となる。
【0071】
ライトモードでは、クロックバッファ307に供給されるチップイネーブル信号IHがローレベル、図11および図13(D)に示すように、ライトイネーブル信号WEがローレベルで、ライトサイクルに入る。
このとき、図13(A)〜(D)に示すように、クロックCKがローベルであり、ライトイネーブル信号WEの立下がりのタイミングから時間tSIの間、セットアップモードとなり、アドレスレジスタ306にアドレスIAxが取り込まれ、入力データ(ライトデータ)Ixが入力データレジスタ309に取り込まれ。
そして、図13(A)〜(C)に示すように、クロックCKの立上がりのタイミングでライトモードとなり、クロックCKの立上がりから時間tHAの間に、アドレスIAxがアドレスレジスタ306にラッチされる。アドレスレジスタ306にラッチされたアドレスは、ローデコーダ304およびカラムデコーダ305に供給される。同様に、クロックCKの立上がりから時間tHIの間に、入力データ(ライトデータ)Ixが入力データレジスタ309にラッチされる。
チップイネーブル信号IH、ライトイネーブル信号WE、クロックCKはクロックバッファ307にバッファリングされる。そして、クロックCKが入力データレジスタ309に供給され、図13(A),(C)に示すように、入力データ(ライトデータ)Ixが入力データレジスタ309に保持される。また、クロックCKがパルスジェネレータ308に供給されて波形整形され、ローデコーダ304およびライトアンプ311に供給される。
また、アドレスレジスタ306にアドレスIAxが保持され、ローデコーダ304およびカラムデコーダ305に供給される。
ローデコーダ304では、供給されたクロックCKに同期して動作し、入力アドレスからローアドレスがデコードされワードラインバッファ302に供給される。そして、ワードラインバッファ302でアドレス指定されたメモリセルが接続されたワードラインが所定時間活性化される。
カラムデコーダ305では、供給されたクロックCKに同期して動作し、入力アドレスからカラムアドレスがデコードされ、カラムセレクタ303に供給される。そして、アドレス指定されたメモリセルが接続されたビット線のカラムスイッチがオンにされる。
また、クロックCKに同期してライトアンプ311で入力データレジスタ309に保持されたライトデータが増幅され、カラムセレクタ303に供給される。これにより、ライトデータが、カラムスイッチ、ビット線を通してアドレス指定されたメモリセルに書き込まれる。
このライトモード時には、図13(E)に示すように。出力データバッファ310には、前回のリード時のデータが保持されている。
【0072】
図14(A)〜(F)は、リードモードおよびライトモード時のクロックがアクティブ(active)になるタイミングに示すタイミングチャートである。
また、図15(A)〜(F)は、リードモードおよびライトモード時のクロックがインヒビット(inhibit) になるタイミングに示すタイミングチャートである。
【0073】
リードモードにおいて、クロックCKがアクティブになるタイミングは、図14(A),(B)に示すように、チップイネーブル信号IHがローレベルの期間で、クロックCKの立上がりのタイミングである。
図14(A)〜(C)に示すように、このクロックCKの立上がりのタイミングに応じて入力アドレスIAxがアドレスレジスタ306に保持される。
また、図15(A),(B)に示すように、リードモードにおいて、チップイネーブル信号IHがハイレベルの期間では、クロックがインヒビットとなる。
このとき、図14(C)に示すように、入力アドレスIAxは無効である。
【0074】
ライトモードにおいて、クロックCKがアクティブになるタイミングは、図14(A),(B),(E)に示すように、チップイネーブル信号IHおよびライトイネーブル信号WEがローレベルの期間で、クロックCKの立上がりのタイミングである。
図14(A)〜(E)に示すように、このクロックCKの立上がりのタイミングに応じて入力アドレスIAxがアドレスレジスタ306に保持され、入力データIxが入力データレジスタ309に保持される。
ライトモードでは、図14(A)〜(F)に示すように、クロックCKの立上がりのタイミングから時間tHD経過後に出力データバッファ310の出力データは無効となる。
また、図15(A)〜(E)に示すように、ライトモードにおいて、チップイネーブル信号IHがハイレベルの期間では、ライトイネーブル信号WEがローレベルの期間であってクロックがインヒビットとなる。
このとき、図14(C),(D)に示すように、入力アドレスIAx、入力データIxは無効である。
【0075】
次に、図1のマルチプロセッサシステムに動作を、図16に関連付けて説明する。
ここで、第1プロセッサ101と第2プロセッサ102との間で割り込み信号を相互に受け渡しするこによる情報伝達動作を中心に説明する。そして、理解を容易にするために、第1プロセッサ101が第2プロセッサ102に受け渡したいデータがある場合に特定して説明する。
【0076】
まず前提として、ステップST101において、アクセスバンク制御レジスタ111には、アクセス権制御に優位性を有する第1プロセッサ101により、自プロセッサ101が第1バンク103をアクセス(リードおよびライト)し、第2プロセッサ102が第2バンク104をアクセス(リードおよびライト)することを許容する制御データが書き込まれており、第1プロセッサ101は第1バンク103にアクセスし、第2プロセッサ102は第2バンク104をアクセスして通常の処理を行っているものとする。
【0077】
ここでたとえば、第1プロセッサ101が第2プロセッサ102に受け渡したいデータがある場合、データ受け渡し用バンクは第1バンク103である。
しががって、ステップST102において、第1プロセッサ101は、第1バンク103に第1メモリコントローラ112を介してアクセスし、受け渡しデータを書き込む。
【0078】
次に、ステップST103において、第1プロセッサ101は、第1バンク103をアクセスして、受け渡しデータを書き込んだことを示すデータ(パラメータ)を第1パラメータ伝達レジスタ(TRFREG1)109に書き込む(TRFREG1の内容を変更する)。
次いで、ステップST104において、第1プロセッサ101は、第1割り込み信号を、第1割り込み信号発生レジスタ107にセットし、第2プロセッサ102に対して第1割り込み信号を発行する。
第1プロセッサ101は第1割り込み信号を発行した後は、通常処理に移行する。
【0079】
一方、第1割り込み信号を受けた第2プロセッサ102は、ステップST201において、アクセスバンク制御レジスタ(CTLREG)111および第1パラメータ伝達レジスタ(TRFREG1)109の内容をリードする。
次いで、ステップST202において、第2プロセッサ102は、リードしたアクセスバンク制御レジスタ(CTLREG)111および第1パラメータ伝達レジスタ(TRFREG1)109の内容を検知する。この場合は、第1バンク103から受け渡しデータがあり、第1バンク103に書き込んだこと、および、第2プロセッサ102がアクセスできるバンクが未だ第2バンク104であることを検知(認識)する。
【0080】
そこで、ステップST203において、第2プロセッサ102は、受け渡しデータを受け取る(リード)すべく、バンクのアクセス権を第2バンク104から第1バンク103に変更してほしい旨のデータ(パラメータ)を第2パラメータ伝達レジスタ(TRFREG2)110に書き込む(TRFREG2の内容を変更する)。
次いで、ステップST204において、第2プロセッサ102は、第2割り込み信号を、第2割り込み信号発生レジスタ108にセットし、第1プロセッサ101に対して第1割り込み信号を発行する。
第2プロセッサ102は第2割り込み信号を発行した後は、通常処理に移行する。
【0081】
第2割り込み信号を受けた第1プロセッサ101は、ステップST105において、第2パラメータ伝達レジスタ(TRFREG2)110の内容をリードする。
次いで、ステップST106において、第1プロセッサ101は、リードした第2パラメータ伝達レジスタ(TRFREG2)110の内容を検知する。この場合は、第2プロセッサ102のバンクのアクセス権を第2バンク104から第1バンク103に変更することに要望であることを検知(認識)する。
【0082】
そこで、ステップST107において、第1プロセッサ101は、アクセスバンク制御レジスタ111に、自プロセッサ101が第2バンク104をアクセス(リードおよびライト)し、第2プロセッサ102が第1バンク103をアクセス(リードおよびライト)することを許容する制御データを書き込む。
次に、ステップST108において、第1プロセッサ101は、アクセスバンク制御レジスタ111に、自プロセッサ101が第2バンク104をアクセス(リードおよびライト)し、第2プロセッサ102が第1バンク103をアクセス(リードおよびライト)することを許容する制御データを書き込んだことを示すデータ(パラメータ)を第1パラメータ伝達レジスタ(TRFREG1)109に書き込む(TRFREG1の内容を変更する)。
次いで、ステップST109において、第1プロセッサ101は、第1割り込み信号を、第1割り込み信号発生レジスタ107にセットし、第2プロセッサ102に対して第1割り込み信号を発行する。
第1プロセッサ101は第1割り込み信号を発行した後は、通常処理に移行する。
【0083】
第1割り込み信号を受けた第2プロセッサ102は、ステップST205において、アクセスバンク制御レジスタ(CTLREG)111および第1パラメータ伝達レジスタ(TRFREG1)109の内容をリードする。
次いで、ステップST206において、第2プロセッサ102は、リードしたアクセスバンク制御レジスタ(CTLREG)111および第1パラメータ伝達レジスタ(TRFREG1)109の内容を検知する。この場合は、アクセスバンクが切り替えられ、第2プロセッサ102が第1バンク103をアクセスできるようになったことを検知(認識)する。
【0084】
そこで、ステップST207において、第2プロセッサ102は、受け渡しデータを受け取る(リード)すべく、第1バンク103のアクセスし受け渡しデータを読み出す。
次いで、ステップST208において、第2プロセッサ102は、受け渡しデータを受け取る(リード)すべく、第1バンク103のアクセスを完了したことを示すデータ(パラメータ)を第2パラメータ伝達レジスタ(TRFREG2)110に書き込む(TRFREG2の内容を変更する)。
次いで、ステップST209において、第2プロセッサ102は、第2割り込み信号を、第2割り込み信号発生レジスタ108にセットし、第1プロセッサ101に対して第2割り込み信号を発行する。
第2プロセッサ102は第2割り込み信号を発行した後は、通常処理に移行する。
【0085】
第2割り込み信号を受けた第1プロセッサ101は、ステップST110において、第2パラメータ伝達レジスタ(TRFREG2)110の内容をリードする。
次いで、ステップST111において、第1プロセッサ101は、リードした第2パラメータ伝達レジスタ(TRFREG2)110の内容を検知する。この場合は、第2プロセッサ102が受け渡しデータがリードし、データが受け渡されたことを検知(認識)する。
そして、第1プロセッサ101は、通常処理に移行する。
【0086】
このように、本実施形態に係るマルチプロセッサシステム100においては、第1プロセッサ101と第2プロセッサ102間でデータ受け渡しを行う場合には、第1プロセッサ101は、この制御データによるバンク切り替えを繰り返し行う。
そして、第1プロセッサ101および第2プロセッサ102は、“パラメータ伝達レジスタ”および“割り込み発生レジスタ”を組み合わせて使用することにより、「他方のプロセッサが何をしたか」、「他方のプロセッサが何を要求しているか」、「他方のプロセッサが何の状態にいるか」を知ることができる。
【0087】
なお、ソフトウェア制御においては、“パラメータ伝達レジスタ”に書かれるデータが何を意味するのか、をソフトウェア仕様で定義しておくことによって、第1に第1プロセッサ101がバンク切り替えの設定を行なう場合のフロー、第2に第2プロセッサ102がバンク切り替えの要求をプロセッサ102に出す場合のフロー、を決定し、この回路による、共有メモリを使用したプロセッサ間のデータ受け渡しシステムを確立できる。
【0088】
以上説明したように、本第1の実施形態によれば、第1プロセッサ101と、第2プロセッサと、共有メモリを区分けした第1バンク103および第2バンク104と、第1プロセッサ101により2つある第1バンク103および第2バンク104のうちのいずれかを自プロセッサ101および第2プロセッサ102がアクセスするかを決定する制御データが書き込まれ、第2プロセッサ102から制御データの読み出しのみが可能なアクセスバンク制御レジスタ111と、第1プロセッサ101から第2プロセッサ102に伝達すべき内容を書き込みかつ変更可能で、第2プロセッサ102から内容をリード可能な第1パラメータ伝達レジスタ109と、第1プロセッサ101から第2プロセッサ102に対して割り込み発行するための第1割り込み信号発生レジスタ107と、第2プロセッサ102から第1プロセッサ101に伝達すべき内容を書き込みかつ変更可能で、第1プロセッサ101から内容をリード可能な第2パラメータ伝達レジスタ110と、第2プロセッサ102から第1プロセッサ101に対して割り込み発行するための第2割り込み信号発生レジスタ108とを有すること、以下の効果を得ることができる。
【0089】
すなわち、共有メモリによる、プロセッサ間のデータ受け渡しを行う場合に、異なるプロセッサからのライト・リードの同時アクセスによる、データの取り違えを抑制することができる。
また、プロセッサ間のバスシステムが異なる場合でも対応可能であり、プロセッサ間のクロックが非同期でも対応可能である。
また、設定切り替えに伴うプロセッサの処理フローや、処理に伴うパラメータをソフトウェアで定義できることから、ハード固定化後の柔軟な対応が可能である、逆にいえば、早期のハード固定化が可能となる利点がある。
割り込み信号の相互受け渡しにより、複数プロセッサによる並列処理中のメモリアクセスを、動的に切り替えることが可能である。
さらに、切り替え後のアクセス・オーバーヘッド(メモリにアクセス可能となるまでの期間)は、実際には、クロックが切り替わる分のオーバーヘッド分のみとなり、極小となる。
これらにより、共有メモリによるプロセッサ間のこまめなデータ受け渡しが可能りなり、繰り返し処理により、大きなデータの受け渡しも実現可能である。
【0090】
プロセッサ数が3個以上になった場合であって、回路規模を抑えたい場合には、メモリ周りの構成は最小限(バンク数:2)で構成することが可能である。
また、アクセス効率を上げたい場合には、バンク数を増やし、アクセスできないプロセッサを無くす、すなわち最大バンク数=プロセッサ数として構成することも可能である。
上記のように、要求に合わせて、柔軟に構成を選択可能である。
【0091】
切り替えはプロセッサバスのアーキテクチャに左右されるメモリコントローラとバンクで行うので、プロセッサが増えた場合の対応も、セレクタの選択数を増やすのみでよく、容易に対応可能である。
プロセッサが増えた場合のオーバーヘッド分としては、共有メモリのバンク構成を増やす選択をしなければ、パラメータ伝達レジスタと割り込み発生回路のみでよいので、回路規模増加は非常に少ない。
バスのアーキテクチャが変わった場合でも、変化のあったバス側のメモリコントローラおよびレジスタ部分の対応のみでよい。
上記の内容により、IP化による使い回しも容易にできる利点がある。
【0092】
なお、プロセッサの優位性の決定は、チップのアーキテクチャとして決めても良いし、プロセッサ同士の設定により、制御できるようにしても良い。
【0093】
共有メモリを構成するメモリとして代表的なものは、シングルポートのSRMAを例としてあげたが、デュアルポートSRAM、DRAM等でも構わない。
また、共有メモリを構成するメモリは、同期/非同期、どちらでも構わない。
【0094】
第2実施形態
図14は、本発明に係るマルチプロセッサシステムの第2の実施形態を示す構成図である。
【0095】
本第2の実施形態と第1の実施形態が異なる点は、プロセッサ数が3個になった場合であって、回路規模を抑えるために、メモリ周りの構成は最小限、すなわち第1の実施形態と同じくバンク数を2として構成している。
【0096】
具体的には、第1プロセッサ101、第2プロセッサ102に加えて、第3プロセッサ128を設けている。
第3プロセッサ128の増加に伴い、第3割り込み信号発生レジスタ(IRPTREG3)129、第3パラメータ伝達レジスタ(TRFREG3)130、第3プロセッサバス(BS−C)131を設けている。
そして、第1〜第3割り込み信号発生レジスタ107,108,129、および第1〜第3パラメータ伝達レジスタ109,110,130は、それぞれの信号、データの行き先を、「自プロセッサ以外の」2つに増やしている。
【0097】
具体的には、第1プロセッサ101により第1割り込み信号発生レジスタ107にセットされる第1割り込み信号は、第2プロセッサ102および第3プロセッサ128に供給される。
第2プロセッサ102により第2割り込み信号発生レジスタ108にセットされる第2割り込む信号は第1プロセッサ101および第3プロセッサ128に供給される。
第3プロセッサ128により第3割り込み信号発生レジスタ129にセットされる第3割り込む信号は第1プロセッサ101および第2プロセッサ102に供給される。
【0098】
第1プロセッサ101は、第1パラメータ伝達レジスタ109に、自プロセッサの状態・リクエストの内容等、詳細情報を伝達するためのパラメータを、ローカルバス114、第1プロセッサバス105、およびローカルバス116を介して書き込む。この第1パラメータ伝達レジスタ109に書き込まれた伝達パラメータは、第1割り込み信号の発行先である第2プロセッサ102が、ローカルバス117、第2プロセッサバス106、およびローカルバス126を介して読み出す。同様に、第1割り込み信号の発行先である第3プロセッサ128が、ローカルバス132、第3プロセッサバス131、およびローカルバス140を介して読み出す。
【0099】
第2プロセッサ102は、第2パラメータ伝達レジスタ110に、自プロセッサの状態・リクエストの内容等、詳細情報を伝達するためのパラメータを、ローカルバス126、第2プロセッサバス106、およびローカルバス119を介して書き込む。この第2パラメータ伝達レジスタ110に書き込まれた伝達パラメータは、第2割り込み信号の発行先である第1プロセッサ101が、ローカルバス118、第1プロセッサバス105、およびローカルバス114を介して読み出す。同様に、第2割り込み信号の発行先である第3プロセッサ128が、ローカルバス133、第3プロセッサバス131、およびローカルバス140を介して読み出す。
【0100】
第3プロセッサ128は、第3パラメータ伝達レジスタ130に、自プロセッサの状態・リクエストの内容等、詳細情報を伝達するためのパラメータを、ローカルバス140、第3プロセッサバス131、およびローカルバス134を介して書き込む。この第3パラメータ伝達レジスタ130に書き込まれた伝達パラメータは、第3割り込み信号の発行先である第1プロセッサ101が、ローカルバス136、第1プロセッサバス105、およびローカルバス114を介して読み出す。同様に、第3割り込み信号の発行先である第2プロセッサ106が、ローカルバス135、第2プロセッサバス106、およびローカルバス126を介して読み出す。
【0101】
また、第1プロセッサ101は、アクセスバンク制御レジスタ111に、ローカルバス114、第1プロセッサバス105、およびローカルバス120を介して、2つある第1バンク103および第2バンク104のうちのいずれかを自プロセッサ101および第2プロセッサ102がアクセスするかを決定する制御データを書き込む。
アクセスバンク制御レジスタ111に書き込まれた制御データは、第2プロセッサ102によりローカルバス121、第2プロセッサバス106、およびローカルバス126を介して読み出される。第2プロセッサ102は、読み出した制御データに基づいてアクセス可能なバンクを認識する。
同様に、アクセスバンク制御レジスタ111に書き込まれた制御データは、第3プロセッサ128によりローカルバス137、第3プロセッサバス131、およびローカルバス140を介して読み出される。第3プロセッサ128は、読み出した制御データに基づいてアクセス可能なバンクを認識する。
【0102】
また、第3プロセッサ128は、ローカルバス140、第3プロセッサバス131、ローカルバス138、および第1メモリコントローラ112を介して第1バンク103にアクセスする。同様に、第3プロセッサ128は、ローカルバス140、第3プロセッサバス131、ローカルバス139、およびメモリコントローラ113を介して第2バンク104にアクセスする。
【0103】
なお、アクセスバンク制御レジスタ111に書き込まれた制御データとしては、たとえば図3に示すコントロールレジスタのビット0に加えてビット1およびビット2を加えて3ビットデータとして用いられる。
【0104】
図18は、バンクアクセス制御ビットに設定される制御データに応じた2つのバンクの3つのプロセッサへの割り当て例を示す図である。
図18に示すように、たとえば本第2の実施形態では、第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「000」を設定し場合には、第1プロセッサ101が第1バンク103側をアクセスし、第2プロセッサ102が第2バンク104側をアクセスする。
この場合、第3プロセッサ128は第1バンク103および第2バンク104にアクセスができない。
第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「001」を設定し場合には、第1プロセッサ101が第2バンク104側をアクセスし、第2プロセッサ102が第1バンク103側をアクセスする。
この場合も、第3プロセッサ128は第1バンク103および第2バンク104にアクセスができない。
【0105】
第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「010」を設定し場合には、第1プロセッサ101が第1バンク103側をアクセスし、第3プロセッサ128が第2バンク104側をアクセスする。
この場合、第2プロセッサ102は第1バンク103および第2バンク104にアクセスができない。
第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「011」を設定し場合には、第1プロセッサ101が第2バンク104側をアクセスし、第3プロセッサ128が第1バンク103側をアクセスする。
この場合、第2プロセッサ102は第1バンク103および第2バンク104にアクセスができない。
【0106】
第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「100」を設定し場合には、第2プロセッサ102が第1バンク103側をアクセスし、第3プロセッサ128が第2バンク104側をアクセスする。
この場合、第1プロセッサ101は第1バンク103および第2バンク104にアクセスができない。
第1プロセッサ101がビット2、ビット1、ビット0に制御データとして「101」を設定し場合には、第2プロセッサ102が第2バンク104側をアクセスし、第3プロセッサ128が第1バンク103側をアクセスする。
この場合、第1プロセッサ101は第1バンク103および第2バンク104にアクセスができない。
【0107】
本第2の実施形態に係る第1メモリコントローラおよび第2メモリコントローラは、第1の実施形態の場合と略同様の機能を有するが、プロセッサが1つ増えた分だけ、図9の回路に対してバンクコントローラが1つ増えた構成となる。
【0108】
図19は、本第2の実施形態に係るメモリコントローラの具体的な構成例を示す図である。
このメモリコントローラ400(112,113)は、図19に示すように、第1バンクコントローラ(BNKCTL−A)401、第2バンクコントローラ(BNKCTL−B)402、第3バンクコントローラ(BNKCTL−C)403、第1切り替えスイッチ404、および第2切り替えスイッチ404を有する。
【0109】
第1バンクコントローラ401は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、第1プロセッサバス(BS−A)105を通して供給される第1プロセッサ101によるアドレスADR、ライトデータWDT、制御信号WE,IH等を受けて所定のタイミングでアクセスすべき第1バンク103または第2バンク104側に出力し、第1バンク103または第2バンク104から読み出されたデータを所定のタイミングで第1プロセッサバス(BS−A)105に送出する。
【0110】
第2バンクコントローラ402は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、第2プロセッサバス(BS−B)106を通して供給される第2プロセッサ102によるアドレスADR、ライトデータWDT、制御信号WE,IH等を受けて所定のタイミングでアクセスすべき第1バンク103または第2バンク104側に出力し、第1バンク103または第2バンク104から読み出されたデータを所定のタイミングで第2プロセッサバス(BS−B)106に送出する。
【0111】
第3バンクコントローラ403は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第3プロセッサ128により行うことを示している場合に、第3プロセッサバス(BS−C)131を通して供給される第3プロセッサ128によるアドレスADR、ライトデータWDT、制御信号WE,IH等を受けて所定のタイミングでアクセスすべき第1バンク103または第2バンク104側に出力し、第1バンク103または第2バンク104から読み出されたデータを所定のタイミングで第3プロセッサバス(BS−C)131に送出する。
【0112】
第1切り替えスイッチ404は、端子aが第1バンク103または第2バンク104の入力端子に接続されたバス406に接続され、端子bが第1バンクコントローラ401のバンク側への出力端子に接続されたバス406に接続され、端子cが第2バンクコントローラ402のバンク側への出力端子に接続されたバス408に接続され、端子dが第3バンクコントローラ403のバンク側への出力端子に接続されたバス409に接続されている。
そして、第1切り替えスイッチ403は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、端子aと端子bとを接続して、第1バンクコントローラ401が所定のタイミングでバス407に送出した第1プロセッサ101によるアドレスADR、ライトデータWDT、制御信号WE,IH等をバス406に伝播させて第1バンク103または第2バンク104に入力させる。
第1切り替えスイッチ404は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、端子aと端子cとを接続して、第2バンクコントローラ402が所定のタイミングでバス408に送出した第2プロセッサ102によるアドレスADR、ライトデータWDT、制御信号WE,IH等をバス406に伝播させて第1バンク103または第2バンク104に入力させる。
第1切り替えスイッチ404は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第3プロセッサ128により行うことを示している場合に、端子aと端子dとを接続して、第3バンクコントローラ403が所定のタイミングでバス409に送出した第3プロセッサ128によるアドレスADR、ライトデータWDT、制御信号WE,IH等をバス406に伝播させて第1バンク103または第2バンク104に入力させる。
【0113】
第2切り替えスイッチ405は、端子aが第1バンク103または第2バンク104のクロック入力端子に接続され、端子bが第1プロセッサ101用のクロックCLK−Aの供給ラインに接続され、端子cが第2プロセッサ102用のクロックCLK−Bの供給ラインに接続され、端子dが第3プロセッサ128用のクロックCLK−Cの供給ラインに接続されている。
そして、第2切り替えスイッチ405は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第1プロセッサ101により行うことを示している場合に、端子aと端子bとを接続して、クロックCLK−Aを第1バンク103または第2バンク104に入力させる。
第2切り替えスイッチ405は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第2プロセッサ102により行うことを示している場合に、端子aと端子cとを接続して、クロックCLK−Bを第1バンク103または第2バンク104に入力させる。
第2切り替えスイッチ405は、アクセスバンク制御レジスタ111に設定された制御データが、第1バンク103または第2バンク104へのアクセスが第3プロセッサ128により行うことを示している場合に、端子aと端子dとを接続して、クロックCLK−Cを第1バンク103または第2バンク104に入力させる。
【0114】
このように、本第2の実施形態に係るバンクコントローラ400は、対応するバンクを、第1プロセッサ101、第2プロセッサ102または第3プロセッサ128のどちらからのコントロールを受け付けるかを選択し、かつ、バンクへのクロックも、それぞれのプロセッサ(バス)に同期したクロックを選択してバンクに分配する。このため、3つのプロセッサのバスアーキテクチャが全く異なったものでも対応が容易で、クロックの同期/ 非同期に関係なく、制御を切り替えることができる。
【0115】
第2の実施形態によれば、上述した第1の実施形態の効果と同様の効果を得ることができる。
【0116】
なお、上述したように、プロセッサ数が3にもかかわらずバンクが2つであることから、アクセスができないプロセッサが生じる。
アクセスできないプロセッサが無くなるようにするには、プロセッサが増えた分、共有メモリのバンク数も増やしてやればよい。
【0117】
【発明の効果】
以上説明したように、本発明によれば、共有メモリによる、プロセッサ間のデータ受け渡しを行う場合に、異なるプロセッサからのライト・リードの同時アクセスによる、データの取り違えを抑制することができる。
また、プロセッサ間のバスシステムが異なる場合でも対応可能であり、プロセッサ間のクロックが非同期でも対応可能である。
また、設定切り替えに伴うプロセッサの処理フローや、処理に伴うパラメータをソフトウェアで定義できることから、ハード固定化後の柔軟な対応が可能である、逆にいえば、早期のハード固定化が可能となる利点がある。
割り込み信号の相互受け渡しにより、複数プロセッサによる並列処理中のRAMアクセスを、動的に切り替えることが可能である。
さらに、切り替え後のアクセス・オーバーヘッド(メモリにアクセス可能となるまでの期間)は、実際には、クロックが切り替わる分のオーバーヘッド分のみとなり、極小となる。
これらにより、共有メモリによるプロセッサ間のこまめなデータ受け渡しが可能りなり、繰り返し処理により、大きなデータの受け渡しも実現可能である。
【0118】
プロセッサ数が3個以上になった場合であって、回路規模を抑えたい場合には、メモリ周りの構成は最小限(バンク数:2)で構成することが可能である。
また、アクセス効率を上げたい場合には、バンク数を増やし、アクセスできないプロセッサを無くす、すなわち最大バンク数=プロセッサ数として構成することも可能である。
上記のように、要求に合わせて、柔軟に構成を選択可能である。
【0119】
切り替えはプロセッサバスのアーキテクチャに左右されるメモリコントローラとバンクで行うので、プロセッサが増えた場合の対応も、セレクタの選択数を増やすのみでよく、容易に対応可能である。
プロセッサが増えた場合のオーバーヘッド分としては、共有メモリのバンク構成を増やす選択をしなければ、パラメータ伝達レジスタと割り込み発生回路のみでよいので、回路規模増加は非常に少ない。
バスのアーキテクチャが変わった場合でも、変化のあったバス側のメモリコントローラおよびレジスタ部分の対応のみでよい。
【図面の簡単な説明】
【図1】本発明に係るマルチプロセッサシステムの第1の実施形態を示す図である。
【図2】第1プロセッサによりアクセスバンク制御レジスタに対して、自プロセッサに第1バンクを割り当て、第2プロセッサに第2バンクを割り当てた場合のアクセス経路を示す図である。
【図3】第1プロセッサのコントロールレジスタの構成例を示す図である。
【図4】バンクアクセス制御ビットに設定される制御データに応じた2つのバンクの2つのプロセッサへの割り当て例を示す図である。
【図5】第2プロセッサインタフェースオンレジスタの構成例を示す図である。
【図6】第2プロセッサインタフェースオンレジスタの設定例を示す図である。
【図7】第2プロセッサのコントロールレジスタの構成例を示す図である。
【図8】バンクアクセス制御ビットに設定される制御データに応じた共有メモリの選択バンクの第2プロセッサへの割り当て例を示す図である。
【図9】第1の実施形態に係るメモリコントローラの具体的な構成例を示す図である。
【図10】シングルポートSRAMの具体的な構成例を示すブロック図である。
【図11】シングルポートSRAMの動作モードと入出力の状態を説明するための図である。
【図12】(A)〜(D)はリードモード時の処理を説明するためのタイミングチャートである。
【図13】(A)〜(E)はライトモード時の処理を説明するためのタイミングチャートである。
【図14】(A)〜(F)は、リードモードおよびライトモード時のクロックがアクティブ(active)になるタイミングを示すタイミングチャートである。
【図15】(A)〜(F)は、リードモードおよびライトモード時のクロックがインヒビット(inhibit) になるタイミングを示すタイミングチャートである。
【図16】図1のマルチプロセッサシステムに動作を説明するための図である。
【図17】本発明に係るマルチプロセッサシステムの第2の実施形態を示す図である。
【図18】バンクアクセス制御ビットに設定される制御データに応じた2つのバンクの3つのプロセッサへの割り当て例を示す図である。
【図19】第2の実施形態に係るメモリコントローラの具体的な構成例を示す図である。
【図20】従来の第1の方法を採用したマルチプロセッサシステムの構成例を示す図である。
【図21】従来の第2の方法を採用したマルチプロセッサシステムの第1の構成例を示す図である。
【図22】従来の第2の方法を採用したマルチプロセッサシステムの第2の構成例を示す図である。
【符号の説明】
100、100A…マルチプロセッサシステム、101…第1プロセッサ(PRC−A)、102…第2プロセッサ(PRC−B)、103…第1メモリバンク(BNK1)、104…第2メモリバンク(BNK2)、105…第1プロセッサバス(BS−A)、106…第2プロセッサバス(BS−B)、107…第1割り込み信号発生レジスタ(IRPTREG1)、108…第2割り込み信号発生レジスタ(IRPTREG2)、109…第1パラメータ伝達レジスタ(TRFREG1)、110…第2パラメータ伝達レジスタ(TRFREG2)、111…アクセスバンク制御レジスタ(CTLREG)、112…第1メモリコントローラ(MCTL1)、113…第2メモリコントローラ(MCTL2)、114〜127…ローカルバス、128…第3プロセッサ(PRC−C)、129…第3割り込み信号発生レジスタ(IRPTREG3)、130…第3パラメータ伝達レジスタ(RTFREG3)、131…第3プロセッサバス(BS−C)、132〜141…ローカルバス、200…メモリコントローラ、201…第1バンクコントローラ(BNKCTL−A)、202…第2バンクコントローラ(BNKCTL−B)、203…第1切り替えスイッチ、204…第2切り替えスイッチ、400…メモリコントローラ、401…第1バンクコントローラ(BNKCTL−A)、402…第2バンクコントローラ(BNKCTL−B)、403…第3バンクコントローラ(BNKCTL−C)、404…第1切り替えスイッチ、405…第2切り替えスイッチ。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a multiprocessor system in which a plurality of processors share a memory, and more particularly to access control of a memory shared by a plurality of processors.
[0002]
In the ASIC design, the number of cases in which a plurality of processors are incorporated in one chip has been increasing in recent years in order to achieve the functions required by the LSI.
Processors to be incorporated are different processors or different clock frequencies and bus systems (bus architecture, bit width, etc.) in consideration of the required processing capacity and the balance between the processor scale and power consumption. Not a few.
[0003]
In such a case, a method using a memory is considered as one of data transfer means between a plurality of processors, and the following two configuration methods are known as systems.
[0004]
The first method is to develop the memory on a share and place the memory for data exchange on the share.
FIG. 20 is a diagram showing a configuration example of a multiprocessor system employing the first method.
As shown in FIG. 20, the multiprocessor system 10 includes a first processor (PRC-A) 11, a second processor (PRC-B) 12, a shared memory (SRAM) 13 composed of, for example, an SRAM, and a shared bus (SBS). 14, a first processor bus (BS-A) 15, a second processor bus (BS-B) 16, a shared bus bridge (SBRG) 17, and a shared access arbiter (ARBTR) 18.
[0005]
In the multiprocessor system 10 of FIG. 20, a bus from each of the processors 11 and 12 is provided with a bridge circuit 17 for connecting to the shared bus 16, and the memory access itself is expanded on the shared bus 16 to divide access requests in a time-division manner. This is the method of assigning.
[0006]
The second method is a method that is also used in a pre-designed type using a dual-port RAM as a memory for transferring data between processors.
[0007]
FIG. 21 is a diagram illustrating a first configuration example of a multiprocessor system employing the second method.
[0008]
As shown in FIG. 21, the multiprocessor system 20 includes a first processor (PRC-A) 21, a second processor (PRC-B) 22, a first shared memory (SRAM1) It has a second shared memory (SRAM2) 24 composed of a port SRAM, a first processor bus (BS-A) 25, and a second processor bus (BS-B) 26.
[0009]
The multiprocessor system 20 of FIG. 21 is a case where two 1-port / 1-read (1 Write / 1 Read) dual-port SRAMs are used as a shared memory.
In the multiprocessor system 20, the first shared memory 23 is dedicated for writing (writing) from the second processor 22 via the second processor bus 26 and the write port (WPO) 23W, and the read port ( It is configured to function as a read-only RAM via an RPO 23R. Similarly, the second shared memory 24 is dedicated to writing from the first processor 21 via the first processor bus 25 and the write port (WPO) 24W, and from the second processor 22 to the second processor bus 26 and the read port (WPO). It is configured to function as a read-only RAM via an RPO (RPO) 24R.
[0010]
FIG. 22 is a diagram showing a second configuration example of the multiprocessor system employing the second method.
[0011]
The multiprocessor system 20A shown in FIG. 22 is a case where one dual-port SRAM of 2 write / 2 read (2 Write / 2 Read) is used as the shared memory 27.
In the multiprocessor system 20A, the shared memory 27 is read or written by the first processor 22 via the first processor bus 25 and the read / write port (R / WPO) 27RW-1. Data is read or written from the second processor 22 via a read / write port (R / WPO) 27RW-2.
[0012]
Further, as a conventional multiprocessor system, two memories in a shared memory establish a master-slave relationship in a closed functional block called a shared memory, and write / read (Write / Read) from one of the processors. Is compared and transmitted to another processor to guarantee the access data (Patent Document 1).
[0013]
Another conventional multiprocessor system employs an arbitration system that switches access to a shared memory in the order of arrival of requests (Patent Document 2).
[0014]
[Patent Document 1]
JP-A-11-312126
[Patent Document 2]
JP 2000-10901 A
[0015]
[Problems to be solved by the invention]
However, the multiprocessor system shown in FIG. 20 has the following disadvantages.
An arbiter function for bus access must be provided for control when requests overlap. Arbiters become more complex and more difficult to design as the number of processors increases.
Further, since the bus is time-divided, the overhead (inaccessible time) increases as the number of processors increases.
In addition, it is necessary to design the bridge between the bus from each processor and the shared bus in accordance with each processor bus, which increases the design labor.
[0016]
The multiprocessor systems shown in FIGS. 21 and 22 have the following disadvantages.
In each case, the biggest problem is the solution when the write address of one processor and the read address of the other processor overlap.
It is relatively easy to avoid simply avoiding the case where access addresses completely overlap, because it is only necessary to wait for one of them.
However, in a bus system having different access rates, if accesses overlap at a certain moment, a situation occurs in which data update is switched from that moment. To avoid this, the processors must understand each other's access status.
As a solution, it is easy means to determine the access timing of each processor by software. In addition, the dual-port RAM naturally has a larger area (scale) than the single-port RAM. Further, the dual-port RAM often has different functions and access specifications depending on the ASIC vendor and process technology. Even if this example is applied as it is, 1 write / 1 read (1 Write / 1 Read) or 2 write / 2 read ( If there is no dual-write (2Write / 2Read) RAM, the configuration and the specifications of the RAM controller must be reconsidered.
[0017]
Further, in the multiprocessor system described in Patent Literature 1, since two memories in the shared memory have a master-slave relationship in a closed functional block called a shared memory, a bus between the shared memories is required. Since each memory must be accessed and complicated processing such as comparison / transfer processing is required, there is a disadvantage that the degree of freedom and flexibility of access control is poor.
[0018]
Further, the multiprocessor system described in Patent Document 2 must have an arbiter function, similarly to the system of FIG. 20 described above. Therefore, as the number of processors increases, the multiprocessor system becomes more complicated and design becomes difficult.
[0019]
SUMMARY OF THE INVENTION An object of the present invention is to suppress data mix-up due to simultaneous access of write and read from different processors when data is transferred between processors, and have excellent flexibility and flexibility in access control. An object of the present invention is to provide a multiprocessor system that can be easily designed.
[0020]
[Means for Solving the Problems]
In order to achieve the above object, a first aspect of the present invention is a multiprocessor system in which a plurality of processors share a memory, wherein the memory includes at least two or more banks and the plurality of processors Is set to determine which one of the plurality of banks is to be accessed. The control data is rewritable control data setting means, and the processor has access to the memory having the bank configuration from each of the processors. When the error occurs, there is provided control means for performing control so that each processor inevitably can access only the bank assigned by the control data set in the control data setting means.
[0021]
In the present invention, the control data set in the control data setting means is such that one of the plurality of banks is accessed by one of the processors, and the other one of the banks is controlled by a different processor. It includes data instructing the control means to accept the access.
[0022]
In the present invention, only one of the plurality of processors has a right to determine access to each bank, and the control data is sent to the control data setting means only from the one processor having the superiority. After the setting, the other processor accesses the bank assigned by the control data set in the control data setting means.
Preferably, the determination of the superiority of the one processor is determined as a chip architecture.
The determination of the superiority of the one processor is controlled by the settings of the processors.
[0023]
Preferably, each of the above-mentioned processors has means for issuing an instantaneous signal to another processor and transmitting information relating to access control.
[0024]
Further, each of the processors has a transmission register that can write and read from its own processor and can only read from another processor, and transmits transmission information relating to access control to another processor. Write to register
[0025]
Preferably, each of the above processors has an interrupt register for issuing an interrupt signal to another processor, and a transmission register that can write and read from its own processor and can only read from another processor. Respectively.
[0026]
Preferably, each of the processors writes transmission information relating to access control to another processor in the corresponding transmission register, and then sets an interrupt signal in the interrupt register to indicate that the other processor has the transmission information. Notify.
[0027]
Preferably, when switching access to the bank from each processor, the control means switches all signals related to the bank, including the clock signal.
Each of the processors operates in synchronization with a different clock.
[0028]
A multiprocessor system according to a second aspect of the present invention includes a first processor, a second processor, a first bank and a second bank in which a shared memory is partitioned, and the first processor and the second bank divided by the first processor. An access bank control register in which control data for determining whether one of the two banks is accessed by the own processor and the second processor is written, and only the control data can be read from the second processor; Alternatively, when an access to the first bank from the second processor occurs, the first or second processor inevitably allocates the data by the control data set in the access bank control register. Memory controller that performs control so that only the first bank can be accessed When an access to the second bank from the first or second processor occurs, the control data set in the access bank control register is inevitably sent from the first or second processor. And a second memory controller for performing control so that only the second bank assigned by the second memory can be accessed.
[0029]
Preferably, a first transfer register capable of writing and changing the content to be transmitted from the first processor to the second processor, and capable of reading the content from the second processor, And a second transmission register capable of writing and changing the content to be transmitted to the first processor and reading the content from the first processor.
[0030]
Preferably, a first transfer register capable of writing contents to be transmitted from the first processor to the second processor and capable of only reading contents from the second processor, A first interrupt signal generation register for issuing an interrupt to two processors; and a second interrupt signal generating register capable of writing contents to be transmitted from the second processor to the first processor and reading only contents from the first processor. 2 transmission register and a second interrupt signal generation register for issuing an interrupt from the second processor to the first processor.
[0031]
Preferably, the first or second processor writes, in the corresponding first or second transmission register, transmission information relating to access control to another second or first processor, and then writes the first or second transmission register. (2) An interrupt signal is set in the interrupt register to notify the other second or first processor that there is information to be transmitted.
[0032]
According to the present invention, for example, the control data for determining which one of the plurality of banks each of the plurality of processors accesses is set in the control data setting means by one processor having superiority. This control data is provided to the control means.
In the control means, when an access to a memory having a bank configuration from each processor occurs, each processor inevitably accesses only the bank assigned by the control data set in the control data setting means. The switching control that can be performed is performed.
Specifically, control is performed so that one of the plurality of banks receives an access from one processor and the other bank receives an access from a different processor.
With this control, the address area of the shared memory viewed from each processor has no distinction between banks on the address map.
[0033]
As described above, according to the present invention, data is guaranteed in a plurality of banks constituting a shared memory by a configuration defining a processor to be accessed at that time, for example, by setting from a processor. As described above, the definition of the access target is made by setting from the processor whose superiority is determined in advance. This superiority itself may be determined as a system specification or may be defined by software.
In addition, since the processor is responsible for switching access rights, the arbitration of access is controlled by software, and it is necessary to switch the order of arrival of requests, as well as the state of the system at the time of the access request. Accordingly, it is possible to increase the degree of freedom such as the timing, order, and order of switching of the access right.
[0034]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0035]
First embodiment
FIG. 1 is a configuration diagram showing a first embodiment of a multiprocessor system according to the present invention.
In the first embodiment, an example will be described in which two processors are mounted and the bank configuration of the shared memory is two.
[0036]
As shown in FIG. 1, the multiprocessor system 100 includes a first processor (PRC-A) 101, a second processor (PRC-B) 102, a first memory bank (BNK1) 103 composed of a single-port SRAM, for example, A second memory bank (BNK2) 104 composed of a port SRAM, a first processor bus (BS-A) 105, a second processor bus (BS-B) 106, a first interrupt signal generation register (IRPTREG1) 107, a second interrupt signal Generation register (IRPTREG2) 108, first parameter transmission register (TRFREG1) 109, second parameter transmission register (TRFREG2) 110, access bank control register (CTLREG) 111, first memory controller (MCTL1) 112, second memory controller Rollers (MCTL2) 113, and has a local bus 114-127.
Among these components, a control data setting unit is configured by the access bank control register (CTLREG) 111, and a control unit is configured by the first memory controller (MCTL1) 112 and the second memory controller (MCTL2) 113.
[0037]
In the multiprocessor system 100 according to the first embodiment, the first processor 101 can read (read) and write (write) the first parameter transfer register 109 and the access bank control register 111, and The parameter transfer register 110 can be read only (Read Only).
On the other hand, the second processor 102 can only read (Read Only) the first parameter transfer register 109 and the access bank control register 111, and can read and write the second parameter transfer register 110.
[0038]
In the present embodiment, the first processor 101 and the second processor 102 operate in synchronization with clocks having different frequencies. For example, the first processor 101 operates in synchronization with the clock CLK-A, and the second processor 102 operates in synchronization with the clock CLK-B.
In the present embodiment, the bus architecture of the first processor 101 is different from the bus architecture of the second processor.
Also, for example, the first processor 101 and the second processor 102 can be mounted in a form in which the clock frequency is variable and can operate at different frequencies.
[0039]
When an access to the shared memory having the bank configuration from the first and second processors 101 and 102 occurs, the multiprocessor system 100 is inevitably assigned from the processors 101 and 102 at that time. It is configured to perform control so that only the bank in which the data is stored can be accessed. With this control, the address area of the shared memory viewed from each processor has no distinction between banks on the address map.
The setting of the access right to the first and second memory banks (hereinafter, simply referred to as banks) 103 and 104 of the shared memory is performed by one processor (first processor 101 in the present embodiment) whose superiority is determined. And the second processor 102 does not control the memory access right.
As described above, by controlling the access right by the processor setting, the timing control and the order control of the access right switching can be freely controlled by software.
[0040]
The first processor 101 sends one of the two first bank 103 and second bank 104 to the access bank control register 111 via the local bus 114, the first processor bus 105, and the local bus 120. The control data for determining whether or not the processor 101 and the second processor 102 access is written.
The control data written in the access bank control register 111 is read by the second processor 102 via the local bus 121, the second processor bus 106, and the local bus 126. The second processor 102 recognizes an accessible bank based on the read control data.
[0041]
For example, when the first processor 101 allocates the first bank 103 to its own processor 101 and allocates the bank 104 to the second processor 102 for the access bank control register 111, as shown in FIG. Can access (read and write) the bank 103 through the local bus 114, the first processor bus 105, the local bus 122, and the first memory controller 112, and the second processor 102 can use the local bus 126, the second processor The bank 104 can be accessed (read and written) through the bus 106, the local bus 125, and the second memory controller 113.
When data is actually transferred between processors, the first processor 101 is realized by repeatedly performing bank switching based on the control data.
[0042]
The first processor 101 sets a signal with immediacy, in this embodiment, a first interrupt signal, in the first interrupt signal generation register 107 via the local bus 114, the first processor bus 105, and the local bus 115. Issue a first interrupt signal to the second processor 102.
The first processor 101 issues a first interrupt signal to the second processor 102, for example, when starting access to the first bank 103 or the second bank 104, which is a shared memory for data transfer, There is a case where the access to the bank 103 or the second bank 104 is completed and a case where the setting of the access right to the first bank 103 or the second bank 104 is changed.
[0043]
In addition, the first processor 101 sends, to the first parameter transfer register 109, a parameter for transmitting detailed information, such as the status of the own processor and the content of the request, on the local bus 114, the first processor bus 105, and the local bus 116. Write through. The transfer parameters written in the first parameter transfer register 109 are read out by the second processor 102 to which the first interrupt signal is issued, via the local bus 117, the second processor bus 106, and the local bus 126.
The first processor 101 uses the first interrupt signal generation register 107 and the first parameter transmission register 109 together.
Specifically, the first processor 101 issues a corresponding first interrupt signal to the second processor 102 after rewriting the contents of the first parameter transfer register 109. After that, the second processor 102 can read the contents of the first parameter transfer register 109, thereby transmitting detailed information such as the state of the own processor 101 and the contents of the request to the second processor 102.
[0044]
The second processor 102 sets the second interrupt signal in the second interrupt signal generation register 108 via the local bus 126, the second processor bus 106, and the local bus 127, and issues a second interrupt signal to the first processor 101. Issue a signal.
The case where the second processor 102 issues the second interrupt signal to the first processor 101 is, for example, when starting access to the first bank 103 or the second bank 104 which is a shared memory for data transfer. There are times when the access to the bank 103 or the second bank 104 is completed, and times when the access right setting for the first bank 103 or the second bank 104 is to be changed.
[0045]
Further, the second processor 102 transmits, to the second parameter transmission register 110, a parameter for transmitting detailed information such as the state of the own processor and the content of the request, and the like to the local bus 126, the second processor bus 106, and the local bus 119 Write through. The transfer parameters written in the second parameter transfer register 110 are read out by the first processor 101 to which the second interrupt signal is issued, via the local bus 118, the first processor bus 105, and the local bus 114.
The second processor 102 uses the second interrupt signal generation register 108 and the second parameter transmission register 110 together.
Specifically, the second processor 102 issues a corresponding second interrupt signal to the first processor 101 after rewriting the contents of the second parameter transfer register 110. After that, the first processor 101 reads the contents of the second parameter transfer register 110, so that detailed information such as the state of the own processor 102 and the contents of the request can be transmitted to the first processor 101.
[0046]
The first interrupt signal generation register 107 and the access bank control register 111 correspond to a control register of the first processor 101.
[0047]
FIG. 3 is a diagram illustrating a configuration example of a control register of the first processor.
As shown in FIG. 3, this control register is composed of eight bits, bits 0 to 7, and uses only two bits, bit 0 (LSB) and bit 7 (MSB).
Bit 7 is a bit corresponding to the first interrupt signal generation register 107, and bit 0 is a control bit corresponding to the access bank control register 111.
[0048]
Bit 7 (INT) is a bit that generates an interrupt request to the second processor 102 and indicates that data transfer has been completed.
For example, when the bit 7 is set to “0”, it is invalid, and when it is set to “1”, it is when an interrupt request to the second processor 102 is generated. For example, bit 7 automatically returns to "0" after setting "1".
[0049]
Bit 0 (BNK) is a bit that controls which of first bank 103 and second bank 104 is accessed.
FIG. 4 is a diagram showing an example of allocation of two banks to two processors according to control data set in a bank access control bit.
As shown in FIG. 4, for example, in the first embodiment, when the first processor 101 sets “0” as control data in bit 0, the first processor 101 accesses the first bank 103 side. , The second processor 102 accesses the second bank 104 side.
On the other hand, when the first processor 101 sets “1” to the bit 0 as control data, the first processor 101 accesses the second bank 104 and the second processor 102 accesses the first bank 103. .
[0050]
Note that when switching banks, the second processor interface must be on by the second processor interface on register.
[0051]
FIG. 5 is a diagram illustrating a configuration example of the second processor interface on register.
As shown in FIG. 5, the second processor interface on register is composed of eight bits, bits 0 to 7, and uses only bit 0 (LSB).
Bit 0 controls ON / OFF of the second processor interface.
For example, in the present embodiment, as shown in FIG. 6, the second processor interface is off when "0" is written to bit 0, and the second processor interface is on when "1" is written to bit 0. It is.
When the second processor interface is not used, writing “0” to this bit 0 can reduce power consumption in the second processor interface.
[0052]
The second interrupt signal generation register 108 and the access bank control register 111 correspond to a control register of the second processor 102.
[0053]
FIG. 7 is a diagram illustrating a configuration example of a control register of the second processor.
As shown in FIG. 7, this control register is composed of 16 bits of bits 0 to 15, and uses only two bits of bit 0 and bit 7.
Bit 7 is a bit corresponding to the second interrupt signal generation register 108, and bit 0 is a control bit corresponding to the access bank control register 111.
[0054]
Bit 7 (INT) is a bit for generating an interrupt request to the first processor 101.
For example, when the bit 7 is set to “0”, it is invalid, and when it is set to “1”, it is when an interrupt request to the first processor 101 is generated. For example, if bit 7 is set to “1”, it automatically returns to “0” when a pulse is generated.
[0055]
Bit 0 (BNK) is a bit that controls which of first bank 103 and second bank 104 is accessed. This bit 0 is read-only. Therefore, the first bank 103 and the second bank 104 cannot be switched from the second processor 102 side.
FIG. 8 is a diagram illustrating an example of allocation of a selected bank of a shared memory to a second processor according to control data set in a bank access control bit.
As shown in FIG. 8, for example, in the first embodiment, when "0" is set as the control data in bit 0, it is determined that the second bank 104 is selected by the second processor 102. Show.
On the other hand, when “1” is set to the bit 0 as the control data, it indicates that the first bank 103 is selected by the second processor 102.
[0056]
The first memory controller 112 transfers access to the first bank 103 to the first processor 101 connected to the first processor bus 105 according to the control data set in the access bank control register 111 by the first processor 101. Alternatively, switching control is performed so that the second processor 102 is connected to the second processor bus 106.
In the example associated with FIG. 4, when the control data is “0”, the first memory controller 112 sends an access to the first bank 103 to the first processor 101 connected to the first processor bus 105. Switch. On the other hand, when the control data is “1”, the first memory controller 112 switches the access to the first bank 103 to the second processor 102 connected to the second processor bus 106.
The first memory controller 112 switches access to the first bank 103 from the first processor 101 or the second processor 102 by switching all signals related to the first bank 103 including the clock signal. Thus, there is no restriction on the bus system and clock synchronization of the first processor 101 or the second processor 102.
After performing the switching control, the first memory controller 112 controls transmission and reception of addresses, data, control signals, and the like between the first processor 101 or the second processor 102 in charge and the first bank 103.
[0057]
In response to the control data set in the access bank control register 111 by the first processor 101, the second memory controller 113 changes the access to the first bank 103 to the first processor 101 connected to the first processor bus 105. Alternatively, switching control is performed so that the second processor 102 is connected to the second processor bus 106.
In the example associated with FIG. 4, when the control data is “0”, the second memory controller 113 sends an access to the second bank 104 to the second processor 102 connected to the second processor bus 106. Switch. On the other hand, when the control data is “1”, the second memory controller 113 switches the access to the second bank 104 to the first processor 101 connected to the first processor bus 105.
The second memory controller 113 switches all the signals related to the second bank 104 including the clock signal when switching the access from the first processor 101 or the second processor 102 to the second bank 104. Thus, there is no restriction on the bus system and clock synchronization of the first processor 101 or the second processor 102.
After performing the switching control, the second memory controller 113 controls transmission and reception of addresses, data, control signals, and the like between the assigned first processor 101 or second processor 102 and the second bank 104.
[0058]
The first memory controller 112 and the second memory controller 113 having the above functions have basically the same configuration.
[0059]
FIG. 9 is a diagram illustrating a specific configuration example of the memory controller according to the first embodiment.
As shown in FIG. 9, the memory controller 200 (112, 113) includes a first bank controller (BNKCTL-A) 201, a second bank controller (BNKCTL-B) 202, a first switch 203, and a second switch. It has a switch 204.
[0060]
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is performed by the first processor 101, the first bank controller 201 A first bank to be accessed at a predetermined timing upon receiving an address ADR, write data WDT, a control signal WE (Write Enable), an IH (Chip Enable), etc., supplied by the first processor 101 supplied through a bus (BS-A) 105; The data is output to the third bank 103 or the second bank 104, and the data read from the first bank 103 or the second bank 104 is transmitted to the first processor bus (BS-A) 105 at a predetermined timing.
[0061]
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is performed by the second processor 102, the second bank controller 202 Upon receiving an address ADR, write data WDT, control signals WE, IH, and the like from the second processor 102 supplied through the bus (BS-B) 106, the first bank 103 or the second bank 104 to be accessed at a predetermined timing. And outputs the data read from the first bank 103 or the second bank 104 to the second processor bus (BS-B) 106 at a predetermined timing.
[0062]
The first switch 203 has a terminal a connected to a bus 205 connected to an input terminal of the first bank 103 or the second bank 104, and a terminal b connected to an output terminal of the first bank controller 201 on the bank side. The terminal c is connected to a bus 207 connected to a bank-side output terminal of the second bank controller 202.
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is to be performed by the first processor 101, the first changeover switch 203 sets the terminal a, the terminal A is connected, and the address ADR, the write data WDT, the control signals WE, IH, and the like by the first processor 101 sent to the bus 206 by the first bank controller 201 at a predetermined timing are propagated to the bus 205. The input is made to the first bank 103 or the second bank 104.
On the other hand, when the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is performed by the second processor 102, the first switch 203 a and the terminal c are connected, and the address ADR, the write data WDT, the control signals WE, IH, and the like by the second processor 102 sent from the second bank controller 202 to the bus 207 at a predetermined timing are propagated to the bus 205. The input is made to the first bank 103 or the second bank 104.
[0063]
The second switch 204 has a terminal “a” connected to the clock input terminal of the first bank 103 or the second bank 104, a terminal “b” connected to a clock CLK-A supply line for the first processor 101, and a terminal “c” connected thereto. The clock CLK-B for the second processor 102 is connected to a supply line.
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is to be performed by the first processor 101, the second changeover switch 204 sets the terminal The clock CLK-A is input to the first bank 103 or the second bank 104 by connecting the terminal a to the terminal b.
On the other hand, when the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is performed by the second processor 102, the second switch 204 The clock CLK-B is input to the first bank 103 or the second bank 104 by connecting a to the terminal c.
[0064]
As described above, the bank controller 200 according to the present embodiment selects whether the corresponding bank receives control from the first processor 101 or the second processor 102, and also outputs the clock to the bank to each of the banks. A clock synchronized with the processor (bus) is selected and distributed to the banks. Therefore, even if the bus architectures of the two processors are completely different, it is easy to cope with the change and control can be switched regardless of clock synchronization / asynchronization.
[0065]
As described above, the first bank 103 and the second bank 104 constituting the shared memory are constituted by the single-port SRAM.
[0066]
FIG. 10 is a block diagram showing a specific configuration example of a single-port SRAM.
As shown in FIG. 10, the single-port SRAM 300 includes a memory cell array (MCARY) 301, a word line buffer (WLB) 302, a column selector (CSEL) 303, a row decoder (RDEC) 304, a column decoder (CDEC) 305, and an address. Register (AREG) 306, clock buffer (CBUF) 307, pulse generator (PGEN) 308, input data register (IDG) 309, output data buffer (ODB) 310, write amplifier (WAMP) 311, and sense amplifier (SAMP) 312 Having.
In FIG. 10, IA is an address input to the address register 306, CK is a clock input to the clock buffer 307, IH is a low level active chip enable signal, WE is a low level active write enable signal, and I Denotes a data input to the input data register 309, and A denotes a data output from the output data buffer 310, respectively.
[0067]
As shown in FIG. 11, the single-port SRAM 300 has four operation modes: read, write, setup, and standby.
[0068]
As shown in FIG. 11, when the chip enable signal IH is at the high level, the standby mode is set regardless of the levels of the clock CK and the write enable signal WE. At this time, the address IAx is latched in the address register 306, the input data (write data) Ix is latched in the input data register 309, and the data at the time of the previous read is latched in the output data buffer 310.
[0069]
As shown in FIG. 11, when the chip enable signal IH is at low level and the clock CK is at low level, the setup mode is set regardless of the level of the write enable signal WE. At this time, the input address IAx is fetched into the address register 306, the input data (write data) Ix is fetched into the input data register 309, and the data at the previous read is latched in the output data buffer 310.
[0070]
In the read mode, the chip enable signal IH supplied to the clock buffer 307 is at a low level, and the write enable signal WE is at a high level as shown in FIGS.
At this time, as shown in FIGS. 12A, 12B, and 12D, the clock CK is at a low level, and enters the setup mode for a time tSA from the rising timing of the write enable signal WE. The address IAx is fetched.
Then, as shown in FIGS. 12A and 12B, the read mode is set at the rising timing of the clock CK, and the address IAx is latched in the address register 306 during the time tHA from the rising of the clock CK. The address latched by the address register 306 is supplied to the row decoder 304 and the column decoder 305.
The chip enable signal IH, the write enable signal WE, and the clock CK are buffered in the clock buffer 307. Then, the clock CK is supplied to the pulse generator 308 to shape the waveform, and is supplied to the row decoder 304 and the sense amplifier 312.
The row decoder 304 operates in synchronization with the supplied clock CK, decodes a row address from an input address, and supplies the row address to the word line buffer 302. Then, the word line to which the memory cell addressed by the word line buffer 302 is connected is activated for a predetermined time.
The column decoder 305 operates in synchronization with the supplied clock CK, decodes a column address from an input address, and supplies the column address to the column selector 303. Then, the column switch of the bit line to which the addressed memory cell is connected is turned on.
Thereby, the storage data of the addressed memory cell is supplied to the sensor amplifier 312 through the bit line and the column switch, where it is sense-amplified and buffered in the output data buffer 310.
Then, as shown in FIGS. 12A and 12C, after a lapse of a predetermined time tpd from the rise of the clock CK, read data from the memory cell at the current address is output from the output data buffer 310 and becomes valid.
[0071]
In the write mode, the chip enable signal IH supplied to the clock buffer 307 is at a low level, and the write enable signal WE is at a low level as shown in FIGS.
At this time, as shown in FIGS. 13A to 13D, the clock CK is at the low level, and the setup mode is set for a time tSI from the falling timing of the write enable signal WE, and the address IAx is stored in the address register 306. The input data (write data) Ix is input to the input data register 309.
Then, as shown in FIGS. 13A to 13C, the write mode is set at the timing of the rise of the clock CK, and the address IAx is latched in the address register 306 during the time tHA from the rise of the clock CK. The address latched by the address register 306 is supplied to the row decoder 304 and the column decoder 305. Similarly, input data (write data) Ix is latched in input data register 309 during time tHI from the rise of clock CK.
The chip enable signal IH, the write enable signal WE, and the clock CK are buffered in the clock buffer 307. Then, the clock CK is supplied to the input data register 309, and the input data (write data) Ix is held in the input data register 309 as shown in FIGS. Further, the clock CK is supplied to the pulse generator 308 to be shaped, and then supplied to the row decoder 304 and the write amplifier 311.
The address IAx is held in the address register 306 and is supplied to the row decoder 304 and the column decoder 305.
The row decoder 304 operates in synchronization with the supplied clock CK, decodes a row address from an input address, and supplies the row address to the word line buffer 302. Then, the word line to which the memory cell addressed by the word line buffer 302 is connected is activated for a predetermined time.
The column decoder 305 operates in synchronization with the supplied clock CK, decodes a column address from an input address, and supplies the column address to the column selector 303. Then, the column switch of the bit line to which the addressed memory cell is connected is turned on.
The write data held in the input data register 309 is amplified by the write amplifier 311 in synchronization with the clock CK, and is supplied to the column selector 303. As a result, the write data is written to the addressed memory cell through the column switch and the bit line.
In the write mode, as shown in FIG. The output data buffer 310 holds data from the previous read.
[0072]
FIGS. 14A to 14F are timing charts showing timings at which clocks become active in the read mode and the write mode.
FIGS. 15A to 15F are timing charts showing timings at which the clocks in the read mode and the write mode become inhibit.
[0073]
In the read mode, the timing at which the clock CK becomes active is the rising timing of the clock CK during the period when the chip enable signal IH is at the low level, as shown in FIGS.
As shown in FIGS. 14A to 14C, the input address IAx is held in the address register 306 according to the rising timing of the clock CK.
Further, as shown in FIGS. 15A and 15B, in the read mode, the clock is set to the inhibit state while the chip enable signal IH is at the high level.
At this time, as shown in FIG. 14C, the input address IAx is invalid.
[0074]
In the write mode, the clock CK becomes active at a time when the chip enable signal IH and the write enable signal WE are at a low level as shown in FIGS. 14A, 14B, and 14E. It is the rising timing.
As shown in FIGS. 14A to 14E, the input address IAx is held in the address register 306 and the input data Ix is held in the input data register 309 according to the rising timing of the clock CK.
In the write mode, as shown in FIGS. 14A to 14F, the output data of the output data buffer 310 becomes invalid after a lapse of the time tHD from the rising timing of the clock CK.
Further, as shown in FIGS. 15A to 15E, in the write mode, when the chip enable signal IH is at the high level, the write enable signal WE is at the low level, and the clock becomes an inhibit.
At this time, as shown in FIGS. 14C and 14D, the input address IAx and the input data Ix are invalid.
[0075]
Next, the operation of the multiprocessor system of FIG. 1 will be described with reference to FIG.
Here, a description will be made mainly of an information transmission operation by mutually passing an interrupt signal between the first processor 101 and the second processor 102. Then, in order to facilitate understanding, a case where there is data that the first processor 101 wants to transfer to the second processor 102 will be specifically described.
[0076]
First, as a premise, in step ST101, the first processor 101 having superiority in access right control accesses the first bank 103 to the access bank control register 111 (read and write), and the second processor The control data that allows the second 102 to access (read and write) the second bank 104 has been written. The first processor 101 accesses the first bank 103, and the second processor 102 accesses the second bank 104. And normal processing is performed.
[0077]
Here, for example, when there is data that the first processor 101 wants to transfer to the second processor 102, the data transfer bank is the first bank 103.
Accordingly, in step ST102, the first processor 101 accesses the first bank 103 via the first memory controller 112 and writes the transfer data.
[0078]
Next, in step ST103, the first processor 101 accesses the first bank 103 and writes data (parameter) indicating that the transfer data has been written to the first parameter transfer register (TRFREG1) 109 (contents of TRFREG1). To change).
Next, in step ST104, the first processor 101 sets the first interrupt signal in the first interrupt signal generation register 107, and issues the first interrupt signal to the second processor 102.
After issuing the first interrupt signal, the first processor 101 shifts to a normal process.
[0079]
On the other hand, the second processor 102 that has received the first interrupt signal reads the contents of the access bank control register (CTLREG) 111 and the first parameter transfer register (TRFREG1) 109 in step ST201.
Next, in step ST202, the second processor 102 detects the read contents of the access bank control register (CTLREG) 111 and the first parameter transfer register (TRFREG1) 109. In this case, it is detected (recognized) that there is data to be transferred from the first bank 103, that the data has been written to the first bank 103, and that the bank accessible by the second processor 102 is still the second bank 104.
[0080]
Therefore, in step ST203, the second processor 102 transmits data (parameter) indicating that the access right of the bank should be changed from the second bank 104 to the first bank 103 in order to receive (read) the transfer data. Write to the parameter transfer register (TRFREG2) 110 (change the contents of TRFREG2).
Next, in step ST204, the second processor 102 sets the second interrupt signal in the second interrupt signal generation register 108, and issues the first interrupt signal to the first processor 101.
After issuing the second interrupt signal, the second processor 102 shifts to the normal processing.
[0081]
The first processor 101 that has received the second interrupt signal reads the contents of the second parameter transfer register (TRFREG2) 110 in step ST105.
Next, in step ST106, the first processor 101 detects the content of the read second parameter transfer register (TRFREG2) 110. In this case, it is detected (recognized) that it is desired to change the access right of the bank of the second processor 102 from the second bank 104 to the first bank 103.
[0082]
Therefore, in step ST107, the first processor 101 accesses the access bank control register 111 by the own processor 101 (read and write), and the second processor 102 accesses (read and write) the first bank 103. Write) is written.
Next, in step ST108, the first processor 101 accesses (reads and writes) the second bank 104 in the access bank control register 111, and the second processor 102 accesses (reads) the first bank 103 in the access bank control register 111. And write data (parameters) indicating that the control data permitting the write operation is written into the first parameter transfer register (TRFREG1) 109 (change the contents of TRFREG1).
Next, in step ST109, the first processor 101 sets the first interrupt signal in the first interrupt signal generation register 107, and issues the first interrupt signal to the second processor 102.
After issuing the first interrupt signal, the first processor 101 shifts to a normal process.
[0083]
In step ST205, the second processor 102 that has received the first interrupt signal reads the contents of the access bank control register (CTLREG) 111 and the first parameter transfer register (TRFREG1) 109.
Next, in step ST206, the second processor 102 detects the contents of the read access bank control register (CTLREG) 111 and the first parameter transfer register (TRFREG1) 109. In this case, the access bank is switched, and it is detected (recognized) that the second processor 102 can access the first bank 103.
[0084]
Therefore, in step ST207, the second processor 102 accesses the first bank 103 and reads out the transfer data to receive (read) the transfer data.
Next, in step ST208, the second processor 102 writes data (parameters) indicating that access to the first bank 103 has been completed to the second parameter transfer register (TRFREG2) 110 to receive (read) the transfer data. (Change the contents of TRFREG2).
Next, in step ST209, the second processor 102 sets the second interrupt signal in the second interrupt signal generation register 108, and issues the second interrupt signal to the first processor 101.
After issuing the second interrupt signal, the second processor 102 shifts to the normal processing.
[0085]
The first processor 101 that has received the second interrupt signal reads the contents of the second parameter transfer register (TRFREG2) 110 in step ST110.
Next, in step ST111, the first processor 101 detects the content of the read second parameter transfer register (TRFREG2) 110. In this case, the second processor 102 detects (recognizes) that the transferred data has been read and that the data has been transferred.
Then, the first processor 101 shifts to the normal processing.
[0086]
As described above, in the multiprocessor system 100 according to the present embodiment, when data is transferred between the first processor 101 and the second processor 102, the first processor 101 repeatedly performs the bank switching based on the control data. .
Then, the first processor 101 and the second processor 102 use the "parameter transmission register" and the "interrupt generation register" in combination to obtain "what the other processor has done" and "what the other processor has done." Requesting "and" what state the other processor is in ".
[0087]
In the software control, what is meant by the data written in the “parameter transfer register” is defined in the software specification, so that the first processor 101 can firstly set the bank switching. A flow, secondly, a flow when the second processor 102 issues a bank switching request to the processor 102 is determined, and a data transfer system between processors using a shared memory by this circuit can be established.
[0088]
As described above, according to the first embodiment, the first processor 101, the second processor, the first bank 103 and the second bank 104 that divide the shared memory, and the first processor 101 Control data for determining whether one of the first bank 103 and the second bank 104 is accessed by the own processor 101 and the second processor 102 is written, and only the control data can be read from the second processor 102. An access bank control register 111, a first parameter transfer register 109 capable of writing and changing contents to be transmitted from the first processor 101 to the second processor 102, and capable of reading contents from the second processor 102; To issue an interrupt to the second processor 102 from the A first interrupt signal generation register 107, a second parameter transmission register 110 capable of writing and changing the content to be transmitted from the second processor 102 to the first processor 101, and capable of reading the content from the first processor 101; The provision of the second interrupt signal generation register 108 for issuing an interrupt from the second processor 102 to the first processor 101 has the following effects.
[0089]
That is, when data transfer between processors is performed by the shared memory, it is possible to suppress data mix-up due to simultaneous write / read access from different processors.
Further, it is possible to cope with the case where the bus system is different between the processors, and it is also possible to cope with the case where the clock between the processors is asynchronous.
In addition, since the processing flow of the processor associated with the setting change and the parameters associated with the processing can be defined by software, it is possible to flexibly respond after the hardware is fixed. Conversely, the hardware can be fixed early. There are advantages.
Memory access during parallel processing by a plurality of processors can be dynamically switched by mutual transfer of interrupt signals.
Further, the access overhead after switching (the period until the memory can be accessed) is actually only the overhead for switching the clock and is extremely small.
As a result, frequent data transfer between processors by the shared memory becomes possible, and large data transfer can be realized by repetitive processing.
[0090]
When the number of processors becomes three or more and it is desired to reduce the circuit scale, the configuration around the memory can be configured with a minimum (the number of banks: 2).
To increase the access efficiency, it is also possible to increase the number of banks and eliminate inaccessible processors, that is, the maximum number of banks = the number of processors.
As described above, the configuration can be flexibly selected according to the request.
[0091]
Since the switching is performed by the memory controller and the bank, which depend on the architecture of the processor bus, it is possible to easily cope with an increase in the number of processors only by increasing the number of selectors to be selected.
If the number of processors is increased, only the parameter transfer register and the interrupt generation circuit are required unless the bank configuration of the shared memory is selected to increase, so that the circuit scale increase is very small.
Even when the architecture of the bus changes, it is only necessary to deal with the changed memory controller and register on the bus side.
According to the above contents, there is an advantage that re-use by IP conversion can be easily performed.
[0092]
The superiority of the processor may be determined as a chip architecture, or may be controlled by setting between processors.
[0093]
A typical example of the memory constituting the shared memory is a single-port SRMA, but a dual-port SRAM, DRAM, or the like may be used.
The memory constituting the shared memory may be either synchronous or asynchronous.
[0094]
Second embodiment
FIG. 14 is a configuration diagram showing a second embodiment of the multiprocessor system according to the present invention.
[0095]
The difference between the second embodiment and the first embodiment is that the number of processors becomes three. In order to reduce the circuit scale, the configuration around the memory is minimum, that is, the first embodiment is different. As in the embodiment, the number of banks is two.
[0096]
Specifically, a third processor 128 is provided in addition to the first processor 101 and the second processor 102.
As the number of third processors 128 increases, a third interrupt signal generation register (IRPTREG3) 129, a third parameter transmission register (TRFREG3) 130, and a third processor bus (BS-C) 131 are provided.
The first to third interrupt signal generation registers 107, 108, and 129 and the first to third parameter transmission registers 109, 110, and 130 determine the destination of each signal and data by two "other than the own processor". To increase.
[0097]
Specifically, the first interrupt signal set in the first interrupt signal generation register 107 by the first processor 101 is supplied to the second processor 102 and the third processor 128.
The second interrupt signal set by the second processor 102 in the second interrupt signal generation register 108 is supplied to the first processor 101 and the third processor 128.
The third interrupt signal set in the third interrupt signal generation register 129 by the third processor 128 is supplied to the first processor 101 and the second processor 102.
[0098]
The first processor 101 transmits parameters for transmitting detailed information, such as the status of the own processor and the contents of the request, to the first parameter transmission register 109 via the local bus 114, the first processor bus 105, and the local bus 116. Write. The transfer parameters written in the first parameter transfer register 109 are read out by the second processor 102 to which the first interrupt signal is issued, via the local bus 117, the second processor bus 106, and the local bus 126. Similarly, the third processor 128 to which the first interrupt signal is issued reads out via the local bus 132, the third processor bus 131, and the local bus 140.
[0099]
The second processor 102 transmits, to the second parameter transmission register 110, parameters for transmitting detailed information such as the state of the own processor and the contents of the request via the local bus 126, the second processor bus 106, and the local bus 119. Write. The transfer parameters written in the second parameter transfer register 110 are read out by the first processor 101 to which the second interrupt signal is issued, via the local bus 118, the first processor bus 105, and the local bus 114. Similarly, the third processor 128 to which the second interrupt signal is issued reads out via the local bus 133, the third processor bus 131, and the local bus 140.
[0100]
The third processor 128 transmits parameters for transmitting detailed information, such as the status of the own processor and the contents of the request, to the third parameter transmission register 130 via the local bus 140, the third processor bus 131, and the local bus 134. Write. The transfer parameters written in the third parameter transfer register 130 are read out by the first processor 101 to which the third interrupt signal is issued via the local bus 136, the first processor bus 105, and the local bus 114. Similarly, the second processor 106 to which the third interrupt signal is issued reads out via the local bus 135, the second processor bus 106, and the local bus 126.
[0101]
In addition, the first processor 101 stores one of the two first banks 103 and the second banks 104 in the access bank control register 111 via the local bus 114, the first processor bus 105, and the local bus 120. Is written in the control data for determining whether or not the own processor 101 and the second processor 102 access.
The control data written in the access bank control register 111 is read by the second processor 102 via the local bus 121, the second processor bus 106, and the local bus 126. The second processor 102 recognizes an accessible bank based on the read control data.
Similarly, the control data written in the access bank control register 111 is read by the third processor 128 via the local bus 137, the third processor bus 131, and the local bus 140. The third processor 128 recognizes an accessible bank based on the read control data.
[0102]
In addition, the third processor 128 accesses the first bank 103 via the local bus 140, the third processor bus 131, the local bus 138, and the first memory controller 112. Similarly, the third processor 128 accesses the second bank 104 via the local bus 140, the third processor bus 131, the local bus 139, and the memory controller 113.
[0103]
The control data written in the access bank control register 111 is, for example, 3-bit data obtained by adding bits 1 and 2 in addition to bit 0 of the control register shown in FIG.
[0104]
FIG. 18 is a diagram showing an example of allocating two banks to three processors according to control data set in the bank access control bits.
As shown in FIG. 18, for example, in the second embodiment, when the first processor 101 sets “000” as control data in bit 2, bit 1, and bit 0, the first processor 101 The bank 103 is accessed, and the second processor 102 accesses the second bank 104.
In this case, the third processor 128 cannot access the first bank 103 and the second bank 104.
When the first processor 101 sets “001” as control data in bit 2, bit 1, and bit 0, the first processor 101 accesses the second bank 104, and the second processor 102 Access side.
Also in this case, the third processor 128 cannot access the first bank 103 and the second bank 104.
[0105]
When the first processor 101 sets “010” as control data in bit 2, bit 1 and bit 0, the first processor 101 accesses the first bank 103 and the third processor 128 accesses the second bank 104. Access side.
In this case, the second processor 102 cannot access the first bank 103 and the second bank 104.
When the first processor 101 sets “011” as control data in bit 2, bit 1, and bit 0, the first processor 101 accesses the second bank 104 side, and the third processor 128 Access side.
In this case, the second processor 102 cannot access the first bank 103 and the second bank 104.
[0106]
When the first processor 101 sets “100” as control data in bit 2, bit 1, and bit 0, the second processor 102 accesses the first bank 103 side, and the third processor 128 Access side.
In this case, the first processor 101 cannot access the first bank 103 and the second bank 104.
When the first processor 101 sets “101” as control data in bit 2, bit 1, and bit 0, the second processor 102 accesses the second bank 104 side, and the third processor 128 Access side.
In this case, the first processor 101 cannot access the first bank 103 and the second bank 104.
[0107]
The first memory controller and the second memory controller according to the second embodiment have substantially the same functions as those of the first embodiment. However, the first memory controller and the second memory controller are different from the circuits in FIG. Thus, the configuration is such that one bank controller is added.
[0108]
FIG. 19 is a diagram illustrating a specific configuration example of the memory controller according to the second embodiment.
As shown in FIG. 19, the memory controller 400 (112, 113) includes a first bank controller (BNKCTL-A) 401, a second bank controller (BNKCTL-B) 402, and a third bank controller (BNKCTL-C) 403. , A first switch 404, and a second switch 404.
[0109]
When the control data set in the access bank control register 111 indicates that the first bank 103 or the second bank 104 is to be accessed by the first processor 101, the first bank controller 401 Upon receiving an address ADR, write data WDT, control signals WE, IH, and the like from the first processor 101 supplied through the bus (BS-A) 105, the first bank 103 or the second bank 104 to be accessed at a predetermined timing. And outputs the data read from the first bank 103 or the second bank 104 to the first processor bus (BS-A) 105 at a predetermined timing.
[0110]
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is performed by the second processor 102, the second bank controller 402 Upon receiving an address ADR, write data WDT, control signals WE, IH, and the like from the second processor 102 supplied through the bus (BS-B) 106, the first bank 103 or the second bank 104 to be accessed at a predetermined timing. And outputs the data read from the first bank 103 or the second bank 104 to the second processor bus (BS-B) 106 at a predetermined timing.
[0111]
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is performed by the third processor 128, the third bank controller 403 Upon receiving an address ADR, write data WDT, control signals WE, IH, and the like from the third processor 128 supplied through a bus (BS-C) 131, the first bank 103 or the second bank 104 to be accessed at a predetermined timing. And outputs the data read from the first bank 103 or the second bank 104 to the third processor bus (BS-C) 131 at a predetermined timing.
[0112]
The first switch 404 has a terminal a connected to a bus 406 connected to an input terminal of the first bank 103 or the second bank 104, and a terminal b connected to an output terminal of the first bank controller 401 toward the bank. The terminal c is connected to the bus 408 connected to the bank-side output terminal of the second bank controller 402, and the terminal d is connected to the bank-side output terminal of the third bank controller 403. Connected to a bus 409.
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is to be performed by the first processor 101, the first changeover switch 403 sets the terminal a and terminal b are connected, and the first bank controller 401 transmits the address ADR, write data WDT, control signals WE, IH, and the like from the first processor 101 sent to the bus 407 at a predetermined timing to the bus 406. The input is made to the first bank 103 or the second bank 104.
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is to be performed by the second processor 102, the first switch 404 sets the terminal a to The terminal c is connected to the second bank controller 402 to transmit an address ADR, write data WDT, control signals WE, IH, and the like from the second processor 102 sent to the bus 408 at a predetermined timing to the bus 406, and The input is made to the bank 103 or the second bank 104.
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is to be performed by the third processor 128, the first changeover switch 404 sets the terminal a to The terminal d is connected to the third bank controller 403 to transmit the address ADR, the write data WDT, the control signals WE, IH, and the like by the third processor 128 sent to the bus 409 at a predetermined timing to the bus 406, and The input is made to the bank 103 or the second bank 104.
[0113]
The second switch 405 has a terminal a connected to the clock input terminal of the first bank 103 or the second bank 104, a terminal b connected to a supply line of the clock CLK-A for the first processor 101, and a terminal c connected to the terminal c. The terminal d is connected to the supply line of the clock CLK-C for the third processor 128, and the terminal d is connected to the supply line of the clock CLK-B for the second processor 102.
When the control data set in the access bank control register 111 indicates that the access to the first bank 103 or the second bank 104 is to be performed by the first processor 101, the second changeover switch 405 is connected to the terminal The clock CLK-A is input to the first bank 103 or the second bank 104 by connecting the terminal a to the terminal b.
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is performed by the second processor 102, the second switch 405 sets the terminal a The clock CLK-B is input to the first bank 103 or the second bank 104 by connecting to the terminal c.
When the control data set in the access bank control register 111 indicates that access to the first bank 103 or the second bank 104 is to be performed by the third processor 128, the second switch 405 is connected to the terminal a. The terminal d is connected to input the clock CLK-C to the first bank 103 or the second bank 104.
[0114]
As described above, the bank controller 400 according to the second embodiment selects which of the first processor 101, the second processor 102, and the third processor 128 receives control from the corresponding bank, and As for the clock to the bank, a clock synchronized with each processor (bus) is selected and distributed to the bank. Therefore, even if the bus architectures of the three processors are completely different, it is easy to cope with the change and control can be switched regardless of clock synchronization / asynchronization.
[0115]
According to the second embodiment, the same effects as those of the above-described first embodiment can be obtained.
[0116]
As described above, since there are two banks despite the fact that the number of processors is three, some processors cannot be accessed.
In order to eliminate the inaccessible processor, the number of banks of the shared memory may be increased as the number of processors increases.
[0117]
【The invention's effect】
As described above, according to the present invention, when data is exchanged between processors by the shared memory, it is possible to suppress data mix-up due to simultaneous write / read access from different processors.
Further, it is possible to cope with a case where the bus system between processors is different, and to cope with a case where the clock between processors is asynchronous.
In addition, since the processing flow of the processor associated with the setting change and the parameters associated with the processing can be defined by software, it is possible to flexibly respond after the hardware is fixed. Conversely, the hardware can be fixed early. There are advantages.
By mutually passing interrupt signals, it is possible to dynamically switch RAM access during parallel processing by a plurality of processors.
Further, the access overhead after switching (the period until the memory can be accessed) is actually only the overhead for switching the clock and is extremely small.
As a result, frequent data transfer between processors by the shared memory becomes possible, and large data transfer can be realized by repetitive processing.
[0118]
When the number of processors becomes three or more and it is desired to reduce the circuit scale, the configuration around the memory can be configured with a minimum (the number of banks: 2).
To increase the access efficiency, it is also possible to increase the number of banks and eliminate inaccessible processors, that is, the maximum number of banks = the number of processors.
As described above, the configuration can be flexibly selected according to the request.
[0119]
Since the switching is performed by the memory controller and the bank, which depend on the architecture of the processor bus, it is possible to easily cope with an increase in the number of processors only by increasing the number of selectors to be selected.
If the number of processors is increased, only the parameter transfer register and the interrupt generation circuit are required unless the bank configuration of the shared memory is selected to increase, so that the circuit scale increase is very small.
Even when the architecture of the bus changes, it is only necessary to deal with the changed memory controller and register on the bus side.
[Brief description of the drawings]
FIG. 1 is a diagram showing a first embodiment of a multiprocessor system according to the present invention.
FIG. 2 is a diagram showing an access path when a first bank is assigned to an access bank control register by a first processor and a second bank is assigned to a second processor.
FIG. 3 is a diagram illustrating a configuration example of a control register of a first processor.
FIG. 4 is a diagram showing an example of allocating two banks to two processors according to control data set in a bank access control bit.
FIG. 5 is a diagram illustrating a configuration example of a second processor interface on register.
FIG. 6 is a diagram illustrating a setting example of a second processor interface on register.
FIG. 7 is a diagram illustrating a configuration example of a control register of a second processor.
FIG. 8 is a diagram showing an example of assigning a selected bank of a shared memory to a second processor according to control data set in a bank access control bit.
FIG. 9 is a diagram illustrating a specific configuration example of a memory controller according to the first embodiment.
FIG. 10 is a block diagram illustrating a specific configuration example of a single-port SRAM.
FIG. 11 is a diagram for explaining an operation mode and an input / output state of a single-port SRAM.
FIGS. 12A to 12D are timing charts for explaining processing in a read mode;
FIGS. 13A to 13E are timing charts for explaining processing in a write mode.
14A to 14F are timing charts showing timings at which clocks become active in the read mode and the write mode.
FIGS. 15A to 15F are timing charts showing timings at which a clock in a read mode and a write mode becomes an inhibit;
FIG. 16 is a diagram for explaining the operation of the multiprocessor system of FIG. 1;
FIG. 17 is a diagram showing a second embodiment of the multiprocessor system according to the present invention.
FIG. 18 is a diagram showing an example of allocating two banks to three processors according to control data set in a bank access control bit.
FIG. 19 is a diagram illustrating a specific configuration example of a memory controller according to a second embodiment;
FIG. 20 is a diagram illustrating a configuration example of a multiprocessor system employing a first conventional method.
FIG. 21 is a diagram illustrating a first configuration example of a multiprocessor system employing a second conventional method.
FIG. 22 is a diagram showing a second configuration example of a multiprocessor system employing a second conventional method.
[Explanation of symbols]
100, 100A multiprocessor system, 101 first processor (PRC-A), 102 second processor (PRC-B), 103 first memory bank (BNK1), 104 second memory bank (BNK2), 105: first processor bus (BS-A), 106: second processor bus (BS-B), 107: first interrupt signal generation register (IRPTREG1), 108: second interrupt signal generation register (IRPTREG2), 109 ... 1st parameter transfer register (TRFREG1), 110 ... second parameter transfer register (TRFREG2), 111 ... access bank control register (CTLREG), 112 ... 1st memory controller (MCTL1), 113 ... 2nd memory controller (MCTL2), 114-127: Loka Bus 128, third processor (PRC-C), 129 third interrupt signal generation register (IRPTREG3), 130 third parameter transmission register (RTFREG3), 131 third processor bus (BS-C) 132- 141 local bus, 200 memory controller, 201 first bank controller (BNKCTL-A), 202 second bank controller (BNKCTL-B), 203 first switch, 204 second switch, 400 Memory controller, 401: first bank controller (BNKCTL-A), 402: second bank controller (BNKCTL-B), 403: third bank controller (BNKCTL-C), 404: first changeover switch, 405: second Selector switch.

Claims (15)

複数のプロセッサでメモリを共有するマルチプロセッサシステムであって、
上記メモリは、少なくとも2つ以上の複数のバンクを含み、
上記複数のプロセッサの各々が、上記複数のバンクのいずれにアクセスするかを決定する制御データが設定され、当該制御データは書き換え可能な制御データ設定手段と、
上記各プロセッサからの上記バンク構成を有する上記メモリに対するアクセスが発生した際には、各プロセッサからは、必然的に、上記制御データ設定手段に設定された制御データにより割り当てられているバンクにのみアクセス可能となるような制御を行う制御手段と
を有するマルチプロセッサシステム。
A multiprocessor system in which a plurality of processors share a memory,
The memory includes at least two or more banks,
Each of the plurality of processors is set with control data for determining which of the plurality of banks to access, and the control data is rewritable control data setting means;
When an access to the memory having the bank configuration occurs from each processor, each processor inevitably accesses only the bank assigned by the control data set in the control data setting means. And a control means for performing control so as to be possible.
上記制御データ設定手段に設定される制御データは、上記複数のバンクのうち一つの上記バンクには一つの上記プロセッサからのアクセス、他の一つの上記バンクには、異なるプロセッサからのアクセスを受け付けるように上記制御手段に指示するデータを含む
請求項1記載のマルチプロセッサシステム。
The control data set in the control data setting means is such that one of the plurality of banks receives access from one of the processors and the other one of the banks receives access from a different processor. 2. The multiprocessor system according to claim 1, further comprising data for instructing said control means.
上記複数のプロセッサのうちの一つの上記プロセッサのみが上記各バンクに対するのアクセスの決定権を有し、当該優位性を持つ一つのプロセッサからのみ上記制御データを上記制御データ設定手段に設定し、
他の上記プロセッサは、上記制御データ設定手段に設定された制御データで割り当てられたバンクをアクセスする
請求項1記載のマルチプロセッサシステム。
Only one of the plurality of processors has the right to determine access to each bank, and sets the control data to the control data setting means only from the one processor having the superiority,
2. The multiprocessor system according to claim 1, wherein the other processor accesses a bank assigned by the control data set in the control data setting means.
上記一つのプロセッサの優位性の決定は、チップのアーキテクチャとして決定されている
請求項3記載のマルチプロセッサシステム。
4. The multiprocessor system according to claim 3, wherein said superiority of said one processor is determined as a chip architecture.
上記一つのプロセッサの優位性の決定は、プロセッサ同士の設定により制御される
請求項3記載のマルチプロセッサシステム。
4. The multiprocessor system according to claim 3, wherein the determination of the superiority of the one processor is controlled by setting between the processors.
上記各プロセッサは、他のプロセッサに対して、即時性のある信号を発行し、アクセス制御に関する情報を伝達する手段を有する
請求項1記載のマルチプロセッサシステム。
2. The multiprocessor system according to claim 1, wherein each of said processors has means for issuing an instantaneous signal to another processor and transmitting information relating to access control.
上記各プロセッサは、自分のプロセッサからは書き込みおよび読み出しが可能、他のプロセッサからは読み出しのみが可能な伝達レジスタをそれぞれ有し、
他のプロセッサへのアクセス制御に関する伝達情報を対応する上記伝達レジスタに書き込む
請求項1記載のマルチプロセッサシステム。
Each of the above processors has a transmission register that can write and read from its own processor and can only read from another processor,
2. The multiprocessor system according to claim 1, wherein transmission information relating to access control to another processor is written in the corresponding transmission register.
上記各プロセッサは、他のプロセッサに対して、割り込み信号を発行するための割り込みレジスタと、
自分のプロセッサからは書き込みおよび読み出しが可能、他のプロセッサからは読み出しのみが可能な伝達レジスタと
をそれぞれ有する請求項1記載のマルチプロセッサシステム。
Each of the processors includes an interrupt register for issuing an interrupt signal to another processor,
2. The multiprocessor system according to claim 1, further comprising a transmission register capable of writing and reading from its own processor and only reading from another processor.
上記各プロセッサは、他のプロセッサへのアクセス制御に関する伝達情報を対応する上記伝達レジスタに書き込んだ後、
上記割り込みレジスタに割り込み信号を設定して、他のプロセッサに伝達情報がある旨を報知する
請求項8記載のマルチプロセッサシステム。
Each of the processors writes transmission information relating to access control to another processor to the corresponding transmission register,
9. The multiprocessor system according to claim 8, wherein an interrupt signal is set in the interrupt register to notify other processors that there is transmission information.
上記制御手段は、上記各プロセッサからのバンクへのアクセスを切り替える場合、クロック信号を含めた、バンクにかかわる信号の全てを切り替える
請求項1記載のマルチプロセッサシステム。
2. The multiprocessor system according to claim 1, wherein said control means switches all signals related to the bank, including a clock signal, when switching access to the bank from each processor.
上記各プロセッサは、それぞれ異なるクロックに同期して動作する
請求項9記載のマルチプロセッサシステム。
10. The multiprocessor system according to claim 9, wherein each of the processors operates in synchronization with a different clock.
第1プロセッサと、
第2プロセッサと、
共有メモリを区分けした第1バンクおよび第2バンクと、
上記第1プロセッサにより上記第1バンクおよび上記第2バンクのうちのいずれかを自プロセッサおよび上記第2プロセッサがアクセスするかを決定する制御データが書き込まれ、上記第2プロセッサから制御データの読み出しのみが可能なアクセスバンク制御レジスタと、
上記第1または第2のプロセッサからの上記第1バンクに対するアクセスが発生した際には、上記第1または第2のプロセッサからは、必然的に、上記アクセスバンク制御レジスタに設定された制御データにより割り当てられている第1バンクにのみアクセス可能となるような制御を行う第1メモリコントローラと、
上記第1または第2のプロセッサからの上記第2バンクに対するアクセスが発生した際には、上記第1または第2のプロセッサからは、必然的に、上記アクセスバンク制御レジスタに設定された制御データにより割り当てられている第2バンクにのみアクセス可能となるような制御を行う第2メモリコントローラと
を有するマルチプロセッサシステム。
A first processor;
A second processor;
A first bank and a second bank dividing the shared memory;
The first processor writes control data for determining whether one of the first bank and the second bank is accessed by the own processor and the second processor, and only reads control data from the second processor. An access bank control register capable of
When an access to the first bank from the first or second processor occurs, the first or second processor inevitably receives control data set in the access bank control register. A first memory controller that performs control so that only the assigned first bank can be accessed;
When the first or second processor accesses the second bank, the first or second processor inevitably receives the control data set in the access bank control register. A multiprocessor system having a second memory controller that performs control so that only the assigned second bank can be accessed.
上記第1プロセッサから上記第2プロセッサに伝達すべき内容を書き込みかつ変更可能で、上記第2プロセッサから内容をリード可能な第1伝達レジスタと、
上記第2プロセッサから上記第1プロセッサに伝達すべき内容を書き込みかつ変更可能で、上記第1プロセッサから内容をリード可能な第2伝達レジスタと
を有する請求項12記載のマルチプロセッサシステム。
A first transmission register capable of writing and changing the content to be transmitted from the first processor to the second processor, and capable of reading the content from the second processor;
13. The multiprocessor system according to claim 12, further comprising a second transmission register capable of writing and changing contents to be transmitted from said second processor to said first processor, and capable of reading contents from said first processor.
上記第1プロセッサから上記第2プロセッサに伝達すべき内容を書き込み可能で、上記第2プロセッサから内容を読み出しのみが可能な第1伝達レジスタと、
上記第1プロセッサから上記第2プロセッサに対して割り込み発行するための第1割り込み信号発生レジスタと、
上記第2プロセッサから上記第1プロセッサに伝達すべき内容を書き込み可能で、上記第1プロセッサから内容を読み出しのみが可能な第2伝達レジスタと、
上記第2プロセッサから上記第1プロセッサに対して割り込み発行するための第2割り込み信号発生レジスタと
を有する請求項12記載のマルチプロセッサシステム。
A first transmission register capable of writing content to be transmitted from the first processor to the second processor, and capable of only reading content from the second processor;
A first interrupt signal generation register for issuing an interrupt from the first processor to the second processor;
A second transfer register capable of writing contents to be transmitted from the second processor to the first processor and capable of only reading contents from the first processor;
13. The multiprocessor system according to claim 12, further comprising a second interrupt signal generation register for issuing an interrupt from said second processor to said first processor.
上記第1または第2プロセッサは、他の上記第2または第1プロセッサへのアクセス制御に関する伝達情報を対応する上記第1または第2伝達レジスタに書き込んだ後、
上記第1または第2割り込みレジスタに割り込み信号を設定して、他の上記第2またた第1プロセッサに伝達情報がある旨を報知する
請求項14記載のマルチプロセッサシステム。
The first or second processor writes, in the corresponding first or second transmission register, transmission information relating to access control to another second or first processor,
15. The multiprocessor system according to claim 14, wherein an interrupt signal is set in said first or second interrupt register to notify that said other second or first processor has transmission information.
JP2002324183A 2002-11-07 2002-11-07 Multiprocessor system Pending JP2004157865A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002324183A JP2004157865A (en) 2002-11-07 2002-11-07 Multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002324183A JP2004157865A (en) 2002-11-07 2002-11-07 Multiprocessor system

Publications (1)

Publication Number Publication Date
JP2004157865A true JP2004157865A (en) 2004-06-03

Family

ID=32803851

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002324183A Pending JP2004157865A (en) 2002-11-07 2002-11-07 Multiprocessor system

Country Status (1)

Country Link
JP (1) JP2004157865A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008518338A (en) * 2004-10-25 2008-05-29 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and apparatus for switching in a computer system having at least two implementation units
JP2012164144A (en) * 2011-02-07 2012-08-30 Denso Corp Microcomputer
JP2012256309A (en) * 2011-06-08 2012-12-27 Shijin Kogyo Sakushinkai Processor bridge in heterogeneous computer system
JP2021002030A (en) * 2019-06-21 2021-01-07 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Speech chip and electronic device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008518338A (en) * 2004-10-25 2008-05-29 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and apparatus for switching in a computer system having at least two implementation units
US8090983B2 (en) 2004-10-25 2012-01-03 Robert Bosch Gmbh Method and device for performing switchover operations in a computer system having at least two execution units
JP2012164144A (en) * 2011-02-07 2012-08-30 Denso Corp Microcomputer
JP2012256309A (en) * 2011-06-08 2012-12-27 Shijin Kogyo Sakushinkai Processor bridge in heterogeneous computer system
US9098287B2 (en) 2011-06-08 2015-08-04 Institute For Information Industry Super operating system for a heterogeneous computer system
US9383811B2 (en) 2011-06-08 2016-07-05 Institute For Information Industry Processor bridging in heterogeneous computer system
JP2021002030A (en) * 2019-06-21 2021-01-07 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Speech chip and electronic device

Similar Documents

Publication Publication Date Title
US6173356B1 (en) Multi-port DRAM with integrated SRAM and systems and methods using the same
JP4737438B2 (en) Information processing apparatus that shares resources among multiple processing units
TWI443675B (en) Apparatus and method that accesses memory
JP2006040276A (en) Bus arbitration system for saving on power consumption based on selective clock control and method thereof
JP2004157865A (en) Multiprocessor system
JP4902640B2 (en) Integrated circuit and integrated circuit system
JP3541112B2 (en) Bus arbitration system
JPH10307790A (en) High-speed processor
JP2002229848A (en) Processor system equipped with shared memory
JPH06208537A (en) Communication system
JPH07271654A (en) Controller
JPH0544238B2 (en)
JP2004127245A (en) Semiconductor integrated circuit device
JP2008305215A (en) Bus system
US7017000B2 (en) Data transfer control circuit in system LSI
JP2001273191A (en) Computer system
JP2000250850A (en) Bus control device, master device, slave device and bus control method
JPH10222979A (en) Information processing apparatus
KR0165505B1 (en) The communication apparatus using shared memory
JP2002236606A (en) Memory control circuit
KR100303327B1 (en) Apparatus for duplicating of memory in switching system and method thereof
JP3910165B2 (en) High speed processor
JP4376876B2 (en) Semiconductor integrated circuit device
JPH09198298A (en) Memory controller
JP2522571B2 (en) Electronic equipment data transfer device