JP2004139296A - Bus arbitration device - Google Patents

Bus arbitration device Download PDF

Info

Publication number
JP2004139296A
JP2004139296A JP2002302474A JP2002302474A JP2004139296A JP 2004139296 A JP2004139296 A JP 2004139296A JP 2002302474 A JP2002302474 A JP 2002302474A JP 2002302474 A JP2002302474 A JP 2002302474A JP 2004139296 A JP2004139296 A JP 2004139296A
Authority
JP
Japan
Prior art keywords
bus
controller
access
cpu
bus master
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
JP2002302474A
Other languages
Japanese (ja)
Inventor
Kazuhide Yamakawa
山川 和秀
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.)
NEC Engineering Ltd
Original Assignee
NEC Engineering Ltd
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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2002302474A priority Critical patent/JP2004139296A/en
Publication of JP2004139296A publication Critical patent/JP2004139296A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent an internal system bus from being locked due to I/O operation delay. <P>SOLUTION: A CPU 11 and DMA controller 12 included in an LSI circuit 10 are able to perform access to either an SDRAM 30 or an input/output device 40 connected through a shared external bus 20. A shared external interface 17 carries out arbitration to access to an external bus between the memory controller 14 and the I/O controller 15. The DMA controller and CPU which has acquired the bus master right of the internal system bus 13 hand over the bus master right to the CPU and DMA controller which claim the bus mater right when the memory controller or I/O controller are not able to perform access to the SDRAM and input/output device. Then, when the memory controller and I/O controller are turned to be able to perform access to the SDRAM and input/output device, the the DMA controller and CPU preferentially acquires the bus master right. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、バス・アービトレーション、特に、共通のパスを介して外部装置を接続する処理装置における内部バスのバス・アービトレーションに関する。
【0002】
【従来の技術】
従来、共用バスに結合された複数の装置において、共用バスに対するバス要求が同時に発生した場合には、優先順位の高い順にバス・アクセスを許可していくようにしている(例えば、特許文献1参照)。この技術は、マルチプロセッサ・システムにおいて、独立して動作している複数のプロセッサが内部システムバスを同一クロック・サイクルでアクセスしようと試みた場合に、バスの制御権を調停するというものである。これにより、共用バスとしての内部システムバスに対する複数のバスマスタ間のアービトレーションを実現している。
【0003】
ところで、複数のバスマスタに共用される内部システムバスのスレーブが、共用外部インタフェースを介して、共用バスである外部バスに接続されている外部メモリや入出力装置等の外部装置をアクセスするように構成された処理装置が周知である。例えば、近年では、周辺回路内臓の1チップCPUタイプのLSI回路(Large Scale Integrated Circuit)は、端子数の節約のために一つの端子に複数の機能を持たせ、必要に応じて機能を切り替える共用ピンにより、複数の機能ブロックの外部I/Fを共用化することが多い。すなわち、外部メモリや入出力装置に対するインタフェース(以下、インタフェースを「I/F」と記す)の一部のアドレスバスやデータバスの端子を共用外部端子とし、適宜に端子機能を切り替えてメモリ系I/FとI/O系I/Fの両方の機能を実現させるのである。
【0004】
【特許文献1】
特開平10−283310(第2頁、図3)
【0005】
【発明が解決しようとする課題】
このような処理装置では、LSI回路内部におけるコアとしてのCPUやDMAコントローラ等の内部バスマスタ間の内部システムバスに対するアービトレーションが実現できたとしても、内部バスマスタから外部バスにアクセスする際に、共用外部I/Fに対するスレーブ(メモリコントローラ,I/Oコントローラ,内部レジスタ等)間のアービトレーションにより、スレーブが直ちに対応できない場合がある。その結果、内部システムバスの制御権(以下、「バスマスタ権」と記す)を取得した内部バスマスタによる外部共用端子を経由した外部のメモリや入出力装置(以下、「I/O」と記す)へのアクセスが滞り、システムのデータストリームにとって許されない待ち時間が発生する可能性がある。
【0006】
例えば、CPUからI/Oにデータをライトした直後に、DMAコントローラが外部のSDRAMにアクセスするという状況が考えられる。
【0007】
このとき、CPUからI/Oコントローラにデータがライトされ、I/Oコントローラ内のデータバッファにCPUからのデータが格納される。データバッファにライトデータが格納された後にI/Oコントローラは外部バスに接続されているI/Oに対してライト動作を行う。この際、I/Oコントローラは外部バスへのアクセス権を直ちに取得してアクセスを行えるとする。CPUからI/Oへの一連のライト動作の内、内部システムバス上においては、I/Oコントローラ内のデータバッファにデータが格納された時点で、CPUのアクセスは終了するので、CPUは内部システムバスのバスマスタ権を、バスマスタ権を要求しているDMAコントローラに直ちに渡す。
【0008】
内部システムバスのバスマスタ権を取得したDMAコントローラは、外部のSDRAMにアクセスするために、内部システムバスのスレーブとしてメモリコントローラにアクセスをする。しかし、DMAコントローラがメモリコントローラにアクセスした時点では、I/Oコントローラが内部のデータバッファのデータを外部のI/Oにライトしており、外部バスが使用されているので、メモリコントローラは直ちにはDMAコントローラからのアクセスに応えることができない。I/Oコントローラのデータバッファ内のデータが全てI/Oに書き込まれるまで、メモリコントローラは外部バスにアクセスすることができないので、その間、メモリコントローラはDMAコントローラに対してアクセスのリトライ要求を出し続ける等の状況に陥り、DMAコントローラとメモリコントローラとで内部システムバスをロックしてしまう。
【0009】
さらに、内部システムバスが上述の状況でロックしている間に、CPUから内部レジスタへのアクセスが発生した場合は、I/Oへのライトが終了して内部バスのロックが解消され、DMAコントローラのアクセスが終了し、内部バスのバスマスタ権をCPUが再度取得できるまで、CPUはアクセスを行えない。一定時間内にCPUが内部レジスタに対してアクセスする必要があるのに、CPUが内部システムバスのバスマスタ権を許容時間内に獲得できない場合は致命的である。
【0010】
このようにして、システムのデータストリームにとって許されない待ち時間が発生する可能性がある。この症状は、CPUや内部システムバスおよびSDRAMが高速で、外部のI/Oが内部システムバスほど高速に動作ができない場合に顕著になる。
【0011】
しかしながら、上述した従来技術では、内部バスのアービトレーションに共用外部I/Fのアービトレーションの結果は反映されていないため、内部バスにおいてバスマスタとスレーブの間でバスホールド、またはアクセスのリトライが連続する、といった状態が発生し、あたかも内部バスがロックしてしまうかのような状態が発生する場合があるという問題点があるのである。
【0012】
そこで、本発明の主な目的は、共通のパスを介して外部装置を接続する処理装置においても、内部システムバスがロックしてシステムのデータストリームにとって許されないような待ち時間が発生しないように、内部システムバスの使用効率を向上させたバス・アービトレーション装置を提供することにある。
【0013】
【課題を解決するための手段】
本発明のバス・アービトレーション装置は、共通のパスを介して外部装置を接続する処理装置における内部バスのバス・アービトレーション装置において、内部バスの対象スレーブ側が外部装置をアクセス不可の場合は、内部バスのバスマスタはバスマスタ権を要求している別のバスマスタにバスマスタ権を譲渡し、次に対象スレーブ側が外部装置をアクセス可になった場合に、優先的にバスマスタ権を獲得するようにしたことを特徴とするものである。
【0014】
より詳しくは、本発明のバス・アービトレーション装置は、共用の外部バス(図1の20)を介して接続されているSDRAM(図1の30)または入出力装置(図1の40)をアクセス可能な処理装置(図1の10)の内部システムバス(図1の13)に対するバス・アービトレーション装置において、処理装置は、SDRAMとのデータの受渡しを制御するメモリコントローラ(図1の14)と、入出力装置へのアクセスを行いデータの受渡しを制御するI/Oコントローラ(図1の15)と、メモリコントローラとI/Oコントローラとの間の外部バスへのアクセスに対するアービトレーションを行う共用外部インタフェース(図1の17)と、コアとしてのCPU(図1の11)と、DMA転送を制御するDMAコントローラ(図1の12)と、メモリコントローラ,I/Oコントローラ,CPUおよびDMAコントローラが接続される内部システムバス(図1の13)とを含み、内部システムバスのバスマスタ権を獲得したDMAコントローラ,CPUは、メモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセス不可の場合は、バスマスタ権を要求しているCPU,DMAコントローラにバスマスタ権を譲渡し、次にメモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセスア可になった場合に、優先的に前記バスマスタ権を獲得するようにしたことを特徴とする。
【0015】
本発明では、CPU,DMAコントローラ等の複数のバスマスタ候補からのバスマスタ権要求に対して、単純にバスマスタ側のみの都合によるバスマスタ権要求に対しての一連のアービトレーションを行うのではなく、バスマスタ権を獲得した内部システムバスの該バスマスタに対応するスレーブの状態を該バスマスタに確認させ、もし該スレーブが該バスマスタからのアクセスに直ちに応答できないのであれば該バスマスタにバスマスタ権を放棄させて、バスマスタ権を要求している他のバスマスタ候補にバスマスタ権を与え、その後に該スレーブが該バスマスタからのアクセスの準備ができれば、他のバスマスタのアクセスが終了した時点で優先的に該バスマスタがバスマスタ権を取得するようにしている。
【0016】
すなわち、この内部システムバスのアービトレーションは、複数バスマスタ候補側のバスマスタ権の要求だけによるアービトレーションではなく、バスマスタに対してのスレーブ側の即応性をチェックして、バスマスタ権を与えた該バスマスタに対してスレーブ側として最良の条件でバスマスタ側を極力待たせることなくアクセスに応答できるように、内部システムバスのスレーブの状態も考慮してバスマスタ権のアービトレーション動作をする。
【0017】
従って、内部バスマスタのあるバスマスタがバスマスタ権をもっている時に、対応するスレーブが直ちに応答できず、該バスマスタを待たせることによって内部システムバスをロックしてしまい、その間、他のバスマスタがバスマスタ権をとれずに待機している状態、すなわち内部システムバスのロック状態が発生し、システム全体がスレーブの状態によって止まってしまう状況を防ぎ、システムのデータストリームにとって許されない待ち時間が発生する可能性を極力防ぐことができるという効果が得られる。
【0018】
【発明の実施の形態】
次に、本発明の上記および他の目的、特徴および利点を明確にすべく、以下添付した図面を参照しながら、本発明の実施の形態につき詳細に説明する。
【0019】
【構成の説明】
図1は本発明のバス・アービトレーション装置の一実施例を示すブロック図である。このバス・アービトレーション装置は、周辺回路を内臓する1チップCPUタイプのLSI回路によるシステム構成例であり、LSI回路10と、SDRAM30およびI/O40とが共用の外部バス20を介して接続されている。本バス・アービトレーション装置は、このような構成において、外部バス使用時における内部システムバスのアービトレーションの使用効率を高めることにより、内部システムバスがロックすることを極力回避する機能を有する。
【0020】
LSI回路10は、CPU11の他に、DMAコントローラ12,メモリコントローラ14,I/Oコントローラ15,内部レジスタ16等の機能ブロックと、これらの機能ブロックを接続する内部システムバス13と、LSI回路10の外部に位置するSDRAM30およびI/O40と共用端子で接続するための共用外部IF17とを内蔵している。
【0021】
CPU11はコアとしての中央処理装置であり、内部レジスタ16はLSI回路10内部のリード・ライト可能なレジスタである。また、DMAコントローラ12はDMA転送を制御し、メモリコントローラ14は汎用メモリデバイスであるSDRAM30とのデータの受渡しを制御し、I/Oコントローラ15はI/O40などへのアクセスを行いデータの受渡しを制御する。
【0022】
この構成例では、CPU11とDMAコントローラ12が内部システムバス13のバスマスタ候補であり、メモリコントローラ14とI/Oコントローラ15と内部レジスタ16とは、内部システムバス13のバスマスタに対応する内部システムバス13のスレーブになる。本LSI回路10とSDRAM30とI/O40とは、共用外部I/F17によって接続されている。メモリコントローラ14とI/Oコントローラ15のいずれが外部バス20にアクセスできるかは、共用外部I/F17にてアービトレーションされた結果による。
【0023】
I/Oコントローラ15には、内部システムバス13に比べて動作スピードが遅いI/O40とのデータの受渡しのためにデータバッファを内臓している。内部システムバス13のバスマスタから、内部システムバス13ほど高速で動作できないI/O40にアクセスする際には、一旦、データをI/Oコントローラ15内部のデータバッファに貯めてからI/O40とデータの受け渡しを行うのである。
【0024】
これに反して、内部システムバス13からメモリコントローラ14を経由してのSDRAM30へのアクセスは、高速なCPU11やSDRAM30が高いパフォーマンスを発揮して、本システムがなるべく高速で動作できるように、データバッファを介在することなく、内部システムバス13の動作スピードに合わせて行える構成となっている。
【0025】
この構成例では、LSI回路10の端子数を節約するために、メモリコントローラ14およびI/Oコントローラ15と、外部とのI/Fの一部の端子(アドレスバスやデータバス)を兼用端子として、機能を適宜に切替えて使用する共用I/Fである共用外部I/F17で外部バス20と接続されている。SDRAM30およびI/O40は外部バス20に接続されて、LSI回路10とデータのやり取りをする。
【0026】
CPU11またはDMAコントローラ12が内部システムバス113にアクセスする必要が生じた際は、バスマスタ権を内部システムバス13に要求する。この要求が重なった場合には、内部システムバス13のアービトレーションに基づいて、いずれか一方のバスマスタ候補にバスマスタ権が与えられる。
【0027】
また、いずれのバスマスタ候補も、バスマスタ権を獲得した際に、アクセス対象のスレーブ側がアクセスに即座に応答できない場合には、スレーブの応答を待ちつづけることなく、内部システムバス13へのアクセスサイクルを終了させて、バスマスタ権を放棄するように設定することができる。ここに、メモリコントローラ14,I/Oコントローラ15および内部レジスタ16が内部システムバス13におけるスレーブであり、バスマスタ候補であるCPU11とDMAコントローラ12のアクセス対象になる。
【0028】
メモリコントローラ14はSDRAM30に対して、I/Oコントローラ15はI/O40に対して、それぞれ共用外部I/F17および外部バス20を介して、データのリード・ライトを行う。共用外部I/F17は、アービトレーションを行って、兼用端子(アドレスバス、データバス)の機能をメモリコントローラ14用とI/Oコントローラ15用とに切替える。内部システムバス13のスレーブ(メモリコントローラ14またはI/Oコントローラ15)から外部バス20に対してのアクセスは、共用外部I/F17のアービトレーションにより外部バス20へのアクセス権が決定され、アクセス権を取得したいずれか一方のスレーブが可能となる。
【0029】
CPU11,DMAコントロー12,SDRAM30およびI/O40は、当業者にとってよく知られており、また、それ自体は本発明とは直接に関係しないので、その詳細な構成は省略する。
【0030】
【動作の説明】
以下、本実施例の動作について説明する。
【0031】
先ず、本実施例の特徴的な動作を概説する。内部システムバス13のバスマスタ側からスレーブ側へのアクセス要求がトリガとなり、内部システムバス13のスレーブであるメモリコントローラ14またはI/Oコントローラ15から外部バス20へのアクセス要求が発生する。このアクセス要求が同時に発生した場合には、共用外部I/F17のアービトレーションによって、外部バス20へのアクセス権が共用外部I/F17から内部システムバス13のスレーブに与えられる。
【0032】
内部システムバス13のバスマスタから、外部バス20へアクセスする必要のあるスレーブ(メモリコントローラ14またはI/Oコントローラ15)にアクセスする時点で、常にスレーブ側が外部バス20に対してアクセス可能であるとは限らない。内部システムバス13のバスマスタからのアクセスをスレーブ側(メモリコントローラ14またはI/Oコントローラ15)が受けられるかどうかの情報をスレーブ側はバスマスタ側に通知する。
【0033】
バスマスタ側はスレーブ側がアクセスを受けられるどうかを認識して、スレーブ側がアクセス要求に応答できない場合は、バスマスタ権を保持したままで従来と同様にアクセスをやり直す(単純リトライ)か、あるいはアクセスを一時保留してスレーブ側がアクセス要求に応答できる状態になるまでバスマスタ権を譲渡する。バスマスタが、単純にアクセスをやり直すか、バスマスタ権を譲渡するかのどちらかを選択するかは、予めアプリケーションプログラム等によって設定しておく。
【0034】
バスマスタ権を譲渡する動作の場合、アクセス対象であったスレーブがバスマスタからのアクセスに応答できるようになったら、直ちにそのスレーブはバスマスタ権を譲渡したバスマスタにアクセスOKであることを通知する。バスマスタはその時点で、他の内部システムバス13におけるバスマスタへのアクセスの終了を待って、バスマスタ権を優先的に再取得できる。バスマスタ権を取り戻したら、アクセス対象のスレーブにアクセスを行う。
【0035】
次に、図2〜図3に示すフローチャートを参照して、図1に示した実施例の動作を詳述する。図2はバスマスタ側からみた動作を示すフローチャートであり、図3は内部システムバス13側からみた動作を示すフローチャートである。
【0036】
当初、バスマスタ(CPU11またはDMAコントローラ12)がバスマスタ権を取得した場合に、スレーブ側がアクセス要求に応答できないときは、単純にアクセスをやり直すか、バスマスタ権を譲渡するかのどちらかを選択するかをアプリケーションプログラム等によってフラグに設定しておく。選択基準は、システム全体のパフォーマンスや制約に基づく。
【0037】
待機状態にある(図2のステップA1)バスマスタからアクセス要求が発生し、内部システムバス13のバスマスタのアービトレーションにより、そのバスマスタがバスマスタ権を獲得すると(ステップA2でYES)、予め設定されている単純リトライアクセスか否かによって、それぞれステップA12かステップA4のいずれかに分岐する(ステップA3)。
【0038】
ステップA12では、アクセス対象の内部システムバス13のスレーブが外部バス20にアクセスができるまでアクセスをリトライし続け、アクセス対象のスレーブの準備ができたら対象スレーブにアクセスする(ステップA9)。
【0039】
ステップA4では、アクセス対象の内部システムバス13のスレーブ側がアクセスOKであればバスマスタは該スレーブにアクセスし(ステップA9)、またアクセスOKでないときは、バスマスタはバスマスタ権を他の内部システムバス13のバスマスタに譲渡し、内部システムバス13に対してバスマスタ権獲得の優先予約を入れる(ステップA5)。
【0040】
そして、アクセス対象のスレーブがバスマスタからアクセス可能になるまでループし(ステップA6でNO)、アクセス可能になれば(ステップA6でYES)、他のバスマスタによるアクセスが完了しているを確認して(ステップA7でYES)、ステップA5にて入れておいたバスマスタ権獲得の優先予約に基づき、該バスマスタは、バスマスタ権を取り戻す(ステップA8)。この時、他のバスマスタより優先的に該バスマスタにバスマスタ権が与えられ、バスマスタはスレーブにアクセスをする(ステップA9)。
【0041】
スレーブへのアクセスが終了すると(ステップA10でYES)、バスマスタ権を開放する(ステップA11)。
【0042】
次に、図3において、初期のアイドル状態(図3のステップB1)からは無条件にステップB2に進み、バスマスタからのバスマスタ権要求または優先予約があるかをチェックする(ステップB2)。バスマスタ権要求または優先予約のいずれも無い場合は(ステップB2でNO)、CPU11にバスマスタ権を与える(ステップB2)。
【0043】
一方、バスマスタ権要求または優先予約のいずれかがあった場合は(ステップB2でYES)、更に優先予約があるかどうかをチェックする(ステップB4)。その結果、優先予約があった場合は(ステップB4でYES)、内部システムバス13のバスマスタからの優先予約に対して、先着順でバスマスタにバスマスタ権を与え(ステップB5)、バスマスタ権を与えたバスマスタの優先予約をクリアする(ステップB6)。
【0044】
また、優先予約が無かった場合は(ステップB4でNO)、通常のバスマスタ権要求によるアービトレーションにより選ばれたバスマスタにバスマスタ権を与える(ステップB7)。
【0045】
最後に、内部システムバス13のバストランザクションが終了しているかをチェックし(ステップB8)、終了していたらステップB1へ回帰する。
【0046】
以上の図2および図3のフローチャートで示した一連の動作において、図2のステップA3からステップA12に分岐して対象のスレーブのアクセス準備ができるまでステップA9に移れない、すなわち対象スレーブ側の準備ができるまで図1の内部システムバス13のバスマスタ権を保持しつづけるのが従来形式のアービトレーション動作である。その従来のアービトレーション動作に加えて、本バス・アービトレーションでは、ステップA3からステップA4に分岐して、対象スレーブの状態によっては、内部システムバス13のバスマスタがバスマスタ権を他のバスマスタへ譲渡し、対象スレーブがアクセスOKになったら優先的にバスマスタ権を取戻すアービトレーション動作を付加している。
【0047】
【他の実施例】
次に、本発明の他の実施例について図4のフローチャートにより説明する。この実施例は、構成は図1に示したとおりであるが、図1の内部システムバス13のスレーブ側がバスマスタ側からのアクセスに即座にアクセスに応答できない場合のアービトレーションのモード切替について、さらに工夫している。
【0048】
図2のフローチャートに示す一連のアービトレーションにおいては、バスマスタ側からのアクセスにスレーブ側が即座に応答できないとき、単純リトライアクセスを繰り返すか、内部システムバスの該バスマスタにバスマスタ権を一時的に譲渡する一連の動作をさせるかアービトレーションのモードは固定的であった。図4の実施例では、このようなモードの設定はせず、バスマス権を獲得してもスレーブ側の準備ができていなかった場合に、所定回数のリトライを実行した上でバスマスタ権を譲渡するようにしている。リトライ回数の限界値は、アプリケーションプログラム等によって設定しておく。
【0049】
このような構成としたため、図2の実施例では単純リトライアクセスの場合に、対象スレーブ側がアクセスOKでないときはアクセスOKになるまでリトライを繰返しているが、図4の実施例では、リトライ回数が限界値に達すると他のバスマスタにバスマスタ権を譲渡することになる。一方、図2の実施例では非単純リトライアクセスの場合に、対象スレーブ側がアクセスOKでないときは即刻、他のバスマスタにバスマスタ権を譲渡しているが、図4の実施例では、限界値に達するまではリトライを繰り返し、その上で他のバスマスタにバスマスタ権を譲渡することになる。
【0050】
当初は待機状態であり(ステップC1)、図1におけるCPU11またはDMAコントローラ12のバスマスタからアクセス要求が発生した場合に、内部システムバス13のバスマスタのアービトレーションにより、該バスマスタがバスマスタ権を獲得すると(ステップC2でYES)、該バスマスタからのアクセスを対象のスレーブ側が受けられるかどうかをチェックする(ステップC3)。その結果、スレーブ側がアクセスを受けられる場合は(ステップC3でYES)、該バスマスタからスレーブにアクセスを行う(ステップC9)。
【0051】
しかし、スレーブ側がアクセスを受けられない場合は(ステップC3でNO)、リトライアクセスを行うためにステップC4に遷移する。ステップC4ではリトライアクセスの回数をカウントしている。リトライアクセスの回数がリトライ限界値に達していなければ(ステップC4でNO)、該バスマスタからのアクセスを対象のスレーブ側が受けられるかどうかをチェックする(ステップC3)、リトライアクセスを行う。このリトライ回数の限界値はシステム全体の特性、制約などに基づいて適切な値を任意に設定できる。
【0052】
リトライアクセスの回数がリトライ限界値に達すると(ステップC4でYES)、バスマスタはバスマスタ権を他の内部システムバス13のバスマスタに譲渡し、内部システムバス13に対してバスマスタ権獲得の優先予約を入れる(ステップC5)。
【0053】
そして、アクセス対象のスレーブがバスマスタからアクセス可能になるまでループし(ステップC6でNO)、アクセス可能になれば(ステップC6でYES)、他のバスマスタによるアクセスが完了しているを確認して(ステップC7でYES)、ステップC5にて入れておいたバスマスタ権獲得の優先予約に基づき、該バスマスタは、バスマスタ権を取り戻す(ステップC8)。この時、他のバスマスタより優先的に該バスマスタにバスマスタ権が与えられ、バスマスタはスレーブにアクセスをする(ステップC9)。
【0054】
スレーブへのアクセスが終了終了すると(ステップC10でYES)、バスマスタ権を開放する(ステップC11)。
【0055】
このように、図4のフローチャートに示すバス・アービトレーションにおいては、アクセス対象のスレーブ側の状況によって内部システムバス13がリトライアクセスの繰返しによってロック状態に陥ることを防ぐと共に、アービトレーション動作を図2のように設定によって固定的にせず、リトライアクセスが行われた回数でアービトレーション動作を自動的に切替えるようにしている。
【0056】
【発明の効果】
以上説明したように、本願発明によれば、内部システムバスに複数のバスマスタ候補を持ち、バスマスタのアクセス対象の複数のスレーブが共用外部I/FにてメモリやI/Oなどの外部デバイスに接続されているシステムにおいて、ある内部バスマスタがバスマスタ権をもっている時に、対応するスレーブが直ちに応答できず、該バスマスタを待たせることによって内部システムバスをロックしてしまい、その間、他のバスマスタがバスマスタ権をとれずに待機している状態、すなわち内部システムバスのロック状態が発生し、システム全体がスレーブの状態によって止まってしまう状況を防ぎ、システムのデータストリームにとって許されない待ち時間が発生する可能性を極力防ぐことができるという効果が得られる。
【0057】
なお、本発明が上記各実施例に限定されず、本発明の技術思想の範囲内において、各実施例は適宜変更され得ることは明らかである。
【図面の簡単な説明】
【図1】本発明のバス・アービトレーション装置の一実施例を示すブロック図
【図2】図1に示した実施例のバスマスタ側からみた場合の動作例を示すフローチャート
【図3】図1に示した実施例の内部システムバス側からみた場合の動作例を示すフローチャート
【図4】図1に示した実施例のバスマスタ側からみた場合の他の動作例を示すフローチャート
【符号の説明】
10   LSI回路
11   CPU
12   DMAコントローラ
13   内部システムバス
14   メモリコントローラ
15   I/Oコントローラ
16   内部レジスタ
17   共用外部I/F
20   外部バス
30   SDRAM
40   I/O
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to bus arbitration, and more particularly to bus arbitration of an internal bus in a processing device that connects external devices via a common path.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, when a plurality of devices connected to a shared bus simultaneously generate a bus request for the shared bus, the bus access is permitted in descending order of priority (for example, see Patent Document 1). ). This technique arbitrates control of a bus in a multiprocessor system when multiple independently operating processors attempt to access an internal system bus in the same clock cycle. Thereby, arbitration between a plurality of bus masters with respect to an internal system bus as a shared bus is realized.
[0003]
By the way, a slave of an internal system bus shared by a plurality of bus masters is configured to access an external device such as an external memory or an input / output device connected to the external bus which is a shared bus via a shared external interface. Processed devices are well known. For example, in recent years, a single-chip CPU type LSI circuit (Large Scale Integrated Circuit) with a built-in peripheral circuit has one terminal provided with a plurality of functions to save the number of terminals, and switches functions as needed. The pins often share the external I / F of a plurality of functional blocks. That is, some address bus and data bus terminals of an interface to an external memory and an input / output device (hereinafter, the interface is referred to as “I / F”) are used as shared external terminals, and the terminal functions are appropriately switched to change the memory system / F and the function of both the I / O I / F.
[0004]
[Patent Document 1]
JP-A-10-283310 (page 2, FIG. 3)
[0005]
[Problems to be solved by the invention]
In such a processing device, even when arbitration for an internal system bus between internal bus masters such as a CPU or a DMA controller as a core in an LSI circuit can be realized, when accessing an external bus from the internal bus master, a shared external I / O is required. Due to the arbitration between / F and the slave (memory controller, I / O controller, internal register, etc.), the slave may not be able to respond immediately. As a result, the internal bus master having acquired the control right of the internal system bus (hereinafter, referred to as “bus master right”) transfers to an external memory or an input / output device (hereinafter, referred to as “I / O”) via an external shared terminal. Access may be delayed, resulting in unacceptable latency for the system data stream.
[0006]
For example, a situation can be considered in which the DMA controller accesses an external SDRAM immediately after writing data to I / O from the CPU.
[0007]
At this time, data is written from the CPU to the I / O controller, and data from the CPU is stored in a data buffer in the I / O controller. After the write data is stored in the data buffer, the I / O controller performs a write operation on the I / O connected to the external bus. At this time, it is assumed that the I / O controller can immediately acquire the access right to the external bus and perform the access. In a series of write operations from the CPU to the I / O, the CPU terminates the access on the internal system bus when the data is stored in the data buffer in the I / O controller. The bus mastership of the bus is immediately passed to the DMA controller requesting the bus mastership.
[0008]
The DMA controller that has acquired the bus master right of the internal system bus accesses the memory controller as a slave of the internal system bus in order to access the external SDRAM. However, when the DMA controller accesses the memory controller, the I / O controller writes the data in the internal data buffer to the external I / O, and the external bus is used. It cannot respond to access from the DMA controller. The memory controller cannot access the external bus until all the data in the data buffer of the I / O controller has been written to the I / O. During this time, the memory controller keeps issuing a retry request for access to the DMA controller. Etc., and the internal system bus is locked by the DMA controller and the memory controller.
[0009]
Further, if the CPU accesses the internal register while the internal system bus is locked in the above-described situation, the writing to the I / O ends, the lock on the internal bus is released, and the DMA controller is released. The access cannot be performed by the CPU until the access is completed and the CPU can acquire the bus mastership of the internal bus again. It is fatal if the CPU needs to access the internal register within a certain period of time but cannot acquire the bus mastership of the internal system bus within the allowable time.
[0010]
In this way, unacceptable latency can occur for the data stream of the system. This symptom becomes remarkable when the CPU, the internal system bus, and the SDRAM are operated at a high speed, and the external I / O cannot operate as fast as the internal system bus.
[0011]
However, in the above-described prior art, since the result of the arbitration of the shared external I / F is not reflected in the arbitration of the internal bus, the bus hold or the access retry continues between the bus master and the slave in the internal bus. There is a problem that a state occurs and a state may occur as if the internal bus is locked.
[0012]
Therefore, a main object of the present invention is to provide a processing device that connects an external device via a common path so that an internal system bus is locked so that a waiting time that is not allowed for a system data stream does not occur. An object of the present invention is to provide a bus arbitration device in which the use efficiency of an internal system bus is improved.
[0013]
[Means for Solving the Problems]
The bus arbitration device of the present invention is a bus arbitration device for an internal bus in a processing device that connects an external device via a common path, and when the target slave side of the internal bus cannot access the external device, The bus master transfers the bus master right to another bus master requesting the bus master right, and then acquires the bus master right preferentially when the target slave side can access the external device. Is what you do.
[0014]
More specifically, the bus arbitration device of the present invention can access an SDRAM (30 in FIG. 1) or an input / output device (40 in FIG. 1) connected via a shared external bus (20 in FIG. 1). In the bus arbitration device for the internal system bus (13 in FIG. 1) of the simple processing device (10 in FIG. 1), the processing device includes a memory controller (14 in FIG. 1) for controlling the transfer of data to and from the SDRAM. An I / O controller (15 in FIG. 1) that accesses an output device and controls data transfer, and a shared external interface (FIG. 1) that performs arbitration for access to an external bus between the memory controller and the I / O controller. 1, 17), a CPU as a core (11 in FIG. 1), and a DMA controller (FIG. 1) for controlling DMA transfer. 12) and an internal system bus (13 in FIG. 1) to which a memory controller, an I / O controller, a CPU, and a DMA controller are connected. , I / O controller cannot access the SDRAM and the I / O device, transfer the bus master right to the CPU and DMA controller requesting the bus master right, and then transfer the memory controller and the I / O controller to the SDRAM and the I / O device. When the device is accessible, the bus master right is preferentially acquired.
[0015]
According to the present invention, in response to a bus master right request from a plurality of bus master candidates such as a CPU and a DMA controller, a series of arbitrations for a bus master right request solely due to the bus master side is not performed. The bus master confirms the status of the slave corresponding to the bus master of the acquired internal system bus, and if the slave cannot immediately respond to the access from the bus master, causes the bus master to relinquish the bus mastership and to grant the bus mastership. If the bus master right is given to another requesting bus master candidate and the slave is ready for access from the bus master thereafter, the bus master preferentially acquires the bus master right when the access of the other bus master is completed. Like that.
[0016]
That is, the arbitration of the internal system bus is not arbitration based on only the request for the bus master right of the plurality of bus master candidates, but the responsiveness of the slave side to the bus master is checked, and The arbitration operation of the bus master right is performed in consideration of the status of the slave of the internal system bus so that the bus master can respond to the access under the best conditions without making the bus master wait as much as possible.
[0017]
Therefore, when a bus master having an internal bus master has the bus mastership, the corresponding slave cannot immediately respond, locking the internal system bus by making the bus master wait, during which other bus masters cannot take the bus mastership. To prevent a situation in which the internal system bus is locked and the entire system is stopped by the status of a slave, and to minimize the possibility of waiting time unacceptable for the system data stream. Is obtained.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, in order to clarify the above and other objects, features and advantages of the present invention, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0019]
[Description of configuration]
FIG. 1 is a block diagram showing one embodiment of the bus arbitration apparatus of the present invention. This bus arbitration apparatus is an example of a system configuration using a one-chip CPU type LSI circuit incorporating a peripheral circuit. An LSI circuit 10, an SDRAM 30 and an I / O 40 are connected via a shared external bus 20. . In such a configuration, the present bus arbitration device has a function of minimizing the locking of the internal system bus by increasing the use efficiency of the arbitration of the internal system bus when the external bus is used.
[0020]
The LSI circuit 10 includes, in addition to the CPU 11, functional blocks such as a DMA controller 12, a memory controller 14, an I / O controller 15, and an internal register 16, an internal system bus 13 connecting these functional blocks, A common external IF 17 for connecting to the external SDRAM 30 and I / O 40 via a common terminal is built in.
[0021]
The CPU 11 is a central processing unit as a core, and the internal register 16 is a readable / writable register inside the LSI circuit 10. The DMA controller 12 controls DMA transfer, the memory controller 14 controls data transfer to and from the SDRAM 30, which is a general-purpose memory device, and the I / O controller 15 accesses the I / O 40 and the like to transfer data. Control.
[0022]
In this configuration example, the CPU 11 and the DMA controller 12 are candidate bus masters for the internal system bus 13, and the memory controller 14, the I / O controller 15, and the internal register 16 form the internal system bus 13 corresponding to the bus master of the internal system bus 13. Become a slave of. The present LSI circuit 10, SDRAM 30, and I / O 40 are connected by a shared external I / F 17. Which of the memory controller 14 and the I / O controller 15 can access the external bus 20 depends on the result of arbitration by the shared external I / F 17.
[0023]
The I / O controller 15 has a built-in data buffer for transferring data to and from the I / O 40 whose operation speed is slower than that of the internal system bus 13. When accessing the I / O 40 that cannot operate at a speed as high as that of the internal system bus 13 from the bus master of the internal system bus 13, the data is temporarily stored in a data buffer inside the I / O controller 15, and It is handed over.
[0024]
On the other hand, access from the internal system bus 13 to the SDRAM 30 via the memory controller 14 is performed so that the high-speed CPU 11 and the SDRAM 30 exhibit high performance, and the present system can operate at a high speed. , And can be performed in accordance with the operation speed of the internal system bus 13 without any intervention.
[0025]
In this configuration example, in order to save the number of terminals of the LSI circuit 10, some terminals (address bus and data bus) of the memory controller 14 and the I / O controller 15 and an external I / F are used as shared terminals. , Are connected to the external bus 20 via a shared external I / F 17 which is a shared I / F used by appropriately switching functions. The SDRAM 30 and the I / O 40 are connected to the external bus 20, and exchange data with the LSI circuit 10.
[0026]
When the CPU 11 or the DMA controller 12 needs to access the internal system bus 113, it requests the bus master right to the internal system bus 13. When these requests overlap, one of the bus master candidates is given the bus master right based on the arbitration of the internal system bus 13.
[0027]
When any of the candidate bus masters acquires the bus mastership and the slave to be accessed cannot immediately respond to the access, the access cycle to the internal system bus 13 is terminated without waiting for the slave to respond. Then, it can be set so as to abandon the bus master right. Here, the memory controller 14, the I / O controller 15, and the internal register 16 are slaves on the internal system bus 13 and can be accessed by the CPU 11 and the DMA controller 12, which are bus master candidates.
[0028]
The memory controller 14 reads and writes data from and to the SDRAM 30, and the I / O controller 15 reads and writes data from and to the I / O 40 via the shared external I / F 17 and the external bus 20. The shared external I / F 17 performs arbitration, and switches the functions of the shared terminals (address bus and data bus) between those for the memory controller 14 and those for the I / O controller 15. The access right from the slave (memory controller 14 or I / O controller 15) of the internal system bus 13 to the external bus 20 is determined by the arbitration of the shared external I / F 17, and the access right is determined. Either one of the acquired slaves becomes possible.
[0029]
The CPU 11, the DMA controller 12, the SDRAM 30, and the I / O 40 are well known to those skilled in the art, and are not directly related to the present invention.
[0030]
[Description of operation]
Hereinafter, the operation of the present embodiment will be described.
[0031]
First, the characteristic operation of the present embodiment will be outlined. An access request from the bus master side of the internal system bus 13 to the slave side becomes a trigger, and an access request to the external bus 20 is generated from the memory controller 14 or the I / O controller 15 which is a slave of the internal system bus 13. When this access request occurs at the same time, the access right to the external bus 20 is given to the slave of the internal system bus 13 from the shared external I / F 17 by arbitration of the shared external I / F 17.
[0032]
When the bus master of the internal system bus 13 accesses a slave (the memory controller 14 or the I / O controller 15) that needs to access the external bus 20, it is always said that the slave can access the external bus 20. Not exclusively. The slave notifies the bus master of information on whether or not the slave (memory controller 14 or I / O controller 15) can receive the access from the bus master of the internal system bus 13.
[0033]
The bus master recognizes whether or not the slave can receive the access, and if the slave cannot respond to the access request, re-executes the access while maintaining the bus master right (simple retry), or temporarily suspends the access. Then, the bus mastership is transferred until the slave side can respond to the access request. Whether the bus master simply selects access again or transfers the bus master right is set in advance by an application program or the like.
[0034]
In the operation of transferring the bus master right, as soon as the slave to be accessed can respond to the access from the bus master, the slave immediately notifies the bus master to which the bus master right has been transferred that the access is OK. At that time, the bus master can wait for the end of the access to the bus master in the other internal system bus 13 and re-acquire the bus master right preferentially. When the bus mastership is regained, the access target slave is accessed.
[0035]
Next, the operation of the embodiment shown in FIG. 1 will be described in detail with reference to the flowcharts shown in FIGS. FIG. 2 is a flowchart showing the operation as seen from the bus master side, and FIG. 3 is a flowchart showing the operation as seen from the internal system bus 13 side.
[0036]
Initially, if the bus master (CPU 11 or DMA controller 12) acquires the bus mastership and the slave cannot respond to the access request, it simply asks whether to simply retry the access or to transfer the bus mastership. The flag is set by an application program or the like. Selection criteria are based on overall system performance and constraints.
[0037]
When an access request is issued from the bus master in the standby state (step A1 in FIG. 2) and the bus master acquires the bus master right by arbitration of the bus master of the internal system bus 13 (YES in step A2), a preset simple preset is performed. The process branches to either step A12 or step A4 depending on whether the access is a retry access (step A3).
[0038]
At step A12, access is retried until the slave of the internal system bus 13 to be accessed can access the external bus 20, and when the slave to be accessed is ready, the slave is accessed (step A9).
[0039]
In step A4, if the access side of the slave of the internal system bus 13 to be accessed is OK, the bus master accesses the slave (step A9). If the access is not OK, the bus master gives the bus master right to the other internal system bus 13. The transfer is made to the bus master, and a priority reservation for acquiring the bus master right is made to the internal system bus 13 (step A5).
[0040]
Then, the process loops until the slave to be accessed becomes accessible from the bus master (NO in step A6), and when the slave becomes accessible (YES in step A6), it is confirmed that the access by the other bus master is completed ( The bus master regains the bus master right based on the priority reservation for acquiring the bus master right set in step A5 (YES in step A7) (step A8). At this time, the bus master is given priority over the other bus masters, and the bus master accesses the slave (step A9).
[0041]
When the access to the slave is completed (YES in step A10), the bus mastership is released (step A11).
[0042]
Next, in FIG. 3, from the initial idle state (step B1 in FIG. 3), the process unconditionally proceeds to step B2 to check whether there is a bus master right request or priority reservation from the bus master (step B2). If neither the bus master right request nor the priority reservation is present (NO in step B2), the bus master right is given to the CPU 11 (step B2).
[0043]
On the other hand, if there is a bus mastership request or a priority reservation (YES in step B2), it is checked whether or not there is a further priority reservation (step B4). As a result, if there is a priority reservation (YES in step B4), the bus master right is given to the bus master on a first-come-first-served basis in response to the priority reservation from the bus master of the internal system bus 13 (step B5). The priority reservation of the bus master is cleared (step B6).
[0044]
If there is no priority reservation (NO in step B4), a bus master right is given to the bus master selected by arbitration based on a normal bus master right request (step B7).
[0045]
Finally, it is checked whether the bus transaction of the internal system bus 13 has been completed (step B8), and if it has been completed, the process returns to step B1.
[0046]
In the above-described series of operations shown in the flowcharts of FIGS. 2 and 3, the process branches from step A3 to step A12 in FIG. 2 and does not proceed to step A9 until the target slave is ready for access. The conventional arbitration operation keeps holding the bus mastership of the internal system bus 13 in FIG. In addition to the conventional arbitration operation, in the present bus arbitration, the process branches from step A3 to step A4, and depending on the state of the target slave, the bus master of the internal system bus 13 transfers the bus mastership to another bus master, and An arbitration operation for preferentially regaining the bus mastership when the slave has access OK is added.
[0047]
[Other embodiments]
Next, another embodiment of the present invention will be described with reference to the flowchart of FIG. In this embodiment, the configuration is as shown in FIG. 1. However, the arbitration mode switching when the slave side of the internal system bus 13 in FIG. 1 cannot immediately respond to the access from the bus master side is further devised. ing.
[0048]
In the series of arbitration shown in the flowchart of FIG. 2, when the slave cannot immediately respond to the access from the bus master, a simple retry access is repeated, or The mode of operation or arbitration was fixed. In the embodiment of FIG. 4, such a mode is not set, and when the slave side is not ready even if the bus mastership is acquired, the bus mastership is transferred after executing a predetermined number of retries. Like that. The limit value of the number of retries is set by an application program or the like.
[0049]
With such a configuration, in the embodiment of FIG. 2, in the case of the simple retry access, if the target slave side is not access OK, the retry is repeated until the access is OK. However, in the embodiment of FIG. When the limit is reached, the bus mastership is transferred to another bus master. On the other hand, in the embodiment of FIG. 2, in the case of the non-simple retry access, if the access of the target slave is not OK, the bus master right is immediately transferred to another bus master, but in the embodiment of FIG. 4, the limit value is reached. Until the retry is repeated, the bus mastership is transferred to another bus master.
[0050]
Initially, it is in a standby state (step C1), and when an access request is issued from the bus master of the CPU 11 or the DMA controller 12 in FIG. 1 and the bus master acquires the bus master right by arbitration of the bus master of the internal system bus 13 (step C1). (YES in C2), it is checked whether or not the target slave can receive the access from the bus master (step C3). As a result, if the slave side can be accessed (YES in step C3), the bus master accesses the slave (step C9).
[0051]
However, if the slave cannot receive the access (NO in step C3), the process transits to step C4 to perform retry access. In step C4, the number of retry accesses is counted. Retry access count is retry Limit value If has not reached (NO in step C4), it is checked whether or not the target slave can receive the access from the bus master (step C3), and retry access is performed. As the limit value of the number of retries, an appropriate value can be arbitrarily set based on the characteristics and restrictions of the entire system.
[0052]
When the number of retry accesses reaches the retry limit value (YES in step C4), the bus master transfers the bus mastership to the bus master of another internal system bus 13, and makes a priority reservation for acquiring the bus mastership for the internal system bus 13. (Step C5).
[0053]
Then, the process loops until the slave to be accessed becomes accessible from the bus master (NO in step C6). If the access becomes possible (YES in step C6), it is confirmed that the access by the other bus master is completed ( The bus master regains the bus master right based on the priority reservation for acquiring the bus master right set in step C5 (YES in step C7) (step C8). At this time, the bus master is given priority over the other bus masters, and the bus master accesses the slave (step C9).
[0054]
When the access to the slave is completed (YES in step C10), the bus master right is released (step C11).
[0055]
As described above, in the bus arbitration shown in the flowchart of FIG. 4, it is possible to prevent the internal system bus 13 from being locked due to repetition of retry access depending on the situation of the slave to be accessed, and to perform the arbitration operation as shown in FIG. The arbitration operation is automatically switched according to the number of times retry access is performed, instead of being fixed by setting.
[0056]
【The invention's effect】
As described above, according to the present invention, the internal system bus has a plurality of bus master candidates, and the plurality of slaves to be accessed by the bus master are connected to the external device such as the memory or the I / O by the shared external I / F. In such a system, when an internal bus master has the bus mastership, the corresponding slave cannot immediately respond and locks the internal system bus by making the bus master wait, while another bus master acquires the bus mastership. Prevents a situation in which the system is stopped waiting, that is, a lock state of the internal system bus occurs, and the entire system is stopped by the state of the slave, and the possibility of waiting time that is not allowed for the system data stream is minimized. The effect of being able to prevent is obtained.
[0057]
It should be noted that the present invention is not limited to the above embodiments, and it is clear that the embodiments can be appropriately modified within the scope of the technical idea of the present invention.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a bus arbitration apparatus according to the present invention.
FIG. 2 is a flowchart showing an operation example when viewed from the bus master side of the embodiment shown in FIG. 1;
FIG. 3 is a flowchart showing an operation example of the embodiment shown in FIG. 1 when viewed from the internal system bus side;
FIG. 4 is a flowchart showing another example of operation when viewed from the bus master side in the embodiment shown in FIG. 1;
[Explanation of symbols]
10 LSI circuit
11 CPU
12 DMA controller
13 Internal system bus
14 Memory controller
15 I / O controller
16 Internal register
17 Shared external I / F
20 External bus
30 SDRAM
40 I / O

Claims (6)

共通のパスを介して外部装置を接続する処理装置における内部バスのバス・アービトレーション装置において、
前記内部バスの対象スレーブ側が前記外部装置をアクセス不可の場合は、前記内部バスのバスマスタはバスマスタ権を要求している別のバスマスタにバスマスタ権を譲渡し、次に前記対象スレーブ側が前記外部装置をアクセス可になった場合に、優先的に前記バスマスタ権を獲得するようにしたことを特徴とするバス・アービトレーション装置。
In a bus arbitration device of an internal bus in a processing device that connects an external device via a common path,
If the target slave of the internal bus cannot access the external device, the bus master of the internal bus transfers the bus master right to another bus master requesting the bus master right, and then the target slave transfers the external device. A bus arbitration device wherein the bus master right is preferentially acquired when access becomes possible.
共用の外部バスを介して接続されているSDRAMまたは入出力装置をアクセス可能な処理装置の内部システムバスに対するバス・アービトレーション装置において、
前記処理装置は、前記SDRAMとのデータの受渡しを制御するメモリコントローラと、前記入出力装置へのアクセスを行いデータの受渡しを制御するI/Oコントローラと、前記メモリコントローラと前記I/Oコントローラとの間の前記外部バスへのアクセスに対するアービトレーションを行う共用外部インタフェースと、コアとしてのCPUと、DMA転送を制御するDMAコントローラと、前記メモリコントローラ,I/Oコントローラ,CPUおよびDMAコントローラが接続される内部システムバスとを含み、
前記内部システムバスのバスマスタ権を獲得したDMAコントローラ,CPUは、メモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセス不可の場合は、前記バスマスタ権を要求しているCPU,DMAコントローラにバスマスタ権を譲渡し、次にメモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセスア可になった場合に、優先的に前記バスマスタ権を獲得するようにしたことを特徴とするバス・アービトレーション装置。
In a bus arbitration device for an internal system bus of a processing device capable of accessing an SDRAM or an input / output device connected via a shared external bus,
A memory controller that controls data transfer with the SDRAM, an I / O controller that accesses the input / output device to control data transfer, the memory controller and the I / O controller, , A shared external interface that performs arbitration for access to the external bus, a CPU as a core, a DMA controller that controls DMA transfer, and the memory controller, the I / O controller, the CPU, and the DMA controller. Including an internal system bus,
The DMA controller or CPU that has acquired the bus master right of the internal system bus, if the memory controller and the I / O controller cannot access the SDRAM and the input / output device, sends the bus master to the CPU and the DMA controller requesting the bus master right. Bus arbitration, wherein when the memory controller and the I / O controller have access to the SDRAM and the input / output device, the bus master right is preferentially acquired. apparatus.
共用の外部バスを介して接続されているSDRAMまたは入出力装置をアクセス可能な処理装置の内部システムバスに対するバス・アービトレーション装置において、
前記処理装置は、前記SDRAMとのデータの受渡しを制御するメモリコントローラと、前記入出力装置へのアクセスを行いデータの受渡しを制御するI/Oコントローラと、前記メモリコントローラと前記I/Oコントローラとの間の前記外部バスへのアクセスに対するアービトレーションを行う共用外部インタフェースと、コアとしてのCPUと、DMA転送を制御するDMAコントローラと、、前記メモリコントローラ,I/Oコントローラ,CPUおよびDMAコントローラが接続される内部システムバスとを含み、
前記内部システムバスのバスマスタ権を獲得したDMAコントローラ,CPUは、メモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセス不可の場合は、前記バスマスタ権を要求しているCPU,DMAコントローラにバスマスタ権を譲渡し、次にメモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセスア可になった場合に、優先的に前記バスマスタ権を獲得する動作モードと、
前記内部システムバスのバスマスタ権を獲得したDMAコントローラ,CPUは、メモリコントローラ,I/OコントローラがSDRAM,入出力装置をアクセス不可の場合は、アクセス可になるまでリトライアクセスする動作モードとのいずれかを設定可能にしたことを特徴とするバス・アービトレーション装置。
In a bus arbitration device for an internal system bus of a processing device capable of accessing an SDRAM or an input / output device connected via a shared external bus,
A memory controller that controls data transfer with the SDRAM, an I / O controller that accesses the input / output device to control data transfer, the memory controller and the I / O controller, A shared external interface for arbitrating access to the external bus between the CPU, a CPU as a core, a DMA controller for controlling DMA transfer, and the memory controller, the I / O controller, the CPU and the DMA controller. Internal system bus,
The DMA controller or CPU that has acquired the bus master right of the internal system bus, if the memory controller and the I / O controller cannot access the SDRAM and the input / output device, sends the bus master to the CPU and the DMA controller requesting the bus master right. An operation mode in which, when the memory controller and the I / O controller are allowed to access the SDRAM and the input / output device, the bus master right is preferentially acquired.
The DMA controller and the CPU that have acquired the bus master right of the internal system bus perform one of an operation mode of performing retry access until the memory controller and the I / O controller can access the SDRAM and the input / output device if the memory controller and the I / O controller cannot access the I / O device. Bus arbitration device characterized in that it is possible to set the
前記メモリコントローラ,I/Oコントローラが前記SDRAM,入出力装置をアクセス不可の場合は、アクセス可になっていないかのリトライを所定回数だけ試み、その結果により、アクセス不可の場合は前記バスマスタ権を譲渡し、アクセスア可になった場合には前記DMAコントローラ,CPUは前記メモリコントローラ,I/Oコントローラにアクセスすることを特徴とする請求項2または請求項3に記載のバス・アービトレーション装置。When the memory controller and the I / O controller cannot access the SDRAM and the input / output device, a retry is performed for a predetermined number of times to determine whether the SDRAM and the input / output device are accessible. 4. The bus arbitration device according to claim 2, wherein the DMA controller and the CPU access the memory controller and the I / O controller when the transfer and the access are permitted. 前記処理装置は、前記CPUが前記I/Oコントローラによる制御の下に前記入出力装置をアクセスするときに使用するデータバッファとしての内部レジスタを含み、
前記内部レジスタから前記入出力装置へのデータ書込みが行われているときに、前記DMAコントローラが前記バスマスタ権を獲得した場合には、当該バスマスタ権を前記CPUに譲渡することを特徴とする請求項2ないし4のいずれかに記載のバス・アービトレーション装置。
The processing device includes an internal register as a data buffer used when the CPU accesses the input / output device under control of the I / O controller,
The method according to claim 1, wherein when the DMA controller acquires the bus mastership while data is being written from the internal register to the input / output device, the bus mastership is transferred to the CPU. 5. The bus arbitration device according to any one of 2 to 4.
前記CPU,DMAコントローラ,内部システムバス,メモリコントローラ,I/Oコントローラおよび共用外部インタフェースが一つのLSI回路に収容されたことを特徴とする請求項2ないし5のいずれかに記載のバス・アービトレーション装置。6. The bus arbitration device according to claim 2, wherein said CPU, DMA controller, internal system bus, memory controller, I / O controller and shared external interface are accommodated in one LSI circuit. .
JP2002302474A 2002-10-17 2002-10-17 Bus arbitration device Pending JP2004139296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002302474A JP2004139296A (en) 2002-10-17 2002-10-17 Bus arbitration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002302474A JP2004139296A (en) 2002-10-17 2002-10-17 Bus arbitration device

Publications (1)

Publication Number Publication Date
JP2004139296A true JP2004139296A (en) 2004-05-13

Family

ID=32450524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002302474A Pending JP2004139296A (en) 2002-10-17 2002-10-17 Bus arbitration device

Country Status (1)

Country Link
JP (1) JP2004139296A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009277000A (en) * 2008-05-14 2009-11-26 Mitsubishi Electric Corp Data transfer system and target device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009277000A (en) * 2008-05-14 2009-11-26 Mitsubishi Electric Corp Data transfer system and target device

Similar Documents

Publication Publication Date Title
JP5787629B2 (en) Multi-processor system on chip for machine vision
US7581054B2 (en) Data processing system
US5682551A (en) System for checking the acceptance of I/O request to an interface using software visible instruction which provides a status signal and performs operations in response thereto
JP2012038293A5 (en)
GB2287110A (en) Method and apparatus for snoop stretching
JP2004171209A (en) Shared memory data transfer device
JP2004502225A (en) Integrated circuit with flash memory
JP2000047974A (en) Bus arbitrating method of bus controller, bus controller, and system of electronic equipment
US8359419B2 (en) System LSI having plural buses
US7913013B2 (en) Semiconductor integrated circuit
JP2007172112A (en) Memory controller
JP2001282704A (en) Device, method and system for processing data
US7203781B2 (en) Bus architecture with primary bus and secondary or slave bus wherein transfer via DMA is in single transfer phase engagement of primary bus
JP2006268753A (en) Dma circuit and computer system
JP3615219B2 (en) System controller, control system, and system control method
JP2004139296A (en) Bus arbitration device
JP3562583B2 (en) Apparatus, method and computer program product for managing a processor local bus
JP4633334B2 (en) Information processing apparatus and memory access arbitration method
JP3862777B2 (en) Duplex data matching method and duplex control device
WO1992006432A1 (en) Device for controlling bus
JPH1185673A (en) Method and device for controlling shared bus
JP2000250852A (en) Bus arbitrating device, bus system and bus arbitrating method
JPH04140860A (en) Method for controlling bus of multi-processor
JP4182321B2 (en) Dual port memory system
JP3353368B2 (en) Bus relay device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050909

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080908

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090121