US20080148018A1 - Shift Processing Unit - Google Patents
Shift Processing Unit Download PDFInfo
- Publication number
- US20080148018A1 US20080148018A1 US12/037,559 US3755908A US2008148018A1 US 20080148018 A1 US20080148018 A1 US 20080148018A1 US 3755908 A US3755908 A US 3755908A US 2008148018 A1 US2008148018 A1 US 2008148018A1
- Authority
- US
- United States
- Prior art keywords
- shift
- operand
- current
- word
- output operand
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
- 238000012545 processing Methods 0.000 title claims description 32
- 238000000034 method Methods 0.000 claims abstract description 11
- 238000012805 post-processing Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 21
- 101001013167 Argopecten irradians Myosin essential light chain, striated adductor muscle Proteins 0.000 description 5
- 101001013166 Mizuhopecten yessoensis Myosin, essential light chain, adductor muscle Proteins 0.000 description 5
- 238000004891 communication Methods 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/30032—Movement instructions, e.g. MOVE, SHIFT, ROTATE, SHUFFLE
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30101—Special purpose registers
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
Abstract
The present invention is a technique to perform field operations. A shifter to shift an operand. A register stores the shifted operand. A shift post processor processes the shifted operand based on at least a control signal and an offset parameter.
Description
- This application is a continuation of U.S. patent application Ser. No. 09/933,786 to Sandbote, entitled “Shifter for Alignment with Bit Formatter Gating Bits from Shifted Operand, Shifted Carry Operand and Most Significant Bit” and filed Aug. 20, 2001, the entirety of which is incorporated by reference herein.
- 1. Field of the Invention
- This invention relates to computer architecture. In particular, the invention relates to processing units.
- 2. Background Art
- Digital processors are usually designed with a fixed word length to facilitate data handling and operation. The typical word length is a power of two and is compatible with memory data size. In many advanced processors, the word length is 32-bit, 64-bit, or 128-bit.
- Although these traditional word lengths are useful for many scientific, data processing, business, medical, military, and commercial applications, they may not be convenient for applications where the word length may have any size depending on the type of information to be represented. Examples of such applications include network data processing and packet communications. In these applications, the data items may be represented by the minimum word size to optimize data transfers and switching. In addition, the word size may vary within the same processing unit. Furthermore, even when the data word sizes are comparable with the native word size of the processor, there are cases where blocks of data or long words are processed and these blocks of data may occupy at boundaries that are not aligned with the native word boundary.
- Existing techniques to handle data with word sizes larger than the processor's native size are inefficient. These techniques involve execution of a large number of operations to shift and perform logical operations on the data items to be aligned or merged.
- The features and advantages of the present invention will become apparent from the following detailed description of the present invention in which:
-
FIG. 1 is a diagram illustrating a system in which one embodiment of the invention can be practiced. -
FIG. 2A is a diagram illustrating an example for data re-alignment according to one embodiment of the invention. -
FIG. 2B is a diagram illustrating an example for data merging according to one embodiment of the invention. -
FIG. 3 is a diagram illustrating the shift processing unit shown inFIG. 1 according to one embodiment of the invention. -
FIG. 4 is a diagram illustrating various shift instructions for the shift processing unit according to one embodiment of the invention. -
FIG. 5A is a diagram illustrating an example of a long word left shift operation according to one embodiment of the invention. -
FIG. 5B is a diagram illustrating an example of a long word right shift operation according to one embodiment of the invention. -
FIG. 6 is a diagram illustrating an example of a data re-alignment operation according to one embodiment of the invention. -
FIG. 7 is a diagram illustrating the shift post processor shown inFIG. 3 according to one embodiment of the invention. -
FIG. 8 is a diagram illustrating the bit formatter shown inFIG. 7 according to one embodiment of the invention. - In the following description, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that these specific details are not required in order to practice the present invention. In other instances, well-known electrical structures and circuits are shown in block diagram form in order not to obscure the present invention.
-
FIG. 1 is a diagram illustrating asystem 100 in which one embodiment of the invention can be practiced. Thesystem 100 includes aninstruction memory 110 and a processor core 120. - The
instruction memory 110 stores instructions to be fetched and executed by the processor core 120. Theinstruction memory 110 may be implemented by random access memory (RAM), such as static RAM (SRAM) or dynamic RAM (DRAM), or non-volatile memory such as read only memory (ROM), programmable ROM (PROM), erasable ROM (EROM), electrically erasable ROM (EEROM), flash memory, or any other storage media. - The processor core 120 is the core of a central processing unit (CPU) or a processor that can execute a program and/or instructions. The processor core 120 is interfaced to the
instruction memory 110 either directly or indirectly through an interface circuit (not shown) such as a memory controller. The processor core 120 includes aninstruction fetch unit 130, aninstruction decoder 140, aregister file 150, and ashift processing unit 160. The processor core 120 may contain other circuits or elements that are not necessary for an understanding of the invention. Examples of these elements include a branch prediction logic, an instruction buffer unit, a code cache, a data cache, and other functional units. - The
instruction fetch unit 130 fetches the instructions from theinstruction memory 130 and stores in an instruction register 132. The instruction register holds a copy of the instruction. Theinstruction fetch unit 130 may contain a program counter to store the address of the instruction. - The
instruction decoder 140 decodes theinstruction 135 stored in the instruction register 132. Theinstruction decoder 140 may have a number of decoder sections that decodes portions of the instruction. The format of theinstruction 135 may have a number of forms depending on the instruction set architecture (ISA) employed by the processor core 120. - The
register file 150 includes a number of registers that store temporary data to be operated on during the execution of theinstruction 135. The register file may be read or written to theshift processing unit 160. The number of registers in the register file depends on the ISA and may be sixteen, thirty two, or any suitable number. The registers provide the source operands for theshift processing unit 160. In addition, the registers also provide the destination for theshift processing unit 160. - The
shift processing unit 160 performs shifting operations including left and right shifts, left and right shifts with zero fill, right shift with sign fill, left and right shifts with register fill, left and right shifts through carry, etc. These shift operations are efficient in data re-alignment and data merging. Although the term “shifting” is used throughout this description, it is understood that it includes both shifting and rotation. As is known by one skilled in the art, a rotation operation is a circular shift operation. - A processor which operates on data taken from a network may be charged with the tasks of re-aligning data which begins at a given or byte-, bit offset in a starting address or register, and continues for several words. This requirement occurs frequently when a processor de-encapsulates packet data. This process involves the removal of several bytes from the beginning of a packet, possibly leaving the remaining data un-aligned to the processor's word boundary. Another situational example is the merging of data. These examples are illustrated in
FIGS. 2A and 2B . -
FIG. 2A is a diagram illustrating an example for data re-alignment according to one embodiment of the invention. The example includes data blocks 210 and 220. - The data block 210 contains five words of packet data before the data re-alignment. Typically the packet data is received from a transmitting source. This data block includes a
header 230 and thepacket data 240. Theheader 230 contains information regarding the packet data such as identification code, check sum, packet number, type of packet, etc. After this information is used for administrative, error checking, or book-keeping purposes, it is usually discarded or removed. Thepacket data 240 contain the actual data to be processed. To facilitate the processing, it is desired that thepacket data 240 is aligned at the word boundary. To do so, a data re-alignment operation is performed. - The data block 220 represents the re-aligned packet data after the data re-alignment operation. The
packet data 240 becomes thepacket data 250. Theheader 230 is removed and thepacket data 250 is shifted to start at the word boundary beginning fromword 0. Theheader 230 may not be actually removed and thepacket data 250 may overwrite theheader 230. By re-aligning the packet data at word boundary, the data processing becomes more efficient. Subsequent operations may include data movement, comparisons, arithmetic and logical operations, or any other suitable operations. -
FIG. 2B is a diagram illustrating an example for data merging according to one embodiment of the invention. The example includes data blocks 260 and 270. - The data block 260 contains five words of data before data merging. Typically this packet data is the data to be sent to a receiving source. The data block 260 includes a packet header 280 and an unaligned packet data 285. The packet header 280 and the unaligned packet data 285 are separated by unused portions. It is desired to merge the packet header 280 and the unaligned packet data 285 into a contiguous sequence of words. To do so, a data merge operation is performed.
- The data block 270 contains a
merged data 290. Themerged data 290 forms a contiguous words by combining the packet header 280 and the unaligned packet data 285. The data merging operation is performed by shifting the unaligned packet data 285 to the end of the packet header 280. - As is known by one skilled in the art, the data re-alignment and data merge operations are not only useful for communication or network applications. They are also useful for traditional computer operations such as text manipulations, data movements, information processing, string operations, array manipulations, etc.
-
FIG. 3 is a diagram illustrating theshift processing unit 160 shown inFIG. 1 according to one embodiment of the invention. Theshift processing unit 160 includes a barrel shifter 310, a shift carry (SC)register 330, and ashift post processor 340. - The barrel shifter 310 receives an
operand 315 to be operated upon. Theoperand 315 may come from the register file 150 (FIG. 1 ). In this example, theoperand 315 contains data elements A and B. The barrel shifter 310 performs a shift in any direction with any number of bits according to the OFFSET parameter in the decoded instruction provided by the decoder 140 (FIG. 1 ). Since the barrel shifter 310 performs multiple-bit shifts in a single clock cycle, the shifting operation can be performed very fast. Typically, the barrel shifter 310 has the same word size as that of the register file 150 (FIG. 1 ) as defined by theprocessor 100, although this is not necessary. The output of the barrel shifter 310 is a group of N bits from shifted(l) to shifted(N) where N is the word size of theshift processing unit 160. - The SC register 330 stores the output of the barrel shifter 310. The SC register 330 has the same word size with the barrel shifter 310 and the register file 150 (
FIG. 1 ). The SC register 330 is visible to the programmer and can be explicitly accessed through data movement instructions available in the Instruction Set Architecture (ISA). Each time the barrel shifter 310 is used for any shifting instruction, including left or right rotate, arithmetic or logical shift, the raw output of the barrel shifter 310 before post processing by theshift post processor 340 is saved in theSC register 330. Since the SC register 330 stores the output of the barrel shifter 310, theshift post processor 340 can perform post processing operations on the currently shifted operands from the barrel shifter 310 and the contents of theSC register 330. The output of the SC register 330 is a group of N bits from SC(1) to SC(N) where N is the word size of theshift processing unit 160. - The
shift post processor 340 performs a number of operations after the shifting by the barrel shifter 310. These post-shift operations may include replacing a portion of the shifted operand with zero, sign bits (e.g., sign extension), or a portion of theSC register 330. The output of theshift post processor 340 may be written to the register file 150 (FIG. 1 ), or any appropriate destination register. Theshift post processor 340 receives the following inputs: the shifted operand from the barrel shifter 310, the output of the SC register 330, OFFSET, ZERO_EXTEND, SIGN_EXTEND, USE_SHIFT_CARRY, and MSB. The OFFSET is the same parameter used by the barrel shifter 310. The ZERO_EXTEND and SIGN_EXTEND are control bits to indicate if the operand is to be zero and sign extended, respectively. The USE_SHIFT_CARRY is a control bit to indicate if the shifting is performed via the carry bit. In one embodiment, the OFFSET, ZERO_EXTEND, SIGN_EXTEND, USE_SHIFT_CARRY are provided by the instruction decoder 140 (FIG. 1 ). The MSB is the most significant bit of theoperand 315. -
FIG. 4 is a diagram illustrating various shift instructions for theshift processing unit 160 shown inFIG. 1 according to one embodiment of the invention. The example includesoperands - The
operand 410 represents the input to the barrel shifter 310 (FIG. 3 ). In this example, theoperand 410 includes two data elements A and B, each occupying an arbitrary sub-word length within the word length of theprocessor 100. Theoperand 415 represents the output of the barrel shifter 310. In this example, the barrel shifter 310 performs a rotation to swap the data elements A and B. Theoperand 420 represents the contents of the SC register 330 (FIG. 3 ). - The
operand 425 is the result of the execution of the instruction LEFT ROTATE. In other words, theshift post processor 340 leaves the output of the barrel shifter 310 unchanged. - The
operand 430 is the result of the execution of the instruction LEFT SHIFT ZERO-FILL which replaces the data element A with zeros. Theoperand 435 is the result of the execution of the instruction RIGHT SHIFT ZERO-FILL which replaces the data element B with zeros. Theoperand 440 is the result of the execution of the instruction RIGHT SHIFT SIGN-FILL which extends the sign bit of the data element A to occupy the entire word. Theoperand 445 is the result of the execution of the instruction LEFT SHIFT SC-FILL which replaces the data element A with the corresponding portion of the register 330 (FIG. 3 ). Theoperand 450 is the result of the execution of the instruction RIGHT SHIFT SC-FILL which replaces the data element B with the corresponding portion of theSC register 330. - The
operand 455 represents the contents of a register before the execution of the instruction MOVE SC TO REGISTER. Theoperand 460 represents the contents of the register after the execution of the instruction MOVE SC TO REGISTER. This instruction moves the contents of the SC register 330 to a specified register. Theoperand 465 represents the contents of a register before the execution of the instruction MOVE REGISTER TO SC. Theoperand 470 represents the contents of the SC register 330 after the execution of the instruction MOVE REGISTER TO SC. This instruction moves the contents of a specified register to theSC register 330. Normally, after the movement, the contents of the specified register remain unchanged. -
FIG. 5A is a diagram illustrating an example of a long word left shift operation according to one embodiment of the invention. In this example, the long word operand includes three words: word[0] 520, word[1] 530, and word[2] 540 corresponding to data elements A, B, and C, respectively. The SC register 510 stores shifted or rotated word. Suppose it is desired to shift the long word operand left by an amount equivalent to the offset parameter. This amount is represented by the portions denoted AHI, BHI, and CHI in the data elements A, B, and C, respectively. The remaining portions of the data elements A, B, and C are denoted ALO, BLO, and CLO, respectively. Zero's will be filled in the least significant word (data element A) to occupy the shifted bit positions. - In general, a long word having N words is shifted left by executing N left shift instructions. The shifting sequence starts with the least significant word, or the rightmost word in the long word operand. In this example, there are three left shifts. The first instruction is SHL word[0], offset. This instruction causes word[0] to be shifted left and zero's filled in the right to occupy the shifted bit positions. At the same time, the SC register 510 contains the left rotated data elements A. The SC register 510 stores ALO AHI as shown.
- The second instruction is SHLC word[1], offset. This instruction causes a left shift of word[1] 530 through carry. The AHI portion in the SC register 510 is shifted to occupy the shifted bit positions of word[1] 530 from the right through carry. Word[1] 530 will become BLO AHI. At the same time, the SC register 510 contains the left rotated data elements B, or BLO BHI as shown. After this instruction is executed, it is seen that the data element A is shifted left to cross the boundary between A and B.
- The third instruction is SHLC word[2], offset. As in the second instruction, this instruction causes a left shift of word[2] 540 through carry. The BHI portion in the SC register 510 is shifted to occupy the shifted bit positions of word[2] 540 from the right through carry. Word[2] 540 will become CLO BHI. At the same time, the SC register 510 contains the left rotated data elements C, or CLO CHI as shown. After this instruction is executed, it is seen that the data element B is shifted left to cross the boundary between B and C. In addition, the data element C is left shifted and the CHI portion is shifted out of word[2] 540. In the end, the long word operand is now shifted left with zero's filled in the shifted bit positions starting from the rightmost.
-
FIG. 5B is a diagram illustrating an example of a long word right shift operation according to one embodiment of the invention. This example is similar to the example shown inFIG. 5A except that the shift operation is a right shift. As in the example ofFIG. 5A , the long word operand includes three words: word[0] 520, word[1] 530, and word[2] 540 corresponding to data elements A, B, and C, respectively. The SC register 510 stores shifted or rotated word. For a right shift operation, zero's are filled in to occupy the shifted bit positions starting from the left, or the most significant word. - In general, a long word having N words is shifted right by executing N right shift instructions. The shifting sequence starts with the most significant word, or the leftmost word in the long word operand. In this example, there are three right shifts. The first instruction is SHR word[2], offset. This instruction causes word[2] 540 to be shifted right and zero's filled in from the left to occupy the shifted bit positions. At the same time, the
register 510 contains the right rotated data elements C. The SC register 510 stores CLO CHI as shown. - The second instruction is SHRC word[1], offset. This instruction causes a right shift of word[1] 530 through carry. The CLO portion in the SC register 510 is shifted to occupy the shifted bit positions of word[1] 530 from the left through carry. Word[1] 530 will become CLO BHI. At the same time, the SC register 510 contains the right rotated data elements B, or BLO BHI as shown. After this instruction is executed, it is seen that the data element C is shifted right to cross the boundary between C and B.
- The third instruction is SHRC word[0], offset. As in the second instruction, this instruction causes a right shift of word[0] 510 through carry. The BLO portion in the SC register 510 is shifted to occupy the shifted bit positions of word[0] 520 from the left through carry. Word[0] 520 will become BLO AHI. At the same time, the SC register 510 contains the right rotated data elements A, or ALO AHI as shown. After this instruction is executed, it is seen that the data element B is shifted right to cross the boundary between B and A. In addition, the data element A is right shifted and the ALO portion is shifted out of word[0] 520. In the end, the long word operand is now shifted right with zero's filled in the shifted bit positions starting from the leftmost.
-
FIG. 6 is a diagram illustrating an example of a data re-alignment operation according to one embodiment of the invention. The example includesblocks operands - The data blocks 610, 620, 630, and 640 contain the data items to be shifted for re-alignment. Each block has four words: word[0], word[1], word[2] and word[3]. Each block represents a step of a sequence of shifts and offset movements. The offset is the unaligned offset from the first word of the block, word[0]. Word[0] contains the offset and data item A. Word[1] contains data items B and C. Word[2] contains data item D and E. Word[3] contains data items F and an unused data portion. The
operands - At
step 1, the instruction SHL word[3] is executed and the offset is moved to word[3]. Theoperand 615 contains the left shifted word [3]. Atstep 2, word[3] contains unused data portion and zeros. Then, the instruction SHLC word[2] is executed. Theoperand 625 contains the left shifted word[2]. At the same time, a portion of theoperand 625 is combined with a portion of theoperand 615 such that the data item E is combined with the data item F. Atstep 3, word[2] contains the combined data items E and F. Then, the instruction SHLC word[1] is executed. Theoperand 635 contains the left shifted word[1]. At the same time, a portion of theoperand 635 is combined with a portion of theoperand 625 such that data item C is combined with data item B. Atstep 4, word[1] contains data items C and D. Then, the instruction SHLC word[0] is executed. At the same time, a portion of theoperand 645 is combined with a portion of theoperand 635 such that the data item A is combined with the data item B. Word[0] contains data items A and B. At the end of the sequence, the entire four words are properly aligned at the word boundary. - The operation described above performs the data re-alignment as shown in
FIG. 2A . The shift instructions can also be used to merge byte-oriented data from one region of memory to another as shown inFIG. 2B . Encapsulation, the process of adding headers or trailers to packet data, may also leave data misaligned. -
FIG. 7 is a diagram illustrating theshift post processor 340 shown inFIG. 3 according to one embodiment of the invention. Theshift post processor 340 includes adecoder 710 and N bit formatters 7201 to 720N, where N is an integer equal to the word size of the shift processing unit 160 (FIG. 1 ). - The
decoder 710 receives the OFFSET parameter and generates a shift field mask MASK [1 . . . N]. The shift field mask has N bits, mask(l) to mask (N), corresponding to N-bit word of the shifted operand. The shift mask field defines the bit positions that are affected by the post processing operations. In one embodiment, a logical one in the mask(k) indicates that the bit at the k-th position is affected by the post processing operation, and a logical zero allows the bit at the k-th position to pass through unmodified. The decoder essentially converts the OFFSET value into a bit pattern having a group of consecutive mask bits that corresponds to the portion of the operand to be operated upon. - Each of the bit for
matters 7201 to 720N performs a bit post processing operation on each bit of the shifted output of the barrel shifter, shifted(l) to shifted(N). Each of the bit formatters receives the corresponding mask(k) bit and the SC(k) bit. In addition, all the bit formatters 7201 to 720N receive the same control bits MSB, ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY. The bit formatters 7201 to 720N generate the N-bit output, y(1) to y(N). -
FIG. 8 is a diagram illustrating the bit for matter 720 i shown inFIG. 7 according to one embodiment of the invention. The bit formatter include agating circuit 801 and aselector circuit 802. - The
gating circuit 801 gates the ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY signals by the mask(i) bit. In one embodiment, thegating circuit 801 includesNAND gate 810, ANDgates NAND gate 810 gates the shifted(i) bit to theselector circuit 802. When the mask(i) bit is logical one, the shifted(i) bit is modified according to the ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY control signals. - The
selector circuit 802 selects the proper bit operand to generate the output bit y(i) according to the mask(i) bit and the ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY control signals. In one embodiment, theselector circuit 802 includes two two-to-one multiplexers 850 and 860. Of course, the two multiplexers 850 and 860 may be combined into a single combinational logic circuit which operates the same way as two multiplexers connected in cascade. - The bit for matter 720 i performs logic operations on the shifted(i) bit using the MSB and the SC(i) bits according to the control bits mask(i), ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY control signals. Let m, sc, msk, ze, se, and u denote the MSB, SC(i), bits mask(i), ZERO_EXTEND, SIGN_EXTEND, and USE_SHIFT_CARRY control signals. Let shft and y denote the shifted(i) and y(i) signals. The bit formatter 720 i essentially performs the logic operations according to the following truth table.
-
msk ze de u Y 0 X X X Shft 1 1 0 0 Shft 1 X X 1 Sc 1 0 1 1 Msb - Note that ze and se are mutually exclusive. In other words, if zero extension is desired, then sign extension is not available. Similarly, if sign extension is desired, then zero extension is not available.
- While this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the invention, which are apparent to persons skilled in the art to which the invention pertains are deemed to lie within the spirit and scope of the invention.
Claims (17)
1. An apparatus for facilitating data processing, comprising:
a barrel shifter configured to shift an operand during a shift cycle, whereby the barrel shifter successively provides an output operand for each shift cycle; and
a shift post processor configured to perform one of a plurality of post processing operations on a portion of a current-output operand from the barrel shifter based on a control signal.
2. The apparatus of claim 1 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more zero bits based on the control signal.
3. The apparatus of claim 1 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more sign bits based on the control signal.
4. The apparatus of claim 1 , further comprising:
a shift carry register configured to store a current-output operand from a current shift cycle and to output a stored-output operand from a previous shift cycle.
5. The apparatus of claim 4 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more bits of the stored-output operand based on the control signal.
6. A method for facilitating data processing, comprising:
(a) shifting an operand during a shift cycle, thereby successively providing an output operand for each shift cycle; and
(b) performing one of a plurality of post processing operations on a portion of a current-output operand based on a control signal.
7. The method of claim 6 , wherein step (b) comprises:
replacing the portion of the current-output operand with one or more zero bits based on the control signal.
8. The method of claim 6 , wherein step (b) comprises:
replacing the portion of the current-output operand with one or more sign bits based on the control signal.
9. The method of claim 6 , further comprising:
(c) outputting a stored-output operand from a previous shift cycle.
10. The method of claim 9 , wherein step (b) comprises:
replacing the portion of the current-output operand with one or more bits of the stored-output operand based on the control signal.
11. A processing unit comprising:
a register file having a plurality of registers, each of the registers configured to store an operand;
an instruction decoder to decode an instruction; and
a shift processing unit coupled to the register file and the instruction decoder to perform an operation on the operand, the shift processing unit comprising:
a barrel shifter configured to shift an operand during a shift cycle, whereby the barrel shifter successively provides an output operand for each shift cycle; and
a shift post processor configured to perform one of a plurality of post processing operations on a portion of a current-output operand from the barrel shifter based on a control signal.
12. The processing unit of claim 11 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more zero bits based on the control signal.
13. The processing unit of claim 11 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more sign bits based on the control signal.
14. The processing unit of claim 11 , further comprising:
a shift carry register configured to store a current-output operand from a current shift cycle and to output a stored-output operand from a previous shift cycle.
15. The processing unit of claim 14 , wherein the shift post processor is configured to replace the portion of the current-output operand with one or more bits of the stored-output operand based on the control signal.
16. The processing unit of claim 11 , wherein the shift post processor is embodied in hardware description language software.
17. The processing unit of claim 16 , wherein the shift post processor is embodied in one of Verilog hardware description language software, Verilog-A hardware description language software, and VHDL hardware description language software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US12/037,559 US20080148018A1 (en) | 2001-08-20 | 2008-02-26 | Shift Processing Unit |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/933,786 US7370184B2 (en) | 2001-08-20 | 2001-08-20 | Shifter for alignment with bit formatter gating bits from shifted operand, shifted carry operand and most significant bit |
US12/037,559 US20080148018A1 (en) | 2001-08-20 | 2008-02-26 | Shift Processing Unit |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/933,786 Continuation US7370184B2 (en) | 2001-08-20 | 2001-08-20 | Shifter for alignment with bit formatter gating bits from shifted operand, shifted carry operand and most significant bit |
Publications (1)
Publication Number | Publication Date |
---|---|
US20080148018A1 true US20080148018A1 (en) | 2008-06-19 |
Family
ID=25464501
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/933,786 Expired - Lifetime US7370184B2 (en) | 2001-08-20 | 2001-08-20 | Shifter for alignment with bit formatter gating bits from shifted operand, shifted carry operand and most significant bit |
US12/037,559 Abandoned US20080148018A1 (en) | 2001-08-20 | 2008-02-26 | Shift Processing Unit |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/933,786 Expired - Lifetime US7370184B2 (en) | 2001-08-20 | 2001-08-20 | Shifter for alignment with bit formatter gating bits from shifted operand, shifted carry operand and most significant bit |
Country Status (1)
Country | Link |
---|---|
US (2) | US7370184B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090037702A1 (en) * | 2007-08-01 | 2009-02-05 | Nec Electronics Corporation | Processor and data load method using the same |
US20100189111A1 (en) * | 2009-01-26 | 2010-07-29 | International Business Machines Corporation | Streaming direct inter-thread communication buffer packets that support hardware controlled arbitrary vector operand alignment in a densely threaded network on a chip |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ITRM20030354A1 (en) * | 2003-07-17 | 2005-01-18 | Micron Technology Inc | CONTROL UNIT FOR MEMORY DEVICE. |
US7610472B2 (en) * | 2005-06-05 | 2009-10-27 | Apple Inc. | Performing variable and/or bitwise shift operation for a shift instruction that does not provide a variable or bitwise shift option |
US20130151820A1 (en) * | 2011-12-09 | 2013-06-13 | Advanced Micro Devices, Inc. | Method and apparatus for rotating and shifting data during an execution pipeline cycle of a processor |
US9152419B2 (en) * | 2012-12-18 | 2015-10-06 | Intel Corporation | Instruction set for supporting wide scalar pattern matches |
US10834241B1 (en) * | 2019-01-08 | 2020-11-10 | Xilinx, Inc. | Streaming editor circuit for implementing a packet deparsing process |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4135242A (en) * | 1977-11-07 | 1979-01-16 | Ncr Corporation | Method and processor having bit-addressable scratch pad memory |
US4149263A (en) * | 1977-06-20 | 1979-04-10 | Motorola, Inc. | Programmable multi-bit shifter |
US4495598A (en) * | 1982-09-29 | 1985-01-22 | Mcdonnell Douglas Corporation | Computer rotate function |
US4896133A (en) * | 1987-02-10 | 1990-01-23 | Davin Computer Corporation | Parallel string processor and method for a minicomputer |
US5222225A (en) * | 1988-10-07 | 1993-06-22 | International Business Machines Corporation | Apparatus for processing character string moves in a data processing system |
US5386531A (en) * | 1991-05-15 | 1995-01-31 | International Business Machines Corporation | Computer system accelerator for multi-word cross-boundary storage access |
US6112297A (en) * | 1998-02-10 | 2000-08-29 | International Business Machines Corporation | Apparatus and method for processing misaligned load instructions in a processor supporting out of order execution |
US6523108B1 (en) * | 1999-11-23 | 2003-02-18 | Sony Corporation | Method of and apparatus for extracting a string of bits from a binary bit string and depositing a string of bits onto a binary bit string |
US6694423B1 (en) * | 1999-05-26 | 2004-02-17 | Infineon Technologies North America Corp. | Prefetch streaming buffer |
US6820195B1 (en) * | 1999-10-01 | 2004-11-16 | Hitachi, Ltd. | Aligning load/store data with big/little endian determined rotation distance control |
US7051168B2 (en) * | 2001-08-28 | 2006-05-23 | International Business Machines Corporation | Method and apparatus for aligning memory write data in a microprocessor |
-
2001
- 2001-08-20 US US09/933,786 patent/US7370184B2/en not_active Expired - Lifetime
-
2008
- 2008-02-26 US US12/037,559 patent/US20080148018A1/en not_active Abandoned
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4149263A (en) * | 1977-06-20 | 1979-04-10 | Motorola, Inc. | Programmable multi-bit shifter |
US4135242A (en) * | 1977-11-07 | 1979-01-16 | Ncr Corporation | Method and processor having bit-addressable scratch pad memory |
US4495598A (en) * | 1982-09-29 | 1985-01-22 | Mcdonnell Douglas Corporation | Computer rotate function |
US4896133A (en) * | 1987-02-10 | 1990-01-23 | Davin Computer Corporation | Parallel string processor and method for a minicomputer |
US5222225A (en) * | 1988-10-07 | 1993-06-22 | International Business Machines Corporation | Apparatus for processing character string moves in a data processing system |
US5386531A (en) * | 1991-05-15 | 1995-01-31 | International Business Machines Corporation | Computer system accelerator for multi-word cross-boundary storage access |
US6112297A (en) * | 1998-02-10 | 2000-08-29 | International Business Machines Corporation | Apparatus and method for processing misaligned load instructions in a processor supporting out of order execution |
US6694423B1 (en) * | 1999-05-26 | 2004-02-17 | Infineon Technologies North America Corp. | Prefetch streaming buffer |
US6820195B1 (en) * | 1999-10-01 | 2004-11-16 | Hitachi, Ltd. | Aligning load/store data with big/little endian determined rotation distance control |
US6523108B1 (en) * | 1999-11-23 | 2003-02-18 | Sony Corporation | Method of and apparatus for extracting a string of bits from a binary bit string and depositing a string of bits onto a binary bit string |
US7051168B2 (en) * | 2001-08-28 | 2006-05-23 | International Business Machines Corporation | Method and apparatus for aligning memory write data in a microprocessor |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090037702A1 (en) * | 2007-08-01 | 2009-02-05 | Nec Electronics Corporation | Processor and data load method using the same |
US20100189111A1 (en) * | 2009-01-26 | 2010-07-29 | International Business Machines Corporation | Streaming direct inter-thread communication buffer packets that support hardware controlled arbitrary vector operand alignment in a densely threaded network on a chip |
US7873066B2 (en) * | 2009-01-26 | 2011-01-18 | International Business Machines Corporation | Streaming direct inter-thread communication buffer packets that support hardware controlled arbitrary vector operand alignment in a densely threaded network on a chip |
Also Published As
Publication number | Publication date |
---|---|
US20030041229A1 (en) | 2003-02-27 |
US7370184B2 (en) | 2008-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5996057A (en) | Data processing system and method of permutation with replication within a vector register file | |
US5922066A (en) | Multifunction data aligner in wide data width processor | |
US6052766A (en) | Pointer register indirectly addressing a second register in the processor core of a digital processor | |
DE69233412T2 (en) | Device and computer program product for executing branch instructions | |
US5390307A (en) | Apparatus for a multi-data store or load instruction for transferring multiple contiguous storage locations in one transfer operation | |
JP2019032859A (en) | Systems, apparatuses and methods for blending two source operands into single destination using writemask | |
US20080148018A1 (en) | Shift Processing Unit | |
US4825355A (en) | Instruction format for program control type data processing systems | |
JP2017079078A (en) | Vector friendly instruction format and execution thereof | |
US20080091991A1 (en) | Method and apparatus for performing logical compare operation | |
US7546442B1 (en) | Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions | |
US6006315A (en) | Computer methods for writing a scalar value to a vector | |
US5669012A (en) | Data processor and control circuit for inserting/extracting data to/from an optional byte position of a register | |
JP2009512090A (en) | High speed rotator with embedded masking and method | |
JP2806359B2 (en) | Instruction processing method and instruction processing device | |
CN107925419A (en) | For system, the method and apparatus unziped it using hardware and software | |
US6459391B1 (en) | High speed variable length decoding processor | |
US20040143728A1 (en) | Data processing apparatus and method for swapping data values | |
US5638312A (en) | Method and apparatus for generating a zero bit status flag in a microprocessor | |
US20030037085A1 (en) | Field processing unit | |
US6332188B1 (en) | Digital signal processor with bit FIFO | |
JPH05150979A (en) | Immediate operand expansion system | |
US20030033503A1 (en) | Single instruction having opcode and stack control field | |
US4812970A (en) | Microprogram control system | |
US20040024992A1 (en) | Decoding method for a multi-length-mode instruction set |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |