Abstract:
A system and method for accelerating the performance of finite impulse response (FIR) filtering operations in a processor system. The system and method accelerates FIR filtering operations by using a holding register to provide additional input samples to an instruction beyond those normally accommodated by source registers, and by using a large number of multipliers that can operate in parallel on the input samples in order to generate output sample of a FIR filter, such as a non-decimating FIR filter.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates generally to processor systems, and more specifically, to processor systems that execute instructions for performing finite impulse response (FIR) filtering operations. 
       BACKGROUND OF THE INVENTION 
       [0002]    A finite impulse response (FIR) filter is a type of digital filter commonly used in digital signal processing (DSP) applications and, in general, in data acquisition and processing applications. If a FIR filter has a large number of filter taps, then a significant number of multiplication and addition operations must be performed to generate a single output sample. Implementing such a filter in a processor system typically requires processing a significant number of instructions (e.g., multiply-accumulate instructions), which adversely impacts processor throughput. The provision of additional structures, such as additional multipliers, to the processor&#39;s functional units can assist in accelerating throughput, but only if an increased number of input samples can be provided per instruction. 
         [0003]    What is needed is a system and method for accelerating the performance of FIR filtering operations in a processor system that addresses the foregoing issues. 
       SUMMARY OF THE INVENTION 
       [0004]    The present invention provides a system and method for accelerating the performance of finite impulse response (FIR) filtering operations in a processor system. A system and method in accordance with the present invention accelerates FIR filtering operations by using a holding register to provide additional input samples for processing an instruction beyond those normally accommodated by the instruction&#39;s source registers, and by using a large number of multipliers that can operate in parallel on the input samples in order to generate output samples of a FIR filter, such as a non-decimating FIR filter. 
         [0005]    In particular, a method for performing finite impulse response (FIR) filtering operations in a processor system in accordance with an embodiment of the present invention includes a number of steps. First, a first plurality of successive input samples is stored in a holding register responsive to the issuance of a first instruction. Then, responsive to the issuance of a second instruction that specifies a second plurality of successive input samples as source operands, calculations are performed based on the first plurality of successive input samples and at least one of the second plurality of input samples to generate one or more output samples of a FIR filter. The FIR filter may be a non-decimating FIR filter. The performance of calculations may include multiplying each of the first plurality of successive input samples by one or more filter coefficients and multiplying at least one of the second plurality of successive input samples by a filter coefficient using different multipliers operating substantially in parallel. 
         [0006]    A processor system in accordance with an embodiment of the present invention includes a holding register, an instruction decode unit, and an execution unit connected to the holding register and the instruction decode unit. The execution unit is adapted to store a first plurality of successive input samples in the holding register responsive to issuance of a first instruction from the instruction decode unit. The execution unit is also adapted to perform calculations based on the first plurality of successive input samples stored in the holding register and at least one of a second plurality of input samples to generate one or more output samples of a FIR filter responsive to issuance of a second instruction from the instruction decode unit, wherein the second instruction specifies the second plurality of successive input samples as source operands. The FIR filter may be a non-decimating FIR filter. The execution unit may include a plurality of multipliers, each of which is adapted to multiply each of the first plurality of successive input samples by one or more filter coefficients or to multiply at least one of the second plurality of successive input samples by a filter coefficient. Each of the plurality of multipliers may be adapted to perform a different one of the multiplications substantially in parallel with the others multipliers. 
         [0007]    Further features and advantages of the invention, as well as the structure and operation of various embodiments of the invention, are described in detail below with reference to the accompanying drawings. It is noted that the invention is not limited to the specific embodiments described herein. Such embodiments are presented herein for illustrative purposes only. Additional embodiments will be apparent to persons skilled in the relevant art(s) based on the teachings contained herein. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]    The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate the present invention and, together with the description, further serve to explain the principles of the invention and to enable a person skilled in the pertinent art to make and use the invention. 
           [0009]      FIG. 1  illustrates an exemplary processor system that may be used to implement the present invention. 
           [0010]      FIG. 2  depicts a flowchart of a method for performing non-decimating finite impulse response (FIR) filtering operations in a processor system. 
           [0011]      FIG. 3  illustrates multiply-accumulate (MAC) operations performed by a processor system that implements a non-decimating FIR filter. 
           [0012]      FIGS. 4A and 4B  illustrate holding registers used for implementing a non-decimating FIR filter in a processor system in accordance with an embodiment of the present invention. 
           [0013]      FIG. 5  depicts a flowchart of a method for performing non-decimating FIR filtering operations in a processor system in accordance with an embodiment of the present invention. 
           [0014]      FIG. 6  depicts a flowchart of operations that occur in a processor responsive to execution of a FIR instruction in accordance with an embodiment of the present invention. 
       
    
    
       [0015]    The present invention will now be described with reference to the accompanying drawings. In the drawings, like reference numbers can indicate identical or functionally similar elements. Additionally, the left-most digit(s) of a reference number may identify the drawing in which the reference number first appears. 
       DETAILED DESCRIPTION OF THE INVENTION 
     1. Architecture Overview 
       [0016]      FIG. 1  illustrates an exemplary processor system  100  that may be used to implement the present invention. More details concerning such a processor system can be found in U.S. Pat. No. 6,986,025 to Wilson, issued Jan. 10, 2006, the entirety of which is incorporated by reference herein. Processor system  100  is a 64-bit long instruction word machine including two identical Single Instruction Multiple Data (SIMD) units designated by reference letters X and Y. In a SIMD processor, a single instruction can be issued to control the processing of multiple data values in parallel. Processor system  100  is described herein by way of example only. Persons skilled in the art will readily appreciate that the present invention may be implemented using other processor systems. 
         [0017]    Processor system  100  includes an instruction cache  110  for receiving and holding instructions from a program memory (not shown). Instruction cache  110  is coupled to fetch/decode circuitry  120 . Fetch/decode circuitry  120  issues addresses in the program memory from which instructions are to be fetched and receives on each fetch operation a 64 bit instruction from cache  110  (or program memory). In addition, fetch/decode circuitry  120  evaluates an opcode in an instruction and transmits control signals along channels  125   x,    125   y  to control the movement of data between designated registers and a number of functional units. The functional units include a Multiplier Accumulator (MAC)  132 , an Integer Unit (INT)  134 , a Galois Field Unit (GFU)  136 , and a Load/Store Unit (LSU)  140 . 
         [0018]    Processor system  100  includes two SIMD execution units  130   x,    130   y,  one on the X-side of the machine and one on the Y-side of the machine. Each of the SIMD execution units  130   x,    130   y  includes a Multiplier Accumulator Unit (MAC)  132 , an Integer Unit (INT)  134 , and a Galois Field Unit (GFU)  136 . MAC units  132   x,    132   y  perform the process of multiplication and addition of products commonly used in many digital signal processing algorithms. Integer units  134   x,    134   y  perform many common operations on integer values used in general computation and signal processing. Galois field units  136   x,    136   y  perform special operations using Galois field arithmetic such as may be executed in implementations of the Reed-Solomon error protection coding scheme. 
         [0019]    In addition, a Load/Store Unit (LSU)  140   x,    140   y  is provided on the X and Y-side SIMD units. Load/store units  140   x,    140   y  perform accesses to a data cache or RAM, either to load data values from the data cache/RAM into a general purpose register  155  or to store values to the data cache/RAM from a general purpose register  155 . 
         [0020]    Processor system  100  further includes a dual port data cache (DCACHE)  170  coupled to the X-side and Y-side SIMD units and a data memory (not shown). Although  FIG. 1  depicts a DCACHE, as would be appreciated by persons of skill in the art, other storage implementations can be used with the present invention. 
         [0021]    Processor system  100  includes multiple registers (M-registers)  150  for holding multiply-accumulate results and multiple general purpose registers (GPRs)  155 . In an embodiment, processor system  100  includes four M-registers and sixty-four 64-bit GPRs. Processor system  100  also includes multiple control registers  160  and multiple predicate registers  165 . 
         [0022]    In order to perform SIMD multiplication operations on four 16-bit operands to produce four lanes of output, each MAC unit  132   x  and  132   y  would need to include at least four 16-bit multipliers. However, in processor system  100  each MAC unit  132   x  and  132   y  can also perform SIMD multiplication operations on two 32-bit operands to produce two lanes of output. In order to support this, each MAC unit  132   x  and  132   y  includes eight 16-bit multipliers, wherein four 16-bit multipliers are used to perform a single 32-bit multiply. 
       2. Non-Decimating FIR Filtering Operations in Accordance with an Embodiment of the Present Invention 
       [0023]    A non-decimating FIR filter can typically be expressed in the form: 
         [0000]    
       
         
           
             
               output 
               i 
             
             = 
             
               
                 ∑ 
                 
                   j 
                   = 
                   0 
                 
                 
                   L 
                   - 
                   1 
                 
               
                
               
                 
                   input 
                   
                     i 
                     + 
                     j 
                   
                 
                 · 
                 
                   coeff 
                   j 
                 
               
             
           
         
       
     
         [0000]    where input i  is an input sample, output i  is an output sample, L is the length of the filter, and coeff 0 , coeff 1 , coeff 2 , . . . , coeff L−1  are the filter coefficients. Based on the foregoing equation, it can be seen that the necessary operations for producing 8 output samples may be represented as follows: 
         [0000]      output 0 =input 0 ·coeff 0 +input 1 ·coeff 2 +input 2 ·coeff 2 +input 3 ·coeff 3 + . . . input L−1 ·coeff L−1 , 
         [0000]      output 1 =input 1 ·coeff 0 +input 2 ·coeff 1 +input 3 ·coeff 2 +input 4 ·coeff 3 + . . . input L ·coeff L−1 , 
         [0000]      output 2 =input 2 ·coeff 0 +input 3 ·coeff 1 +input 4 ·coeff 2 +input 5 ·coeff 3 + . . . input L+1 ·coeff L−1 , 
         [0000]      output 3 =input 3 ·coeff 0 +input 4 ·coeff 1 +input 5 ·coeff 2 +input 6 ·coeff 3 + . . . input L+2 ·coeff L−1 , 
         [0000]      . . . 
         [0000]      output 1 =input 1 ·coeff 0 +input 8 ·coeff 1 +input 9 ·coeff 2 +input 10 ·coeff 3 + . . . input L+6 ·coeff L−1 . 
         [0024]    One approach for performing the foregoing operations on a processor system having two SIMD units such as processor system  100  will now be described. For the purposes of this description, it will be assumed that the input and output samples are 16-bit samples, and the filter coefficients are 16-bit signed samples with 15 binary places. However, as will be readily appreciated by persons skilled in the art, other representations of the input and output samples and filter coefficients may be used. 
         [0025]    In accordance with this approach, for every eight output samples to be generated, L successive MAC instructions are executed, wherein each MAC instruction causes each of MAC  132   x  and MAC  132   y  to multiply four successive input samples by the same respective filter coefficient value. With each successive MAC instruction, the input is shifted by one input sample. Representative programming logic for a loop that performs these operations is as follows: 
         [0000]    
       
         
               
             
               
               
             
           
               
                   
               
             
             
               
                 loop: 
               
               
                  MZC2SSH m0/m1, inx0to3/iny4to7, coeff0.h0 : LDL2 inx0to3/iny4to7, 
               
               
                  [input, #0] 
               
               
                  MAC2SSH m0/m1, inx1to4/iny5to8, coeff0.h1 : LDL2 inx1to4/iny5to8, 
               
               
                  [input, #2] 
               
               
                  MAC2SSH m0/m1, inx2to6/iny6to9, coeff0.h2 : LDL2 inx2to5/iny6to9, 
               
               
                  [input, #4] 
               
               
                  . . . 
               
               
                  MAC2SSH m0/m1, inx(L−1)to(L+2)/iny(L+3)to(L+6), 
               
               
                  coeff&lt;m&gt;.h&lt;n&gt; : LDL2 . . . 
               
             
          
           
               
                  MMV2H 
                 out0/out1, m0/m1, shift 
               
               
                  . . . 
               
               
                  STL2 
                 out0/out1, [output], #16! 
               
               
                  SBCCL 
                 loop :    SUBWBS len, len, #1 
               
               
                   
               
             
          
         
       
     
         [0026]    This approach will now be described with reference to flowchart  200  of  FIG. 2 . As shown in  FIG. 2 , at step  202 , L 16-bit filter coefficients are initially loaded as half-words in GPRs  155 , such that four filter coefficients are loaded in a single 64-bit GPR. Thus, for example, four filter coefficients loaded in a register coeff0 may be individually identified as coeff0.h0, coeff0.h1, coeff0.h2 and coeff0.h3. 
         [0027]    At step  204 , an iteration of a loop in accordance with the foregoing programming logic is performed for every eight output samples to be generated. As will be appreciated by persons skilled in the art, performance of an iteration of the loop includes issuing, decoding and executing instructions that cause functional units within processor system  100  to perform steps  206 ,  208 ,  210  and  212  shown in  FIG. 2 . These steps will now be described. 
         [0028]    At step  206 , each of a first (X-side) and second (Y-side) M register is initialized to zero. These X-side and Y-side M registers will be used to store the accumulated results of L successive MAC instructions, as will be described below. In the foregoing programming logic, the X-side and Y-side M registers are identified as m0 and m1, respectively. 
         [0029]    In the foregoing programming logic, the step of initializing M registers m0 and m1 is programmed using an MZC2SSH instruction as the first MAC instruction. Execution of this instruction causes the contents of M register m0 to be overwritten with the product of the four input samples stored in GPR inx0to3 and the filter coefficient stored in the first half-word of GPR coeff0 and causes the contents of M register m1 to be overwritten with the product of the four input samples stored in GPR iny4to7 and the same filter coefficient. As will be appreciated by persons skilled in the art, overwriting the M registers in this manner is the equivalent of initializing the M registers m0 and m1 to zero prior to executing a MAC instruction. 
         [0030]    At step  208 , L successive MAC instructions are executed, each MAC instruction using as source operands four successive 16-bit X-side input samples, four successive 16-bit Y-side input samples, and a single 16-bit filter coefficient. As specified by each MAC instruction, the source of the four successive 16-bit X-side input samples is a first 64-bit GPR, the source of the four successive 16-bit Y-side input samples is a second 64-bit GPR, and the source of the single 16-bit filter coefficient is a specified half-word within a third 64-bit GPR. Each MAC instruction specifies as a destination both an X-side and Y-side M register. As shown in the foregoing programming logic, each MAC instruction may also be executed along with an LDL2 instruction that loads four new successive 16-bit X-side input samples and four new successive 16-bit Y-side input samples into the first and second 64-bit GPR registers, respectively, for use in a subsequent iteration of the loop (i.e., to produce the next set of eight output samples). 
         [0031]    Thus, for example, the first MAC instruction in the foregoing programming logic specifies inx0to3 as the source of the four successive 16-bit X-side input samples input 0 , input 1 , input 2  and input 3 , specifies iny4to7 as the source of the four successive 16-bit Y-side input samples input 4 , input 5 , input 6  and input 7 , and specifies coeff0.h0 as the source of the single 16-bit filter coefficient coeff 0 . The first MAC instruction in the foregoing programming logic specifies as a destination the X-side M register m0 and the Y-side destination register m1. 
         [0032]    Responsive to the execution of each MAC instruction, the X-side MAC unit  132   x  multiplies each of the four X-side input samples specified in the instruction by the filter coefficient specified in the instruction and adds the product to a value stored in a corresponding one of four lanes in the X-side M register. Further responsive to the execution of each MAC instruction, the Y-side MAC unit  132   y  multiplies each of the four Y-side input samples specified in the instruction by the filter coefficient specified in the instruction and adds the product to a value stored in a corresponding one of four lanes in the Y-side M register. In the foregoing programming logic, the steps of performing L successive MAC instructions are programmed using the MZC2SSH instruction and the multiple MAC2SSH instructions. 
         [0033]    As noted above, with each successive MAC instruction, the input is shifted by a single input sample. 
         [0034]    At step  210 , after the execution of the L successive MAC instructions, the four values stored in the X-side M register are moved to a first GPR and the four values stored in the Y-side M register are moved to a second GPR for output purposes. Each of the eight values is stored in a GPR as a half-word value. These eight values are the eight output samples from the non-decimating FIR filtering function. In the foregoing programming logic, this step is programmed using the MMV2H instructions, wherein the X-side and Y-side M registers are identified as m0 and m1, respectively, and the first and second GPRs are identified as out0 and out1 respectively. 
         [0035]    After the eight output samples have been moved to first and second GPRs in accordance with step  210 , they are then stored to a data cache/RAM as shown at step  212 . In the foregoing program logic, this step is programmed using the STL2 instruction. 
         [0036]      FIG. 3  illustrates the MAC operations that are performed by MAC unit  132   x  and MAC unit  132   y  in accordance with step  208  and the foregoing programming logic to generate four output samples per side, for a total of eight output samples. In particular, MAC unit  132   x  produces the four output samples output 0 , output 1 , output 2  and output 3 , and MAC unit  132   y  produces the four output samples output 4 , output 5 , output 6  and output 7 . As reflected in  FIG. 3 , the input samples are shifted by only a single sample for each successive MAC operation, hence there is a significant amount of redundancy in terms of the data being passed in. 
         [0037]    Execution of the first two MAC instructions of the foregoing programming code cause the calculations delineated in area  302  of  FIG. 3  to be performed. As shown in  FIG. 3 , execution of the two instructions results in the performance of eight 16-bit multiplications within each of MAC unit  132   x  and MAC unit  132   y.  However, as noted in Section 1, above, each MAC unit  132   x  and  132   y  includes eight 16-bit multipliers to support 32-bit multiplication operation on two lanes of data. In view of this, it would be desirable to provide a single instruction that, when executed, caused all of the calculations delineated in area  302  of  FIG. 3  to be performed, thereby maximizing the use of the 16-bit multipliers within MAC units  132   x  and  132   y  and increasing throughput. 
         [0038]    A problem arises, however, because performance of the calculations delineated in area  302  of  FIG. 3  requires five 16-bit input samples per SIMD unit, which is more than can be passed in a single 64-bit GPR. To address this, an embodiment of the present invention utilizes two 64-bit holding registers  402  and  404 , one for each SIMD unit within processor system  100 , to provide the additional input samples necessary for performance of the eight 16-bit multiplication operations on each side of the machine. These holding registers may be implemented as part of control registers  160  of processor system  100 , as depicted in  FIG. 4A , or as independent registers within the register set of processor system  100 , as depicted in  FIG. 4B . Persons skilled in the art will readily appreciate that this is simply a matter of design choice. 
         [0039]    The manner in which holding registers  402  and  404  are used to implement all of the calculations delineated in area  302  of  FIG. 3  via a single instruction will now be described. This approach leverages both the redundancy in the input samples required for each MAC operation and the inclusion of eight 16-bit multipliers on each side of processor system  100  to increase system throughput and accelerate the generation of output samples of the non-decimating FIR filtering function. 
         [0040]    In part, the method includes performing the following steps for every eight output samples to be generated. First, the X-side holding register  402  is initialized by loading input samples input 0  to input 3  therein and the Y-side holding register  404  is initialized by loading input samples input 4  to input 7  therein. A series of instructions (generally referred to herein as FIR instructions) is then issued, each of which passes in two further input samples to each SIMD unit. The two further input samples are specified as being in either the first two half-words (h0 and h1) or in the last two half-words (h2 and h3) of a GPR. Each FIR instruction also specifies which half-word lanes of a coefficient register are used for the two stages. In one embodiment, these can be specified as adjacent lanes in ascending order (e.g., h01, h23). However, in an alternate embodiment, the half-word lanes of the coefficient register can also be specified in a descending order (e.g., either h01, h23, h10 or h32). As will be appreciated by persons skilled in the art, this latter embodiment may be useful in the case of a non-decimating FIR filter having symmetric coefficients. 
         [0041]    Example programming logic for a loop used in performing this method is as follows: 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
           
               
                   
               
             
             
               
                 loop: 
               
             
          
           
               
                   
                 PUT2FIR 
                 inx0to3/iny4to7 
                 : LDL2 inx0to3/iny4to7, [input, #0] 
               
               
                   
                 FIR2ZSSH 
                 m0/m1, inx4to7/iny8to11.h01, coeff0.h01 
               
             
          
           
               
                   
                 FIR2ASSH 
                 m0/m1, inx4to7/iny8to11.h23, coeff0.h23 
                 : LDL2 inx4to7/iny8to11 [input, #4] 
               
               
                   
                 FIR2ASSH 
                 m0/m1, inx8to11/iny12to15.h01, coeff1.h01 
               
               
                   
                 FIR2ASSH 
                 m0/m1, inx8to11/iny12to15.h23, coeff1.h23 
                 : LDL2 inx8to11/iny12to15, [input, #8] 
               
               
                   
                 . . . 
               
             
          
           
               
                   
                 FIR2ASSH 
                 m0/m1, inx&lt;L+2&gt;to&lt;L+5&gt;/iny&lt;L+6&gt;to&lt;L+9&gt;m coeff&lt;m&gt;.h?? : LDL2 . . . 
               
               
                   
                 MMV2H 
                 out0/out1, m0/m1, shift 
               
               
                   
                 . . . 
               
               
                   
                 STL2 
                 out0/out1, [output], #16! 
               
             
          
           
               
                   
                 SBCCL 
                 loop 
                 : SUBWBS len, len, #1 
               
               
                   
                   
               
             
          
         
       
     
         [0042]    This approach will now be described with reference to flowchart  500  of  FIG. 5 . As shown in  FIG. 5 , at step  502 , L 16-bit filter coefficients are initially loaded as half-words in GPRs  155 , such that four filter coefficients are loaded in a single 64-bit GPR. Thus, for example, four filter coefficients loaded in a register coeff0 may be individually identified as coeff0.h0, coeff0.h1, coeff0.h2 and coeff0.h3. In addition, as noted above, adjacent pairs of filter coefficients loaded in register coeff0 may be identified, for example, as coeff0.h01 and coeff0.h23. 
         [0043]    At step  504 , an iteration of a loop in accordance with the foregoing programming logic is performed for every eight output samples to be generated. As will be appreciated by persons skilled in the art, performance of an iteration of the loop includes issuing, decoding and executing instructions that cause functional units within processor system  100  to perform steps  506 ,  508 ,  510 ,  512  and  514  as shown in  FIG. 5 . These steps will now be described. 
         [0044]    At step  506 , the X-side 64-bit holding register is set with a first set of four successive 16-bit input samples (input 0 -input 3 ) and the Y-side 64-bit holding register is set with a second set of four successive 16-bit input samples (input 4 -input 7 ). In the foregoing programming logic, this step is programmed using the PUT2FIR instruction. As demonstrated by the foregoing programming logic, the PUT2FIR instruction may be executed along with an LDL2 instruction which loads a new set of input samples into registers inx0to3/iny4to7 for a subsequent iteration of the loop. 
         [0045]    At step  508 , each of a first (X-side) and second (Y-side) M register is initialized to zero. These X-side and Y-side M registers will be used to store the accumulated results of L/2 successive FIR instructions, as will be described below. In the foregoing programming logic, the X-side and Y-side M registers are identified as m0 and m1, respectively, and the step of initializing M registers m0 and m1 is programmed using an FIR2ZSSH instruction as the first FIR instruction. Execution of this instruction causes the contents of M registers m0 and m1 to be overwritten with the results of the FIR instruction. As will be appreciated by persons skilled in the art, overwriting the M registers in this manner is the equivalent of initializing the M registers m0 and m1 to zero prior to executing a FIR instruction. 
         [0046]    At step  510 , L/2 successive FIR instructions are executed, wherein each FIR instruction specifies as source operands first and second successive 16-bit X-side input samples, first and second successive 16-bit Y-side input samples, and first and second 16-bit filter coefficients. The first and second successive 16-bit X-side input samples are the two input samples immediately following the last input sample in the X-side holding register. The first and second successive 16-bit Y-side input samples are the two input samples immediately following the last input sample in the Y-side holding register. Each FIR instruction also specifies as the destination the X-side and Y-side M registers. 
         [0047]    As identified by each FIR instruction, the source of the first and second successive 16-bit X-side input samples are two half-words of a first (X-side) 64-bit GPR that stores four successive X-side input samples, the source of the first and second successive 16-bit Y-side input samples are two half-words of a second (Y-side) 64-bit GPR that stores four successive Y-side input samples, and the source of the first and second 16-bit filter coefficients are two half-words of a GPR that stores four filter coefficients. As shown in the foregoing programming logic, every other FIR instruction is executed along with an LDL2 instruction that loads four new successive 16-bit X-side input samples and four new successive 16-bit Y-side input samples into the first and second GPRs, respectively, for use in a subsequent iteration of the loop (i.e., to produce the next set of eight output samples). 
         [0048]    Thus, for example, the first FIR instruction in the foregoing programming logic specifies inx4to7.h01 as the source of the first and second successive 16-bit X-side input samples input 4  and input 5 , specifies iny8to11.h01 as the source of the first and second successive 16-bit Y-side input samples input 8  and input 9 , and specifies coeff0.h01 as the source of the first and second 16-bit filter coefficient coeff 0  and coeff 1 . The first FIR instruction in the foregoing programming logic specifies as a destination the X-side M register m0 and the Y-side destination register m1. 
         [0049]    The operations that occur responsive to the execution of each FIR instruction will be described in detail below with reference to  FIG. 6 . With each successive pair of FIR instructions, the input is shifted by four input samples. 
         [0050]    At step  512 , after the execution of the L/2 successive FIR instructions, the four values stored in the X-side M register are moved to a first GPR and the four values stored in the Y-side M register are moved to a second GPR for output purposes. Each of the eight values is stored in a GPR as a half-word value. These eight values are the eight output samples from the non-decimating FIR filtering function. In the foregoing programming logic, this step is programmed using the MMV2H instructions, wherein the X-side and Y-side M registers are identified as m0 and m1, respectively, and the first and second GPRs are identified as out0 and out1 respectively. 
         [0051]    After the eight output samples have been moved to first and second GPRs in accordance with step  512 , they are then stored to a data cache/RAM as shown at step  514 . In the foregoing program logic, this step is programmed using the STL2 instruction. 
         [0052]      FIG. 6  illustrates operations that occur responsive to the execution of a FIR instruction as described above in reference to  FIG. 5  and the foregoing programming logic.  FIG. 6  illustrates the operations that occur on the X-side of processor system  100  only. An identical set of operations also occurs on the Y-side of the machine as well, but have not been described here for the sake of brevity. Such operations can be readily understood by simply substituting the term “Y-side” for “X-side” in the following description. 
         [0053]    In step  602 , the product of the first input sample stored in the X-side holding register and the first filter coefficient specified in the FIR instruction is added to the product of the second input sample stored in the X-side holding register and the second filter coefficient specified in the FIR instruction. The total is then added to one of the four lanes of the X-side M register. For example, with reference to the first FIR instruction in the foregoing programming logic, this step would result in the sum of the product of input 0  and coeff 0  and the product of input 1  and coeff 1  being stored in a first lane of M register m0. 
         [0054]    In step  604 , the product of the second input sample stored in the X-side holding register and the first filter coefficient specified in the FIR instruction is added to the product of third input sample stored in the X-side holding register and the second filter coefficient specified in the FIR instruction. The total is then added to another of the four lanes of the X-side M register. For example, with reference to the first FIR instruction in the foregoing programming logic, this step would result in the sum of the product of input 1  and coeff 0  and the product of input 2  and coeff 1  being stored in a second lane of M register m0. 
         [0055]    In step  606 , the product of the third input sample stored in the X-side holding register and the first filter coefficient specified in the FIR instruction is added to the product of the fourth input sample stored in the X-side holding register and the second filter coefficient specified in the FIR instruction. The total is then added to another of the four lanes of the X-side M register. For example, with reference to the first FIR instruction in the foregoing programming logic, this step would result in the sum of the product of input 2  and coeff 0  and the product of input 3  and coeff 1  being stored in a third lane of M register m0. 
         [0056]    In step  608 , the product of the fourth input sample stored in the X-side holding register and the first filter coefficient specified in the FIR instruction is added to the product of the first X-side input sample specified in the FIR instruction and the second filter coefficient specified in the FIR instruction. The total is then added to another of the four lanes of the X-side M register. For example, with reference to the first FIR instruction in the foregoing programming logic, this step would result in the sum of the product of input 3  and coeff 0  and the product of input 4  and coeff 1  being stored in a fourth lane of M register m0. 
         [0057]    In step  610 , the last two X-side input samples stored in the X-side holding register are moved from the last two half-words of the X-side holding register to the first two half-words of the X-side holding register. For example, with reference to the first FIR instruction in the foregoing programming example, this step would result in input 2  and input 3  being moved from the last two half-word locations (h23) of the X-side holding register to the first two half-word locations (h01). 
         [0058]    In step  612 , the two successive X-side input samples specified in the FIR instruction are moved into the last two half-words of the X-side holding register. For example, with reference to the first FIR instruction in the foregoing programming example, this step would result in input 4  and input 5  being moved to the last two half-word locations (h23) of the X-side holding register. 
         [0059]    Based on the foregoing, it can be seen that upon completion of the steps of flowchart  600 , the operations corresponding to two MAC instructions shown in  FIG. 3  have been completed via the processing of a single FIR instruction. For example, after execution of the first FIR instruction in the foregoing programming logic, the M registers m0 and m1 will contain the same results as those obtained from performing the two iterations of MAC operations depicted area  302  of  FIG. 3 . Furthermore, the shifting of two new input samples into the X-side and Y-side holding register ensure that the proper operands are available for a subsequent FIR operation. 
       4. Example Instructions in Accordance with an Embodiment of the Present Invention 
       [0060]    Example instructions that may be used to implement an embodiment of the present invention are described below. However, these examples are not intended to be limiting and persons skilled in the art will readily appreciate that other instructions and instruction formats may be used to practice the present invention. 
         [0000]    
       
         
               
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
             
               
               
             
               
               
             
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 a. 
                 PUTFIR 
               
             
          
           
               
                   
                 Format: 
               
             
          
           
               
                   
                 PUTFIR input 
               
             
          
           
               
                   
                 Effect: 
               
             
          
           
               
                   
                 FIR_hold[63:0] = input[63:0]; 
               
             
          
           
               
                   
                 Description: 
               
             
          
           
               
                   
                 This instruction sets the FIR holding register. 
               
             
          
           
               
                   
                 b. 
                 GETFIR 
               
             
          
           
               
                   
                 Format: 
               
             
          
           
               
                   
                 GETFIR output 
               
             
          
           
               
                   
                 Effect: 
               
             
          
           
               
                   
                 output[63:0] = FIR_hold[63:0]; 
               
             
          
           
               
                   
                 Description: 
               
             
          
           
               
                   
                 This instruction reads the FIR holding register for that side, for 
               
             
          
           
               
                   
                 context-switching/verification purposes only. 
               
             
          
           
               
                   
                 c. 
                 FIRxxxH 
               
             
          
           
               
                   
                 Format: 
               
               
                   
                  FIR&lt;mode&gt;S&lt;signed&gt;H Mreg, input.&lt;input_field&gt;, coeff.&lt;coeff.field&gt; 
               
             
          
           
               
                   
                 where: 
               
               
                   
                 mode = Z, A, N or D; 
               
               
                   
                 signed = S or U; 
               
               
                   
                 input_field = h01 or h23; 
               
               
                   
                 coeff_field = h01, h23, h10 or h32 
               
             
          
           
               
                   
                 Effect: 
               
             
          
           
               
                 Let input_field = h&lt;i0&gt;&lt;i1&gt; and coeff_field = h&lt;c0&gt;&lt;c1&gt;. 
               
               
                 Then: 
               
             
          
           
               
                   
                 prod.h0&lt;31:0&gt; = FIR_hold.h0 * coeff.h&lt;c0&gt; + FIR_hold.h1 * coeff.h&lt;c1&gt;; 
               
               
                   
                 prod.h1&lt;31:0&gt; = FIR_hold.h1 * coeff.h&lt;c0&gt; + FIR_hold.h2 * coeff.h&lt;c1&gt;; 
               
               
                   
                 prod.h2&lt;31:0&gt; = FIR_hold.h2 * coeff.h&lt;c0&gt; + FIR_hold.h3 * coeff.h&lt;c1&gt;; 
               
               
                   
                 prod.h3&lt;31:0&gt; = FIR_hold.h3 * coeff.h&lt;c0&gt; + input.h&lt;i0&gt; * coeff.h&lt;c1&gt;; 
               
               
                   
                 FIR_hold_new.h0 = FIR_hold.h2; 
               
               
                   
                 FIR_hold_new.h1 = FIR_hold.h3 
               
               
                   
                 FIR_hold_new.h2 = input.h&lt;i0&gt;; 
               
               
                   
                 FIR_hold_new.h3 = input.h&lt;i1&gt;; 
               
               
                   
                 switch(mode) 
               
               
                   
                 { 
               
             
          
           
               
                   
                 case ‘Z’: Mreg = prod; 
               
               
                   
                 case ‘A’: Mreg += prod; 
               
               
                   
                 case ‘N’: Mreg = −prod; 
               
               
                   
                 case ‘D’: Mreg −= prod; 
               
             
          
           
               
                   
                 } 
               
               
                   
                  Description: 
               
             
          
           
               
                   
                 This instruction performs 2 stages of a non-decimating FIR filter. 
               
               
                   
                   
               
             
          
         
       
     
       5. Conclusion 
       [0061]    While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not limitation. It will be apparent to persons skilled in the relevant art that various changes in form and detail can be made therein without departing from the spirit and scope of the invention. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.