JP2010152837A - Buffer device - Google Patents

Buffer device Download PDF

Info

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
Application number
JP2008332898A
Other languages
Japanese (ja)
Other versions
JP4990262B2 (en
Inventor
Haruhiko Takeyama
治彦 竹山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2008332898A priority Critical patent/JP4990262B2/en
Publication of JP2010152837A publication Critical patent/JP2010152837A/en
Application granted granted Critical
Publication of JP4990262B2 publication Critical patent/JP4990262B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)

Abstract

【課題】複数のブロック転送要求があっても、CPUの待ち時間を短縮することができるバッファ装置を提供する。
【解決手段】リード要求のリードアクセス対象領域がアクセス要求格納部10に格納される各アクセス要求のアクセス対象領域と重なるか否かを照合して、リードアクセス対象領域がライト要求のライトアクセス対象領域と重なる場合、アクセス要求格納部10から当該ライト要求が有するライトデータを取得してリードデータとしてCPU2へ返し、DMA転送要求の転送元領域と重なる場合、当該DMA転送要求に先行して当該リード要求を調停回路部12へ発行し、DMA転送要求の転送先領域と重なる場合、リードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換したリード要求を調停回路部12へ発行する。
【選択図】図1
Provided 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.

特開2004−145376号公報JP 2004-145376 A

上述した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 / F unit 3, a DMA transfer request receiving unit 4, and a memory 5, which are connected to each other via a system bus. The buffer device 1 includes an access request storage unit 10, a DMA control unit 11, an arbitration circuit unit 12, an access request control unit (storage control unit) 13, a read access processing unit 14, and an access distribution unit 15. Here, DMA refers to directly transferring data between memories without using CPU instructions (machine language).

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 request receiving unit 4 and the buffer device 1 by the CPU I / F unit 3. The write request is issued to the access request storage unit 10 in the buffer device 1, and the read request is issued to the read access processing unit 14. The DMA transfer request receiving unit 4 receives a DMA transfer request from the CPU 2 as divided information, and issues a DMA transfer request to the buffer device 1 when all of the divided information is collected.

ライト要求とDMA転送要求は、アクセス要求格納部10へ格納される。アクセス要求格納部10は、ライト要求とDMA転送要求を複数受け付けることができるFIFOになっており、基本的には先に格納したアクセス要求から順番にアクセス分配部15へ発行する。   The write request and the DMA transfer request are stored in the access request storage unit 10. The access request storage unit 10 is a FIFO that can accept a plurality of write requests and DMA transfer requests, and basically issues them to the access distribution unit 15 in order from the previously stored access request.

また、FIFOの全てのエントリは自由に参照可能とする。アクセス要求制御部13は、アクセス要求格納部10の動作を制御しており、先に示した基本動作以外にアクセス要求格納部10内にあるFIFOの各エントリに対して新しい要求を挿入する、エントリ同士を入れ替えるといった処理が可能である。この機能については、実施の形態2以降で説明する。   All entries in the FIFO can be freely referred to. The access request control unit 13 controls the operation of the access request storage unit 10 and inserts a new request for each entry of the FIFO in the access request storage unit 10 in addition to the basic operation described above. Processing such as exchanging each other is possible. This function will be described in the second and subsequent embodiments.

(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 request storage unit 10 through the CPU I / F unit 3.

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 request storage unit 10 of the buffer device 1, and an ACK (access end) response is returned to the CPU 2 via the CPU I / F unit 3. When the access request storage unit 10 is full and the write request is not accepted, the output of the ACK response to the CPU 2 is stopped and the CPU 2 is put in a waiting state.

このように、アクセス要求格納部10がCPU2から発行されたライト要求を格納できる間は、CPU2が、ACK応答を受けて処理を先へ進めることが可能であるが、アクセス要求格納部10が一杯になった時点で、最低1つはアクセス要求格納部10が空くまで、CPU2を待たせる必要がある。   As described above, while the access request storage unit 10 can store the write request issued from the CPU 2, the CPU 2 can receive the ACK response and advance the process, but the access request storage unit 10 is full. At the time, the CPU 2 must wait until the access request storage unit 10 becomes free.

(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 request reception unit 4 includes a transfer source address register 40, a transfer destination address register 41, a transfer data number register 42, and a transfer start register 43. Prepare. The CPU 2 sets the transfer source address register 40, the transfer destination address register 41, the transfer data number register 42 and the transfer start register 43 in an arbitrary order via the CPU I / F unit 3, and writes to the transfer start register 43. The DMA transfer request is transferred to the buffer device 1 using the access as a trigger. When a write request is issued from the CPU 2 to the internal register, the DMA transfer request reception unit 4 returns an ACK response to the CPU 2.

DMA転送要求は、これまでに発行された他のライト要求とともにアクセス要求格納部10に格納され、FIFOの先頭にあるアクセス要求から処理される。ここで、アクセス要求格納部10でアクセス要求を登録するテーブルが空いていない場合、DMA転送要求受付部4が、転送開始レジスタ43へのライト要求に対してACK応答を返さないことにより、CPU2を待ち状態に移行させる。なお、DMA転送要求受付部4にある、バッファ装置1へ転送するDMA転送要求を生成するレジスタ40〜43の構成は一例である。   The DMA transfer request is stored in the access request storage unit 10 together with other write requests issued so far, and is processed from the access request at the head of the FIFO. If the access request storage unit 10 does not have a free table for registering access requests, the DMA transfer request acceptance unit 4 does not return an ACK response to the write request to the transfer start register 43, thereby Transition to the wait state. The configuration of the registers 40 to 43 that generate the DMA transfer request to be transferred to the buffer device 1 in the DMA transfer request reception unit 4 is an example.

(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 request storage unit 10 is composed of table data in which information related to access requests is registered. The Here, the information related to the access request includes five items of information: a flag 100, a type 101, an address 102, address data 103, and additional information 104. A combination of these item information is called an access request entry 105, and the example shown in FIG. 2 describes a FIFO that can receive eight access requests. In FIG. 2, for the 8-stage access request storage unit 10, the first stage of the FIFO is the access request entry 105-0, and the last stage is the access request entry 105-7.

また、フラグ100にはアクセス要求が有効であるか否かが設定され、種別101にはDMA転送要求とライト要求とを区別する識別情報が設定される。アドレス102には、ライト要求であればライトアドレスが設定され、DMA転送要求であれば転送元アドレスが設定される。アドレスデータ103には、ライト要求であればライトデータが設定され、DMA転送要求であれば転送先アドレスが設定される。   Whether the access request is valid is set in the flag 100, and identification information for distinguishing the DMA transfer request from the write request is set in the type 101. In the address 102, a write address is set for a write request, and a transfer source address is set for a DMA transfer request. In the address data 103, write data is set for a write request, and a transfer destination address is set for a DMA transfer request.

さらに、付加情報104には、ライト要求であれば、ライトデータを構成するアドレス指定されたバイトレーンの有効又は無効を示すバイトイネーブル情報が設定され、DMA転送要求であると、DMAによってブロック転送されるサイズが設定される。アクセス要求格納部10に格納されたアクセス要求は、図2中に矢印で示すように、先に格納された古いアクセス要求エントリ105−0のアクセス要求から順にアクセス発行される。   Further, in the additional information 104, if it is a write request, byte enable information indicating validity / invalidity of the addressed byte lane constituting the write data is set, and if it is a DMA transfer request, block transfer is performed by the DMA. Size is set. The access requests stored in the access request storage unit 10 are issued in order from the access request of the old access request entry 105-0 stored earlier, as indicated by an arrow in FIG.

アクセス要求格納部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 request storage unit 10 are output to the access distribution unit 15 in the above-described access issue order. The access distribution unit 15 issues a write request directly to the arbitration circuit unit 12 and issues a DMA transfer request to the DMA control unit 11. When DMA is executed by the DMA control unit 11 that has received the DMA transfer request, a number of access requests are issued from the DMA control unit 11 to the arbitration circuit unit 12. In this way, by storing information necessary for DMA transfer in the access request storage unit 10 as one FIFO entry, the buffer device 1 can be used efficiently, and the buffer device 1 overflows, that is, the access request stores the access request. The probability of exceeding the capacity of the unit 10 can be kept low.

(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 access processing unit 14 includes an address conversion unit 141 and a write buffer collation unit 142. A read request issued from the CPU 2 via the CPU I / F unit 3 is notified to the read access processing unit 14. The address conversion unit 141 receives the read request and outputs it to the write buffer collation unit 142.

ライトバッファ照合部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 request storage unit 10, the write buffer verification unit 142 determines that the read request is the arbitration circuit unit 12. Issue to Further, since the arbitration circuit unit 12 performs processing by assigning priorities in the order of a read request, a write request, and a DMA transfer request, the read request is promptly executed.

一方、リードアドレスが、アクセス要求格納部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 buffer collation unit 142 passes through the address conversion unit 141, Write data is acquired from the address data 103 of the access request storage unit 10. The write buffer verification unit 142 returns the acquired write data as read data to the CPU 2 via the CPU I / F unit 3.

また、ライト要求は、図2で示したように付加情報104としてバイトイネーブルを有するため、ライトバッファ照合部142は、一致したバイトレーンのデータをリードデータとして保持する。この後、ライトバッファ照合部142は、アクセス要求格納部10の照合処理を継続して、リード要求されている全てのリードデータが揃った時点で照合処理を終了するとともに、リードデータをCPU2へ返す。   Since the write request has byte enable as the additional information 104 as shown in FIG. 2, the write buffer collation unit 142 holds the data of the matched byte lane as read data. Thereafter, the write buffer collation unit 142 continues the collation process of the access request storage unit 10, ends the collation process when all the read data requested to be read is prepared, and returns the read data to the CPU 2. .

ライトバッファ照合部142は、アクセス要求格納部10の照合処理によってリードデータが全て揃えば、実際にメモリ5へのアクセスは実行しない。リードデータが不足している場合、ライトバッファ照合部142は、調停回路部12へリード要求を発行し、不足したデータをメモリ5から読み出したデータで補ってリードデータを生成する。   The write buffer collation unit 142 does not actually access the memory 5 when all the read data is prepared by the collation processing of the access request storage unit 10. When the read data is insufficient, the write buffer collation unit 142 issues a read request to the arbitration circuit unit 12 and supplements the insufficient data with the data read from the memory 5 to generate read data.

また、リードアドレスが、アクセス要求格納部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 buffer verification unit 142 The read request can be processed in advance. That is, the write buffer collation unit 142 instructs the arbitration circuit unit 12 to read the read data from the transfer source area of the memory 5 and return it to the CPU 2 via the CPU I / F unit 3. Since the transfer source area of the DMA transfer request is not changed by DMA processing, it is not necessary to perform address conversion processing for read access.

リードアドレスが、メモリ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 request storage unit 10 is used to convert the DMA transfer destination address to the DMA transfer source address, and read access is performed. That is, the converted address is set as a read address. Here, since data is copied from the DMA transfer source area to the DMA transfer destination area, read access to the DMA transfer source area after conversion can be performed regardless of the access issue order even before the DMA transfer. It is possible to get the correct value.

具体的には、アドレス変換部141が、DMA転送要求の転送元アドレス及び転送先アドレスと、リード要求のリードアドレスとから、下記式(1)に従って転送元アドレスを算出し、このアドレスへのリード要求に置き換えて処理を継続する。DMA転送要求にてアドレス変換が行われた場合、その後に継続されるライトバッファ照合部142の照合処理は、変換後のアドレスを用いて実施される。
変換後の転送元アドレス
=リードアドレス−転送先アドレス+転送元アドレス ・・・(1)
Specifically, the address conversion unit 141 calculates a transfer source address from the transfer source address and transfer destination address of the DMA transfer request and the read address of the read request according to the following formula (1), and reads to this address: Replace with request and continue processing. When address conversion is performed in response to a DMA transfer request, the subsequent verification processing of the write buffer verification unit 142 is performed using the converted address.
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 request storage unit 10. . In the address column in FIG. 3, regarding the write request, whether or not the write address stored in the access request storage unit 10 and the read address issued by the CPU 2 to the read access processing unit 14 match is “match”. ”Or“ mismatch ”, and regarding the DMA transfer request, whether or not the transfer destination area of the DMA transfer information stored in the access request storage unit 10 overlaps with the read address is“ included ”or“ not included ” Is determined.

ライトバッファ照合部142が、アクセス要求格納部10に格納される情報を用いてリード要求と照合する際、アクセス要求格納部10に格納されるアクセス要求を最も後に格納された新しい順から照合して、アドレスとバイトイネーブル情報によって該当するバイトレーンを抽出する。また、バイトレーン毎に新しいアクセス要求エントリ105を優先し、リードデータを生成する。   When the write buffer collation unit 142 collates with the read request using the information stored in the access request storage unit 10, the access request stored in the access request storage unit 10 is collated from the newest stored order. The corresponding byte lane is extracted based on the address and byte enable information. In addition, the new access request entry 105 is prioritized for each byte lane to generate read data.

例えば、最も新しいアクセス要求エントリ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 buffer collation unit 142 extracts a byte lane that is valid based on byte enable (byte enable set in the additional information 104) information from the write data (write data set in the data 103) of the write request. Then, it is held as a read data byte 3 constituting the read data.

次に、ライトバッファ照合部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 data byte 3 based on the byte enable information, the write buffer collation unit 142 determines that the byte from the write data. A lane is extracted and held as read data byte 2.

この後、アクセス要求エントリ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 buffer collation unit 142 next selects the new access request entry 105-. 6 is determined whether the byte lane corresponding to the read data byte 1 is valid. Here, since the byte lane is valid, the byte lane is extracted from the write data of the access request entry 105-6 and held as the read byte 1.

アクセス要求エントリ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 buffer collation unit 142 next sets information on the new access request entry 105-5. The verification process is executed with

ここで、アクセス要求エントリ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 address conversion unit 141 sets the read address and the access request entry 105-5 in the read address. Using the set transfer destination address and transfer source address, the transfer destination address is converted into the transfer source address from the above formula (1), and the converted address is set as the read address (indicated as the address in FIG. 3 changes). ).

この後、ライトバッファ照合部142は、アドレス変換部141で算出された変換後のリードアドレスと、アクセス要求エントリ105−4のライト要求のライトアドレスとを照合して不一致と判定し、同様にアクセス要求エントリ105−3のライト要求のライトアドレスと照合して不一致と判定する。   Thereafter, the write buffer collation unit 142 collates the read address after conversion calculated by the address conversion unit 141 with the write address of the write request of the access request entry 105-4 to determine that there is a mismatch, and similarly accesses The write address of the write request in the request entry 105-3 is collated to determine that they do not match.

アクセス要求エントリ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 buffer collation unit 142 stores the access request entry 105-2. Based on the byte enable information, it is determined that the byte lane corresponding to the read data byte 0 is valid, and the byte lane is extracted from the write data of the access request entry 105-2 and held as the read byte 0. Since the byte lanes corresponding to the read bytes 3 to 1 are already held by other entries, they are not held even if the byte enable information is valid.

この後、ライトバッファ照合部142は、アドレス変換部141で算出された変換後のリードアドレスと、アクセス要求エントリ105−1のライト要求のライトアドレスとを照合して不一致と判定し、同様にアクセス要求エントリ105−0のライト要求のライトアドレスと照合して不一致と判定する。このように、アクセス要求エントリ4からアクセス要求エントリ0までは、ライトバッファ照合部142が、アドレス変換部141により変換されたアドレスとの間で照合が行われる。   Thereafter, the write buffer collation unit 142 collates the read address after conversion calculated by the address conversion unit 141 with the write address of the write request of the access request entry 105-1, and determines that there is a mismatch. It is determined that they do not match by collating with the write address of the write request of the request entry 105-0. As described above, from the access request entry 4 to the access request entry 0, the write buffer collation unit 142 collates with the address converted by the address conversion unit 141.

以上のように、この実施の形態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 request storage unit 10 is checked. When the target area overlaps with the write access target area of the write request, the write data of the write request is acquired from the access request storage unit 10 and returned to the CPU 2 as read data. When the target area overlaps with the transfer source area of the DMA transfer request, Prior to the DMA transfer request, when the read request is issued to the arbitration circuit unit 12 and overlaps the transfer destination area of the DMA transfer request, the read request in which the address area of the read access area is converted to the transfer source area of the DMA transfer request is arbitrated. Issued to the circuit unit 12. By doing so, the access request issued subsequently from the CPU 2 can overtake the access of the access request storage unit 10 and the waiting time of the CPU 2 can be shortened. In addition, even in the case of a read request in which the transfer area of the DMA transfer request stored in the access request storage unit 10 and the access target area overlap, it is possible to acquire correct read data in a short time.

また、この実施の形態1によれば、リードアクセス処理部14が、リード要求のリードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換すると、当該変換後のリードアクセス対象領域が、アクセス要求格納部10に格納されている当該DMA転送要求以降の各アクセス要求のアクセス対象領域と重なるか否かを照合するので、アドレス変換した後であっても、アクセス要求の発行順を制御することができる。また、アクセス要求がアクセス要求格納部10の容量以上となる頻度を低く抑えることができる。   Further, according to the first embodiment, when the read access processing unit 14 converts the read access target area of the read request into the transfer source area of the DMA transfer request, the read access target area after the conversion becomes the access request Since it is checked whether or not it overlaps with the access target area of each access request after the DMA transfer request stored in the storage unit 10, it is possible to control the order in which the access requests are issued even after address conversion. it can. In addition, the frequency at which the access request exceeds the capacity of the access request storage unit 10 can be kept low.

実施の形態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 request control unit 13 invalidates the access requests from the access request entry 105-7 to the access request entry 105-4 in the access request storage unit 10, and newly writes to the access request entry 105-3. A request is added, a write request is stored in the access request entry 105-2 so far, and a DMA transfer request is stored in the access request entries 105-1 and 105-0.

(1)追い越し処理の概要
また、アクセス要求制御部13は、アクセス要求格納部10において、新しく追加されたアクセス要求エントリ105−3のフラグ100に「新規」を設定する。この後、アクセス要求制御部13は、フラグ100が「新規」のライト要求については、一つ前のアクセス要求エントリ105−2のアクセス要求に対して追い越しが可能であるか否かを判定する。ここで、追い越しが可能であれば、アクセス要求エントリ105−3のライト要求を、一つ前のアクセス要求エントリ105−2のアクセス要求と入れ替える。この入れ替え処理は、追い越し不可と判定されるまで実行される。アクセス要求格納部10において追い越し不可となった時点のアクセス要求エントリのフラグ100が有効に変更される。
(1) Overview of Overtaking Process Further, the access request control unit 13 sets “new” in the flag 100 of the newly added access request entry 105-3 in the access request storage unit 10. Thereafter, the access request control unit 13 determines whether or not the write request with the flag 100 “new” can be overtaken with respect to the access request of the previous access request entry 105-2. If overtaking is possible, the write request in the access request entry 105-3 is replaced with the access request in the previous access request entry 105-2. This replacement process is executed until it is determined that overtaking is impossible. In the access request storage unit 10, the access request entry flag 100 when the overtaking is disabled is effectively changed.

先行するアクセス要求エントリに対してライト要求が追い越し可能な条件としては、先行するアクセス要求エントリのライト要求や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 request control unit 13 compares the access target areas of the write request or DMA transfer request of all access request entries in the access request storage unit 10 with the write request to be added at a time, and The access request entry for inserting the write request to be added may be specified within 10.

上述したように、アクセス要求制御部13は、CPU2が発行したライト要求をアクセス要求格納部10が受けると、当該ライト要求のライトアクセス対象領域とアクセス要求格納部10のアクセス要求のアクセス対象領域とが重なるか否かによって挿入すべきアクセス要求エントリを決定する。   As described above, when the access request storage unit 10 receives a write request issued by the CPU 2, the access request control unit 13 determines the write access target area of the write request and the access request access area of the access request storage unit 10. The access request entry to be inserted is determined depending on whether or not.

(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 request storage unit 10, the access request control unit 13 In the table, the transfer area is determined from the previously stored old DMA transfer request, and it is determined that a DMA transfer request whose transfer area does not overlap with the write access target area of the newly issued write request can be overtaken. . Even write requests can be processed in the same manner, and it is determined that a newly issued write request with respect to the preceding write request can be overtaken unless the areas overlap.

上述した判定条件では、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 request storage unit 10 and issue direct access to the arbitration circuit unit 12. However, if the DMA is being executed by the DMA control unit 11, it is not determined whether the DMA transfer request can be overtaken. Therefore, the ancestor area of the DMA and the access target area of the write request overlap. , There is a possibility of malfunction.

そこで、この実施の形態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 request control unit 13 outputs to the DMA control unit 11 when outputting the DMA transfer request from the access request storage unit 10 to the DMA control unit 11 via the access distribution unit 15. The DMA transfer request is also left in the access request entry 105-0 at the head of the access request storage unit 10.
Thereby, the access request control unit 13 also compares the above-described DMA transfer request executed by the DMA control unit 11 by comparing the transfer area of the access request entry 105-0 with the access target area of the new write request. It is possible to determine whether overtaking is possible in the same procedure.
When the access request control unit 13 receives a notice of completion of execution of the DMA transfer request from the DMA control unit 11, the access request control unit 13 deletes the DMA transfer request left in the access request entry 105-0 and advances the FIFO one step.

(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 request receiving unit 4 The access request control unit 13 stores a transfer area of a DMA transfer request newly issued from the DMA transfer request receiving unit 4 and an access request storage. A comparison is made with the access target area (the write target area of the write request or the transfer area of the DMA transfer request) of the old access request previously stored in the unit 10, and the new DMA transfer request transfer area and the access target area are It is determined that the access requests that do not overlap can be overtaken.
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 request control unit 13 determines that the access target area of the access request issued from the CPU 2 overlaps with the access target area of the access request stored in the access request storage unit 10. If not, the access request issued from the CPU 2 is output to the access distribution unit 15 prior to the access request stored in the access request storage unit 10. In this way, it is possible to secure a large number of unused access request entries 105 in the access request storage unit 10, and it is possible to preferentially process a request with a short processing time. As a result, a DMA transfer request having a small transfer size can overtake a transfer request having a large transfer size within a range where the transfer result does not become abnormal, that is, a range where the transfer areas do not overlap.

実施の形態3.
上記実施の形態2では、DMA制御部11で実行中のDMA転送要求が、アクセス要求格納部10のアクセス要求エントリ105−0にも残され、新たに発行されたライト要求のアクセス対象領域が、当該DMA転送要求の転送領域と重ならなければ、追い越し可能と判定されて調停回路部12へ直接発行することができた。
しかしながら、DMA制御部11は、一旦実行を開始したDMAを中断することができないDMAを実行中であれば、後続のDMA転送要求は、アクセス要求エントリ105−1以降に格納されたまま待つ必要があった。
そこで、この実施の形態3では、大きな転送サイズのDMA転送要求を分割して実行しながら、転送サイズの小さなDMA転送要求が発行された時点で実施するDMA転送要求を切り替えるようにしたものである。
Embodiment 3 FIG.
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 request storage unit 10, and the access target area of the newly issued write request is If it does not overlap with the transfer area of the DMA transfer request, it is determined that overtaking is possible and can be issued directly to the arbitration circuit unit 12.
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 request control unit 13 according to the third embodiment defines a DMA maximum execution size that defines the predetermined transfer size for causing the DMA control unit 11 to divide and execute a DMA transfer request for each predetermined transfer size. Information 106 is set. In FIG. 5, consider a case where access issuance proceeds and the DMA transfer request stored in the access request entry 105-1 is moved to the access request entry 105-0.

このとき、アクセス要求制御部13は、移動しようとしているDMA転送要求の付加情報104に設定された転送サイズが、DMA最大実行サイズ情報106で規定される転送サイズを超えていれば、当該DMA転送要求を、DMA最大実行サイズ情報106で規定される転送サイズ分だけ分割して、先にアクセス要求エントリ105−0へ移動し、アクセス要求エントリ105−1に残したDMA転送要求に関するDMA情報を更新する。   At this time, if the transfer size set in the additional information 104 of the DMA transfer request to be moved exceeds the transfer size specified by the DMA maximum execution size information 106, the access request control unit 13 performs the DMA transfer. The request is divided by the transfer size specified by the DMA maximum execution size information 106, moved to the access request entry 105-0 first, and the DMA information related to the DMA transfer request left in the access request entry 105-1 is updated. To do.

アクセス要求エントリ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 additional information 104 without changing the contents of the flag 100, type 101, transfer source address 102, and transfer destination address 103. The transfer size is changed to that defined in the DMA maximum size information 106.

また、アクセス要求制御部13は、アクセス要求エントリ105−1に残されるDMA転送要求についてフラグ100及び種別101の内容をそのまま保持し、転送元アドレス102を「転送元アドレス102+DMA最大サイズ情報106で規定される転送サイズ」とし、転送先アドレス103を「転送先アドレス103+DMA最大サイズ情報106で規定される転送サイズ」とし、付加情報104を「転送サイズ−DMA最大サイズ情報106で規定される転送サイズ」とする。   Further, the access request control unit 13 holds the contents of the flag 100 and the type 101 as they are for the DMA transfer request remaining in the access request entry 105-1, and defines the transfer source address 102 as “transfer source address 102 + DMA maximum size information 106. Transfer size ”, transfer destination address 103 as“ transfer size specified by transfer destination address 103 + DMA maximum size information 106 ”, and additional information 104 as“ transfer size specified by transfer size−DMA maximum size information 106 ”. And

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 maximum size information 106 stored in the access request entry 105-0. When the DMA is completed, the access request control unit 13 determines that the updated transfer size of the DMA transfer request left in the access request entry 105-1 exceeds the transfer size specified by the DMA maximum execution size information 106. In the same procedure as described above, the DMA transfer request is divided by the transfer size specified by the DMA maximum execution size information 106 and moved to the access request entry 105-0 first. The DMA information related to the DMA transfer request left in the above is updated. If the transfer size specified by the DMA maximum execution size information 106 is not exceeded, the data is moved to the access request entry 105-0 as it is and output to the access distribution unit 15.

さらに、アクセス要求制御部13は、DMA制御部11がDMAを実行中、アクセス要求エントリ105−0に残されたDMA転送要求よりも小さい転送サイズのDMA転送要求がアクセス要求エントリ105−1に発行された場合、両DMA転送要求の転送領域間に重なりがなければ、上記残されたDMA転送要求をアクセス要求エントリ105−1へ移動して、新たに発行されたDMA転送要求をアクセス要求エントリ105−0に移動する。   Further, the access request control unit 13 issues a DMA transfer request having a transfer size smaller than the DMA transfer request left in the access request entry 105-0 to the access request entry 105-1, while the DMA control unit 11 is executing DMA. If there is no overlap between the transfer areas of both DMA transfer requests, the remaining DMA transfer request is moved to the access request entry 105-1, and the newly issued DMA transfer request is transferred to the access request entry 105-1. Move to -0.

このように、アクセス要求制御部13は、上記と同様にして、DMA最大実行サイズ情報106で規定される転送サイズ以下のDMA転送要求に分割するとともに、新たに転送サイズが小さいDMA転送要求が発行されると、転送領域に重なりがなければ、転送サイズが小さい順にアクセス分配部15へ出力するDMA転送要求を切り替える。   As described above, the access request control unit 13 divides DMA transfer requests having a transfer size equal to or smaller than the transfer size specified by the DMA maximum execution size information 106 and issues a new DMA transfer request with a smaller transfer size in the same manner as described above. If there is no overlap in the transfer area, the DMA transfer request output to the access distribution unit 15 is switched in ascending order of transfer size.

以上のように、この実施の形態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 request storage unit 10, the access request control unit 13 is provided on the condition that there is no overlap of transfer areas. The output order from the access request storage unit 10 is switched so that a DMA transfer request with a small DMA transfer size precedes. In particular, when a DMA transfer request is output from the access request storage unit 10 to the access distribution unit 15, a new DMA transfer request is generated by dividing the DMA transfer size so that the DMA transfer size is a predetermined value or less, and the DMA transfer is performed. Output from the access request storage unit 10 in ascending order of size. As described above, the storage area of the buffer device 1 can be promptly switched by switching the DMA transfer request to be executed when the DMA transfer request with a small transfer size is issued while executing the DMA transfer request with a large transfer size in small sections. Can be freed up.

実施の形態4.
上記実施の形態1〜3では、リードアクセス処理部14において、アドレス変換部141やライトバッファ照合部142にアクセス要求エントリと同じ数の照合回路が必要であるが、この実施の形態4は、リード要求に対する処理を複数のクロックにそれぞれ同期した処理に分割して実行することによって、1系統の照合回路として回路規模の削減を図っている。
Embodiment 4 FIG.
In the first to third embodiments, the read access processing unit 14 requires the same number of collation circuits as the access request entry in the address conversion unit 141 and the write buffer collation unit 142. By dividing the processing corresponding to the request into processing synchronized with a plurality of clocks, the circuit scale is reduced as a single verification circuit.

実施の形態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 access processing unit 14 according to the fourth embodiment includes a request entry selector 310, a counter 311, a control circuit 312, a selector 313, a read data extraction unit 314, an address conversion unit 315, an address holding unit 316, and a read access issue. A circuit 317 and a data holding unit 318 are provided.

要求エントリセレクタ310は、カウンタ311によるカウント動作に同期して、アクセス要求格納部10のアクセス要求エントリ105−7〜105−0のうちから処理対象となるアクセス要求エントリ105を選択する。カウンタ311は、制御回路312によってカウント開始と停止が制御されるカウンタである。制御回路312は、リードアクセス処理部14の全体動作を制御する。   The request entry selector 310 selects the access request entry 105 to be processed from among the access request entries 105-7 to 105-0 of the access request storage unit 10 in synchronization with the counting operation by the counter 311. The counter 311 is a counter whose start and stop are controlled by the control circuit 312. The control circuit 312 controls the overall operation of the read access processing unit 14.

セレクタ313は、リード要求のリードアドレス及びアドレス保持部316が保持するアドレスのうちから、照合処理に用いるアドレスを選択する。リードデータ抽出部314は、要求エントリセレクタ310で選択されたアクセス要求エントリ105のライト要求とセレクタ313で選択されたアドレスで規定されるアクセス範囲とが重なっているか判定し、重なっている場合には、アクセス要求エントリ105のライトデータから重なっている部分のバイトレーンのデータを抽出する。   The selector 313 selects an address used for collation processing from the read address of the read request and the address held by the address holding unit 316. The read data extraction unit 314 determines whether the write request of the access request entry 105 selected by the request entry selector 310 overlaps the access range defined by the address selected by the selector 313. , The overlapping byte lane data is extracted from the write data of the access request entry 105.

アドレス変換部315は、セレクタ313で選択されたアドレスが、アクセス要求エントリ105のDMA転送要求の転送先領域に含まれている場合、転送先アドレスを転送元アドレスに変換してリードアドレスとする。アドレス保持部316は、CPU2から発行されたリード要求のリードアドレス及びアドレス変換部315により変換された変換後のリードアドレスを保持する。リードアクセス発行回路317は、制御回路312の制御に従ってリード要求を調停回路部12に発行する。データ保持部318は、リードデータ抽出部314で抽出されたバイトレーンのデータを保持し、全てのデータが揃った時点でリードアクセス発行回路317へ出力する。   When the address selected by the selector 313 is included in the transfer destination area of the DMA transfer request of the access request entry 105, the address conversion unit 315 converts the transfer destination address into a transfer source address and sets it as a read address. The address holding unit 316 holds the read address of the read request issued from the CPU 2 and the converted read address converted by the address conversion unit 315. The read access issue circuit 317 issues a read request to the arbitration circuit unit 12 under the control of the control circuit 312. The data holding unit 318 holds the byte lane data extracted by the read data extraction unit 314, and outputs the data to the read access issue circuit 317 when all the data is obtained.

次に動作について説明する。
(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 Request Entry Selector 310 The request entry selector 310 uses the access request entry 105 from the access request storage unit 10 using every clock generated by the counter 311, that is, the count value of the counter 311. The access request entries to be processed are selected in the order of −7 to 105-0.

一方、セレクタ313は、CPU2からCPUI/F部3を経由して発行されたリード要求のリードアドレスを初回の照合処理にのみ使用し、2回目以降の照合処理にはアドレス保持部316に保持されるアドレスを使用する。つまり、セレクタ313は、CPU2から発行されたリード要求のリードアドレスを入力してリードデータ抽出部314に出力することにより、初回の照合処理が実行され、当該リードアドレスはアドレス変換部315を経由してアドレス保持部316に保持される。セレクタ313は、アドレス保持部316に保持された上記リードアドレス又はアドレス変換部315で変換されたアドレスを選択してリードデータ抽出部314に出力することにより、2回目以降の照合処理が実行される。   On the other hand, the selector 313 uses the read address of the read request issued from the CPU 2 via the CPU I / F unit 3 only for the first verification process, and is held in the address holding unit 316 for the second and subsequent verification processes. To use the address. That is, the selector 313 inputs the read address of the read request issued from the CPU 2 and outputs the read address to the read data extraction unit 314, whereby the first verification process is executed, and the read address passes through the address conversion unit 315. Are held in the address holding unit 316. The selector 313 selects the read address held in the address holding unit 316 or the address converted by the address conversion unit 315 and outputs the selected address to the read data extraction unit 314, whereby the second and subsequent matching processes are executed. .

リードデータ抽出部314は、セレクタ313によって選択されたリードアドレスで指定されるメモリ5の記憶領域と、要求エントリセレクタ310によって選択されたアクセス要求エントリ105のライト要求のライトアドレスで指定されるメモリ5の記憶領域とが重なっているか否かの照合処理を行う。このとき、両者が重なっていれば、リードデータ抽出部314は、当該アクセス要求エントリ105のライト要求のバイトイネーブル情報により有効とされた重なっている部分に対応するバイトレーンのデータをライトデータから抽出してデータ保持部318に出力する。   The read data extraction unit 314 stores the storage area of the memory 5 specified by the read address selected by the selector 313 and the memory 5 specified by the write address of the write request of the access request entry 105 selected by the request entry selector 310. The collation process is performed to check whether or not the storage area overlaps. At this time, if the two overlap, the read data extraction unit 314 extracts the data of the byte lane corresponding to the overlapping portion validated by the byte enable information of the write request of the access request entry 105 from the write data. And output to the data holding unit 318.

データ保持部318は、リードデータ抽出部314から入力したデータをリードバイトとして保持する。上述した照合処理は、データ保持部318において、リード要求されたデータが全て揃うまで、要求エントリセレクタ310で順に選択されたアクセス要求エントリ105のライト要求に対して実行される。   The data holding unit 318 holds the data input from the read data extraction unit 314 as a read byte. The above-described collation processing is executed for the write request of the access request entry 105 selected in order by the request entry selector 310 until all the data requested to be read is collected in the data holding unit 318.

リードデータ抽出部314は、データ保持部318において、リード要求されたデータが全て揃った時点で、アクセス要求格納部10から選択したアクセス要求エントリ105のライト要求に対する照合処理を終了する。このとき、データ保持部318は、全てのデータが揃ったリードデータを照合処理の完了通知とともに制御回路312へ出力する。制御回路312は、照合処理の完了通知を受けると、データ保持部318から入力したデータを、CPUI/F部3を経由してCPU2へ返す。   The read data extraction unit 314 ends the collation process for the write request of the access request entry 105 selected from the access request storage unit 10 when all the data requested to be read is collected in the data holding unit 318. At this time, the data holding unit 318 outputs the read data including all the data to the control circuit 312 together with the verification processing completion notification. When the control circuit 312 receives the completion notification of the collation processing, the control circuit 312 returns the data input from the data holding unit 318 to the CPU 2 via the CPU I / F unit 3.

なお、データ保持部318は、要求エントリセレクタ310によってアクセス要求格納部10から選択された全てのアクセス要求エントリ105に対する照合処理が終了した時点で、全てのデータが揃わなかった場合、その旨を制御回路312に通知する。制御回路312は、当該通知を受けると、上記照合処理で使用された、不足分のデータに対応するリードアドレスに関するリード要求の発行を指示するリードアクセス発行指示をリードアクセス発行回路317へ通知する。   Note that the data holding unit 318 controls that when all the data is not available when the collation processing for all the access request entries 105 selected from the access request storage unit 10 by the request entry selector 310 is completed. Notify the circuit 312. Upon receiving the notification, the control circuit 312 notifies the read access issue circuit 317 of a read access issue instruction for instructing issue of a read request related to the read address corresponding to the deficient data used in the collation processing.

リードアクセス発行回路317は、制御回路312から上記リードアクセス発行指示を受けると、不足分のデータのリードアドレスに関するリード要求を調停回路部12へ発行する。調停回路部12は、当該リード要求を実行して、不足分のデータをメモリ5から取得しデータ保持部318へ出力する。データ保持部318では、調停回路部12から入力したデータでリードデータの不足分を補い、当該リードデータ及び処理が完了した旨を制御回路312に出力する。これにより、制御回路312は、データ保持部318から入力したデータを、CPUI/F部3を経由してCPU2へ返す。   When the read access issuance circuit 317 receives the read access issuance instruction from the control circuit 312, the read access issuance circuit 317 issues a read request regarding the read address of the insufficient data to the arbitration circuit unit 12. The arbitration circuit unit 12 executes the read request, acquires insufficient data from the memory 5, and outputs the data to the data holding unit 318. The data holding unit 318 compensates for the shortage of the read data with the data input from the arbitration circuit unit 12 and outputs to the control circuit 312 that the read data and processing are completed. As a result, the control circuit 312 returns the data input from the data holding unit 318 to the CPU 2 via the CPU I / F unit 3.

(2)要求エントリセレクタ310によりDMA転送要求が選択された場合
アドレス変換部315は、要求エントリセレクタ310により選択されたアクセス要求エントリ105がDMA転送要求であると、セレクタ313によって選択されたリードアドレスが当該DMA転送要求の転送先領域に含まれるか否かを判定し、含まれる場合は、上記実施の形態1と同様の手順で、当該DMA転送要求におけるDMA転送先のアドレスをDMA転送元のアドレスに変換し、リードアドレスとしてアドレス保持部316に格納する。
(2) When a DMA transfer request is selected by the request entry selector 310 The address conversion unit 315 reads the read address selected by the selector 313 if the access request entry 105 selected by the request entry selector 310 is a DMA transfer request. Is included in the transfer destination area of the DMA transfer request, and if it is included, the DMA transfer destination address in the DMA transfer request is set to the DMA transfer source in the same procedure as in the first embodiment. The address is converted into an address and stored in the address holding unit 316 as a read address.

以降、セレクタ313は、アドレス変換部316に保持された上記変換後のリードアドレスを選択してリードデータ抽出部314に出力する。これによって、以降に選択されたアクセス要求エントリ105のアクセス要求に対する照合処理には、上記変換後のリードアドレスが使用される。   Thereafter, the selector 313 selects the converted read address held in the address conversion unit 316 and outputs it to the read data extraction unit 314. As a result, the converted read address is used for collation processing for the access request of the access request entry 105 selected thereafter.

なお、選択されたアクセス要求エントリ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 selector 313 is changed. The address holding unit 316 holds it as it is. By this processing, the address converted can be used for collation with the next access request entry 105.

以上のように、この実施の形態4によれば、リードアクセス処理部14が、所定のクロックに同期して、アクセス要求格納部10から取り出したアクセス要求毎に照合し、照合結果に応じた処理を実行する。このように、リード要求に対する処理をクロック毎に実行することにより、リードアクセス処理部14の回路規模を大幅に削減することができる。これまでのリードアクセス処理部14には、アドレス変換部141やライトバッファ照合部142内に要求エントリと同じ数の照合回路が必要であったが、図6の構成にすることにより、1系統の照合回路によって実現することが可能である。   As described above, according to the fourth embodiment, the read access processing unit 14 collates each access request fetched from the access request storage unit 10 in synchronization with a predetermined clock, and performs processing according to the collation result. Execute. Thus, by executing the processing for the read request for each clock, the circuit scale of the read access processing unit 14 can be greatly reduced. The read access processing unit 14 so far has required the same number of collation circuits as the request entries in the address conversion unit 141 and the write buffer collation unit 142. By using the configuration of FIG. It can be realized by a verification circuit.

この発明の実施の形態1によるバッファ装置を用いたメモリシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the memory system using the buffer apparatus by Embodiment 1 of this invention. 図1中のアクセス要求格納部の構成を概略的に示す図である。FIG. 2 is a diagram schematically showing a configuration of an access request storage unit in FIG. 1. 図1中のリードアクセス処理部の動作例を示す図である。FIG. 3 is a diagram illustrating an operation example of a read access processing unit in FIG. 1. この発明の実施の形態2によるアクセス要求制御部の動作例を示す図である。It is a figure which shows the operation example of the access request control part by Embodiment 2 of this invention. この発明の実施の形態3によるアクセス要求制御部の動作例を示す図である。It is a figure which shows the operation example of the access request control part by Embodiment 3 of this invention. この発明の実施の形態4によるリードアクセス処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the read access process part by Embodiment 4 of this invention.

符号の説明Explanation of symbols

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とメモリの間に設けられ、前記メモリへのライト要求を一時的に保持するバッファ装置において、
前記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.
リードアクセス処理部は、リード要求のリードアクセス対象領域をDMA転送要求の転送元領域にアドレス変換すると、当該変換後のリードアクセス対象領域が、アクセス要求格納部に格納されている当該DMA転送要求以降の各アクセス要求のアクセス対象領域と重なるか否かを照合することを特徴とする請求項1記載のバッファ装置。   When the read access processing unit converts the read access target area of the read request into the transfer source area of the DMA transfer request, the read access target area after the DMA transfer request stored in the access request storage unit 2. The buffer device according to claim 1, wherein it is checked whether or not each access request overlaps with an access target area. CPUから発行されたアクセス要求のアクセス対象領域が、アクセス要求格納部に格納されているアクセス要求のアクセス対象領域と重ならない場合、前記CPUから発行されたアクセス要求を前記アクセス要求格納部に格納されているアクセス要求に先行してアクセス分配部へ出力する格納制御部を備えたことを特徴とする請求項1又は請求項2記載のバッファ装置。   When the access target area of the access request issued from the CPU does not overlap the access target area of the access request stored in the access request storage unit, the access request issued from the CPU is stored in the access request storage unit. 3. The buffer apparatus according to claim 1, further comprising a storage control unit that outputs the access request to the access distribution unit prior to the access request. 格納制御部は、アクセス要求格納部に出力順でDMA転送要求が並んでいる場合、転送領域の重なりがないことを条件として、DMA転送サイズの小さいDMA転送要求が先行するよう、前記アクセス要求格納部からの出力順を入れ替えることを特徴とする請求項3記載のバッファ装置。   When the DMA transfer requests are arranged in the output order in the access request storage unit, the storage control unit stores the access request so that a DMA transfer request with a small DMA transfer size is preceded on condition that there is no overlapping of transfer areas. 4. The buffer device according to claim 3, wherein the output order from the units is switched. 格納制御部は、アクセス要求格納部からDMA転送要求をアクセス分配部へ出力するにあたり、DMA転送サイズが所定値以下となるようにDMA転送サイズを分割した新たなDMA転送要求を生成して、DMA転送サイズが小さい順に前記アクセス要求格納部から出力することを特徴とする請求項3又は請求項4記載のバッファ装置。   When the storage control unit outputs a DMA transfer request from the access request storage unit to the access distribution unit, the storage control unit generates a new DMA transfer request by dividing the DMA transfer size so that the DMA transfer size is equal to or less than a predetermined value. 5. The buffer device according to claim 3, wherein the buffer is output from the access request storage unit in ascending order of transfer size. リードアクセス処理部は、所定のクロックに同期して、アクセス要求格納部から取り出したアクセス要求毎に照合し、照合結果に応じた処理を実行することを特徴とする請求項1から請求項5のうちのいずれか1項記載のバッファ装置。   6. The read access processing unit according to claim 1, wherein the read access processing unit collates each access request fetched from the access request storage unit in synchronization with a predetermined clock, and executes processing according to the collation result. The buffer device according to any one of the above.
JP2008332898A 2008-12-26 2008-12-26 Buffer device Expired - Fee Related JP4990262B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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