Processor with accelerated array access bounds checking
First Claim
1. An array bounds checking apparatus configured to verify that each access of an array is within a maximum array size boundary value and a minimum array size boundary value, the apparatus comprising:
- an associative memory element configured to store and retrieve array size values which are associated with one of a plurality of array access instructions, each array access instruction referencing a value of a location of an element within the array;
a first comparison element operatively coupled to an output section of the associative memory element, the first comparison element configured to compare a predetermined maximum array size value and the value of the location of the referenced element within the array, and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the predetermined maximum array size value; and
a second comparison element operatively coupled to the output section of the associative memory element, the second comparison element configured to compare a predetermined minimum array size value and the value of the location of the referenced element within the array, and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the predetermined minimum array size value.
2 Assignments
0 Petitions
Accused Products
Abstract
An array boundary checking apparatus is configured to verify that a referenced element of an information array is within a maximum array size boundary value and a minimum array size boundary value. The array boundary checking apparatus of the invention includes an associative memory element that stores and retrieves a plurality of array bound values. Each one of the plurality of array bound values is associated with one of the plurality of array access instructions. An input section simultaneously compares the array access instruction identifier with at least a portion of each of the stored array reference entries, wherein the array access instruction identifier identifies an array access instruction. An output section is configured to provide as an array bounds output values one of the plurality of array bound values stored in one of the plurality of memory locations of the associated memory element. A first comparison element compares the value of the referenced element and the maximum array index boundary value and provides a maximum violation signal if the value of the element is greater than the maximum array size boundary value. A second comparison element compares the value of the element and the minimum array size boundary value and provides a minimum violation signal if the value of the element is less than the minimum array bounds value. Either a maximum violation signal or a minimum violation signal results in an exception.
187 Citations
11 Claims
-
1. An array bounds checking apparatus configured to verify that each access of an array is within a maximum array size boundary value and a minimum array size boundary value, the apparatus comprising:
-
an associative memory element configured to store and retrieve array size values which are associated with one of a plurality of array access instructions, each array access instruction referencing a value of a location of an element within the array; a first comparison element operatively coupled to an output section of the associative memory element, the first comparison element configured to compare a predetermined maximum array size value and the value of the location of the referenced element within the array, and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the predetermined maximum array size value; and a second comparison element operatively coupled to the output section of the associative memory element, the second comparison element configured to compare a predetermined minimum array size value and the value of the location of the referenced element within the array, and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the predetermined minimum array size value. - View Dependent Claims (2, 3)
-
-
4. An array bounds checking apparatus configured to verify that a refernced element of an array is within a maximum array size boundary value and a minimum array size boundary value, the apparatus comprising:
-
(a) an associative memory element configured to store and retrieve array size values, wherein the array size values are associated with one of a plurality of array access instructions, each array access instruction referencing a value of a location of an element within the array, the associative memory element including; (i) a first memory section that includes a first plurality of memory locations configured to receive and store a plurality of array reference entries, wherein each one of the first plurality of memory locations is configured to store one of the plurality of array reference entries, and further wherein each one of the plurality of array reference entries corresponds to one of the plurality of array access instructions; (ii) a second memory section that includes a second plurality of memory locations configured to receive and store a plurality of array size values, wherein each one of the second plurality of memory locations is configured to store one of the array size values and is associated with one of the first plurality of memory locations, and further wherein each one of the plurality of array size values is associated with one of the plurality of array access instructions and comprises a maximum array size value and a minimum array size value; (iii) an input section operatively coupled to the first memory section, and configured to receive an array access instruction identifier and to simultaneously compare the array access instruction identifier with at least a portion of each of the stored plurality of array reference entries, wherein the array access instruction identifier identifies an array access instruction; and (iv) an output section, operatively coupled to the second memory section, configured to provide, as an array size output value, one of the plurality of array size values stored in one of the second plurality of memory locations which is associated with one of the first plurality of memory locations in which is stored one of the plurality of array reference entries that matches the array access instruction identifier; (b) a first comparison element operatively coupled to the output section and configured to compare the maximum array size output value and the value of the location of the referenced element within the array and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the maximum array size output value; (c) a second comparison element operatively coupled to the output section, and configured to compare the minimum array size output value and the value of the location of the referenced element within the array and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the minimum array size output value; and (d) an exception element operatively coupled to the first and second comparison elements, and configured to provide an exception output signal in response to receipt of either the maximum violation signal or the minimum violation signal.
-
-
5. A method of verifying that a referenced element of an array is within a maximum array size boundary value and a minimum array size boundary value, the method comprising:
-
storing a plurality of array reference entries in a first memory section that includes a first plurality of memory locations, wherein each one of the first plurality of memory locations is configured to store one of the plurality of array reference entries, and further wherein each one of the plurality of array reference entries corresponds to one of a plurality of array access instructions; storing a plurality of array size values in a second memory section that includes a second plurality of memory locations, wherein each one of the second plurality of memory locations is configured to store one of the array size values and is associated with one of the first plurality of memory locations, and further wherein each one of the plurality of array size values is associated with one of the plurality of array access instructions and comprises a maximum array size value and a minimum array size value; simultaneously comparing an array access instruction identifier with at least a portion of each of the stored plurality of array reference entries, wherein the array access instruction identifier identifies an array access instruction; providing as an array size output value one of the plurality of array size values stored in one of the second plurality of memory locations which is associated with one of the first plurality of memory locations in which is stored one of the plurality of array reference entries that matches the array access instruction identifier wherein said array size output value includes said maximum array size value as a maximum array size output value, and said minimum array size value as a minimum array size output value; comparing the maximum array size output value and a value of a location of the referenced element within said array, and generating a maximum violation signal if the value of the location of the referenced element within said array is greater than the maximum array size output value; comparing the minimum array size output value and the value of the location of the referenced element within said array, and generating a minimum violation signal if the value of the location of the referenced element within said array is less than the minimum array size output value; and providing an exception output signal in response to generation of either the maximum violation signal or the minimum violation signal.
-
-
6. A method to verify that a referenced element of an array is within a maximum array size boundary value and a minimum array size boundary value, the method comprising:
-
providing an associative memory element configured to store and retrieve array size values which are associated with one of a plurality of array access instructions, each array access instruction referencing a value of a location of an element within the array; providing a first comparison element operatively coupled to an output section of the associative memory element, the first comparison element configured to compare a predetermined maximum array size value and the value of the location of the referenced element within the array, and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the predetermined maximum array size value; providing a second comparison element operatively coupled to the output section of the associative memory element, the second comparison element configured to compare a predetermined minimum array size value and the value of the location of the referenced element within the array, and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the predetermined minimum array size value; and providing an exception element operatively coupled to the first and second comparison elements, the exception element configured to provide an exception signal in response to receipt of either the maximum violation signal or the minimum violation signal. - View Dependent Claims (7)
-
-
8. A method of providing an array boundary checking apparatus configured to verify that a referenced element of an array is within a maximum array size boundary value and a minimum array size boundary value, the method comprising:
-
(a) providing an associative memory element configured to store and retrieve a plurality of array size values, wherein each one of the array size values is associated with one of a plurality of array access instructions, the associative memory element including; (i) a first memory section that includes a first plurality of memory locations configured to receive and store a plurality of array reference entries, wherein each one of the first plurality of memory locations is configured to store one of the plurality of array reference entries, and further wherein each one of the plurality of array reference entries corresponds to one of the plurality of array access instructions; (ii) a second memory section that includes a second plurality of memory locations configured to receive and store a plurality of array size values, wherein each one of the second plurality of memory locations is configured to store one of the array size values and is associated with one of the first plurality of memory locations, and further wherein each one of the plurality of array size values is associated with one of the plurality of array access instructions and comprises a maximum array size value and a minimum array size value; (iii) an input section operatively coupled to the first memory section, and configured to receive an array access instruction identifier and to simultaneously compare the array access instruction identifier with at least a portion of each of the stored plurality of array reference entries, wherein the array access instruction identifier identifies an array access instruction; and (iv) an output section operatively coupled to the second memory section, and configured to provide as an array size output value one of the plurality of array size values stored in one of the second plurality of memory locations which is associated with one of the first plurality of memory locations in which is stored one of the plurality of array reference entries that matches the array access instruction identifier wherein said array size output value includes said maximum array size value as a maximum array size output value, and said minimum array size value as a minimum array size output value; (b) providing a first comparison element operatively coupled to the output section, and configured to compare a value of a location of the referenced element within the array and the maximum array size output value and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the maximum array size output value; (c) providing a second comparison element operatively coupled to the output section, and configured to compare the value of the location of the referenced element within the array and the minimum array size output value and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the minimum array size boundary value; and (d) providing an exception element operatively coupled to the first, and second comparison elements and configured to provide an exception output signal in response to receipt of either the maximum violation signal or the minimum violation signal.
-
-
9. A computer system comprising:
-
a translation unit configured to receive and translate a software program and, in accordance with the software program, provide a plurality of translated instructions and a plurality of instruction identifiers, wherein each one of the instruction identifiers corresponds to one of the plurality of translated instructions, the plurality of translated instructions including a plurality of array access instructions; an execution unit configured to receive, in accordance with the plurality of instruction identifiers, the plurality of translated instructions, and, in accordance therewith, execute received translated instructions; an associative memory element configured to store and retrieve array size values which are associated with one of a plurality of array access instructions, each array access instruction referencing a value of a location of an element within the array; a first comparison element operatively coupled to an output section of the associative memory element, the first comparison element configured to compare a predetermined maximum array size value and the value of the location of the referenced element within the array, and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the predetermined maximum array size value; a second comparison element operatively coupled to the output section of the associative memory element, the second comparison element configured to compare a predetermined minimum array size value and the value of the location of the referenced element within the array and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the predetermined minimum array size value; and an exception element operatively coupled to the first and second comparison elements and the execution unit, the exception element configured to provide an exception signal to the execution unit in response to receipt of either the maximum violation signal or the minimum violation signal. - View Dependent Claims (10)
-
-
11. A computer system comprising:
-
a translation unit configured to receive and translate a software program and, in accordance with the software program, provide a plurality of translated instructions and a plurality of instruction identifiers, wherein each one of the instruction identifiers corresponds to one of the plurality of translated instructions, the plurality of translated instructions including a plurality of array access instructions; an execution unit configured to receive, in accordance with the plurality of instruction identifiers, the plurality of translated instructions, and, in accordance therewith, execute received translated instructions; and an associative memory element configured to store and retrieve a plurality of array size values, wherein each one of the array size values is associated with one of a plurality of array access instructions, the associative memory element including; (i) a first memory section that includes a first plurality of memory locations configured to receive and store a plurality of array reference entries, wherein each one of the first plurality of memory locations is configured to store one of the plurality of array reference entries, and further wherein each one of the plurality of array reference entries corresponds to one of the plurality of array access instructions; (ii) a second memory section that includes a second plurality of memory locations configured to receive and store a plurality of array size values, wherein each one of the second plurality of memory locations is configured to store one of the array size values and is associated with one of the first plurality of memory locations, and further wherein each one of the plurality of array size values is associated with one of the plurality of array access instructions and comprises a maximum array size value and a minimum array size value; (iii) an input section operatively coupled to the first memory section, and configured to receive an array access instruction identifier and to simultaneously compare the array access instruction identifier with at least a portion of each of the stored plurality array reference entries, wherein the array access instruction identifier identifies an array access instruction; and (iv) an output section operatively coupled to the second memory section and configured to provide, as an array size output value, one of the plurality of array size values stored in one of the second plurality of memory locations which is associated with one of the first plurality of memory locations in which is stored one of the plurality of array reference entries that matches the array access instruction identifier; a first comparison element operatively coupled to the output section of the associative memory element, and configured to compare a value of a location of the referenced element within the array and the maximum array size output value and to provide a maximum violation signal if the value of the location of the referenced element within the array is greater than the maximum array size output value; a second comparison element operatively coupled to the output section of the associative memory element, and configured to compare the value of the location of the referenced element within the array and the minimum array size output value and to provide a minimum violation signal if the value of the location of the referenced element within the array is less than the minimum array size output value; and an exception element operatively coupled to the first and second comparison elements and the execution unit, configured to provide an exception output signal to the execution unit in response to receipt of either the maximum violation signal or the minimum violation signal, wherein the execution unit is configured to respond to the exception output signal by executing a sequence of translated instructions that define an array access boundary exception subroutine.
-
Specification