System and method for resolving wraparound ambiguity in a counter
AssigneeHewlett-Packard Development Company, L.P.
InventorBruce E. Lavigne
Life of this patent
Estimating the term…
Abstract
System and method for determining expiration of a timestamp using a counter. Upon the occurrence of a first event, a time value derived from a binary counter with a length N is associated with the first event. At a later second time value derived from a binary counter with length N, the first time value is checked for expiration with respect to an expiration period. The second time value is summed with a predetermined offset value and the sum formatted as a number with length N+2. The first time value is subtracted from the sum and the two most significant bits are removed. The result is then compared to the expiration period to determine whether expiration has occurred.
Claims20
A method for determining a timeout condition in a system having a counter subject to wraparound, comprising:
- adding a first time value and an offset to produce a sum;
- subtracting a second time value from said sum to produce a difference;
- masking said difference to produce a masked difference;
- and,
- performing a single compare operation between said masked difference and an expiration value, wherein wraparound ambiguity of said counter is resolved.
A system for determining a timeout condition comprising a first counter with length N coupled to at least one of a plurality of registers, said plurality of registers being coupled to a plurality of logic circuits configured to determine a timeout condition with a single compare operation, wherein wraparound is resolved.
A computer readable medium containing executable instructions which, when executed in a processing system, causes the system to perform the steps determining a timeout, comprising:
- adding a first time value and an offset to produce a sum;
- subtracting a second time value from said sum to produce a difference;
- masking said difference to produce a masked difference;
- and,
- performing a first and only compare operation between said masked difference and an expiration value.
Dependencies are inferred from the claim text.