Method and apparatus for addressing a vector of elements in a partitioned memory using stride, skip and span values
First Claim
1. A system for addressing a vector of elements in a memory having a plurality of partitions, the system comprising:
- a first storage element for storing a STRIDE value denoting the separation between elements of the vector of elements within each partition of the plurality of partitions;
a second storage element for storing a SKIP value related to the separation between the last element of the vector of elements in one partition of the plurality of partitions and the first element of the vector of elements in the next partition of the plurality of partitions;
a third storage element for storing a SPAN value denoting the number of elements the vector of elements within each partition of the plurality of partitions; and
an arithmetic unit coupled to the first, second and third storage elements and operable to calculate the address in the memory of a next element of the vector of elements from the address of a current element, the calculation comprising adding a multiple of the SKIP value to the address of the current element if the next element is in a different partition to the current element and adding a multiple of the STRIDE value to the address of the current element if the next element is in the same partition as the current element.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for calculating memory addresses in a partitioned memory in a processing system having a processing unit, input and output units, a program sequencer and an external interface. An address calculator includes a set of storage elements, such as registers, and an arithmetic unit for calculating a memory address of a vector element dependent upon values stored in the storage elements and the address of a previous vector element. The storage elements hold STRIDE, SKIP and SPAN values and optionally a TYPE value, relating to the spacing between elements in the same partition, the spacing between elements in the consecutive partitions, the number of elements in a partition and the size of a vector element, respectively.
-
Citations
25 Claims
-
1. A system for addressing a vector of elements in a memory having a plurality of partitions, the system comprising:
-
a first storage element for storing a STRIDE value denoting the separation between elements of the vector of elements within each partition of the plurality of partitions; a second storage element for storing a SKIP value related to the separation between the last element of the vector of elements in one partition of the plurality of partitions and the first element of the vector of elements in the next partition of the plurality of partitions; a third storage element for storing a SPAN value denoting the number of elements the vector of elements within each partition of the plurality of partitions; and an arithmetic unit coupled to the first, second and third storage elements and operable to calculate the address in the memory of a next element of the vector of elements from the address of a current element, the calculation comprising adding a multiple of the SKIP value to the address of the current element if the next element is in a different partition to the current element and adding a multiple of the STRIDE value to the address of the current element if the next element is in the same partition as the current element. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for addressing a vector of elements in a memory having a plurality of partitions, the system comprising:
-
a first storage element for storing a STRIDE value denoting the separation between elements of the vector of elements within each partition of the plurality of partitions; a second storage element for storing a SKIP value related to the separation between the last element of the vector of elements in one partition of the plurality of partitions and the first element of the vector of elements in the next partition of the plurality of partitions; a third storage element for storing a SPAN value denoting the number of elements the vector of elements within each partition of the plurality of partitions; and an arithmetic unit coupled to the first, second and third storage elements and operable to calculate the address in the memory of a next element of the vector of elements dependent upon the values stored in the first, second and third storage elements and the address of a current element, wherein the plurality of partitions includes first level partitions and second level partitions and the arithmetic unit includes; a fourth storage element for storing a SKIP2 value related to the separation between the last element of the vector of elements in a first level partition and the first element of the vector of elements in a second level partition; a fifth storage element for storing a SPAN2 value denoting the number of vectors in each second level partition; a first counter for counting a LEFT value indicative of the number of elements remaining in a current first level memory partition; a second counter for counting a LEFT2 value indicative of the number of elements remaining in a current second level memory partition; and a third counter for counting a COUNT value indicative of the total number of elements still to be accessed.
-
-
11. A processing system operable to access a partitioned memory, the processing system comprising:
-
a processing unit having a plurality of functional elements; an external interface; an input unit coupled to the processing unit and the external interface and operable to retrieve a vector of elements from the memory via the external interface and pass them to the processing unit, the input unit having a set of input storage elements for storing STRIDE, SKIP and SPAN values and an input arithmetic unit operable to calculate the address in the memory of a next element of the vector of elements dependent upon the STRIDE, SKIP and SPAN values and the address of a current element; an output unit coupled to the processing unit and the external interface and operable to retrieve a result value from the processing unit and pass it to the external interface; and a program sequencer coupled to and operable to control the processing unit, the input unit and the output unit; wherein the STRIDE value denotes the separation between elements of the vector of elements within each partition of the partitioned memory, the SPAN value denotes the number of elements the vector of elements within each partition of the plurality of partitions, and the SKIP value denotes the separation between the last element of the vector of elements in one partition of the partitioned memory and the first element of the vector of elements in the next partition of the partitioned memory and wherein the input arithmetic unit is operable to calculate the address the next element of the vector of elements from the address of a current element by adding a multiple of the SKIP value to the address of the current element if the next element is in a different partition to the current element and adding a multiple of the STRIDE value to the address of the current element if the next element is in the same partition as the current element. - View Dependent Claims (12, 13, 14)
-
-
15. A method for accessing a vector of elements in a memory having a plurality of partitions, comprising:
-
accessing the memory at an element address in a partition; stepping a first counter; and if a second counter indicates that at least one vector element remains in the partition; incrementing the element address by a first amount; and stepping the second counter; otherwise; incrementing the element address by a second amount; and resetting the second counter to indicate the number of elements of the vector of elements in a partition. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A method for accessing a vector of elements in a memory having a plurality of first and second level partitions, comprising:
-
accessing the memory at an element address in a first level and second level partition of the plurality of first and second level partitions; stepping a first counter; incrementing the element address by a first amount; and if a second counter indicates that at least one vector element remains in the first level partition; stepping the second counter; otherwise; incrementing the element address by a second amount; resetting the second counter to indicate the number of elements of the vector of elements in the next first level partition; and if a third counter indicates that at least one vector element remains in the second level partition; stepping the third counter; otherwise; incrementing the element address by a third amount; resetting the third counter to indicate the number of elements of the vector of elements in the next second level partition.
-
Specification