Arithmetic unit
AssigneeSGS-Thomson Microelectronics S.A.
InventorNathan M. Sidwell
Life of this patent
Estimating the term…
Abstract
There is disclosed an arithmetic unit which allows a combined multiply-add operation to be carried out in response to execution of a single computer instruction. This is particularly useful in a packed arithmetic environment, when a operand comprises a plurality of packed objects and the intention is to carry out the same arithmetic operation on respective pairs of objects in different operands. There is also provided a computer and a method of operating a computer to effect the combined multiply-add operation.
Claims13
An arithmetic unit for executing an instruction to multiply together pairs of objects from two sets of objects and to add together the resulting products, at least one set of said objects being represented by sub-strings forming a data string being a packed operand, the arithmetic unit comprising:
- input buffer constructed and arranged to hold said set of objects forming said packed operand;
- a plurality of multiplication circuits constructed and arranged to multiply together the respective pairs of objects, each said multiplication circuit including a pair of inputs for receiving the respective objects and including an output;
- addition circuitry connected to receive the outputs of the multiplication circuits and constructed and arranged to add together the resulting products of multiplication of the respective pairs of objects to generate a result;
- and
- an output buffer constructed and arranged to hold the result.
A computer comprising a processor, memory and data storage circuitry for holding data strings, wherein said processor comprises an arithmetic unit including
- an input buffer constructed and arranged to hold two sets of objects, wherein at least one set of objects is represented by sub-strings of a data string forming said packed operand;
- a plurality of multiplication circuits constructed and arranged to multiply simultaneously together respective pairs of objects from said two sets of objects, each said multiplication circuit including a pair of inputs for receiving said respective objects and including an output;
- addition circuitry connected to receive the outputs of the multiplication circuits and constructed and arranged to add together the resulting products of multiplication of the respective of objects to generate a result;
- and
- an output buffer constructed and arranged to hold the result, and wherein there is stored in said memory a sequence of instructions comprising at least an instruction to multiply together said pairs of objects from said two sets of objects and to add together the resulting products, said instruction being executed by the arithmetic unit.
A method of operating a computer to multiply together a vector and a matrix wherein the vector is represented by a vector data string comprising a plurality of sub-strings defining vector elements, the vector elements being objects arranged to form a packed operand, and wherein the matrix is represented by a set of matrix data strings each comprising a plurality of sub-strings defining matrix elements, the matrix elements being objects arranged to form packed operands, the method comprising selecting each of said matrix data strings in turn and executing for each selected data string a single instruction which:
- loads the selected data string in form of packed source objects into an input buffer of an arithmetic unit;
- loads said vector data string in form of packed source objects into said input buffer;
- simultaneously multiplies respective pairs of vector elements and matrix elements of said data strings to generate respective products;
- add together said products;
- and
- generates a result.
A method of executing an instruction for multiplying together pairs of objects from two sets of objects and adding together the resulting products, said method including:
- providing two sets of objects to an input buffer, wherein at least one said set of objects being represented by sub-strings forming a data string in form of a packed operand;
- supplying said objects to a plurality of multiplication circuits for multiplying together respective pairs of said objects from said two sets, each said multiplication circuit receiving the respective objects defined by said sub-strings at a pair of inputs and providing an output;
- receiving the outputs of the multiplication circuits by addition circuitry for summing together the multiplication outputs to generate a result;
- and
- holding in an output buffer the result.
Dependencies are inferred from the claim text.