Abstract:
Using mode bits, multiple coding standards are supported by a single digital signal processor. The mode bits specify which coding standard is implemented so that the system will perform the correct data manipulation operations for that coding standard. Mode bits are provided for shift fifteen bits operations and shift-and-round operations.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a system and method for speech and audio coding and, more particularly, to a system and method that uses mode bits to specify which coding standard is implemented so that the system will perform the correct data manipulation operations for that coding standard. 
     BACKGROUND OF THE INVENTION 
     Mobile communications devices such as cellular telephones communicate with telephones and computer systems using analog or digital signals at various stages of the signal transmission path. The conversion of the analog signals to the digital signals, and vice versa, is accomplished using analog-to-digital and digital-to-analog converters. The compression of speech signals is accomplished using one of several speech (and audio) coding standards. 
     Some of the more important coding standards include the North American cellular standards (e.g., IS54), the ITU-T standards G.723, G.728 and G.729, and the European cellular standards (GSM-EFR, GSM-FR and GSM-HR). The speech processing specifications of GSM are described, for example, in the  GSM  6.01-6.32  Recommendation Specification  document or in the book by Michel Mouly and Marie-Bernadette Pauter entitled  The GSM System for Mobile, Communications,  Palaiseau, France, ISBN 2-9507190-0-7. 
     Typically, these coding standards include various algorithm specifications that define how data must be manipulated so that the data conforms to the coding standard. For example, GSM is specified in a bit-exact standard that defines in detail all arithmetic operations and their required accuracy. Thus, each implementation that follows the standard will produce the same output for a given input sequence. By providing a collection of test vectors as part of the standard, compliance with GSM is easily verified. 
     As a result of strict specifications such as this, a given data operation may need to be implemented differently depending on the standard being applied. For example, a multiple-precision multiply operation that shifts the bits in a data word fifteen bits to the right is specified as a shift right fifteen bits operation in GSM-HR, but is specified as a shift right sixteen bits and a shift left one bit operation in GSM-EFR. 
     Conventionally, coding processing systems are implemented and configured for a single coding standard. That is, a given system cannot be dynamically switched between different coding standards. Thus, to provide the appropriate decoding for different coding standards, more than one coding system is required. This can significantly increase the cost to a user should he or she need to upgrade his or her system to support a different coding standard. 
     Thus, a need exists for a coding processing system that can conveniently and economically process signals defined according to a variety of coding formats. 
     SUMMARY OF THE INVENTION 
     Mode bits incorporated into a digital signal processor define the implementation of various data operations associated with coding standards. The digital signal processor can be reconfigured to accommodate a different coding standard simply by changing the setting of the mode bit. 
     In one embodiment, a shift fifteen mode bit defines whether the system performs a conventional shift right fifteen bits operation or whether it performs a shift right sixteen bits and a shift left one bit operation. By using the mode bit to specify the coding standard, the system can use a common shift fifteen instruction for both GSM-HR and GSM-EFR coding standards. 
     In another embodiment, a mode bit supports a shift-and-round operation. This mode bit defines whether to route the most significant bit shifted out of a data word to the carry bit of an adder in the next stage of the processing chain. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     These and other features of the invention will become apparent from the following detailed description of the preferred embodiments and the claims, when taken with the accompanying drawings, wherein similar reference characters refer to similar elements throughout and in which: 
     FIG. 1 is a block diagram illustrating one embodiment of a data arithmetic unit incorporating the present invention; 
     FIGS. 2A-2C are a graphical representation of shift fifteen bits operations as treated herein; 
     FIG. 3 is a block diagram illustrating one embodiment of a data shifter used to implement the shift fifteen bits operation of the present invention; and 
     FIG. 4 is a block diagram illustrating one embodiment of an implementation of a shift-and-round operation according to the present invention. 
    
    
     DESCRIPTION OF PREFERRED EMBODIMENTS 
     A digital signal processor (DSP) is a special-purpose CPU utilized for digital processing and analysis of signals from analog sources, such as sound. The analog signals are converted into digital data and analyzed using various algorithms, such as Fast Fourier Transforms. DSPs are designed for particularly fast performance of certain operations (such as multiplication, multiplying and accumulating, and shifting and accumulating) because the math-intensive processing applications for DSPs rely heavily on such operations. For this reason, a DSP will typically include special hardware circuits to perform multiplication, accumulation and shifting operations. 
     One popular form of DSP architecture is known as a Multiply-Accumulate or MAC processor. The MAC processor implements an architecture that takes advantage of the fact that the most common data processing operations involve multiplying two values, then adding the resulting value to another and accumulating the result. These basic operations are efficiently carried out utilizing specially configured, high-speed multipliers and accumulators, hence the “Multiply-Accumulate” nomenclature. In order to increase the processing power of MAC processors, they have been designed to perform different processes concurrently. Towards this end, DSP architectures with plural MAC structures have been developed. For example, a dual MAC processor is capable of performing two independent MAC operations concurrently. 
     FIG. 1 illustrates a data arithmetic unit (“DAU”) D of a digital signal processor (not shown). 
     Referring now to FIG. 1, the present invention may be implemented in a wide range of digital signal processing applications. Preferably the invention is incorporated in a data arithmetic unit (“DAU”), D, for use in a dual-MAC processor. 
     The DAU includes dual 32-bit registers x( 32 ) and y( 32 ) that are operated as four 16-bit registers yh, yl, xh and xl when used providing the inputs to two signed 16-bit×16-bit multipliers M 1  and M 2 . The respective multipliers produce respective 32-bit results stored into respective product registers p 0 ( 32 ) and p 1 ( 32 ). The product registers communicate with a 32-bit data bus IDB( 32 ) that serves as the primary data path for the data arithmetic unit. 
     The data stored in the respective product registers p 0 ( 32 ) and p 1 ( 32 ) may undergo arithmetic register shifts and are fed through multiplexers MUX to either a 40-bit arithmetic-logic-unit ALU with an add/compare/select feature ACS, a 40-bit manipulation unit BMU, or a 40-bit 3-input adder/subtractor ADDER. The arithmetic-logic-unit implements addition, subtraction, and various logical operations. The bit manipulation unit implements barrel-shifts, bit insertion and extraction, and normalization. As a complement to the arithmetic and bit manipulation units, the adder performs general addition and subtraction operations. Concurrent multiply and accumulation operations may be achieved by using the multipliers, the ALU and the ADDER. 
     Respective saturator units disposed at the outputs of the respective arithmetic, bit manipulation and adder units ALU, BMU and ADDER enable overflow saturation to modify the respective results. The overflow saturation feature also optionally affects accumulator values as the data is transferred to memory or to one or more registers. This feature accommodates various speech coding standards such as Global System Modulation, or GSM, vocoders at full, half and enhanced full rates. Moreover, shifting in the arithmetic pipeline occurs at several stages to accommodate various standards for extended-precision multiplications. 
     The modified results from the respective saturators are then fed through a split multiplexer SPLITMUX to a register array comprising eight 40-bit accumulators a 0  through a 7 . Each of the respective accumulator pairs includes respective high and low parts. 
     The data arithmetic unit DAU also conveniently includes a plurality of 16-bit, bus-accessible control registers including counters c 0 -c 2 , arithmetic unit control registers auc 0  and auc 1 , processor status words psw 0  and pws 1 , auxiliary registers ar 0 -ar 3 , and a Viterbi support word vsw. 
     Of primary importance here, the DAU D includes a shifter  20  for performing a shift right fifteen bit operation, a bit manipulation unit (“BMU”)  22 , and arithmetic logic unit (“ALU”)  24  and a mode bit register auc 0   26 . 
     The shift fifteen operation is described in detail in FIGS. 2-3. The representations designated A, B and C in FIG. 2 represent the state of a data word and associated data bits before and after bit shift operations. The numbers above the data words represent bit positions. For example, in A bits  0 - 15  are represented by the speckled portion of the data word. A 32 bit word designated in A by bits  0 - 31  is right shifted by fifteen bits (as represented by the arrows in B and C) by two alternate methods, the two results being herein designated B and C. The shift operation described in B is a standard shift (commonly designated: &gt;&gt;15). The shift operation described in C is a shift right sixteen and shift left one bit operation (typically designated: &gt;&gt;16&lt;&lt;1). This operation leaves bit  0  of the shifted data ( 28 ) cleared, regardless of the value of bit  15  ( 30 ) in A. In contrast, B illustrates that after the shift bit  0  ( 28 ) is unchanged from bit  15  ( 30 ) in A. 
     FIG. 3 depicts one embodiment of the shift fifteen circuit. A multiplexer  32  (one of the multiplexers MUX shown below product registers p 0 , p 1  in FIG. 1) selects either the unshifted data  36  from a data source  34  or the bits from the data source  34  that correspond to a shift of fifteen bits to the right  38 . In FIG. 1, this would be achieved by controlling the shifting of the outputs of p 0 , p 1 . For the implementation of the shift operation as depicted in FIG. 3, bit  15  from the data source is connected to input bit  0  of the bits  38 . To reduce the complexity of FIG. 3, only a few representative connections are illustrated. 
     A shift fifteen (SHFT 15 ) mode bit  40  controls whether the shift is a &gt;&gt;15 or a &gt;&gt;16&lt;&lt;1 operation. If the SHFT 15  mode bit  40  in the auc 0  register  26  (FIG. 1) is not set, bit  0  of the shifted data passes through the multiplexer  32  unchanged. If the SHFT 15  mode bit  40  in the auc 0  register  26  is set, bit  0  of the shifted data is cleared by the circuit  42  when it is passes through the multiplexer. 
     In an alternative embodiment the actual shift operations specified may be performed (e.g., the data word is actually shifted). However, the embodiment of FIG. 3 offers data throughput performance advantages that are important in high speed DSP applications. 
     Programming examples of multiple-precision multiplies incorporating the SHFT 15  mode bit follow. 
     The first example shows a 16×31 multiply using GSM-HR:        auc0   =         AUC_DEFAULT              /     *              SHFT15     =       0   *     /                         a0       =       0                 p0     =       0                 p1     =       0                 y     =       *     r0   ++                   xh     =     *     pt0   ++                             p0   =       xh   *   yh                 p1     =     xh   *   y1                                a0   =     a0   +   p0   +   p1       &gt;&gt;   15                                       
     In the first line, the SHFT 15  mode bit  40  is maintained at its default value (0 or cleared). In the second line, the product registers p 0 , p 1  and the accumulator a 0  are reset, and the y and xh registers are loaded via a pointer. In the third line, the products of xh with the two parts of the y register are formed, and in the fourth line, the two products are added, with the lower order product, p 1 , shifted right by 15. With bit  40  cleared, the shift is an ordinary right shift by 15 bits, with the 0 bit of the a 0  data being unchanged. 
     The second example shows a 16×31 multiply using GSM-EFR or G.729:        auc0   =       AUC_DEFAULT   +       AUC_SHFT15              /     *              SHFT15       =       1   *     /                         a0       =       0                 p0     =       0                 p1     =       0                 y     =       *     r0   ++                   xh     =     *     pt0   ++                             p0   =       xh   *   yh                 p1     =     xh   *   y1                              a0   =     a0   +   p0   +   p1       &gt;&gt;       15              /     *              This                 is                   “                p1   &gt;&gt;     16                   &lt;&lt;   1                    ”                   not                 “                p1   &gt;&gt;   15                ”                *   /                                       
     In the first line, the SHFT 15  mode bit  40  is set to 1. The remainder of the code is the same, except mode bit  40  now causes the 0 bit of the a 0  data to be cleared, simulating a &gt;&gt;16&lt;&lt;1 shift. 
     It is clear that the same instructions are used for GSM-HR, GSM-EFR and G.729 extended precision multiplies. Thus, the invention described herein saves valuable instruction space, yet provides the flexibility to support multiple coding standards. Moreover, the relative simplicity of this design allows it to be implemented using less circuitry than some prior methods. 
     FIG. 4 illustrates another embodiment of the invention that is directed to a shift-and-round operation. An S&amp;R bit  46  defined, for example, in the auc 0  register  26  (FIG. 1) specifies whether the most significant bit (“MSB”)  48  of the bits shifted out of a data word  50  is routed to the carry input of bit  0  ( 52 ) of the subsequent adder. When the adder  58  is doing an add operation, a multiplexer  51  selects either a “0” (S &amp; R bit  46  not set) or the MSB  48  (S &amp; R bit  46  set) as the input to the carry input bit  0   52 . When the adder  58  is doing a subtract operation, the multiplexer does a similar operation as above with additional bit manipulation of the least significant bits of the data word being subtracted. This bit manipulation will depend on the type of subtraction (e.g., two&#39;s complement, etc.) performed by the adder  58 . 
     The embodiment of FIG. 4 is realized in the DAU, D, of FIG.  1 . The shift operation is performed by the BMU  22 . The shifted out bit is stored temporarily in a register such as the PSW 0   56 . This bit is used in a subsequent adder operation performed by the adder circuit  58  in the ALU  24 . 
     In practice, the shift-and-round mode my yield better numerical performance for certain DSP computations such as Fast Fourier Transform operations. 
     From the above, it may be seen that the disclosed invention provides an effective system and method for supporting multiple coding standards. While certain specific embodiments of the invention are disclosed as typical, the invention is not limited to these particular forms, but rather is applicable broadly to all such variations as fall within the scope of the appended claims. 
     Many modifications and adaptations will occur to those skilled in the art to which the invention pertains. For example, various architectures, data processing components, data memory components and programming languages may be used in practicing the claimed invention. Thus, the specific structures and methods discussed in detail above are merely illustrative of a few specific embodiments of the invention.