Method, apparatus and system forming the sum of data in plural equal sections of a single data word
First Claim
1. A method for forming a sum of data in 2N equal sections of a single data word comprising the steps of for each M from 1 to N:
- forming an Mth mask having bits of a first digital state filling M odd alternate sections and bits of a second digital state filling M even alternate sections, said second digital state being opposite to said first digital state;
masking a prior sum data word by a first mask thereby forming a prior sum masked data word, the prior sum data word for M=1 being the single data word;
rotating the prior sum data word by M sections;
masking the rotated prior sum data word by the Mth mask thereby forming a rotated prior sum masked data word;
summing the prior sum masked data word and the rotated prior sum masked data word thereby forming a sum data word, a last sum data word being the sum of data in 2N equal sections of the single data word; and
said steps of masking the prior sum data word, rotating the prior sum data word, masking the rotated prior sum data word and summing the prior sum masked data word and the rotated prior sum masked data word occur during a single data processor pipeline stage for each M in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the prior sum data word, a second input receiving the rotated prior sum data word, a third input receiving the Mth mask and an output generating the summed prior sum masked data word and rotated prior sum masked data word.
0 Assignments
0 Petitions
Accused Products
Abstract
This invention is a technique for summing plural sections of a single data word. The technique uses a repeated process forming larger and larger partial sums. Initially the single data word is rotated one section. The original single data word and the rotated single data word are masked with a mask having "1'"'"'s" and "0'"'"'s" in alternate sections. The mask blocks alternate sections so that adjacent sections of the original data word may be summed on a whole data word basis without any overflow disrupting the partial products. The two masked data words are then summed. This sum results in half as many partial sums as before. Each of these larger partial sums now occupies two original sections of the data word. The process can be repeated for these large partial sums. In the preferred embodiment this technique is used with an arithmetic logic unit (230) capable of forming mixed arithmetic and Boolean combinations of three inputs having a barrel rotator (235) driving one input. The arithmetic logic unit (230) receives the single data word at a first input (241) and the rotated single data word at a second input (241). The mask supplies the third input (243). The arithmetic logic unit (230) then forms the combination (A&C)+(B&C), which is field addition of A and B as masked by C. With proper selection of the mask and the rotate amount, the three input arithmetic logic unit (230) forms the shift, mask and addition in a single cycle.
42 Citations
44 Claims
-
1. A method for forming a sum of data in 2N equal sections of a single data word comprising the steps of for each M from 1 to N:
-
forming an Mth mask having bits of a first digital state filling M odd alternate sections and bits of a second digital state filling M even alternate sections, said second digital state being opposite to said first digital state; masking a prior sum data word by a first mask thereby forming a prior sum masked data word, the prior sum data word for M=1 being the single data word; rotating the prior sum data word by M sections; masking the rotated prior sum data word by the Mth mask thereby forming a rotated prior sum masked data word; summing the prior sum masked data word and the rotated prior sum masked data word thereby forming a sum data word, a last sum data word being the sum of data in 2N equal sections of the single data word; and said steps of masking the prior sum data word, rotating the prior sum data word, masking the rotated prior sum data word and summing the prior sum masked data word and the rotated prior sum masked data word occur during a single data processor pipeline stage for each M in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the prior sum data word, a second input receiving the rotated prior sum data word, a third input receiving the Mth mask and an output generating the summed prior sum masked data word and rotated prior sum masked data word. - View Dependent Claims (2, 3, 4)
-
-
5. A method for forming a sum of data in plural equal sections of a single data word comprising the steps of repeatedly:
-
forming a mask having bits of a first digital state filling odd alternate portions and bits of a second digital state filling even alternate portions, said second digital state being opposite to said first digital state, said portion initially having a size equal to a section; masking a prior sum data word by the mask thereby forming a masked prior sum data word, the single data word being a first prior sum data word; rotating the prior sum data word by one portion; masking the rotated prior sum data word by the mask thereby forming a masked rotated prior sum data word; summing the masked prior sum data word and the masked rotated prior sum data word, thereby forming a sum data word; said steps of masking the prior sum data word, rotating the prior sum data word, masking the rotated prior sum data word and summing the prior sum masked data word and the rotated prior sum masked data word occur during a single data processor pipeline stage for each repetition in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the prior sum data word, a second input receiving the rotated prior sum data word, a third input receiving the mask and an output generating the sum of the prior sum masked data word and the rotated prior sum masked data word; and doubling said size of each of said portions for a next repetition, until all sections are summed. - View Dependent Claims (6, 7, 8)
-
-
9. A method for forming a sum of data in four equal sections of a single data word comprising the steps of:
-
forming a first mask having "1'"'"'s" filling a first and a third section and "0'"'"'s" filling a second and a fourth section; masking the single data word by the first mask thereby forming a first masked data word; rotating the single data word by one section; masking the rotated single data word by the first mask thereby forming a second masked data word; summing the first masked data word and the second masked data word thereby forming a first sum data word; said steps of masking the single data word, rotating the single data word, masking the rotated single data word and summing the first masked data word and the second masked data word occurs during a single data processor pipeline stage in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the single data word, a second input receiving a the rotated single data word, a third input receiving the first mask, and an output generating the sum; forming a second mask having "1'"'"'s" filling the first and second sections and "0'"'"'s" filling the third and fourth sections; masking the first sum data word by the second mask thereby forming a third masked data word; rotating the first sum data word by two sections; masking the rotated first sum data word by the second mask thereby forming a fourth masked data word; summing the third masked data word and the fourth masked data word thereby forming a resultant data word; and said steps of masking the first sum data word, rotating the first sum data word, masking the rotated first sum data word and summing the third masked data word and the fourth masked data word occur during a single data processor pipeline stage in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the first sum data word, a second input receiving the rotated first sum data word, a third input receiving the second mask, and an output generating the sum. - View Dependent Claims (10)
-
-
11. A data processing apparatus forming a sum of data in plural equal sections of a single data word comprising:
-
a three input arithmetic logic unit having first, second and third signal inputs, a function input and an output; a barrel rotator having a data input, a rotate control input receiving a rotate control signal, and a data output connected to said second signal input of the arithmetic logic unit, said barrel rotator left rotating data supplied to said data input an amount corresponding to said rotate control signal and supplying left rotated data to said second signal input of said arithmetic logic unit; a data register file including a plurality of data registers for storing data, said single data word initially stored in a first predetermined data register of said plurality of data registers, a first output bus connected to said first signal input of said arithmetic logic unit for recalling from a first instruction specified data register selected from among all of said plurality of data registers the data stored therein, a second output bus connected to said data input of said barrel rotator for recalling from a second instruction specified data register selected from among all of said plurality of data registers the data stored therein, a first input bus connected to said output of said arithmetic logic unit for storing in a third instruction specified data register selected from among all of said plurality of data registers said output of said arithmetic logic unit; an instruction decoder responsive to a stream of instructions and connected to said plurality of data registers, said arithmetic logic unit and said barrel rotator, said instruction decoder responsive to a first instruction in which said first, second and third instruction specified data registers are identical and equal to said first predetermined data register storing said single data word to supply data stored in said first predetermined data register to said first signal input of said arithmetic logic unit and to said data input of said barrel rotator, supply a corresponding mask to said third signal input of said arithmetic logic unit, supply a rotate amount to said rotate control input of said barrel rotator, control said arithmetic logic unit to perform addition of data received at said first and second signal inputs as masked by said corresponding mask received at said third signal input, and store an output of said arithmetic logic unit in said first instruction specified data register; whereby repeated receipt of said first instruction together with corresponding masks and rotate amounts sums larger and larger number of sections of the single data word. - View Dependent Claims (12, 13)
-
-
14. A data processing apparatus forming a sum of data in four equal sections of a single data word comprising:
-
a three input arithmetic logic unit having first, second and third signal inputs, a function input and an output; a barrel rotator having a data input, a rotate control input receiving a rotate control signal, and a data output connected to said second signal input of the arithmetic logic unit, said barrel rotator left rotating data supplied to said data input an amount corresponding to said rotate control signal and supplying left rotated data to said second signal input of said arithmetic logic unit; a data register file including a plurality of data registers for storing data, said single data word initially stored in a first predetermined data register of said plurality of data registers, a first output bus connected to said first signal input of said arithmetic logic unit for recalling from a first instruction specified data register selected from among all of said plurality of data registers the data stored therein, a second output bus connected to said data input of said barrel rotator for recalling from a second instruction specified data register selected from among all of said plurality of data registers the data stored therein, a third output bus for recalling from a third instruction specified data register selected from among all of said plurality of data registers the data stored therein, a first input bus connected to said output of said arithmetic logic unit for storing in a fourth instruction specified data register selected from among all of said plurality of data registers said output of said arithmetic logic unit; an instruction decoder responsive to a stream of instructions and connected to said plurality of data registers, said arithmetic logic unit and said barrel rotator, said instruction decoder responsive to a first instruction in which said first, second and fourth instruction specified data registers are identical and correspond to said first predetermined data register to supply data stored in said first predetermined data register to said first signal input of said arithmetic logic unit and to said data input of said barrel rotator, supply a first mask having "1'"'"'s" filling a first and a third section and "0'"'"'s" filling a second and a fourth section to said third signal input of said arithmetic logic unit, supply a first rotate amount corresponding to one section of said single data word to said rotate control input of said barrel rotator, control said arithmetic logic unit to perform addition of data received at said first and second signal inputs as masked by said first mask received at said third signal input, and store an output of said arithmetic logic unit in said first predetermined data register, said instruction decoder responsive to a second instruction in which said first, second and fourth instruction specified data registers are identical and correspond to said first predetermined data register to supply from said first predetermined data register to said first signal input of said arithmetic logic unit and to said data input of said barrel rotator, supply a second mask having "1'"'"'s" filling said first and second sections and "0'"'"'s" filling said third and fourth sections to said third signal input of said arithmetic logic unit, supply a rotate amount corresponding to two sections of said single data word to said rotate control input of said barrel rotator, control said arithmetic logic unit to perform addition of data received at said first and second signal inputs as masked by said second mask received at said third signal input, and store said output of said arithmetic logic unit in said first predetermined data register. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
-
21. An data processing system forming a sum of data in four equal sections of a single data word comprising:
-
an data system bus transferring data and addresses; a system memory connected to said data system bus, said system memory storing data and transferring data via said data system bus; an data processor circuit connected to said data system bus, said data processor circuit including a three input arithmetic logic unit having first, second and third signal inputs, a function input and an output; a barrel rotator having a data input, a rotate control input receiving a rotate control signal, and a data output connected to said second signal input of the arithmetic logic unit, said barrel rotator left rotating data supplied to said data input an amount corresponding to said rotate control signal and supplying left rotated data to said second signal input of said arithmetic logic unit; a data register file including a plurality of data registers for storing data, said single data word initially stored in a first predetermined data register of said plurality of data registers, a first output bus connected to said first signal input of said arithmetic logic unit for recalling from a first instruction specified data register selected from among all of said plurality of data registers the data stored therein, a second output bus connected to said data input of said barrel rotator for recalling from a second instruction specified data register selected from among all of said plurality of data registers the data stored therein, a third output bus for recalling from a third instruction specified data register selected from among all of said plurality of data registers the data stored therein, a first input bus connected to said output of said arithmetic logic unit for storing in a fourth instruction specified data register selected from among all of said plurality of data registers said output of said arithmetic logic unit; an instruction decoder responsive to a stream of instructions and connected to said plurality of data registers, said arithmetic logic unit and said barrel rotator, said instruction decoder responsive to a first instruction in which said first, second and fourth instruction specified data registers are identical and correspond to said first predetermined data register to supply data stored in said first predetermined data register to said first signal input of said arithmetic logic unit and to said data input of said barrel rotator, supply a first mask having "1'"'"'s" filling a first and a third section and "0'"'"'s" filling a second and a fourth section to said third signal input of said arithmetic logic unit, supply a first rotate amount corresponding to one section of said single data word to said rotate control input of said barrel rotator, control said arithmetic logic unit to perform addition of data received at said first and second signal inputs as masked by said first mask received at said third signal input, and store an output of said arithmetic logic unit in said first predetermined data register, said instruction decoder responsive to a second instruction in which said first, second and fourth instruction specified data registers are identical and correspond to said first predetermined data register to supply data in said first predetermined data register to said first signal input of said arithmetic logic unit and to said data input of said barrel rotator, supply a second mask having "1'"'"'s" filling said first and second sections and "0'"'"'s" filling said third and fourth sections to said third signal input of said arithmetic logic unit, supply a second rotate amount corresponding to two sections of said single data word to said rotate control input of said barrel rotator, control said arithmetic logic unit to perform addition of data received at said first and second signal inputs as masked by said second mask received at said third signal input, and store said output of said arithmetic logic unit in said first predetermined data register. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40)
-
-
41. A method for forming a summation comprising the steps of:
-
forming a plurality of partial sums in plural equal sections of a single data word employing an arithmetic logic unit selectively dividable into said plural equal sections; and forming a sum of said plurality of partial sums in said sections of said data word by repeatedly forming a mask having bits of a first digital state filling odd alternate portions and bits of a second digital state filling even alternate portions, said second digital state being opposite to said first digital state, said portion initially having a size equal to a section; masking a prior sum data word by the mask thereby forming a masked prior sum data word, the single data word being a first prior sum data word; rotating the prior sum data word by one portion; masking the rotated prior sum data word by the mask thereby forming a masked rotated prior sum data word; summing the masked prior sum data word and the masked rotated prior sum data word, thereby forming a sum data word; and said steps of masking the prior sum data word, rotating the prior sum data word, masking the rotated prior sum data word and summing the prior sum masked data word and the rotated prior sum masked data word occur during a single data processor pipeline stage for each repetition in a three input arithmetic logic unit, said three input arithmetic logic unit having a first input receiving the prior sum data word, a second input receiving the rotated prior sum data word, a third input receiving the Mth mask and an output generating the summed prior sum masked data word and rotated prior sum masked data word; doubling said size of each of said portions for a next repetition, until all sections are summed. - View Dependent Claims (42, 43, 44)
-
Specification