US4584666AExpiredUtilityPatentIndex 78
Method and apparatus for signed and unsigned bounds check
Est. expiryJun 21, 2004(expired)· nominal 20-yr term from priority
G06F 7/026
78
PatentIndex Score
22
Cited by
4
References
5
Claims
Abstract
A typical feature of a data processor is a bounds check. A bounds check is achieved when a determination is made as to whether a check value, typically an address or datum, is within predetermined bounds. Such check values may be signed or unsigned. By requiring that the upper bound be numerically larger than the lower bound for doing a signed check, and requiring that the upper bound be logically larger than the lower bound for doing an unsigned check, the bounds check is performed by the data processor without the need of receiving a signal which informs the data processor in advance as to whether the check is to be signed or unsigned.
Claims
exact text as granted — not AI-modifiedWe claim:
1. In a data processor having means for storing an upper bound and a lower bound, a method for determining if a check value, which may be signed or unsigned, is within the upper and lower bounds, comprising the steps of: providing a within-bounds signal if any of the following conditions are met: the lower bound equals the check value; or the lower bound is less than the check value, and the upper bound is greater than or equal to the check value; or the lower bound is less than the check value, the upper bound is not greater than or equal to the check value, and the upper bound is less than the lower bound; or the upper bound is equal to the check value; or the lower bound is not less than the check value, the upper bound is not less than the check value, and the upper bound is not greater than or equal to the lower bound; and providing an out-of-bounds signal if none of the conditions for providing the within bounds signal are met; whereby the check value is in bounds if the in-bounds signal is provided and is out of bounds if the out-of-bounds signal is provided.
2. In a data processor having means for storing an upper bound and a lower bound, a method for determining if a check value, which may be signed or unsigned, is within the upper and lower bounds, comprising the steps of: determining if the lower bound equals the check value; determining if the lower bound is less than the check value; determining if the upper bound is less than the lower bound; determining if the upper bound is equal to the check value; determining if the upper bound is greater than or equal to the check value; providing a within-bounds signal if any of the following conditions are met: the lower bound is determined to be equal to the check value; or the lower bound is determined to be less than the check value, and the upper bound is determined to be greater than or equal to the check value; or the lower bound is determined to be less than the check value, the upper bound is determined to be not greater than or equal to the check value, and the upper bound is determined to be less than the lower bound; or the upper bound is determined to be equal to the check value; or the lower bound is determined to be not less than the check value, the upper bound is determined to be not less than the check value, and the upper bound is determined to be not greater than or equal to the lower bound; and providing an out-of-bounds signal if none of the conditions for providing a within-bounds signal are met; whereby the check value is in bounds if the in-bounds signal is provided and is out of bounds if the out-of-bounds signal is provided.
3. In a microcomputer having means for storing an upper bound and a lower bound, a method for determining if a check value, which may be signed or unsigned number, is within the upper and lower bounds, comprising the steps of: providing a within-bounds signal if the lower bound equals the check value; determining whether or not the lower bound is less than the check value when the lower bound has been determined to be not equal to the check value; determining whether or not the upper bound is greater than or equal to the check value when the lower bound has been determined to be less than the check value; providing the within-bounds signal when the lower bound has been determined to be less than the check value and the upper bound has been determined to be greater than or equal to the check value; determining whether or not the upper bound is less than the lower bound when the lower bound has been determined to be less than the check value and the upper bound has been determined to be not greater than or equal to the check value; providing the within-in bounds signal when the lower bound has been determined to be less than the check value, the upper bound has been determined to be not greater than or equal to the check value, and the upper bound has been determined to be less than the lower bound; providing an out-of-bounds signal when the lower bound has been determined to be less than the check value, the upper bound has been determined to be not greater than or equal to the check value, and the upper bound has been determined to be not less than the lower bound; determining whether or not the upper bound is equal to the check value when the lower bound has been determined to be not less than the check value, and the check value has been determined to be not equal to the lower bound; providing the within-bounds signal when the upper bound has been determined to be equal to the check value; determining whether or not the upper bound is less than the check value when the lower bound has been determined to be not less than the check value, the upper bound has been determined to be not equal to the check value, and the check value has been determined to be not equal to the lower bound; providing the out-of-bounds signal when the lower bound has been determined to be not equal to the check value, the upper bound has been determined to be less than the lower bound, the lower bound has been determined to be not less than the check value, and the upper bound has been determined to be not equal to the check value; determining whether or not the upper bound is greater than or equal to the lower bound when the lower bound has been determined to be not equal to the check value, the lower bound has been determined to be not less than the check value, the upper bound has been determined to be not equal to the check value, and the upper bound has been determined to be not less than the check value; providing the out-of-bounds signal when the upper bound is determined to be greater than or equal to the lower bound, the lower bound has been determined to be not equal to the check value, the lower bound has been determined to be not less than the check value, and the upper bound has been determined to be not less than the check value; and providing the within-bounds signal when the lower bound is determined to be not less than the check value, the upper bound is determined to be not less than the check value, and the upper bound is determined to be not greater than or equal to the lower bound.
4. In a data processor having means for storing an upper bound and a lower bound, a circuit for determining if a check value, which may be signed or unsigned, is within the upper and lower bounds, comprising: means for providing a within-bounds signal if any of the following conditions are met: the lower bound equals the check value; or the lower bound is less than the check value, and the upper bound is greater than or equal to the check value; or the lower bound is less than the check value, the upper bound is not greater than or equal to the check value, and the upper bound is less than the lower bound; or the upper bound is equal to the check value; or the lower bound is not less than the check value, the upper bound is not less than the check value, and the upper bound is not greater than or equal to the lower bound; and means for providing an out-of-bounds signal if none of the conditions for providing the within-bounds signal are met; whereby the check value is in bounds if the within-bounds signal is provided and is out of bounds if the out-of-bounds signal is provided.
5. In a data processor having means for storing an upper bound and a lower bound, a circuit for determining if a check value, which may be signed or unsigned, is within the upper and lower bounds, comprising: first means for determining if the lower bound equals the check value; second means for determining if the lower bound is less than the check value; third means for determining if the upper bound is less than the lower bound; fourth means for determining if the upper bound is equal to the check value; fifth means for determining if the upper bound is greater than or equal to the check value; sixth means for providing a within-bounds signal if any of the following conditions are met: the first means determines that the lower bound is equal to the check value; or the second means determines that the lower bound is less than the check value, and the fifth means determines that the upper bound is greater than or equal to the check value; or the second means determines that the lower bound is less than the check value, the fifth means determines that the upper bound is not greater than or equal to the check value, and the third means determines that the upper bound is less than the lower bound; or the fourth means determines that the upper bound is equal to the check value; or the second means determines that the lower bound is not less than the check value, the fifth means determines that the upper bound is not less than the check value, and the third means determines that the upper bound is not greater than or equal to the lower bound; and seventh means for providing an out-of-bounds signal if none of the conditions for providing a within-bounds signal are met; whereby the check value is in bounds if the in-bounds signal is provided and is out of bounds if the out-of-bounds signal is provided.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.