Fair arbitration between multiple sources targeting a destination

JP2024540270A5Active Publication Date: 2025-09-29GRAPHCORE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024526498
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-05
Filing Date
2022-11-02
Publication Date
2025-09-29
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

In complex or large-volume data processing applications, ensuring fair data transfer between multiple source components and a destination while managing varying bandwidths and avoiding unfair prioritization of traffic from certain sources is challenging, particularly in systems with specialized hardware accelerators like work accelerators for machine learning.

Method used

A hardware module with multiple input ports and buffers that arbitrates data transfer based on source identifiers, employing weighted round-robin schemes to ensure fairness among sources, even when bandwidths differ, by using arbitration circuits to select data packets for transmission.

Benefits of technology

The solution ensures fair and efficient data transfer by prioritizing sources based on their historical data transmission, maintaining system throughput and reducing transfer time by preventing bottlenecks and ensuring all sources have equal access to the destination bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The hardware module includes at least a first input buffer and a second input buffer, the second input buffer holding data packets from multiple source components. The module first determines that a packet at the head of the first input buffer is targeted to a first destination. To ensure fairness between one or more sources providing data to the first input buffer and multiple sources providing data to the second input buffer, the processing circuitry examines source identifiers in packets held in the second input buffer and selects between the buffers to arbitrate between the sources. In some embodiments, examining the source identifiers provides weighted round robin statistics between the input buffers. In other embodiments, the source identifier of which packet is currently at the head of the second input buffer is used to perform a simple round robin between the sources.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to a hardware module, and in particular to a hardware module for receiving data originating from multiple sources and forwarding at least a portion of the data to a first destination. [Background technology]

[0002] In the case of processing data for complex or large volumes of applications, a work accelerator may be a subsystem where the processing of certain data is offloaded from the host system. Such a work accelerator may have specialized hardware to perform a particular type of processing.

[0003] Specifically, work accelerators dedicated to machine learning applications may have an architecture that supports a high degree of parallelism. One form of parallelism can be achieved by a processor that includes an arrangement of multiple tiles on the same chip (i.e., the same die), with each tile including individual processing units and memory (including program memory and data memory). Thus, separate portions of program code can be executed in parallel on different ones of the tiles. The tiles are connected via an on-chip interconnect that allows data exchange between the tiles. Such accelerators can function as subsystems for the host system to perform parallel processing of a data set presented to them.

[0004] A work accelerator may be provided on an integrated circuit (i.e., chip), which is a collection of electronic circuits fabricated on a single semiconductor material (e.g., silicon). In addition to providing multiple tiles of work accelerators on a single chip, additional system-on-chip (SoC) components may be provided to support the operation of the work accelerator. Additionally, various interfaces may be provided on the chip to support communication between the work accelerator and other work accelerators or off-chip devices, such as a host device.

[0005] When multiple different components exchanging data are provided, for example on a single chip, various challenges arise in enabling communication between those components. Summary of the Invention [Means for solving the problem]

[0006] It is proposed to provide a hardware module for use as a switch for forwarding data originating from multiple source components for transmission to multiple destination components. For example, the switch may have multiple input ports for receiving data from different source components. When the configuration of the network for forwarding data packets between components results in at least some of the input ports receiving data from multiple data sources, a challenge arises in ensuring fair data forwarding to a particular destination. In this case, using a simple round-robin scheme for arbitration between the input ports may unfairly prioritize traffic from certain sources targeted at a particular destination, i.e. from sources that share an input port with fewer other source components.

[0007] According to a first aspect, there is provided a hardware module for receiving data from a plurality of source components and transmitting at least a portion of the data to a first destination, the hardware module comprising: a first input port configured to receive a first set of data packets originating from a first subset of source components and provide them to a first input buffer, the first subset consisting of one or more of a plurality of source components, a second input port configured to receive a second set of data packets originating from a second subset of source components and provide them to a second input buffer, the second subset of source components comprising two or more source components, the first subset consisting of a different number of source components for the second subset, and an output port for outputting the first set of data packets and the second set of data packets, the first set of data packets being transmitted to the first destination. and a processing circuit configured to: examine a destination identifier in one of the set of first data packets at the head of a first input buffer; examine one or more source identifiers in the set of one or more second data packets; determine which of a second subset of source components each of the set of one or more second data packets originated from; and, in response to determining that the destination identifier identifies the first destination, select between the first input buffer and the second input buffer as a source of data to the first destination according to the one or more second source identifiers and arbitrate among the multiple source components for transmitting data to the first destination.

[0008] The circuitry is configured to first determine whether a packet at the head of the first input buffer is targeted to the first destination. If so, it arbitrates between the sources to ensure fairness between sources targeted to the first destination. By analyzing the origin of the packet in the second input buffer (i.e., from which source component the data packet originates), the processing circuitry can arbitrate between multiple sources for sending data to the first destination on the output port. In some embodiments, arbitration between the sources is achieved by using an inspection of a source identifier in the second input buffer to provide weighted round robin statistics involving the first input buffer and the second input buffer. In other embodiments, the source identifier of the packet at the head of the second input buffer is used to perform a simple round robin between the sources.

[0009] In some embodiments, upon selecting the second input buffer, the processing circuit is configured to transmit a first data packet of the second set of data packets located at the beginning of the second input buffer, and the one or more second source identifiers are source identifiers of packets of the second set of data packets transmitted from the second input buffer prior to transmission of the first data packet of the second set of data packets.

[0010] In some embodiments, the hardware module includes storage configured to store an indication of a number of source components from which data was last transmitted from the second input buffer, and selecting between the first input buffer and the second input buffer includes performing a weighted round robin between the first input buffer and the second input buffer, where the second input buffer is weighted by the number of source components from which data was last transmitted from the second input buffer.

[0011] In some embodiments, the hardware module includes a set of input buffers configured to receive data originating from a second subset of source components, the set of input buffers including a second input buffer.

[0012] In some embodiments, the storage includes, for each of the second subset of source components, an indication of to which of the set of input buffers data originating from the individual source component was last sent, and the indication of the number of source components is given by the number of the second subset of source components, where the indication of to which of the set of input buffers data originating from the individual source component was last sent specifies a second input buffer.

[0013] In some embodiments, a first data packet of the first set of data packets located at a head of the first input buffer originates from a first source component of a first subset of source components identified by the first source identifier, and inspecting the one or more second source identifiers includes inspecting a second source identifier in the first data packet of the second set of data packets located at a head of the second input buffer, and the processing circuitry is configured to select the first data packet of the second set of data packets for transmission at the output port in response to the second source identifier and the first source identifier in the first data packet of the second set of data packets.

[0014] In some embodiments, the processing circuitry is configured to determine the first source identifier by inspecting the first source identifier in a first data packet of the first set of data packets.

[0015] In some embodiments, the hardware module further includes a register that stores an identifier of one of the plurality of source components from which data was most recently transmitted to the first destination, and selecting between the first input buffer and the second input buffer includes sequentially selecting a next one of the plurality of source components following the one of the plurality of source components identified in the register.

[0016] In some embodiments, selecting between the first input buffer and the second input buffer includes applying a round robin scheme among the multiple source components.

[0017] In some embodiments, the first subset of source components consists of a single source component, and the first input buffer is dedicated to holding data packets originating from the single source component.

[0018] In some embodiments, the hardware module includes a set of input buffers for storing data originating from a second subset of source components, each of the set of input buffers being dedicated to storing data for transmission to a different one of the multiple destinations, and the second input buffer being dedicated to storing data for transmission to the first destination.

[0019] In some embodiments, each set of input buffers is associated with a different virtual channel of the interconnect in which the hardware module serves as a node.

[0020] In some embodiments, the processing circuitry is configured to select the first destination as the next destination to which data is to be transmitted as part of an arbitration scheme for arbitrating among multiple destinations for transmitting data on the output port before selecting between the first input buffer and the second input buffer.

[0021] In some embodiments, a first bandwidth available for transmitting on an output port exceeds a second bandwidth for receiving data at a first input port.

[0022] In some embodiments, the hardware module is a node on the interconnect, the first input port is a local input port for receiving a first set of data packets from a first subset of a plurality of source components connected to the node, and the second input port is configured to receive a second set of data packets from a further node on the interconnect.

[0023] In some embodiments, the second input port is configured to receive data for transmission to at least one of the first subset of source components, and the processing circuitry is configured to provide this data for transmission to at least one of the first subset of source components on a further output port of the hardware module.

[0024] According to a second aspect, there is provided an apparatus including a hardware module according to the first aspect or any embodiment thereof, the apparatus including a plurality of source components and a first destination.

[0025] In some embodiments, an apparatus includes multiple instances of a hardware module connected together as nodes forming part of an interconnect, each of the instances configured to receive data from a different one or more of the source components.

[0026] In some embodiments, the apparatus includes a further hardware module connected to the first destination, the further hardware module configured to output data from different ones of the source components connected to each of the multiple instances of the hardware module to the first destination, wherein a total bandwidth of the different ones of the source components exceeds a bandwidth of the further hardware module for supplying data to the first destination.

[0027] In some embodiments, the device is an integrated circuit.

[0028] According to a third aspect, there is provided a method for receiving data from a plurality of source components and forwarding at least a portion of the data to a first destination of a plurality of destinations, the method comprising the steps of receiving a first set of data packets originating from a first subset of source components and providing them to a first input buffer, receiving a second set of data packets originating from a second subset of source components and providing them to a second input buffer, examining a destination identifier in one of the first set of data packets at the head of the first input buffer, examining one or more source identifiers in one or more second sets of data packets to determine which of the second subset of source components each of the one or more second sets of data packets originated from, and responsive to determining that the destination identifier identifies the first destination, selecting between the first input buffer and the second input buffer as a source of data to the first destination according to the one or more second source identifiers and arbitrating among the plurality of source components for transmitting data to the first destination. The first subset is comprised of one or more of the plurality of source components, some of the first set of data packets are for transmission to different ones of the plurality of destinations, and the second subset of source components includes two or more source components, the first subset being comprised of a different number of source components relative to the second subset.

[0029] In some embodiments, the method includes transmitting a first data packet of the second set of data packets located at the beginning of the second input buffer upon selecting the second input buffer, wherein the one or more second source identifiers are source identifiers of packets of the second set of data packets transmitted from the second input buffer prior to transmission of the first data packet of the second set of data packets.

[0030] In some embodiments, the method includes storing an indication of the number of source components from which data was last transmitted from the second input buffer, and wherein selecting between the first input buffer and the second input buffer includes performing a weighted round robin between the first input buffer and the second input buffer, wherein the second input buffer is weighted by the number of source components from which data was last transmitted from the second input buffer.

[0031] In some embodiments, the second input buffer belongs to a set of input buffers, each of which is configured to receive data originating from a second subset of source components.

[0032] In some embodiments, the method includes storing, for each of the second subset of source components, an indication of to which of a set of input buffers data originating from the individual source component was last sent, wherein the indication of the number of source components is given by the number of the second subset of source components, each indication of to which of the input buffers data originating from the individual source component was last sent specifies a second input buffer.

[0033] In some embodiments, a first data packet of the first set of data packets located at the head of the first input buffer originates from a first source component of a first subset of source components identified by a first source identifier, and the step of inspecting the one or more second source identifiers includes inspecting a second source identifier in the first data packet of the second set of data packets located at the head of the second input buffer, and the method includes selecting the first data packet of the second set of data packets for transmission in response to the second source identifier and the first source identifier in the first data packet of the second set of data packets.

[0034] In some embodiments, the method includes determining the first source identifier by inspecting a first data packet of the first set of data packets.

[0035] In some embodiments, the method includes storing an identifier of one of the plurality of source components from which data was most recently transmitted to the first destination, and wherein selecting between the first input buffer and the second input buffer includes sequentially selecting a next one of the plurality of source components following the identified one of the plurality of source components.

[0036] In some embodiments, the step of selecting between the first input buffer and the second input buffer includes applying a round robin scheme among the multiple source components.

[0037] In some embodiments, the first subset of source components consists of a single source component, and the first input buffer is dedicated to holding data packets originating from the single source component.

[0038] In some embodiments, the second input buffer is one of a set of input buffers each for storing data originating from a second subset of source components, each of the set of input buffers being dedicated to storing data for transmission to a different one of the multiple destinations, and the second input buffer being dedicated to storing data for transmission to the first destination.

[0039] In some embodiments, each set of input buffers is associated with a different virtual channel of the interconnect in which the hardware module serves as a node.

[0040] In some embodiments, the method includes selecting the first destination as the next destination to send the data to as part of an arbitration scheme for arbitrating among multiple destinations for sending the data before selecting between the first input buffer and the second input buffer.

[0041] In some embodiments, a first bandwidth available for transmitting data to a first destination exceeds a second bandwidth for receiving data from a first subset of source components.

[0042] In some embodiments, the method is implemented within a node of an interconnect, and a first set of data packets are received at a local input port from a first subset of a plurality of source components connected to the node, and a second set of data packets are received from a further node of the interconnect.

[0043] In some embodiments, the method includes receiving data for transmission to at least one of the first subset of source components and providing the data for transmission to at least one of the first subset of source components.

[0044] In some embodiments, the method is implemented within a hardware module of an apparatus, the apparatus including a plurality of source components and a first destination.

[0045] In some embodiments, an apparatus includes multiple instances of a hardware module connected together as nodes forming part of an interconnect, each of the instances configured to independently perform the steps of the method.

[0046] In some embodiments, the apparatus includes a further hardware module connected to the first destination, the further hardware module configured to output data from different ones of the source components connected to each of the multiple instances of the hardware module to the first destination, wherein a total bandwidth of the different ones of the source components exceeds a bandwidth of the further hardware module for supplying data to the first destination.

[0047] In some embodiments, the device is an integrated circuit.

[0048] According to a fourth aspect, there is provided a computer program comprising a set of computer readable instructions for causing at least one processor to perform a method comprising: examining a destination identifier in one of a first set of data packets at the head of a first input buffer; examining one or more source identifiers in one or more sets of second data packets to determine which of a second subset of source components each of the one or more sets of second data packets originates from; and, in response to determining that the destination identifier identifies a first destination of a plurality of destinations, selecting between the first input buffer and the second input buffer from which to transmit data to the first destination in response to the one or more second source identifiers and arbitrating between the plurality of source components for transmitting data to the first destination, where the first set of data packets originates from a first subset of a plurality of source components, the first subset being comprised of one or more of the plurality of source components, and where some of the first set of data packets are for transmission to different ones of a plurality of destinations. Additionally, the second subset of the plurality of source components includes two or more source components, and the first subset of source components is comprised of a different number of source components relative to the second subset.

[0049] In some embodiments, the method comprises any of the steps included in the method embodiments according to the third aspect.

[0050] According to a fifth aspect, there is provided a non-transitory computer readable medium storing a computer program according to the fourth aspect.

[0051] For a better understanding of the present invention, and to show how the same may be carried into effect, reference will now be made, by way of example, to the accompanying drawings in which: [Brief description of the drawings]

[0052] [Figure 1A] 1 illustrates an exemplary hardware module having a single input buffer for receiving data from a locally connected source component. [Figure 1B] 1 illustrates an exemplary embodiment in which an arbitration circuit selects between a single input buffer containing data from multiple sources and a single virtual channel buffer. [Figure 1C] 1 illustrates an exemplary embodiment in which an arbitration circuit selects between a single input buffer containing data from a single source and a single virtual channel buffer. [Figure 1D] 1 illustrates an exemplary embodiment in which an arbitration circuit selects between a single input buffer containing data from a single source and multiple virtual channel buffers. [Figure 1E] 1 illustrates a further exemplary embodiment in which an arbitration circuit selects between a single input buffer containing data from a single source and multiple virtual channel buffers. [Figure 2A] 1 illustrates an exemplary hardware module having multiple input buffers for receiving data from locally connected source components. [Figure 2B] 1 illustrates an exemplary embodiment in which an arbitration circuit selects between two input buffers and a single virtual channel buffer. [Figure 2C] 1 illustrates an exemplary embodiment in which an arbitration circuit selects between two input buffers and two virtual channel buffers. [Figure 2D]1 illustrates a further exemplary embodiment in which an arbitration circuit selects between two input buffers and two virtual channel buffers. [Diagram 3] 1 illustrates an exemplary hardware module that supports the ingress of data from and the output of data to multiple other hardware modules. [Figure 4] 1 illustrates an exemplary interconnect in which multiple hardware modules function as nodes / switches of the interconnect. [Diagram 5] 1 shows an example of how interconnects are used to deliver data packets to components on a chip. [Figure 6] 1 illustrates an example of a method according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0053] Embodiments of the present application relate to a hardware module for receiving data packets from multiple sources and forwarding those packets to a destination. As described in more detail below, multiple such hardware modules may be implemented as a switch in a network on a chip for providing data packets between components of the chip. The components of the chip may include processing units. An example of a chip including a processing unit (in the form of a multi-tile processing unit) is described in more detail in our earlier U.S. patent application Ser. No. 16 / 276,834, which is incorporated by reference.

[0054] Please refer to FIG. 1A, which illustrates an example of a hardware module 100 according to an embodiment of the present application. The hardware module 100 includes a first input port 101 (labeled as "Xi0" in FIG. 1A) for receiving data packets from one or more source components 103. The one or more source components 103 may be locally connected source components 103. The hardware module 100 also includes a second input port 102 (labeled as "tia" in FIG. 1A) for receiving data packets originating from a number of further source components 104. Although the number of further source components 104 are shown as being directly connected to the hardware module 100, in at least some embodiments, the number of source components is connected to the hardware module 100 via additional intermediate modules (as shown in FIG. 4).

[0055] A first input buffer 105 is provided for storing data packets received at the hardware module 100 at a first input port 101. The data packets stored in this buffer 105 are for transmission from the hardware module 100 at an output port 106 to one or more destinations. The hardware module 100 includes additional buffers 107 for storing data packets received at the hardware module 100 at a second port 102. Each of these additional buffers 107 can be considered to operate as a second input buffer for storing data packets from multiple destinations.

[0056] Each of these additional buffers 107 is associated with a different destination component to which the data is to be sent. Each data packet received at the port 102 includes a destination identifier in its header. The circuitry of the hardware module 100 is configured to look up the destination identifier in the header of the packet when the data packet is received at the port 102 and store the data packet in one of the buffers 107 associated with the identified destination. We label each of these buffers 107 as vc0, vc1, vc2, etc., to indicate that each of the buffers 107 is associated with a different destination. Each of the source components 103 connected to the module 100 constitutes one of those different destinations, so that when a data packet arrives from the source component 104 for transmission to one of the components 103, the data is sent to one of the buffers 107 associated with one of the components 103. The circuitry 111 sends the data from one of the buffers to the output buffer 109, from where it is sent at a further output port 110 to an associated one of the source components 103.

[0057] Each of the destinations to which module 100 is configured to send data is associated with a virtual channel. Thus, each of buffers 107 is associated with a virtual channel, and the virtual channels are labeled vc0, vc1, etc. As will be described in more detail with respect to FIG. 5, the use of virtual channels to send data to different destinations prevents head-of-line blocking.

[0058] The hardware module 100 includes an arbitration circuit 111, which is a processing circuit for determining from which of the buffers 105, 107 data should be transmitted next. The arbitration circuit 111 first selects one of the destinations for which data should be transmitted. In other words, the arbitration scheme first selects one of the destination components as the next component to transmit data to. The selected destination can be one of the components 103, or it may be a remote destination accessible at port 106. The selection of the destination is performed using a round robin between the destinations. For example, if the last data transmitted was from buffer vc0, the next data to transmit is from buffer vc1.

[0059] Once a destination to which data should be sent is selected, the arbitration circuit 111 selects whether to send data from the first input buffer 105 or from one of the further buffers 107 associated with the selected destination. The selection between the first input buffer 105 and one of the further buffers 107 is performed depending on the source components from which the data packets in those buffers originated. In some embodiments, a source identifier of a packet at the head of one of the further buffers 107 is used to perform a simple round robin between the sources. Such an exemplary embodiment is described below with respect to Figures 1B to 1D. In other embodiments, arbitration between the sources is achieved by using an inspection of a source identifier in one of the further buffers 107 to provide statistics of a weighted round robin involving the first input buffer 105 and one of the further buffers 107. Such an exemplary embodiment is described below with respect to Figure 1E.

[0060] 1B, which shows an example of how the selection between the first input buffer 105 and the second input buffer 112 can be made. The second input buffer 112 can be one of the further buffers 107 discussed above with respect to FIG. 1A. In that case, the second input buffer 112 is associated with a destination (Ds=0) that is selected by applying a round robin between the destinations. In this example, the example data packet shown in the first input buffer 105 is for transmission to the same destination (Ds=0) as the data packet in the second input buffer 112.

[0061] The first input buffer 105 includes a number of data packets 113a-d. The second input buffer 112 includes a number of data packets 114a-d. Each of the data packets 113a-d, 114a-d includes a header and a payload. Each header includes a source identifier (identifying which of the source components 103, 104 the packet originated from) and a destination identifier (identifying which of the destination components the data packet is to be sent to). In FIG. 1B, the source identifier is shown as "Sc=_", while the destination identifier is shown as "Ds=_". Each of the buffers 105, 112 may be a first-in-first-out (FIFO) buffer, and the data packet at the head of each of the buffers 105, 112 is the next packet to be transmitted from that buffer 105, 112.

[0062] The circuit 111 selects one of the buffers 105, 112 by arbitration between the source components. This may be achieved by applying a round robin scheme between the source components to select one of the source components from which data originating from that source component should be transmitted next. The arbitration circuit 111 has access to a register 115 that stores an indication of the source component from which the last transmitted data packet from one of the buffers 105, 112 originated. This identified source component may be referred to as the last source component and the indication in the register 115 may be referred to as the last source identifier. This indication is used by the circuit 111 to select one of the buffers 105, 112 from which to transmit the next data packet. The circuit 111 applies an arbitration scheme such that the next of the two packets at the top of the buffer 105, 112 to be transmitted is the packet with the next highest source identifier, or, if no such packet with a higher source identifier can be determined, the packet with the lowest source identifier. Thus, the buffer selected as a result of this arbitration scheme is one of the buffers 105, 112 that contains the packet. After transmitting the data packet from that selected buffer 105, 112, circuit 111 updates an indication in register 115 with the source identifier of the data packet just transmitted.

[0063] 1B, the one or more source components 103 include at least two source components (labeled as sources Sc=3 and Sc=7) and the further source component 104 includes at least three source components (labeled as sources Sc=1, Sc=5, and Sc=9). A first input buffer 105 stores data packets originating from sources Sc=3 and Sc=7, while a second input buffer 112 stores data packets originating from sources Sc=1, Sc=5, and Sc=9.

[0064] Suppose the register identifies the source component from which the data packet last transmitted from one of the buffers 105, 112 originated as source Sc=1. The circuit 111 examines the source identifiers of packets 113a, 114 at the head of each of the buffers 105, 112 (i.e., the next to be transmitted from that buffer). Packet 113a has a source identifier of source Sc=3, whereas packet 114a has a source identifier of source Sc=1. Since the source identifier of packet 113a is higher than the identifier from register 115 (while the source identifier of packet 114a is equal to the identifier from register 115), the arbitration circuit 111 causes packet 113a to be transmitted on output port 106. The arbitration circuit 111 then causes the identifier in register 115 to be updated to the identifier of the source from which packet 113a originated (i.e., source Sc=3). Arbitration circuit 111 then selects packet 113b as the next packet to transmit (because this packet has the next highest source identifier, i.e., Sc=7). After transmitting packet 113b, circuit 111 updates the identifier in register 115 to the identifier of the source from which packet 113b originated (i.e., source Sc=7). Since none of packets 113c, 114a currently at the head of buffers 105, 112 have a higher source number than the source number in register 115 (Sc=7), circuit 111 selects one of the packets with the lowest source number, i.e., packet 114a with source number Sc=1. After transmitting packet 114a, the packet transmission order continues as follows: packet 114b, packet 113c, packet 114c, packet 113d, and packet 114d.

[0065] 1B illustrates an embodiment in which first input buffer 105 contains packets originating from multiple sources. In this case, circuit 111 examines the source identifiers of packets held in buffer 105 in addition to the source identifiers of packets held in buffer 112. However, in some embodiments, buffer 105 may be dedicated to holding packets originating from a single source. In such an embodiment, it may not be necessary for circuit 111 to individually examine the source identifiers of packets sent from buffer 105 for arbitration purposes.

[0066] 1C, which illustrates an embodiment in which buffer 105 contains data packets 116a-d originating from a single source component rather than from multiple source components. In this case, since buffer 105 is dedicated to holding packets from a single source component, circuit 111 does not need to analyze the source identifiers in packets 116a-d when selecting between buffers 105, 112. Circuit 111 has access to an identifier associated with this single source component that is used to perform the arbitration.

[0067] In the example of Figure 1C, circuit 111 checks the source identifier in packet 117a at the head of buffer 112. Circuit 111 compares this checked source identifier with the last source identifier from register 115 and the source identifier associated with buffer 105. Circuit 111 determines which of the checked source identifier and the source identifier associated with buffer 105 is next highest after the last source identifier (if any) and causes one of packets 116a, 117a having this next highest source identifier to be transmitted next on output port 106. If neither the checked source identifier nor the source identifier associated with buffer 105 is higher than the last source identifier, circuit 111 causes one of packets 116a, 117a having the lowest source identifier to be transmitted next on output port 106.

[0068] Refer to FIG. 1D, which shows how a scheme for selecting a buffer from which to send data based on the source of the outgoing data (i.e., source arbitration) can be combined with a scheme for selecting a buffer based on the destination to which the data is sent (i.e., destination arbitration).

[0069] As explained with respect to Figures 1A and 1B, the second input buffer 112 may be one of a number of buffers 107 for storing data received on the second input port 102, each of these buffers 107 storing data for transmission to a different destination. In this case, in addition to arbitrating data transmission from different sources, the circuit 111 arbitrates data transmission to different destinations. The step of selecting the destination to which the data packet should be sent is performed before the step of selecting the source from which the data is sent. Once the destination to which the data should next be sent is determined by the circuit 111, the circuit 111 selects between the buffers 105, 107 at the head of which has a data packet for transmission to that destination. The selection between these buffers 105, 107 is performed based on a source identifier in the packet at the head of each of the buffers 105, 107.

[0070] To perform destination-based arbitration, hardware module 100 includes a last destination register 118 that indicates the last destination selected for sending a data packet on output interface 106. Circuit 111 performs a round robin among the destinations by selecting the next highest valid destination identifier following the destination identifier stored in register 118, if there is one. If the destination identifier stored in register 118 is higher than any of the destinations to which data can be sent, circuit 111 selects the lowest destination identifier.

[0071] When the circuit 111 selects a destination identifier, if there is no data to send to that destination (either at the head of the first input buffer 105 or at the head of the further input buffer 107 associated with that destination), the circuit 111 selects the next destination without causing any data to be sent at the output port 106 to that destination. If there is data to send to that destination at the head of only one of the buffers 105, 107, the circuit sends data from that buffer that has data to send to the destination without selecting between the buffers 105, 107 based on the source from which that data originated. If there is data to send to the selected destination at the head of two of the buffers 105, 107, the circuit 111 selects between the two buffers based on the source component from which the data in the two buffers originated.

[0072] The final source register 115 stores, for each destination to which data is sent at the output port 106, the source identifier of the originating source component that was the final source of data to that destination. Thus, arbitration between sources is performed on a per-destination basis. In this manner, the hardware module 100 supplies data from various sources to a given destination with fairness between each of the sources.

[0073] The example of Figure 1D shows a second input buffer 112 and a third input buffer 119, both of which are buffers 107 for receiving data via the second input port 102. Although Figure 1D shows data for dispatching to only two destinations, it will be understood that in other embodiments there may be data packets for more than two destinations.

[0074] As an example, assume that circuit 111 initially transmits a data packet to destination Ds=0. Circuit 111 examines packet 120a at the head of first input buffer 105. Because first packet 120a includes an identifier for destination Ds=1, circuit 111 does not select between buffers 105, 112 based on a source identifier. In response to determining that the destination identifier (Ds=0) in packet 120a does not match the selected destination identifier (Ds=0), circuit 111 causes packet 121a to be transmitted on output port 106.

[0075] After sending packet 121a, circuit 111 updates the last source identifier for Ds=0 in register 115 to the source identifier of packet 121a (i.e. Sc=1). Circuit 111 further updates last destination register 118 to Ds=0. Circuit 111 then selects the next destination to send data to Ds=1. Circuit 111 examines packet 120a at the head of first input buffer 105. Since this packet 120a has destination identifier Ds=1, circuit 111 selects whether to send packet 120a from buffer 105 or packet 122a from buffer 119. This selection is performed depending on the source component from which these packets originated. Circuit 111 retrieves from register 115 the identifier of the last source component that sent a data packet to Ds=1. 1B and 1C, circuit 111 applies a round robin scheme between the sources and transmits the packet 120a, 122a having the next highest source number after the source identifier obtained from register 115 (or the lowest if the source identifier from register 115 is higher than the source identifier of packet 120a, 122a). Assume that the last source identifier for Ds=1 obtained from register 115 is Sc=1. In this case, the next highest source identifier of packets 120a, 122a is Sc=3, and therefore packet 120a from buffer 105 is selected for transmission at output port 106.

[0076] After transmitting packet 120a, circuit 111 updates the last source identifier for Ds=1 in register 115 to Sc=3. Circuit 111 also updates the last destination identifier in register 118 to Ds=1. Circuit 111 then selects Ds=0 as the next destination to which data should be transmitted by circuit 111. Circuit 111 then selects whether to transmit packet 120b from buffer 105 or packet 121b from buffer 112. Since the last source component for Ds=0 is Sc=1, circuit 111 selects packet 120b, which has the next highest source identifier (i.e., Sc=3) of the two packets 120b, 121b, for transmission on port 106.

[0077] Circuit 111 continues to transmit packets 120a-d, 121a-d, 122a-d according to the described scheme for arbitrating between sources and destinations.

[0078] 1B-1D show an example of the circuit 111 selecting the next source for transmitting data based on a stored indication of the last source that transmitted data on the port 106. In some embodiments, the circuit 111 can rely on different types of stored information to select the buffer from which to transmit data. In particular, in some embodiments, the hardware module 100 can store, for each source (i.e., remote source) from which data is transmitted from the buffer 107, an indication of the destination to which data originating from the respective source was last transmitted. These indications are used to weight each of the buffers 107 such that a weighted selection can be performed between one of the buffers 107 containing data for a particular destination and the first input buffer 105.

[0079] Refer to FIG. 1E, which shows an embodiment in which a weighted selection is performed between buffer 105 and a selected one of buffers 112, 119. In this example, a register 130 is part of the hardware module 100 and stores, for each remote source 104 (i.e., a source from which data is received at port 102), an indication of the destination to which data originating from that source was last transmitted at port 106. Since data from remote source 104 is stored in buffer 107, each such indication corresponds to an indication from which of buffers 107 data originating from the respective source was last transmitted. Circuit 111 selects a destination for transmitting data according to a round-robin arbitration scheme. This can be done using register 118, as described above with respect to FIG. 1D. Once a destination is selected, circuit 111 selects between the buffers (including one of buffers 107, which may include buffer 105) that have data to transmit to that destination. The selection between these buffers is performed by applying a weighted round robin between buffer 105 and one of the buffers 107 associated with the destination, with buffer 105 being assigned a weight of 1 and one of the buffers 107 associated with the destination being assigned a variable weight. The variable weight assigned to one of the buffers 107 is given by the number of remote sources 104 that last sent data to the destination associated with that buffer. This number of remote sources 104 can be derived from an indication held in register 130. In particular, for each destination, the number of remote sources 104 is given by the number of indications of the last destination in buffer 130 that indicate that destination. It is noted that in an embodiment, the minimum weight for each of the buffers 107 is 1, so that if no source is indicated in register 130 that was last to send outgoing data from a particular buffer of buffers 107, circuit 111 applies a weight of 1 to that buffer.

[0080] In order to apply a weighted round robin among the buffers having data for transmission to a particular destination, registers 131 containing state information are provided in module 100. Register 131 stores state information identifying, for each destination, which of the buffers (i.e., first input buffer 105 or one of buffers 107) will next provide data to that destination on port 106. When circuit 111 transmits a first data packet to the first destination on port 106, circuit 111 selects a further destination to transmit the data to. When circuit 111 again selects the first destination to transmit data to, circuit 111 uses the stored state information regarding the first destination to select from which buffer the next data packet should be transmitted on port 106 to the first destination.

[0081] If for a particular destination the buffer indicated by the associated status information as the next buffer from which data should be sent is one of the buffers 107, then circuit 111 also stores as part of the destination's status information a count of the number of data packets that have been sent consecutively from the currently selected one of the buffers 107 to the respective destination. After sending a data packet from one of the buffers 107 associated with a destination and updating its associated count in register 131, circuit 111 compares the associated count for one of the buffers 107 to the weight for that one of the buffers 107. When circuit 111 determines that the count for one of the buffers 107 matches its associated weight, circuit 111 updates the destination's status information to indicate buffer 105 as being the next buffer from which data should be sent to the destination.

[0082] In the example of Fig. 1E, suppose that data from source Sc=1 was last transmitted from buffer 112, whereas data from sources Sc=5 and Sc=9 was last transmitted from buffer 119. These indications are held in register 130. Since data originating from two sources (i.e., Sc=5 and Sc=9) was last transmitted from buffer 119, buffer 119 (and its associated destination) has a weight of 2 (implied from the indication in register 130). On the other hand, since data originating from one source (i.e., Sc=1) was last transmitted from buffer 112, buffer 112 has a weight of 1 (implied from the indication in register 130). Let us further assume that for destination Ds=0, the associated status information of Ds=0 in register 131 indicates that a data packet should be transmitted next from buffer 112, and for destination Ds=1, the associated status information of Ds=1 in register 131 indicates that a data packet should be transmitted next from buffer 119.

[0083] Circuit 111 examines packet 120a at the head of buffer 105 and determines that packet 120a is for transmission to Ds=1. If circuit 111 is next configured to transmit a data packet to Ds=1, circuit 111 selects between buffer 105 and buffer 119 for transmitting the data packet on port 106. Because the status information in register 131 indicates that the next data packet to be transmitted to destination Ds=1 on port 106 is from buffer 119, circuit 111 causes packet 122a at the head of buffer 119 to be transmitted on port 106. Circuit 111 then updates the status information in register 131 to indicate that one packet has been transmitted consecutively from buffer 119. Circuit 111 also updates the last destination of source Sc=1 held in register 130 to indicate that data originating from Sc=1 was last transmitted to destination Ds=1 (i.e., from buffer 119).

[0084] Updating the last destination indication for source Sc=1 has the effect of changing the weight for buffer 119. Buffer 119 now has a weight of 3 because data originating from three sources (i.e., Sc=1, Sc=5, Sc=9) is currently the last to be sent from buffer 119. For buffer 112, the source from which data was last sent from this buffer 112 is currently 0. As noted above, if a source of zero is the last from a buffer, it is implied that the buffer has a weight of 1. Buffer 112 is therefore indicated to have a weight of 1 by the indication in register 130.

[0085] When circuit 111 has sent packet 122a, circuit 111 selects Ds=0 as the next destination to which to send data. Because packet 120a at the head of buffer 105 is intended for sending to Ds=1 and not Ds=0, buffer 105 is excluded from the weighted selection performed by circuit 111. As a result, circuit 111 selects buffer 112 and sends packet 121a at the head of this buffer 112 on port 106. Circuit 111 then updates register 130 to indicate that data originating from Sc=1 was last sent to destination Ds=0 (i.e., from buffer 112). This update has the effect of adjusting the weightings again so that buffer 112 has a weight of 1 while buffer 119 has a weight of 2.

[0086] After transmitting packet 121a, one packet has been continuously transmitted from buffer 112 without the count being reset, so the count value is equal to the current weight for buffer 112. Because the count value is equal to the weight, circuit 111 updates the state information in register 131 to indicate that the next buffer for destination Ds=0 is buffer 105. Circuit 111 also resets the count value for buffer 112 to 0.

[0087] Once circuit 111 has transmitted packet 121a, circuit 111 selects Ds=1 as the next destination to which data should be transmitted. Circuit 111 checks the status information for Ds=1 and determines that a packet was last transmitted from buffer 119 to this destination and that one packet (i.e., packet 122a) is being transmitted consecutively from buffer 119. Circuit 111 compares the number of packets transmitted consecutively (i.e., 1 in this case) with the weight implied by the indication in register 130 (i.e., 2 in this case). Because the number of packets transmitted consecutively is less than the weight, the result of the weighted selection by circuit 111 is that buffer 119 is again selected as the next buffer from which to transmit a data packet to Ds=1. Circuit 111 therefore causes buffer 119 to transmit packet 122b on port 106. Circuit 111 updates the status information in register 131 to indicate that two packets are being transmitted consecutively from buffer 119. Because the count of packets transmitted from buffer 119 now equals the weight for buffer 119 (i.e., 2), circuit 111 resets the count and updates the status information in register 131 to indicate that the next buffer for Ds=1 is buffer 105.

[0088] Once circuit 111 has transmitted packet 122b from buffer 119, circuit 111 selects Ds=0 as the next destination to transmit to. Buffer 105 is indicated in the state information as being the next buffer for destination Ds=0. Circuit 111 examines packet 120a at the head of buffer 105, and in response to determining that the packet is not for transmission to destination Ds=0, it instead selects buffer 112 and transmits packet 121b from buffer 112 on port 106. Because the weight of buffer 112 is simply 1, in response to transmitting the single packet from buffer 112, circuit 111 causes the state information for Ds=0 to indicate that buffer 105 is the next buffer for transmission to Ds=0.

[0089] After transmitting packet 121b, circuit 111 selects Ds=1 as the next destination to which to send data. In response to determining that the status information for Ds=1 indicates that the next buffer to which to send data to Ds=1 is buffer 105, circuit 111 causes packet 120a, which is at the head of buffer 105, to be transmitted on port 106. After transmitting packet 120a, circuit 111 causes the status information to be updated to indicate buffer 119 as the next buffer for Ds=1.

[0090] After transmitting packet 120a, circuit 111 selects Ds=0 as the next destination to send data to. In response to determining that the status information for Ds=0 indicates that the next buffer to send data to for Ds=0 is buffer 105, circuit 111 causes packet 120b, which is at the head of buffer 105, to be transmitted on port 106. After transmitting packet 120b, circuit 111 causes the status information to be updated to indicate buffer 112 as the next buffer for Ds=0.

[0091] Circuit 111 continues to transmit packets from buffers 105, 112, 119 according to the scheme described.

[0092] 1A shows an example where a hardware module 100 has a single input buffer 105 for receiving data packets from one or more locally connected source components 103 via a single input port 101. In some embodiments, there may be multiple input buffers for receiving data from the locally connected source components. In this case, the selection process performed to select the buffer to which data should be sent at the output port 106 also includes selecting between those input buffers that hold data received from the locally connected source components.

[0093] 2A, which illustrates one embodiment of a hardware module 200 including a plurality of input buffers 201A-D for receiving data from source components 202A-D via input ports xi0-3. Each of the source components 202A-D is locally connected to the hardware module 200 and configured to provide data packets to an associated one of the input buffers 201A-D at an associated one of the input ports xi0-3. Each input buffer 201A-D is dedicated to holding data originating from its associated source component 202A-D. The input buffer 201A may be labeled as a first input buffer in this embodiment.

[0094] If there are four input buffers 202A-D, the selection between the buffers from which to send a data packet based on the source of the data packet at the head of the buffer may involve selecting between up to five buffers, where the selection is between one of the buffers 107 holding data for delivery to a given destination and any of the buffers 201A-D having at its head a data packet also for delivery to this same destination. Circuit 111 arbitrates based on the originating source component to determine from which of these buffers data should be sent on port 104.

[0095] To illustrate how this process is performed when performing a selection process between three buffers, reference is made to Fig. 2B, which shows the use of a circuit 111 to select between a first input buffer 201A, a second input buffer 112 and a further input buffer 201B. As with the binary selection between buffers described above with reference to Figs. 1B to 1D, this ternary selection is performed based on the source from which the data at the head of each buffer 201A, 201B, 112 originated. The circuit 111 applies a round robin to select between the three buffers 201A, 201B, 112 depending on the source from which the data packet at the head of the buffer 201A, 201B, 112 originated and depending on the last source identifier in the register 115.

[0096] In the example of FIG. 2B, a first input buffer 201A stores data packets originating from source Sc=1 and a further input buffer 201B stores data packets originating from source Sc=3, whereas a second input buffer 112 stores data packets originating from sources Sc=2 and Sc=5.

[0097] Assume that register 115 identifies the source component from which the data packet last transmitted from one of buffers 201A, 201B, 112 originated as source Sc=1. Circuit 111 looks up the source identifier of packet 125a at the head of buffer 112 and compares it with the source identifiers of packets 123a and 124a. Packet 123a has a source identifier of source Sc=1, packet 124a has a source identifier of source Sc=3, and packet 125a has a source identifier of source Sc=2. Because the source identifier of packet 125a (Sc=2) is the next highest source identifier, arbitration circuit 111 causes packet 125a to be transmitted on output port 106. Arbitration circuit 111 then updates the identifier in register 115 to the identifier of the source from which packet 125a originated (i.e., Sc=2). Arbitration circuit 111 then selects packet 124a as the next packet to transmit (because this packet has the next highest source identifier, i.e., Sc=3). After transmitting packet 124a, arbitration circuit 111 updates the identifier in register 115 to the identifier of the source from which packet 124a originated (i.e., Sc=3). Arbitration circuit 111 then selects packet 125b as the next packet to transmit (because this packet has the next highest source identifier, i.e., Sc=5). After transmitting packet 125b, none of the three packets 123a, 124b, 125c currently at the head of buffers 201A, 201B, 112 has a higher source identifier, so circuit 111 selects one of the packets, i.e., packet 123a with the lowest source number, i.e., Sc=1, as the next packet to transmit.

[0098] 2B illustrates an embodiment in which the input buffers 201A, 201B contain only data packets 123a-d, 124a-d for transmission to a single destination, i.e., Ds=0. However, in some embodiments, the buffers 201A, 201B may contain data packets for delivery to multiple destinations, so that the selection based on the originating source component may only include the buffer 201A, 201B that has the next data packet for delivery to that particular destination.

[0099] 2C, which illustrates an embodiment in which circuit 111 arbitrates between buffers 201A, 201B, 112, 119 based on the destination to which packets in the buffers should be sent and based on the source component from which the packets originate. In this case, a subset of buffers 201A, 201B, 112, 119 that have a data packet at their head for transmission to a given destination is selected by circuit 111. Having made the selection of the subset of buffers 201A, 201B, 112, 119, circuit 111 selects one of this subset of buffers based on the source component from which the next packet to be transmitted from each of those buffers originates.

[0100] Similar to that described above with respect to Figure 1D, in the embodiment of Figure 2C, to allow for round robin between destinations, there is a last destination register 118 that indicates the last destination to which a data packet was sent. In addition, for each destination, there is also a last source register 115 that identifies which originating source component data was last sent to that destination.

[0101] As an example, the circuit 111 may be configured to first send a data packet to destination Ds=0. The circuit 111 examines the packet 126a at the head of the first input buffer 201A. Since the packet 126a at the head of the buffer 201A contains an identifier for destination Ds=0, the circuit 111 includes the first input buffer 201A in the subset of buffers for which selection is based on the source of origin. Since the packet 127a at the head of the buffer 201B contains an identifier for destination Ds=0, the circuit 111 also includes the buffer 201B in the subset of buffers for which selection is based on the source of origin. The buffer 112 is dedicated to holding packets for transmission to destination Ds=0, and therefore the buffer 112 is included in the subset of buffers for which selection is based on the source of origin.

[0102] Once circuit 111 has determined subset 201A, 201B, 112, it selects one of the buffers in this subset according to the source identifiers (Sc=1, Sc=3, Sc=5) in packets 126a, 127a, 128a at the head of these buffers 201A, 201B, 112. Suppose last source register 115 indicates Sc=1 as the last originating source associated with data sent on port 106 to destination Ds=0. In this case, when selecting between buffers 201A, 201B, 112, circuit 111 selects buffer 201B since packet 127a has the next highest source identifier (Sc=3) at its head. Circuit 111 causes packet 127a to be sent on port 106.

[0103] After sending packet 127a, circuit 111 updates the last source identifier of Ds=0 in register 115 to the source identifier of packet 127a (i.e., Sc=3). Circuit 111 also updates last destination register 118 to Ds=0. Circuit 111 then selects a subset of buffers whose head packets are for sending to Ds=1. Circuit 111 examines packet 126a at the head of first input buffer 201A. This packet 126a has a destination identifier of Ds=0, so circuit 111 does not include buffer 201A in the subset of buffers. Circuit 111 examines packet 127b at the head of second input buffer 201B. This packet 127b has a destination identifier of Ds=0, so circuit 111 does not include buffer 201B in the subset of buffers. Buffer 119 is dedicated to holding packets for transmission to destination Ds=1, and therefore buffer 119 is included in the subset of buffers for which selection is made based on the originating source. Since only one buffer (i.e., buffer 119) has data at its head to transmit to Ds=1, circuit 111 transmits data packet 129a from buffer 119 without arbitration based on source component. After transmitting packet 129a, circuit 111 updates the last source identifier of Ds=1 in register 115 to the source identifier of packet 129a (i.e., Sc=2). Circuit 111 also updates last destination register 118 to Ds=1.

[0104] The circuit 111 is then configured to send packets to Ds=0 again. The circuit 111 includes in the subset of buffers the buffers 201A, 201B and 112, since they have at their heads the packets 126a, 127b, 128a, respectively, for sending to Ds=0. This selection between the buffers 201A, 201B, 112 is made depending on the source component from which those packets 126a, 127b, 128a originate. The circuit 111 obtains from the register 115 the identifier of the last source component that sent a data packet to Ds=0. The circuit 111 applies a round-robin scheme between the sources as described and transmits the packet 126a, 127b, 128a with the next highest source number after the source identifier obtained from the register 115 for the destination Ds=1 (or the lowest, if the source identifier from the register 115 is the highest than the source identifier of the packets 120a, 122a). In this case, the next highest source identifier of packets 126 a , 127 b , and 128 a is Sc=5, and therefore packet 128 a from buffer 112 is selected for dispatch at output port 106 .

[0105] Circuit 111 continues to transmit packets 120a-d, 121a-d, 122a-d according to the described scheme for arbitration between sources and destinations.

[0106] As discussed above with respect to FIG. 1E, the selection between the buffers can instead be performed using weights associated with each of the buffers 107, which weights are based on the number of sources that last transmitted from each of the buffers 107. These weights are used to perform a weighted round robin for the buffer selection. See FIG. 2D, which shows an example in which such a scheme can be applied to perform weighted round robin arbitration between a selected one of the buffers 107 and a number of buffers 201A, 201B. In this example, similar to the example of FIG. 1E, the register 131 stores state information for each destination, the state information indicating the next buffer selected for transmission to that destination. In the example of FIG. 2D, the next buffer indicated in the state information for Ds=0 will be one of buffer 112, buffer 201A, or buffer 201B, whereas the next buffer indicated in the state information for Ds=1 will be one of buffer 119, buffer 201A, or buffer 201B. The state information further specifies for each of the buffers 112, 119 a count of the number of packets that have been transmitted consecutively from each buffer before the weight of the respective buffer is reached. The count for buffer 112 is updated by circuit 111 when a packet is sent from buffer 112, and the count for buffer 119 is updated by circuit 111 when a packet is sent from buffer 119. When the count for either buffer 112, 119 reaches its weight, the count for that buffer is reset and the next buffer indication in the state is updated to identify buffer 201A.

[0107] In the example of Fig. 2D, suppose that data from source Sc = 5 was last transmitted from buffer 112, whereas data from sources Sc = 2 and Sc = 9 was last transmitted from buffer 119. These indications are held in register 130. Since data originating from two sources (i.e., Sc = 2 and Sc = 9) was last transmitted from buffer 119, buffer 119 (and its associated destination) has a weight of 2 (implied from the indication in register 130). On the other hand, since data originating from one source (i.e., Sc = 5) was last transmitted from buffer 112, buffer 112 (and its associated destination) has a weight of 1 (implied from the indication in register 130). Let us further assume that for Ds = 0, the associated status information in register 131 indicates that a data packet should be transmitted next from buffer 112, whereas for Ds = 1, the associated status information in register 131 indicates that a data packet should be transmitted next from buffer 119.

[0108] If circuit 111 determines that the next destination for sending data on port 106 is Ds=0, then circuit 111 transmits data packet 128a from buffer 112. After transmitting packet 128a, circuit 111 determines that the count of consecutively transmitted packets from buffer 112 is equal to the weight of buffer 112 (i.e., 1). In response to this determination, circuit 111 updates the status information for Ds=0 in register 131 to indicate buffer 201A as the next buffer for Ds=0. Additionally, circuit 111 resets the count for buffer 112 to zero.

[0109] Following the transmission of packet 128a, circuit 111 selects Ds=1 as the next destination to send data to on port 106. Circuit 111 transmits packet 129a from buffer 119 on port 106. After transmitting packet 129a, circuit 111 sets the count of consecutively transmitted packets from buffer 119 equal to 1.

[0110] After transmitting packet 129a, circuit 111 selects Ds=0 as the next destination to send data to on port 106. In response to determining that packet 126a at the head of buffer 201A is for transmission to Ds=0, circuit 111 causes packet 126a to be transmitted on port 106. Circuit 111 then updates the state information associated with Ds=0 to indicate buffer 201B as the next buffer after Ds=0.

[0111] After transmitting packet 126a, circuit 111 selects Ds=1 as the next destination for transmitting data on port 106. Circuit 111 transmits packet 129b from buffer 119 on port 106. After transmitting packet 129b, circuit 111 determines that the count of packets transmitted from buffer 119 is equal to the weight for buffer 119 (i.e., 2), and responsively resets the count for buffer 119 to zero and updates the state information for Ds=1 to indicate buffer 201A as the next buffer for transmitting to Ds=1.

[0112] After transmitting packet 129b, circuit 111 selects Ds=0 as the next destination to send data to on port 106. In response to determining that buffer 201B is indicated in the state information for Ds=0 as being the next packet to send to Ds=0 on port 106, circuit 111 transmits packet 127a on port 106. Circuit 111 then updates the state information for Ds=0 to indicate buffer 112 as the next buffer to send data to Ds=0.

[0113] After transmitting packet 127a, circuit 111 selects Ds=1 as the next destination to send data to on port 106. Status information for Ds=1 indicates buffer 201A as the next buffer to send data to on port 106. In response to determining that packet 126b at the head of buffer 201A is for transmission to Ds=1, circuit 111 causes packet 126b to be transmitted on port 106 toward Ds=1.

[0114] In this manner, the circuit 111 continues arbitrating between sources for transmitting data by applying separate weighted round robins to the first set of buffers (i.e., buffers 201A, 201B, 112) and the second set of buffers (i.e., buffers 201A, 201B, 119).

[0115] In the above examples described with respect to Figures 1B-1E and 2B-2D, several registers 115, 118, 130, 131 are described for storing instructions used to arbitrate between different destinations and / or different sources. In some embodiments, one or more of these registers 115, 118, 130, 131 may be combined into a single unified storage. Alternatively, one or more of the described registers 115, 118, 130, 131 may be subdivided into multiple registers. What is important is the information stored by the hardware modules 100, 200 that allows the selection of the appropriate buffer from which to send data.

[0116] Although selection between only two local input buffers 201A, 201B has been described with respect to the examples shown in Figures 2B, 2C, and 2D, the same selection scheme may be applied for use with three or more such buffers for receiving data from locally connected source components. Additionally, although arbitration between only two destinations has been described with respect to Figures 1D, 1E, 2C, and 2D, arbitration between three or more destinations may be performed.

[0117] 1A-2D, it was explained that the selection between the buffers (e.g., the first input buffer 105 / 201A and the second input buffer 112) is performed based on the source components of the data packets at the head of those buffers. If one of those buffers is empty, the empty buffer is removed from the selection process.

[0118] In some embodiments, a hardware module may have multiple output ports through which locally connected source components can send data to a destination, in which case the hardware (i.e., input buffers 105, 107 and arbitration circuit 111) is replicated for each additional output port.

[0119] 3, which illustrates an example of a hardware module 300 with multiple output ports 106a, 106b to which data packets received from one or more source components 103 may be transmitted from the hardware module 300. One destination may be accessible on a set of ports 106a, while a different set of destinations may be accessible on port 106b.

[0120] This exemplary hardware module 300 includes some of the same components as described above with respect to FIG. 1A. Specifically, the hardware module 300 includes a first input port 101, an output port 110, and an output buffer 109. The hardware module includes two input buffers 105a, 105b, both of which function like the first input buffer 105 described above. Buffer 105a is associated with output port 106a, whereas buffer 105b is associated with output port 106b. The circuitry of the hardware module 300 sorts data packets received on port 101 from one or more source components 103 into buffer 105a or buffer 105b according to a destination identifier in the packet's header. In particular, packets for delivery to a destination accessible on output port 106b are stored in buffer 105b, whereas packets accessible on output port 106a are stored in buffer 105a.

[0121] The hardware module includes a set of buffers 107a for receiving data packets via input port 102a and a set of buffers 107b for receiving data packets via input port 102b. Each of these sets of buffers 107a, 107b has the same characteristics and functionality as buffer 107 described above with respect to Figures 1A-2D. Buffer 107a holds data packets for transmission on output port 106b or for delivery to locally connected source component 103 via output port 110. Buffer 107b holds data packets for delivery on output port 106a or for transmission to locally connected source component 103 via output port 110.

[0122] Hardware module 300 includes an arbitration circuit 111a and an arbitration circuit 111b, each of which has the same features and functions as arbitration circuit 111 described above. Circuits 111a, 111b can arbitrate between buffers based on source and destination in the manner described with respect to any of the embodiments described above with respect to Figures 1B-1E and 2B-2D. Circuit 111a selects between buffers 105a, 107a for sending data on interface 106b, while circuit 111a selects between buffers 105b, 107b for sending data on interface 106a.

[0123] 3 shows only one pair of input buffers 105, 105b for receiving data packets from source component 103 via a single input port 101, in some embodiments hardware module 300 may include multiple input ports and input buffers as shown in FIG 2A. In this case, each input port may be associated with a pair of input buffers, where for each pair of input buffers, one of the buffers is associated with circuit 111a and the other buffer is associated with circuit 111b. In this manner, each circuit 111a, 111b selects among transmitting data packets from three or more buffers in the manner described with respect to FIGS. 2A-2D.

[0124] Each of the exemplary hardware modules 100, 200, 300 described above is configured to transmit a single data packet on an output port once per clock cycle. Within each single clock cycle, circuit 111 of hardware modules 100, 200 selects a buffer (based on the destination or source identifier of the data packet at the head of that buffer) and transmits the packet at the head of that buffer. In module 300, within each clock cycle, circuit 111a selects a buffer and transmits a packet from that buffer, and circuit 111b selects a further buffer and transmits a further packet from that buffer.

[0125] When data is received from multiple different sources on at least one port, the hardware modules 100, 200, 300 described above have the advantage of providing fairness between sources sending data packets to a particular destination. In some embodiments, a series of hardware modules are provided in an interconnect, with each hardware module acting as a node in the interconnect.

[0126] Please refer to FIG. 4, which shows an interconnect 410 including a number of hardware modules 400a-f. Each of the hardware modules 400a-f may be one of the exemplary hardware modules 100, 200, 300 described above. Each of the hardware modules 400a-f is a node in the interconnect 410 and is operable to forward packets to its neighboring nodes 400a-f of the interconnect 410. The packets forwarded by each node 400a-f are received from the node's locally connected components or from its neighboring nodes 400a-f of the interconnect 410. In FIG. 4, the locally connected components are represented as b_(n-1), b_(n-2)...b_1, and b_0. Each of these locally connected components is connected to one of the nodes 400a-e.

[0127] It will be appreciated that by employing the above-described scheme of arbitration based on the source of the data, fairness is achieved between the various sources (b_(n-1) through b_0) when providing data to a particular destination accessible on interconnect 410.

[0128] In FIG. 4, an exemplary destination is labeled as "B(VC X)". B(VC X) is a component connected to node 400f. Assume that each of sources b_(n-1) to b_0 targets destination B(VC X) by sending a data packet to B(VC X). It is clear that each of nodes 400b-400e receives data packets originating from its locally connected source component and from source components connected to at least one of nodes 400a-d. A scheme can be applied in which each node 400b-e arbitrates by applying round-robin between a single local input buffer and further input buffers for receiving data from the other nodes 400a-e. In this case, fairness between buffers is provided but not between sources. If a simple round-robin between buffers is applied, the source closest to destination B(VC X) is preferred. Node 400e will divide its available bandwidth for transmitting data to B(VC X) between b_0 (from which data is received on a local input port of node 400e and stored in a local input buffer of node 400e) and a combination of other sources b_(n-1) to b_1 (from which data is received on a second input port of node 400e and stored in the same one of the further buffers 107 of node 400e). Because the remote sources b_(n-1) to b_1 share the same buffer, providing fairness between the buffers will result in a bias in favor of source b_0, and more bandwidth will be allocated to this source. Similarly, node 400d will divide its available bandwidth for transmitting data to B(VC X) between b_1 and a combination of sources b_(n-1) to b_2, thereby allocating more bandwidth to b_1 than to the other sources b_(n-1) to b_2.

[0129] Thus, it is understood that the bandwidth for delivering data from a particular source to B (VC X) decreases with distance from B (VC X) (i.e., the number of nodes 400). Furthermore, in some circumstances, the bandwidth at which nodes 400a-f can output data may exceed the bandwidth at which sources b_(n-1) to b_0 can output data to their own nodes 400a-e. In this case, if fairness between sources is not provided, the total time for each of sources b_(n-1) to b_0 to transmit a set of data to destination B (VC X) may be long. Assume that each node 400a-e can output data toward destination B (VC X) at 96 Gbps, while each of sources b_(n-1) to b_0 can only output data to their respective nodes 400a-e at 32 Gbps. Given the number of sources (four or more), if each of sources b_(n-1) to b_0 attempts to transmit data at its maximum rate, the 96 Gbps link to B (VC X) will saturate. Sources farther from B(VC X) (e.g., b_n-1) may stall, while sources closer to B(VC X) (e.g., b_0) may transmit at a higher rate and use their full 32 Gbps. If sources b_(n-1) to b_0 each have an equal set of data to send, then sources closer to B(VC X) (e.g., b_0) will finish first and sources farther from B(VC X) (e.g., b_(n-1)) will finish last. In this case, the 96 Gbps link to B(VC X) will no longer be saturated when the closer sources finish sending their data, so that only the farthest source is still sending data, implying wasted bandwidth and an increase in the total time required for transmission from all of sources b_(n-1) to b_0.

[0130] Thus, according to an embodiment, each of the nodes 400a-f selects between its local input buffer and the further buffer (for receiving from the other nodes 400a-f) by arbitrating between the sources as described. In this way, fairness is ensured between each of the sources b_(n-1) to b_0 for transmitting to B(VC X). For example, assuming that each of the sources b_(n-1) to b_0 transmits at the same rate, the node 400f transmits data to B(VC X) at equal rates from each of the sources b_(n-1) to b_0. Similarly, the node 400e transmits data to the node 400f at equal rates from each of the sources b_(n-1) to b_1. In an embodiment, the bandwidth (e.g., 96 Gbps) for the node 400f to transmit data to B(VC X) (e.g., via the output buffer 109) is greater than the bandwidth (e.g., 32 Gbps) that each of the sources b_(n-1) to b_0 can output data. When sources b_(n-1) to b_0 each have an equal set of data to send to B(VC X), the fairness provided between the sources ensures that the link bandwidth between node 400f and B(VC X) remains saturated at 96 Gbps throughout the transmission of the data, thus reducing the total time to transmit the data.

[0131] 4 that embodiments are particularly advantageous when multiple instances of hardware modules 100, 200, 300 are provided together as nodes 400 of an interconnect and used in a configuration where the aggregate transmit bandwidth of the sources exceeds the receive bandwidth of the destinations. In this case, by providing fairness between the sources at each node 400 in the interconnect, the receive bandwidth is constantly saturated throughout the transfer of data, thus minimizing the total transfer time.

[0132] Please refer to FIG. 5, which shows a further exemplary embodiment of a system on chip 500 including an interconnect. In this example, the nodes 400 are shown as trunk nodes 400. Each of the trunk nodes 400 has two adjacent trunk nodes 400 that can send and receive data packets. The trunk nodes 400 can take the form of the hardware modules 300 shown in FIG. 3. The interconnect also includes a trunk extension unit 510 that functions as a node that routes traffic from one side of the chip to the other. The trunk extension unit 510 functions as a simplified version of the trunk node 400 that does not connect to any SoC components (other than the trunk nodes 400).

[0133] The interconnect is organized as a ring around which packets can circulate. Packets can travel in a clockwise or counterclockwise direction on the interconnect. Packets have a header that contains information such as a destination identifier and a source identifier, allowing the node 400 to store them in the appropriate virtual channel buffer 107 and to select and transmit them by arbitrating based on the destination identifier and the source identifier.

[0134] The chip includes processing units 2 that include multiple processor tiles 4. The interconnect forms a ring path around the processing units 2 and is used to transmit data packets to and from the tiles 4 of the processing units 2. The interconnect also transmits data packets to and from other SoC components of the chip. The interconnect is used to transmit data plane traffic (e.g., application instructions and application data for processing by the tiles 4). The interconnect carries this data plane traffic between the tiles 4 and a host system or between the tiles 4 and directly connected external memory. Each of the tiles 4 can exchange data packets with a trunk node via an associated switching block 520. The switching block 520 converts packets between an ELink packet format suitable for transmission around the interconnect between the nodes 400 and a TLink packet format used for packet transmission between the tiles 4 and the switching block 520.

[0135] Various components are shown connected to a node 400 of the interconnect. One example of such a component is a PCI complex for interfacing with a host or with another chip. The PCIe complex receives packets from its associated node 400 and provides them to the host or another chip. Such packets may be read or write request packets sent by a tile 4 on a chip to read or write data from a host, or may be write packets sent by a tile 4 on another chip to write data to a memory of a tile 4 on a connected chip. The PCIe complex receives packets from a host or another chip 500 and converts them to an Elink packet format for circulation on the interconnect to provide them to another component accessible on the interconnect. Thus, a PCIe complex can act as both a connected source and a connected destination for its associated trunk node 400.

[0136] A further component accessible over the interconnect is a DDR memory controller for reading and writing data to on-chip DDR memory, which is accessible over the interconnect to tile 4.

[0137] A further component accessible on the interconnect is an Ethernet port controller for transmitting and receiving data over an Ethernet network.

[0138] To transfer data between trunk nodes 400, multiple virtual channels are defined bidirectionally around the ring interconnect. Each of these virtual channels is associated with one of the buffers 107a, 107b. The virtual channels are defined to prevent HOL blocking. A virtual channel on the interconnect serves exactly one of the components accessible on the ring. Each virtual channel has its own dedicated buffer at each of the nodes 400. The nodes forward received packets based on the occupancy of the virtual channel's buffer at the upstream node 400. Each node 400 provides its neighbors with a credit signal for each virtual channel, which indicates the occupancy of the buffer for each virtual channel. In this way, the nodes 400 can backpressure the interconnect on a per virtual channel basis.

[0139] In the above description, operations have been described as being performed by hardware modules 100 / 200 / 300 / 400. These operations described as being performed by the hardware modules may be performed by any suitable circuitry of modules 100 / 200 / 300 / 400 (including circuits 111, 111a, 111b, or other circuitry). This circuitry may take the form of special purpose processing circuitry, such as a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC), or may take the form of a processor configured to execute computer readable instructions to perform the described operations.

[0140] Please refer to FIG. 6, which illustrates a method 600 according to an embodiment of the present application.

[0141] At S610, a first input port receives a first set of data packets originating from a first subset of source components and provides them to a first input buffer, the first subset consisting of one or more of the multiple source components.

[0142] At S620, a second input port receives a second set of data packets originating from a second subset of source components and provides them to a second input buffer, the second subset of source components including two or more source components, the first subset being comprised of a different number of source components relative to the second subset.

[0143] At S630, the processing circuit examines one or more second source identifiers in the set of one or more second data packets to determine which of a plurality of second source components each of the set of one or more second data packets originated from.

[0144] At S640, the processing circuit selects between the first input buffer and the second input buffer as a source of data to the first destination in response to the one or more second source identifiers, and arbitrates among multiple source components for transmitting data to the first destination.

[0145] It will be understood that the embodiments have been described by way of example only.

Claims

1. a hardware module for receiving data from a plurality of source components and forwarding at least a portion of the data to a first destination, the hardware module comprising: a first input port configured to receive a first set of data packets comprising data packets originating from a first subset of the source components and to provide the first set of data packets to a first input buffer, the first subset consisting of one or more of the plurality of source components; a second input port configured to receive a second set of data packets comprising data packets originating from a second subset of the source components and to provide the second set of data packets to a second input buffer, the second subset of source components comprising two or more source components, and the first subset consisting of a different number of source components relative to the second subset; an output port for outputting the first set of data packets and the second set of data packets, the output port being configured to output data to a plurality of destinations including the first destination, some of the data packets included in the first set of data packets being intended for transmission to different ones of the plurality of destinations; examining a destination identifier in one of the data packets included in the first set of data packets that is located at the top of the first input buffer; examining one or more source identifiers in one or more data packets of the second set of data packets to determine which of the second subset of source components each of the one or more data packets originated from; in response to determining that the destination identifier identifies the first destination, selecting between the first input buffer and the second input buffer as a source of data to the first destination according to the one or more source identifiers, and arbitrating among the plurality of source components for transmitting data to the first destination. a processing circuit configured to A hardware module including:

2. the processing circuit is configured to transmit, when selecting the second input buffer, a second data packet located at the head of the second input buffer among the data packets included in the second data packet set; 2. The hardware module of claim 1, wherein the one or more source identifiers are source identifiers of data packets included in the second set of data packets that were transmitted from the second input buffer before transmitting the second data packets.

3. including storage configured to store a first indicator indicating the number of the source components from which data was last transmitted from the second input buffer; 2. The hardware module of claim 1, wherein selecting between the first input buffer and the second input buffer comprises performing a weighted round robin between the first input buffer and the second input buffer, the second input buffer being weighted by the number of the source components to which data was last sent from the second input buffer.

4. 4. The hardware module of claim 3, further comprising: a set of input buffers configured to receive data originating from the second subset of source components, the set of input buffers including the second input buffer.

5. the storage includes, for each of the source components included in the second subset, a second indicator indicating to which of the set of input buffers data originating from the respective source component was last sent; 5. The hardware module of claim 4, wherein the first indicator is given by the number of source components in the second subset for which the second indicator indicates the second input buffer.

6. A first data packet located at the head of the first input buffer among the data packets included in the first set of data packets originates from a first source component of a first subset of source components identified by a first source identifier; examining the one or more source identifiers includes examining a second source identifier in a second data packet located at the head of the second input buffer among the data packets included in the second set of data packets; 2. The hardware module of claim 1, wherein the processing circuitry is configured to select the second data packet for transmission on the output port as a function of the second source identifier and the first source identifier.

7. The hardware module of claim 6 , wherein the processing circuitry is configured to determine the first source identifier by inspecting the first source identifier in the first data packet.

8. 2. The hardware module of claim 1, further comprising: a register that stores an identifier of one of the plurality of source components that most recently transmitted data to the first destination; and wherein selecting between the first input buffer and the second input buffer comprises sequentially selecting the next of the plurality of source components following the one of the plurality of source components identified in the register.

9. The hardware module of claim 1 , wherein selecting between the first input buffer and the second input buffer comprises applying a round-robin scheme among the plurality of source components.

10. 2. The hardware module of claim 1, wherein the first subset of source components consists of a single source component, and the first input buffer is dedicated to holding data packets originating from the single source component.

11. 2. The hardware module of claim 1, further comprising: a set of input buffers for storing data originating from the second subset of source components, each of the set of input buffers being dedicated to storing data for transmission to a different one of the plurality of destinations, and the second input buffer being dedicated to storing data for transmission to the first destination.

12. 12. The hardware module of claim 11, wherein each of the sets of input buffers is associated with a different virtual channel of an interconnect in which the hardware module serves as a node.

13. 2. The hardware module of claim 1, wherein the processing circuitry is configured to select a first destination as the next destination to which data is to be sent as part of an arbitration scheme for arbitrating among the multiple destinations for sending data on the output port before selecting between the first input buffer and the second input buffer.

14. 2. The hardware module of claim 1, wherein a first bandwidth available for transmitting at the output port exceeds a second bandwidth for receiving data at the first input port.

15. a node on an interconnect, the first input port being a local input port for receiving the first set of data packets from the first subset of the plurality of source components connected to the node; The hardware module of claim 1 , wherein the second input port is configured to receive the second set of data packets from a further node of the interconnect.

16. the second input port configured to receive data for transmission to at least one of the first subset of source components; 2. The hardware module of claim 1, wherein the processing circuitry is configured to provide this data for delivery to the at least one of the first subset of source components on a further output port of the hardware module.

17. 17. An apparatus comprising a hardware module according to any one of claims 1 to 16, the apparatus comprising a plurality of source components and a first destination.

18. 20. The apparatus of claim 17, comprising multiple instances of the hardware module connected together as nodes forming part of an interconnect, each of the instances configured to receive data from a different one or more of the source components.

19. 20. The apparatus of claim 18, further comprising: a further hardware module connected to the first destination, the further hardware module configured to output data from the different ones of the source components connected to each of the plurality of instances of the hardware module to the first destination, wherein a total bandwidth of the different ones of the source components exceeds a bandwidth of the further hardware module for providing data to the first destination.

20. The device of claim 17 , wherein the device is an integrated circuit.

21. 1. A method for receiving data from a plurality of source components and forwarding at least a portion of the data to a first of a plurality of destinations, comprising: receiving a first set of data packets comprising data packets originating from a first subset of the source components and providing the first set of data packets to a first input buffer; receiving a second set of data packets comprising data packets originating from a second subset of the source components and providing the second set of data packets to a second input buffer; examining a destination identifier in one of the data packets included in the first set of data packets that is located at the top of the first input buffer; examining one or more source identifiers in one or more data packets of the second set of data packets to determine which of the second subset of source components each of the one or more data packets originated from; responsive to determining that the destination identifier identifies the first destination, selecting between the first input buffer and the second input buffer as a source of data to the first destination according to the one or more source identifiers, and arbitrating among the plurality of source components for transmitting data to the first destination; Including, the first subset is comprised of one or more of the plurality of source components, and some of the data packets included in the first set of data packets are intended for transmission to different ones of the plurality of destinations; the second subset of source components includes two or more source components, and the first subset is comprised of a different number of source components relative to the second subset. method.

22. 1. A computer program comprising a set of computer readable instructions that cause at least one processor to perform a method, said method comprising: examining a destination identifier in one of the data packets in the first set of data packets located at the head of the first input buffer; examining one or more source identifiers in one or more data packets of the second set of data packets stored in the second input buffer to determine which of a second subset of source components each of the one or more data packets originated from; in response to determining that the destination identifier identifies a first destination of the plurality of destinations, selecting between the first input buffer and the second input buffer as a source of data to the first destination according to the one or more source identifiers, and arbitrating among the plurality of source components for transmitting data to the first destination; Including, the data packets in the first set of data packets originate from a first subset of a plurality of source components, the first subset consisting of one or more of the plurality of source components, and some of the data packets in the first set of data packets are for transmission to different ones of a plurality of destinations; the second subset of the plurality of source components includes two or more source components, and the first subset of source components is comprised of a different number of source components relative to the second subset. Computer program.