Abstract:
The digital multiplier is of the add and shift type with a matrix type input in which a number of serial data words can be applied simultaneously to the multiplier enabling the multiplier to compute simultaneously the sum of a number of products. This multiplier is intended for use in digital filters and single channel coders.

Description:
This is a continuation, of application Ser. No. 688,520, filed May 20, 1976 and now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to digital multipliers of the &#34;add and shift&#34; type such as may be used in digital filters for telecommunications systems. 
     In such multipliers multiplication is achieved by performing a number of addition operations using an adder with an accumulator in which the adder output is stored and shifted one bit position for each addition operation. An adder comprises a series of cells, one for each bit in a digital word, each cell having inputs for the addend and the augend and outputs for the sum and carry. A so-called &#34;full adder cell&#34; has in addition a third input to which the carry from the cell of next lesser significance may be applied. 
     In a known form of multiplier where, say, a parallel coefficient B is to be multiplied by an incoming serial data word C to form the product A=B×C in the accumulator, the multiplicand B is applied in parallel to a number of AND gates for the duration of the word C. Each bit of the word C, starting with the least significant bit, is applied to all the AND gates. If a bit of word C is a logic &#34;1&#34; then the multiplicand B is added to the accumulator (if it is a logic &#34;0&#34; nothing is added) and the contents of the accumulator are right shifted before the next bit of word C is applied to the AND gates. This continues until all the bits of word C have been applied to the gates, then the multiplication is complete. The answer A is now in the accumulator and may be extracted as required by various known methods. 
     Negative numbers can be handled by various known simple modifications. For example, if 2&#39;s complement data is used then the most significant bit of the data has a negative weight and for this bit only the multiplicand B is subtracted from instead of added to the accumulator. 
     In digital filters a digitally encoded sampled signal is filtered by combining together various delayed copies of the signal through suitable weighting coefficients. In general in a digital filter it is thus necessary to form an accumulated product such as: 
     
         P=(D.sub.1 ×E.sub.1) + (D.sub.2 ×E.sub.2) + (D.sub.3 ×E.sub.3) . . . (D.sub.n ×E.sub.n), 
    
     where D 1 , D 2  etc. are filter signal serial data words and E 1 , E 2  etc. are the filter tap coefficients. In the simple type of multiplier described above this type of operation can only be accomplished by performing first the multiplication D 1  ×E 1 , storing the result, changing the coefficient E, applied in parallel to the AND gates, performing the next multiplication D 2  ×E 2 , adding the result to the previously stored product D 1  ×E 1 , storing the sum, and repeating this process as many times as required. It is obvious that it would be advantageous to be able to perform all n multiplications simultaneously and produce the product P at the end of one serial data word period rather than to have to wait for n word periods. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide an improved digital multiplier capable of being employed in digital filters and single channel coders. 
     A feature of the present invention is the provision of a digital multiplier providing a calculated output signal comprising: a first adder having a plurality of first adder cells; an accumulator coupled to each of the first adder cells to store the output of each of the first adder cells and to shift the stored output one bit for each addition operation; and input means coupled to the first adder cells for applying simultaneously a plurality of serial data words to the first adder cells, the input means being arranged so that each of the serial words is applied to predetermined ones of the first adder cells but no two serial words are applied to the same one of the first adder cells. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     Above-mentioned and other features and objects of this invention will become more apparent by reference to the following description taken in conjunction with the accompanying drawing, in which: 
     FIG. 1 is a block schematic diagram of a simple digital multiplier according to the principles of the present invention using a single full adder to perform addition operations, a single accumulator in which the sum outputs of the full-adder are simultaneously accumulated and right shifted, and a basic form of wired input matrix; 
     FIG. 2 is a block schematic diagram of a modification of the multiplier of FIG. 1 in which the basic input matrix is modified to improve flexibility; 
     FIG. 3 is a block schematic diagram of a fourth order recursive digital filter section which utilizes a digital multiplier having a separate accumulator and transfer register with provision for overflow detection in accordance with the principles of the present invention; 
     FIG. 4 is a block schematic diagram of a further modification of the basic multiplier of FIG. 1 using a second full adder with a modified input matrix to enable the number of inputs to the multiplier to be increased still further; and 
     FIG. 5 is a block schematic diagram of a complete digital multiplier for handling digital data using 2&#39;s complement and carry-save addition with separate sum and carry accumulators and separate sum and carry transfer registers in accordance with the principles of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the simple multiplier arrangement shown in FIG. 1 a 6-stage adder ADD is constructed with &#34;full-adder&#34; cells the carry from each cell being applied to the cell of next greater significance. 
     A 7-stage accumulator ACC receives, in stages A0 to A5, the sum outputs Σ 0  . . . Σ 5  of the adder cells. The most significant stage A6 of the accumulator receives the carry output C 6  of the most significant adder cell. The contents of the accumulator stages A6 . . . A1 are fed back at the data bit rate as inputs to the adder cells of next lesser significance while the multiplier output is taken serially from stage A0 of the accumulator ACC. Each adder cell has, in addition to the carry and feedback (augend) inputs a data (addend) input which is fed via an input matrix M with serial data words D 1  and D 2  simultaneously. Suppose that it is desired to perform the calculation: P = 5/8D 1  + 1/4D 2 , where 5/8 and 1/4 are fixed coefficients. 
     The first part of the calculation, i.e., multiplying D 1  by 5/8 can be broken down into two separate operations as follows: 
     
         5/8D.sub.1 = 1/2D.sub.1 + 1/8D.sub.1 
    
     multiplying D 1  by 1/2 is simply effected by right-shifting D 1  by one bit position while multiplying D 1  by 1/8 is effected by right-shifting D 1  by three bit positions. If the input I 5  to the most significant cell of the adder ADD is regarded as having a weighting value of 1, i.e., it has a value of 2°, then to multiply D 1  by 1/2 it must be fed to input I 4  which has a weight of 1/2 or 2 -1 . To multiply D 1  by 1/8 it must be fed to input I 1 , which has a weight of 1/8 or 2 -3 . When D 1  is fed simultaneously to these inputs I 4  and I 2  the result in the accumulator ACC will be 1/2D 1  + 1/8D 1  = 5/8D. 
     Similarly D 2  is fed simultaneously to input I 3  and the accumulator ACC will then contain the result of P of the full calculation. It will be noted that each word is fed to one or more inputs to the adder, but that no two words are fed to the same input. 
     It will be appreciated that such a simple arrangement as that shown in FIG. 1 has severe limitations in practice. Greater flexibility can be obtained by using ternary coding of the coefficients. Suppose that it is desired to perform the calculation: 
     
         P = 7/8D.sub.1 + 9/16D.sub.2 - 1/4D.sub.3. 
    
     this can be achieved by expressing the coefficients in a ternary code as follows: 
     
         7/8 = 100100 = 1 - 1/8 
    
     
         9/16 = 010010 = 1/2 + 1/16 
    
     
         -1/4 = 001000 = -1/4 
    
     In this table the use of the bar, i.e., 1, indicates that the relevant bit has a negative weight. This calculation can then be performed using the arrangement shown in FIG. 2. The adder ADD and accumulator ACC are the same as in FIG. 1, but the input matrix M&#39; is more complex, each data word being fed either direct and/or inverted (complemented) to the appropriate adder inputs. 
     Word D 1  is fed directly to input I 5  and in complemented form to input I 2  by means of the inverter INV. In practice what this means is that although the coefficients are expressed in a ternary code the negative weights are realized by reversing the sign of the data. Thus, in effect 7/8D 1  = (11/8)D 1  = 1×D 1  + 1/8×(-D 1 ). D 2  + D 3  are similarly fed to the input matrix M&#39; with inversion where appropriate. Once again, it is important to note that any one adder input receives not more than one word, either direct or inverted. 
     Further flexibility can be achieved by using serial adders for cases where the coefficients (which can be regarded as data words) have bits which overlap, even after re-expressing them in ternary form. In other words two incoming data words are required to be fed to the same adder cell. Consider as an example the calculation: 
     
         P = (D.sub.1 ×E.sub.1) + (D.sub.2 ×E.sub.2) + (D.sub.3 ×E.sub.3) + (D.sub.4 ×E.sub.4) + (D.sub.5 ×E.sub.5) 
    
     where the coefficients E 1  -E 5  have the values given below and are re-expressed in the ternary forms shown in the following table. 
     
         ______________________________________VALUE        TERNARY FORM______________________________________E.sub.1136/256     0 0 0 1 0 0 0 1 0 0 0E.sub.2686/256     0 1 1 0 -1 0 -1 0 0 -1 0E.sub.3-796/256    -1 0 1 0 0 -1 0 0 1 0 0E.sub.4446/256     0 1 0 0 -1 0 0 0 0 -1 0E.sub.5-103/256    0 0 0 -1 0 1 0 -1 0 0 1 ##STR1##         ##STR2##______________________________________ 
    
     It can be seen that in nearly every column there are two overlapping ternary bits but nowhere are there more than two. This calculation can be realized by pre-adding together two data words where they are each to be multiplied by the same weight bit. In this case the result will be formed by performing the calculation as follows: 
     
         P=2.sup.2 (-D.sub.3) + 2.sup.1 (D.sub.2 +D.sub.4) + 2° (D.sub.2 +D.sub.3) + 2.sup.-1 (-D.sub.5 +D.sub.1) +2.sup.-2 (-D.sub.4 -D.sub.2) + 2.sup.-3 (D.sub.5 -D.sub.3) + 2.sup.-4 (-D.sub.2) +2.sup.-5 (-D.sub.5 +D.sub.1) + 2.sup.-6 (D.sub.3) + 2.sup.-7 (-D.sub.2 -D.sub.4) + 2.sup.-8 (D.sub.5) 
    
     an arrangement for performing the calculation in this manner is shown in FIG. 3. The arrangement of FIG. 3 is designed as a fourth order recursive digital filter section in which in fact D 1  is the only external input and D 2  - D 5  are derived from the multiplier output. D 2  is the multiplier output proper, and D 3  - D 5  are successively delayed versions of D 2 , in each case delayed by one word period. To perform the calculation the input I 10 , having the weight of 2 2 , receives word D 3  via an inverter, input I 9  receives the serial sum of words D 2  and D 4  produced by the serial adder cell 30, input I 8  receives the serial sum of words D 2  and D 3  produced by serial adder cell 31 and so on. To prevent overflow in the serial adder cells the data must be pre-limited to ±1/2-full scale range so that on addition of any two words the sum is still within the full range. 
     The filter section shown in FIG. 3 is designed to work with offset binary data, that is for an N-bit word the value is: ##EQU1## where the rth bit B r  is worth &#34;0&#34; or &#34;1&#34;. Thus, the weighted value of that bit is -2 -N-1  or +2 -M+1 , respectively. Sign reversal (that is multiplication by -1) is achieved by complementary (inverting) the data bits. 
     In a practical digital filter the output under some circumstances may exceed the allowable data range and for that case overflow protection must be provided. This can be accomplished in the following manner. When multiplication starts the least significant bits of the answer start coming from the least significant adder output. At the completion of the multiplication period the remaining most significant bits of the answer are in the accumulator (A0 - A10) and must be transferred over to a transfer register (T 1  - T 11 ) so that the accumulator can be cleared to start a new multiplication. While the multiplier is working on this new multiplication the bits in the transfer register are shifted out to complete the previous answer. In general, however, when working with fixed point arithmetic, it is necessary to limit the maximum answer to the available range expressible by the data format. In digital filters, particularly of the recursive types the answer may exceed the available data range so that if the most significant few bits of the accumulated result are simply ignored an undesirable overflow characteristic may occur leading to instability. However, by storing the bits to be dropped and checking the answer to see if the allowable range has been exceeded the multiplier can be made to saturate giving a maximum positive or negative result. This is done in the arrangement of FIG. 3 by checking the states of bits T 8  to T 11  in overflow detector OD to detect whether overflow will occur if T 9  to T 11  are dropped and using the result to control the multiplier output in an overflow correction circuit OC. If no overflow occurs then the normal output is allowed to flow out but if overflow has occurred then a maximum positive or negative data signal is substituted for the completed answer according to the sign. 
     Another way of achieving flexibility while adhering to the general rule stated earlier is to provide multiple inputs per stage of the multiplier using a second rank of parallel adder cells. Where there are overlapping bits in the ternary expressed coefficients the data can be fed into individual inputs without the need for serial pre-addition and, hence, pre-limiting of the data input magnitude. Such an arrangement is shown in FIG. 4. 
     The basic multiplier design of FIG. 4 is similar to that of the preceding figures but with the additional rank of adder cells ADD 2 preceding the final rank of adder cells ADD 1. Note that the final rank of adder cells ADD 1 has to have one more cell than the additional rank of adder cells ADD 2. The inputs to the multipliers are by way of the input matrix M&#34; feeding the cells of the addition rank of adder cells ADD 2. 
     Consider the following calculation: 
     
         P = 7/8D.sub.1 - 3/8D.sub.2 + 3/4D.sub.3 
    
     by constructing a general purpose X-Y interconnection matrix as shown in FIG. 4 and making connections only at the appropriate crossings a very flexible arrangement results. Each input data line drives one input line directly and a second input line through a sign reverser (inverter) so that either data or minus data can be connected to give coefficients expressed in ternary. This scheme will work with any form of binary coded data, such as ordinary binary, 2&#39;s complement binary, offset-binary, negabinary (radix-2) etc., provided the logic in the sign reversers and adders is appropriate to the type of coding. Conversion between different codes can be simultaneously accomplished by feeding in appropriate conversion constants to unused inputs and inverting the polarity of data bits where necessary. 
     In the arrangement illustrated the least significant bit carry inputs of the adders are shown grounded. They may in fact be used (a) as extra data inputs, (b) for feeding in a rounding signal, (c) for providing an automatic clear of the accumulator ACC. 
     This last item can considerably simplify the hardware and timing of multipliers since it eliminates the need for individual clear elements in each accumulator cell. 
     The method will be described using a modified design of FIG. 4 with carry-save adders instead of fully parallel ripple or look-ahead carry types. The method can equally well be used with ripple through carry addition, but it is useful to consider a carry-save addition type which minimizes problems of logic propagation delay. 
     FIG. 5 shows a complete multiplier design using 2&#39;s complement arithmetic and carry-save addition. This design allows two inputs per bit but this can be increased by additional ranks of ordinary or carry-save adders. Input data is routed to the adder inputs via the coefficient connection matrix M&#39;&#34; previously described. Multiplication of data by -1 is achieved by inverting (complementing) the data bits. This is not strictly accurate with 2&#39;s complement data since it introduces an error of one least significant bit. This will cause a constant small error in the result. In cases where this is important the inverters can be replaced by true subtract from zero circuits or a compensation signal can be fed into an unused data input. Each carry-save adder cell is a normal full adder with three inputs each worth one unit and pseudo sum and carry outputs worth one and two units, respectively. The first rank takes two data inputs plus the fed back sum accumulator and feeds the second rank. The second rank takes the sum from the first rank plus the left shifted carry (shifted left since the carry is worth 2 units) plus the fed back carry accumulator. The outputs are loaded into the sum and carry accumulators A0-A6 and B0-B7, respectively. On feedback the sum is shifted one place right as in previous examples, but the carry shift right is neutralized by the fact that being worth twice as much as the sum it needs shifting one place left. 
     On completion of the multiplication the answer is the sum of the contents of the sum and carry accumulators plus the least significant bits which have flowed out the least-significant-bit-sum output through the selector and into the output delay. The contents of the sum and carry accumulators are loaded into sum and carry transfer registers SCTR and shifting begins, adding the two together in serial adder 50 and routing the result through the output delay 51. At the same time a new multiplication can start. However, since at this point the sum contained in the two transfer registers is the same as the sum contained in the two accumulators it is possible by feeding back minus the sum of the two transfer registers into the accumulators to remove the old result from the calculation without the physical necessity for clearing the accumulator cells A 0  to A 6  and B 0  to B 7 . Additional refinements can include overflow detection and correction and also rounding the answer to a given number of bits. 
     While I have described above the principles of my invention in connection with specific apparatus it is to be clearly understood that this description is made only by way of example and not as a limitation to the scope of my invention as set forth in the objects thereof and in the accompanying claims.