JP2005242437A - Information processor, and information processing method and program - Google Patents
Information processor, and information processing method and program Download PDFInfo
- Publication number
- JP2005242437A JP2005242437A JP2004047745A JP2004047745A JP2005242437A JP 2005242437 A JP2005242437 A JP 2005242437A JP 2004047745 A JP2004047745 A JP 2004047745A JP 2004047745 A JP2004047745 A JP 2004047745A JP 2005242437 A JP2005242437 A JP 2005242437A
- Authority
- JP
- Japan
- Prior art keywords
- master device
- data transfer
- measurement
- target
- standby time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Transfer Systems (AREA)
Abstract
Description
本発明は、情報処理装置および方法、並びにプログラムに関し、特に、例えば、アクセス回数を減少させることによりバスのトラフィックを軽減させる等して、システムバスの各デバイスがそのシステムバスをより有効に活用することができるようにした情報処理装置および方法、並びにプログラムに関する。 The present invention relates to an information processing apparatus, method, and program, and in particular, each device of the system bus makes more effective use of the system bus, for example, by reducing bus traffic by reducing the number of accesses. The present invention relates to an information processing apparatus and method, and a program.
従来、例えばパーソナルコンピュータ等の情報処理装置において、装置内の各デバイスを接続するシステムバスとして、ISAバス(Industry Standard Architecture bus)やPCIバス(Peripheral Components Interconnect bus)等が用いられている。 Conventionally, in an information processing apparatus such as a personal computer, an ISA bus (Industry Standard Architecture bus), a PCI bus (Peripheral Components Interconnect bus), or the like is used as a system bus for connecting each device in the apparatus.
PCIバスは、PCI SIG(PCI Special Interest Group)により策定されたバス規格であり、長い間業界標準だったISAバスに替わる標準規格として急速に普及している。最初のPCI規格においては、バス幅(1回の転送で送れるデータ量)が32ビット、動作周波数(1秒あたりの転送回数)が33MHz(メガヘルツ)であり、最大データ転送速度は133MB/s(メガバイトパーセカンド)であった。最新のPCI規格においては、バス幅が64ビット、動作周波数が66MHzで、最大データ転送速度が533MB/sの高速な仕様も規定されている。 The PCI bus is a bus standard established by PCI SIG (PCI Special Interest Group), and is rapidly spreading as a standard that replaces the ISA bus, which has long been an industry standard. In the first PCI standard, the bus width (the amount of data that can be sent in one transfer) is 32 bits, the operating frequency (number of transfers per second) is 33 MHz (megahertz), and the maximum data transfer rate is 133 MB / s ( Megabyte second). The latest PCI standard also defines a high-speed specification with a bus width of 64 bits, an operating frequency of 66 MHz, and a maximum data transfer rate of 533 MB / s.
このPCIバスを用いたPCIバスシステムの例を図1に示す。PCIバスシステム1は、上述したようなPCIバス11、およびPCIバス11に接続された複数のPCIデバイス12−1乃至PCIデバイス12−Nにより構成されている。
An example of a PCI bus system using the PCI bus is shown in FIG. The
これらのPCIデバイス12−1乃至PCIデバイス12−Nは、PCIバス11を介して互いにアクセスし、コマンドの授受やデータ転送等を行う。PCIバス11を介した通信は、図示せぬPCIバスコントローラにより制御され、PCIデバイスからの要求に基づいてバスの使用権が割り当てられる。
The PCI devices 12-1 to 12-N access each other via the
例えば、PCIバス11に接続されたPCIデバイス12−1乃至PCIデバイス12−Nの内の1つのPCIデバイスであり、PCIデータ転送13を制御するイニシエータ14は、最初に、図示せぬPCIバスコントローラに対してバスの使用権を要求する。そしてPCIバスコントローラよりPCIバス11の使用権が与えられると、イニシエータ14は、PCIデータ転送13における通信相手となるPCIデバイスであるターゲット15に対して、ターゲット15にローカルバス16を介して接続されたローカルメモリ17に記憶されているデータを要求する(リード要求)。イニシエータ14よりリード要求を取得したターゲット15は、ローカルバス16を介してローカルメモリ17より要求されたアドレスに対応するデータを読み出し、内蔵するキャッシュメモリ18に蓄積する。キャッシュメモリ18に要求されたデータが蓄積され、データ転送の準備が整うと、ターゲット15は、そのデータを、PCIバス11を介して、イニシエータ14に供給する。イニシエータ14は、ターゲット15よりデータを取得すると、PCIデータ転送13を終了し、PCIバス11を解放する。
For example, one of the PCI devices 12-1 to 12 -N connected to the
このようなPCIデータ通信13において、イニシエータ14とターゲット15との間で行われるやり取りの詳細を図2に示す。図2に示されるように、PCIバス11の使用権を与えられたイニシエータ14は、まず、ターゲット15に対するリード要求21−1を発行し、それを、PCIバス11を介してターゲット15に供給する(矢印22−1および矢印24−1)。これによりPCIバス11にはトランザクション23−1が生じる。矢印24−1のようにリード要求が供給されるとターゲット15は、応答処理25−1を行い、矢印26のように、ローカルバス16を介してローカルメモリ17にアクセスし、要求されたアドレスのデータを取得してキャッシュメモリ18に蓄積させる処理を開始する。このとき、キャッシュメモリ18のデータ(キャッシュデータ)は、要求されたデータではない無効データ27であるので、ターゲット15は、イニシエータ14に対して、このキャッシュデータを供給せずに、リトライ処理を返す(矢印28−1および矢印29−1)。
Details of the exchanges performed between the
イニシエータ14は、このように供給されたリトライ30−1を検出すると、PCIバス11を不要に占有しないように、一旦、PCIバス11を解放する。しかしながら、イニシエータ14は、不要に待機時間を延ばさないように、矢印31−1のように直ちにバスの使用権を再度確保し、上述したリード要求21−1の場合と同様に、数クロック後にリード要求21−2をターゲット15に対して発行する。ターゲット15は、矢印22−2および矢印24−2のように供給されたリード要求に対して、応答処理25−2を行い、まだキャッシュメモリ18に無効データが蓄積されているので、上述した応答処理25−1の場合と同様に、リトライ処理をイニシエータ14に返す(矢印28−2および矢印29−2)。このようなコマンドの授受によりPCIバス11には新たなトランザクション23−2が発生する。
When the
イニシエータ14は、リトライ30−2を検出すると、リトライ30−1を検出したときと同様に、一旦、PCIバス11を解放し、PCIバス11の使用権を再度確保し、数クロック後にリード要求21−2をターゲット15に対して発行する。
When the
イニシエータ14およびターゲット15は、キャッシュメモリ18に要求されたデータが蓄積されるまで、上述したような処理を((M−1)回)繰り返す。そして、イニシエータ14がM回目のリード要求を発行し、それを矢印22−Mおよび矢印24−MのようにPCIバス11を介して(トランザクション23−M)ターゲット15に供給し、ターゲット15がそれに対する応答処理25−Mを行ったときに、キャッシュメモリ18に有効データ32が蓄積されていたとすると、ターゲット15は、応答処理25−Mとして、矢印33のようにキャッシュメモリ18にアクセスし、その有効データ32をイニシエータ14に供給させる。有効データ32は、矢印34および矢印36のように、PCIバス11を介して(トランザクション35)、イニシエータ14に供給される。イニシエータ14は、このように供給された有効データ37を取得する。
The
以上のように、ターゲット15におけるデータ転送の準備が完了するまでの間(区間41)、ターゲット15は、イニシエータ14からのリード要求に対してリトライ処理を発行し、イニシエータ14は、このリトライの検出に基づいてリード要求を繰り返す。従って、この場合、区間41において、PCIバス11には、M−2個のトランザクションが発生し、これらが不要なトラフィックとなりPCIバス11を占有する。
As described above, until the preparation for data transfer in the
なお、PCIバスシステム1においては、例えば、図3に示されるように、1回のコマンドにより複数のデータを一度に転送させるバースト転送も実行可能である。この場合、上述したようなリトライ処理によるトランザクションは、最初のコマンド発行時においてのみ発生する。
In the
また、イニシエータの待機時間に関する情報を予め用意したターゲットを用いることにより、区間41におけるトランザクションを削減する方法もある(例えば、特許文献1参照)。この場合、ターゲットの所定のレジスタに、予めレイテンシ情報、すなわち、ターゲットが要求を受けてからデータ転送の準備が整うまでの時間に関する情報を保持させておき、イニシエータからのアクセス要求に応答して、イニシエータにその情報を供給するようにする。イニシエータは、その情報を取得すると、そのターゲットに対してPCIデータ転送を要求する場合、リトライを検出後、そのターゲットより供給されたレイテンシ情報により指定された時間待機してから転送要求を行う。すなわち、この場合、ターゲットの準備が整うまでイニシエータは、要求の繰返しを行わない。
In addition, there is a method of reducing transactions in the
しかしながら、以上のようなバスシステムにおいて、図2に示されるように、イニシエータ14が発行したリード要求に対するリトライを検出した後、すぐにリード要求を再度発行する場合、イニシエータ14は、このように処理を行うことにより、ターゲット15がデータ転送の準備が整い次第すぐにデータ転送を開始させることはできるが、ターゲット15の準備が整うまでの間、上述したように不要なトラフィックをPCIバス11に発生させてしまい、実質的にその間バスを占有してしまうので、他のマスタデバイスは、その間PCIバス11を使用することができなくなってしまう場合があるという課題があった。
However, in the bus system as described above, as shown in FIG. 2, when a read request is issued again immediately after detecting a retry for the read request issued by the
特に、例えば映像機器や放送局用サーバ等におけるバスシステムの場合、映像データや音声データ等の大容量のデータを頻繁に転送させる必要がある。また、このような映像機器においては、例えば外部より取り込んだ映像データ等を記録媒体に記録したり、記録媒体に記録されている映像データ等を再生し、モニタに表示したり、外部に出力したりする処理が主に行われる。従って、バスシステムにおける各データ転送は、即時性を必要とするものが多く、バスを介したデータ転送において、上述したような不要なトラフィックにより待機時間が長くなりすぎると、記録処理や再生処理等が破綻してしまう恐れがあった。 In particular, in the case of a bus system in, for example, video equipment or a broadcasting station server, it is necessary to frequently transfer a large amount of data such as video data and audio data. In such a video device, for example, video data captured from the outside is recorded on a recording medium, video data recorded on the recording medium is reproduced, displayed on a monitor, or output to the outside. Is mainly performed. Therefore, each data transfer in the bus system often requires immediacy, and in the data transfer via the bus, if the standby time becomes too long due to unnecessary traffic as described above, a recording process, a reproduction process, etc. Could collapse.
また、図3を用いて説明したようにバースト転送により大容量のデータを効率よく転送させる方法もあるが、この場合においても、最初のコマンド発行フェーズにおいて、リトライ処理による不要なトラフィックが発生してしまう。このようなバースト転送の場合、一見、その後の一連のデータ転送時にリード要求によるトランザクションが発生しないため、バスのトラフィックは軽減されているように見えるが、一連のデータ転送により、データの転送が開始されてからバスが解放されるまでの時間がより長くなるので、1回のPCIデータ転送によるバスの占有時間が長くなってしまう。すなわち、他のマスタデバイスにとっては、本来の必要なトランザクションに対する待機時間自体が長くなってしまうことになる。従って、このようにバースト転送を行う場合、他のマスタデバイスの、上述したような不要なトラフィックによる待機時間に対する許容量は、通常のデータ転送よりも少なくなってしまう。 In addition, as described with reference to FIG. 3, there is a method for efficiently transferring a large amount of data by burst transfer. However, even in this case, unnecessary traffic is generated by retry processing in the first command issue phase. End up. In the case of such a burst transfer, at first glance, since a transaction due to a read request does not occur during a subsequent series of data transfer, the bus traffic seems to be reduced, but the series of data transfer starts data transfer. Since the time from when the bus is released until the bus is released becomes longer, the bus occupation time by one PCI data transfer becomes longer. That is, for other master devices, the waiting time itself for the originally necessary transaction becomes long. Therefore, when burst transfer is performed in this way, the allowable amount of other master devices with respect to the waiting time due to unnecessary traffic as described above is smaller than that of normal data transfer.
さらに、この不要なトラフィックを回避するために、ターゲットにイニシエータの待機時間に関する情報を保持させる方法の場合、各ターゲットが、その待機時間に関する情報を予め保持しておき、マスタデバイス(イニシエータ)からのアクセス要求に対して、それをイニシエータに供給する等の処理を行うことができるようにする必要があった。一般的に、バスシステムにおいて、全てのデバイスを開発すると製造コストが増大してしまうので、既存のデバイスをターゲットとして流用することも考えられる。このような場合、そのような処理を行えない従来のデバイスをターゲットとするデータ転送処理においては、図2に示されるようなリトライ処理によるトランザクションが発生してしまう恐れがあった。 Furthermore, in order to avoid this unnecessary traffic, in the case of a method for causing the target to hold information related to the standby time of the initiator, each target holds information related to the standby time in advance so that it can be received from the master device (initiator). It was necessary to be able to perform processing such as supplying an access request to the initiator. In general, if all devices are developed in a bus system, the manufacturing cost increases. Therefore, it is possible to use existing devices as targets. In such a case, in a data transfer process targeting a conventional device that cannot perform such a process, there is a possibility that a transaction due to a retry process as shown in FIG. 2 may occur.
また、バスシステムにおいては、場合により様々なデバイスをバスに接続することが想定される。従って、このような待機時間はターゲットの性能によってのみ決定されるとは限らず、例えば、マスタデバイス(イニシエータ)の性能、PCIバスコントローラの性能、またはデバイスの接続状況などによっても変化する可能性がある。従って、このように、ターゲットがどのマスタデバイスに対しても常に同じレイテンシ情報(待機時間の指定)を供給する場合、イニシエータは、待機時間が短すぎ、ターゲットのデータ転送の準備が完了していないのに再度アクセス要求をしてしまったり(すなわち、リトライが発生したり)、待機時間が長すぎ、ターゲットのデータ転送の準備が整っているにも関わらず、不要に待機してしまったりして、データ転送効率が低下してしまう恐れもあった。 In the bus system, it is assumed that various devices are connected to the bus depending on circumstances. Therefore, such a waiting time is not always determined only by the performance of the target, and may vary depending on, for example, the performance of the master device (initiator), the performance of the PCI bus controller, or the connection status of the device. is there. Therefore, in this way, when the target always supplies the same latency information (specifying the waiting time) to any master device, the initiator is not ready for data transfer of the target because the waiting time is too short. However, it makes an access request again (ie, a retry occurs), waits too long, and waits unnecessarily even though the target is ready for data transfer. The data transfer efficiency may also be reduced.
本発明は、このような状況に鑑みてなされたものであり、システムバスの各デバイスがそのシステムバスをより有効に活用することができるようにするものである。 The present invention has been made in view of such a situation, and enables each device of the system bus to utilize the system bus more effectively.
本発明の情報処理装置は、データ転送を制御してデータ転送を行うデバイスであるマスタデバイスが、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測手段と、計測手段により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値として設定するレイテンシ値設定手段とを備えることを特徴とする。 The information processing apparatus of the present invention controls a waiting time until a master device, which is a device that performs data transfer by controlling data transfer, issues a command requesting the start of data transfer, and reissues the command, Latency value that sets the value corresponding to the master device waiting time measured by the measuring means that measures the master device waiting time set as the waiting time of the master device as the latency value that the master device uses in data transfer And setting means.
前記計測手段は、待機時間を制御し、マスタデバイス待機時間として、マスタデバイスのデータ転送の相手のデバイスであるターゲットがコマンドを取得してからデータ転送の準備を整えるまでの時間を計測するようにすることができる。 The measuring means controls the standby time, and measures the time from the acquisition of the command by the target, which is the partner device of the master device to the data transfer, to the preparation of the data transfer as the master device standby time. can do.
前記計測手段は、待機時間を制御し、マスタデバイスのデータ転送の相手のデバイスであるターゲットがコマンドを取得してからデータ転送の準備を整えるまでの時間よりも長いマスタデバイス待機時間を計測するようにすることができる。 The measuring means controls the standby time so as to measure a master device standby time longer than a time from when a target, which is a device to which the master device is to transfer data, acquires a command and prepares for data transfer. Can be.
前記計測手段は、待機時間を制御し、マスタデバイス待機時間として、最も短い時間となるように最適化された待機時間である最適待機時間を計測するようにすることができる。 The measuring means may control the standby time and measure an optimal standby time that is a standby time optimized to be the shortest as the master device standby time.
前記計測手段は、待機時間を制御し、待機時間の制御単位上において、最適待機時間を計測するようにすることができる。 The measuring means can control the standby time and measure the optimal standby time on the control unit of the standby time.
前記制御単位は、情報処理装置のシステムクロックに基づいた時間単位であるようにすることができる。 The control unit may be a time unit based on a system clock of the information processing apparatus.
前記計測手段は、待機時間を制御して待機時間の長さを変更しながら、マスタデバイスにデータ転送を繰返し実行させることにより、マスタデバイス待機時間を計測するようにすることができる。 The measuring means can measure the master device standby time by causing the master device to repeatedly execute data transfer while controlling the standby time to change the length of the standby time.
クロックをカウントするカウント手段をさらに備え、計測手段は、カウント手段によるクロックのカウント処理実行中の期間を待機時間とし、カウント手段にカウントさせるクロックの数を変更することによって待機時間の長さを変更しながら、マスタデバイスにデータ転送を繰返し実行させることにより、マスタデバイス待機時間を計測するようにすることができる。 Counting means for counting the clock is further provided, and the measuring means changes the length of the waiting time by changing the number of clocks to be counted by the counting means while the period during which the counting process is being performed by the counting means is set as the waiting time. However, the master device standby time can be measured by causing the master device to repeatedly execute data transfer.
前記計測手段による計測処理においてマスタデバイスが繰返し実行するデータ転送における待機時間の初期値を設定する初期待機時間設定手段をさらに備え、計測手段は、計測処理において、初期待機時間設定手段により設定された初期値を用いて、マスタデバイスに最初のデータ転送を実行させるようにすることができる。 The apparatus further comprises initial standby time setting means for setting an initial value of standby time in data transfer repeatedly executed by the master device in the measurement processing by the measurement means, and the measurement means is set by the initial standby time setting means in the measurement processing The initial value can be used to cause the master device to perform an initial data transfer.
前記計測手段は、計測処理において繰返し実行されるデータ転送において、初期待機時間設定手段により設定される初期値を待機時間の最大値とし、マスタデバイスがデータ転送を繰り返す度に、待機時間が短くなるように待機時間を再設定するようにすることができる。 In the data transfer repeatedly executed in the measurement process, the measurement unit sets the initial value set by the initial standby time setting unit as the maximum value of the standby time, and the standby time is shortened each time the master device repeats the data transfer. So that the waiting time can be reset.
前記計測手段は、待機時間が短くなるように待機時間を再設定しながら、データ転送に対応するターゲットがマスタデバイスに対して発行した、データ転送の準備が完了していないことを示す応答であるリトライを検出するまで、マスタデバイスにデータ転送を繰り返し実行させるようにすることができる。 The measurement means is a response indicating that the preparation for data transfer is not completed, issued to the master device by the target corresponding to the data transfer while resetting the standby time so that the standby time is shortened. Until the retry is detected, the master device can repeatedly execute the data transfer.
前記計測手段は、リトライを検出すると、データ転送の繰り返しを中止して、1回前のデータ転送における待機時間をマスタデバイス待機時間とするようにすることができる。 When the measurement unit detects a retry, it can stop repeating the data transfer and set the standby time in the previous data transfer as the master device standby time.
前記計測手段は、1つのマスタデバイスに対して、ターゲット毎にマスタデバイス待機時間を計測し、レイテンシ値設定手段は、計測手段により計測されたターゲット毎のマスタデバイス待機時間に対応する値を、ターゲット毎のレイテンシ値として設定するようにすることができる。 The measuring unit measures a master device standby time for each target with respect to one master device, and the latency value setting unit calculates a value corresponding to the master device standby time for each target measured by the measuring unit. It can be set as a latency value for each.
前記計測手段による計測処理において、マスタデバイスがアクセスするアクセス先アドレスを設定するアドレス設定手段をさらに備え、計測手段は、マスタデバイスが、アドレス設定手段により設定されたアクセス先アドレスに対して、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間を制御し、マスタデバイス待機時間を計測するようにすることができる。 In the measurement process by the measurement unit, the measurement unit further includes an address setting unit that sets an access destination address accessed by the master device, and the measurement unit transfers data to the access destination address set by the address setting unit. It is possible to control the waiting time until the command is reissued after issuing the command requesting the start of the device, and measure the master device waiting time.
前記アドレス設定手段は、1つのターゲットに対応して、互いに異なる2つのアクセス先アドレスを設定し、計測手段は、マスタデバイスが、アドレス設定手段により設定された2つのアクセス先アドレスに対して交互に実行する2つのデータ転送の両方に基づいて、マスタデバイス待機時間を計測するようにすることができる。 The address setting means sets two different access destination addresses corresponding to one target, and the measuring means alternately selects the master device for the two access destination addresses set by the address setting means. The master device waiting time can be measured based on both of the two data transfers to be performed.
前記システムバスに接続された複数のデバイスの中から、計測手段によりマスタデバイス待機時間を計測するデータ転送を行うマスタデバイスを特定するマスタデバイス特定手段をさらに備え、計測手段はマスタデバイスに特定されたマスタデバイスに対応するマスタデバイス待機時間を計測するようにすることができる。 Master device specifying means for specifying a master device for performing data transfer for measuring the master device standby time by the measuring means from among a plurality of devices connected to the system bus is further provided, and the measuring means is specified as the master device. The master device standby time corresponding to the master device can be measured.
前記計測手段による計測処理の実行を制御する計測処理実行制御手段をさらに備えるようにすることができる。 Measurement processing execution control means for controlling execution of measurement processing by the measurement means can be further provided.
前記制御手段は、計測手段がマスタデバイス待機時間を計測するデータ転送を行うデバイスを選択するデバイス選択手段と、計測手段による計測処理の開始を制御する開始制御手段とを備えるようにすることができる。 The control unit may include a device selection unit that selects a device that performs data transfer in which the measurement unit measures the master device standby time, and a start control unit that controls the start of measurement processing by the measurement unit. .
前記複数のデバイスがシステムバスを介して互いに行うデータ転送において、ターゲットがマスタデバイスに対して発行した、データ転送の準備が完了していないことを示す応答であるリトライを検出することにより、リトライの数を監視するリトライ監視手段をさらに備え、開始制御手段は、リトライ監視手段により、1回のデータ転送において、予め定められた所定の数より多くリトライを検出した場合、計測手段による計測処理を開始させるようにすることができる。 In the data transfer performed by the plurality of devices to each other via the system bus, a retry issued by the target to the master device indicating a response indicating that preparation for data transfer is not completed is detected. Retry monitoring means for monitoring the number is further provided, and the start control means starts measurement processing by the measurement means when the retry monitoring means detects more retries than a predetermined number in one data transfer. You can make it.
本発明の情報処理方法は、データ転送を制御してデータ転送を行うデバイスであるマスタデバイスが、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測ステップと、計測ステップの処理により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値として設定するレイテンシ値設定ステップとを含むことを特徴とする。 The information processing method of the present invention controls a waiting time until a master device, which is a device that controls data transfer and performs data transfer, issues a command requesting the start of data transfer and reissues the command, A measurement step for measuring the master device standby time set as the master device standby time, and a value corresponding to the master device standby time measured by the processing of the measurement step are set as a latency value used by the master device in data transfer. And a latency value setting step.
本発明のプログラムは、データ転送を制御してデータ転送を行うデバイスであるマスタデバイスが、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測ステップと、計測ステップの処理により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値として設定するレイテンシ値設定ステップとをコンピュータに実行させる。 The program of the present invention controls a waiting time until a master device, which is a device that controls data transfer and performs data transfer, issues a command requesting the start of data transfer and reissues the command. Latency value that sets the master device standby time that is set as the standby time for the master device and the value that corresponds to the master device standby time measured by the processing of the measurement step as the latency value that the master device uses for data transfer Let the computer execute the configuration steps.
本発明の情報処理装置および方法、並びにプログラムにおいては、データ転送を制御してデータ転送を行うデバイスであるマスタデバイスが、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間が制御され、マスタデバイス待機時間として設定されるマスタデバイス待機時間が計測され、計測されたマスタデバイス待機時間に対応する値が、マスタデバイスがデータ転送において使用するレイテンシ値として設定される。 In the information processing apparatus, method, and program according to the present invention, the master device, which is a device that controls data transfer and performs data transfer, issues a command for requesting the start of data transfer and then issues the command again. The standby time is controlled, the master device standby time set as the master device standby time is measured, and a value corresponding to the measured master device standby time is set as a latency value used by the master device in data transfer.
本発明によれば、データ転送を制御することができる。特に、例えば、アクセス回数を減少させることによりバスのトラフィックを軽減させる等して、システムバスの各デバイスがそのシステムバスをより有効に活用することができる。 According to the present invention, data transfer can be controlled. In particular, each device of the system bus can use the system bus more effectively, for example, by reducing the traffic of the bus by reducing the number of accesses.
以下に本発明の実施の形態を説明するが、請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。 Embodiments of the present invention will be described below. Correspondences between constituent elements described in the claims and specific examples in the embodiments of the present invention are exemplified as follows. This description is to confirm that specific examples supporting the invention described in the claims are described in the embodiments of the invention. Therefore, even if there are specific examples that are described in the embodiment of the invention but are not described here as corresponding to the configuration requirements, the specific examples are not included in the configuration. It does not mean that it does not correspond to a requirement. On the contrary, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.
さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定したりするものではない。 Further, this description does not mean that all the inventions corresponding to the specific examples described in the embodiments of the invention are described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of an invention not described in the claims of this application, that is, in the future, a divisional application will be made. Nor does it deny the existence of an invention added by amendment.
本発明においては、複数のデバイス(例えば、図4のPCIデバイス111)が接続されたシステムバス(例えば、図4のPCIバス110)を有し、前記複数のデバイスが前記システムバスを介して互いにデータ転送(例えば、図4のPCIデータ転送112)を行う情報処理装置(例えば、図4の画像処理装置100)が提供される。この情報処理装置では、データ転送を制御してデータ転送を行うデバイスであるマスタデバイス(例えば、図4のイニシエータ113)が、データ転送の開始を要求するコマンド(例えば、図14のリード要求321−1)を発行後、コマンド(例えば、図14のリード要求321−2)を再発行するまでの待機時間(例えば、図14の区間341)を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間(例えば、図19の区間411)を計測する計測手段(例えば、図11のステップS61乃至ステップS70、並びに図12のステップS81乃至ステップS89の処理を実行する図14の計測処理部131)と、計測手段により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値(例えば、図6のレイテンシ値283)として設定するレイテンシ値設定手段(例えば、図13のステップS92またはステップS95の処理を実行する図14の計測処理部131)とを備える。
The present invention has a system bus (for example,
前記計測手段は、待機時間を制御し、マスタデバイス待機時間として、マスタデバイスのデータ転送の相手のデバイスであるターゲット(例えば、図4のターゲット114)がコマンドを取得してからデータ転送の準備を整えるまでの時間(例えば、図14の時刻T1から時刻T2までの時間)を計測するようにすることができる。
The measuring means controls the standby time, and prepares for the data transfer after the target (for example, the
前記計測手段は、待機時間を制御し、マスタデバイスのデータ転送の相手のデバイスであるターゲット(例えば、図4のターゲット114)がコマンドを取得してからデータ転送の準備を整えるまでの時間(例えば、図14の時刻T1から時刻T2までの時間)よりも長いマスタデバイス待機時間(例えば、図19の区間411)を計測するようにすることができる。
The measuring means controls the standby time, and the time from when the target (for example, the
前記計測手段は、待機時間を制御し、マスタデバイス待機時間として、最も短い時間となるように最適化された待機時間である最適待機時間(例えば、図19の区間411)を計測するようにすることができる。
The measurement means controls the standby time, and measures the optimum standby time (for example,
前記計測手段は、待機時間を制御し、待機時間の制御単位上(例えば、図17の区間361A)において、最適待機時間を計測するようにすることができる。
The measuring means controls the standby time, and can measure the optimal standby time on the control unit of the standby time (for example, the
前記制御単位は、情報処理装置のシステムクロック(例えば、図15のCLK)に基づいた時間単位であるようにすることができる。 The control unit may be a time unit based on a system clock (for example, CLK in FIG. 15) of the information processing apparatus.
前記計測手段は、待機時間を制御して待機時間の長さを変更しながら(例えば、図11のステップS69または図11のステップS88)、マスタデバイスにデータ転送を繰返し実行させる(例えば、図11のステップS62乃至ステップS68、または、図12のステップS81乃至ステップS87)ことにより、マスタデバイス待機時間を計測するようにすることができる。 The measurement unit controls the standby time to change the length of the standby time (for example, step S69 in FIG. 11 or step S88 in FIG. 11), and causes the master device to repeatedly execute data transfer (for example, FIG. 11). The master device standby time can be measured by performing steps S62 to S68 of FIG. 12 or steps S81 to S87 of FIG.
クロックをカウントするカウント手段(例えば、図6のアウェイタイマ255)をさらに備え、計測手段は、カウント手段によるクロックのカウント処理実行中の期間を待機時間とし、カウント手段にカウントさせるクロックの数(例えば、図6のアウェイタイマ値285)を変更することによって待機時間の長さを変更しながら、マスタデバイスにデータ転送を繰返し実行させることにより、マスタデバイス待機時間を計測するようにすることができる。
Counting means for counting clocks (for example, the away
前記計測手段による計測処理においてマスタデバイスが繰返し実行するデータ転送における待機時間の初期値(例えば、図6の初期アウェイ値284)を設定する初期待機時間設定手段(例えば、図5の初期アウェイ値設定部204)をさらに備え、計測手段は、計測処理において、初期待機時間設定手段により設定された初期値を用いて、マスタデバイスに最初のデータ転送を実行させるようにすることができる。 Initial waiting time setting means (for example, initial away value setting in FIG. 5) for setting an initial value (for example, initial away value 284 in FIG. 6) of waiting time in data transfer repeatedly executed by the master device in the measurement processing by the measuring means. Unit 204), and the measurement means can cause the master device to execute the first data transfer in the measurement process using the initial value set by the initial standby time setting means.
前記計測手段は、計測処理において繰返し実行されるデータ転送において、初期待機時間設定手段により設定される初期値を待機時間の最大値とし、マスタデバイスがデータ転送を繰り返す度に、待機時間が短くなるように待機時間を再設定する(例えば、図11のステップS69または図12のステップS88)ようにすることができる。 In the data transfer repeatedly executed in the measurement process, the measurement unit sets the initial value set by the initial standby time setting unit as the maximum value of the standby time, and the standby time is shortened each time the master device repeats the data transfer. Thus, the standby time can be reset (for example, step S69 in FIG. 11 or step S88 in FIG. 12).
前記計測手段は、待機時間が短くなるように待機時間を再設定しながら、データ転送に対応するターゲットがマスタデバイスに対して発行した、データ転送の準備が完了していないことを示す応答であるリトライ(例えば、図14のリトライ330−1)を検出するまで、マスタデバイスにデータ転送を繰り返し実行させる(例えば、図11のステップS67または図12のステップS86)ようにすることができる。 The measurement means is a response indicating that the preparation for data transfer is not completed, issued to the master device by the target corresponding to the data transfer while resetting the standby time so that the standby time is shortened. Until the retry (for example, retry 330-1 in FIG. 14) is detected, the master device can repeatedly execute the data transfer (for example, step S67 in FIG. 11 or step S86 in FIG. 12).
前記計測手段は、リトライを検出すると、データ転送の繰り返しを中止して、1回前のデータ転送における待機時間をマスタデバイス待機時間とする(例えば、図13のステップS91)ようにすることができる。 When the measurement unit detects a retry, it can stop repeating the data transfer and set the standby time in the previous data transfer as the master device standby time (for example, step S91 in FIG. 13). .
前記計測手段は、1つのマスタデバイスに対して、ターゲット毎にマスタデバイス待機時間を計測し、レイテンシ値設定手段は、計測手段により計測されたターゲット毎のマスタデバイス待機時間に対応する値を、ターゲット毎のレイテンシ値(例えば、図6のターゲット別レジスタ空間261−1乃至261−3のそれぞれのレイテンシ値レジスタ273にセットされたレイテンシ値283)として設定するようにすることができる。 The measuring unit measures a master device standby time for each target with respect to one master device, and the latency value setting unit calculates a value corresponding to the master device standby time for each target measured by the measuring unit. Each latency value (for example, the latency value 283 set in each latency value register 273 of the target-specific register spaces 261-1 to 261-3 in FIG. 6) may be set.
前記計測手段による計測処理において、マスタデバイスがアクセスするアクセス先アドレス(例えば、図5のアドレスA221またはアドレスB222)を設定するアドレス設定手段(例えば、図5のアドレス設定部202)をさらに備え、計測手段は、マスタデバイスが、アドレス設定手段により設定されたアクセス先アドレスに対して、データ転送の開始を要求するコマンドを発行後、コマンドを再発行するまでの待機時間を制御し、マスタデバイス待機時間を計測するようにすることができる。
In the measurement process by the measurement unit, the measurement unit further includes an address setting unit (for example, the
前記アドレス設定手段は、1つのターゲットに対応して、互いに異なる2つのアクセス先アドレス(例えば、図5のアドレスA221およびアドレスB222)を設定し、計測手段は、マスタデバイスが、アドレス設定手段により設定された2つのアクセス先アドレスに対して交互に実行する2つのデータ転送の両方に基づいて、マスタデバイス待機時間を計測するようにすることができる。 The address setting means sets two different access destination addresses (for example, address A221 and address B222 in FIG. 5) corresponding to one target, and the measuring means is set by the master device by the address setting means. The master device waiting time can be measured based on both of the two data transfers executed alternately with respect to the two accessed addresses.
前記システムバスに接続された複数のデバイスの中から、計測手段によりマスタデバイス待機時間を計測するデータ転送を行うマスタデバイスを特定するマスタデバイス特定手段(例えば、図5のマスタ特定部203)をさらに備え、計測手段はマスタデバイスに特定されたマスタデバイスに対応するマスタデバイス待機時間を計測するようにすることができる。
Master device specifying means (for example,
前記計測手段による計測処理の実行を制御する計測処理実行制御手段(例えば、図5の計測処理実行制御部206)をさらに備えるようにすることができる。
A measurement process execution control unit (for example, the measurement process
前記制御手段は、計測手段がマスタデバイス待機時間を計測するデータ転送を行うデバイスを選択するデバイス選択手段(例えば、図9のステップS26およびステップS27の処理を実行する図5の計測処理実行制御部206)と、計測手段による計測処理の開始を制御する開始制御手段(例えば、例えば、図9のステップS24の処理を実行する図5の計測処理実行制御部206)とを備えるようにすることができる。
The control means is a device selection means for selecting a device that performs data transfer in which the measurement means measures the master device standby time (for example, the measurement process execution control unit in FIG. 5 that executes the processes in steps S26 and S27 in FIG. 9). 206) and start control means for controlling the start of the measurement process by the measurement means (for example, the measurement process
前記複数のデバイスがシステムバスを介して互いに行うデータ転送において、ターゲットがマスタデバイスに対して発行した、データ転送の準備が完了していないことを示す応答であるリトライ(例えば、図14のリトライ330−1)を検出することにより、リトライの数を監視するリトライ監視手段(例えば、図21のリトライ監視部421)をさらに備え、開始制御手段は、リトライ監視手段により、1回のデータ転送において、予め定められた所定の数より多くリトライを検出した場合、計測手段による計測処理を開始させる(例えば、図22のステップS135およびステップS136)ようにすることができる。
In data transfer performed by the plurality of devices to each other via the system bus, a retry issued by the target to the master device indicating that the preparation for data transfer is not completed (for example, retry 330 in FIG. 14). -1) is detected, and further includes a retry monitoring unit (for example, the retry
本発明においては、複数のデバイス(例えば、図4のPCIデバイス111)が接続されたシステムバス(例えば、図4のPCIバス110)を有し、前記複数のデバイスが前記システムバスを介して互いにデータ転送(例えば、図4のPCIデータ転送112)を行う情報処理装置(例えば、図4の画像処理装置100)の情報処理方法が提供される。この情報処理方法においては、データ転送を制御してデータ転送を行うデバイスであるマスタデバイス(例えば、図4のイニシエータ113)が、データ転送の開始を要求するコマンド(例えば、図14のリード要求321−1)を発行後、コマンド(例えば、図14のリード要求321−2)を再発行するまでの待機時間(例えば、図14の区間341)を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間(例えば、図19の区間411)を計測する計測ステップ(例えば、図11のステップS61乃至ステップS70、並びに図12のステップS81乃至ステップS89)と、計測ステップの処理により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値(例えば、図6のレイテンシ値283)として設定するレイテンシ値設定ステップ(例えば、図13のステップS92またはステップS95)とを含む。
The present invention has a system bus (for example,
本発明においては、複数のデバイス(例えば、図4のPCIデバイス111)が接続されたシステムバス(例えば、図4のPCIバス110)を有し、前記複数のデバイスが前記システムバスを介して互いにデータ転送(例えば、図4のPCIデータ転送112)を行う処理を、コンピュータ(例えば、図4の画像処理装置100)に行わせるプログラムが提供される。このプログラムは、データ転送を制御してデータ転送を行うデバイスであるマスタデバイス(例えば、図4のイニシエータ113)が、データ転送の開始を要求するコマンド(例えば、図14のリード要求321−1)を発行後、コマンド(例えば、図14のリード要求321−2)を再発行するまでの待機時間(例えば、図14の区間341)を制御し、マスタデバイスの待機時間として設定するマスタデバイス待機時間(例えば、図19の区間411)を計測する計測ステップ(例えば、図11のステップS61乃至ステップS70、並びに図12のステップS81乃至ステップS89)と、計測ステップの処理により計測されたマスタデバイス待機時間に対応する値を、マスタデバイスがデータ転送において使用するレイテンシ値(例えば、図6のレイテンシ値283)として設定するレイテンシ値設定ステップ(例えば、図13のステップS92またはステップS95)とを含む。
The present invention has a system bus (for example,
以下に、本発明の実施の形態について図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図4は、本発明を適用した画像処理装置の主な構成例を表している。 FIG. 4 shows a main configuration example of an image processing apparatus to which the present invention is applied.
図4に示される画像処理装置100は、例えば、映像データの記録再生装置等の映像機器であり、システムバスとしてPCIバス(Peripheral Components Interconnect bus)110が適用されている。
The
PCIバス110は、例えば、バス幅(1回の転送で送れるデータ量)が32ビット、動作周波数(1秒あたりの転送回数)が33MHz(メガヘルツ)、最大データ転送速度が133MB/s(メガバイトパーセカンド)のバスである。
For example, the
PCIバス110には、PCIデバイス111−1乃至PCIデバイス111−Nが接続されている。なお、以下において、PCIデバイス111−1乃至PCIデバイス111−Nの各PCIデバイスを区別する必要のない場合は、PCIデバイス111と称する。また、図4においてPCIデバイス111は、PCIバス110に両矢印により接続されているが、実際には、複数の信号線、電源、およびグランド等により接続される。PCIデバイス111としては、PCIバス110を介してデータ転送が相互に可能な様々なデバイスが適用される。例えば、SCSI(Small Computer System Interface)インタフェース、IDE(Integrated Drive Electronics)インタフェース、およびフレキシブルディスクドライブ等の大容量記憶装置コントローラ、イーサネット(登録商標)インタフェースやATM(Asynchronous Transfer Mode)インタフェース等のネットワークコントローラ、ビデオコントローラやオーディオコントローラ等のマルチメディアコントローラ、SDRAM(Synchronous Dynamic Random Access Memory)やフラッシュメモリ等のメモリコントローラ、ISA(Industry Standard Architecture)ブリッジ、PCI-PCIブリッジ、PCMCIA(Personal Computer Memory Card International Association)ブリッジ等の各種ブリッジ、キーボードやマウス等の入力インタフェース、CPU等のプロセッサ、並びに、IEEE(Institute of Electrical and Electronic Engineers)1394やUSB(Universal Serial Bus)等のシリアルバスのコントローラ等が含まれる。もちろん、これ以外のデバイスもPCIデバイス111としてPCIバス110に接続されるようにしてもよい。
PCI devices 111-1 to 111 -N are connected to the
以下において、PCIバス110を介して行われるデータ転送(PCIデータ転送)を制御するPCIデバイスをマスタと称し、マスタの通信相手となるPCIデバイスをターゲットと称する。また、このようにマスタとして動作可能なPCIデバイス111をマスタデバイスと称し、ターゲットとしてのみ動作するデバイスをターゲットデバイスと称する。
Hereinafter, a PCI device that controls data transfer (PCI data transfer) performed via the
また、1つのPCIデータ転送において、マスタとして動作するPCIデバイス111は1つしか存在せず、このときのマスタをイニシエータと称する。すなわち、1つのPCIデータ転送において、イニシエータはマスタとしてデータ転送を制御し、他のターゲットと通信を行い、データの授受などを行う。なお、マスタデバイスはターゲットとして動作し、他のマスタデバイスとPCIデータ転送を行う場合がある。このときのPCIデータ転送におけるイニシエータは他のマスタデバイスとなる。 In one PCI data transfer, there is only one PCI device 111 operating as a master, and the master at this time is called an initiator. That is, in one PCI data transfer, the initiator controls data transfer as a master, communicates with other targets, and exchanges data. Note that the master device may operate as a target and perform PCI data transfer with other master devices. The initiator in the PCI data transfer at this time is another master device.
図4において、イニシエータ113は、PCIデバイス111の1つであり、同じくPCIデバイスの1つであるターゲット114にアクセスしPCIデータ転送112を行う。すなわち、イニシエータ113は、ターゲット114に対するPCIデータ転送112を制御する。以下において、イニシエータ113およびターゲット114によるPCIデータ転送112について説明するが、PCIデータ転送112は、特定のPCIデバイス間におけるデータ転送を示すものではなく、PCIバス110のPCIバスシステムにおける全てのデータ転送に対して適応可能である。すなわち、イニシエータ113は、PCIデバイス111に含まれる任意のマスタデバイスのことを示し、ターゲット114は、イニシエータ113とPCIデータ転送を行う全てのPCIデバイス111のことを示す。
In FIG. 4, an
ターゲット114は、PCIバス110に接続されるとともに、ローカルバス120を介してローカルメモリ121に接続されており、ローカルメモリ121のデータの入出力を制御するデバイスである。ターゲット114は、内部にキャッシュメモリ122を有している。このキャッシュメモリ122は、データ転送等に用いられ、例えば、PCIバス110とローカルバス120のデータ転送速度の違いを吸収させるため等に用いられる。例えば、イニシエータ113がPCIデータ転送112により、ターゲット114に対してローカルメモリ121のデータのリード要求を行うと、ターゲット114は、まず、ローカルバス120を介してローカルメモリ121にアクセスし、要求されたデータを読み出し、それをキャッシュメモリ122に保持させる。そして、転送させるデータをキャッシュメモリ122に保持させ、データ転送の準備が整うと、ターゲット114は、それを、PCIバス110を介してイニシエータ113に供給する。
The
イニシエータ113は、ターゲット114に対するPCIデータ転送112において、コマンドを出力してからの最適な待機時間を計測する計測処理部131を有している。具体的には後述するが、計測処理部131は、CPU141に制御され、イニシエータ113がPCIデータ転送を行う全てのターゲットに対して、待機する時間であるマスタデバイス待機時間として最適な待機時間(最適待機時間)をそれぞれ計測する。イニシエータ113は、計測処理部131において計測された待機時間を用いてPCIデータ転送112を行うことにより、PCIバス110の有効利用を実現する。
The
PCIバス110には、また、画像処理装置100全体を制御するCPU(Central Processing Unit)141も接続されている。CPU141は、ホストバス160を介してメインメモリ161にアクセスし、メインメモリ161にロードされたプログラムに従って各種の処理を実行し、画像処理装置100の各部の動作を制御する。メインメモリ161にはまた、CPU141が各種の処理を実行する上において必要なデータなども適宜記憶される。また、CPU141は、内部にホストPCIブリッジ151を有しており、CPU141とメインメモリ161を接続するホストバス160と、PCIバス110とのブリッジとしても動作する。さらに、CPU141は、各マスタデバイスがコマンド出力後に待機するマスタデバイス待機時間として最適な待機時間(最適待機時間)を設定するための処理を制御するレイテンシ値設定制御部152を有している。CPU141は、レイテンシ値設定制御部152を用いて、PCIバス110においてデータ転送処理が開始される前に、各マスタデバイスに対して、各ターゲットに対する待機時間(レイテンシ値)を設定させる。
A CPU (Central Processing Unit) 141 that controls the entire
また、図示は省略するが、CPU141のホストPCIブリッジ151は、PCIバス110におけるデータ転送の制御を行うPCIバスコントローラや、データ転送の制御権の割り当てを行うアービタ等も含む。
Although not shown, the
CPU141には、さらに、CPU141が実行するプログラムやデータが予め記憶されたROM(Read Only Memory)171、書き換え可能なフラッシュメモリ等により構成され、CPU141が実行するプログラムやデータが記憶される記憶部172、および、CPU141に制御されるなどして、装着されたリムーバブルメディア174に記憶されているプログラムやデータを読み出し、CPU141に供給するドライブ173が接続されている。さらに、キーボード等の入力デバイスやモニタ等の出力デバイスのように上述した以外のデバイスがCPU141に接続されるようにしてももちろんよい。
The
図5は、図4のCPU141の内部の詳細な構成例を示すブロック図である。なお、図5において、CPU141は、イニシエータ113のレイテンシ値の設定に関する処理部についてのみ示されている。
FIG. 5 is a block diagram showing an example of a detailed configuration inside the
CPU141は、ホストPCIブリッジ151およびレイテンシ値設定制御部152の他に、PCIコンフィギュレーション処理部201、アドレス設定部202、およびマスタ特定部203を有している。
The
PCIコンフィギュレーション処理部201は、ホストPCIブリッジ151を介して各PCIデバイス111にアクセスし、各PCIデバイスに対して、メモリアドレス、I/Oアドレス、割り込みレベル、およびDMA(Direct Memory Access transfer)チャネル等のシステムリソースの割り当て、ドライバのロード/アンロード、および各種パラメータの設定等を行うコンフィギュレーション処理を行う。そして、PCIコンフィギュレーション処理部201は、その処理結果をアドレス設定部202に供給する。
The PCI
アドレス設定部202は、レイテンシ値設定処理における各ターゲットのアクセス先アドレスを、PCIコンフィギュレーション処理部201が割り当てたアドレスに基づいて設定し、それをレイテンシ値設定制御部152のレイテンシ値設定用アクセス先アドレス保持部207に供給し、保持させる。また、アドレス設定部202は、PCIコンフィギュレーション処理部201より供給されたコンフィギュレーション処理結果をマスタ特定部203に供給する。
The
マスタ特定部203は、PCIコンフィギュレーション処理部201によるコンフィギュレーション処理結果に基づいて、PCIバス110に接続されたPCIデバイス111の中からマスタデバイスを特定する。また、マスタ特定部203は、その特定したマスタデバイスに関する情報をレイテンシ値設定制御部152の初期アウェイ値設定部204に供給する。
The
レイテンシ値設定制御部152は、内部に、初期アウェイ値設定部204、アドレスセット処理部205、計測処理実行制御部206、およびレイテンシ値設定用アクセス先アドレス保持部207を有している。
The latency value setting
初期アウェイ値設定部204は、各マスタデバイスが各ターゲットに対する待機時間を計測する際に利用する、待機時間の初期値である初期アウェイ値を設定する処理部であり、マスタ特定部203において特定されたマスタデバイスに対して、ホストPCIブリッジ151を介して、予め保持している初期アウェイ値211を供給し、設定させる。
The initial away
アドレスセット処理部205は、アドレス設定部202により設定され、レイテンシ値設定用アクセス先アドレス保持部207に保持されているレイテンシ値設定用アクセス先アドレスを取得し、マスタ特定部205により特定されたマスタデバイスに対して、それぞれ対応するターゲットのレイテンシ値設定用アクセス先アドレスを、ホストPCIブリッジ151を介して供給する。
The address set
計測処理実行制御部206は、ホストPCIブリッジ151を介して各マスタデバイスにアクセスし、各マスタデバイスが有する計測処理部131に対して、ターゲットに対する計測処理を実行させるように制御する。なお、計測処理実行制御部206は、内部に計測処理の完了を示す完了フラグ212を有しており、マスタデバイス(イニシエータ)の計測処理部131が計測処理を終了すると、完了フラグ212をオンにセット(アサート)する。計測処理実行制御部206は、この完了フラグ212の値によりマスタデバイスによる計測処理が終了したか否かを判定する。
The measurement processing
レイテンシ値設定用アクセス先アドレス保持部207は、図5に示されるように、アドレス設定部202により設定された各ターゲットに対するレイテンシ値設定用アクセス先アドレスを、レイテンシ値設定用アクセス先アドレス213−1、213−2、213−3、・・・のように、ターゲット毎に保持し、必要に応じてそれらのアドレスをアドレスセット処理部205に供給する。なお、アドレス設定部202は、後述するように、各ターゲットに対してレイテンシ値設定用アクセス先アドレスとして2つのアドレス(アドレスA221およびアドレスB222)を設定する。レイテンシ値設定用アクセス先アドレス保持部207は、それらの2つのアドレス(アドレスAおよびアドレスB)をターゲット毎に保持する。
As shown in FIG. 5, the latency value setting access destination address holding unit 207 sets the latency value setting access destination address for each target set by the
図6は、図4のイニシエータ113の、内部の詳細な構成例を示すブロック図である。なお、図6において、イニシエータ113は、PCIデバイス111としての通常の処理に関するブロックについては省略されており、レイテンシ値の設定に関する処理部についてのみ示されている。
FIG. 6 is a block diagram illustrating a detailed internal configuration example of the
図6において、イニシエータ113は、上述した計測処理部131の他に、PCIバス110とイニシエータ113の内部とのインタフェース処理を行うPCIインタフェース処理部251、イニシエータ113の各部の動作を制御するデバイス制御部252、計測処理部131による待機時間の計測処理に用いられる初期アウェイ値をレジスタにセットする初期アウェイ値セット処理部253、計測処理部131による待機時間の計測処理に用いられるターゲットのレイテンシ値設定用アクセス先アドレスをレジスタにセットするアドレスセット処理部254、計測処理部131に制御され、待機時間(レイテンシ値)の計測に利用されるタイマであるアウェイタイマ255、および各種のレジスタ等の情報を保持するRAM(Random Access Memory)256を有している。
6, in addition to the above-described
PCIデバイス251は、PCIバス110とのインタフェース処理を行う処理部であり、PCIバス110に接続されるとともに、デバイス制御部252、初期アウェイ値セット処理部253、アドレスセット処理部254、および計測処理部131等と接続されている。
The
デバイス制御部252は、イニシエータ113の各部の動作の制御に関する処理を行う。例えば、デバイス制御部252は、RAM256にロードされたプログラムやデータに基づいて、初期アウェイ値セット処理部253、アドレスセット処理部254、アウェイタイマ255、RAM256、および計測処理部131等の各部の動作タイミングや処理手順を制御したり、CPU141等より供給されたプログラムやデータをRAM256にロードしたり、RAM256に保持されているプログラムやデータをアンロードしたりする。
The device control unit 252 performs processing related to operation control of each unit of the
初期アウェイ値セット処理部253は、CPU141の初期アウェイ値設定部204より供給された初期アウェイ値を、PCIインタフェース処理部251を介して取得すると、それをRAM256に設けられた初期アウェイ値レジスタ274に供給し、初期アウェイ値284をセットする。
When the initial away value set
アドレスセット処理部254は、CPU141のアドレスセット処理部205より供給されるレイテンシ値設定用アクセス先アドレス(アドレスA221およびアドレスB222)を、PCIインタフェース処理部251を介して取得すると、それらをRAM256に設けられたターゲット別レジスタ空間にセットする。
When the address set
アウェイタイマ255は、計測処理部131に制御され、計測制御部131にセットされたアウェイタイマ値分のクロックをカウントし、カウントが終了するとそれを計測制御部131に通知する。
The away
RAM256には、デバイス制御部252やイニシエータ113の各部により実行されるプログラムやデータの他に、イニシエータ113がデータ転送を行うターゲットに関する情報が格納(セット)されるターゲット別レジスタ空間261−1、261−2、261−3、・・・がターゲットの数だけ設けられている。なお、以下において、各ターゲット別レジスタ空間を区別して説明する必要の無い場合は、ターゲット別レジスタ空間261と称する。
In the
ターゲット別レジスタ空間261のそれぞれには、各レジスタが対応するターゲットのレイテンシ値設定用アクセス先アドレスであるアドレスA221が格納(セット)されるレイテンシ値設定用アクセス先アドレスレジスタA271、各レジスタが対応するターゲットのレイテンシ値設定用アクセス先アドレスであるアドレスB222が格納(セット)されるレイテンシ値設定用アクセス先アドレスレジスタB272、並びに、計測処理部131による計測処理により設定された、各レジスタが対応するターゲットのレイテンシ値283が格納(セット)されるレイテンシ値レジスタ273が設けられている。
Each target register space 261 corresponds to a latency value setting access destination address register A271 in which an address A221 which is a target latency value setting access destination address corresponding to each register is stored (set). The latency value setting access destination address register B272 in which the address B222, which is the target latency value setting access destination address, is stored (set), and the target corresponding to each register set by the measurement processing by the
レイテンシ値設定用アクセス先アドレスレジスタA271のアドレスA221、およびレイテンシ値設定用アクセス先アドレスレジスタB272のアドレスB222は、PCIバス110を介してCPU141のアドレスセット処理部205より供給され、アドレスセット処理部254によりセットされる。また、これらの値は、計測処理部131により参照され、レイテンシ値の設定時におけるターゲットのアクセス先アドレスとして計測処理に利用される。
The address A221 of the latency value setting access destination address register A271 and the address B222 of the latency value setting access destination address register B272 are supplied from the address set
また、RAM256には、初期アウェイ値セット処理部253により初期アウェイ値284がセットされる初期アウェイレジスタ274が設けられている。この初期アウェイ値284は、計測処理部131により参照され、アウェイタイマ255がカウントするクロック数の初期値として利用される。すなわち、初期アウェイ値284は、計測処理におけるイニシエータ113の、コマンド発行後に再度同じアドレスに対する同じコマンドを発行するまでの待機時間の初期値である。
Further, the
さらに、RAM256には、計測処理部131の計測処理において、アウェイタイマがカウントするクロック数を示すアウェイタイマ値285を格納(セット)するアウェイタイマ値レジスタ275が設けられている。アウェイタイマ値レジスタ275にセットされるアウェイタイマ値285は、計測処理においてアウェイタイマ255がカウントするクロック数であり、その値は、計測処理が進行するに従って更新されていく。なお、アウェイタイマ値285の初期値は、初期アウェイ値284にセットされる。
Further, the
計測処理部131は、PCIインタフェース251を介してCPU141に制御され、初期アウェイ値レジスタ274にセットされている初期アウェイ値284を参照し、その値をアウェイタイマ値285としてアウェイタイマ値レジスタ275にセットする。次に、計測処理部131は、CPU141に制御されて、計測処理を行うターゲットを決定し、そのターゲットのレイテンシ値設定用アクセス先アドレス(アドレスA221およびアドレスB222)をレイテンシ値設定用アクセス先アドレスレジスタA271およびレイテンシ値設定用アクセス先アドレスレジスタB272より読み出し、そのうち一方のアドレス(例えば、アドレスA221)に対してコマンドを発行する。コマンド発行後、そのコマンドに対するリトライを検出すると、計測処理部131は、アウェイタイマ255を制御し、アウェイタイマ値275にセットされたアウェイタイマ値285のクロック数をカウントさせる。
The
アウェイタイマ255がカウントを終了し、処理を戻すと、計測処理部131は、再度、同じアドレスに対してアクセスし、同じコマンドを発行する。このコマンドによりPCIデータ転送が開始され、正常に完了した場合、計測処理部131は、アウェイタイマ値275にセットされたアウェイタイマ値285を1回分(予め定められた所定のクロック数分)ディクリースする。そして、計測処理部131は、次に、他方のアドレス(例えば、アドレスB222)に対してコマンドを発行する。コマンド発行後、そのコマンドに対するリトライを検出すると、計測処理部131は、アウェイタイマ255を制御し、アウェイタイマ値275にセットされたアウェイタイマ値285のクロック数をカウントさせる。
When the away
アウェイタイマ255がカウントを終了し、処理を戻すと、計測処理部131は、再度、同じアドレスに対してアクセスし、同じコマンドを発行する。このコマンドによりPCIデータ転送が開始され、正常に完了した場合、計測処理部131は、アウェイタイマ値275にセットされたアウェイタイマ値285を1回分(予め定められた所定のクロック数分)ディクリースする。そして、計測処理部131は、次に、最初のアドレス(例えば、アドレスA221)に対してコマンドを発行する。
When the away
以上の処理を繰り返すことにより、計測処理部131は、アウェイタイマ値285の値を徐々に減らしながら(待機時間を短くしながら)、計測処理を続ける。そして、アウェイタイマ値285に対応する待機時間分待機した後のコマンド発行においてもリトライを検出した場合、計測処理部131は、計測処理を終了し、1回前のアウェイタイマ値285の値(その時点のアウェイタイマ値285に1回分のクロック数をインクリメントした値)をレイテンシ値283として、そのターゲットに対応するターゲット別レジスタ空間261のレイテンシ値レジスタ273に格納(セット)する。
By repeating the above process, the
以上のようにしてイニシエータ113は、マスタデバイス待機時間として最適な最適待機時間の計測処理を行う。
As described above, the
なお、以上のようなレイテンシ値の設定は、例えば、電源投入時等におけるPCIバス110のリセット後等に行われ、以後の通常のデータ転送処理においては、そのとき設定されたレイテンシ値が適用される。
The latency value is set as described above, for example, after the
図4においてPCIバス110のリセットは、CPU141に制御されて実行される。例えば、ユーザ等の指示によりPCIバス110の初期化処理を行う場合や画像処理装置100に電源が投入された場合等において、CPU141は、リセット処理を開始する。CPU141により実行されるリセット処理を図7のフローチャートを参照して説明する。
In FIG. 4, the reset of the
最初に、ステップS1において、CPU141のPCIコンフィギュレーション処理部201は、コンフィギュレーション処理を実行し、PCIバス110およびPCIデバイス111を初期化し、各種の設定や割り当てを行う。具体的には、PCIコンフィギュレーション処理部201は、PCIバス110を介して、各PCIデバイス111のコンフィギュレーションレジスタからベンダID、デバイスID、およびクラスコード等の、PCIデバイス111に関する情報を取得する。そして、PCIコンフィギュレーション処理部201は、それらのIDやコードに基づいて各PCIデバイス111を識別し、各デバイスに対して、メモリアドレス、I/Oアドレス、割り込みレベル、およびDMAチャネル等のシステムリソースの割り当て、ドライバのロード/アンロード、および各種パラメータの設定等を行う。このとき、PCIコンフィギュレーション処理部201は、アドレスの割り当てとして、例えば、図8に示されるように、PCIバス110に接続された各PCIデバイスのアドレス領域をPCIバスアドレス空間、すなわち、CPUメモリ空間300に割り当てる。
First, in step S1, the PCI
図8において、PCIコンフィギュレーション処理部201は、CPUメモリ空間300の内、アドレス00000h乃至0FFFFhのCPUアドレス領域310以外のメモリ空間を、ターゲット1用アドレス領域311、ターゲット2用アドレス領域312、およびターゲット3用アドレス領域313のように、64KBずつ各ターゲットに割り当てる。また、PCIコンフィギュレーション処理部201は、それぞれのターゲット用アドレス領域において、レジスタ用のアドレス空間と、ローカルメモリ用のアドレス空間とを32ビットずつ割り当てる。すなわち、例えば、ターゲット1用アドレス領域311は、図8に示されるように、10000h乃至17FFFhの32KBのターゲット1のレジスタ空間314と、18000h乃至1FFFFhの32KBのターゲット1のローカルメモリ空間315とにより構成される。他のターゲット用アドレス領域(例えば、ターゲット2用アドレス領域312やターゲット3用アドレス領域313等)も同様であり、それぞれレジスタ空間とローカルメモリ空間により構成される。
In FIG. 8, the PCI
以上のようなコンフィギュレーション処理を行うと、CPU141のPCIコンフィギュレーション処理部201は、図7において、ステップS1のコンフィギュレーション処理を終了しステップS2に処理を進める。
When the configuration processing as described above is performed, the PCI
ステップS2において、アドレス設定部202は、上述したようにコンフィギュレーション処理により各PCIデバイス111に割り当てられたメモリ空間を用いて、各PCIデバイスのレイテンシ値設定用アクセス先アドレスを、アドレスAおよびアドレスBの2つずつ設定する。
In step S2, the
後述するように、レイテンシ値設定の際の計測処理において、イニシエータ113は、同じターゲット114に対して、通常複数回アクセスを繰り返す。これに対して、ターゲット114は、キャッシュメモリ122にデータが格納されたか否かを判断して、データ転送の準備が整ったか否かを判定する。通常、キャッシュメモリ122は、数クロック(例えば6クロック)データを保持した後、それを破棄する。従って、アドレス設定部202が1つのターゲット114に対して、1つのアドレスのみをレイテンシ値設定用アクセス先アドレスとして設定し、イニシエータ113が同じターゲット114の同じアドレスに対して連続してアクセスを繰り返すようにすると、そのアクセスの間隔が狭くなると、ターゲット114が、キャッシュメモリ122が正しいデータに更新されていないのに(古いデータのまま)、データ転送の準備が整ったと判断し、その古いデータ(誤ったデータ)をイニシエータ113に転送してしまう恐れがある。
As will be described later, in the measurement process for setting the latency value, the
そこで、キャッシュメモリ122の更新サイクルに対して、イニシエータ113による同じアドレスへのアクセスの間隔が短くなり過ぎないように、アドレス設定部202は、2つのアドレスをレイテンシ値設定用アクセス先アドレスとして設定する。
Therefore, the
例えば、図8の場合、アドレス設定部202は、ターゲット1のレイテンシ値設定用アクセス先アドレスとして、ターゲット1用アドレス領域311のターゲット1のローカルメモリ空間315よりアドレスA221として18000h番地を設定し、アドレスB222として1C000h番地を設定する。なお、この2つのアドレス(アドレスA221およびアドレスB222)は、各アドレスが互いに異なるデータ転送に対するデータを示すように、ある程度(例えば512ワード)互いに離れたアドレスであれば、ターゲット1のローカルメモリ空間315のどのアドレスであってもよい。
For example, in the case of FIG. 8, the
アドレス設定部202は、ターゲット2やターゲット3等に対してもターゲット1の場合と同様にしてレイテンシ値設定用アクセス先アドレスを設定していき、全てのターゲットに対してレイテンシ値設定用アクセス先アドレスを設定する。全てのターゲットのレイテンシ値設定用アクセス先アドレスを設定すると、アドレス設定部202は、ステップS3に処理を進める。
The
ステップS3において、CPU141のマスタ特定部203は、PCIコンフィギュレーション処理部201によるコンフィギュレーション処理結果に基づいて、PCIバス110に接続されたPCIデバイス111の中から、PCIデータ転送のマスタとなり得るマスタデバイスを特定し、処理をステップS4に移行する。CPU141のレイテンシ値設定制御部152は、ステップS4において、このマスタ特定部203により特定されたマスタデバイスのそれぞれに対して、レイテンシ値設定処理を行わせるように制御する。各マスタデバイスに対するレイテンシ値設定制御処理については、図8のフローチャートを参照して後述する。
In step S <b> 3, the
レイテンシ値設定制御処理を終了したレイテンシ値設定制御部152は、リセット処理を終了する。リセット処理が終了すると、PCIバス110に接続された各PCIデバイス111は、必要に応じてPCIデータ転送112の処理を開始する。
After completing the latency value setting control process, the latency value setting
次に、図7のステップS4において実行されるレイテンシ値設定制御処理について図9のフローチャートを参照して説明する。図9のフローチャートは、マスタデバイスの内の1つであるイニシエータ113に対する処理である。
Next, the latency value setting control process executed in step S4 of FIG. 7 will be described with reference to the flowchart of FIG. The flowchart of FIG. 9 is a process for the
レイテンシ値設定制御処理が開始されると、レイテンシ値設定制御部152の初期アウェイ値設定部204は、ステップS21において、内部に保持している初期アウェイ値211を、ホストPCIブリッジ151を介してイニシエータ113に供給し、この値をレジスタ(初期アウェイ値レジスタ274)にセットさせる。初期アウェイ値211は、予め定められた値であり、後述するようにアウェイタイマ値285(レイテンシ値283)の最大値となる。
When the latency value setting control process is started, the initial away
初期アウェイ値211を供給した初期アウェイ値設定部204は、処理をステップS22に進める。ステップS22において、レイテンシ値設定制御部152のアドレスセット処理部205は、レイテンシ値設定用アクセス先アドレス保持部207に保持されているレイテンシ値設定用アクセス先アドレス213の中から、イニシエータ113に対応する(イニシエータ113がデータ転送を行うことが可能な)各ターゲット114のレイテンシ値設定用アクセス先アドレスを、ホストPCIブリッジ151を介してイニシエータ113に供給し、これらの値(アドレスA221およびアドレスB222)をレジスタ(レイテンシ値設定用アクセス先アドレスレジスタA271またはレイテンシ値設定用アクセス先アドレスB272の内、各アドレスが対応する方のレジスタ)にセットさせる。
The initial away
レイテンシ値設定用アクセス先アドレスを供給したアドレス設定部205は、ステップS23に処理を進める。ステップS23において、計測処理実行制御部206は、処理を行うマスタデバイスを選択するための変数iの値を「0」初期値としてにセットする。なおこのとき計測処理実行制御部206は、予め定められた整数の初期値であれば、どのような値であってもよい。
The
変数iをセットすると、計測処理実行制御部206は、ステップS24において、ホストPCIブリッジ151を介して、イニシエータ113にアクセスし、イニシエータ113に対応するターゲット114の内、i番目のターゲット114に対する計測処理の実行を開始させる。
When the variable i is set, the measurement process
計測処理を開始させると計測処理実行制御部206は、ステップS25において、完了フラグ212を監視し、完了フラグが212がアサートされたか否かを判定し、イニシエータ113が計測処理を終了して完了フラグ212をアサートさせるまで待機する。なお、計測処理の実行を開始させてから予め定められた所定の時間が経過しても完了フラグ212がアサートされない場合、計測処理実行制御部206は、レイテンシ値設定制御処理を強制終了させるようにしてももちろんよい。
When the measurement process is started, the measurement process
以上のように待機し、ステップS25において、イニシエータ113が完了フラグ212をアサートすると、計測処理実行制御部206は、ステップS26に処理を進め、変数iをインクリメントし、ステップS27において、変数iの値がイニシエータ113に対応するターゲット114の数より大きいか否かを判定する。変数iの値がターゲット数より大きくないと判定した場合、すなわち、未処理のターゲットが存在する場合、計測処理実行制御部206は、ステップS24に処理を戻し、それ以降の処理を繰り返す。
When the
すなわち、計測処理実行制御部206は、ステップS24乃至ステップS27の処理を繰り返すことにより、イニシエータ113が、イニシエータ113に対応する全てのターゲットに対して計測処理を行うように制御する。そして、ステップS27において、変数iの値がターゲット数より大きいと判定した場合、すなわち、イニシエータ113が、イニシエータ113に対応する全てのターゲットに対して計測処理を行ったと判定した場合、計測処理実行制御部206は、レイテンシ値設定制御処理を終了する。
That is, the measurement process
以上のようにして、CPU141のレイテンシ値設定制御部152は、コンフィギュレーション処理の後、レイテンシ値設定制御処理を実行する。なお、レイテンシ値設定制御部152は、図9のフローチャートを参照して説明したようなレイテンシ値設定制御処理を各マスタデバイスに対して実行する。すなわち、レイテンシ値設定制御部152は、PCIバス110に接続された全てのPCIデバイス111によるPCIデータ転送に対してレイテンシ値を算出するように制御する。
As described above, the latency value setting
このようにすることにより、各マスタデバイスは、どのターゲットに対してもそれぞれ待機時間として最適な最適待機時間(レイテンシ値)を設定することができ、その最適な待機時間を利用することにより、PCIバス110の不要なトラフィック(リード要求の繰り返しによるトランザクション)の発生を抑制し、各PCIデバイス111がPCIバス110を有効に利用することができる。
In this way, each master device can set an optimum optimum waiting time (latency value) as a waiting time for each target, and by using the optimum waiting time, PCI Occurrence of unnecessary traffic (transaction due to repeated read requests) on the
次に、以上のようにCPU141のレイテンシ値設定制御部152に制御されて実行する、イニシエータ113によるレイテンシ値の設定に関する処理について説明する。PCIデバイス111であるイニシエータ113に電源が投入され、コンフィギュレーション処理が行われると、イニシエータ113のデバイス制御部252は、イニシエータ113の各部を制御し、レイテンシ値設定処理を開始する。図10のフローチャートを参照して、レイテンシ値設定処理を説明する。
Next, processing related to setting of a latency value by the
レイテンシ値設定処理が開始されると、初期アウェイ値セット処理部253は、ステップS41において、CPU141の初期アウェイ値設定部204より初期アウェイ値211が供給されたか否かを判定する。PCIインタフェース処理部251を介して初期アウェイ値211が供給されたと判定した場合、初期アウェイ値セット処理部253は、ステップS42に処理を進め、供給された初期アウェイ値211を初期アウェイ値レジスタ274にセットする(初期アウェイ値284)。
When the latency value setting process is started, the initial away value set
初期アウェイ値211(初期アウェイ値284)をセットした初期アウェイ値セット処理部253は、ステップS43に処理を進める。また、ステップS41において、初期アウェイ値211が供給されていないと判定した場合、初期アウェイ値セット処理部253は、ステップS42の処理を省略し、ステップS43に処理を進める。
The initial away value set
ステップS43において、アドレスセット処理部254は、CPU141のアドレスセット処理部205よりレイテンシ値設定用アクセス先アドレス(アドレスA221およびアドレスB222)が供給されたか否かを判定する。レイテンシ値設定用アクセス先アドレスが供給されたと判定した場合、アドレスセット処理部254は、処理をステップS44に進め、その供給されたアドレスが対応するターゲットのレジスタ空間261にある、レイテンシ値設定用アクセス先アドレスレジスタA271に、供給されたアドレスA221をセットし、レイテンシ値設定用アクセス先アドレスレジスタB272に、供給されたアドレスB222をセットする。
In step S43, the address set
アドレスをセットしたアドレスセット処理部254は、処理をステップS45に進める。なお、ステップS43において、アドレスセット処理部205よりレイテンシ値設定用アクセス先アドレスが供給されていないと判定した場合、アドレスセット処理部254は、処理をステップS44の処理を省略し、ステップS45に処理を進める。
The address set
ステップS45において、計測処理部131は、CPU141の計測処理実行制御部206より計測処理の開始が指示されたか否かをか否かを判定する。計測処理の開始が指示されたと判定した場合、計測処理部131は、処理をステップS46に進め、計測処理の開始指示とともに指示されたターゲットに対して計測処理を実行する。計測処理の詳細については、図11乃至図13のフローチャートを参照して後述する。
In step S <b> 45, the
ステップS46の計測処理を終了した計測処理部131は、ステップS47に処理を進める。また、ステップS45において、計測処理の開始が指示されていないと判定した場合、計測処理部131は、ステップS46の処理を省略し、ステップS47に処理を進める。
After completing the measurement process in step S46, the
ステップS47において、デバイス制御部252は、レイテンシ値設定処理を終了するか否かを判定し、終了しないと判定した場合、処理をステップS41に戻し、それ以降の処理を繰り返す。また、ステップS47において、例えば、全てのレイテンシ値の設定が終了し、通常モードに移行する場合や電源をオフする場合等において、レイテンシ値設定処理を終了すると判定した場合、デバイス制御部252は、レイテンシ値設定処理を終了する。 In step S47, the device control unit 252 determines whether to end the latency value setting process. If it is determined not to end the process, the device control unit 252 returns the process to step S41 and repeats the subsequent processes. In step S47, for example, when all the latency values have been set and it is determined that the latency value setting process is to be ended when the mode is shifted to the normal mode or the power is turned off, the device control unit 252 The latency value setting process is terminated.
次に、図10のステップS46において実行される計測処理の詳細を、図11乃至図13のフローチャートを参照して説明する。 Next, details of the measurement process executed in step S46 of FIG. 10 will be described with reference to the flowcharts of FIGS.
計測処理を開始した計測処理部131は、最初に、図11のステップS61において、初期アウェイ値レジスタ274の値である初期アウェイ値284を読み出して、それをアウェイタイマ値レジスタ275にセットする(アウェイタイマ値285)。そして、計測処理部131は、ステップS62において、計測処理実行制御部206により指定されたターゲット114に対応するターゲット別レジスタ空間261のレイテンシ値設定用アクセス先アドレスA271にセットされているアドレスA221を読み出し、そのターゲットのアドレスA221に対してリード要求を行う。
The
リード要求を行った計測処理部131は、ステップS63において、そのリード要求の応答として、データを取得したか否かを判定する。データを取得していないと判定した計測処理部131は、ステップS64に処理を進め、リード要求の応答としてリトライを取得したか否かを判定する。リトライもデータも取得していない、すなわち、リード要求の応答を取得していないと判定した場合、計測処理部131は、処理をステップS63に戻し、それ以降の処理を繰り返す。
In step S63, the
ステップS64においてリトライ処理を取得したと判定した場合、計測処理部131は、アウェイタイマ値レジスタ275にセットされたアウェイタイマ値285(待機するクロック数)をアウェイタイマ255に供給する。アウェイタイマ値285を供給されたアウェイタイマ255は、ステップS65において、供給されたアウェイタイマ値285分のクロックをカウントする。計測処理部131は、アウェイタイマ285よりカウント終了が通知されるまで待機する。
If it is determined in step S64 that the retry process has been acquired, the
アウェイタイマ255によるカウントが終了すると、アウェイタイマ255は、カウント終了を計測処理部131に通知する。カウント終了が通知されると計測処理部131は、ステップS66に処理を進め、計測処理実行制御部206により指定されたターゲット114に対応するターゲット別レジスタ空間261のレイテンシ値設定用アクセス先アドレスA271にセットされているアドレスA221に対して再度リード要求を行う。
When the count by the away
再度、リード要求を行った計測処理部131は、ステップS67において、そのリード要求の応答として、リトライを取得したか否かを判定する。ターゲット114よりリトライを取得していないと判定した計測処理部131は、ステップS68に処理を進め、リード要求の応答として要求したデータを取得したか否かを判定する。リトライもデータも取得していない、すなわち、リード要求の応答を取得していないと判定した場合、計測処理部131は、処理をステップS67に戻し、それ以降の処理を繰り返す。
In step S67, the
ステップS68においてリード要求の応答として要求したデータを取得したと判定した場合、計測処理部131は、ステップS69において、アウェイタイマ値レジスタ275にセットされているアウェイタイマ値285(待機するクロック数)の値を1回分(予め設定されているクロック数分)ディクリースする。アウェイタイマ値285をディクリースした計測処理部131は、図12のステップS81に処理を進める。
If it is determined in step S68 that the requested data has been acquired as a response to the read request, the
図12のステップS81において、計測処理部131は、待機時間の計測を同じアドレスに対して連続して行わないように、今度は、計測処理実行制御部206により指定されたターゲット114に対応するターゲット別レジスタ空間261のレイテンシ値設定用アクセス先アドレスB272にセットされているアドレスB222を読み出し、そのターゲットのアドレスB222に対してリード要求を行う。
In step S81 in FIG. 12, the
リード要求を行った計測処理部131は、アドレスA221の場合と同様に、ステップS82において、そのリード要求の応答としてデータを取得したか否かを判定し、データを取得していないと判定した場合、ステップS83に処理を進め、リード要求の応答としてリトライを取得したか否かを判定する。リトライもデータも取得していない、すなわち、リード要求の応答を取得していないと判定した場合、計測処理部131は、ステップS82に処理を戻し、それ以降の処理を繰り返す。
When the
ステップS83においてリトライ処理を取得したと判定した場合、計測処理部131は、アドレスA221の場合と同様に、アウェイタイマ値レジスタ275にセットされたアウェイタイマ値285(待機するクロック数)をアウェイタイマ255に供給する。このアウェイタイマ値285は、図11のステップS69においてディクリースされたアウェイタイマ値である。アウェイタイマ255は、図12のステップS84において、供給されたアウェイタイマ値285分のクロックをカウントする。計測処理部131は、アウェイタイマ285よりカウント終了が通知されるまでの間待機する。
If it is determined in step S83 that the retry process has been acquired, the
アウェイタイマ255によるカウントが終了すると、アウェイタイマ255は、カウント終了を計測処理部131に通知する。カウント終了が通知されると計測処理部131は、ステップS85に処理を進め、計測処理実行制御部206により指定されたターゲット114に対応するターゲット別レジスタ空間261のレイテンシ値設定用アクセス先アドレスB272にセットされているアドレスB222に対して再度リード要求を行う。
When the count by the away
再度、リード要求を行った計測処理部131は、アドレスA221の場合と同様に、ステップS86において、そのリード要求の応答としてリトライを取得したか否かを判定し、ターゲット114よりリトライを取得していないと判定した場合、ステップS87に処理を進め、リード要求の応答として要求したデータを取得したか否かを判定する。リトライもデータも取得していない、すなわち、リード要求の応答を取得していないと判定した場合、計測処理部131は、処理をステップS86に戻し、それ以降の処理を繰り返す。
The
ステップS87においてリード要求の応答として要求したデータを取得したと判定した場合、計測処理部131は、ステップS88において、アウェイタイマ値レジスタ275にセットされているアウェイタイマ値285(待機するクロック数)の値を1回分(予め設定されているクロック数分)ディクリースし、図11のステップS62に処理を戻し、それ以降の処理を繰り返す。
If it is determined in step S87 that the requested data has been acquired as a response to the read request, the
以上のように、計測処理部131は、図11のステップS62乃至ステップS69、並びに、図12のステップS81乃至ステップS88の処理を繰り返して、アウェイタイマ値レジスタ275に保持されているアウェイタイマ値285を減少させることにより、リトライ検出後に待機する時間を減少させていく。
As described above, the
以上のような処理を繰り返してアウェイタイマ値285が減少すると、待機時間が、ターゲットがデータ転送の準備を整えるのに必要な時間より短くなる。その場合、計測処理部131は、待機後に再度行ったリード要求に対する応答としてリトライを検出することになる。そのような場合、計測処理部131は、リトライを検出した時の処理の、1回前の処理におけるアウェイタイマ値285が最適な待機時間(ターゲット114がデータ転送の準備を整えるまでの時間よりも長く、かつ、最も短い待機時間)とし、その値をレイテンシ値283として、そのターゲットに対応するターゲット別対応レジスタ261のレイテンシ値レジスタ273に保存する。
If the away timer value 285 is decreased by repeating the above processing, the waiting time becomes shorter than the time required for the target to prepare for data transfer. In that case, the
すなわち、図11のステップS67または図12のステップS86において、リード要求の応答としてリトライを取得したと判定した場合、計測処理部131は、処理を図13のステップS91に進め、アウェイタイマ値285を1回分(1回にディクリースされるクロック数分)インクリメントし、ステップS92において、そのインクリメントされたアウェイタイマ値285をレイテンシ値283として処理を行ったターゲット用のレイテンシ値レジスタ273にセットする。レイテンシ値283をセットした計測処理部131は、ステップS93に処理を進め、CPU141の計測処理実行制御部206が有する完了フラグ212をアサートし、ステップS94において不要なレジスタの値をリセットする等して終了処理を行い、計測処理を終了する。
That is, if it is determined in step S67 in FIG. 11 or step S86 in FIG. 12 that a retry has been acquired as a response to the read request, the
なお、マスタデバイス待機時間として理想的な待機時間は、ターゲット114がデータ転送の準備を整えるまでの時間(と同じ長さの時間)である。しかしながら、実際には、マスタデバイス待機時間をターゲット114がデータ転送の準備を整えるまでの時間と全く同じ長さの時間に設定することは困難である。また、それらの長さを、各部の同期単位であるシステムクロック上において同一の長さに設定することも可能ではあるが、実際にそこまで細かく調整すると計測処理の負荷や計測処理の処理時間が増大する恐れもある。従って、装置の能力に応じて、実用上可能な処理単位として、複数クロック単位で待機時間を制御するようにし、その制御単位上において、ターゲット114がデータ転送の準備を整えるまでの時間よりも長く、かつ、最も短い待機時間を最適な待機時間とするようにするのが望ましい。
Note that the ideal standby time as the master device standby time is the time until the
また、図11のステップS63において、リード要求に対する応答として要求したデータを取得したと判定した場合、すなわち、イニシエータ113が発行した最初のリード要求に対してターゲット114がすぐに応答した場合、そのターゲット114が本当に待機時間を必要としないことも考えられるが、ターゲット114のキャッシュメモリ122に保持されている古いデータが間違えて転送された可能性も考えられる。
If it is determined in step S63 in FIG. 11 that the requested data has been acquired as a response to the read request, that is, if the
そこで、計測処理部131は、そのような場合、図11のステップS70に処理を進め、アドレスB222に対する計測処理においても待機せずにデータを取得したか否かを判定する。計測処理部131は、上述したように、アドレスA221に対するリード要求による計測処理とアドレスB222に対するリード要求による計測処理とを交互に繰り返すことにより、キャッシュメモリ122に残された古いデータによるデータ転送を抑制するように処理を行っている。従って、計測処理部131は、このように待機時間無しに1回目のリード要求に対してすぐにデータが返された場合、アドレスA221に対するリード要求と、アドレスB222に対するリード要求の両方において、すぐにデータが返されるか否かを確認し、2つのアドレスのいずれに対するリード要求においてもデータが返される場合、そのターゲット114が本当に待機時間を必要としないものであると判定する。
Therefore, in such a case, the
すなわち、計測処理部131は、上述したように、ステップS70において、アドレスB222に対する計測処理においても待機せずにデータを取得したか否かを判定し、アドレスB222に対する計測処理を行っていない、または、アドレスB222に対する計測処理においてはリトライが検出されたと判定した場合、処理を図12のステップS81に進め、アドレスB222に対するリード要求による計測処理に移行させる。
That is, as described above, the
図11のステップS70において、アドレスB222に対する計測処理においても待機せずにデータを取得した、すなわち、アドレスA221およびアドレスB222の両方に対する計測処理において待機せずにデータを取得したと判定した場合、計測処理部131は、処理を図13のステップS95に進め、値「0」をレイテンシ値283として、処理を行ったターゲット用のレイテンシ値レジスタ273にセットし、ステップS93に処理を進め、CPU141の計測処理実行制御部206が有する完了フラグ212をアサートし、ステップS94において不要なレジスタの値をリセットする等して終了処理を行い、計測処理を終了する。
If it is determined in step S70 in FIG. 11 that data has been acquired without waiting even in the measurement process for address B222, that is, it is determined that data has been acquired without waiting in the measurement process for both address A221 and address B222. The
なお、以上の処理は、アドレスBに対するリード要求を行っている場合も同様である。すなわち、計測処理部131は、図12のステップS82において、待機時間を経ていない最初のリード要求に対してデータを取得したと判定すると、図12のステップS89に処理を進め、アドレスA221に対する計測処理においても待機せずにデータを取得したか否かを判定し、アドレスA221に対する計測処理を行っていない、または、アドレスA221に対する計測処理においてはリトライが検出されたと判定した場合、処理を図11のステップS62に進め、アドレスA221に対するリード要求による計測処理に移行させる。
The above processing is the same when a read request for address B is made. That is, if the
図12のステップS89において、アドレスA221に対する計測処理においても待機せずにデータを取得した、すなわち、アドレスA221およびアドレスB222の両方に対する計測処理において待機せずにデータを取得したと判定した場合、計測処理部131は、処理を図13のステップS95に進め、値「0」をレイテンシ値283として、処理を行ったターゲット用のレイテンシ値レジスタ273にセットし、ステップS93に処理を進め、CPU141の計測処理実行制御部206が有する完了フラグ212をアサートし、ステップS94において不要なレジスタの値をリセットする等して終了処理を行い、計測処理を終了する。
If it is determined in step S89 in FIG. 12 that data has been acquired without waiting even in the measurement process for address A221, that is, it is determined that data has been acquired without waiting in the measurement process for both address A221 and address B222. The
以上のように計測処理部131が計測処理を行うので、イニシエータ113は、以降のデータ転送処理(通常のPCIデータ転送処理)において、設定されたレイテンシ値283を用いることにより、PCIバス110に不要なトラフィック(本来不要なリード要求の繰り返しによるトランザクション)を発生させずに、かつ、イニシエータ113自身も、データ転送の効率を低下させずに、データ転送を行うことができる。従って、PCIバス110に接続された各PCIデバイス111は、より有効に活用することができる。
Since the
次に、以上の計測処理の具体的な例について、図14乃至図19の図を参照して説明する。 Next, a specific example of the above measurement process will be described with reference to FIGS.
図14に示されるように、PCIバス11の使用権を与えられたイニシエータ113は、まず、ターゲット114に対するリード要求321−1を発行し、それを、PCIバス110を介してターゲット114に供給する(矢印322−1および矢印324−1)。
As shown in FIG. 14, the
図15は、リードサイクルにおけるPCIバス110の主な信号状態の遷移の例を示す図である。なお、図15において、図中左の信号名に記号「#」が付加された信号は、負論理であることを示している。リードサイクルの場合、イニシエータ113は、図示せぬリクエスト(REQ#)をアサートしてアービタにバスの使用権を要求する。アービタがこの要求に対してグラント(GNT#)をアサートすることによりイニシエータ113は、PCIバス110の使用権を得ることができ、トランザクションを開始することができる。
FIG. 15 is a diagram illustrating an example of main signal state transitions of the
このようにして、PCIバス110の使用権を獲得したイニシエータ113は、図15に示されるように、まず、クロック(CLK)1のタイミングでフレーム(FRAME#)とイニシエータレディ(IRDY#)をサンプルし、いずれもディアサート状態であるので、PCIバス110がアイドルステート(解放状態)であり、新規にバスサイクルを開始可能であると判断し、フレーム(FRAME#)をアサートし、バスサイクルの開始を通知する。
In this way, the
また、イニシエータ113は、このクロック(CLK)1のタイミングで、アドレス/データバス(AD[31:00])にアドレス(例えば、ターゲット114のアクセス先アドレスA221)を出力し、バスコマンド/バイトイネーブル(C/BE[3:0]#)にバスコマンドを供給する。この場合、メモリリード要求であるので、イニシエータ113は、バスコマンド/バイトイネーブル(C/BE[3:0]#)の各線に”L”,”H”,”H”,”L”をドライブする。
Further, the
以上のようにして、図14に示されるように、PCIバス110にはトランザクション323−1が生じる。矢印24−1のようにリード要求が供給されるとターゲット15は、応答処理25−1を行う。
As described above, the transaction 323-1 occurs on the
図15において、全てのターゲットデバイス(PCIバス110に接続されている全てのPCIデバイス111)は、クロック(CLK)2のタイミングでフレーム(FRAME#)、アドレス/データバス(AD[31:00])、およびバスコマンド/バイトイネーブル(C/BE[3:0]#)をラッチし、新しいバスサイクルが開始され、現在がアドレスフェーズであることを把握し、アドレス/データバス(AD[31:00])の情報をデコードすることにより、自分がアクセス先のターゲットであるか否かを判定する。 In FIG. 15, all target devices (all PCI devices 111 connected to the PCI bus 110) have a frame (FRAME #) and an address / data bus (AD [31:00]) at the timing of the clock (CLK) 2. ), And bus command / byte enable (C / BE [3: 0] #), knows that a new bus cycle has started and is now in the address phase, and the address / data bus (AD [31: 00]) is decoded to determine whether or not the user is the access target.
自分がアクセスされるターゲットであると判定したターゲット114は、クロック(CLK)2のタイミングで、デバイスセレクション(DEVSEL#)をアサートし、このバスサイクルに応答することを通知する。このとき、イニシエータ113は、アドレス/データバス(AD[31:00])およびバスコマンド/バイトイネーブル(C/BE[3:0]#)の状態をデータフェーズに移行する。
The
そして、ターゲット114は、図14の矢印326−1のように、ローカルバス120を介してローカルメモリ121にアクセスし、要求されたアドレスのデータを取得してキャッシュメモリ122に蓄積させる処理を開始する。このとき、キャッシュメモリ122のデータ(キャッシュデータ)は、要求されたデータではない無効データ327であり、データ転送の準備が整っていないので、ターゲット114は、イニシエータ113に対して、このキャッシュデータを供給せずに(ターゲットレディ(TRDY#)をアサートせずに)、リトライ処理を返す(矢印328−1および矢印329−1)。イニシエータ113は、このように供給されたリトライ330−1を検出すると、PCIバス110を不要に占有しないように、一旦、PCIバス110を解放する。
Then, the
図16は、ターゲット114がリトライ処理を返す際の、各信号における状態遷移の様子の例を示す図である。
FIG. 16 is a diagram illustrating an example of a state transition in each signal when the
リトライ処理を返す場合、ターゲット114は、デバイスセレクション(DEVSEL#)をアサートしたまま、ストップ(STOP#)をアサートする。ストップ(STOP#)のアサートを確認すると、イニシエータ113は、フレーム(FRAME#)をディアサートし、さらに、図示せぬリクエスト(REQ#)もディアサートし、PCIバス110を一旦解放する。ターゲット114は、フレーム(FRAME#)がディアサートされたことを確認すると、ストップ(STOP#)およびデバイスセレクション(DEVSEL#)をディアサートする。また、これに伴い、イニシエータ113は、イニシエータレディ(IRDY#)もディアサートする。
When returning the retry process, the
図14に戻り、リトライ処理を検出し、バスを解放したイニシエータ113の計測処理部131は、アウェイタイマ255を用いて、アウェイタイマ値285分のクロックをカウントさせ(カウント処理351)、アウェイタイマ255よりカウント終了が通知されるまで待機する。すなわち、イニシエータ113は、図14に示されるように、時刻T1から時刻T3までの区間(区間341)において、リード要求を行わずに待機する。
Returning to FIG. 14, when the retry processing is detected and the bus is released, the
この間も、ターゲット114においては、先のリード要求321−1に対するデータ転送処理の準備が続けられ、キャッシュメモリ122には、ローカルメモリ121より読み出されたデータが蓄積される。そして、時刻T2において、リード要求321−1において要求されたデータのキャッシュメモリ122への蓄積処理が完了し、キャッシュメモリ122のデータが有効データ332になる。
During this time, the
イニシエータ113において、アウェイタイマ255がカウント処理351を終了し、計測処理部131にカウント終了を通知すると、イニシエータ113は、再度、バスの使用権を再度確保し、同じアドレス(例えば、アドレスA221)に対してリード要求321−2を発行する(すなわち、同じデータを要求する)。このリード要求321−2は、リード要求321−1の場合と同様に、PCIバス110を介してターゲット114に供給される(矢印322−2および矢印324−2)。これによりPCIバス110にはトランザクション323−2が生じる。
In the
ターゲット114は、このリード要求321−2に対して応答処理325−2を行い、矢印326−1のようにキャッシュメモリ122にアクセスするが、この時点で、キャッシュメモリ122に有効データ332が蓄積されているので、矢印333のように有効データ332をイニシエータ113に供給させる。有効データ332は、矢印333および矢印335のように、PCIバス110を介して(トランザクション334)、イニシエータ113に供給される。イニシエータ113は、このように供給された有効データ336を取得する。
The
図15の場合、ターゲット114は、リード要求に対してデータ転送の準備が整うと、クロック(CLK)3のタイミングのように、ターゲットレディ(TRDY#)をアサートし、アドレス/データバス(AD[31:00])にキャッシュメモリ121のデータを出力する。イニシエータ113は、このアドレス/データバス(AD[31:00])の値を読み取ることにより、要求したデータを取得することができる。以上のようにして、データ転送を完了したイニシエータ113およびターゲット114は、各信号をディアサートし、バスサイクルを終了し、PCIバス110を解放する。
In the case of FIG. 15, when the
以上が1つのアドレスに対する1回分の処理(図11のステップS62乃至ステップS68に対応する処理)である。通常のデータ転送時に、このように、イニシエータ113がリトライ検出後にアウェイタイマ値285分のクロック数をカウントする(待機する)ことにより、このバスサイクルにおいてPCIバス110に発生するトランザクションがトランザクション323−1、323−2、および334のみになり、PCIバス110は、不要なトラフィックの発生を抑制することができる。また、区間341において、イニシエータ113がPCIバス110を解放するので、他のマスタデバイスがPCIデータ転送処理を行うこともでき、各PCIデバイス111は、より有効にPCIバス110を利用することができる。
The above is one process for one address (process corresponding to steps S62 to S68 in FIG. 11). As described above, during normal data transfer, the
ただし、図14に示されるように、イニシエータ113は、時刻T2の時点で、ターゲット114のキャッシュメモリ122に有効データ332が用意されているのに、時刻T3までリード要求を行っていない。すなわち、イニシエータ113は、時刻T2から時刻T3までの間、不要に待機していることになる。従って、このアウェイタイマ値285では、待機時間が長すぎであり、イニシエータ113のデータ転送の効率が低下してしまう恐れがある。
However, as shown in FIG. 14, the
そこで、イニシエータ113の計測処理部131は、図17に示されるように、アウェイタイマ値285を1回分(予め定められたクロック数分)ディクリースし(図11のステップS69)、再度、上述したような処理を行う。すなわち、図17の場合、基本的にイニシエータ113およびターゲット114の動作は、図14乃至図16を参照して上述した場合と同様であるが、アウェイタイマ255によるカウント処理361の長さが、図14のカウント処理351の場合と比較して、予め定められたアウェイタイマ値285の減算量1回分に相当する区間361Aの分だけ短くなっている。
Therefore, as shown in FIG. 17, the
すなわち、図17の場合、イニシエータ113は、時刻T1においてカウント処理361を開始し、時刻T4においてカウント処理361が終了すると、矢印362のように、リード要求321−2を発行する。従って、イニシエータ113の、リトライ検出後の待機時間は、時刻T1から時刻T4までの区間371となる。当然、この区間371は、図14の区間341より区間361Aだけ短い。
That is, in the case of FIG. 17, the
なお、この図17に示されるリード要求は、図14の場合に要求したアドレス(例えば、アドレスA221)と、同じターゲットの異なるアドレス(例えば、アドレスB222)に対する要求である。このアクセス先アドレスは、上述したように予め設定されている。 Note that the read request shown in FIG. 17 is a request for a different address (for example, address B222) of the same target as the address (for example, address A221) requested in the case of FIG. This access destination address is set in advance as described above.
図17の場合、イニシエータ113は、図14の処理より1回分待機時間を短くしてリード要求を行ったが、この場合においても、まだ、時刻T2から時刻T4までの間、不要に待機していることになる。そこで、イニシエータ113の計測処理部131は、同様にして、アウェイタイマ値285を減算しながら、図14および図17のような処理を繰り返し行う。このとき、イニシエータ113は、2つのアクセス先アドレスであるアドレスA221およびアドレスB222に対する処理を交互に行う。
In the case of FIG. 17, the
そして、以上の処理の繰り返しにより、アウェイタイマ値285が短くなっていき、時刻T2よりも早くカウントが終了すると、図18に示されるように、待機後のリード要求に対して、イニシエータ113は、またリトライを検出する。
Then, by repeating the above processing, the away timer value 285 becomes shorter, and when the count ends earlier than time T2, the
図18の場合、図14のカウント処理351より区間381Aだけ短いカウント処理381が時刻T2より前の時刻T5において終了するので、イニシエータ113は、この時刻T5において、矢印382のようにリード要求321−2を再度発行する。従って、ターゲット114は、応答処理325−2を行う時点で、まだ、キャッシュメモリ122に有効データ331が用意されていない(データ転送の準備が整っていない)ので、矢印328−2および矢印329−2のようにリトライを返す。
In the case of FIG. 18, since the
これにより、イニシエータ113は、リトライ処理330−2を検出することになる。このように、イニシエータ113が待機する区間391の時間が時刻T1から時刻T2までの時間より短くなると、待機後のリード要求においてもイニシエータ113はリトライ処理を検出することになる。このときのアウェイタイマ値285をレイテンシ値283とすると、不要なトランザクション323−2が発生してしまうので、イニシエータ113の計測処理部131は、アウェイタイマ値285を、今までディクリースしていた1回分をインクリメントする。
As a result, the
すなわち、イニシエータ113は、図19に示されるようにリード要求を行う。図19の場合、イニシエータ113は、リトライ333−1を検出後、アウェイタイマ255を用いて、図14のカウント処理351より区間401Aだけ短く、かつ、図18のカウント処理381より区間401Bより長いカウント処理401を実行させる。そして、時刻T6において、カウント処理401が終了すると、イニシエータ113は、矢印402のように、リード要求321−2を発行する。すなわち、この場合、イニシエータ113は、時刻T1から時刻T6までの区間411の間待機し、PCIバス110を解放する。すなわち、この区間411において、他のPCIデバイス111がPCIバス110を利用することができる。
That is, the
従って、イニシエータ113は、このようにリード要求を行うことにより、リトライ検出後に、最適な待機時間でリード要求を行うことができる。そこで、イニシエータ113の検出処理部131は、この1回分インクリメントしたアウェイタイマ値285をレイテンシ値283としてレイテンシ値レジスタ273に格納する。これにより、イニシエータ113は、通常のデータ転送処理において、このレイテンシ値283を用いて処理を行うことができ、各PCIデバイス110は、PCIバス110を有効に利用することができる。
Therefore, the
図20のフローチャートを参照して、通常のメモリリード処理を説明する。 A normal memory read process will be described with reference to the flowchart of FIG.
メモリリード処理を開始した、イニシエータ113のデバイス制御部252は、ステップS101において、上述したようにフレーム(FRAME#)をアサートし、バスサイクルの開始を通知し、ステップS102において、アドレス/データバス(AD[31:00])にアドレスを出力するとともに、バスコマンド/バイトイネーブル(C/BE[3:0]#)にバスコマンドを供給することによってリードコマンドを供給する。リードコマンドを供給したデバイス制御部252は、ステップS103において、アドレス/データバス(AD[31:00])およびバスコマンド/バイトイネーブル(C/BE[3:0]#)の状態をデータフェーズに移行することにより、データ取得の準備を行う。
The device control unit 252 of the
そして、デバイス制御部252は、ステップS104において、ストップ(STOP#)を監視し、リトライを検出したか否かを判定する。ストップ(STOP#)がアサートされ、リトライを検出したと判定した場合、デバイス制御部252は、処理をステップS105に進め、フレーム(FRAME#)やリクエスト(REQ#)をディアサートし、PCIバス110を解放し、リード要求を行ったターゲット114に対応するターゲット別レジスタ空間261のレイテンシ値レジスタ273よりレイテンシ値283を読み出し、アウェイタイマ255にその時間をカウントさせ、その間待機する。アウェイタイマ255がカウント終了を出力すると、デバイス制御部252は、それを検知し、処理をステップS10に戻してそれ以降の処理を繰り返し、再度リードコマンドをターゲット114に発行する。
In step S104, the device control unit 252 monitors a stop (STOP #) and determines whether a retry is detected. When it is determined that a stop (STOP #) is asserted and a retry is detected, the device control unit 252 advances the process to step S105, deasserts a frame (FRAME #) or a request (REQ #), and the
また、ステップS104において、リードコマンドに対応するリトライを検出していないと判定した場合、デバイス制御部252は、処理をステップS107に進め、ストップ(STOP#)がディアサートの状態で、かつ、リードコマンドを出力したターゲットよりアドレス/データバス(AD[31:00])にデータが出力されたか否かを判定することにより、データの供給準備が整ったか否かを判定する。 If it is determined in step S104 that a retry corresponding to the read command has not been detected, the device control unit 252 advances the process to step S107, the stop (STOP #) is deasserted, and the read By determining whether or not data is output from the target that has output the command to the address / data bus (AD [31:00]), it is determined whether or not data supply is ready.
データの供給準備が整った(ストップ(STOP#)がディアサートの状態で、かつ、リードコマンドを出力したターゲットよりアドレス/データバス(AD[31:00])にデータが出力された)と判定した場合、デバイス制御部252は、処理をステップS108に進め、アドレス/データバス(AD[31:00])をラッチし、そのデータを取得し、ステップS109において終了処理を行った後、メモリリード処理を終了する。 Determined that data is ready to be supplied (stop (STOP #) is deasserted and data is output to the address / data bus (AD [31:00]) from the target that output the read command) In this case, the device control unit 252 advances the process to step S108, latches the address / data bus (AD [31:00]), acquires the data, performs the termination process in step S109, and then performs the memory read. The process ends.
また、ステップS107において、ストップ(STOP#)およびターゲットレディ(TRDY#)がディアサートの状態でリードコマンドに対する応答を取得していないと判定した場合、デバイス制御部252は、処理をステップS110に進め、リードコマンドに対する応答としてターゲットアボートを検出したか否かを判定する。ターゲットアボートを取得していないと判定した場合、デバイス制御部252は、処理をステップS104に戻し、それ以降の処理を繰り返す。 If it is determined in step S107 that the response to the read command has not been acquired when the stop (STOP #) and the target ready (TRDY #) are deasserted, the device control unit 252 advances the process to step S110. Then, it is determined whether a target abort has been detected as a response to the read command. If it is determined that the target abort has not been acquired, the device control unit 252 returns the process to step S104 and repeats the subsequent processes.
ステップS110において、ストップ(STOP#)がアサートされ、かつ、ターゲットレディ(TRDY#)とデバイスセレクション(DEVSEL#)がディアサートされており、ターゲットアボートを検出したと判定した場合、デバイス制御部252は、ステップS111に処理を進め、アボート処理を実行し、デバイスドライバにエラーを通知する等して、メモリリード処理を終了する。 In step S110, when it is determined that stop (STOP #) is asserted and target ready (TRDY #) and device selection (DEVSEL #) are deasserted and target abort is detected, the device control unit 252 Then, the process proceeds to step S111, the abort process is executed, the error is notified to the device driver, and the memory read process is terminated.
以上のように、メモリリード処理を行うことにより、イニシエータ113は、図19に示されるように最適な待機時間を用いてリード要求を繰り返すことができる。このように要求処理を行うことにより、イニシエータ113は、データ転送処理において余分なアクセス回数を減少させるので、PCIバス110のトラフィックを軽減させる等して、PCIバス110をより有効に活用することができる。
As described above, by performing the memory read process, the
なお、上述したように、イニシエータ113およびターゲット114は、PCIバス110に接続された任意のPCIデバイス111であり、それらによるPCIデータ転送112は、任意のPCIデバイス111間のデータ転送に適用することができる。すなわち、各マスタデバイスは、図10のフローチャートを参照して上述したレイテンシ値設定処理は、それぞれ、各ターゲットに対して行う。すなわち、レイテンシ値の設定が全て完了した時点で、PCIバス110に接続された全てのマスタデバイスは、それぞれ、全てのターゲットに対する最適なレイテンシ値を保持している。従って、PCIバス110に接続された全てのPCIデバイス111は、最適な待機時間を用いてデータ転送処理を行うことができ、PCIバス110をより有効に活用することができる。
As described above, the
また、PCIデバイス111は、PCIバス110に接続されており、PCIバス110を介して他のPCIデバイス111とデータ転送を行うものであればよく、例えば、CPU141も含まれる。従って、CPU141をイニシエータ113またはターゲット114とすることも可能である。さらに、イニシエータ113またはターゲット114として、例えば、PCI-PCIブリッジ等を介してPCIバス110に接続された他のPCIバスのPCIデバイス(いずれも図示せず)であってもよい。例えば、イニシエータ113とターゲット114が互いに異なるPCIバスに接続されている場合、イニシエータ113は、その2つのPCIバスを接続するブリッジをターゲットとして動作し、そのブリッジは、イニシエータ113に対してターゲットとして動作する。逆に、ブリッジはターゲット114に対してイニシエータのように振る舞い、ターゲット114は、ブリッジをイニシエータとした上で動作を行う。
The PCI device 111 may be any device that is connected to the
また、以上においては、PCIバス110を用いたバスシステムについて説明したが、システムバスとしては、上述したようにターゲットがイニシエータにリトライを返すバスであれば、これ以外のバスであってももちろんよい。また、そのようなバスであれば、イニシエータとターゲットが、それぞれ、ブリッジで互いに接続された、互いに異なる種類のバスに接続されているようにしてもよい。
In the above description, the bus system using the
さらに、イニシエータ113が複数のデバイスとしての機能を有している場合(多機能デバイスである場合)、イニシエータ113は、機能ごとにレイテンシ値設定処理を行うようにしてもよいし、同じターゲットに対する1つのレイテンシ値を、1つのPCIデバイス111内で共有するようにしてもよい。逆にターゲット114が複数のデバイスとしての機能を有している場合、イニシエータ113は、各機能毎に、レイテンシ値を計測してもよいし、1つの機能についてのみ計測し、その結果得られたレイテンシ値を、そのターゲットの全ての機能について適用するようにしてももちろんよい。
Furthermore, when the
なお、以上においては、イニシエータ113は、メモリリード処理を用いて計測処理を行い、最適なレイテンシ値283を決定するように説明したが、これに限らず、メモリライト処理、I/Oリード処理、またはI/Oライト処理等のように他の処理であってももちろんよい。例えば、イニシエータ113が、ターゲット114の機能に応じて、ターゲット114に対して実際に行う処理を選択し、その処理を繰り返す際の待機時間を、上述したように計測し、レイテンシ値283を決定するようにしてもよい。
In the above description, the
また、図11乃至図13のフローチャートに示されるように、イニシエータ113は、2つのアドレス(例えば、アドレスA221およびアドレスB222)に対してリード要求を交互に繰り返すように説明したが、このアクセス先アドレスの数は、1つであっても複数であってもよい。ただし、アクセス先アドレスが1つである場合、イニシエータ113は、ターゲット114のキャッシュメモリ122が保持するデータが確実にクリアされるまで待機する必要がある。
Further, as illustrated in the flowcharts of FIGS. 11 to 13, the
以上においては、全てのPCIデバイス111が上述した処理に対応しているように説明したが、これに限らず、PCIデバイス111の内、一部のマスタデバイスのみが、図6に示されるような計測処理部131を有し、図10のフローチャートを参照して説明したレイテンシ値設定処理や図11乃至図13のフローチャートを参照して説明した計測処理を実行可能であるようにしてもよい。その場合、CPU141は、図7(リセット処理)のステップS3において、レイテンシ値の設定を行うことができるマスタデバイスを特定し、ステップS4において、それらの特定されたマスタデバイスについてのみ制御するようにレイテンシ値設定制御処理を実行する。なお、この場合、マスタ特定部203が、各マスタデバイスについて、レイテンシ値の設定可能であるか否かを判定する方法として、例えば、レイテンシ値設定可能なマスタデバイスのコンフィギュレーションレジスタ等にその情報が予め格納されているようにする方法がある。マスタ特定部203は、図7のステップS3において、コンフィギュレーションレジスタに格納されたその情報を参照することにより、レイテンシ値を設定可能であるか否かを判定する。
In the above, it has been described that all the PCI devices 111 correspond to the above-described processing. However, the present invention is not limited to this, and only some master devices of the PCI devices 111 are as shown in FIG. The
また、以上においては、PCIバス110のリセット時にレイテンシ値の設定処理が行われるように説明したが、これ以外にも、例えば、CPU141が常にPCIバス110の状態を監視し、不要なトランザクション(リトライによるトランザクション)の多発を検知し、その場合、そのPCIデバイスのレイテンシ値を再設定するようにしてもよい。
In the above description, the latency value setting process is performed when the
その場合のCPU141の内部の構成例を図21に示す。なお、図5の場合と同様の構成のブロックについては同じ符号が付されている。すなわち、CPU141は、図5の場合の構成の他に、リトライによるトランザクションを監視するリトライ監視部421を有している。
An example of the internal configuration of the
リトライ監視部421は、ホストPCIブリッジ151を介して、PCIバス110を介して行われる各PCIデータ転送を監視し、リトライによるトランザクションを監視する。そして、リトライの数が予め定められた所定の数より多くなった場合、リトライ監視部421は、計測処理実行制御部206を制御し、そのPCIデータ転送を行ったイニシエータとターゲットとの計測処理の実行制御を開始させる。
The retry
このようなリトライ監視処理を図22のフローチャートを参照して説明する。 Such retry monitoring processing will be described with reference to the flowchart of FIG.
リトライ監視処理を開始したリトライ監視処理部421は、ステップS131においてPCIバス110を監視し、現在行われているPCIデータ転送を監視する。ステップS132において、リトライ監視処理部421は、リトライを検出したか否かを判定し、リトライを検出した場合、ステップS133に処理を進め、リトライをカウントするカウンタをカウントアップさせ、そのリトライをカウントする。
The retry
リトライをカウントしたリトライ監視部421は、ステップS134に処理を進める。また、ステップS132において、リトライを検出していないと判定した場合、リトライ監視部421は、ステップS133の処理を省略し、ステップS134に処理を進める。
The retry
ステップS134において、リトライ監視部421は、PCIデータ転送が終了したか否かを判定し、終了していないと判定した場合、処理をステップS131に戻してそれ以降の処理を繰り返し、そのPCIデータ転送に対する監視を続け、リトライを検出する度にそのリトライをカウントする。そして、ステップS134において、PCIデータ転送が終了したと判定した場合、リトライ監視部421は、ステップS135に処理を進め、カウントしたカウント値(すなわち、監視したPCIデータ転送において検出したリトライの数)が所定の数より大きいか否かを判定する。
In step S134, the retry
カウント値が所定の数より大きいと判定した場合、リトライ監視部421は、処理をステップS136に進め、計測処理実行制御部206を制御し、図9のフローチャートを参照して説明したようなレイテンシ値設定制御処理を実行させ、リトライを多数検出したPCIデータ転送を行っていたイニシエータ113にターゲット114に対する計測処理の実行を開始させる。ただし、この場合、計測処理実行制御部206は、イニシエータ113に、少なくとも、監視したPCIデータ転送の通信相手であるターゲット114についてレイテンシ値の再設定を行わせればよく、全てのターゲットに対してレイテンシ値設定処理(図10)を実行させる必要はない。
If it is determined that the count value is greater than the predetermined number, the retry
ステップS136の処理を終了したリトライ監視部421は、ステップS137に処理を進める。また、ステップS135において、リトライ監視部421は、カウント値が所定の数より大きくないと判定した場合、ステップS136の処理を省略し、ステップS137に処理を進める。
The retry
ステップS137において、リトライ監視部421は、カウント値をリセットし、ステップS138に処理を進め、リトライ監視処理を終了するか否かを判定し、終了しないと判定した場合、処理をステップS131に進め、次のPCIデータ転送に対する監視を開始する。また、ステップS138において、リトライ監視処理を終了すると判定した場合、リトライ監視部421は、リトライ監視処理を終了する。
In step S137, the retry
以上のように、リトライ監視部421が通常のPCIデータ転送時に、各PCIデータ転送におけるリトライ数をカウントし、リトライ数が多すぎる場合は、計測処理実行制御部206を制御し、イニシエータ113にレイテンシ値の再設定を行わせることにより、例えば、通常のPCIデータ転送が行われている期間に、最適なレイテンシ値が変化するような場合においても、イニシエータ113は、すぐにレイテンシ値の再設定処理を行い、常に最適なレイテンシ値によりPCIデータ転送を行うことができる。
As described above, the retry
なお、以上においては、PCIバス110がリセットされると、各マスタデバイスによるレイテンシ値の設定処理が行われるように説明したが、これに限らず、例えば、マスタデバイスの一部または全部が、リセット前に使用されていたレイテンシ値を不揮発性のメモリ等に保持し、リセット後に設定処理を省略してその保持していたレイテンシ値を流用するようにしてももちろんよい。このようにすることにより、各マスタデバイスは、図10を参照して説明したようなレイテンシ値設定処理を省略することができるので、リセット処理の負荷を軽減させることができる。
In the above description, when the
また、図4においては、画像処理装置100のCPU141がホストPCIブリッジ151を内蔵するように説明したが、これに限らず、例えば、図23に示されるように、CPU141とホストPCIブリッジ151が互いに別体として構成されるようにしてももちろんよい。
In FIG. 4, the
図23において、ホストPCIバス431は、PCIバス110とホストバス440に接続されており、図4のホストPCIブリッジ151と同様の機能を有し、同様の処理を行う。図23の場合、CPU141は、図4の場合と異なりホストPCIブリッジ151を有していないが、PCIバス110側(PCIデバイス111)との通信は、ホストPCIバス431を介して行われるので、CPU141内部の各部の処理は、図4の場合と実質的に同様の処理により実現することができる。
23, the host PCI bus 431 is connected to the
また、CPU141は、ホストバス440を介して、ホストPCIバス431の他に、メインメモリ161とも接続されている。ホストバス440は、図4のホストバス160と基本的に同様のバスである。
The
図23においては、図示は省略しているが、PCIバス110のアービタやPCIコントローラは、ホストPCIブリッジ431に内蔵されている。しかしながら、これらのアービタやPCIコントローラ等がさらに、ホストPCIブリッジ431と別体に構成されるようにしてももちろんよい。
Although not shown in FIG. 23, the arbiter and PCI controller of the
なお、以上においては、レイテンシ値設定処理や計測処理を(CPU141の制御により)各マスタデバイスが行うように説明したが、これらの処理をCPU141が行うようにしてももちろんよい。その場合、CPU141は、リクエスト(REQ#)やグラント(GNT#)等のように上述した以外の信号も監視し、現在のバスサイクルを行っているPCIデバイス111を特定する必要がある。このように、CPU141が、計測処理等も行うことにより、画像処理装置100は、どのようなPCIデバイス111が接続されてもPCIバス110を有効に活用させることができる。
In the above description, the latency value setting process and the measurement process are described as being performed by each master device (by the control of the CPU 141). However, the
また、図10のフローチャートを参照して説明したレイテンシ値設定処理や図11乃至図13のフローチャートを参照して説明した計測処理において、イニシエータ113の計測処理部131は、初めにアウェイタイマ値285(レイテンシ値283)の最大値である初期アウェイ値211をアウェイタイマ値285の初期値とし、そこから所定の値をディクリースしながら計測に関する処理を繰り返すように説明したが、これ以外にも、例えば、アウェイタイマ値285の初期値である初期アウェイ値211がアウェイタイマ値285(レイテンシ値283)の最小値とし、イニシエータ113が、その状態から計測に関する処理を繰り返し、その度に、アウェイタイマ値に所定の値分ずつインクリースしていき、待機後にリトライが検出されなくなるまで繰り返すようにしてもよい。
In the latency value setting process described with reference to the flowchart of FIG. 10 and the measurement process described with reference to the flowcharts of FIGS. 11 to 13, the
また、イニシエータ113の計測処理部131がアウェイタイマ値285をディクリース(またはインクリース)する値が可変である(例えば、その値がディクリース(またはインクリース)を行う度に変化する)ようにしてももちろんよい。
In addition, the value by which the
また、以上においては、映像機器である画像処理装置について説明したが、上述したようなバスシステムを有する装置であれば何でもよく、例えば、パーソナルコンピュータやサーバ等の情報処理装置であってもよいし、PDAや携帯電話器等のモバイル機器であってもよいし、テレビジョン受信装置やハードディスクレコーダ等の家庭電化製品であってももちろんよい。 In the above description, the image processing apparatus which is a video device has been described. However, any apparatus having a bus system as described above may be used. For example, an information processing apparatus such as a personal computer or a server may be used. Of course, it may be a mobile device such as a PDA or a mobile phone, or a home appliance such as a television receiver or a hard disk recorder.
上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウエアにより実行させることもできる。この場合、例えば、CPU141が、ドライブ173を介してリムーバブルメディア174より読み出した、マスタデバイスが図10のフローチャートを参照して説明したレイテンシ値設定処理や、図11乃至図13のフローチャートを参照して説明した計測処理等を実行するのに必要なプログラムやデータを、PCIバス110を介して、各マスタデバイス(PCIデバイス111の一部)に供給し、インストールするようにしてもよい。
The series of processes described above can be executed by hardware or can be executed by software. In this case, for example, the master device reads out from the
そのとき、各マスタデバイスが、そのように供給されたプログラムやデータを取得すると、それらを内蔵する不揮発性のメモリ等の記憶部に記憶し、必要に応じてそれらのプログラムを実行し、上述した処理を実行するようにしてもよい。 At that time, when each master device acquires the program and data supplied in such a manner, the master device stores them in a storage unit such as a non-volatile memory in which they are built, and executes those programs as necessary. You may make it perform a process.
このようにすることにより、例えば、上述した処理に対応していない既存のマスタデバイスも、PCIバス110に接続することにより、CPU141が必要なプログラムやデータをインストールすることができる。従って、画像処理装置100は、どのようなPCIデバイス111が接続されてもPCIバス110を有効に活用させることができる。
By doing so, for example, an existing master device that does not support the above-described processing can also install necessary programs and data by the
上述した一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、ネットワークや記録媒体からインストールされる。 When the above-described series of processing is executed by software, a program constituting the software is installed from a network or a recording medium.
この記録媒体は、例えば、図4に示されるように、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク(MD(Mini-Disk)(登録商標)を含む)、もしくは半導体メモリなどよりなるリムーバブルメディア174により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM171や、記憶部172に含まれるフラッシュメモリなどで構成される。
For example, as shown in FIG. 4, the recording medium is distributed to distribute the program to the user separately from the apparatus main body, and includes a magnetic disk (including a flexible disk) on which the program is recorded, an optical disk (
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。 In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. It also includes processes that are executed individually.
また、本明細書において、システムとは、複数のデバイス(装置)により構成される装置全体を表すものである。 Further, in this specification, the system represents the entire apparatus composed of a plurality of devices (apparatuses).
100 画像処理装置, 110 PCIバス 111 PCIデバイス, 112 PCIデータ転送, 113 イニシエータ, 114 ターゲット, 120 ローカルバス, 121 ローカルメモリ, 122 キャッシュメモリ, 131 計測処理部, 141 CPU, 151 ホストPCIブリッジ, 152 レイテンシ値設定制御部, 160 ホストバス, 161 メインメモリ, 171 ROM, 172 記憶部, 173 ドライブ, 174 リムーバブルメディア, 201 PCIコンフィギュレーション処理部, 202 アドレス設定部, 203 マスタ特定部, 204 初期アウェイ値設定部, 205 アドレスセット処理部, 206 計測処理実行制御部, 211 初期アウェイ値, 212 完了フラグ, 213 レイテンシ値設定用アクセス先アドレス, 221 アドレスA, 222 アドレスB, 251 PCIインタフェース処理部, 252 デバイス制御部, 253 初期アウェイ値セット処理部, 254 アドレスセット処理部, 255 アウェイタイマ, 261 ターゲット別レジスタ空間, 271 レイテンシ値設定用アクセス先アドレスレジスタA, 272 レイテンシ値設定用アクセス先アドレスレジスタB, 273 レイテンシ値レジスタ, 274 初期アウェイ値レジスタ, 275 アウェイタイマ値レジスタ, 283 レイテンシ値, 284 初期アウェイ値, 285 アウェイタイマ値, 421 リトライ監視部, 431 ホストPCIブリッジ, 440 ホストバス 100 image processing apparatus, 110 PCI bus, 111 PCI device, 112 PCI data transfer, 113 initiator, 114 target, 120 local bus, 121 local memory, 122 cache memory, 131 measurement processing unit, 141 CPU, 151 host PCI bridge, 152 latency Value setting control unit, 160 host bus, 161 main memory, 171 ROM, 172 storage unit, 173 drive, 174 removable media, 201 PCI configuration processing unit, 202 address setting unit, 203 master specifying unit, 204 initial away value setting unit , 205 Address set processing unit, 206 Measurement processing execution control unit, 211 Initial away value, 212 Completion flag, 213 Latency value setting action Destination address, 221 address A, 222 address B, 251 PCI interface processing unit, 252 device control unit, 253 initial away value set processing unit, 254 address set processing unit, 255 away timer, 261 target space, 271 latency value Setting access destination address register A, 272 Latency value setting access destination address register B, 273 Latency value register, 274 Initial away value register, 275 Away timer value register, 283 Latency value, 284 Initial away value, 285 Away timer value, 421 retry monitoring unit, 431 host PCI bridge, 440 host bus
Claims (21)
前記データ転送を制御して前記データ転送を行うデバイスであるマスタデバイスが、前記データ転送の開始を要求するコマンドを発行後、前記コマンドを再発行するまでの待機時間を制御し、前記マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測手段と、
前記計測手段により計測された前記マスタデバイス待機時間に対応する値を、前記マスタデバイスが前記データ転送において使用するレイテンシ値として設定するレイテンシ値設定手段と
を備えることを特徴とする情報処理装置。 In an information processing apparatus having a system bus to which a plurality of devices are connected, wherein the plurality of devices transfer data to each other via the system bus.
The master device, which is a device that controls the data transfer and performs the data transfer, controls a waiting time until the command is reissued after issuing a command requesting the start of the data transfer. Measuring means for measuring the master device standby time set as the standby time;
An information processing apparatus comprising: latency value setting means for setting a value corresponding to the master device standby time measured by the measuring means as a latency value used by the master device in the data transfer.
ことを特徴とする請求項1に記載の情報処理装置。 The measuring means controls the standby time, and as the master device standby time, a target that is a device to which the data transfer of the master device is a target until the preparation of the data transfer is completed after acquiring the command. The information processing apparatus according to claim 1, wherein time is measured.
ことを特徴とする請求項1に記載の情報処理装置。 The measuring means controls the standby time, and the master device is longer than the time from when the target of the data transfer partner device of the master device acquires the command to prepare for the data transfer The information processing apparatus according to claim 1, wherein the waiting time is measured.
ことを特徴とする請求項3に記載の情報処理装置。 The said measurement means controls the said waiting time, and measures the optimal waiting time which is the waiting time optimized so that it may become the shortest time as the said master device waiting time. Information processing device.
ことを特徴とする請求項3に記載の情報処理装置。 The information processing apparatus according to claim 3, wherein the measuring unit controls the standby time and measures the optimum standby time on a control unit of the standby time.
ことを特徴とする請求項5に記載の情報処理装置。 The information processing apparatus according to claim 5, wherein the control unit is a time unit based on a system clock of the information processing apparatus.
ことを特徴とする請求項1に記載の情報処理装置。 The measuring means measures the master device standby time by causing the master device to repeatedly execute the data transfer while controlling the standby time to change the length of the standby time. The information processing apparatus according to claim 1.
前記計測手段は、前記カウント手段による前記クロックのカウント処理実行中の期間を前記待機時間とし、前記カウント手段にカウントさせる前記クロックの数を変更することによって前記待機時間の長さを変更しながら、前記マスタデバイスに前記データ転送を繰返し実行させることにより、前記マスタデバイス待機時間を計測する
ことを特徴とする請求項7に記載の情報処理装置。 It further comprises a counting means for counting the clock,
The measuring means sets the waiting time as a period during which the clock counting process is being performed by the counting means, and changes the length of the waiting time by changing the number of the clocks to be counted by the counting means. The information processing apparatus according to claim 7, wherein the master device standby time is measured by causing the master device to repeatedly execute the data transfer.
前記計測手段は、前記計測処理において、前記初期待機時間設定手段により設定された前記初期値を用いて、前記マスタデバイスに最初のデータ転送を実行させる
ことを特徴とする請求項7に記載の情報処理装置。 An initial waiting time setting means for setting an initial value of the waiting time in the data transfer repeatedly executed by the master device in the measurement processing by the measuring means;
8. The information according to claim 7, wherein the measurement unit causes the master device to execute an initial data transfer using the initial value set by the initial standby time setting unit in the measurement process. Processing equipment.
ことを特徴とする請求項9に記載の情報処理装置。 In the data transfer repeatedly executed in the measurement process, the measurement unit sets the initial value set by the initial standby time setting unit as the maximum value of the standby time, and the master device repeats the data transfer. The information processing apparatus according to claim 9, wherein the waiting time is reset so that the waiting time is shortened.
ことを特徴とする請求項10に記載の情報処理装置。 The measurement means resets the waiting time so that the waiting time is shortened, and the target corresponding to the data transfer issued to the master device is not ready for the data transfer. The information processing apparatus according to claim 10, wherein the master device is configured to repeatedly execute the data transfer until a retry that is a response indicating that is detected.
ことを特徴とする請求項11に記載の情報処理装置。 12. The measurement unit according to claim 11, wherein when the retry is detected, the repetition of the data transfer is stopped and the standby time in the previous data transfer is set as the master device standby time. Information processing device.
前記レイテンシ値設定手段は、前記計測手段により計測された前記ターゲット毎の前記マスタデバイス待機時間に対応する値を、前記ターゲット毎の前記レイテンシ値として設定する
ことを特徴とする請求項1に記載の情報処理装置。 The measuring means measures the master device standby time for each target with respect to one master device,
The said latency value setting means sets the value corresponding to the said master device waiting time for every said target measured by the said measurement means as said latency value for every said target. Information processing device.
前記計測手段は、前記マスタデバイスが、前記アドレス設定手段により設定された前記アクセス先アドレスに対して、前記データ転送の開始を要求するコマンドを発行後、前記コマンドを再発行するまでの待機時間を制御し、前記マスタデバイス待機時間を計測する
ことを特徴とする請求項1に記載の情報処理装置。 In the measurement process by the measurement unit, the measurement unit further includes an address setting unit that sets an access destination address accessed by the master device,
The measuring unit sets a waiting time until the master device reissues the command after issuing a command requesting the start of the data transfer to the access destination address set by the address setting unit. The information processing apparatus according to claim 1, wherein the information processing apparatus controls and measures the master device standby time.
前記計測手段は、前記マスタデバイスが、前記アドレス設定手段により設定された2つの前記アクセス先アドレスに対して交互に実行する2つの前記データ転送の両方に基づいて、前記マスタデバイス待機時間を計測する
ことを特徴とする請求項14に記載の情報処理装置。 The address setting means sets two different access destination addresses corresponding to one target,
The measuring unit measures the master device standby time based on both of the two data transfers executed alternately by the master device with respect to the two access destination addresses set by the address setting unit. The information processing apparatus according to claim 14.
前記計測手段は前記マスタデバイスに特定された前記マスタデバイスに対応する前記マスタデバイス待機時間を計測する
ことを特徴とする請求項1に記載の情報処理装置。 Master device specifying means for specifying a master device for performing the data transfer for measuring the master device waiting time by the measuring means from among the plurality of devices connected to the system bus,
The information processing apparatus according to claim 1, wherein the measuring unit measures the master device standby time corresponding to the master device specified as the master device.
ことを特徴とする請求項1に記載の情報処理装置。 The information processing apparatus according to claim 1, further comprising a measurement process execution control unit that controls execution of the measurement process by the measurement unit.
前記計測手段が前記マスタデバイス待機時間を計測する前記データ転送を行うデバイスを選択するデバイス選択手段と、
前記計測手段による前記計測処理の開始を制御する開始制御手段と
を備える
ことを特徴とする請求項17に記載の情報処理装置。 The control means includes
A device selection means for selecting a device for performing the data transfer in which the measurement means measures the master device standby time;
The information processing apparatus according to claim 17, further comprising start control means for controlling start of the measurement process by the measurement means.
前記開始制御手段は、前記リトライ監視手段により、1回の前記データ転送において、予め定められた所定の数より多く前記リトライを検出した場合、前記計測手段による前記計測処理を開始させる
ことを特徴とする請求項18に記載の情報処理装置。 In the data transfer performed by the plurality of devices through the system bus, a retry issued by the target to the master device and indicating a response indicating that the preparation for the data transfer is not completed is detected. Further comprising retry monitoring means for monitoring the number of retries,
The start control means starts the measurement processing by the measurement means when the retry monitoring means detects more retries than a predetermined number in one data transfer. The information processing apparatus according to claim 18.
前記データ転送を制御して前記データ転送を行うデバイスであるマスタデバイスが、前記データ転送の開始を要求するコマンドを発行後、前記コマンドを再発行するまでの待機時間を制御し、前記マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測ステップと、
前記計測ステップの処理により計測された前記マスタデバイス待機時間に対応する値を、前記マスタデバイスが前記データ転送において使用するレイテンシ値として設定するレイテンシ値設定ステップと
を含むことを特徴とする情報処理方法。 An information processing method of an information processing apparatus having a system bus to which a plurality of devices are connected, wherein the plurality of devices transfer data to each other via the system bus,
The master device, which is a device that controls the data transfer and performs the data transfer, controls a waiting time until the command is reissued after issuing a command requesting the start of the data transfer. A measurement step for measuring the master device standby time to be set as the standby time;
A latency value setting step of setting a value corresponding to the master device standby time measured by the measurement step as a latency value used by the master device in the data transfer. .
前記データ転送を制御して前記データ転送を行うデバイスであるマスタデバイスが、前記データ転送の開始を要求するコマンドを発行後、前記コマンドを再発行するまでの待機時間を制御し、前記マスタデバイスの待機時間として設定するマスタデバイス待機時間を計測する計測ステップと、
前記計測ステップの処理により計測された前記マスタデバイス待機時間に対応する値を、前記マスタデバイスが前記データ転送において使用するレイテンシ値として設定するレイテンシ値設定ステップと
を含むことを特徴とするプログラム。 In a program having a system bus to which a plurality of devices are connected, and causing the plurality of devices to perform data transfer with each other via the system bus.
The master device, which is a device that controls the data transfer and performs the data transfer, controls a waiting time until the command is reissued after issuing a command requesting the start of the data transfer. A measurement step for measuring the master device standby time to be set as the standby time;
A latency value setting step of setting a value corresponding to the master device standby time measured by the measurement step as a latency value used by the master device in the data transfer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004047745A JP2005242437A (en) | 2004-02-24 | 2004-02-24 | Information processor, and information processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004047745A JP2005242437A (en) | 2004-02-24 | 2004-02-24 | Information processor, and information processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005242437A true JP2005242437A (en) | 2005-09-08 |
Family
ID=35024151
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004047745A Pending JP2005242437A (en) | 2004-02-24 | 2004-02-24 | Information processor, and information processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005242437A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014041412A (en) * | 2012-08-21 | 2014-03-06 | Casio Electronics Co Ltd | Pci bus control device |
-
2004
- 2004-02-24 JP JP2004047745A patent/JP2005242437A/en active Pending
Cited By (1)
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 |
---|---|---|
US6434654B1 (en) | System bus with a variable width selectivity configurable at initialization | |
US6073199A (en) | History-based bus arbitration with hidden re-arbitration during wait cycles | |
CA2223930C (en) | Burst-broadcasting on a peripheral component interconnect bus | |
US5933610A (en) | Predictive arbitration system for PCI bus agents | |
KR100267130B1 (en) | Pci bus system | |
JPH08227392A (en) | Bus system with waiting time and shadow timer | |
US8335883B2 (en) | Data processing device and data processing system | |
US20030088722A1 (en) | System and method for managing priorities in a PCI bus system | |
EP1068573B1 (en) | Method and apparatus for arbitrating access to multiple buses in a data processing system | |
JPH1153306A (en) | Data processor, external storage device, data processing system and data transmission method | |
US6532507B1 (en) | Digital signal processor and method for prioritized access by multiple core processors to shared device | |
US5668949A (en) | System utilizing multiple address decode resources and decoder receiving address determines address corresponding to resource based on select and ready signals by that particular resource | |
US20010004749A1 (en) | Arbitration of control chipsets in bus transaction | |
JP2005242437A (en) | Information processor, and information processing method and program | |
JP4037788B2 (en) | Signal transmission device between control chipsets | |
US5737545A (en) | Computer bus mastery system and method having a lock mechanism | |
US5915103A (en) | Method and system for an extensible on silicon bus supporting multiple functional blocks | |
WO2001057680A2 (en) | Data transaction access system and method | |
EP0920665B1 (en) | A method and apparatus to interface a peripheral device operating in an internal clock domain to a pci bus operating in a pci clock domain | |
JP2011090485A (en) | Circuit and method for pipe arbitration | |
JP2005242414A (en) | Information processor and information processing method and program | |
US6934789B2 (en) | Interface, structure and method for transmitting data of PCI bus which uses bus request signal for judging whether a device supporting dual transmission mode | |
JP2004265265A (en) | Data transfer control device | |
JP2001256179A (en) | Processor system | |
WO1997029432A1 (en) | Apparatus for programmably defining the access latency |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060823 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090226 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090702 |