JP2004213255A - Controlling method for pci bus - Google Patents

Controlling method for pci bus Download PDF

Info

Publication number
JP2004213255A
JP2004213255A JP2002381187A JP2002381187A JP2004213255A JP 2004213255 A JP2004213255 A JP 2004213255A JP 2002381187 A JP2002381187 A JP 2002381187A JP 2002381187 A JP2002381187 A JP 2002381187A JP 2004213255 A JP2004213255 A JP 2004213255A
Authority
JP
Japan
Prior art keywords
pci
pci bus
count value
access
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2002381187A
Other languages
Japanese (ja)
Inventor
Atsushi Kojima
淳 小嶋
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.)
Casio Computer Co Ltd
Casio Electronics Co Ltd
Original Assignee
Casio Computer Co Ltd
Casio Electronics Co 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 Casio Computer Co Ltd, Casio Electronics Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2002381187A priority Critical patent/JP2004213255A/en
Publication of JP2004213255A publication Critical patent/JP2004213255A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a PCI bus controlling method having high usage efficiency for connecting a plurality of devices to a mother board by using a PCI bus efficiently. <P>SOLUTION: A CPU 1 and a main storage memory 2 are arranged on the mother board, the PCI bus is formed via a host bridge 3, and PCI slots 0-2 are connected to the PCI bus. A PCI device A is connected to the PCI slot 0, while a waiting counter 5 and waiting counter values F.F6 are mounted to the PCI device A. When the PCI device A accesses the mother board, the waiting counter 5 counts a time to re-access for controlling the PCI bus efficiently. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はPCIバス(peripheral component interconnect bus)を使用し、複数のデバイスをマザーボードに接続してデータの授受を行うPCIバスの制御方法に関する。
【0002】
【従来の技術】
マザーボードにPCIスロットを用いて複数のデバイスを接続し、マザーボード上のメモリ等にアクセスを行う場合、PCIバスを効率よく使用する必要がある。
【0003】
例えば、デバイスとしてプリンタ装置を使用する場合、プリンタ装置をPCIスロットに接続し、PCIバスを介して記憶装置をアクセスする。この場合、PCIバスに接続されたデバイスがマスターとなり、マザーボード上の記憶装置にアクセスを行う。
【0004】
従来、ホスト機器(マザーボード)に構築されたホストブリッジが遅延トランザクションに対応する場合、デバイスからデータリードのアクセス(REQ)があると、マザーボード側からリトライの応答があり(GNT)、マザーボード側で要求のあったデータが用意できるまでPCIバスを解放する。したがって、基本的に特定のデバイスがPCIバスを占有することはない。
【0005】
また、PCIバスに接続された複数のデバイスからアクセス要求がある場合、要求元デバイスと要求先デバイスとの対応関係からマスク時間を設け、特定の要求元デバイスからのアクセスに対応する発明も開示されている(特許文献1)。
【0006】
【特許文献1】特開平2000−207354号公報
【0007】
【発明が解決しようとする課題】
しかしながら、上記PCIバスの解放制御では、記憶装置にリードアクセスしたデバイスは、一定時間後、再度リードアクセスを行うことになり、この処理を繰り返すことによって、PCIバスの処理効率が低下する。すなわち、処理効率はPCIバスが完全に解放された場合に比べて低下する。
【0008】
そこで、本発明は上記課題に鑑み、PCIバスを効率よく使用し、利用効率の優れたPCIバスの制御方法を提供するものである。
【0009】
【課題を解決するための手段】
上記課題は、請求項1記載の発明によれば、ターゲットからのリトライ要求に対し、再アクセスを繰り返し行う第1の処理と、前記リトライ要求後、マスター内に配設された計数手段によって計数を行い、前記ターゲットからの応答があると該計数値を記憶手段に記憶する第2の処理と、前記マスターからの再アクセスの際、前記記憶手段に記憶させた計数値を使用して再アクセスのタイミングを設定する第3の処理と、該タイミングに従ってターゲットを再アクセスする第4の処理とを行うPCIバスの制御方法を提供することによって達成できる。
【0010】
このように構成することにより、前のアクセス要求からリトライまでの時間に基づいて、次にアクセス要求を行うことができ、プリンタ装置等のデバイスは効率よくターゲットに対してアクセス要求を行うことができる。
請求項2の記載は、上記請求項1記載の発明において、前記第4の処理は、前記記憶手段に記憶した計数値より少ない計数値に基づいて実行する構成である。
【0011】
このように構成することにより、前のアクセス要求からターゲットに対するリトライまでの時間を減算しアクセス要求を行うことができる。したがって、より効率よくアクセス要求を行うことが可能となる。
請求項3の記載は、上記請求項2の記載において、前記記憶手段に記憶した計数値より少ない計数値に基づいて次のアクセスを行う際、前記ターゲットが行うリトライの時間を計算する構成である。
【0012】
このように構成することにより、アクセス要求からターゲットに対するリトライまでの時間を正確に知ることができ、前のリトライ後、次のリトライの直前で効率よくアクセス要求を行うことができる。
請求項4の記載は、上記請求項1、2、又は3の記載において、ターゲットのバースト回数を記憶する処理と、再アクセスした際該処理によって記憶した回数より少ない回数でバーストを中断する処理とを行う構成である。
【0013】
このように構成することにより、ターゲットに対するバースト要求に対しても効率よく中断要求を実行できる。
【0014】
【発明の実施形態】
以下、本発明の実施形態を図面を参照しながら説明する。
<第1の実施形態>
図1は本例で使用するPCIバスを含むシステム構成図である。同図において、CPU1は中央処理装置であり、マザーボード上に構築された主記憶メモリ2に記憶されたプログラムに従って処理を行う。
【0015】
ホストブリッジ3は、ホスト機器とPCIバスに接続されるデバイス間のインターフェース(I/F)であり、ホストブリッジ3にはPCIバスを介して複数のスロットが接続され、本例ではPCIスロット0にPCIデバイスAが接続され、PCIスロット1にはPCIデバイスBが接続され、PCIスロット2にはPCIデバイスCが接続されている。
【0016】
ここで、PCIデバイスはマスター機能を有し、マザーボード上の主記憶メモリ2をアクセスすることができる。また、マザーボード上のホストブリッジ3はPCIデバイスA〜Cのアクセス要求に対してターゲットとして応答し、主記憶メモリ2との間でデータの授受を行う。
【0017】
また、ホストブリッジ3はPCIバスの調停も行い、PCIデバイスA〜Cからのメモリアクセス要求に対してリトライを発行し、PCIバスを解放する。また、その間、CPU1に主記憶メモリ2をアクセスさせ、例えばリードデータの準備を行う。さらに、ホストブリッジ3は主記憶メモリ2をアクセスする間、再度主記憶メモリ2に対してアクセス要求がある場合にはリトライを再発行する。
【0018】
一方、PCIデバイスAにはシーケンサ4が配設され、シーケンサ4には待機カウンタ5、及び待機カウンタ値F.F6が接続されている。待機カウンタ5はホストブリッジ3から後述するFRAME出力が発行された後、TRDY信号が出力されるまでカウント処理を行うカウンタである。また、待機カウンタ値F.F6は上記待機カウンタ5のカウント値に対応するカウント値を記録し、以後PCIデバイスAからのリクエスト要求に利用する。
【0019】
上記構成において、以下に本例の処理を説明する。図2は本例の処理を説明するタイムチャートであり、図3及び図4は本例の処理を説明するフローチャートである。
先ず、PCIデバイスAは、マザーボード上の主記憶メモリ2に記憶されたデータを読み出すべく、PCIバスを介してホストブリッジ3に対してリードアクセスの要求を行う(ステップ(以下、Sで示す)1)。例えば、このタイミングは図2に示す▲1▼である。
【0020】
ホストブリッジ3では上記リクエストのアサートがあると、PCIバスの使用が可能であるか判断し、GNTをアサートする(ST2がYES、図2に示す▲2▼)。このGNTがアサートされた後、PCIバスの使用は可能となり、バスサイクルがPCIデバイスAのドライブによって実行される(S3、図2に示すFRAMEの出力▲3▼)。すなわち、主記憶メモリ2に対するリードデータのアドレスを提示するアドレスフェーズ(図2に示すAD[31:0])のタイミング(同図に示す▲4▼)、及びデータ転送が可能であるデータフェーズ(図2に示すC/BE[3:0])のタイミング(同図に示す▲5▼)が確保され(S4)、ホストブリッジ3からのDEVSELの出力を待つ。
【0021】
ここで、ホストブリッジ3は、主記憶メモリ2に要求されたデータが準備されるまでバスサイクルを中止すべく、DEVSELを出力すると共に、STOP(リクエスト)を出力する(S5がYES、S6がYES)。したがって、このタイミングで、一旦バスサイクルを終了する(S7、図2に示す▲6▼)。
【0022】
一方、PCIデバイスA内の待機カウンタ5は前述のFRAMEの出力のタイミングでカウント処理を開始し(S8)、カウント処理を継続している。この間、PCIデバイスAは、マザーボード上の主記憶メモリ2に記憶されたデータを読み出すべく所定周期でホストブリッジ3に対してリードアクセスの要求を行い(S1)、上記処理を繰り返す(S2〜S7、図2に示す▲7▼)。
【0023】
その後、指定されたデータが主記憶メモリ2からPCIデバイスAに出力できる状態になると、ホストブリッジ3からPCIバスにTRDYが出力され、PCIデバイスAにデータ転送の準備が整ったことが通知される(S9がYES、図2に示す▲8▼のタイミング)。
【0024】
ホストブリッジ3からTRDYが出力されると(S9がYES)、PCIデバイスAはIRDYの出力に基づいてホストブリッジ3から転送されるデータをPCIスロット0を介して入力する。そして、バスサイクルを終了する(S10)。また、この時同時に待機カウンタ5のカウント処理を終了する(S11)。 本例では、この時の待機カウンタ5のカウント値を「32」とする(図2に示す▲9▼)。
【0025】
その後、PCIデバイスAは再度主記憶メモリ2からデータを読み出す為PCIバスを介してホストブリッジ3に対してリードアクセスの要求を行う。図4は、PCIデバイスAから2度目のメモリリードが行われた際の処理を説明するフローチャートである。
【0026】
この場合、前述と同様PCIバスの使用が可能であるか判断し、GNT信号をアサートする(S13がYES、図2に示す▲2▼’)。そして、FRAMEの出力と同時に待機カウンタ5のカウント処理を開始する(S14、S15、図2に示す▲3▼’のタイミング)。
【0027】
また、PCIバスは主記憶メモリ2に対するデータリードのアドレスを提示するアドレスフェーズ、及びデータ転送のデータフェーズのタイミングを確保し(S16)、ホストブリッジ3からのDEVSELの出力を待つ。
ここで、ホストブリッジ3は前述と同様、主記憶メモリ2に要求されたデータが準備されるまでバスサイクルを中止すべく、DEVSELを出力すると共に、STOPを出力する(S17がYES、S18がYES)。したがって、このタイミングで一旦バスサイクルを終了する(S19、図2に示す▲6▼’)。
【0028】
その後、上記処理によってカウント処理を開始した待機カウンタ5は、カウント処理を継続し、この間1回目のデータリードの場合のようなリクエスト要求は行われない。すなわち、この間PCIデバイスAからデータリードのリクエスト要求を行うことがない。したがって、2回目のデータリードの際には、図2に示す▲7▼’のタイミングに示すようにPCIバスにはPCIデバイスAからのリクエスト、及びホストブリッジ3からのGNT出力等がなく、PCIバスを有効利用することができる。
【0029】
その後、待機カウンタ5がカウントアップすると(S20がYES)、PCIデバイスAからリクエスト要求が行われる。尚、この時待機カウンタ5のカウント値は待機カウンタ値F.F6に記憶されたカウント値と比較され、待機カウンタ5のカウント値が待機カウンタ値F.F6に記録されたカウント値に達した時カウント処理を終了する。
【0030】
ここで、待機カウンタ値F.F6には前述の待機カウンタ5のカウント値「32」から4カウントを減算したカウント値は記録されている。この4カウントは2回目以降に出力されるFRAMEまでのカウント値を取り除く為である。
したがって、上記カウント値「28」は前のリクエストの履歴を考慮したものであり、PCIデバイスAから上記リクエストが出力されると、直ちにホストブリッジ3からTRDYが出力され(S21、図2に示す▲8▼’のタイミング)、PCIデバイスAはIRDYの出力に基づいてホストブリッジ3から転送されるデータをPCIスロット0を介して入力する。そして、バスサイクルを終了する(S22)。
【0031】
以後、3回目のデータリード、4回目のデータリード、・・・についても、図4に示すフローチャートに従って処理を繰り返し、PCIバスを有効利用することができる。
以上のように、本例によれば図2に示すタイムチャートに従って処理がおこなわれ、例えば従来処理である図5のタイムチャートに比べてPCIバスの解放時間が長いことがわかる。
【0032】
尚、本例において、待機カウンタ5のカウント値は「32」に限るわけではなく、他のカウント値であってもよい。また、PCIデバイスAに限らず、他のPCIスロットに接続されたデバイスについても同様に実行することができる。
<第2の実施形態>
次に、本発明の第2の実施形態について説明する。
【0033】
本例は前述の実施形態において説明した待機カウンタ値F.F6に記憶するカウント値をリクエストの出力毎に1カウントづつ減算する構成である。以下、具体的に説明する。
図6は本例を説明するフローチャートであり、前述の実施形態と同様、PCIデバイスAからのリクエストの出力、ホストブリッジ3からのGNTの出力が行われ、更にFRAMEの出力、IRDYの出力等が順次行われる。本例においては、前述と同じ処理によって取得したカウント値を順次減算し、より効率のよいPCIバスの利用を図る構成である。
【0034】
例えば、同図において最初待機カウンタ5がカウントしたカウント値は「32」であり、待機カウンタ値F.F6には前述と同様「28」のカウント値が初期値として記録される(図6に示す▲1▼)。
その後、PCIデバイスAからの次のリクエストに対する待機時間は、「27」のカウント値に設定され(同図に示す▲2▼)、待機カウンタ5が27をカウントするとホストブリッジ3からデータ転送が行われる。したがって、1カウント分の早くデータ転送することが可能になり、データ転送を迅速に行うことができる。
【0035】
さらに、次のPCIデバイスAからのリクエストに対する待機時間は、「26」のカウント値に設定され(同図に示す▲3▼)、待機カウンタ5が26をカウントするとホストブリッジ3からデータ転送が行われる。したがって、更に1カウント分早くデータ転送することが可能になり、データ転送を迅速に行うことができる。
【0036】
以下、同様に処理することによって、データの転送処理を高速に行うことが可能になる。
尚、カウント処理が完了し、再度のリクエストを行った時点でホストブリッジ3側でのデータの転送準備が整わない場合には、逆にカウント値を加算し(図6に示す▲4▼)、次のデータリクエストを行う構成にする。
【0037】
その後、図7に示すようにPCIデバイスAがデータリードを行う際、待機カウンタ値F.F6のカウント値を「27」に設定し、一定期間維持する。
このように構成することにより、データ転送を高速に行うと共に、柔軟性のあるデータ転送を行い、PCIバスを効率よく制御することができる。
<第3の実施形態>
次に、本発明の第3の実施形態について説明する。
【0038】
本例はバースモードにおいても、前述と同様の処理を行いバーストアクセスを効率良く行うPCIバスの制御方法を提供するものである。以下、具体的に説明する。
図8は本例で使用するPCIバスを含むシステム構成図である。同図の構成は基本的に前述の図1と同じであるが、PCIデバイスA内のシーケンサ7に接続されたカウンタが異なる。すなわち、シーケンサ7にはバースト回数カウンタ8が接続され、バースト転送を効率良く行う為の構成である。
【0039】
ホストブリッジ3はPCIバスからのバーストメモリアクセスに対して対応することができ、ホストブリッジ3は主記憶メモリ2に対するバーストアクセス回数を固定値として持つ。例えば、本例においてはこの固定値を「4」とする。尚、この固定値「4」はデータリードを実行する際、PCIデバイスAからのリードアクセスの要求に対して4回だけデータを出力すると、ディスコネクトを発行してバーストアクセスの処理を中断する為に利用される。
【0040】
図9は本例の処理を説明するフローチャートであり、前述と同様メモリリードの要求があると、先ずPCIバスの使用が可能であるか判断し、GNT信号をアサートする(ST1、ST2がYES、図9に示す▲1▼、▲2▼)。
その後、マスタ機器としてバーストリードのバスサイクルを開始し(ST3〜ST6)、同時にホストブリッジ3が出力するTRDYの回数をバースト回数カウンタ8にてカウントする。前述のようにホストブリッジ3はPCIデバイスAからのバースト要求に対してターゲットとなるホストブリッジ3は4回だけTRDYを出力し、最後にディスコネクトを発行する。
【0041】
PCIデバイスAではこのディスコネクトが発行されると、FRAMEをディアサートし、アクセスサイクルを終了する。また、バースト回数カウンタ8によるカウント処理も終了する(ST8、ST9)。
次に、2回目以降のPCIデバイスAのバーストアクセス回数は、上記バースト回数カウンタ8でカウントしたカウント値で終了させる。この時、アクセスサイクルに要するクロック数は、図10に示すように1回目より1カウント少なく設定する。
【0042】
このように構成することにより、バースト回数をディスコネクトが発行され、中断要求が出力される直前ぎりぎりまで短縮することができ、データ転送のアクセス時間を短縮することができる。
【0043】
【発明の効果】
以上詳細に説明したように、本発明によればPCIバスを効率よく利用することができ、データ転送を高速で行うことが可能となる。
また、バースト転送要求に対してPCIバスを効率よく利用することができる。
【図面の簡単な説明】
【図1】第1の実施形態で使用するPCIバスを含むシステム構成図である。
【図2】第1の実施形態の処理を説明するタイムチャートである。
【図3】第1の実施形態の処理を説明するフローチャートである。
【図4】第1の実施形態の処理を説明するフローチャートである。
【図5】従来の処理を説明するタイムチャートである。
【図6】第2の実施形態の処理を説明するタイムチャートである。
【図7】第2の実施形態の処理を説明するタイムチャートである。
【図8】第3の実施形態で使用するPCIバスを含むシステム構成図である。
【図9】第3の実施形態の処理を説明するフローチャートである。
【図10】第3の実施形態の処理を説明するタイムチャートである。
【符号の説明】
1 CPU
2 主記憶メモリ
3 ホストブリッジ
4 シーケンサ
5 待機カウンタ
6 待機カウンタ値F.F
7 シーケンサ
8 バースト回数カウンタ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a control method for a PCI bus that uses a PCI (peripheral component interconnect bus) to connect a plurality of devices to a motherboard to exchange data.
[0002]
[Prior art]
When a plurality of devices are connected to a motherboard using PCI slots to access a memory or the like on the motherboard, it is necessary to use a PCI bus efficiently.
[0003]
For example, when a printer device is used as a device, the printer device is connected to a PCI slot, and a storage device is accessed via a PCI bus. In this case, the device connected to the PCI bus becomes the master and accesses the storage device on the motherboard.
[0004]
Conventionally, when a host bridge built on a host device (motherboard) supports a delayed transaction, if a device has a data read access (REQ), a retry response is received from the motherboard (GNT), and a request is made on the motherboard. The PCI bus is released until the data with the error can be prepared. Therefore, no specific device basically occupies the PCI bus.
[0005]
Also disclosed is an invention that, when there is an access request from a plurality of devices connected to the PCI bus, sets a mask time based on the correspondence between the request source device and the request destination device, and responds to access from a specific request source device. (Patent Document 1).
[0006]
[Patent Document 1] Japanese Patent Application Laid-Open No. 2000-207354
[Problems to be solved by the invention]
However, in the above-described PCI bus release control, a device that has made a read access to the storage device performs a read access again after a certain period of time, and by repeating this process, the processing efficiency of the PCI bus decreases. That is, the processing efficiency is lower than when the PCI bus is completely released.
[0008]
In view of the above problems, the present invention provides a method for controlling a PCI bus that uses a PCI bus efficiently and has excellent utilization efficiency.
[0009]
[Means for Solving the Problems]
According to the first aspect of the present invention, there is provided a first process for repeatedly performing re-access in response to a retry request from a target, and counting by a counting means provided in a master after the retry request. Performing a second process of storing the count value in the storage means when there is a response from the target, and performing a re-access using the count value stored in the storage means at the time of re-access from the master. This can be achieved by providing a method of controlling a PCI bus that performs a third process of setting a timing and a fourth process of re-accessing a target according to the timing.
[0010]
With this configuration, the next access request can be made based on the time from the previous access request to the retry, and a device such as a printer can efficiently make an access request to the target. .
According to a second aspect of the present invention, in the first aspect of the invention, the fourth processing is executed based on a count value smaller than the count value stored in the storage means.
[0011]
With this configuration, the access request can be made by subtracting the time from the previous access request to the retry for the target. Therefore, an access request can be made more efficiently.
According to a third aspect of the present invention, in the configuration of the second aspect, when the next access is performed based on a count value smaller than the count value stored in the storage unit, a time of a retry performed by the target is calculated. .
[0012]
With this configuration, the time from the access request to the retry to the target can be accurately known, and the access request can be made efficiently immediately after the previous retry and immediately before the next retry.
According to a fourth aspect of the present invention, there is provided a method as set forth in the first, second, or third aspect, further comprising: a process of storing the number of bursts of the target; This is a configuration for performing.
[0013]
With this configuration, the interruption request can be efficiently executed even for the burst request for the target.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<First embodiment>
FIG. 1 is a system configuration diagram including a PCI bus used in this example. In FIG. 1, a CPU 1 is a central processing unit, and performs processing according to a program stored in a main memory 2 constructed on a motherboard.
[0015]
The host bridge 3 is an interface (I / F) between the host device and a device connected to the PCI bus. A plurality of slots are connected to the host bridge 3 via the PCI bus. The PCI device A is connected, the PCI device B is connected to the PCI slot 1, and the PCI device C is connected to the PCI slot 2.
[0016]
Here, the PCI device has a master function and can access the main storage memory 2 on the motherboard. The host bridge 3 on the motherboard responds as a target to the access requests of the PCI devices A to C, and exchanges data with the main memory 2.
[0017]
The host bridge 3 also arbitrates the PCI bus, issues a retry to a memory access request from the PCI devices A to C, and releases the PCI bus. In the meantime, the CPU 1 accesses the main storage memory 2 to prepare, for example, read data. Further, while accessing the main storage memory 2, the host bridge 3 reissues a retry when there is an access request to the main storage memory 2 again.
[0018]
On the other hand, a sequencer 4 is provided in the PCI device A, and a standby counter 5 and a standby counter value F. F6 is connected. The standby counter 5 is a counter that performs a counting process after a FRAME output described later is issued from the host bridge 3 until a TRDY signal is output. The standby counter value F. F6 records a count value corresponding to the count value of the standby counter 5 and is used for a request request from the PCI device A thereafter.
[0019]
In the above configuration, the processing of this example will be described below. FIG. 2 is a time chart for explaining the processing of this example, and FIGS. 3 and 4 are flowcharts for explaining the processing of this example.
First, the PCI device A issues a read access request to the host bridge 3 via the PCI bus in order to read data stored in the main memory 2 on the motherboard (step (hereinafter referred to as S) 1). ). For example, this timing is (1) shown in FIG.
[0020]
When the request is asserted, the host bridge 3 determines whether the PCI bus can be used and asserts GNT (YES in ST2, (2) shown in FIG. 2). After this GNT is asserted, the use of the PCI bus is enabled, and the bus cycle is executed by the drive of the PCI device A (S3, FRAME output (3) shown in FIG. 2). That is, the timing of the address phase (AD [31: 0] shown in FIG. 2) for presenting the address of the read data to the main memory 2 ((4) shown in FIG. 2), and the data phase in which data transfer is possible ( The timing of (C / BE [3: 0] shown in FIG. 2) ((5) shown in FIG. 2) is secured (S4), and the output of DEVSEL from the host bridge 3 is waited.
[0021]
Here, the host bridge 3 outputs DEVSEL and STOP (request) in order to suspend the bus cycle until the requested data is prepared in the main storage memory 2 (YES in S5, YES in S6). ). Therefore, at this timing, the bus cycle is temporarily ended (S7, (6) shown in FIG. 2).
[0022]
On the other hand, the standby counter 5 in the PCI device A starts the counting process at the output timing of the FRAME (S8) and continues the counting process. During this time, the PCI device A issues a read access request to the host bridge 3 at a predetermined cycle to read data stored in the main memory 2 on the motherboard (S1), and repeats the above processing (S2 to S7, (7) shown in FIG. 2).
[0023]
Thereafter, when the designated data is ready to be output from the main storage memory 2 to the PCI device A, TRDY is output from the host bridge 3 to the PCI bus, and the PCI device A is notified that the data transfer is ready. (YES in S9, timing (8) shown in FIG. 2).
[0024]
When TRDY is output from the host bridge 3 (YES in S9), the PCI device A inputs data transferred from the host bridge 3 via the PCI slot 0 based on the output of IRDY. Then, the bus cycle ends (S10). At the same time, the counting process of the standby counter 5 ends (S11). In this example, the count value of the standby counter 5 at this time is set to "32" ([9] shown in FIG. 2).
[0025]
Thereafter, the PCI device A issues a read access request to the host bridge 3 via the PCI bus to read data from the main storage memory 2 again. FIG. 4 is a flowchart illustrating processing when a second memory read is performed from the PCI device A.
[0026]
In this case, it is determined whether the PCI bus can be used as described above, and the GNT signal is asserted (YES in S13, (2) 'shown in FIG. 2). Then, the counting process of the standby counter 5 is started simultaneously with the output of the FRAME (S14, S15, (3) 'timing shown in FIG. 2).
[0027]
Further, the PCI bus secures the timing of the address phase for presenting the address of the data read to the main memory 2 and the timing of the data phase of the data transfer (S16), and waits for the output of the DEVSEL from the host bridge 3.
Here, similarly to the above, the host bridge 3 outputs DEVSEL and STOP to stop the bus cycle until the requested data is prepared in the main storage memory 2 (YES in S17, YES in S18). ). Therefore, the bus cycle is temporarily terminated at this timing (S19, (6) 'shown in FIG. 2).
[0028]
Thereafter, the standby counter 5 which has started the counting process by the above process continues the counting process, and during this time, the request request as in the case of the first data read is not performed. That is, during this time, the data read request request is not issued from the PCI device A. Therefore, at the time of the second data read, there is no request from the PCI device A, no GNT output from the host bridge 3, etc. on the PCI bus, as indicated by the timing {circle around (7)} ′ in FIG. The bus can be used effectively.
[0029]
Thereafter, when the standby counter 5 counts up (S20: YES), the PCI device A issues a request request. At this time, the count value of the standby counter 5 is equal to the standby counter value F. The count value of the standby counter 5 is compared with the count value stored in the standby counter value F.F6. When the count value recorded in F6 has been reached, the counting process ends.
[0030]
Here, the standby counter value F. In F6, a count value obtained by subtracting 4 counts from the count value "32" of the standby counter 5 is recorded. The four counts are for removing the count values up to the FRAME output from the second time.
Therefore, the count value "28" is based on the history of the previous request, and when the request is output from the PCI device A, TRDY is immediately output from the host bridge 3 (S21, ▲ shown in FIG. 2). 8) ′), the PCI device A inputs data transferred from the host bridge 3 via the PCI slot 0 based on the output of IRDY. Then, the bus cycle ends (S22).
[0031]
Thereafter, the processing for the third data read, the fourth data read,... Is repeated according to the flowchart shown in FIG. 4, and the PCI bus can be effectively used.
As described above, according to the present embodiment, the processing is performed according to the time chart shown in FIG. 2, and it can be seen that the PCI bus release time is longer than, for example, the time chart of FIG. 5 which is the conventional processing.
[0032]
In this example, the count value of the standby counter 5 is not limited to “32”, but may be another count value. Further, the present invention can be similarly executed not only for the PCI device A but also for a device connected to another PCI slot.
<Second embodiment>
Next, a second embodiment of the present invention will be described.
[0033]
This example corresponds to the standby counter value F. described in the above embodiment. In this configuration, the count value stored in F6 is subtracted by one for each output of a request. This will be specifically described below.
FIG. 6 is a flowchart for explaining this example. As in the above-described embodiment, the output of the request from the PCI device A, the output of the GNT from the host bridge 3, and the output of the FRAME and the output of the IRDY are performed. It is performed sequentially. In this example, the count value obtained by the same processing as described above is sequentially subtracted, and the PCI bus is used more efficiently.
[0034]
For example, in the figure, the count value counted by the standby counter 5 first is “32”, and the standby counter value F. In F6, the count value of "28" is recorded as the initial value as described above ((1) shown in FIG. 6).
Thereafter, the standby time for the next request from the PCI device A is set to the count value of “27” ((2) shown in FIG. 9). When the standby counter 5 counts 27, data transfer from the host bridge 3 starts. Is Therefore, data can be transferred earlier by one count, and data can be transferred quickly.
[0035]
Further, the standby time for the next request from the PCI device A is set to the count value of “26” ((3) shown in FIG. 9). When the standby counter 5 counts 26, data transfer from the host bridge 3 starts. Is Therefore, data can be transferred one count earlier, and data can be transferred quickly.
[0036]
Hereinafter, by performing the same processing, data transfer processing can be performed at high speed.
If the host bridge 3 is not ready for data transfer at the time when the count processing is completed and the request is made again, the count value is incremented ((4) shown in FIG. 6). Configure to make the next data request.
[0037]
Thereafter, when the PCI device A reads data as shown in FIG. The count value of F6 is set to “27” and is maintained for a certain period.
With this configuration, the data transfer can be performed at high speed, the data transfer can be performed with flexibility, and the PCI bus can be efficiently controlled.
<Third embodiment>
Next, a third embodiment of the present invention will be described.
[0038]
This embodiment provides a PCI bus control method that performs the same processing as described above even in the burst mode and performs burst access efficiently. This will be specifically described below.
FIG. 8 is a system configuration diagram including a PCI bus used in this example. 1 is basically the same as that of FIG. 1 described above, except that the counter connected to the sequencer 7 in the PCI device A is different. In other words, the burst number counter 8 is connected to the sequencer 7 so as to efficiently perform burst transfer.
[0039]
The host bridge 3 can cope with burst memory access from the PCI bus, and the host bridge 3 has a fixed number of burst accesses to the main memory 2. For example, in this example, this fixed value is “4”. Note that this fixed value “4” means that when data is read, if data is output only four times in response to a read access request from the PCI device A, a disconnect is issued and the burst access processing is interrupted. Used for
[0040]
FIG. 9 is a flowchart for explaining the processing of this example. When there is a memory read request as described above, it is first determined whether or not the PCI bus can be used, and the GNT signal is asserted (ST1, ST2 are YES, (1) and (2) shown in FIG. 9).
Thereafter, a burst read bus cycle is started as a master device (ST3 to ST6), and at the same time, the number of TRDYs output by the host bridge 3 is counted by the burst number counter 8. As described above, the target host bridge 3 outputs TRDY only four times in response to the burst request from the PCI device A, and finally issues a disconnect.
[0041]
When this disconnect is issued, the PCI device A deasserts FRAME and ends the access cycle. Also, the counting process by the burst number counter 8 ends (ST8, ST9).
Next, the number of burst accesses of the PCI device A for the second and subsequent times is terminated by the count value counted by the burst number counter 8. At this time, the number of clocks required for the access cycle is set one count smaller than the first time as shown in FIG.
[0042]
With this configuration, the number of bursts can be reduced to just before the disconnect is issued and the interruption request is output, and the access time for data transfer can be reduced.
[0043]
【The invention's effect】
As described above in detail, according to the present invention, the PCI bus can be used efficiently, and data transfer can be performed at high speed.
Further, the PCI bus can be used efficiently for burst transfer requests.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram including a PCI bus used in a first embodiment.
FIG. 2 is a time chart illustrating a process according to the first embodiment.
FIG. 3 is a flowchart illustrating a process according to the first embodiment.
FIG. 4 is a flowchart illustrating a process according to the first embodiment.
FIG. 5 is a time chart illustrating a conventional process.
FIG. 6 is a time chart illustrating a process according to a second embodiment.
FIG. 7 is a time chart illustrating a process according to the second embodiment.
FIG. 8 is a system configuration diagram including a PCI bus used in a third embodiment.
FIG. 9 is a flowchart illustrating a process according to a third embodiment.
FIG. 10 is a time chart illustrating a process according to the third embodiment.
[Explanation of symbols]
1 CPU
2 Main memory 3 Host bridge 4 Sequencer 5 Standby counter 6 Standby counter value F
7 Sequencer 8 Burst count counter

Claims (4)

ターゲットからのリトライ要求に対し、再アクセスを繰り返し行う第1の処理と、
前記リトライ要求後、マスター内に配設された計数手段によって計数を行い、前記ターゲットからの応答があると該計数値を記憶手段に記憶する第2の処理と、
前記マスターからの再アクセスの際、前記記憶手段に記憶させた計数値を使用して再アクセスのタイミングを設定する第3の処理と、
該タイミングに従ってターゲットを再アクセスする第4の処理と、
を行うことを特徴とするPCIバスの制御方法。
A first process of repeatedly performing re-access in response to a retry request from the target;
After the retry request, counting is performed by counting means provided in the master, and when there is a response from the target, a second process of storing the counted value in the storage means,
A third process of setting a re-access timing using the count value stored in the storage unit at the time of re-access from the master;
A fourth process of re-accessing the target according to the timing;
And controlling the PCI bus.
前記第4の処理は、前記記憶手段に記憶した計数値より少ない計数値に基づいて実行することを特徴とする請求項1記載のPCIバスの制御方法。2. The method according to claim 1, wherein the fourth processing is performed based on a count value smaller than the count value stored in the storage unit. 前記記憶手段に記憶した計数値より少ない計数値に基づいて次のアクセスを行う際、前記ターゲットが行うリトライの時間を計算することを特徴とする請求項2記載のPCIバスの制御方法。3. The PCI bus control method according to claim 2, wherein when the next access is performed based on a count value smaller than the count value stored in the storage unit, a time of a retry performed by the target is calculated. ターゲットのバースト回数を記憶する処理と、再アクセスした際該処理によって記憶した回数より少ない回数でバーストを中断する処理と、を行うことを特徴とする請求項1、2、又は3記載のPCIバスの制御方法。4. The PCI bus according to claim 1, wherein a process of storing the number of bursts of the target and a process of interrupting the burst at a number of times smaller than the number of times stored when the access is performed again are performed. Control method.
JP2002381187A 2002-12-27 2002-12-27 Controlling method for pci bus Withdrawn JP2004213255A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002381187A JP2004213255A (en) 2002-12-27 2002-12-27 Controlling method for pci bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002381187A JP2004213255A (en) 2002-12-27 2002-12-27 Controlling method for pci bus

Publications (1)

Publication Number Publication Date
JP2004213255A true JP2004213255A (en) 2004-07-29

Family

ID=32817187

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002381187A Withdrawn JP2004213255A (en) 2002-12-27 2002-12-27 Controlling method for pci bus

Country Status (1)

Country Link
JP (1) JP2004213255A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014041412A (en) * 2012-08-21 2014-03-06 Casio Electronics Co Ltd Pci bus control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014041412A (en) * 2012-08-21 2014-03-06 Casio Electronics Co Ltd Pci bus control device

Similar Documents

Publication Publication Date Title
JP3231596B2 (en) Bus system with latency and shadow timer
US6496890B1 (en) Bus hang prevention and recovery for data communication systems employing a shared bus interface with multiple bus masters
US5467295A (en) Bus arbitration with master unit controlling bus and locking a slave unit that can relinquish bus for other masters while maintaining lock on slave unit
US7752374B2 (en) Method and apparatus for host messaging unit for peripheral component interconnect busmaster devices
JP4008987B2 (en) Bus communication system, bus arbitration method, and data transfer method
JP4010476B2 (en) Enhanced bus arbiter with variable priority and fairness
US5949981A (en) Deadlock avoidance in a bridge between a split transaction bus and a single envelope bus
JPH10293744A (en) Pci bus system
JPH08339346A (en) Bus arbiter
WO2000013092A2 (en) Multiplexed address and data bus within a computer
US5884052A (en) Smart retry mechanism to program the retry latency of a PCI initiator agent
JPH0330045A (en) Logic circuit for microprocessor
US5857082A (en) Method and apparatus for quickly transferring data from a first bus to a second bus
JP2002055947A (en) System bus and its bus arbitrating method
US7093058B2 (en) Single request data transfer regardless of size and alignment
US6496895B1 (en) Method and apparatus for intializing a hub interface
US20020078282A1 (en) Target directed completion for bus transactions
US6625683B1 (en) Automatic early PCI transaction retry
US20040010644A1 (en) System and method for providing improved bus utilization via target directed completion
JP2004213255A (en) Controlling method for pci bus
JP2005165508A (en) Direct memory access controller
JP2004265265A (en) Data transfer control device
JP3266184B2 (en) I / O control method and device
JP4182321B2 (en) Dual port memory system
JP3236459B2 (en) Error handling device in common bus data transfer

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060307