Vector bitwise rotations
AssigneeImagination Technologies Limited
InventorPeter Vrabel
Life of this patent
Estimating the term…
Abstract
A computer-implemented method for performing a vector bitwise rotation, wherein a processing system comprises a byte-wise anything-to-anything mux and one or more bitwise right shifters, wherein the byte-wise anything-to-anything mux includes a plurality of byte-sized inputs and a plurality of byte-sized outputs, each input being associated with a respective input position and each output being associated with a respective output position. A combination of a byte-wise anything-to-anything mux and one or more bitwise shifts is used to perform vector bitwise rotations, with even and odd elements of the vector operated on separately.
Claims20
A computer-implemented method for performing a vector bitwise rotation, wherein a processing system comprises a byte-wise anything-to-anything mux and one or more bitwise right shifters, wherein the byte-wise anything-to-anything mux comprises a plurality of byte-sized inputs and a plurality of byte-sized outputs, each input being associated with a respective input position and each output being associated with a respective output position, wherein the method comprises processing an instruction to perform a vector bitwise rotation on a vector of elements, each element comprising one or more bytes of data and being associated with a respective even or odd index, wherein the respective index alternates between even and odd for successive elements of the vector, starting with an even index for an initial element of the vector, wherein the instruction specifies a respective rotation distance to be applied to each respective element, and wherein processing the instruction comprises:
- inputting the one or more respective bytes of each element to a respective input of the mux;
- for each element associated with a respective even index, copying each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, duplicating a right-most byte of the one or more copied bytes of the element at a respective next available output position to the left or, if a respective output position to the left is unavailable, at a respective available right-most position, and generating a shifted element by applying a respective bitwise shift to the one or more copied bytes using the duplicated right-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- for each element associated with a respective odd index, copying each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, duplicating a right-most byte of the one or more copied bytes of the element to a respective next available output position to the left or, if a respective output position to the left is unavailable, at a respective available right-most output position, and generating a shifted element by applying a respective bitwise shift to the one or more copied bytes using the duplicated right-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- outputting a resulting sequence of elements using each of the shifted elements.
A computer-implemented method for performing a vector bitwise rotation, wherein a processing system comprises a byte-wise anything-to-anything mux and one or more bitwise left shifters, wherein the byte-wise anything-to-anything mux comprises a plurality of byte-sized inputs and a plurality of byte-sized outputs, each input being associated with a respective input position and each output being associated with a respective output position, wherein the method comprises processing an instruction to perform a vector bitwise rotation on a vector of elements, each element comprising one or more bytes of data and being associated with a respective even or odd index, wherein the respective index alternates between even and odd for successive elements of the vector, starting with an even index for an initial element of the vector, wherein the instruction specifies a respective rotation distance to be applied to each respective element, and wherein processing the instruction comprises:
- inputting the one or more respective bytes of each element to a respective input of the mux;
- for each element associated with a respective even index, copying each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, duplicating a left-most byte of the one or more copied bytes of the element at a respective next available output position to the right, if a respective output position to the right is unavailable, at a respective available left-most output position, and generating a shifted element by applying a respective bitwise shift to the one or more copied bytes using the duplicated left-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- for each element associated with a respective odd index, copying each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, duplicating a left-most byte of the one or more copied bytes of the element at a respective next available output position to the right or, if a respective output position to the right is unavailable, at a respective available left-most output position, and generating a shifted element by applying a respective bitwise shift to the one or more copied bytes using the duplicated left-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- outputting a resulting sequence of elements using each of the shifted elements.
A processing system for performing a vector bitwise rotation, wherein the processing system comprises a byte-wise anything-to-anything mux and one or more bitwise right shifters, wherein the byte-wise anything-to-anything mux comprises a plurality of byte-sized inputs and a plurality of byte-sized outputs, each input being associated with a respective input position and each output being associated with a respective output position, and wherein:
- the processing system is configured to process an instruction to perform a vector bitwise rotation on a vector of elements, each element comprising one or more bytes of data and being associated with a respective even or odd index, wherein the respective index alternates between even and odd for successive elements of the vector, starting with an even index for an initial element of the vector, wherein the instruction specifies a respective rotation distance to be applied to each respective element;
- the processing system is configured to input the one or more respective bytes of each element to a respective input of the mux;
- for each element associated with a respective even index:
- the mux is configured to copy each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, and duplicate a right-most byte of the copied bytes to a respective next available output position to the left or, if a respective output position to the left is unavailable, at a respective available right-most position, and
- each bitwise shifter is configured to generate a shifted element by applying a respective bitwise shift to the copied bytes using the duplicated right-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- for each element associated with a respective odd index:
- the mux is configured to copy each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, and duplicate a right-most byte of the copied bytes to a respective next available output position to the left or, if a respective output position to the left is unavailable, at a respective available right-most position, and
- each bitwise shifter is configured to generate a shifted element by applying a respective bitwise shift to the copied bytes using the duplicated right-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- wherein the processing system is configured to output a resulting sequence of elements using each of the shifted elements.
A processing system for performing a vector bitwise rotation, wherein the processing system comprises a byte-wise anything-to-anything mux and one or more bitwise left shifters, wherein the byte-wise anything-to-anything mux comprises a plurality of byte-sized inputs and a plurality of byte-sized outputs, each input being associated with a respective input position and each output being associated with a respective output position, and wherein:
- the processing system is configured to process an instruction to perform a vector bitwise rotation on a vector of elements, each element comprising one or more bytes of data and being associated with a respective even or odd index, wherein the respective index alternates between even and odd for successive elements of the vector, starting with an even index for an initial element of the vector, wherein the instruction specifies a respective rotation distance to be applied to each respective element;
- the processing system is configured to input the one or more respective bytes of each element to a respective input of the mux;
- for each element associated with a respective even index:
- the mux is configured to copy each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, and duplicate a left-most byte of the one or more copied bytes of the element at a respective next available output position to the right or, if a respective output to the right is unavailable, at a respective available left-most output position, and
- each bitwise shifter is configured to generate a shifted element by applying a respective bitwise shift to the copied bytes using the duplicated left-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- for each element associated with a respective odd index:
- the mux is configured to copy each of the one or more respective bytes of the element to a respective output of the mux based on the respective rotation distance, and duplicate a left-most byte of the one or more copied bytes of the element at a respective next available output position to the right or, if a respective output position to the right is unavailable, at a respective available left-most output position, and
- each bitwise shifter is configured to generate a shifted element by applying a respective bitwise shift to the copied bytes using the duplicated left-most byte, wherein the respective bitwise shift is based on the respective rotation distance;
- and
- wherein the processing system is configured to output a resulting sequence of elements using each of the shifted elements.
Dependencies are inferred from the claim text.