Minimum processor instruction for implementing weighted fair queuing and other priority queuing
First Claim
Patent Images
1. A processor for determining a minimum value of a plurality of values stored in source registers and determining an index value of a source register having the minimum value, the processor comprising:
- a destination register;
a first source register storing a first value;
a second source register storing a second value;
means for comparing the first value stored in the first source register with the second value stored in the second source register;
means for storing the first value in the destination register when the first value is less than or equal to the second value; and
means for concatenating the index value with the second value into a concatenated value and storing the concatenated value in the destination register when the second value is less than the first value.
10 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides techniques for efficiently determining a minimum or maximum of a plurality of values and the index of the minimum using registers of a processor. The present invention also provides for various processor instructions for determining the minimum/maximum and index of two or more values. The present invention finds particular benefit in implementing heaps and in systems utilizing Weighted Fair Queuing (WFQ).
30 Citations
38 Claims
-
1. A processor for determining a minimum value of a plurality of values stored in source registers and determining an index value of a source register having the minimum value, the processor comprising:
-
a destination register;
a first source register storing a first value;
a second source register storing a second value;
means for comparing the first value stored in the first source register with the second value stored in the second source register;
means for storing the first value in the destination register when the first value is less than or equal to the second value; and
means for concatenating the index value with the second value into a concatenated value and storing the concatenated value in the destination register when the second value is less than the first value. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A processor for determining a minimum value of a plurality of values stored in source registers and determining an index value of source register having the minimum value, the processor comprising:
-
means for determining a first minimum value of a first value and a second value;
means for determining a second minimum value of a third value and a fourth value;
means for storing the first minimum value in a first portion of a first destination register and the second minimum value in a second portion of the first destination register; and
means for storing a first index value associated with the first minimum value in a first portion of a second destination register and a second index value associated with the second minimum value in a second portion of the second destination register;
wherein the means for determining the first minimum value and the means for determining the second minimum value are adapted to execute in parallel. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A method for determining a minimum value and a corresponding index value of a plurality of source registers of a processor, the method comprising the steps of:
-
for each of the plurality of source registers, comparing a value stored in the source register with a value stored in a destination register;
concatenating the value stored in the source register with an index value associated with the source register and storing the concatenated value in the destination register when the value stored in the source register is less than the value stored in the destination register; and
wherein the destination register initially includes an index value and a value of a first source register of the plurality of source registers. - View Dependent Claims (14, 15, 16)
-
-
17. A customer premise equipment (CPE) comprising:
-
a network interface operably connected to a first network segment;
a network interface operably connected to a second network segment; and
a processor operably connected to the network interfaces and being adapted to;
compare a first value stored in a first source register of the processor with a second value stored in a second source register of the processor;
store the first value in a first destination register of the processor when the first value is less than or equal to the second value; and
store the second value in the first destination register of the processor and an index value in a second destination register of the processor when the second value is less than the first value, the index value representing the second source register. - View Dependent Claims (18, 19)
-
-
20. A processor for determining a maximum value of a plurality of values stored in source registers and determining an index value of a source register having the maximum value, the processor comprising:
-
a destination register;
a first source register storing a first value;
a second source register storing a second value;
means for comparing the first value stored in the first source register with the second value stored in the second source register;
means for storing the first value in the destination register when the first value is greater than or equal to the second value; and
means for concatenating the index value with the second value into a concatenated value and storing the concatenated value in the destination register when the second value is greater than the first value. - View Dependent Claims (21, 22, 23, 24, 25)
-
-
26. A processor for determining a maximum value of a plurality of values stored in source registers and determining an index value of source register having the maximum value, the processor comprising:
-
means for determining a first maximum value of a first value and a second value;
means for determining a second maximum value of a third value and a fourth value;
means for storing the first maximum value in a first portion of a first destination register and the second maximum value in a second portion of the first destination register; and
means for storing a first index value associated with the first maximum value in a first portion of a second destination register and a second index value associated with the second maximum value in a second portion of the second destination register;
wherein the means for determining the first maximum value and the means for determining the second maximum value are adapted to execute in parallel. - View Dependent Claims (27, 28, 29, 30, 31)
-
-
32. A method for determining a maximum value and a corresponding index value of a plurality of source registers of a processor, the method comprising the steps of:
-
for each of the plurality of source registers, comparing a value stored in the source register with a value stored in a destination register;
concatenating the value stored in the source register with an index value associated with the source register and storing the concatenated value in the destination register when the value stored in the source register is greater than the value stored in the destination register; and
wherein the destination register initially includes an index value and a value of a first source register of the plurality of source registers. - View Dependent Claims (33, 34, 35)
-
-
36. A customer premise equipment (CPE) comprising:
-
a network interface operably connected to a first network segment;
a network interface operably connected to a second network segment; and
a processor operably connected to the network interfaces and being adapted to;
compare a first value stored in a first source register of the processor with a second value stored in a second source register of the processor;
store the first value in a first destination register of the processor when the first value is greater than or equal to the second value; and
store the second value in the first destination register of the processor and an index value in a second destination register of the processor when the second value is greater than the first value, the index value representing the second source register. - View Dependent Claims (37, 38)
-
Specification