JP2010152837A - Buffer device - Google Patents
Buffer device Download PDFInfo
- Publication number
- JP2010152837A JP2010152837A JP2008332898A JP2008332898A JP2010152837A JP 2010152837 A JP2010152837 A JP 2010152837A JP 2008332898 A JP2008332898 A JP 2008332898A JP 2008332898 A JP2008332898 A JP 2008332898A JP 2010152837 A JP2010152837 A JP 2010152837A
- Authority
- JP
- Japan
- Prior art keywords
- request
- access
- read
- unit
- access request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Bus Control (AREA)
- Information Transfer Systems (AREA)
Abstract
【課題】複数のブロック転送要求があっても、CPUの待ち時間を短縮することができるバッファ装置を提供する。
【解決手段】リード要求のリードアクセス対象領域がアクセス要求格納部10に格納される各アクセス要求のアクセス対象領域と重なるか否かを照合して、リードアクセス対象領域がライト要求のライトアクセス対象領域と重なる場合、アクセス要求格納部10から当該ライト要求が有するライトデータを取得してリードデータとしてCPU2へ返し、DMA転送要求の転送元領域と重なる場合、当該DMA転送要求に先行して当該リード要求を調停回路部12へ発行し、DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換したリード要求を調停回路部12へ発行する。
【選択図】図1Provided is a buffer device capable of reducing a waiting time of a CPU even when there are a plurality of block transfer requests.
By comparing whether or not the read access target area of the read request overlaps with the access target area of each access request stored in the access request storage unit 10, the read access target area is the write access target area of the write request. If it overlaps with the transfer source area of the DMA transfer request, it acquires the write data of the write request from the access request storage unit 10 and returns it to the CPU 2 as read data. Is issued to the arbitration circuit unit 12, and when it overlaps the transfer destination area of the DMA transfer request, a read request in which the address area of the read access target is converted to the transfer source area of the DMA transfer request is issued to the arbitration circuit unit 12.
[Selection] Figure 1
Description
この発明は、CPUが実行時間の長いブロック転送命令を実行した際にCPUに与える影響を小さく抑え、後続の処理を可能な限り実行することにより、処理時間の短縮を図るバッファ装置に関するものである。 The present invention relates to a buffer device that reduces the processing time by suppressing the influence on the CPU when the CPU executes a block transfer instruction having a long execution time and executing the subsequent processes as much as possible. .
CPUの処理には、データをまとめて転送するブロック転送が含まれることが多い。ブロック転送の使用例としては、先行する処理が終了して次の処理へ移る際に、先行する処理の結果をブロック転送で後続の処理のワーク領域へ転送する場合や、通信を経由して受け取ったデータをまとめてワーク領域へコピーする場合、その逆にCPUが処理した結果を通信で外部に送り出す場合等がある。 The processing of the CPU often includes block transfer that transfers data collectively. As an example of block transfer, when the preceding process ends and moves to the next process, the result of the preceding process is transferred to the work area of the subsequent process by block transfer or received via communication. For example, when the data is copied to the work area, the result processed by the CPU may be sent to the outside by communication.
このブロック転送処理は、複数回のメモリアクセスで構成されるため実行時間が長い。また、ブロック転送には、一般的にDMAC(Direct Memory Access Controller)が用いられるが、CPUが一旦DMACにブロック転送の指示を出すと、転送対象となるメモリが接続されているバスはDMAが発行するアクセスに占有される。DMACを起動した後であっても、CPUが、DMA対象メモリとは独立してアクセス可能な内蔵メモリやキャッシュを持っている場合には、後続の処理を継続することが可能な場合もある。しかしながら、DMAは、主メモリを対象に実施することが多く、DMAが終了するまで待たされる場合も多い。 Since this block transfer process is constituted by a plurality of memory accesses, the execution time is long. In addition, DMAC (Direct Memory Access Controller) is generally used for block transfer, but once the CPU issues an instruction for block transfer to the DMAC, the bus to which the memory to be transferred is connected is issued by the DMA. Will be occupied by access. Even after the DMAC is activated, if the CPU has a built-in memory or cache that can be accessed independently of the DMA target memory, it may be possible to continue the subsequent processing. However, the DMA is often performed on the main memory and often waits until the DMA is completed.
一般的な方法として、DMA転送を一旦中断し、CPUアクセスを優先する方法も存在するが、動作しているDMA対象領域にライトを行う場合やDMA転送先の領域からデータをリードする場合には、当該領域に対するDMAが終了してからCPUアクセスを発行しなければ、正しい結果を得ることができない。高速なシステムを構築するためには、このようなDMAの実行時間短縮は大きな課題である。 As a general method, there is a method in which DMA transfer is temporarily interrupted and CPU access is given priority. However, when data is written to a DMA target area in operation or when data is read from a DMA transfer destination area. If the CPU access is not issued after the DMA for the area is completed, a correct result cannot be obtained. In order to construct a high-speed system, shortening the DMA execution time is a big problem.
特許文献1は、上述したDMA転送を一旦中断する方法に加え、DMA転送先の領域へリードアクセスする場合に関して、CPUの待ち時間を減少させる方法を記載している。このDMA転送制御方法では、DMA転送対象領域であっても、既に転送を完了している領域であればDMAを一旦停止してCPUアクセスを実施する。また、転送先領域へのリードアクセスの場合は、DMAを一旦中断してCPUから要求があったアクセスアドレスを先にDMA転送し、その際に取得したデータをCPUにリードデータとして渡して、中断したDMAを再開する。これにより、DMA実行中のCPUアクセスに関して、待ち時間を短縮することが可能となる。 Patent Document 1 describes a method of reducing the waiting time of the CPU in the case of read access to the DMA transfer destination area in addition to the above-described method of temporarily interrupting DMA transfer. In this DMA transfer control method, even if it is a DMA transfer target area, if the transfer has already been completed, the DMA is temporarily stopped and CPU access is performed. In the case of read access to the transfer destination area, the DMA is temporarily interrupted, the access address requested by the CPU is DMA transferred first, and the data acquired at that time is transferred to the CPU as read data and interrupted. Resumed DMA. This makes it possible to shorten the waiting time for CPU access during DMA execution.
上述したDMA動作中に発生したCPUアクセスを優先する方法では、DMA要求が短時間に複数回発生した際には対応できないという課題があった。複数のDMA要求をDMACでキューイングする場合、全てのDMA要求に対して後続の単発アクセスが先行して実行可能か否かを判断する必要があり、動作中のDMA要求に対してのみ特許文献1に記載された処理を実施しても、後続のCPUアクセスは正しいデータは得られないため、先行するDMA処理が終了するまで待つ必要がある。 The above-described method of prioritizing CPU access generated during the DMA operation has a problem that it cannot cope with a DMA request generated multiple times in a short time. When queuing a plurality of DMA requests with the DMAC, it is necessary to determine whether or not a subsequent single access can be executed in advance for all the DMA requests. Even if the processing described in 1 is performed, correct data cannot be obtained in subsequent CPU accesses, so it is necessary to wait until the preceding DMA processing is completed.
この発明は、上記のような課題を解決するためになされたもので、複数のDMA要求があっても、CPUの待ち時間を短縮することができ、かつDMA転送要求に関係があるCPUアクセスであっても、先行するDMA処理を追い越して正しいデータを得ることができるバッファ装置を得ることを目的とする。 The present invention has been made in order to solve the above-described problems. Even when there are a plurality of DMA requests, the CPU wait time can be shortened and the CPU access related to the DMA transfer request can be achieved. Even if it exists, it aims at obtaining the buffer apparatus which can overtake the preceding DMA process and can acquire correct data.
この発明に係るバッファ装置は、CPUから発行されたライト要求及びDMA転送要求を、先入れ先出しで格納するアクセス要求格納部と、アクセス要求格納部から出力されたライト要求及びDMA転送要求を振り分けるアクセス分配部と、アクセス分配部で振り分けられたDMA転送要求に従ってメモリに対するDMA転送を制御するDMA制御部と、メモリに対するリード要求、アクセス分配部で振り分けられたライト要求及びDMA制御部から発行されたDMA転送要求を入力し、各アクセス要求に従ってメモリに対するアクセスを実行する調停回路部と、CPUから発行されたメモリに対するリード要求を入力し、当該リード要求のリードアクセス対象領域がアクセス要求格納部に格納されている各アクセス要求のアクセス対象領域と重なるか否かを照合して、DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換したリード要求を調停回路部へ発行するリードアクセス処理部とを備えるものである。 The buffer device according to the present invention includes an access request storage unit that stores a write request and a DMA transfer request issued from a CPU in a first-in first-out manner, and an access distribution unit that distributes the write request and the DMA transfer request output from the access request storage unit A DMA control unit that controls DMA transfer to the memory according to the DMA transfer request distributed by the access distribution unit, a read request to the memory, a write request distributed by the access distribution unit, and a DMA transfer request issued from the DMA control unit The arbitration circuit unit that executes access to the memory according to each access request, and the read request issued to the memory issued by the CPU are input, and the read access target area of the read request is stored in the access request storage unit Access target area of each access request A read access processing unit that issues a read request in which the read access target area is address-converted to the transfer source area of the DMA transfer request to the arbitration circuit unit when it is overlapped with the transfer destination area of the DMA transfer request Is provided.
この発明によれば、リード要求のリードアクセス対象領域がアクセス要求格納部に格納されている各アクセス要求のアクセス対象領域と重なるか否かを照合して、リードアクセス対象領域がライト要求のライトアクセス対象領域と重なる場合、アクセス要求格納部から当該ライト要求が有するライトデータを取得してリードデータとしてCPUへ返し、DMA転送要求の転送元領域と重なる場合、当該DMA転送要求に先行して当該リード要求を調停回路部へ発行し、DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換したリード要求を調停回路部へ発行する。このようにすることで、CPUから後続して発行されたアクセス要求がアクセス要求格納部のアクセスを追い越すことにより、CPUの待ち時間を短縮することができ、かつ上記格納部に格納されているDMA転送要求の転送領域とアクセス対象領域が重なるリード要求であっても、短い時間で正しいリードデータを取得することが可能となる。 According to the present invention, it is checked whether the read access target area of the read request overlaps with the access target area of each access request stored in the access request storage unit. If it overlaps the target area, the write data of the write request is acquired from the access request storage unit and returned to the CPU as read data. If it overlaps the transfer source area of the DMA transfer request, the read data precedes the DMA transfer request. When the request is issued to the arbitration circuit unit and overlaps with the transfer destination area of the DMA transfer request, a read request in which the read access target area is converted to the transfer source area of the DMA transfer request is issued to the arbitration circuit part. By doing so, the access request issued subsequently from the CPU overtakes the access of the access request storage unit, so that the waiting time of the CPU can be shortened and the DMA stored in the storage unit Even in the case of a read request in which the transfer area of the transfer request and the access target area overlap, it is possible to acquire correct read data in a short time.
実施の形態1.
図1は、この発明の実施の形態1によるバッファ装置を用いたメモリシステムの構成を示すブロック図である。図1において、このメモリシステムは、システムバスで互いに接続されたバッファ装置1、CPU(中央処理装置、プロセッサともいう)2、CPUI/F部3、DMA転送要求受付部4及びメモリ5を備え、バッファ装置1は、アクセス要求格納部10、DMA制御部11、調停回路部12、アクセス要求制御部(格納制御部)13、リードアクセス処理部14及びアクセス分配部15を備える。ここで、DMAとは、CPUの命令(機械語)を使わず、メモリ間で直接データを転送することをいう。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing the configuration of a memory system using a buffer device according to Embodiment 1 of the present invention. In FIG. 1, this memory system includes a buffer device 1, a CPU (also called a central processing unit, also referred to as a processor) 2, a CPU I /
CPU2が発行したアクセスは、CPUI/F部3によってDMA転送要求受付部4とバッファ装置1に振り分けられる。ライト要求は、バッファ装置1内のアクセス要求格納部10へ発行され、リード要求は、リードアクセス処理部14へ発行される。DMA転送要求受付部4では、CPU2からDMA転送要求を分割された情報で受け付け、これら分割された情報の全てが揃った時点でバッファ装置1にDMA転送要求を発行する。
The access issued by the CPU 2 is distributed to the DMA transfer
ライト要求とDMA転送要求は、アクセス要求格納部10へ格納される。アクセス要求格納部10は、ライト要求とDMA転送要求を複数受け付けることができるFIFOになっており、基本的には先に格納したアクセス要求から順番にアクセス分配部15へ発行する。
The write request and the DMA transfer request are stored in the access
また、FIFOの全てのエントリは自由に参照可能とする。アクセス要求制御部13は、アクセス要求格納部10の動作を制御しており、先に示した基本動作以外にアクセス要求格納部10内にあるFIFOの各エントリに対して新しい要求を挿入する、エントリ同士を入れ替えるといった処理が可能である。この機能については、実施の形態2以降で説明する。
All entries in the FIFO can be freely referred to. The access
(1)バッファ装置1の通常動作
バッファ装置1が、CPU2が発行したライト要求を受けて通常動作する場合について説明する。CPU2から発行されたライト要求は、CPUI/F部3を通ってアクセス要求格納部10へ格納される。
(1) Normal Operation of Buffer Device 1 A case where the buffer device 1 operates normally in response to a write request issued by the CPU 2 will be described. The write request issued from the CPU 2 is stored in the access
CPU2から見たライト要求は、バッファ装置1のアクセス要求格納部10に格納された時点で終了であり、CPUI/F部3を経由してCPU2にACK(アクセス終了)応答を返す。アクセス要求格納部10が一杯でライト要求が受け付けられなかった場合は、CPU2に対するACK応答の出力を停止してCPU2を待ち状態とする。
The write request viewed from the CPU 2 ends when it is stored in the access
このように、アクセス要求格納部10がCPU2から発行されたライト要求を格納できる間は、CPU2が、ACK応答を受けて処理を先へ進めることが可能であるが、アクセス要求格納部10が一杯になった時点で、最低1つはアクセス要求格納部10が空くまで、CPU2を待たせる必要がある。
As described above, while the access
(2)CPU2がDMA転送要求を発行した場合
図1に示すように、DMA転送要求受付部4は、転送元アドレスレジスタ40、転送先アドレスレジスタ41、転送データ数レジスタ42及び転送開始レジスタ43を備える。CPU2が、CPUI/F部3を経由して、転送元アドレスレジスタ40、転送先アドレスレジスタ41、転送データ数レジスタ42及び転送開始レジスタ43を任意の順番で設定し、転送開始レジスタ43へのライトアクセスをトリガとしてDMA転送要求をバッファ装置1へ転送する。DMA転送要求受付部4は、内部のレジスタに対してCPU2からライト要求が発行されると、CPU2に対してACK応答を返す。
(2) When CPU 2 issues a DMA transfer request As shown in FIG. 1, the DMA transfer
DMA転送要求は、これまでに発行された他のライト要求とともにアクセス要求格納部10に格納され、FIFOの先頭にあるアクセス要求から処理される。ここで、アクセス要求格納部10でアクセス要求を登録するテーブルが空いていない場合、DMA転送要求受付部4が、転送開始レジスタ43へのライト要求に対してACK応答を返さないことにより、CPU2を待ち状態に移行させる。なお、DMA転送要求受付部4にある、バッファ装置1へ転送するDMA転送要求を生成するレジスタ40〜43の構成は一例である。
The DMA transfer request is stored in the access
(3)アクセス要求格納部10の詳細
図2は、図1中のアクセス要求格納部の構成を示す図であり、アクセス要求格納部10は、アクセス要求に関する情報が登録されるテーブルデータで構成される。ここで、アクセス要求に関する情報は、フラグ100、種別101、アドレス102、アドレスデータ103及び付加情報104の5つの項目情報からなる。これら項目情報の組み合わせをアクセス要求エントリ105と呼び、図2に示す例は、アクセス要求を8個受けられるFIFOを記載している。なお、図2では、8段のアクセス要求格納部10に対して、FIFOの先頭段をアクセス要求エントリ105−0とし、最後の段をアクセス要求エントリ105−7とする。
(3) Details of Access Request Storage Unit FIG. 2 is a diagram showing the configuration of the access request storage unit in FIG. 1, and the access
また、フラグ100にはアクセス要求が有効であるか否かが設定され、種別101にはDMA転送要求とライト要求とを区別する識別情報が設定される。アドレス102には、ライト要求であればライトアドレスが設定され、DMA転送要求であれば転送元アドレスが設定される。アドレスデータ103には、ライト要求であればライトデータが設定され、DMA転送要求であれば転送先アドレスが設定される。
Whether the access request is valid is set in the
さらに、付加情報104には、ライト要求であれば、ライトデータを構成するアドレス指定されたバイトレーンの有効又は無効を示すバイトイネーブル情報が設定され、DMA転送要求であると、DMAによってブロック転送されるサイズが設定される。アクセス要求格納部10に格納されたアクセス要求は、図2中に矢印で示すように、先に格納された古いアクセス要求エントリ105−0のアクセス要求から順にアクセス発行される。
Further, in the
アクセス要求格納部10に登録されたアクセス要求は、上述したアクセス発行順にアクセス分配部15へ出力される。アクセス分配部15では、ライト要求を調停回路部12へ直接発行し、DMA転送要求をDMA制御部11へ発行する。DMA転送要求を受けたDMA制御部11によってDMAが実行されると、DMA制御部11から多数のアクセス要求が調停回路部12へ発行される。このように、DMA転送に必要な情報をFIFOの1エントリとしてアクセス要求格納部10に格納することにより、バッファ装置1を効率的に使用でき、バッファ装置1があふれる、すなわちアクセス要求がアクセス要求格納部10の容量を超えてしまう確率を低く抑えることができる。
The access requests registered in the access
(4)リードアクセス処理の詳細
図1に示すように、リードアクセス処理部14は、アドレス変換部141及びライトバッファ照合部142を備える。CPU2からCPUI/F部3を経由して発行されたリード要求は、このリードアクセス処理部14へ通知される。アドレス変換部141は、リード要求を入力して、ライトバッファ照合部142に出力する。
(4) Details of Read Access Processing As shown in FIG. 1, the read
ライトバッファ照合部142は、リードアクセス対象となるリードアドレスが、アクセス要求格納部10に格納されているライト要求やDMA転送要求のアクセス対象領域に重なっていなければ、当該リード要求を調停回路部12へ発行する。また、調停回路部12では、リード要求、ライト要求及びDMA転送要求の順で優先度をつけて処理するため、リード要求は速やかに実行される。
If the read address to be read-accessed does not overlap the access request area of the write request or DMA transfer request stored in the access
一方、リードアドレスが、アクセス要求格納部10に格納されているライト要求のアドレス(アドレス102に設定されるアドレス)と一致する場合、ライトバッファ照合部142は、アドレス変換部141を経由して、アクセス要求格納部10のアドレスデータ103からライトデータを取得する。ライトバッファ照合部142では、取得したライトデータを、CPUI/F部3を経由してCPU2へリードデータとして返す。
On the other hand, when the read address matches the address of the write request stored in the access request storage unit 10 (the address set in the address 102), the write
また、ライト要求は、図2で示したように付加情報104としてバイトイネーブルを有するため、ライトバッファ照合部142は、一致したバイトレーンのデータをリードデータとして保持する。この後、ライトバッファ照合部142は、アクセス要求格納部10の照合処理を継続して、リード要求されている全てのリードデータが揃った時点で照合処理を終了するとともに、リードデータをCPU2へ返す。
Since the write request has byte enable as the
ライトバッファ照合部142は、アクセス要求格納部10の照合処理によってリードデータが全て揃えば、実際にメモリ5へのアクセスは実行しない。リードデータが不足している場合、ライトバッファ照合部142は、調停回路部12へリード要求を発行し、不足したデータをメモリ5から読み出したデータで補ってリードデータを生成する。
The write
また、リードアドレスが、アクセス要求格納部10に格納されているDMA転送要求の転送元領域(転送元アドレスと転送サイズで指定されるメモリ5の記憶領域)と重なる場合、ライトバッファ照合部142は、リード要求を先行して処理することが可能である。つまり、ライトバッファ照合部142が、調停回路部12に指示することにより、メモリ5の当該転送元領域からリードデータを読み出し、CPUI/F部3を経由してCPU2へ返す。なお、DMA転送要求の転送元領域はDMA処理では変わらないため、リードアクセスに対してアドレス変換処理を行う必要はない。
When the read address overlaps the transfer source area of the DMA transfer request stored in the access request storage unit 10 (the storage area of the memory 5 specified by the transfer source address and the transfer size), the write
リードアドレスが、メモリ5のDMA転送先領域(転送先アドレスと転送サイズで指定されるメモリ5の記憶領域)に含まれている場合、DMA転送とリードアクセスを実行する順序を入れ替えると、正しいデータが得られない可能性がある。この場合、アクセス要求格納部10に格納されているDMA転送要求を使用して、DMA転送先のアドレスをDMA転送元のアドレスに変換してリードアクセスを実施する。つまり、変換後のアドレスをリードアドレスとする。ここで、DMA転送先領域には、DMA転送元領域からデータがコピーされるので、DMA転送前であっても、変換後のDMA転送元領域へリードアクセスすることによって、アクセスの発行順に関わらず、正しい値を得ることが可能である。
If the read address is included in the DMA transfer destination area of the memory 5 (the storage area of the memory 5 specified by the transfer destination address and transfer size), the correct data will be obtained if the order of executing DMA transfer and read access is changed. May not be obtained. In this case, the DMA transfer request stored in the access
具体的には、アドレス変換部141が、DMA転送要求の転送元アドレス及び転送先アドレスと、リード要求のリードアドレスとから、下記式(1)に従って転送元アドレスを算出し、このアドレスへのリード要求に置き換えて処理を継続する。DMA転送要求にてアドレス変換が行われた場合、その後に継続されるライトバッファ照合部142の照合処理は、変換後のアドレスを用いて実施される。
変換後の転送元アドレス
=リードアドレス−転送先アドレス+転送元アドレス ・・・(1)
Specifically, the
Transfer source address after conversion = read address-transfer destination address + transfer source address (1)
図3は、図1中のリードアクセス処理部の動作例を示す図であり、アクセス要求格納部10に8個のアクセス要求が格納されている状態でリード要求が発行された場合を示している。図3中のアドレス欄には、ライト要求に関しては、アクセス要求格納部10に格納されているライトアドレスと、CPU2がリードアクセス処理部14へ発行したリードアドレスとが一致したか否かが「一致」又は「不一致」で判定され、DMA転送要求に関しては、アクセス要求格納部10に格納されているDMA転送情報の転送先領域とリードアドレスとが重なっているか否かが「含む」又は「含まない」で判定される。
FIG. 3 is a diagram illustrating an operation example of the read access processing unit in FIG. 1, and illustrates a case where a read request is issued in a state where eight access requests are stored in the access
ライトバッファ照合部142が、アクセス要求格納部10に格納される情報を用いてリード要求と照合する際、アクセス要求格納部10に格納されるアクセス要求を最も後に格納された新しい順から照合して、アドレスとバイトイネーブル情報によって該当するバイトレーンを抽出する。また、バイトレーン毎に新しいアクセス要求エントリ105を優先し、リードデータを生成する。
When the write
例えば、最も新しいアクセス要求エントリ105−7のライト要求は、ライトアドレス(アドレス102に設定されるライトアドレス)と、リードアドレスとが一致している。そこで、ライトバッファ照合部142は、当該ライト要求のライトデータ(データ103に設定されるライトデータ)のうち、バイトイネーブル(付加情報104に設定されるバイトイネーブル)情報によって有効となるバイトレーンを抽出して、リードデータを構成するリードデータバイト3として保持する。
For example, in the write request of the newest access request entry 105-7, the write address (write address set in the address 102) matches the read address. Therefore, the write
次に、ライトバッファ照合部142は、バイトイネーブル情報に基づいて、リードデータバイト3に続いてリードデータを構成するリードデータバイト2に対応するバイトレーンが有効であることから、ライトデータから当該バイトレーンを抽出し、リードデータバイト2として保持する。
Next, since the byte lane corresponding to the read data byte 2 constituting the read data is valid following the read
この後、アクセス要求エントリ105−7のライトデータにおいて、リードデータバイト2に続くリードデータバイト1に対応するバイトレーンが無効であるので、ライトバッファ照合部142は、次に新しいアクセス要求エントリ105−6のライト要求のバイトイネーブル情報から、リードデータバイト1に対応するバイトレーンが有効か否かを判定する。ここでは、当該バイトレーンが有効であるので、アクセス要求エントリ105−6のライトデータから当該バイトレーンを抽出し、リードバイト1として保持する。
Thereafter, in the write data of the access request entry 105-7, since the byte lane corresponding to the read data byte 1 following the read data byte 2 is invalid, the write
アクセス要求エントリ105−6のライトデータにおいて、リードデータバイト1に続くリードデータバイト0に対応するバイトレーンが無効であるので、ライトバッファ照合部142は、次に新しいアクセス要求エントリ105−5の情報との間で照合処理を実行する。
In the write data of the access request entry 105-6, since the byte lane corresponding to the read data byte 0 following the read data byte 1 is invalid, the write
ここで、アクセス要求エントリ105−5にはDMA転送要求が設定されており、リードアドレスが転送先領域に含まれているので、アドレス変換部141が、当該リードアドレス、アクセス要求エントリ105−5に設定される転送先アドレス及び転送元アドレスを用いて、上記式(1)から転送先アドレスを転送元アドレスに変換して、変換後のアドレスをリードアドレスとする(図3中アドレスが変わると表記)。
Here, since the DMA transfer request is set in the access request entry 105-5 and the read address is included in the transfer destination area, the
この後、ライトバッファ照合部142は、アドレス変換部141で算出された変換後のリードアドレスと、アクセス要求エントリ105−4のライト要求のライトアドレスとを照合して不一致と判定し、同様にアクセス要求エントリ105−3のライト要求のライトアドレスと照合して不一致と判定する。
Thereafter, the write
アクセス要求エントリ105−2のライト要求のライトアドレスと変換後のリードアドレスとが一致する(図3中変わったアドレスと一致と表記)ので、ライトバッファ照合部142は、アクセス要求エントリ105−2のバイトイネーブル情報に基づいて、リードデータバイト0に対応するバイトレーンが有効であると判定し、アクセス要求エントリ105−2のライトデータから当該バイトレーンを抽出して、リードバイト0として保持する。なお、リードバイト3〜1に対応するバイトレーンについては、他のエントリにより既に保持されているので、バイトイネーブル情報で有効であっても保持されない。
Since the write address of the write request of the access request entry 105-2 matches the read address after conversion (indicated as a match with the changed address in FIG. 3), the write
この後、ライトバッファ照合部142は、アドレス変換部141で算出された変換後のリードアドレスと、アクセス要求エントリ105−1のライト要求のライトアドレスとを照合して不一致と判定し、同様にアクセス要求エントリ105−0のライト要求のライトアドレスと照合して不一致と判定する。このように、アクセス要求エントリ4からアクセス要求エントリ0までは、ライトバッファ照合部142が、アドレス変換部141により変換されたアドレスとの間で照合が行われる。
Thereafter, the write
以上のように、この実施の形態1によれば、リード要求のリードアクセス対象領域がアクセス要求格納部10に格納される各アクセス要求のアクセス対象領域と重なるか否かを照合して、リードアクセス対象領域がライト要求のライトアクセス対象領域と重なる場合、アクセス要求格納部10から当該ライト要求が有するライトデータを取得してリードデータとしてCPU2へ返し、DMA転送要求の転送元領域と重なる場合、当該DMA転送要求に先行して当該リード要求を調停回路部12へ発行し、DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換したリード要求を調停回路部12へ発行する。このようにすることにより、CPU2から後続して発行されたアクセス要求が、アクセス要求格納部10のアクセスを追い越すことができ、CPU2の待ち時間を短縮することが可能である。また、アクセス要求格納部10に格納されているDMA転送要求の転送領域とアクセス対象領域が重なるリード要求であっても、短い時間で正しいリードデータを取得することが可能となる。
As described above, according to the first embodiment, whether or not the read access target area of the read request overlaps with the access target area of each access request stored in the access
また、この実施の形態1によれば、リードアクセス処理部14が、リード要求のリードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換すると、当該変換後のリードアクセス対象領域が、アクセス要求格納部10に格納されている当該DMA転送要求以降の各アクセス要求のアクセス対象領域と重なるか否かを照合するので、アドレス変換した後であっても、アクセス要求の発行順を制御することができる。また、アクセス要求がアクセス要求格納部10の容量以上となる頻度を低く抑えることができる。
Further, according to the first embodiment, when the read
実施の形態2.
この実施の形態2では、DMA転送要求やライト要求の中で順序を入れ替えても問題がないものについて、アクセス処理時間の短い要求から優先して実施するバッファ装置について説明する。
Embodiment 2.
In the second embodiment, a description will be given of a buffer device that is prioritized from a request with a short access processing time for a DMA transfer request or a write request that does not cause a problem even if the order is changed.
実施の形態2によるメモリシステムは、上記実施の形態1で図1を用いて説明したものと基本的な構成は同一であるが、アクセス要求制御部が、アクセス要求格納部にあるアクセス要求の実行順序を入れ替える処理を行う点で異なる。以降では、実施の形態2によるメモリシステムの各構成について、図1を用いて説明する。 The memory system according to the second embodiment has the same basic configuration as that described with reference to FIG. 1 in the first embodiment, but the access request control unit executes an access request in the access request storage unit. It differs in that the process of changing the order is performed. Hereinafter, each configuration of the memory system according to the second embodiment will be described with reference to FIG.
図4は、この発明の実施の形態2によるアクセス要求制御部の動作例を示す図である。図4に示す例では、アクセス要求制御部13が、アクセス要求格納部10のアクセス要求エントリ105−7からアクセス要求エントリ105−4までのアクセス要求を無効とし、アクセス要求エントリ105−3に新しくライト要求を追加し、それまでにおけるアクセス要求エントリ105−2にライト要求を格納し、アクセス要求エントリ105−1,105−0にDMA転送要求を格納している。
FIG. 4 is a diagram showing an operation example of the access request control unit according to the second embodiment of the present invention. In the example shown in FIG. 4, the access
(1)追い越し処理の概要
また、アクセス要求制御部13は、アクセス要求格納部10において、新しく追加されたアクセス要求エントリ105−3のフラグ100に「新規」を設定する。この後、アクセス要求制御部13は、フラグ100が「新規」のライト要求については、一つ前のアクセス要求エントリ105−2のアクセス要求に対して追い越しが可能であるか否かを判定する。ここで、追い越しが可能であれば、アクセス要求エントリ105−3のライト要求を、一つ前のアクセス要求エントリ105−2のアクセス要求と入れ替える。この入れ替え処理は、追い越し不可と判定されるまで実行される。アクセス要求格納部10において追い越し不可となった時点のアクセス要求エントリのフラグ100が有効に変更される。
(1) Overview of Overtaking Process Further, the access
先行するアクセス要求エントリに対してライト要求が追い越し可能な条件としては、先行するアクセス要求エントリのライト要求やDMA転送要求についてのアクセス対象領域と、判定対象のアクセス要求エントリのライト要求におけるライト対象領域とが重なっていないことが挙げられる。 The conditions under which the write request can be overtaken with respect to the preceding access request entry include the access target area for the write request or DMA transfer request of the preceding access request entry, and the write target area for the write request of the access request entry to be determined And are not overlapping.
なお、アクセス要求制御部13が、アクセス要求格納部10にある全てのアクセス要求エントリのライト要求やDMA転送要求と追加すべきライト要求とのアクセス対象領域を一度に比較して、アクセス要求格納部10内で当該追加すべきライト要求を挿入するアクセス要求エントリを特定するようにしてもよい。
The access
上述したように、アクセス要求制御部13は、CPU2が発行したライト要求をアクセス要求格納部10が受けると、当該ライト要求のライトアクセス対象領域とアクセス要求格納部10のアクセス要求のアクセス対象領域とが重なるか否かによって挿入すべきアクセス要求エントリを決定する。
As described above, when the access
(2)複数のDMA転送要求がFIFOにエントリされている場合
ここで、アクセス要求格納部10に複数のDMA転送要求がエントリされている場合、アクセス要求制御部13は、アクセス要求格納部10のテーブルにおいて、先に格納されている古いDMA転送要求から転送領域の判定を行い、新たに発行されたライト要求のライトアクセス対象領域と転送領域が重なっていないDMA転送要求については追い越し可能と判定する。ライト要求同士であっても同様に処理可能であり、先行するライト要求に対して新しく発行されたライト要求は領域が重ならない限り追い越し可能と判定される。
(2) When a plurality of DMA transfer requests are entered in the FIFO Here, when a plurality of DMA transfer requests are entered in the access
上述した判定条件では、CPU2から新たに発行されたライト要求の対象アドレスが、アクセス要求格納部10に格納されている全てのアクセス要求エントリ105のアクセス対象領域と全く一致しない(全く含まれない)場合であれば、アクセス要求格納部10に格納されている全てのアクセス要求を追い越して調停回路部12へ直接アクセスを発行することが可能である。しかしながら、DMA制御部11によってDMAが実行中であると、当該DMA転送要求との追い越し可否の判定が行われていないため、当該DMAの点祖領域とライト要求のアクセス対象領域が重なっていると、不具合が生じる可能性がある。
Under the determination conditions described above, the target address of the write request newly issued from the CPU 2 does not match the access target areas of all the access request entries 105 stored in the access request storage unit 10 (not included at all). If so, it is possible to pass all access requests stored in the access
そこで、この実施の形態2では、アクセス要求格納部10からアクセス分配部15を経由してDMA制御部11へDMA転送要求を出力するにあたり、アクセス要求制御部13が、DMA制御部11へ出力するDMA転送要求を、アクセス要求格納部10の先頭にあるアクセス要求エントリ105−0にも残しておく。
これにより、アクセス要求制御部13は、DMA制御部11により実行されているDMA転送要求についても、アクセス要求エントリ105−0の転送領域と新たなライト要求のアクセス対象領域との比較により、上記と同様の手順で追い越し可否の判定を行うことが可能である。
なお、アクセス要求制御部13は、DMA制御部11から当該DMA転送要求の実行終了の通知を受けると、アクセス要求エントリ105−0に残したDMA転送要求を削除してFIFOを一段進める。
Therefore, in the second embodiment, the access
Thereby, the access
When the access
(3)DMA転送要求受付部4からDMA転送要求が発行された際の処理
アクセス要求制御部13は、DMA転送要求受付部4から新たに発行されたDMA転送要求の転送領域と、アクセス要求格納部10に先に格納されている古いアクセス要求のアクセス対象領域(ライト要求のライト対象領域若しくはDMA転送要求の転送領域)との比較を行い、新たなDMA転送要求の転送領域とアクセス対象領域が重なっていないアクセス要求については追い越し可能と判定する。
なお、ここでは、バッファ装置1を効率的に使用する観点から、新たに発行されたDMA転送要求で転送すべきデータの転送サイズ(付加情報104に設定されたサイズで特定可能)が、先行するDMA転送要求の転送サイズより小さい場合に限って追い越すこととする。
(3) Processing when a DMA transfer request is issued from the DMA transfer
Here, from the viewpoint of efficiently using the buffer device 1, the transfer size of data to be transferred by a newly issued DMA transfer request (which can be specified by the size set in the additional information 104) precedes. Only when it is smaller than the transfer size of the DMA transfer request, it is overtaken.
以上のように、この実施の形態2では、アクセス要求制御部13が、CPU2から発行されたアクセス要求のアクセス対象領域が、アクセス要求格納部10に格納されているアクセス要求のアクセス対象領域と重ならない場合、CPU2から発行されたアクセス要求をアクセス要求格納部10に格納されているアクセス要求に先行してアクセス分配部15へ出力する。このようにすることで、アクセス要求格納部10で未使用のアクセス要求エントリ105を多く確保でき、処理時間の短い要求を優先して処理することが可能である。これにより、転送結果が異常にならない範囲、つまり転送領域が重ならない範囲で転送サイズの小さいDMA転送要求が転送サイズの大きい転送要求を追い越すこともできる。
As described above, in the second embodiment, the access
実施の形態3.
上記実施の形態2では、DMA制御部11で実行中のDMA転送要求が、アクセス要求格納部10のアクセス要求エントリ105−0にも残され、新たに発行されたライト要求のアクセス対象領域が、当該DMA転送要求の転送領域と重ならなければ、追い越し可能と判定されて調停回路部12へ直接発行することができた。
しかしながら、DMA制御部11は、一旦実行を開始したDMAを中断することができないDMAを実行中であれば、後続のDMA転送要求は、アクセス要求エントリ105−1以降に格納されたまま待つ必要があった。
そこで、この実施の形態3では、大きな転送サイズのDMA転送要求を分割して実行しながら、転送サイズの小さなDMA転送要求が発行された時点で実施するDMA転送要求を切り替えるようにしたものである。
In the second embodiment, the DMA transfer request being executed by the DMA control unit 11 is also left in the access request entry 105-0 of the access
However, the DMA control unit 11 must wait for the subsequent DMA transfer request to be stored after the access request entry 105-1 if the DMA that is once unable to be interrupted is being executed. there were.
Therefore, in the third embodiment, DMA transfer requests to be executed when a DMA transfer request with a small transfer size is issued are switched while a DMA transfer request with a large transfer size is divided and executed. .
実施の形態3によるメモリシステムは、上記実施の形態1で図1を用いて説明したものと基本的な構成は同一であるが、アクセス要求制御部が、アクセス要求格納部にあるアクセス要求の実行順序を入れ替える処理を行う点で異なる。以降では、実施の形態3によるメモリシステムの各構成について、図1を用いて説明する。 The basic configuration of the memory system according to the third embodiment is the same as that described with reference to FIG. 1 in the first embodiment, but the access request control unit executes the access request in the access request storage unit. It differs in that the process of changing the order is performed. Hereinafter, each configuration of the memory system according to the third embodiment will be described with reference to FIG.
図5は、この発明の実施の形態3によるアクセス要求制御部の動作例を示す図である。実施の形態3によるアクセス要求制御部13には、DMA制御部11に対して、DMA転送要求を所定の転送サイズ毎に分割して実行させるための当該所定の転送サイズを規定するDMA最大実行サイズ情報106が設定されている。図5において、アクセス発行が進み、アクセス要求エントリ105−1に格納されているDMA転送要求をアクセス要求エントリ105−0へ移動する場合を考える。
FIG. 5 is a diagram illustrating an operation example of the access request control unit according to the third embodiment of the present invention. The access
このとき、アクセス要求制御部13は、移動しようとしているDMA転送要求の付加情報104に設定された転送サイズが、DMA最大実行サイズ情報106で規定される転送サイズを超えていれば、当該DMA転送要求を、DMA最大実行サイズ情報106で規定される転送サイズ分だけ分割して、先にアクセス要求エントリ105−0へ移動し、アクセス要求エントリ105−1に残したDMA転送要求に関するDMA情報を更新する。
At this time, if the transfer size set in the
アクセス要求エントリ105−0へ分割されて発行されたDMA転送要求は、フラグ100、種別101、転送元アドレス102、転送先アドレス103の内容はそのままで、付加情報104に格納される転送サイズが、DMA最大サイズ情報106に規定される転送サイズに変更される。
The DMA transfer request issued after being divided into access request entries 105-0 has the transfer size stored in the
また、アクセス要求制御部13は、アクセス要求エントリ105−1に残されるDMA転送要求についてフラグ100及び種別101の内容をそのまま保持し、転送元アドレス102を「転送元アドレス102+DMA最大サイズ情報106で規定される転送サイズ」とし、転送先アドレス103を「転送先アドレス103+DMA最大サイズ情報106で規定される転送サイズ」とし、付加情報104を「転送サイズ−DMA最大サイズ情報106で規定される転送サイズ」とする。
Further, the access
DMA制御部11は、アクセス要求エントリ105−0に格納されたDMA最大サイズ情報106に規定される所定の転送サイズ分のDMA転送要求を実行する。当該DMAが完了すると、アクセス要求制御部13は、アクセス要求エントリ105−1に残したDMA転送要求の更新後の転送サイズが、DMA最大実行サイズ情報106で規定される転送サイズを超えていれば、上述と同様の手順で、当該DMA転送要求を、DMA最大実行サイズ情報106で規定される転送サイズ分だけ分割して、先にアクセス要求エントリ105−0へ移動し、アクセス要求エントリ105−1に残したDMA転送要求に関するDMA情報を更新する。また、DMA最大実行サイズ情報106で規定される転送サイズを超えていなければ、そのままアクセス要求エントリ105−0へ移動し、アクセス分配部15へ出力する。
The DMA control unit 11 executes a DMA transfer request for a predetermined transfer size specified in the DMA
さらに、アクセス要求制御部13は、DMA制御部11がDMAを実行中、アクセス要求エントリ105−0に残されたDMA転送要求よりも小さい転送サイズのDMA転送要求がアクセス要求エントリ105−1に発行された場合、両DMA転送要求の転送領域間に重なりがなければ、上記残されたDMA転送要求をアクセス要求エントリ105−1へ移動して、新たに発行されたDMA転送要求をアクセス要求エントリ105−0に移動する。
Further, the access
このように、アクセス要求制御部13は、上記と同様にして、DMA最大実行サイズ情報106で規定される転送サイズ以下のDMA転送要求に分割するとともに、新たに転送サイズが小さいDMA転送要求が発行されると、転送領域に重なりがなければ、転送サイズが小さい順にアクセス分配部15へ出力するDMA転送要求を切り替える。
As described above, the access
以上のように、この実施の形態3によれば、アクセス要求制御部13が、アクセス要求格納部10に出力順でDMA転送要求が並んでいる場合、転送領域の重なりがないことを条件として、DMA転送サイズの小さいDMA転送要求が先行するようアクセス要求格納部10からの出力順を入れ替える。特に、アクセス要求格納部10からDMA転送要求をアクセス分配部15へ出力するにあたり、DMA転送サイズが所定値以下となるようにDMA転送サイズを分割した新たなDMA転送要求を生成して、DMA転送サイズが小さい順にアクセス要求格納部10から出力する。このように、大きな転送サイズのDMA転送要求を小さく区切って実行しながら、転送サイズの小さなDMA転送要求が発行された時点で実施するDMA転送要求を切り替えることによって、速やかにバッファ装置1の記憶領域を空けることが可能となる。
As described above, according to the third embodiment, when the DMA request is arranged in the output order in the access
実施の形態4.
上記実施の形態1〜3では、リードアクセス処理部14において、アドレス変換部141やライトバッファ照合部142にアクセス要求エントリと同じ数の照合回路が必要であるが、この実施の形態4は、リード要求に対する処理を複数のクロックにそれぞれ同期した処理に分割して実行することによって、1系統の照合回路として回路規模の削減を図っている。
In the first to third embodiments, the read
実施の形態4によるメモリシステムは、上記実施の形態1で図1を用いて説明したものと基本的な構成は同一であるが、リードデータ処理部の構成が異なる。そこで、リードデータ処理部以外の構成については、図1を参照して説明する。
図6は、この発明の実施の形態4によるリードアクセス処理部の構成を示すブロック図である。図6において、実施の形態4によるリードアクセス処理部14は、要求エントリセレクタ310、カウンタ311、制御回路312、セレクタ313、リードデータ抽出部314、アドレス変換部315、アドレス保持部316、リードアクセス発行回路317、及びデータ保持部318を備える。
The basic configuration of the memory system according to the fourth embodiment is the same as that described with reference to FIG. 1 in the first embodiment, but the configuration of the read data processing unit is different. The configuration other than the read data processing unit will be described with reference to FIG.
FIG. 6 is a block diagram showing the configuration of the read access processing unit according to the fourth embodiment of the present invention. In FIG. 6, the read
要求エントリセレクタ310は、カウンタ311によるカウント動作に同期して、アクセス要求格納部10のアクセス要求エントリ105−7〜105−0のうちから処理対象となるアクセス要求エントリ105を選択する。カウンタ311は、制御回路312によってカウント開始と停止が制御されるカウンタである。制御回路312は、リードアクセス処理部14の全体動作を制御する。
The
セレクタ313は、リード要求のリードアドレス及びアドレス保持部316が保持するアドレスのうちから、照合処理に用いるアドレスを選択する。リードデータ抽出部314は、要求エントリセレクタ310で選択されたアクセス要求エントリ105のライト要求とセレクタ313で選択されたアドレスで規定されるアクセス範囲とが重なっているか判定し、重なっている場合には、アクセス要求エントリ105のライトデータから重なっている部分のバイトレーンのデータを抽出する。
The
アドレス変換部315は、セレクタ313で選択されたアドレスが、アクセス要求エントリ105のDMA転送要求の転送先領域に含まれている場合、転送先アドレスを転送元アドレスに変換してリードアドレスとする。アドレス保持部316は、CPU2から発行されたリード要求のリードアドレス及びアドレス変換部315により変換された変換後のリードアドレスを保持する。リードアクセス発行回路317は、制御回路312の制御に従ってリード要求を調停回路部12に発行する。データ保持部318は、リードデータ抽出部314で抽出されたバイトレーンのデータを保持し、全てのデータが揃った時点でリードアクセス発行回路317へ出力する。
When the address selected by the
次に動作について説明する。
(1)要求エントリセレクタ310によりライト要求が選択された場合
要求エントリセレクタ310は、カウンタ311によって生成されたクロック毎、即ちカウンタ311のカウント値を使用してアクセス要求格納部10からアクセス要求エントリ105−7〜105−0の順で処理対象のアクセス要求エントリを選択する。
Next, the operation will be described.
(1) When a Write Request is Selected by the
一方、セレクタ313は、CPU2からCPUI/F部3を経由して発行されたリード要求のリードアドレスを初回の照合処理にのみ使用し、2回目以降の照合処理にはアドレス保持部316に保持されるアドレスを使用する。つまり、セレクタ313は、CPU2から発行されたリード要求のリードアドレスを入力してリードデータ抽出部314に出力することにより、初回の照合処理が実行され、当該リードアドレスはアドレス変換部315を経由してアドレス保持部316に保持される。セレクタ313は、アドレス保持部316に保持された上記リードアドレス又はアドレス変換部315で変換されたアドレスを選択してリードデータ抽出部314に出力することにより、2回目以降の照合処理が実行される。
On the other hand, the
リードデータ抽出部314は、セレクタ313によって選択されたリードアドレスで指定されるメモリ5の記憶領域と、要求エントリセレクタ310によって選択されたアクセス要求エントリ105のライト要求のライトアドレスで指定されるメモリ5の記憶領域とが重なっているか否かの照合処理を行う。このとき、両者が重なっていれば、リードデータ抽出部314は、当該アクセス要求エントリ105のライト要求のバイトイネーブル情報により有効とされた重なっている部分に対応するバイトレーンのデータをライトデータから抽出してデータ保持部318に出力する。
The read
データ保持部318は、リードデータ抽出部314から入力したデータをリードバイトとして保持する。上述した照合処理は、データ保持部318において、リード要求されたデータが全て揃うまで、要求エントリセレクタ310で順に選択されたアクセス要求エントリ105のライト要求に対して実行される。
The
リードデータ抽出部314は、データ保持部318において、リード要求されたデータが全て揃った時点で、アクセス要求格納部10から選択したアクセス要求エントリ105のライト要求に対する照合処理を終了する。このとき、データ保持部318は、全てのデータが揃ったリードデータを照合処理の完了通知とともに制御回路312へ出力する。制御回路312は、照合処理の完了通知を受けると、データ保持部318から入力したデータを、CPUI/F部3を経由してCPU2へ返す。
The read
なお、データ保持部318は、要求エントリセレクタ310によってアクセス要求格納部10から選択された全てのアクセス要求エントリ105に対する照合処理が終了した時点で、全てのデータが揃わなかった場合、その旨を制御回路312に通知する。制御回路312は、当該通知を受けると、上記照合処理で使用された、不足分のデータに対応するリードアドレスに関するリード要求の発行を指示するリードアクセス発行指示をリードアクセス発行回路317へ通知する。
Note that the
リードアクセス発行回路317は、制御回路312から上記リードアクセス発行指示を受けると、不足分のデータのリードアドレスに関するリード要求を調停回路部12へ発行する。調停回路部12は、当該リード要求を実行して、不足分のデータをメモリ5から取得しデータ保持部318へ出力する。データ保持部318では、調停回路部12から入力したデータでリードデータの不足分を補い、当該リードデータ及び処理が完了した旨を制御回路312に出力する。これにより、制御回路312は、データ保持部318から入力したデータを、CPUI/F部3を経由してCPU2へ返す。
When the read
(2)要求エントリセレクタ310によりDMA転送要求が選択された場合
アドレス変換部315は、要求エントリセレクタ310により選択されたアクセス要求エントリ105がDMA転送要求であると、セレクタ313によって選択されたリードアドレスが当該DMA転送要求の転送先領域に含まれるか否かを判定し、含まれる場合は、上記実施の形態1と同様の手順で、当該DMA転送要求におけるDMA転送先のアドレスをDMA転送元のアドレスに変換し、リードアドレスとしてアドレス保持部316に格納する。
(2) When a DMA transfer request is selected by the
以降、セレクタ313は、アドレス変換部316に保持された上記変換後のリードアドレスを選択してリードデータ抽出部314に出力する。これによって、以降に選択されたアクセス要求エントリ105のアクセス要求に対する照合処理には、上記変換後のリードアドレスが使用される。
Thereafter, the
なお、選択されたアクセス要求エントリ105がライト要求である場合や、DMA転送要求の転送領域と全く無関係なリードアクセスである場合には、アドレス変換が実施されず、セレクタ313で選択されたアドレスをそのままアドレス保持部316で保持する。この処理によって、アドレス変換されたアドレスを次のアクセス要求エントリ105との照合に使用することが可能となる。
If the selected access request entry 105 is a write request or a read access that is completely unrelated to the transfer area of the DMA transfer request, address conversion is not performed, and the address selected by the
以上のように、この実施の形態4によれば、リードアクセス処理部14が、所定のクロックに同期して、アクセス要求格納部10から取り出したアクセス要求毎に照合し、照合結果に応じた処理を実行する。このように、リード要求に対する処理をクロック毎に実行することにより、リードアクセス処理部14の回路規模を大幅に削減することができる。これまでのリードアクセス処理部14には、アドレス変換部141やライトバッファ照合部142内に要求エントリと同じ数の照合回路が必要であったが、図6の構成にすることにより、1系統の照合回路によって実現することが可能である。
As described above, according to the fourth embodiment, the read
1 バッファ装置、2 CPU、3,15 CPUI/F部、4 DMA転送要求受付部、5 メモリ、10 アクセス要求格納部、11 DMA制御部、12 調停回路部、13 アクセス要求制御部(格納制御部)、14 リードアクセス処理部、15 アクセス分配部、40 転送元アドレスレジスタ、41 転送先アドレスレジスタ、42 転送データ数レジスタ、43 転送開始レジスタ、100 フラグ、101 種別、102 アドレス、103 アドレスデータ、104 付加情報、105−0〜105−7 アクセス要求エントリ、106 DMA最大サイズ情報、141,315 アドレス変換部、142 ライトバッファ照合部、310 要求エントリセレクタ、311 カウンタ、312 制御回路、313 セレクタ、314 リードデータ抽出部、316 アドレス保持部、317 リードアクセス発行回路、318 データ保持部。 DESCRIPTION OF SYMBOLS 1 Buffer apparatus, 2 CPU, 3, 15 CPU I / F part, 4 DMA transfer request reception part, 5 Memory, 10 Access request storage part, 11 DMA control part, 12 Arbitration circuit part, 13 Access request control part (Storage control part) ), 14 read access processing unit, 15 access distribution unit, 40 transfer source address register, 41 transfer destination address register, 42 transfer data number register, 43 transfer start register, 100 flag, 101 type, 102 address, 103 address data, 104 Additional information, 105-0 to 105-7, access request entry, 106 DMA maximum size information, 141, 315 address conversion unit, 142 write buffer verification unit, 310 request entry selector, 311 counter, 312 control circuit, 313 selector, 314 read Data extraction unit, 316 address holding unit, 317 read access issuing circuit, 318 data holding unit.
Claims (6)
前記CPUから発行された前記ライト要求及びDMA転送要求を、先入れ先出しで格納するアクセス要求格納部と、
前記アクセス要求格納部から出力された前記ライト要求及び前記DMA転送要求を振り分けるアクセス分配部と、
前記アクセス分配部で振り分けられた前記DMA転送要求に従って前記メモリに対するDMA転送を制御するDMA制御部と、
前記メモリに対するリード要求、前記アクセス分配部で振り分けられた前記ライト要求及び前記DMA制御部から発行されたDMA転送要求を入力し、各アクセス要求に従って前記メモリに対するアクセスを実行する調停回路部と、
前記CPUから発行された前記メモリに対するリード要求を入力し、当該リード要求のリードアクセス対象領域が前記アクセス要求格納部に格納されている各アクセス要求のアクセス対象領域と重なるか否かを照合して、前記DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域を前記DMA転送要求の転送元領域にアドレス変換したリード要求を前記調停回路部へ発行するリードアクセス処理部とを備えたことを特徴とするバッファ装置。 In a buffer device provided between the CPU and the memory and temporarily holding a write request to the memory,
An access request storage unit that stores the write request and DMA transfer request issued from the CPU in a first-in first-out manner;
An access distribution unit that distributes the write request and the DMA transfer request output from the access request storage unit;
A DMA control unit that controls DMA transfer to the memory according to the DMA transfer request distributed by the access distribution unit;
An arbitration circuit unit that inputs a read request to the memory, the write request distributed by the access distribution unit, and a DMA transfer request issued from the DMA control unit, and executes access to the memory according to each access request;
Input a read request issued from the CPU to the memory, and check whether the read access target area of the read request overlaps with the access target area of each access request stored in the access request storage unit A read access processing unit that issues a read request in which the read access target area is address-converted to the transfer source area of the DMA transfer request when it overlaps the transfer destination area of the DMA transfer request to the arbitration circuit unit. Feature buffer device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008332898A JP4990262B2 (en) | 2008-12-26 | 2008-12-26 | Buffer device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008332898A JP4990262B2 (en) | 2008-12-26 | 2008-12-26 | Buffer device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010152837A true JP2010152837A (en) | 2010-07-08 |
| JP4990262B2 JP4990262B2 (en) | 2012-08-01 |
Family
ID=42571815
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008332898A Expired - Fee Related JP4990262B2 (en) | 2008-12-26 | 2008-12-26 | Buffer device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4990262B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103309831A (en) * | 2012-03-07 | 2013-09-18 | 株式会社东芝 | Data transmission device and data transmission method |
| JP2018120499A (en) * | 2017-01-27 | 2018-08-02 | 三菱電機株式会社 | Memory control device and computer system |
| US10409746B2 (en) | 2017-05-10 | 2019-09-10 | Fujitsu Limited | Memory access control device and control method of memory access |
| WO2022059270A1 (en) * | 2020-09-17 | 2022-03-24 | 東芝インフラシステムズ株式会社 | Controller |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06231032A (en) * | 1993-01-29 | 1994-08-19 | Hitachi Ltd | Access control device |
| JPH11184799A (en) * | 1997-12-19 | 1999-07-09 | Toshiba Corp | Memory data transfer method and device |
| JP2001147808A (en) * | 1999-11-24 | 2001-05-29 | Nec Kofu Ltd | Passing circuit by pending of instruction |
| JP2004145376A (en) * | 2001-03-09 | 2004-05-20 | Internatl Business Mach Corp <Ibm> | Method and device for controlling dma transfer |
| JP2008217524A (en) * | 2007-03-06 | 2008-09-18 | Ricoh Co Ltd | Data transfer method, data transfer device, electronic device, and image forming apparatus |
-
2008
- 2008-12-26 JP JP2008332898A patent/JP4990262B2/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06231032A (en) * | 1993-01-29 | 1994-08-19 | Hitachi Ltd | Access control device |
| JPH11184799A (en) * | 1997-12-19 | 1999-07-09 | Toshiba Corp | Memory data transfer method and device |
| JP2001147808A (en) * | 1999-11-24 | 2001-05-29 | Nec Kofu Ltd | Passing circuit by pending of instruction |
| JP2004145376A (en) * | 2001-03-09 | 2004-05-20 | Internatl Business Mach Corp <Ibm> | Method and device for controlling dma transfer |
| JP2008217524A (en) * | 2007-03-06 | 2008-09-18 | Ricoh Co Ltd | Data transfer method, data transfer device, electronic device, and image forming apparatus |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103309831A (en) * | 2012-03-07 | 2013-09-18 | 株式会社东芝 | Data transmission device and data transmission method |
| JP2013186658A (en) * | 2012-03-07 | 2013-09-19 | Toshiba Corp | Data transmission device, data transmission method and program |
| JP2018120499A (en) * | 2017-01-27 | 2018-08-02 | 三菱電機株式会社 | Memory control device and computer system |
| US10409746B2 (en) | 2017-05-10 | 2019-09-10 | Fujitsu Limited | Memory access control device and control method of memory access |
| WO2022059270A1 (en) * | 2020-09-17 | 2022-03-24 | 東芝インフラシステムズ株式会社 | Controller |
| JP2022049843A (en) * | 2020-09-17 | 2022-03-30 | 東芝インフラシステムズ株式会社 | controller |
| JP7124023B2 (en) | 2020-09-17 | 2022-08-23 | 東芝インフラシステムズ株式会社 | controller |
| AU2021342862B2 (en) * | 2020-09-17 | 2023-11-30 | Kabushiki Kaisha Toshiba | Controller |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4990262B2 (en) | 2012-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7159048B2 (en) | Direct memory access (DMA) transfer buffer processor | |
| US8352712B2 (en) | Method and system for specualtively sending processor-issued store operations to a store queue with full signal asserted | |
| US7234004B2 (en) | Method, apparatus and program product for low latency I/O adapter queuing in a computer system | |
| US9727497B2 (en) | Resolving contention between data bursts | |
| US8190825B2 (en) | Arithmetic processing apparatus and method of controlling the same | |
| JP2012038293A5 (en) | ||
| US20130024630A1 (en) | Terminating barriers in streams of access requests to a data store while maintaining data consistency | |
| JP4983919B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
| US10740256B2 (en) | Re-ordering buffer for a digital multi-processor system with configurable, scalable, distributed job manager | |
| US20100306421A1 (en) | Dma transfer device | |
| JP4990262B2 (en) | Buffer device | |
| JP2012043031A (en) | Shared cache memory device | |
| JP2011232917A (en) | Semiconductor integrated circuit and request control method | |
| CN117194283A (en) | Vector read-write instruction processing method based on RISC-V instruction set | |
| US7028116B2 (en) | Enhancement of transaction order queue | |
| US9767054B2 (en) | Data transfer control device and memory-containing device | |
| JP2018041153A (en) | Storage system and input / output processing method | |
| US8239652B2 (en) | Data processing system | |
| US7916146B1 (en) | Halt context switching method and system | |
| US20020083257A1 (en) | Buffer page roll implementation for PCI-X block read transactions | |
| JP2006178787A (en) | Semiconductor device and data transfer method thereof | |
| WO2007039933A1 (en) | Operation processing device | |
| CN120803967A (en) | Address management command processing method and device, electronic equipment and storage medium | |
| JP2018041154A (en) | Storage system and processing method | |
| CN121166322A (en) | Method, artificial intelligence chip, computing device, medium and program product for executing a kernel function |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101013 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120227 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120403 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120501 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150511 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |