System, method, and apparatus for realizing quicker access of an element in a data structure
AssigneeVIA Technologies, Inc.
InventorCharles Shelor
Life of this patent
Estimating the term…
Abstract
This disclosure generally relates to a processor configured to access an element in a data structure. The processor includes an element in a data structure having an array, an index, and a base address. A fractional shifter is also included and is configured to shift the index value up to three bit places, and output a byte offset. An adder is configured to add the byte offset with the base address and output a final address. Further included is a general purpose shifter that is configured to rotate left and right, and shift left and right. A selector is configured to select either the final address or an output signal from the general purpose shifter.
Claims17
A circuit configured to access art element in a data structure, comprising:
- a first shifter configured to receive a first shifter input and a first shift amount, the first shifter further configured to shift the first shifter input according to the first shift amount to generate a shifted value, the first shifter further configured to communicate the shifted value;
- a second shifter configured to receive a second shifter input and a second shift amount, the second shifter further configured to shift the second shifter input according to the second shift amount, the second shifter further configured to communicate a base offset;
- an adder coupled to the second shifter, the adder configured to receive the base offset from the second shifter and a base address, the adder further configured to communicate a final address;
- and
- a multiplexor configured to receive the final address from the adder, the multiplexor further configured to select the final address if a data structure is being accessed and the shifted value if a data structure is not being accessed,
- wherein the first shifter is configured to shift the first shifter input a first number of bit places up to a first maximum amount,
- wherein the second shifter is configured to shift the second shifter input a second number of bit places up to a second maximum amount, and
- wherein the first maximum amount is less than the second maximum amount.
A method for accessing an element in a data structure comprising:
- receiving an array with at least one index value;
- receiving a base address;
- shifting a first index value from the array with at least one index value with a fractional shifting logic, wherein the fractional shifting logic is configured to shift logically left, wherein the fractional shifting logic is configured to shift the first index value a first number of bit places up to a first maximum amount, and wherein the fractional shifting logic is further configured to communicate a base offset;
- producing a final address by adding the base offset and the base address at an adding logic;
- receiving a second index value from the array with the at least one index value at a general purpose shifting logic, the general purpose shifting logic being configured to shift the second index value a second number of bit places up to a second maximum amount, and wherein the general purpose shifting logic is further configured to communicate a shifted index value;
- and
- selecting the final address from the adding logic if a data structure is being accessed, and selecting the shifted index value from the general purpose shifting logic if a data structure is not being accessed,
- wherein the first maximum amount is less than the second maximum amount.
A system for accessing an element in a data structure, comprising:
- an array with at least one index value;
- a base address;
- a fractional shifting component configured to produce a first byte address by shifting a first index value from the array, the fractional shifting component configured to shift the first index value a first number of bit places up to a first maximum amount;
- a general purpose shifting component configured to produce a second byte address by shifting a second index value from the array, the general purpose shifting component configured to shift the second index value a second number of bit places up to a second maximum amount;
- and
- an adding component configured to produce a final address by adding the base address and the first byte address,
- wherein the first maximum amount is less than the second maximum amount.
A computer readable storage medium for accessing an element in a data structure comprising:
- first logic receiving an array with at least two index values;
- second logic receiving a base address;
- third logic shifting a first index value of the at least two index values with fractional shifting logic, wherein the fractional shifting logic is configured to shift logically left, wherein the fractional shifting logic is configured to shift the first index value a first number of bit places up to a first maximum amount, wherein the fractional shifting logic is further configured to communicate a base offset;
- fourth logic producing a final address by adding the base offset and the base address;
- fifth logic shifting a second index value of the at least two index values with a general purpose shifting logic, wherein the general purpose shifting logic is configured to shift logically left, wherein the general purpose shifting logic is configured to shift the second index a second number of bit places up to a second maximum amount;
- and
- sixth logic selecting the final address from the fourth logic if a data structure is being accessed, and from the general purpose shifting logic if a data structure is not being accessed;
- wherein the fractional shifting logic is configured to a subset of operations that the general purpose shifting logic is configured to perform,
- wherein the first maximum amount is less than the second maximum amount.
Dependencies are inferred from the claim text.