JP2005275473A - Memory control adapter - Google Patents
Memory control adapter Download PDFInfo
- Publication number
- JP2005275473A JP2005275473A JP2004083685A JP2004083685A JP2005275473A JP 2005275473 A JP2005275473 A JP 2005275473A JP 2004083685 A JP2004083685 A JP 2004083685A JP 2004083685 A JP2004083685 A JP 2004083685A JP 2005275473 A JP2005275473 A JP 2005275473A
- Authority
- JP
- Japan
- Prior art keywords
- buffer
- read
- data
- control
- storage device
- 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
Abstract
Description
本発明は、メモリコントロールアダプタにかかり、特に、CPU(Central Processing Unit)等の中央処理装置、CPUに接続される外部装置、及びメモリバッファ等の外部記憶装置等のそれぞれに対するインタフェース機能を備えたインタフェースコントローラとCPU間に接続され、外部記憶装置が接続されるメモリコントロールアダプタに関する。 The present invention relates to a memory control adapter, and in particular, an interface having an interface function for a central processing unit such as a CPU (Central Processing Unit), an external device connected to the CPU, and an external storage device such as a memory buffer. The present invention relates to a memory control adapter connected between a controller and a CPU and connected to an external storage device.
一般的に、DRAM等のメモリへのデータ書き込みやデータ読み出しは、非特許文献1に記載のように、DRAMコントローラ等のインタフェースコントローラで行われるようになっている。
In general, data writing to and reading from a memory such as a DRAM is performed by an interface controller such as a DRAM controller, as described in Non-Patent
インタフェースコントローラは、それを制御するCPUのバスに直接接続されることが多かった。例として、MC68030を用いたシステムの一例を図6に示す。 In many cases, the interface controller is directly connected to the bus of the CPU that controls the interface controller. As an example, FIG. 6 shows an example of a system using MC68030.
図6のインタフェースコントローラ(IFC)42は、ダイレクトメモリアクセス(DMA)等の機能を備えた外部装置40のインタフェースコントローラであり、インタフェースコントローラ42にはバッファメモリ(例えばSRAM:Static Random Access MemoryやDRAM:Dynamic Random Access Memory等)14が接続され、ダイレクトメモリアクセスを行ったデータの一次保管などに使用される。
An interface controller (IFC) 42 in FIG. 6 is an interface controller of the
インタフェースコントローラ42のCPUインタフェースは、MC68030のCPUバスプロトコルに準拠しており、MC68030バスにて直接制御される。
The CPU interface of the
CPU44は、インタフェースコントローラ42内のレジスタ設定にて、バッファメモリ内のアドレスにデータを格納するかを指定し、ダイレクトメモリアクセスの制御を行う。また、バッファメモリに格納されたデータは、インタフェースコントローラ42のCPUインタフェースを経由して読み出しや書き込みを行う。
The CPU 44 controls whether to store data at an address in the buffer memory by register setting in the
近年では、CPUバスの高速化に伴い、CPUバスに直接ターゲットデバイスを接続できるシステムは少なくなり、図7に示すような、ホストPCIブリッジ(Host-PCI Bridge)46を経由して、PCIバスインタフェースでターゲットデバイスを接続するシステムが一般的となってきている。図7は、ホストPCIブリッジを経由して、PCIインタフェースでターゲットデバイスを接続するシステムにおいて、CPU44としてMPC750を用いた一例を示す。 In recent years, with the increase in CPU bus speed, the number of systems that can directly connect target devices to the CPU bus has decreased, and a PCI bus interface via a host PCI bridge (Host-PCI Bridge) 46 as shown in FIG. In general, systems for connecting target devices have become common. FIG. 7 shows an example in which an MPC 750 is used as the CPU 44 in a system for connecting a target device with a PCI interface via a host PCI bridge.
この場合、インタフェースコントローラ42とPCIバス間にPCIアダプタ(PCIADP)48を接続して、インタフェース変換を行う。但し、このような構成は部品点数が多くなり、実装やコスト面で不利となるため、最終的にはインタフェースコントローラ42をPCIアダプタ48が吸収できるように、バッファメモリ14はPCIアダプタ48の方に接続するような場合がある。
In this case, a PCI adapter (PCIADP) 48 is connected between the
また、PCIアダプタ48にバッファメモリ14を接続することにより、PICバスからPCIアダプタ48を経由して、インタフェースコントローラ42を経由せずに直接バッファメモリへアクセスすることも可能となるため、バッファメモリへのアクセスが高速化が可能となる。
Further, by connecting the buffer memory 14 to the
特に、PCIアダプタ48のような即席の設計が必要なハードウエアは、ほとんどの場合FPGA(Field Programmable Gate Array)で設計されるため、基板を作り替えずにFPGAのデータを書き換えることによって、インタフェースコントローラ42の機能をPCIアダプタ48に統合するよう設計するのが一般的である。
ところで、PCIアダプタ48にバッファメモリ14を接続した場合、CPUからのバッファメモリへのアクセスの最も簡単な構成は、インタフェースコントローラ42からのアドレス及びデータを、図8に示すように、PCIアダプタを単純にスルーする形となる。しかしながら、間に挟まるバスバッファにより、信号の遅延が増加し、リード及びライトのアクセスレイテンシの増加を招く、という問題がある。
By the way, when the buffer memory 14 is connected to the
また、単純にスルーするだけではなく、アドレス及びデータをPCIアダプタ48の内部にて、フリップフロップ(Flip-Flop)で一段受けて、中継する構成をとることもできるが、この場合でも、ライトのアクセスレイテンシの増加は抑えられるものの、リードのアクセスレイテンシの増加を抑えることができない、という問題がある。
In addition to simply passing through, it is possible to adopt a configuration in which the address and data are received and relayed by a flip-flop inside the
このように、インタフェースコントローラとバッファメモリの間にPCIアダプタを挟む場合には、一般的にはインタフェースコントローラからバッファメモリへのリードアクセスレイテンシが増加する。あるいはインタフェースコントローラが、バッファメモリへのアクセス速度の調整ができない仕様の場合には、このリードアクセスレイテンシの増加は致命的となる。 As described above, when the PCI adapter is sandwiched between the interface controller and the buffer memory, generally, the read access latency from the interface controller to the buffer memory increases. Alternatively, when the interface controller has a specification in which the access speed to the buffer memory cannot be adjusted, the increase in the read access latency is fatal.
本発明は、上記問題を解決すべく成されたもので、アクセスレイテンシの増加を抑制することが可能なメモリコントロールアダプタを提供することを目的とする。 The present invention has been made to solve the above problem, and an object thereof is to provide a memory control adapter capable of suppressing an increase in access latency.
上記目的を達成するために請求項1に記載の発明は、各種データ処理を行う中央処理装置、外部接続される外部装置、及びデータを格納する外部記憶装置のそれぞれに対するインタフェース機能備えたインタフェースコントローラと前記中央処理装置間に接続され、前記外部記憶装置が接続されたメモリコントロールアダプタであって、前記外部記憶装置から読み出したデータを一時保管するリードバッファと、前記外部記憶装置から前記リードバッファへのデータ格納及び読み出しを制御するバッファ制御部と、前記中央処理装置から前記インタフェースに送出される情報に対する制御を行う制御手段と、を備え、前記制御手段が、前記中央処理装置から前記インタフェースコントローラに送出される、前記外部記憶装置に格納されたデータの読み出すアドレスを表すリード情報を取得し、前記バッファ制御手段が、前記リード情報に基づいて前記外部記憶装置から前記リードバッファにデータを先読みするように制御し、前記リード情報の送出後に前記中央処理装置から前記インタフェースコントローラを介して送出される、前記外部記憶装置からのデータ読み出し開始を表すコントロール情報に基づいて、前記リードバッファから前記インタフェースコントローラにデータ転送することを特徴としている。
In order to achieve the above object, an invention according to
請求項1に記載の発明によれば、メモリコントロールアダプタは、メモリバッファ等の外部記憶装置から読み出したデータを一時保管するリードバッファと、リードバッファへのデータ格納及び読み出しを制御するバッファ制御部と、CPU等の中央処理装置からインタフェースコントローラに送出される情報に対する制御を行う制御手段と、を備えている。 According to the first aspect of the present invention, the memory control adapter includes: a read buffer that temporarily stores data read from an external storage device such as a memory buffer; and a buffer control unit that controls data storage and reading to the read buffer; Control means for controlling information sent from the central processing unit such as a CPU to the interface controller.
そして、インタフェースコントローラに中央処理装置から設定されるリードポインタレジスタ等のリード情報が制御手段によって取得される。 Then, read information such as a read pointer register set in the interface controller from the central processing unit is acquired by the control means.
また、バッファ制御手段によって、取得されたリード情報に基づいてバッファメモリからリードバッファに読み出し対象のデータが先読みされるように制御される。 Further, the buffer control unit controls the read target data from the buffer memory to the read buffer based on the acquired read information.
そして、インタフェースコントローラにリード情報の送出後にCPUから設定されるコントロールレジスタ等のコントロール情報に基づいて、リードバッファに格納されたデータがインタフェースコントローラにデータ転送される。 The data stored in the read buffer is transferred to the interface controller based on control information such as a control register set by the CPU after the read information is sent to the interface controller.
すなわち、転送対象のデータが予めリードバッファに格納されるので、インタフェースコントローラに外部記憶装置が直接接続されているようにデータ転送を行うことができる。従って、外部記憶装置からのデータリード時のアクセスレイテンシ増加を抑制することができる。 That is, since the data to be transferred is stored in advance in the read buffer, data transfer can be performed as if the external storage device is directly connected to the interface controller. Therefore, an increase in access latency when reading data from the external storage device can be suppressed.
例えば、請求項2に記載の発明のように、外部記憶装置に格納されたデータの外部装置への転送を行う際に、制御手段がリード情報を取得して、バッファ制御手段がリード情報に基づいてリードバッファにデータを先読みするように制御し、コントロール情報に基づいてリードバッファからインタフェースコントローラを介して外部装置へデータ転送するようにしてもよいし、請求項3に記載の発明のように、中央処理装置が外部記憶装置に格納されたデータの読み出しを行う際に、制御手段がリード情報を取得して、バッファ制御手段がリード情報に基づいてリードバッファにデータを先読みするように制御し、コントロール情報に基づいてリードバッファからインタフェースコントローラを介して中央処理装置にデータ転送するようにしてもよい。
For example, as in the invention described in
また、中央処理装置が外部記憶装置に格納されたデータの読み出しを行う際には、請求項4に記載の発明のように、制御手段がリード情報及びコントロール情報を取得して、バッファ制御手段がリード情報に基づいて外部記憶装置に格納されたデータを読み出し、コントロール情報に基づいて中央処理装置に直接データ転送するようにしてもよい。すなわち、インタフェースコントローラを介在しないでデータ転送を行うようにしてもよく、これによっても、外部記憶装置からのデータリード時のアクセスレイテンシ増加を抑制することができる。 When the central processing unit reads out the data stored in the external storage device, the control means acquires the read information and the control information, and the buffer control means Data stored in the external storage device may be read based on the read information and directly transferred to the central processing unit based on the control information. That is, data transfer may be performed without an interface controller, and this can also suppress an increase in access latency when reading data from the external storage device.
なお、制御手段は、請求項5に記載の発明のように、リードバッファへのデータ格納が完了するまで、コントロール情報のインタフェースコントローラへの送出を遅延することで、リードバッファへのデータ格納完了とリードバッファに格納されたデータの読み出し開始との同期を取ることができ、アクセス速度の違いによって発生する問題を解消することができる。 The control means delays sending the control information to the interface controller until the data storage in the read buffer is completed, as in the invention described in claim 5. Synchronization with the start of reading data stored in the read buffer can be achieved, and problems caused by differences in access speeds can be solved.
また、メモリコントロールアダプタは、請求項6に記載の発明のように、外部記憶装置に格納するデータを一時格納するライトバッファと、外部記憶装置からデータを読み出す際に、ライトバッファに転送対象のデータが格納されているか否かを判定する判定手段を更に備えて、判定手段によって転送対象のデータがライトバッファに格納されていると判定された場合に、バッファ制御手段がライトバッファに格納された転送対象のデータをリードバッファに書き込むように制御するようにしてもよい。これによってダウンロード直後等のように未だライトバッファにデータが残っている状態で、アップロード等のデータ読み出しが行われた時でも直ぐに外部記憶装置からデータを読み出すことができ、アクセスレイテンシ増加を抑制することができる。 The memory control adapter, as in the sixth aspect of the present invention, includes a write buffer for temporarily storing data to be stored in the external storage device, and data to be transferred to the write buffer when data is read from the external storage device. Is further provided with a determination unit that determines whether or not the data to be transferred is stored in the write buffer, and the buffer control unit stores the transfer stored in the write buffer when the determination unit determines that the data to be transferred is stored in the write buffer. You may make it control so that target data may be written in a read buffer. As a result, data can be read from the external storage device immediately even when data is read, such as uploading, with data still remaining in the write buffer, such as immediately after downloading, thereby suppressing an increase in access latency. Can do.
以上説明したように本発明によれば、メモリコントロールアダプタにリードバッファを設けて先読みするように制御することで、アクセスレイテンシの増加を抑制することができる、という効果がある。 As described above, according to the present invention, an increase in access latency can be suppressed by providing a read buffer in the memory control adapter and performing control so as to perform prefetching.
以下、図面を参照して本発明の実施の形態の一例を詳細に説明する。 Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings.
図1は、本発明の実施の形態に係わるメモリコントロールアダプタとしてのPCIアダプタ及びインタフェースコントローラの構成を示すブロック図である。 FIG. 1 is a block diagram showing a configuration of a PCI adapter and an interface controller as a memory control adapter according to an embodiment of the present invention.
PCIアダプタ(PCIADP)10及びインタフェースコントローラ(IFC)12は、図7にしたように、CPU44に接続されたホストPCIブリッジ46を介してPCIバスに接続されている。なお、ホストPCIブリッジ46には、ROM43及びRAM45も接続されている。
The PCI adapter (PCIADP) 10 and the interface controller (IFC) 12 are connected to the PCI bus via the
インタフェースコントローラ12は、後段に接続されるダイレクトメモリアクセス機能等を備えた外部装置40のインタフェースコントローラとして機能し、インタフェースコントローラ12とPCIバスの間にCPUバスを介してPCIアダプタ10が接続され、PCIアダプタ10にメモリバッファ14が接続されている。
The
インタフェースコントローラ12は、CPU44に対するレジスタ群16を有する。レジスタ群16は、例えば、ダウンロード方向のダイレクトメモリアクセスの際に、バッファメモリ14のどの場所にデータを格納するかを指定するライトポインタレジスタ、バッファメモリ14のどの場所からデータを読み出すかを指定するリードポイントレジスタ、及びダイレクトメモリアクセスの開始や転送方向を指定するコマンドレジスタ等が設定される。
The
また、インタフェースコントローラ12は、I/F制御部18及びダイレクトメモリアクセス(DMA)制御部20を備えており、I/F制御部18は、後段に接続される外部装置40からのダイレクトメモリアクセス要求に対して、DMA制御部20を制御することによりPCIアダプタ10に接続されたメモリバッファ14へのダイレクトメモリアクセスを制御するようになっている。
The
なお、インタフェースコントローラ12は、CPUバスからのバッファメモリ14へのアクセス時には、メモリまたはFiFo(First in First out)ポートのように機能する。
The
PCIアダプタ10は、インタフェース(I/F)変換/解析部22、バッファ制御部24、リードバッファ26、及びライトバッファ28を備えている。
The PCI adapter 10 includes an interface (I / F) conversion / analysis unit 22, a
I/F変換/解析部22は、CPU44からインタフェースコントローラ12のレジスタ群16へ設定される、バッファメモリ14の読み出しアドレスを指定するリードポインタレジスタの設定、バッファメモリ14の書き込みアドレスを指定するライトポイントレジスタの設定、及びバッファメモリ14からの読み出し開始及び書き込み開始等を表すコントロールレジスタの設定等を行うと共に、バッファ制御部24の制御等を行う。
The I / F converter / analyzer 22 sets the read pointer register that specifies the read address of the buffer memory 14 and the write point that specifies the write address of the buffer memory 14 set from the CPU 44 to the
バッファ制御部24は、CPU44やDMA制御部20からのバッファメモリ14へのアクセス要求に応じてバッファメモリ14へのデータ書き込みやデータ読込みを行う。この時、バッファ制御部24は、リードバッファ26やライトバッファ28を利用してバッファメモリ14へのデータ書き込みやデータ読込みを行うようになっている。
The
リードバッファ26は、バッファメモリ14からデータを読み出す際に、リートポインタレジスタの値に対応するデータを一時格納し、ライトバッファ28は、バッファメモリ14にデータを書き込みを行う際に、ライトポインタレジスタの値に書き込むデータを一時格納する。なお、リードバッファ26は、空きができるごとに随時データを先読みするものとする。
The read buffer 26 temporarily stores data corresponding to the value of the read pointer register when reading data from the buffer memory 14, and the
例えば、リードバッファ24は、バッファ制御部24の制御によってリードポイントレジスタの値のデータを先読みして格納し、インタフェースコントローラ12のDMA制御部20からバッファメモリ14に読み出し要求がなされたとき、すなわち、CPU44からコントロールレジスタがレジスタ群16に設定されたときに、リードバッファ14に格納したデータを出力する。
For example, the
また、ライトバッファ28は、コンパレータ機能を備えており、バッファメモリ14へのダウロードが行われた直後にアップロードを行う際に、リードバッファ26が読み出すアドレスのデータが、ライトバッファ28に未だ格納された状態が否かを判定するようになっている。なお、ライトバッファ28のコンパレータ機能は、リードバッファ26側に設けるようにしてもよいし、バッファ制御部24に設けるようにしてもよい。
The
続いて、上述のように構成されたPCIアダプタ及びインタフェースコントローラの動作について説明する。 Next, operations of the PCI adapter and interface controller configured as described above will be described.
図2は、PCIアダプタ10及びインタフェースコントローラ12の動作の流れの一例を示すフローチャートである。
FIG. 2 is a flowchart illustrating an example of the flow of operations of the PCI adapter 10 and the
ステップ100では、I/F変換/解析部22によってCPU44からメモリバッファ14へアクセスがなされたか否か判定される。該判定は、CPU44からPCIバスを介してバッファメモリ14からのデータの読込みが指示されたか否かをI/F変換/解析部22が判定することによってなされ、該判定が否定された場合にはステップ102へ移行する。
In
ステップ102では、アップロードが指示されたか否か判定される。該判定は、I/F変換/解析部22によってCバッファメモリ14に格納されたデータのアップロードがCPU44によって指示されたか、またはバッファメモリ14へデータを格納するダウンロードがCPU44によって指示されたか否かを判定することによってなされ、アップロードが指示された場合に判定が肯定され、ダウンロードが指示された場合に判定が否定される。そして、該判定が肯定された場合には、ステップ104へ移行する。
In
ステップ104では、CPU44からインタフェースコントローラ12のレジスタ群16に設定されるリードポインタレジスタ設定がI/F変換/解析部22によってバッファ制御部24にも格納され、ステップ106へ移行する。
In
ステップ106では、バッファ制御部24によって、リードポインタレジスタ設定のアドレスに対応するデータが先読みされ、リードバッファ26に格納される。
In
次にステップ108では、ダウンロード直後のアップロードか否か判定され、該判定が否定された場合には、ステップ110へ移行する。
Next, in
ステップ110では、CPU44からレジスタ群16にコントロールレジスタ設定がなされたか否かI/F変換/解析部22によって判定され、該判定が肯定されるまで待機してステップ112へ移行する。
In
ステップ112では、CPU44から設定されるレジスタ群16へのコントロールレジスタの設定がI/F変換/解析部22によって待機(遅延)され、ステップ114へ移行して、リードバッファ26への格納完了がバッファ制御部24によって監視されて、リードバッファ26へのデータの格納が完了したところで、ステップ114の判定が肯定され、ステップ116へ移行する。
In step 112, the setting of the control register in the
そして、ステップ116では、I/F変換/解析部22によってレジスタ群16へのコントロールレジスタの設定が行われ、ステップ118へ移行する。
In step 116, the control register is set in the
ステップ118では、コントロールレジスタ設定がインタフェースコントローラ12のレジスタ群16に設定されることにより、リードバッファ26からのデータの読み出しが開始され、リードバッファ26に格納された先読みされたデータがDMA制御部20の制御によってインタフェースコントローラ12の後段に接続された外部装置40にアップロードされる。
In step 118, the control register setting is set in the
すなわち、アップロード方向のダイレクトメモリアクセスが開始されると、CPU44によって、バッファメモリ14のどの位置からデータを取り出すか指定する、リードポインタレジスタが設定される。この時、リードポインタレジスタの設定は、PCIバスからI/F変換/解析部22を介してインタフェースコントローラ12のレジスタ群16に書き込まれるが、この値はI/F変換/解析部22によって、PCIアダプタ10のバッファ制御部24にも格納され、バッファ制御部24は、リードポインタレジスタへの書き込み値を元にバッファメモリ14からデータを先読みして、リードバッファ26に格納する。
That is, when direct memory access in the upload direction is started, the CPU 44 sets a read pointer register for designating from which position in the buffer memory 14 data is to be extracted. At this time, the setting of the read pointer register is written to the
その後、CPU44がダイレクトメモリアクセスを起動するコントロールレジスタを設定すると、ダイレクトメモリアクセスが起動してDMA制御部20の制御によってリードポインタレジスタで指定されるバッファメモリのデータをPCIアダプタ10に対して読み取りにくるが、この時には既に指定の値がリードバッファ26に格納されているため、PCIアダプタ10は即座にデータをインタフェースコントローラ12に渡すことができる。従って、インタフェースコントローラ12とバッファメモリ14の間にPCIアダプタ10を挟むことによる遅延を解消することができる。
Thereafter, when the CPU 44 sets a control register that activates the direct memory access, the direct memory access is activated and the data in the buffer memory specified by the read pointer register is read from the PCI adapter 10 under the control of the DMA control unit 20. At this time, however, since the designated value is already stored in the read buffer 26, the PCI adapter 10 can immediately pass the data to the
また、インタフェースコントローラ12がリードバッファ26からデータを受け取る際には、CPU44からのコントロールレジスタの設定によってダイレクトメモリアクセスが起動開始されてリードバッファ26からDMA制御部20がデータを受け取ってI/F制御部18を介して後段の外部装置40にデータのアップロードが行われるが、この時、リードバッファ26にデータの格納が完了するまで、PCIアダプタ10によってインタフェースコントローラ12のレジスタ群16へのコントロールレジスタの設定が遅延されるので、リードバッファ26へのデータ格納完了とインタフェースコントローラ12のデータ受け取りを同期させることができ、アクセス速度の違いによって発生する問題を解消することができる。
When the
一方、ステップ102の判定が否定、すなわち、ダウンロードがCPU44によって指示された場合には、ステップ120へ移行して、CPU44によってレジスタ群16に設定されるライトポインタレジスタをDMA制御部20からバッファ制御部24が受け取り、ステップ122へ移行して、ダウンロードしたデータがDMA制御部20を介してライトバッファ28に格納される。
On the other hand, if the determination in
そして、ステップ124では、ライトバッファ28にデータの格納が完了したか否かを待ってステップ126へ移行し、ダウンロード終了通知がDMA制御部20になされることで、ダウンロードを終了する。そして、ステップ128へ移行して、バッファ制御部24が受け取ったライトポインタレジスタに対応するバッファメモリ14のアドレスにライトバッファ28に格納したデータが順次格納される。
In
また、ステップ104の判定が肯定された場合、すなわち、ダウンロード直後のアップロードがCPU44によって指示された場合には、ステップ130へ移行して、ライトバッファ28にダウンロードしたデータがあるか否か判定される。該判定は、ライトバッファ28のコンパレータ機能により、リードバッファ26に格納された先頭アドレスポインタと末尾アドレスポインタを比較することで、リードバッファ26に読み出すデータがライトバッファ28にまだ格納された状態か否かを判定することによってなされる。すなわち、ライトバッファ28にリードバッファ26に読み出す先頭アドレスポインタと末尾アドレスポインタの範囲内のデータがあるか否かを判定し、該判定が否定された場合には、上述のステップ110へ移行して上述の処理が行われる。
If the determination in
ステップ130の判定が肯定された場合、すなわち、ダウンロードするデータが未だライトバッファ28に格納された状態では、ステップ132へ移行して、バッファメモリ14のデータのコヒーレンシを維持するために、サブアップロード処理が行われる。
If the determination in
ここで、上述のバッファメモリ14のデータのコヒーレンシを指示するために行われるサブアップロード処理について詳細に説明する。図3は、サブアップロード処理の流れの一例を示すフローチャートである。 Here, the sub-upload process performed to instruct the coherency of the data in the buffer memory 14 will be described in detail. FIG. 3 is a flowchart illustrating an example of the flow of sub-upload processing.
ステップ200では、リードポインタレジスタに対応するデータがライトバッファ28からリードバッファ26に上書きされるようにバッファ制御部24によって制御される。
In
続いて、ステップ202では、CPU44からレジスタ群16にコントロールレジスタ設定がなされたか否かI/F変換/解析部22によって判定され、該判定が肯定されるまで待機してステップ204へ移行する。
Subsequently, in
ステップ204では、CPU44から設定されるレジスタ群16へのコントロールレジスタの設定がI/F変換/解析部22によって待機され、ステップ206へ移行して、リードバッファ26への格納完了がバッファ制御部24によって監視されて、リードバッファ26へのデータの格納が完了したところで、ステップ206の判定が肯定され、ステップ208へ移行する。
In
そして、ステップ208では、I/F変換/解析部22によってレジスタ群16へのコントロールレジスタの設定が行われ、ステップ210へ移行する。
In
ステップ210では、コントロールレジスタ設定がインタフェースコントローラ12のレジスタ群16に設定されることにより、リードバッファ26からのデータの読み出しが開始され、リードバッファ26に格納された先読みされたデータがDMA制御部20の制御によってインタフェースコントローラ12の後段に接続された外部装置40にアップロードされる。
In step 210, the control register setting is set in the
すなわち、ダウンロード直後にアップロードが指示された場合に、ライトバッファ28にアップロード対象のデータがまだ残っている場合には、ライトバッファ28のデータをリードバッファ26に上書きするようにしているので、ダウンロード直後にまだライトバッファ28にアップロードに対応するデータが格納されていてもアップロードを直ぐに行うことが可能となり、リードアクセスレイテンシ増加を解消することができると共に、バッファメモリ14のデータのコヒーレンシを維持することができる。
That is, when upload is instructed immediately after downloading, if the data to be uploaded still remains in the
ここで、図1のフローチャートに戻って説明する。 Returning to the flowchart of FIG.
ステップ100の判定が肯定、すなわち、CPU44からメモリバッファ14へアクセスが行われた場合(CPU44からメモリバッファ14に格納されたデータの読み出しが行われた場合)には、ステップ134へ移行して、CPUアクセス処理が行われる。
When the determination in
ここで、CPUアクセス処理について詳細に説明する。図4は、CPUアクセス処理の流れの一例を示すフローチャートである。 Here, the CPU access process will be described in detail. FIG. 4 is a flowchart illustrating an example of the flow of CPU access processing.
ステップ300では、I/F変換/解析部22によってCPU44からのリードポインタレジスタがバッファ制御部24に設定される。
In
そして、ステップ302では、バッファ制御部24に設定されたリードポインタレジスタに対応するデータがバッファ制御部24によって読み出され、I/F変換/解析部22を介してCPU44に出力される。
In
すなわち、インタフェースコントローラ12を介さずに、CPU44からバッファメモリ14へアクセスすることができ、高速に処理を行うことができる。
That is, the CPU 44 can access the buffer memory 14 without going through the
図5は、CPUアクセス処理の変形例の一例を示すフローチャートである。図4では、インタフェースコントローラ12を介さずにPCIアダプタ10から直接バッファメモリ14にアクセスするようにしたが、変形例では、インタフェースコントローラ12を介してCPU44からバッファメモリ14にアクセスする場合を示す。
FIG. 5 is a flowchart illustrating an example of a modification of the CPU access process. In FIG. 4, the buffer memory 14 is directly accessed from the PCI adapter 10 without using the
ステップ350では、CPU44からI/F変換/解析部22を介してレジスタ群16にリードポインタレジスタが設定され、ステップ352へ移行する。
In step 350, a read pointer register is set in the
ステップ352では、CPU44からインタフェースコントローラ12のレジスタ群16に設定されるリードポインタレジスタ設定がI/F変換/解析部22によってバッファ制御部24にも格納され、ステップ354へ移行する。
In
ステップ354では、バッファ制御部24によって、リードポインタレジスタ設定のアドレスに対応するデータが先読みされ、リードバッファ26に格納される。
In step 354, data corresponding to the read pointer register setting address is prefetched by the
次に、ステップ356では、CPU44からレジスタ群16にコントロールレジスタ設定がなされたか否かI/F変換/解析部22によって判定され、該判定が肯定されるまで待機してステップ358へ移行する。
Next, in
ステップ358では、CPU44から設定されるレジスタ群16へのコントロールレジスタの設定がI/F変換/解析部22によって待機(遅延)され、ステップ360へ移行して、リードバッファ26への格納完了がバッファ制御部24によって監視されて、リードバッファ26へのデータの格納が完了したところで、ステップ360の判定が肯定され、ステップ362へ移行する。
In
ステップ362では、I/F変換/解析部22によってレジスタ群16へのコントロールレジスタの設定が行われ、ステップ364へ移行する。
In
そして、ステップ364では、コントロールレジスタ設定がインタフェースコントローラ12のレジスタ群16に設定されることにより、リードバッファ26からのデータの読み出しが開始され、リードバッファ26に格納された先読みされたデータがDMA制御部24の制御によってCPU44に送出される。
In step 364, the control register setting is set in the
すなわち、上述したインタフェースコントローラ12の後段に接続された外部装置40にアップロードするとき(ステップ104〜118)のように、CPU44からのアクセスについても処理することもでき、これによってもリードアクセスレイテンシ増加を解消することができる。
That is, as in the case of uploading to the
以上説明したように、本実施形態によれば、PCIアダプタ10にリードバッファ26を設けて、データの先読みを行うようにバッファ制御すると共に、リードバッファ26にデータが格納された時点で読み出しするようにバッファ制御することで、汎用バス(PCIバス)接続するPCIアダプタ10を設計し、インタフェースコントローラ12に接続されていたバッファメモリ14をPCIアダプタ10側に接続する際に発生する、メモリアクセスレイテンシ増加やアクセス速度制限の問題を解消することができる。
As described above, according to the present embodiment, the PCI adapter 10 is provided with the read buffer 26 to control the buffer so as to pre-read data, and to read the data when the data is stored in the read buffer 26. By designing the PCI adapter 10 to be connected to the general-purpose bus (PCI bus), the memory access latency increases when the buffer memory 14 connected to the
10 PCIアダプタ
12 インタフェースコントローラ
14 バッファメモリ
22 I/F変換/解析部
24 バッファ制御部
26 リードバッファ
28 ライトバッファ
10
Claims (6)
前記外部記憶装置から読み出したデータを一時保管するリードバッファと、
前記外部記憶装置から前記リードバッファへのデータ格納及び読み出しを制御するバッファ制御部と、
前記中央処理装置から前記インタフェースに送出される情報に対する制御を行う制御手段と、
を備え、
前記制御手段が、前記中央処理装置から前記インタフェースコントローラに送出される、前記外部記憶装置に格納されたデータの読み出すアドレスを表すリード情報を取得し、
前記バッファ制御手段が、前記リード情報に基づいて前記外部記憶装置から前記リードバッファにデータを先読みするように制御し、前記リード情報の送出後に前記中央処理装置から前記インタフェースコントローラを介して送出される、前記外部記憶装置からのデータ読み出し開始を表すコントロール情報に基づいて、前記リードバッファから前記インタフェースコントローラにデータ転送することを特徴とするメモリコントロールアダプタ。 Connected between the central processing unit and an interface controller having an interface function for a central processing unit that performs various data processing, an externally connected external device, and an external storage device that stores data, and the external storage device is connected Memory control adapter,
A read buffer for temporarily storing data read from the external storage device;
A buffer control unit for controlling data storage and reading from the external storage device to the read buffer;
Control means for controlling information sent from the central processing unit to the interface;
With
The control means obtains read information representing an address to be read from the data stored in the external storage device, which is sent from the central processing unit to the interface controller;
The buffer control means controls to pre-read data from the external storage device to the read buffer based on the read information, and is sent from the central processing unit via the interface controller after the read information is sent. A memory control adapter for transferring data from the read buffer to the interface controller based on control information indicating the start of data reading from the external storage device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004083685A JP2005275473A (en) | 2004-03-22 | 2004-03-22 | Memory control adapter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004083685A JP2005275473A (en) | 2004-03-22 | 2004-03-22 | Memory control adapter |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005275473A true JP2005275473A (en) | 2005-10-06 |
Family
ID=35175127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004083685A Pending JP2005275473A (en) | 2004-03-22 | 2004-03-22 | Memory control adapter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005275473A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015512097A (en) * | 2012-02-15 | 2015-04-23 | シリコン イメージ,インコーポレイテッド | Communication bridge between devices via multiple bridge elements |
CN109154916A (en) * | 2016-08-22 | 2019-01-04 | 惠普发展公司,有限责任合伙企业 | The information of the equipment of connection |
-
2004
- 2004-03-22 JP JP2004083685A patent/JP2005275473A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015512097A (en) * | 2012-02-15 | 2015-04-23 | シリコン イメージ,インコーポレイテッド | Communication bridge between devices via multiple bridge elements |
CN109154916A (en) * | 2016-08-22 | 2019-01-04 | 惠普发展公司,有限责任合伙企业 | The information of the equipment of connection |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9021146B2 (en) | High priority command queue for peripheral component | |
US8396994B1 (en) | Command queue for peripheral component | |
JP2004171209A (en) | Shared memory data transfer device | |
US6782463B2 (en) | Shared memory array | |
JP2010146084A (en) | Data processor including cache memory control section | |
US10095640B2 (en) | Multi mode address spaces for PC to device transfer optimization | |
JP2005275473A (en) | Memory control adapter | |
US9128924B2 (en) | Method and apparatus for wireless broadband systems direct data transfer | |
US6829692B2 (en) | System and method for providing data to multi-function memory | |
JP2011070259A (en) | Data transfer device and data transfer method | |
JP4431492B2 (en) | Data transfer unit that supports multiple coherency granules | |
JP2005235199A (en) | Method and apparatus for burst mode data transfer between cpu and fifo | |
JP6381270B2 (en) | Information processing apparatus, information processing method, and system | |
WO2016070431A1 (en) | Memory access method and apparatus, and computer device | |
JP2010140440A (en) | Bus arbitration device | |
JP2009059155A (en) | Usb host controller device | |
JP4560398B2 (en) | Data processing circuit | |
JP2001229074A (en) | Memory controller and information processor and memory control chip | |
KR20150034493A (en) | Method and Apparatus for Copying Data using Cache | |
JP2004240520A (en) | In-non cache area high speed memory access method | |
JP2002334053A (en) | Data transfer controller | |
JP2005128931A (en) | Dma transfer device | |
JP2003271547A (en) | Data transfer device | |
JP2006293636A (en) | Data processor | |
JP2011133993A (en) | Data transfer control device, data transfer system, and data processing system |