System and method for rearranging bits of a data word in accordance with a mask using sorting
AssigneeSun Microsystems, Inc.
InventorsGuy L. Steele, Jr., Peter Lawrence
Life of this patent
Estimating the term…
Abstract
A system is disclosed for rearranging data units of a data word in accordance with a mask word, the mask word having a plurality of mask bits each associated with a data unit, each mask bit having one of a set condition and a clear condition. The system includes an array of interconnected swap modules organized in a series of swap stages, each swap module having two inputs and two outputs. Each swap module is configured to receive at each input a data unit and associated mask bits and couple the data units to the respective outputs in relation to the associated mask bit's condition.
Claims4
For producing an electrical output signal representing an array-output data word in response to electrical input signals representing an array-input data word and an array-input mask word, where each of the data words comprises N data units in respective data-unit positions Dn and the mask word comprises N mask bits in respective mask-bit positions Bn, where n=0, 1, 2, . . . , N−1, by rearranging the data units of the array input data word in accordance with the bits of the array-input mask word, a centrifuge circuit comprising an array of interconnected swap modules wherein:
- A) the swap modules are organized in a series of M swap stages Sm, where m=0, 1, 2, . . . , M−1;
- B) each of the swap stages is associated with a respective stage-input data word and a respective stage-output data word, each of which comprises N data units in respective data-unit positions Dn, where n=0, 1, 2, . . . , N−1, and with a stage-input mask word that comprises mask bits in respective mask-bit positions Bn, where n=0, 1, 2, . . . , N−1;
- C) the stage-input data and mask words associated with stage S0 are the array-input data and mask words,
- D) at least each of the swap stages Sm such that m<M−1 is associated with a respective stage-output mask word that comprises mask bits in respective mask-bit positions Bn, where n=0, 1, 2, . . . , N−1;
- E) the stage-output data and mask words associated with each swap stage Sm such that m<M−1 are the stage-input data and mask words, respectively, associated with the respective swap stage Sm+1;
- F) the stage-output data word associated with swap stage SM−1 is the array output data word;
- G) each swap stage is associated with a respective plurality of non-overlapping pairs of integers n and n+1, with each of which a different one of the swap modules in that stage is associated, and each of those swap modules receives the mask bits in mask-bit positions Mn and Mn+1 of the stage-input data word associated with that swap stage, where n and n+1 are the pair of integers associated with that swap module;
- H) in at least each swap stage but the last, each swap module forwards the mask bits thus received as the mask bits at those mask-bit positions of the stage-output mask word associated with that swap stage:
- i) in reverse order if those mask bits received by that swap module from positions Mn and Mn+1 are set and clear, respectively, and
- ii) in forward order otherwise;
- I) for the integers n and n+1 associated therewith, each swap module in a given swap stage receives the data units in data-unit positions Dn and Dn+1 of the stage-input data word associated with that swap stage and forwards them as the data units in data-unit positions Dn and Dn+1 of the stage-input data word associated with that swap stage:
- i) in reverse order if the received mask bit received by that swap module from positions Mn and Mn+1 are set and clear, respectively;
- and
- ii) in forward order otherwise;
- and
- J) the swap modules are so staggered that, for each m<M−1 such the integers n in the integer pairs n and n+1 associated with the swap modules in swap stage Sm are even, the integers n in the integer pairs n and n+1 associated with the swap modules in swap stage Sm+1 are odd.
Dependencies are inferred from the claim text.