Patent ID: 7760748

Claim:
A switch comprising: a network; and a plurality of ports, each coupled to receive transactions from other of said plurality of ports via said network, each of said ports comprising: a port interface configured to transmit said transactions to a device coupled to said port; N transaction queues configured to receive said transactions from said network, each of the N transaction queues having a priority, the priority being one of P priorities, wherein a subset of the N transaction queues may have a transmittable transaction in a selection cycle; a transaction selector coupled to said port interface and said N transaction queues, configured to select for transmission transactions of the N transaction queues in a round-robin fashion within each of the P priorities independent of the other P priorities, said transaction selector comprising: P round-robin circuits, each for generating an N-bit round-robin vector for a corresponding one of the P priorities, wherein said N-bits correspond to the N transaction queues, each of said P round-robin circuits comprising: a first input for receiving a first corresponding N-bit value specifying which of the N transaction queues was last selected at the corresponding priority to transmit a transaction, wherein only one of said N bits corresponding to said last selected transaction queue is true; a second input for receiving a second corresponding N-bit value, each of said N bits being false if said corresponding transaction queue has a transmittable transaction; a barrel incrementer coupled to receive said first and second inputs, configured to 1-bit left-rotatively increment said second value by said first value to generate a sum; and combinational logic coupled to said barrel incrementer, configured to generate said N-bit round-robin vector specifying which of the N transaction queues is selected next to transmit a transaction, said round-robin vector comprising a Boolean AND of said sum and an inverted version of said second value, wherein only one of said N bits corresponding to said next selected one of the N transaction queues is true; N P-input muxes, each coupled to receive a corresponding one of said N bits of each of said P round-robin vectors, each configured to select one of said P inputs specified by the priority of the corresponding transaction queue as a round-robin bit for said corresponding transaction queue; and selection logic, coupled to said N P-input muxes, configured to select one of the N transaction queues for transmitting a transaction thereof, wherein said selection logic selects said one of the N transaction queues having said round robin bit set, having a transmittable transaction, and having said priority a highest of the P priorities having a transmittable transaction; and priority setting logic configured to set the priority of each of the N transaction queues based on a characteristic of the port with which each respective transaction queue is associated.