This application is based upon and claims the benefit of priority from prior Japanese Patent Application No. 2008-301295, filed Nov. 26, 2008, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a bus bridge apparatus and a bus bridge system, and in particular, to control of read of read responses and requests from a reception buffer in a bus bridge apparatus connected between a general-purpose bus and a bus requiring the reception buffer and transmitting a notification of interruption using a packet. The present invention is used in a system utilizing, for example, PCI Express.
2. Description of the Related Art
In a system utilizing, for example, PCI Express, a bus bridge is connected between a general-purpose first bus connected to a first device and a second bus connected to a second device. The bus bridge includes two reception buffers configured to receive read responses and write/read requests, respectively, transferred via the second bus. In this case, the second bus requires the reception buffers and transmits a notification of interruption using a packet. The second device may involve a plurality of interruption factors, for example, a plurality of direct memory accesses (DMA).
In a bus bridge of this kind, the reception buffer for read responses and the reception buffer for write/read requests are independently operated. Thus, the process of delivering a read response to the first bus and the process of delivering a write/read request to the first bus can be achieved without affecting each other. However, if a plurality of DMA controllers (hereinafter referred to as DMACs) operate simultaneously in the second device, the following problems may occur.
That is, for the interruption factor in response to an interruption signal assert packet transmitted by the second device and notifying the first device of DMA completion, consistency may fail to be maintained between an reception of a response for an interruption status read performed by the first device to check with the second device and an interruption completion status issued by the second device. This will be specifically described below.
It is assumed that immediately before a request for an interruption status register read is issued to the second device by the first device, a plurality of DMACs in the second device complete operation and the final DMA transfer is performed. In this case, the bus bridge stores the final DMA write request in the reception buffer for write read requests. A response to the interruption status read is stored in the reception buffer for read responses.
When a target section of the first device to which the write/read request is input is busy, preventing the bus bridge from issuing the final DMA write request to the first device, the response to the interruption status read may be transmitted to the first device before the final DMA write packet is transmitted. In this case, the first device determines that a plurality of DMACs have completed operation based on the information in the response to the interruption status read. However, the final DMA write packet remains in the reception buffer for request receptions which is located in the bus bridge. Thus, the first device cannot maintain consistency between the recognition of interruption completion and the actual data transfer.
Jpn. Pat. Appln. KOKAI Publication No. 11-338816 discloses a technique to allow a bus bridge containing a bus arbiter to perform efficient bus arbitration to enable high-speed data transfers.
According to a first aspect of the present invention, there is provided a bus bridge apparatus connected between a general-purpose first bus and a second bus on which data containing an interruption signal is transmitted using a packet, the apparatus comprising:
a plurality of reception buffers configured to receive read responses and requests transferred via the second bus; and
a control section configured to recognize reception of the read requests and requests transferred via the second bus and to switch a function to independently control an order of read of the read requests and requests received by the plurality of reception buffers and a function to control the read in order of reception of the read responses and the requests, the control section controllably switches the order of read of the read responses and the requests based on the order of reception of the read responses and the requests after recognizing reception of an interruption assert signal packet transferred by the second bus and before recognizing reception of an interruption de-assert signal packet transferred by the second bus.
According to a second aspect of the present invention, there is provided a bus bridge system comprising:
a general-purpose first bus;
a first device connected to the first bus;
a second bus on which data containing an interruption signal is transferred using a packet;
a second device connected to the second bus and including a plurality of direct memory access controllers; and
a bus bridge connected between the first bus and the second bus and including a plurality of reception buffers, the bus bridge recognizing reception of read responses and requests transferred via the second bus, and after recognizing reception of an interruption assert signal packet and before recognizing reception of an interruption de-assert signal packet, outputting the read requests and requests transferred via the second bus and received by the plurality of reception buffers in order of the reception of the read responses and the requests.
The present invention will be described below based on an embodiment with reference to the drawings.
The first bus 2 is a general-purpose bus such as AMBA or OCP. The first bus 2 is connected between an initiator section of the first device 1 and a target section of the bus bridge 3 and between an initiator section of the bus bridge 3 and a target section of the first device 1.
The second bus 6 requires reception buffers and flow control in which a notification of interruption is transmitted using a packet (assert INT message/de-assert INT message).
The second device 7 involves a plurality of interruption factors and includes a plurality of DMACs and an interruption status register (in the present example, a DMA status register 10), a memory (MEM) 11, and CPU 12. In the present example, a first DMAC (DMAC1) 8 and a second DMAC (DMAC2) 9 are shown as the plurality of DMACs.
The bus bridge 3 includes a reception buffer 4 for read responses which receives a response to a read request issued by the first device 1 and a reception buffer 5 for requests which receives a write/read request issued by the second device 7.
In the present embodiment, the bus bridge 3 further includes a control section 30. The control section 30 controllably switches the function of recognizing reception of read responses and requests transferred via the second bus 6 and independently controlling the order of reads from the reception buffer 4 and the reception buffer 5 and the function of controlling the reads in order of the reception of the read responses and the requests. That is, the control section 30 recognizes the reception of read responses and requests and controllably switches the reads from the reception buffer 4 and 5 as described below in (1) and (2).
(1) After reception of an interruption signal assert packet and before reception of an interruption signal de-assert packet, a response to a read request issued to the second device 7 by the first device 1 and requests issued by the second device 7 are controllably read in the order that the bus bridge 3 receives the response and the request.
(2) During the other periods, read control is independently performed on the response to the read request issued to the second device 7 by the first device 1 and on the request issued by the second device 7.
As described above, according to the present embodiment, the control function of the control section 30 provided in the bus bridge 3 enables consistency to be maintained between an interruption completion status established upon completion of a plurality of DMA write transfers provided by the second device 7 and a response to an interruption status read, with a decrease in the efficiency of the first bus 2 prevented.
An example of the operation of the whole bus bridge system in
The bus bridge 3 independently controls the processing of responses to read requests issued to the second device 7 by the first device 1 (control of reads from the reception buffer 4) and the processing of requests issued by the second device 7 (control of reads from the reception buffer 5) until the bus bridge 3 receives an interruption signal assert packet issued by the EP device. During the independent processing, the two buffers 4 and 5 are independently operated. Thus, even if the first bus 2 is in a busy state with respect to one of the reception buffers, the other reception buffer is prevented from being affected. Consequently, the read responses and the requests can be transmitted to the first device 1 without being affected.
Now, processing executed when DMA writes are being simultaneously operated by DMAC1 and DMAC2 in the EP device 7 will be described in brief. When the DMA write performed by DMAC1 in the EP device 7 is completed, the EP device 7 issues an interruption signal assert packet to the first device 1. At this time, a DMAC1 completion status corresponding to an interruption factor is set in the DMA status register 10 in the EP device 7.
Furthermore, at this time, after recognizing the interruption signal assert packet, the bus bridge 3 switches the method for controlling the read of read requests and requests from the reception buffers 4 and 5 so that the read responses and the requests are processed in order of the reception of the read responses and the requests (sequential processing). Then, the bus bridge 3 notifies the first device 1 that the interruption signal assert packet has been received. During the sequential processing, packets input via the PCI Express bus 6 are output to the first bus 2 in order of the input. Apparently, only one of the two reception buffers 4 and 5 is present.
To check the interruption factor, the first device 1 reads an interruption status (reads the status from the DMA status register 10 in the EP device 7). At this time, if the DMA write performed by DMAC2 in the EP device 7 is completed (the final DMA transfer is performed) immediately before the request for the interruption status read is issued to the EP device 7 by the first device 1, the completion allows a DMAC1 completion status bit and a DMAC2 completion status bit to be set in the DMA status register 10 in the EP device 7 as shown in (2) in
Thereafter, when the interruption status read requested of the EP device 7 by the first device 1 is performed, response data with the set 2 bits is transmitted to the first device 1 by the EP device 7 as shown in (3) in
At this time, in the bus bridge 3, the final write request from DMAC2 is stored in the reception buffer 5 for write/read requests. The response to the interruption status read is stored in the reception buffer 4 for read responses.
In this case, as shown in (4) in
As shown in (5) in
When the DMAC completion status in the interruption status is cleared, the EP device 7 transmits an interruption signal de-assert packet to the first device 1 in order to de-assert the interruption signal asserted by the first device 1.
Upon receiving the interruption signal de-assert packet from the EP device 7, the bus bridge 3 switches the processing of read responses and requests from the processing in order of reception to the independent processing.
Now, the switching control for the operation mode of the reception buffers 4 and 5 will be described with reference to
Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
JP-2008-301295 | Nov 2008 | JP | national |