US 7295563 B2
A method of routing packets includes receiving a first packet, where the first packet has a first ordering requirement with respect to a prior packet that was received before the first packet, allocating a first entry that corresponds to the first packet in a scheduler, where the first entry includes a first indication of the first ordering requirement, and in response to the first indication, selecting the first entry corresponding to the first packet if one or more first resources used by the first packet and one or more second resources that are used by the prior packet but not by the first packet are available. As long as older entries whose resources are available are selected before newer entries, the first entry will be selected after the prior packet's entry due to the inclusion of the first indication in the first entry.
1. A method of routing packets, the method comprising:
receiving a first packet, wherein the first packet has a first ordering requirement with respect to a second packet, and wherein the first ordering requirement requires that the second packet be routed to one or more output ports before the first packet is routed;
allocating a first entry that corresponds to the first packet in a scheduler, wherein the first entry comprises a first indication of the first ordering requirement;
in response to the first indication, selecting the first entry corresponding to the first packet when one or more first resources used by the first packet and one or more second resources that are used by the second packet but not by the first packet are available; and
in response to said selecting, routing the first packet.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. The method of
11. The method of
12. The method of
13. The method of
14. The method of
15. The method of
16. An apparatus comprising:
one or more input ports, wherein the input ports are configured to receive a first packet and a second packet, wherein the second packet has a first ordering requirement with respect to the first packet, and wherein the first ordering requirement requires that the first packet be routed to one or more output ports before the second packet is routed;
a scheduler configured to allocate a first entry for the first packet and a second entry for the second packet, wherein the second entry comprises an indication of the first ordering requirement; and
scheduling logic configured to select one of the entries in the scheduler and to route a packet that corresponds to the selected entry, wherein in response to the indication, the scheduling logic is configured to select the second entry if one or more first resources used by the first packet and one or more second resources used by the second packet but not the first packet are available.
17. The apparatus of
18. The apparatus of
19. The apparatus of
20. The apparatus of
21. The apparatus of
22. The apparatus of
23. The apparatus of
24. The apparatus of
25. The apparatus of
26. The apparatus of
27. A method of routing packets, the method comprising:
receiving a first packet, wherein the first packet has a first set of scheduling requirements;
allocating an entry that corresponds to the first packet in a scheduler, wherein the entry comprises one or more first indications of the first set of scheduling requirements;
receiving a second packet, wherein the second packet has a first ordering requirement with respect to the first packet, and wherein the first ordering requirement requires that the first packet be routed to one or more output ports before the second packet is routed, and wherein the second packet has a second set of scheduling requirements; and
allocating an entry that corresponds to the second packet in the scheduler, wherein the entry comprises one or more second indications of the first and second sets of scheduling requirements; and
in response to the second indications in the second entry, transmitting the second packet to its destination after transmitting the first packet to its destination.
28. The method of
29. The method of
30. The method of
31. The method of
32. An apparatus comprising:
one or more input ports configured to receive a first packet and a second packet, wherein the second packet has a first ordering requirement with respect to the first packet, and wherein the first ordering requirement requires that the first packet be routed to one or more output ports before the second packet is routed, wherein the first packet has a first set of scheduling requirements and the second entry has a second set of scheduling requirements;
a scheduler configured to allocate a first entry for the first packet, wherein the first entry comprises a first indication of the first set of scheduling requirements, wherein the scheduler is configured to allocate a second entry for the second packet, wherein the second entry comprises a second indications of the first and the second set of scheduling requirements;
scheduling logic configured to select one of the entries from the scheduler and, in response, to route a packet corresponding to the selected entry, wherein in response to the second indication, the scheduling logic is configured to select the first entry before the second entry.
33. The apparatus of
34. The apparatus of
35. The apparatus of
36. The apparatus of
1. Field of the Invention
This invention relates to computer and network systems and, more particularly, to routing packets in a computer or network system.
2. Description of the Related Art
Generally, personal computers (PCs) and other types of computer systems have been designed around a shared bus system for accessing memory. One or more processors and one or more input/output (I/O) devices are coupled to memory through the shared bus. The I/O devices may be coupled to the shared bus through an I/O bridge that manages the transfer of information between the shared bus and the I/O devices, and processors are typically coupled directly to the shared bus or are coupled through a cache hierarchy to the shared bus.
Unfortunately, shared bus systems may experience several drawbacks. For example, since there are multiple devices attached to the shared bus, the bus is typically operated at a relatively low frequency. The multiple attachments present a high capacitive load to a device driving a signal on the bus, and the multiple attach points present a relatively complicated transmission line model for high frequencies. Accordingly, the frequency remains low, and thus the bandwidth available on the shared bus is relatively low. The low bandwidth presents a barrier to attaching additional devices to the shared bus, since additional devices may negatively impact performance.
Another disadvantage of the shared bus system is a lack of scalability to larger numbers of devices. As mentioned above, the amount of bandwidth is fixed (and may decrease if adding additional devices reduces the operable frequency of the bus). Once the bandwidth requirements of the devices attached to the bus (either directly or indirectly) exceeds the available bandwidth of the bus, devices will frequently be stalled when attempting access to the bus. As a result, overall performance may be decreased.
One or more of the above problems may be addressed by using a distributed memory system. A computer system employing a distributed memory system includes multiple nodes. Two or more of the nodes are connected to memory, and the nodes are interconnected using any suitable interconnect. For example, each node may be connected to each other node using dedicated lines. Alternatively, each node may connect to a fixed number of other nodes, and transactions may be routed from a first node to a second node to which the first node is not directly connected via one or more intermediate nodes. The memory address space is assigned across the memories in each node.
Generally, a “node” is a device which is capable of participating in transactions upon the interconnect. For example, in a packet-based interconnect the node may be configured to receive and transmit packets to other nodes. One or more packets may be employed to perform a particular transaction. A particular node may be a destination for a packet, in which case the information is accepted by the node and processed internally in the node. Alternatively, the particular node may be used to relay a packet from a source node to a destination node if the particular node is not the destination node of the packet.
Distributed memory systems present design challenges that differ from the challenges in shared bus systems. For example, shared bus systems regulate the initiation of transactions through bus arbitration. Accordingly, a fair arbitration algorithm allows each bus participant the opportunity to initiate transactions. The order of transactions on the bus may represent the order that transactions are performed (e.g., for coherency purposes). On the other hand, in distributed memory systems, nodes may initiate transactions concurrently and use the interconnect to transmit the transactions to other nodes. These transactions may have logical conflicts between them (e.g., coherency conflicts for transactions to the same address) and may experience resource conflicts (e.g., buffer space may not be available in various nodes) since no central mechanism for regulating the initiation of transactions is provided. Accordingly, it is more difficult to ensure that information continues to propagate among the nodes smoothly and that deadlock situations (in which no transactions are completed due to conflicts between the transactions) are avoided.
By employing virtual channels and allocating different resources to the virtual channels, conflicts may be reduced. Generally speaking, a “virtual channel” is a communication path for initiating transactions (e.g., by transmitting packets containing commands) between various processing nodes. Each virtual channel may be resource-independent of the other virtual channels (i.e., packets flowing in one virtual channel are generally not affected, in terms of physical transmission, by the presence or absence of packets in another virtual channel). Packets that do not have logical/protocol-related conflicts may be grouped into a virtual channel. For example, packets may be assigned to a virtual channel based upon packet type. Packets in the same virtual channel may physically conflict with each other's transmission (i.e., packets in the same virtual channel may experience resource conflicts), but may not physically conflict with the transmission of packets in a different virtual channel (by virtue of the virtual channels being resource-independent of each other). Accordingly, logical conflicts occur between packets in separate virtual channels. Since packets that may experience resource conflicts do not experience logical conflicts and packets which may experience logical conflicts do not experience resource conflicts, deadlock-free operation may be achieved.
In order to avoid deadlock, virtual channels may need to be able to make progress independently. If not, both logical and resource conflicts may arise between packets, providing an opportunity for deadlock. For example, assume a first virtual channel includes packets that contain requests for data from a memory controller. In order to process each request, the memory controller may send responses to the requests in a second virtual channel. In order to avoid deadlock, neither the first nor the second virtual channel should be able to block each other. However, the first virtual channel may be blocked if packets are unable to progress because the memory controller's queue (for receiving packets in the first virtual channel) is full. In order to process the first packet in the first virtual channel's queue in the memory controller, thus freeing up room in the queue to accept more packets from the first virtual channel, a response to the request in the first packet may need to be sent in the second virtual channel. If responses cannot be sent in the second virtual channel due to the blocked first virtual channel, deadlock may arise.
In addition to deadlock, another concern that may arise when implementing a packet-based system using virtual channels is starvation. Starvation may occur if one interface (e.g., an interface to another node or to a device, like a memory controller, that is internal to a node) in a node is unable to share the available bandwidth in a particular virtual channel. System performance is another concern. Generally, it may be preferable to route “older” packets (i.e., those that have been waiting to be routed for a longer amount of time) before “newer” packets. Physically routing the interconnections between the interfaces and devices within a node may present an additional problem. In general, it may be preferable to have fewer and shorter interconnections. However, each interface within a node may need to be able to send and receive packets in each virtual channel from each other interface in the node. Providing this capability may lead to complex physical interconnections within the node.
Various systems and methods for routing packets are disclosed. In one embodiment, a method of routing packets includes receiving a first packet that has a first ordering requirement with respect to a prior packet (i.e., a packet that was received before the first packet) and allocating a first entry that corresponds to the first packet in a scheduler. The first entry includes an indication of the first ordering requirement. In response to the indication, the first entry corresponding to the first packet is selected from the scheduler if one or more first resources used by the first packet and one or more second resources that are used by the prior packet but not by the first packet are available. The first packet may then be routed in response to its entry being selected.
The first ordering requirement may be a requirement that the prior packet be routed before the first packet. For example, if the prior packet includes a write command, the first packet includes a read command to the same address, and the write command was sent before the read command, the write should be performed before the read. Otherwise, the read may access stale data. Since including the first indication in the first entry means the first entry will not be routed until the resources used by the prior packet are available, the first packet will be routed after the prior packet as long as older packets whose resources are available are routed before newer packets.
In one embodiment, the first packet may be traveling in a same virtual channel as the prior packet. The prior packet may have an associated data packet and the first packet may not. If the first packet should be routed after the prior packet, the first indication may include an indication that the first packet should not be scheduled unless a data buffer is available at the first packet's destination, even though an available data buffer may not be needed to route the first packet.
In another embodiment, the first packet may be traveling in a different virtual channel than the prior packet. The first indication of the first ordering requirement may indicate that the first packet should not be selected unless a buffer in the prior packet's virtual channel is available.
In yet another embodiment, an apparatus (e.g., a node or a network device) includes one or more input ports configured to receive a first packet and a second packet. The second packet has a first ordering requirement with respect to the first packet. The node or network device may also include a scheduler configured to allocate a first entry for the first packet and a second entry for the second packet. The second entry includes an indication of the first ordering requirement. The node or network device may include scheduling logic configured to select one of the entries in the scheduler and to route a packet that corresponds to the selected entry. In response to the indication in the second entry, the scheduling logic may be configured to select the second entry if one or more first resources used by the first packet and one or more second resources used by the second packet are available.
The first packet and the second packet may be traveling in the same virtual channel, and the first indication may indicate that the second entry should not be selected unless a data buffer is available at the second packet's destination. Alternately, the first packet and the second packet may not be traveling in the same virtual channel, and the indication may indicate that the second entry should not be selected unless a buffer at the second packet's destination is available to receive packets traveling in the first packet's virtual channel.
While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims.
Turning now to
Processing nodes 12A-12D implement a packet-based link for inter-processing node communication. In the present embodiment, the link is implemented as sets of unidirectional lines (e.g., lines 24A are used to transmit packets from processing node 12A to processing node 12B and lines 24B are used to transmit packets from processing node 12B to processing node 12A). Other sets of lines 24C-24H may be used to transmit packets between other processing nodes, as illustrated in
All or some of processing nodes 12A-12D may include one or more processors. Broadly speaking, a processing node may include a processor and a memory controller for communicating with a memory and other logic as desired. As used herein, a “node” is a device which is capable of participating in transactions upon the interconnect.
Memories 14A-14D may include any suitable memory devices. For example, a memory 14A-14D may comprise one or more RAMBUS DRAMs (RDRAMs), synchronous DRAMs (SDRAMs), DRAM, static RAM, etc. The address space of computer system 10 is divided among memories 14A-14D. Each processing node 12A-12D may include a memory map used to determine which addresses are mapped to which memories 14A-14D, and hence to which processing node 12A-12D a memory request for a particular address is to be routed. In one embodiment, the coherency point for an address within computer system 10 is the memory controller 16A-16D coupled to the memory storing bytes corresponding to the address. Memory controllers 16A-16D may include control circuitry for interfacing to memories 14A-14D. Additionally, memory controllers 16A-16D may include request queues for queuing memory requests.
Generally, the interface logic of each node may include buffers for receiving packets from the link and for buffering packets to be transmitted upon the link. Computer system 10 may employ any suitable flow control mechanism for transmitting packets. For example, in one embodiment, each node stores a count of the number of each type of buffer within the receiver at the other end of the link to which each interface logic is connected. The node does not transmit a packet unless the receiving node has a free buffer to store the packet. As a receiving buffer is freed by routing a packet onward, the receiving interface logic transmits a message to the sending interface logic to indicate that the buffer has been freed. Such a mechanism may be referred to as a “coupon-based” system.
I/O devices 20A-20B are illustrative of any desired peripheral devices. For example, I/O devices 20A-20B may include network interface cards, video accelerators, audio cards, hard or floppy disk drives or drive controllers, SCSI (Small Computer Systems Interface) adapters and telephony cards, modems, sound cards, and a variety of data acquisition cards such as GPIB (General Purpose Interface Bus) or field bus interface cards.
Turning next to
The clock line may transmit a clock signal that indicates a sample point for the control line and the control/address/data bus. In one particular embodiment, data/control bits may be transmitted on each edge (i.e., rising edge and falling edge) of the clock signal. Accordingly, two data bits per line may be transmitted per clock cycle. The amount of time employed to transmit one bit per line is referred to herein as a “bit time.” The above-mentioned embodiment may include two bit times per clock cycle. A packet may be transmitted across two or more bit times. Multiple clock lines may be used depending upon the width of the control/address/data bus. For example, two clock lines may be used for a 32-bit control/address/data bus (with one half of the control/address/data bus referenced to one of the clock lines and the other half of the control/address/data bus and the control line referenced to the other clock line).
The control line indicates whether the data transmitted upon the control/address/data bus is a bit time of a control packet or a bit time of a data packet. The control line may be asserted to indicate a bit time of a control packet and deasserted to indicate a bit time of a data packet. Certain control packets may indicate that a data packet follows. The data packet may immediately follow the corresponding control packet. In one embodiment, other control packets may interrupt the transmission of a data packet. Such an interruption may be performed by asserting the control line for a number of bit times during transmission of the data packet and transmitting the bit times of the control packet while the control line is asserted. In one embodiment, only control packets that do not indicate that a data packet will be following may interrupt a data packet. Additionally, in one embodiment, the control line may be deasserted during transmission of a control packet to indicate stall bit times. A subsequent reassertion of the control line may indicate that the control packet is continuing.
The control/address/data bus comprises a set of lines for transmitting the data/control bits. In one embodiment, the control/address/data bus may comprise 8, 16, or 32 lines. Each processing node or I/O bridge may employ any one of the supported numbers of lines according to design choice. Other embodiments may support other sizes of control/address/data bus as desired.
According to one embodiment, the command/address/data bus lines and the clock line may carry inverted data (i.e., a logical one is represented as a low voltage on the line, and a logical zero is represented as a high voltage). Alternatively, lines may carry non-inverted data (in which a logical one is represented as a high voltage on the line, and logical zero is represented as a low voltage).
Turning now to
Generally, a packet is a communication between two nodes (an initiating node which transmits the packet and a destination node which receives the packet). The initiating node and the destination node may differ from the source and target node of the transaction of which the packet is a part, or either node may be either the source node or the target node. A control packet is a packet carrying control information regarding the transaction. Certain control packets may specify that a data packet follows. The data packet carries data corresponding to the transaction and corresponding to the specifying control packet.
Some of the undefined fields in packet 32 may be used in various request packets to carry packet-specific information. Furthermore, bit time 4 may be used in some requests to transmit the least significant bits of the memory address affected by the transaction.
Turning now to
A read transaction is initiated using one of the ReadSized, RdBlk, RdBlkS or RdBlkMod commands. The ReadSized command is used for non-cacheable reads or reads of data other than a block in size. The amount of data to be read is encoded into the ReadSized command packet. For reads of a block, the RdBlk command may be used unless: (i) a writeable copy of the block is desired, in which case the RdBlkMod command may be used; or (ii) a copy of the block is desired but no intention to modify the block is known, in which case the RdBlkS command may be used. The RdBlkS command may be used to make certain types of coherency schemes (e.g., directory-based coherency schemes) more efficient. In general, the appropriate read command is transmitted from the source initiating the transaction to a target node that owns the memory corresponding to the block. The target node transmits Probe commands (indicating return of probe responses to the source of the transactions) to the other nodes in the system to maintain coherency by changing the state of the block in those nodes and by causing a node including an updated copy of the block to send the block to the source node. Each node receiving a Probe command transmits a ProbeResp response packet to the source node. If a probed node has an updated copy of the read data (i.e., dirty data), that node transmits a RdResponse response packet and the dirty data. A node transmitting dirty data may also transmit a MemCancel response packet to the target node in an attempt to cancel transmission by the target node of the requested read data. Additionally, the memory controller in the target node transmits the requested read data using a RdResponse response packet followed by the data in a data packet. If the source node receives a RdResponse response packet from a probed node, that read data is used. Otherwise, the data from the target node is used. Once each of the probe responses and the read data is received in the source node, the source node transmits a SrcDone response packet to the target node as a positive acknowledgement of the termination of the transaction.
A write transaction is initiated using a WrSized or VicBlk command followed by a corresponding data packet. The WrSized command is used for non-cacheable writes or writes of data other than a block in size. To maintain coherency for WrSized commands, the target node transmits Probe commands (indicating return of probe response to the target node of the transaction) to each of the other nodes in the system. In response to Probe commands, each probed node transmits a ProbeResp response packet to the target node. If a probed node is storing dirty data, the probed node responds with a RdResponse response packet and the dirty data. In this manner, a block updated by the WrSized command is returned to the memory controller for merging with the data provided by the WrSized command. The memory controller, upon receiving probe responses from each of the probed nodes, transmits a TgtDone response packet to the source node to provide a positive acknowledgement of the termination of the transaction. The source node replies with a SrcDone response packet.
A victim block that has been modified by a node and is being replaced in a cache within the node is transmitted back to memory using the VicBlk command. Probes are not needed for the VicBlk command. Accordingly, when the target memory controller is prepared to commit victim block data to memory, the target memory controller transmits a TgtDone response packet to the source node of the victim block. The source node replies with either a SrcDone response packet to indicate that the data is to be committed or a MemCancel response packet to indicate that the data has been invalidated between transmission of the VicBlk command and receipt of the TgtDone response packet (e.g., in response to an intervening probe).
The ChangetoDirty request packet may be transmitted by a source node in order to obtain write permission for a block stored by the source node in a non-writeable state. A transaction initiated with a ChangetoDirty command may operate similar to a read except that the target node does not return data. The ValidateBlk command may be used to obtain write permission to a block not stored by a source node if the source node intends to update the entire block. While no data is transferred to the source node for such a transaction, the transaction otherwise operates similar to a read transaction.
The TgtStart response may be used by a target to indicate that a transaction has been started (e.g., for ordering of subsequent transactions). The Nop info packet is a no-operation packet which may be used to transfer information such as buffer free indications between nodes. The Broadcast command may be used to broadcast messages between nodes (e.g., the broadcast command may be used to distribute interrupts). Finally, the sync info packet may be used for cases in which synchronization of the fabric is desired (e.g., error detection, reset, initialization, etc.).
In a distributed memory computing system such as the one described above, packets are routed both between and within nodes. A flow control scheme may handle routing between individual nodes. For example, in a coupon-based flow control scheme, the transmitting node may maintain a count of available buffers in the receiving node. Whenever the receiving node indicates that it has freed or used a buffer, the sending node may update the current buffer count. Whenever the buffer count indicates that all of the available buffers are filled, the transmitting node may stop sending packets in order to avoid overrunning the buffers in the receiving node.
Certain packets may logically conflict with other packets (e.g., for protocol reasons or coherency reasons). If a first packet logically conflicts with a second packet, a deadlock situation may arise if the second packet physically blocks the first packet's transmission (e.g., by occupying conflicting resources). In order to reduce the chance of deadlock, it may be desirable to structure communications so that packets that may logically conflict with each other may not experience physical conflicts with each other, and vice versa. One way to do this is to assign packets that may experience logical conflicts to different “virtual” communication channels and to implement the transmission medium so that the virtual channels may not experience physical conflicts with each other. It is noted that in some embodiments, packets from different virtual channels may be transmitted over the same physical links (e.g., lines 24 in
If packets of the same type are unlikely to logically conflict with each other, each packet may be assigned to a virtual channel based upon its command encoding (see the command code column of
For simplicity, the four virtual channel embodiment described above will be referred to in most of the following description and examples. However, it is noted that other embodiments may choose different numbers and/or groupings of virtual channels, as desired. For example, one embodiment may not support posted requests. That embodiment may have three virtual channels (broadcasts, requests, and responses) instead of four. Other embodiments may have more than four virtual channels.
In order to avoid deadlock, the virtual channels may be structured to avoid resource conflicts with each other (i.e., one virtual channel may not be allowed to block another). For example, the request virtual channel may become blocked if a constant stream of requests all need to be transmitted to a full request queue in a memory controller. In order to service the entry at the head of the request queue, and thus free up room to accept a new request, the memory controller may need to be able to transmit responses and probes. Accordingly, to avoid deadlock, the stalled request virtual channel may not be able to block the response and/or broadcast virtual channels.
In addition to avoiding deadlock, there may be other concerns when routing packets in a distributed system. These concerns may include fairness (e.g., making sure each interface and/or virtual channel has access to the available bandwidth), performance (e.g., routing packets that were received earlier before those that were received later), and the complexity of the physical interconnections within each node.
A node may use a distributed buffering, centralized scheduling system in order to address some of these concerns. For example, each of the node's interfaces may have independent input buffers for each virtual channel, and packets may be routed using a centralized scheduler. In some embodiments, using a centralized scheduler may address fairness, starvation, physical routing, and performance concerns as follows. With respect to fairness and starvation, the centralized scheduling system may be configured to only route packets that have input buffers ready to receive them. If so, packets are scheduled based on their state of readiness, independently of which virtual channel they belong to or which interface received them. Since packets that are not ready to be routed (i.e., packets that do not have input buffers available at their destination) may not impact the scheduling process, virtual channels may not block each other. Similarly, since scheduling may be done independently of which virtual channel a packet belongs to and which interface received the packet, fairness may improve and the likelihood of starvation may decrease.
With respect to performance, the centralized scheduling system may track the relative age (i.e., how long ago each packet was received by the node) of each packet. Based on each packet's relative age, the centralized scheduling system may be configured to route older packets before younger packets. For example, once input buffers are available for a certain virtual channel at a certain destination, all of the packets in that virtual channel to that destination may become schedulable. Using the relative age of the packets in that virtual channel that are to be routed to that destination, the oldest of these packets may be identified, allowing the oldest packet to be routed first and consequentially improving performance.
Furthermore, if packets are buffered in distributed input buffers (i.e., one set of input buffers for each interface), the physical routing within a node may be improved. For example, packets may not be written into the centralized scheduler in many embodiments, simplifying the inputs to the scheduler. Similarly, in some embodiments, multiplexers may be used to provide packets to each output port, simplifying the physical routing within the node.
In the illustrated embodiment, each interface 42 may have an associated set of control buffers and an associated set of data buffers. For example, control and data packets received by interface 42A may be stored in control buffers 46A and data buffers 48A respectively. For simplicity, the collective set of control buffers 46A-46F will hereinafter be referred to as control buffers 46, and the collective set of data buffers 48A-48F will be referred to as data buffers 48. Generally, the control buffers 46 may store control packets to be routed (e.g., requests, responses, broadcasts, and posted requests). The data buffers 48 may store data packets that are associated with a particular command. Collectively, the control buffers 46 and data buffers 48 are referred to as input buffers 41. Each set of command and data buffers for each interface may include independent command and data buffers for each virtual channel (see
A router 54 uses the centralized scheduler 40 to route packets stored in the input buffers 41 to the various interfaces 42 within the node 12. The scheduler 40 may allocate an entry for each control packet that is currently stored in one of the control buffers 46 (part of routing a control packet may include routing an associated data packet, if there is one, so the scheduler may not include entries for each data packet). Each entry may contain information about its associated packet. The scheduler control logic 60 may use this information in the entries to determine which packet to route. For example, the scheduler control logic 60 may select an entry that corresponds to the next packet to be routed within the node. Once the scheduler control logic 60 selects an entry, the router 54 may generate appropriate control signals that cause the buffer 46 that is storing the packet corresponding to the selected entry to output the packet to the multiplexer 52A. If the selected entry also has an associated data packet, the router 54 may also generate signals that cause the buffer 48 storing the data packet to output the packet to the multiplexer 52B. The outputs of these two multiplexers (collectively referred to as multiplexers 52) may be provided to each interface 42. The router 54 may generate control signals that identify to which interface(s) 42 the selected packet is to be routed. In response to being identified by these signals, an interface 42 may receive the selected packet(s) from the multiplexers 52 and send the selected packet(s) to the node or device with which the interface communicates.
Like the sample packets in
In the illustrated embodiment, each interface 42 may be configured to only output a packet when the router 54 has identified that interface as the packet's recipient. For example, the router 54 may notify the interface 42B to accept the packet output by the multiplexer 52A. While the packet may be provided to each of the other interfaces, only interface 42B may accept the packet, since it is the only interface identified by the router 54 as the recipient. Once the packet is received by the interface 42B, the interface 42B may output the packet to the CPU, which may in turn process the packet according to the command in the packet. If there is an associated data packet, the data packet may be routed in a similar manner using a multiplexer 52B.
The multiplexers 52 may be used to ease the physical routing of interconnections between the interfaces 42. In some embodiments, each multiplexer 52 may represent multiple multiplexers (e.g., one for each interface 42). In these embodiments, the output of each of the multiple multiplexers 52 may only be routed to its corresponding interface (as opposed each multiplexer's output being routed to all of the interfaces). In one embodiment, using a routing scheme that has only one data path per interface may simplify the physical routing within the node.
Note that in the illustrated embodiment, only one control packet may be routed at a time. Other embodiments may allow different packets to be routed to each interface 42 at approximately the same time. For example, in one embodiment, there may be a control packet multiplexer (like multiplexer 52A) for each interface 42. In this embodiment, each time the router 54 performs a routing operation, the router 54 may identify a control packet that is to be provided to each multiplexer (if less than all of the interfaces have packets that are ready to be routed to them, no packets may be provided to some of the multiplexers). Since the interfaces 42 each have their own multiplexer, they may be configured to accept each packet provided from their particular multiplexer (as opposed to the illustrated embodiment, where each interface 42 depends on the router 54 to identify whether it is the intended recipient of a packet output from a shared multiplexer).
Upon receiving a packet, the input port 44 may store that packet in an appropriate one of the interface's input buffers 41A. Some packets (e.g., info packets) that are not routed to another interface within the node may not be stored in the input buffers 41A. For example, if an info packet containing an updated buffer count (for the node or device with which the interface 42A communicates) is received by the input port 44, the input port 44 may send the updated buffer count to the router 54 instead of storing the info packet in one of the input buffers.
Interface 42A may also include an output port 45. The output port 45 may receive packets output by the multiplexers 52 (in
As shown, interface 42A may have its own set of input buffers 41A. These input buffers 41A may be subdivided into control buffers 46A, which store control packets, and data buffers 48A, which store data packets. In some embodiments, control packets may be substantially smaller and may occur more frequently than data packets. Because of this size and frequency disparity, providing separate input buffers for control and data packets may allow buffer space to be used more efficiently. Thus, if a control packet that does not specify a data packet is received, no data packet buffer space may be allocated. Alternately, if a control packet that does specify a data packet is received, both control packet buffer space and data packet buffer space may be allocated. To increase efficiency, a larger number of relatively smaller buffers may be provided for control packets, while fewer, larger buffers may be provided for data packets.
Also, each set of control and data buffers may be subdivided into sets of one or more buffers for each virtual channel or, alternatively, shared between the virtual channels. In the illustrated embodiment, there are four sets of control buffers for four different virtual channels: request, posted request, response, and broadcast. Set CB0 may store requests, set CB1 may store responses, set CB2 may store posted requests, and set CB3 may store broadcasts. There are also three sets of data buffers for three different virtual channels: request, posted request, and response (in this embodiment, broadcast packets do not include data packets, so no broadcast data buffers are shown). Note that in other embodiments, broadcasts may have associated data packets.
The input buffers 41A may be controlled by buffer control logic 50. In response to the control packet being received by the input port 44 (or in response to a control packet being stored in one of the input buffers 41A by the input port 44), the buffer control logic 50 may send data identifying that packet to be included in an entry allocated in the scheduler 40. For example, the entry data may include the location of the packet within input buffers 41A (e.g., buffer 3 in set CB0), the virtual channel of the packet (e.g., request), whether the packet has an associated data packet and, if so, the location of that data packet (e.g., buffer 1 in set DB0), and the destination interface(s) (e.g., Interface 3) to which the packet is to be routed. As mentioned earlier, the destination specified in the packet header may identify a device in another node within the overall system (e.g., the memory controller in Node X) instead of a device within the node through which the packet is currently being routed. Accordingly, the buffer control logic 50 may be configured to access routing information that identifies which interface(s) the packet is to be routed to based on the packet's ultimate destination(s). This routing information may be used to specify the destination in that packet's entry in the scheduler.
The buffer control logic 50 may also be configured to receive signals from the router 54 identifying the location of a packet that has been selected to be routed. For example, if the router 54 identifies that the packet in the third buffer in set CB0 has been scheduled, the buffer control logic 50 may cause the input buffers 41A to output that packet to the multiplexer 52A.
The scheduler control logic 60 may be coupled to receive updated buffer counts from the interfaces 42. For example, in a coupon-based system, the ability of each interface 42 to send a packet to the node or device with which it communicates may depend on whether the node or device that interface communicates with has input buffers available to receive the packet. In order to track how many buffers are available at each interface's destination, each interface may receive an updated buffer count after a packet stored in one of that interface's destination's input buffers is routed, since an input buffer is now available to store another packet from that interface. Each interface may then pass this updated buffer count to the scheduler control logic 60. In response to receiving an updated buffer count from one of the interfaces 42, the scheduler control logic 60 may update the value stored in the current buffer count register 64 for that particular virtual channel and interface. For example, whenever I4 receives an updated buffer count from the interface of the node it communicates with, I4's input port 44 may communicate that updated buffer count to the router 54, and in response, the scheduler control logic 60 may update the appropriate current buffer count register 64. The total and current buffer counts may be used to route packets within the node, since in this embodiment a packet may not be routed unless input buffers are available for it in its virtual channel and at its destination. For example, if a response packet's intra-node destination is I0, that response packet can be routed if the total number of response buffers (at the interface of the node with which Interface 0 communicates) exceeds the current number of response buffers being used.
Note than in other embodiments, the buffer counts may each be tracked using a single count register. For example, one of the buffer counts may be initialized to the total number of available buffers for the virtual channel and the interface that buffer count corresponds to. As buffers are filled and emptied, the buffer count may be respectively decremented and incremented to reflect the changes. When this buffer count equals zero, it may indicate that no buffers are currently available at that interface for that virtual channel.
As discussed briefly above, the router 54 may include a scheduler 40, which allocates an entry for each control packet stored in one of the input buffers 41. The scheduler control logic 60 may be configured to allocate an entry in the scheduler 40 in response to one of the interfaces 42 receiving a packet or storing a packet in one of the input buffers 41. In some embodiments, the scheduler control logic 60 may be configured to allocate each entry in the scheduler 40 at the top of the router 54. After an entry is selected and the packet corresponding to that entry is routed, the scheduler 40 may shift the entries that are newer than the selected entry down to fill the space vacated by the selected entry. This way, entries are shifted closer to the bottom of the scheduler to reflect the fact that they have become progressively older with respect to newer, higher entries. As a result, the relative ordering of entries in the scheduler 40 may be used to determine the relative age of each entry, allowing age to be used as a routing criterion.
The scheduler 40 may be configured to allocate an entry for each control packet that is to be routed within the node (i.e., each packet stored in one of the control input buffers 46). Each entry may include information identifying which interface received the packet (and thus which interface's input buffers are storing the packet), the buffer location where the packet (and its associated data packet, if there is one) is stored, the virtual channel of the packet, the destination interface of the packet, and whether the packet has an associated data packet. Each entry may also identify which control buffer the packet is stored in (and, if there is an associated data packet, which data buffer the associated data packet is stored in). In some embodiments, the scheduler control logic 60 may be configured to pipeline scheduling and each entry may include a status bit identifying whether the entry is in the pipeline (i.e., is already being scheduled).
An exemplary entry 61 is illustrated within scheduler 40 in
In some embodiments, the entry information for a particular packet may be significantly smaller than the packet it describes. This may reduce the size of the scheduler 40. For example, in one embodiment, control packets may be 64 bits and data packets may be up to 64 bytes. Each control buffer may therefore store at least 64 bits and each data buffer may store 64 bytes. In contrast, a 20-bit entry may be able to specify relevant routing information for each control packet. Accordingly, a scheduler entry may be significantly smaller than the actual packet it corresponds to. However, it is noted that in some embodiments, the entries may be nearly as large as, or even as large as, the packets they describe.
Which entry is selected may depend, in part, on flow control information related to the packet. For example, in a coupon-based flow control scheme, a packet may not be routed until an input buffer is available to receive that packet. When an entry corresponds to a packet that also specifies a data packet, the corresponding packet may not be routed until both a data buffer and a control buffer are available in that packet's virtual channel. Thus, the total and current buffer counts stored in the registers 62 and 64 may be used to determine which of the entries in the scheduler 40 are ready to be scheduled (i.e., which entries have an input buffer available at their destination). For example, if an entry in the request virtual channel is to be routed to I2, that entry will be ready to be scheduled when the interface at the node with which I2 communicates has an input buffer available in the request virtual channel. Thus, if the buffer count registers indicate that the interface has request buffers available, the entry may be scheduled. Because buffer availability may vary over time, entry readiness may be recalculated for each scheduling attempt. Since packets that are not ready to be routed (e.g., packets that do not have input buffers available at their destination) may not impact the scheduling process (e.g., they are not considered ready and are thus ignored during entry selection), virtual channels may not block each other. Similarly, since packets may be routed independently of which interface received each packet, fairness may improve and the likelihood of starvation may decrease.
Once entry readiness has been calculated, the scheduler control logic 60 may be configured to select the oldest entry that is currently ready to be scheduled. In some embodiments, the relative arrival time, or age, of a packet may be determined from the relative location of the entry corresponding to the packet in the scheduler 40. In these embodiments, the scheduler control logic 60 may be configured to scan from the oldest entry towards the youngest entry when looking for a “ready” entry so that the oldest ready entry is selected each time.
Once an entry has been selected from the scheduler 40 and the packet corresponding to that entry has been output from the input buffers 41 to the appropriate destination interface 42, the entry may be deleted from the scheduler 40. In one embodiment, each entry may include a validity indication, and an entry may be deleted by modifying the validity indication to indicate that the entry is no longer valid. In embodiments where the relative placement of entries in the scheduler 40 indicates the relative age of the entries, an entry may be deleted by shifting younger entries down towards the bottom of the scheduler 40, thus making room for newer entries at the top of the scheduler 40.
The multiplexer 72 receives control buffer ready signal(s) that correspond to each of the six interfaces (I0-I5). In this embodiment, there are four virtual channels, so each interface's control buffer ready signals may include one signal per virtual channel. These control buffer ready signals may be determined from the current and total buffer counts (e.g., the values stored in registers 64 and 62 in
The destination interface specified in the entry may be used as the input to the multiplexer 72. Based on the destination interface, the relevant control buffer ready signals may be selected. For example, if an entry's destination interface is I5, I5's control buffer ready signals may be selected by the multiplexer 72. Likewise, the entry's virtual channel is used as the input to the multiplexer 74, which selects the relevant control buffer ready signal based on the entry's virtual channel.
If the packet corresponding to a particular entry has an associated data packet, the entry may include an indication that a data packet is also to be routed. For example, in this embodiment, each entry may include a bit that indicates whether a data packet is to be routed. If the bit is set, that may indicate that there is an associated data packet. In order to route both a control and data packet, both control and data buffers should be available. Thus, when there is an associated data packet, the multiplexers 68 and 70 may be used to determine whether there are data buffers available. Like the multiplexers 72 and 74 select the appropriate control buffer ready signals, the multiplexers 68 and 70 select the appropriate data buffer ready signals based on the destination interface and virtual channel specified in the entry. The inverter 82 and the OR gate 80 may be used so that data buffer readiness is only considered for entries that have associated data packets.
In embodiments where scheduling is pipelined, it may be inefficient to allow an entry that is already being scheduled to be selected again. As a result, each entry may also include an indication of whether that entry is already in the pipeline. For example, in the illustrated embodiment, the indication is a status bit that is set if the entry is not already being scheduled (this bit may be set when each entry is allocated). If the entry is already being scheduled, the status bit may be cleared, causing the entry ready signal to be deasserted. In another embodiment, each entry may include several status bits that indicate which pipeline stage, if any, the entry is currently in (e.g., all of the status bits may be cleared when the entry is not in the pipeline, then when the entry enters the pipeline, a first bit may be set, and as the entry proceeds through the pipeline, this bit may be shifted, reflecting that the entry has proceeded to other pipeline stages). In one such embodiment, the logical OR of the various status bits may be used to determine whether the entry is currently being scheduled.
Thus, the entry readiness calculator 100 shown in
Since there may be entry readiness calculators 100 for each entry in the scheduler 40, entry readiness may also depend on whether a valid entry is currently allocated in each particular entry location. In one embodiment, the status bit that indicates whether an entry has already entered the pipeline may be cleared for an invalid entry, causing the entry readiness calculator 100 to deassert the entry ready signal and preventing the invalid entry from being scheduled.
Alternately, if younger entries are shifted to fill in the location vacated by a scheduled entry, the scheduler control logic 60 may maintain a pointer to the topmost valid location in the schedule 40. This pointer may be used to allocate new entries at the top of the scheduler 40 as packets are stored in the input buffers. Additionally, this pointer may indicate the final entry for which entry readiness is to be considered by the scheduler control logic 60 so that invalid entries are not inadvertently scheduled.
Turning now to
In some embodiments, there may be certain temporal dependencies between packets in the same virtual channel. Normally, if a system routes older packets before younger packets, any temporal order between packets will tend to be maintained. Furthermore, if there are no dependencies, it may benefit performance to rearrange the order of packets that have different scheduling requirements (e.g., a packet that needs an available control buffer to be routed may be allowed to pass another packet that needs both a control and a data buffer to be available to be routed). However, when dependencies do exist, rearranging the order may produce an undesired result, such as a read request accessing stale data. Also, if order is maintained during routing, performance may be improved since sending devices may be designed to send multiple packets without waiting for a response to each packet before sending the next.
One approach to ordering packets within a virtual channel may use the existing flow control scheme (e.g., the control and data buffer ready signals) to maintain proper ordering within a virtual channel. For example, if packet A is a write request and has an associated data packet and packet B is a read request that targets the same address as the write request of packet A, routing packet B before packet A may result in the read accessing stale data. Thus, packet B has the ordering requirement that it should not be scheduled before packet A. In order to keep the read behind the write, the scheduler control logic may modify the entry for packet B so that it has the same scheduling requirements (e.g., the conditions that should be met before its entry is ready to be scheduled) as the entry for packet A. For example, since the packet A's entry's readiness depends on both a control and a data buffer being available, packet B's entry may be modified to have the same scheduling requirements by setting the bit that indicates that there is an associated data packet. As a result of setting the data bit for packet B's entry, the entry readiness calculator may not indicate that packet B's entry is ready to be scheduled until both a data and a control buffer are available. As a result, both packet A's and packet B's entries will be ready at the same time, and since packet A's entry is older, packet A may be scheduled first. Thus, by forcing packet B to wait for a data buffer to become available (even though routing packet B will not actually use the data buffer), proper ordering may be maintained. Note that if each entry also includes a pointer to the buffer holding the data packet (if there is one), an entry whose data bit was set to meet an ordering requirement may have a null pointer instead of a pointer to a data buffer, since there is not actually a data packet to be routed.
In order to detect situations where packets within a virtual channel have ordering requirements with respect to each other, the router may contain additional comparators (e.g., to compare the addresses of read and write commands in request packets as entries are allocated). In some embodiments, a packet may contain the relevant ordering information (e.g., commands and/or dedicated fields that indicate ordering).
Ordering requirements may also arise between packets in different virtual channels. Some of these ordering requirements may arise due to the particular nature of posted requests. For example, a posted write (in the posted request virtual channel) issued before a read request to the same address (in the request virtual channel) should be routed before the read request in order to prevent the read from accessing stale data. However, the readiness for the entry for the posted write depends on the availability of buffers in the posted request virtual channel while the readiness of the entry for the request depends on the availability of buffers in the request virtual channel. As a result, a system using an entry readiness calculator such as the one shown in
When ordering requirements exist between packets in different virtual channels, additional modifications may be made to certain entries in the scheduler in order to satisfy these ordering requirements. For example, if a packet in the response virtual channel is to be scheduled behind a posted write request in the posted request virtual channel, the entry for the response packet may be modified so that it indicates its dependency on the posted request virtual channel. In one embodiment, such an indication may be an additional status bit that is set if a particular packet depends on the posted request virtual channel. In order to consider this additional dependency when calculating entry readiness, entry readiness calculators like the ones shown in
The entry readiness calculator 100A shown in
The dependency status bit is also an input to the dependency checking logic 98. Thus, if the dependency status bit is cleared (indicating that there is no dependency on the posted request virtual channel), the output of the dependency checking logic 98 will be asserted (and thus have no effect on entry readiness). Accordingly, looking back at
Note that while the embodiment shown in
As mentioned earlier, packets in the broadcast virtual channel may have more than one destination. Various embodiments may support multiple-destination packets in the broadcast virtual channel in different ways. For example, in one embodiment, when a broadcast packet has four destination interfaces, four entries that each specify a different one of the destinations may be allocated in the scheduler. This embodiment may be compatible with the entry readiness calculator 100 shown in
Another embodiment may handle broadcast packets that have multiple destinations by allocating entries with decoded destination fields. For example, if a packet is to be routed to I0, I3, and I4, the destination field in the entry corresponding to that packet may be 100110 (assuming six interfaces in a node and that the decoded destination represents the interfaces in the order I0-I5 from left to right). There are several different ways to handle routing in embodiments like this. For example, in one embodiment, a broadcast packet may not be routed until each destination has a buffer available to receive the broadcast packet.
Another embodiment may route the broadcast packet as long as at least one destination has an input buffer ready to receive the packet. If the broadcast packet is not routed to all of its destinations, the router may modify the entry for the broadcast packet so that the destination field only shows the destinations that are remaining. For example, if the packet with destinations I0, I3, and I4 is routed to I0 and I3 in one scheduling turn, the router may modify the entry so that only a single destination, I4, remains in the destination field. The packet may then be routed to I4 at a later time when an input buffer is available at I4. In the worst-case scenario, a packet may be scheduled as many times as it has destinations if only one destination has input buffers available at a time. However, in other situations, the packet may be routed to multiple destinations in a single scheduling turn, and thus fewer turns may be required to fully route the packet to each of its destinations.
In the embodiment shown in
Note that in some embodiments, packets in any virtual channel (as opposed to just the broadcast virtual channel) may have multiple destinations. In these embodiments, the entry readiness calculators may be modified to allow for multiple destinations in each virtual channel, not just the broadcast virtual channel.
In order to avoid routing the packet to the same destinations more than once, the scheduler may track which recipients the packet has already been routed to, as shown at 1207. Indicating which recipients the packet has been routed to may involve modifying a scheduler entry that corresponds to the packet so that it no longer lists those recipients. Once the packet has been routed to all of its destinations, the entry for that packet may be deleted.
As mentioned earlier, scheduling may be pipelined in some embodiments.
The scheduling turns may be pipelined into six pipeline stages. Stage 1 involves generating and latching the ready signals for each entry in the scheduler. For example, entry readiness calculators like those shown in
During pipeline stages 2 and 3, the oldest ready entry may be selected by scanning through the entry ready signals from the oldest entry towards the youngest entry until a ready entry is located. As the number of entries in the scheduler increases, the time required to scan through all of the entry ready signals looking for the oldest ready entry may increase. If the time required to scan through all of the entries is significantly longer than the time required to perform the operations in any of the other pipeline stages, it may be desirable to subdivide the scanning operation into two or more pipeline stages in order to increase the pipeline clock rate. For example, in this embodiment, two stages are used to select the oldest ready entry in order to avoid having to scan all of the scheduler entries in a single stage. In stage 2, each subgroup may be scanned in parallel, and the oldest ready entry may be selected from each subgroup. Then, in stage 3, the oldest entry of those selected in stage 2 may be selected. Note that in other embodiments, stages 2 and 3 may be performed in a single stage.
In stage 2, the oldest entry that is ready may be selected in each of several subgroups of entries in the scheduler. For example, in the embodiment of the scheduler shown in
In stage 4, the data contained in the entry selected in stage 3 is read out of the router. Due to the pipelined scheduling, an input buffer that was available in stage 1 of this scheduling turn may have already been used to store a packet corresponding to an entry that was selected in a previous scheduling turn. Thus, in order to avoid overrunning the buffers at the destination, the readiness of the selected entry is rechecked in stage 5, and if the entry is still ready (i.e., a buffer is still available), the packet corresponding to the entry may still be routed. Generally, stage 5 may determine whether to commit to routing the packet corresponding to the selected entry. Once committed, the input buffer counts for the interface whose input buffers had previously been storing the packet corresponding to the selected entry may be readjusted and this interface may send updated buffer counts to the interface or device it communicates with. Additionally, the buffer counts that are associated with the sending interface (i.e., the buffer counts maintained in the router that indicate how many buffers are available at the interface with which the sending interface communicates) may also be incremented. In stage 6, the packet corresponding to the selected entry is sent to its destination interface and the selected entry may be deleted from the scheduler.
In embodiments where broadcast packets may have multiple destinations, different input buffers may be available in stage 5 than were available in stage 1. For example, a broadcast entry that has destinations I0, I2, I3, and I5 may be scheduled based on buffers being available for I0 and I3. In the commitment phase of stage 5, this entry's readiness may be rechecked. At this time, a buffer may be available for I2 but not for I0 or I3. However, since the broadcast packet is still able to be routed to at least one of its destinations (I2), the entry may commit. In stage 6, the corresponding packet may be sent to I2 and the entry may be modified (as opposed to deleted) so that it no longer lists I2 as a destination. Thus, at the end of that scheduling turn, the entry may list I0, I3, and I5 as its destinations.
Scheduling turn 2 illustrates one possible exception to normal operation. Since the scheduling is pipelined, the same entry may be selected in multiple scheduling turns unless that entry is taken out of the selection pool during the first scheduling turn in which it is selected. Thus, each entry may include a status indication that indicates whether that entry is currently selected. Accordingly, if the selection process is broken into stages 2 and 3, one entry from each subgroup may be selected in stage 2, and each selected entry may be marked accordingly to prevent it from being selected in stage 2 of the next scheduling turn. The entries that are not selected in stage 3 may then be marked unselected. This may create an inconsistency during stage 3 of a scheduling turn if an entry is selected from a different subgroup than an entry was selected from in the previous scheduling turn.
For example, if entry 15 is selected for subgroup I and entry 16 is selected for subgroup II during scheduling turn 1, both entries will be marked selected, even though entry 15 is the entry that will be selected during stage 3 of this turn. Thus, during stage 1 of scheduling turn 2, no ready signals may be generated for these two entries. If no other entries in subgroup I are ready during this turn, a ready entry from subgroup II may be selected. However, even though no ready signal is being asserted for entry 16 this stage, entry 16 may be the oldest ready entry at this time, since it was not selected during stage 3 the previous scheduling turn. Updated entry ready signals that show entry 16's readiness may be available one clock later (after entry 16's status bit is reset in stage 3 of scheduling turn 1). Thus, in order to consistently schedule older entries before younger entries, it may be desirable to repeat stage 3 each time an entry is selected from a different subgroup than an entry was selected from in the previous scheduling turn. By repeating stage 3, updated entry ready signals may be considered in order to detect entries that were marked selected during stage 2 of the previous turn but that were not actually selected in stage 3. Note that repeating stage 3 in one scheduling turn may cause any subsequent scheduling turns to stall for one cycle in order to maintain consistency throughout the pipeline.
Scheduling turn 3 illustrates a situation where a selected entry fails to commit in stage 5. For example, if entry readiness is rechecked and an input buffer is no longer available to receive the packet corresponding to the selected entry, the router may choose to not commit to routing that packet since doing so may overrun the receiving input buffers at the destination. If an entry fails to commit, it may be desirable to flush the scheduling pipeline, since there is a possibility that entries selected in subsequent scheduling turns may not be properly scheduled after the entry failed to commit. Thus, scheduling turn 3 illustrates the effect of failing to commit in stage 5. After the pipeline is flushed (in clock 8), the pipeline restarts in clock 9. Clearing the pipeline may prevent entries from being scheduled out of order.
Generally, the scheduler described above may be used in other contexts in addition to the node shown in
Thus, like the node 12 in
The router 54A may be configured in much the same way as the router 54 shown in
Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.