BACKGROUNDEmbodiments of the present invention relate to bus protocols for devices in computing systems. In particular, the embodiments relate to bus protocols that use a command-response protocol to manage transactions.
Modern computer systems include a plurality of integrated circuit devices interconnected with other devices via computer busses. Bus architectures vary considerably among these systems and many systems, in fact, include multiples of busses having different bus architectures. The different bus architectures can include different protocols used to manage the flow of data among agents connected to the bus. For example, one bus protocol may employ a command-response protocol in which a source agent on the bus transfers a packet of data to a destination agent according to a “command” transaction posted on the bus. The “command” transaction typically includes the data and also includes an indication of what is to be done with the data. The destination agent may generate a “response” transaction indicating either that the packet was received properly or that the commanded action has been completed. The command-response protocol has been used on busses to which more than two agents are connected.
These modern systems can be “bus-limited.” Conventionally, the rate at which agents can process data far exceeds the rate at which the busses between them can carry data. Thus, the speed of the bus can limit the performance of a computer system. These performance limits are particularly acute in systems where several agents are coupled to a common bus, each of them are faster than the bus and each of them compete against the other agents for bus resources.
The inventor had identified a need in the art to conserve resources of busses that operate according to the command-response protocol. In particular, the inventor recognized a need to limit the number of response transactions that are posted on the bus. These response transactions have limited utility—while they permit the source and destination agents to synchronize their operations, they do not transfer data packets themselves.
BRIEF DESCRIPTION OF THE DRAWINGSFIG. 1 illustrates a computer system according to an embodiment of the present invention.
FIG. 2 is a flow diagram of a method according to an embodiment of the present invention.
FIG. 3 illustrates a communication flow between source and destination agents according to an embodiment of the present invention.
FIG. 4 is a simplified block diagram of a transmitting agent according to an embodiment of the present invention.
FIG. 5 is a simplified block diagram of a device driver according to an embodiment of the present invention.
DETAILED DESCRIPTIONEmbodiments of the present invention are directed to a command-response bus protocol that reduces the number of response transactions generated on the bus. According to these embodiments, an array of data is divided into a number of packets and transmitted over the bus in respective transactions. The transactions include a writeback flag, which is enabled for the last packet but disabled otherwise. When a receiver of the packets observes the enabled writeback flag, it generates a response transaction. The response transaction indicates either that all packets of the array were received properly or that the commanded operation has been completed for the entire array.
FIG. 1 illustrates acomputer system100 according to an embodiment of the present invention. The system may include one ormore processors110 andmemory systems120 provided in mutual communication. The system further may include a plurality of peripheral devices1-N (130,140,150) coupled to acommunication bus160. Abus bridge170 may provide an interface between theprocessors110 andmemory systems120 and thecommunication bus160. Thebus160 may include a shared bus architecture, a packet switched bus architecture or a circuit switched bus architecture, among others.
Common peripheral devices130-150 include network interface cards, disk controllers, graphics controllers and the like. These devices typically read or write quantities of data to or from amemory120 to another device outside thecomputer system100. In doing so, the peripheral devices may initiate bus transactions on thebus160 to transfer a quantity of data. When multiple devices or even a single high-speed device is present on acommunication bus160, thebus160 can become highly loaded.
Embodiments of the present invention provide a protocol for a communication bus in a computer system. When it is desired to transfer a quantity of data across the bus, the data may be divided into a plurality of packets, each to be transmitted individually. A source transmits the packets serially, in packet order, to a destination on the bus. When the last packet is to be transmitted, the source sets a flag in the transmitted packet to signal the destination to return a response indicating that its processing of the final packet has been completed. When the destination so responds, it impliedly indicates that all earlier transmitted packets were received and processed properly.
FIG. 2 is a flow diagram of amethod1000 according to an embodiment of the present invention. The method may begin when a source stores a quantity of data (called an “array” herein) to be transmitted across a communication bus. The method divides the array into a plurality of packets for transmission (box1010). For each packet, the method determines whether the packet is the last packet in the array (box1020). If not, the method causes the packet to be transmitted without a “writeback flag” enabled (box1030). Otherwise, if the packet is the last packet to be transmitted, the writeback flag is enabled and the packet is transmitted across the bus (box1040). The method may operate continuously until the data array is transmitted in its entirety.
FIG. 3 illustrates a communication flow between asource310 and adestination320 using the communication protocol of the foregoing embodiments. In this diagram, thesource310 transmits a data array to the destination as individual packets1-N. The source initiates a series of transactions on the communication bus and transfers one of the packets across the bus pursuant to that transaction.
As noted, transfer ofpackets1 through N−1 (boxes330-360) may occur without having enabled a writeback flag within the packet. Transfer of the final packet N (box370) may have the writeback flag enabled. The writeback flag, once detected by thedestination320, may cause the destination to initiate a response to thesource310 in its own transaction, indicating that the data transfer was successfully performed.
FIG. 3 illustrates an example where successful communication is achieved between the source and destination agents. If successful transmission of an array occurs, adestination agent320 will transmit only a single response to all packets in the array. If transmission errors occur with respect to a packet (say,packet2340), thedestination agent320 may generate a transaction on the bus indicating the occurrence of an error.
The foregoing discussion has illustrated communication between a source and a destination. According to embodiments of the present invention, any of the devices directly coupled to a common communication bus may operate as a source or a destination.FIG. 1, for example, illustrates abridge interface170 and a plurality of peripheral devices130-150 coupled tobus160. When thebridge interface170 has data to be transferred todevice2140, for example, it may function as the source anddevice2 may function as a destination in a manner consistent with the disclosure ofFIG. 3. At some other point during operation, another device (say,device1130) may store data to be transferred to thebridge interface170; in this example, thebridge interface170 becomes the destination and thedevice1130 becomes the source.
FIG. 3, for the sake of clarity, omits interstitial communications that may occur on thebus160 during operation. To provide a degree of fairness in the allocation of bus resources among devices, devices are permitted to request and reserve bus bandwidth on round-robin or other pro rata bases. Thus, ifFIG. 3 is representative of a data transfer between thebridge interface170 and thefirst device130 ofFIG. 1, thebus160 may carry not only those packets illustrated inFIG. 3 but additional packets of data pursuant to transactions initiated by other devices (140-150). These other transactions are extraneous to the present discussion and, therefore, have not been shown.
The principles of the present invention may be applied independently to various types of queued data transmissions that commonly are maintained by bus agents. For example, agents typically prioritize various transaction types against each other. Processor read requests typically are deemed of higher priority than transfers of data from main memory to long term storage areas. Alternatively, an agent may maintain separate queues for transmission of data to other agents.
FIG. 4 is a simplified block diagram of a transmittingagent400 according to an embodiment of the present invention. Theagent400 may include a plurality of queues410-430, aconnection manager440 and abus interface450. To simplify the present discussion, assume that the different queues410-430 represent transmissions having different levels of priority with respect to each other. When theagent400 identifies a new data array to be transmitted on a bus, it assigns the array to one of the queues (say, queue410) according to the array's priority level. The data array is queued, packetized and transmitted on the bus.
According to an embodiment, theagent400 may implement multiple instances of the method ofFIG. 2 simultaneously, one for each queue410-430 maintained by the device. This embodiment is particularly useful in implementations where anagent400 drains data from various queues according to some fairness scheme, perhaps a weighted round-robin selection scheme that reflects the relative priorities among the queues. Thus, at various points during operation, theagent400 may have several partially transmitted arrays in its queues410-430. By managing each queue with independent instances of the method1000 (FIG. 2), however, theagent400 may maintain synchronized communication with the various destination agents on the communication bus.
As noted, in other embodiments, separate queues may be maintained for separate agents on the external bus. Thus, ifFIG. 4 hypothetically represented apparatus within the bridge interface170 (FIG. 1),queue1410 may correspond to data destined fordevice1130,queue2420 may correspond to data destined fordevice2140, and so on. In this embodiment, theagent400 may manage data transmissions from the queues410-430 by maintaining multiple independent instances of the method1000 (FIG. 2) for each queue.
The foregoing embodiments also find application in programmable device drivers.FIG. 5 is a simplified block diagram of adevice driver500 according to an embodiment of the present invention. Thedevice driver500 may include aprocessor510, abus interface circuit520, amemory530 and amedium interface circuit540. Theprocessor510 may operate according to executable instructions stored in thememory530. In this embodiment, the executable instructions may cause the processor to operate as described above. Thebus interface circuit520 provides an electrical connection between theprocessor510 and abus550. Thebus interface circuit520 may generate electrical signals on the bus under command of theprocessor510. Themedium interface circuit540 may provide electrical connection between theprocessor510 and other components of the device500 (not shown). As described above, the devices may vary considerably. They may include network interface cards, disk controllers and graphics controllers among others. Themedium interface circuit540 may provide an interface between theprocessor510 and the communication apparatus, disk drive or display apparatus as the case may be. Such components are not material to the present discussion and have been omitted for the sake of clarity.
Several embodiments of the present invention are specifically illustrated and described herein. However, it will be appreciated that modifications and variations of the present invention are covered by the above teachings and within the purview of the appended claims without departing from the spirit and intended scope of the invention.