Programmable serial multiplier
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates to a programmable serial multiplier performing the multiplication of a multiplicand by a fixed constant which includes: 
     an addition cell formed by 
     a 1 bit full adder, 
     a flip-flop which retards the carry in order to insert it into an input of the same adder, 
     and a retard element operating on the result from the adder 
     It also relates to a computational processor performing a linear transform of data employing such a multiplier. 
     2. Description of the Related Art 
     Numerous embodiments of serial multipliers exist which are well suited to the processing of signals the regularity of the data streams of which makes it possible to exploit the pipelining possibilities of these serial multipliers. One particular class of these multipliers produces the product of a variable and a constant, then referred to as the coefficient. Applications thereof are found in filters, Fourier transforms, cosine transforms, etc. Advantage can be drawn from the fact that the constant is known when designing the circuit. It is then no longer necessary to provide data paths to route the coefficients. Such a multiplier is programmed by branching the corresponding inputs of the multiplier to 1 or to 0. It is easy to design but does not push to the limit the optimizations which are possible depending on the value of the coefficients. The optimization can be pushed much further: one example thereof is described in the patent &#34;Method and digital circuit for fixed coefficient serial multiplication&#34; GB 2,179,770 A. 
     This document proposes a serial multiplier which carries out multiplications of a multiplicand by a constant which is a fractional number. This constant is programmed by retarding the result obtained as output from the adder of the multiplier before inserting this result as input to this same adder in order to add it to the subsequent term. The result of a multiplication is therefore obtained after a computation time which depends on the fixed constant employed. This multiplier is not however designed to treat the cases of arbitrary constants. The structure of such a multiplier is therefore very dependent on the coefficients employed and this may pose difficulties whilst designing a circuit operating with multiple constants which it may be led to rapidly change at least cost. 
     In fact, modern methods of designing circuits and, in particular, integrated circuits, call upon computer aided design CAD techniques. A basic cell (for example a multiplier) is available in a library and, during design, it must be adapted to the operations which are to be carried out. It is therefore desirable that this basic cell is the most universal possible and may be adapted without difficulty to a vast field of possibilities. In particular, in the case of a multiplication by a constant, it is desirable that the type of constant does not call into question the fundamental structure of the multiplier. This should be solved by minimal attachments, readily and rapidly produced by the designer. In an integrated circuit context, the structure of the multiplier and hence the plan of the masks is an aspect which takes on great importance. A basic plan must be designed which is very close to the final structure and which is the least dependent possible on the coefficients to be inserted. Moreover, when it is desired to employ several serial multipliers of this type in a computational processor, it is necessary to try to minimize to the extent possible the specific operations for assemblage of cells. Stacks of serial multipliers, designed to order, are sometimes difficult to produce. This difficulty in readily designing stacks of several multipliers is coupled with another disadvantage relating to the speed of the processing carried out. In fact, with serial multipliers designed to order, each one has its own speed related to the coefficient processed, which does not make it possible to define common specifications and militates against the perfecting of the stack. CAD techniques find themselves affected thereby. 
     SUMMARY OF THE INVENTION 
     The problem which is posed consists in designing a generic serial multiplier architecture capable of being programmed with the aid of a fixed coefficient during the design of the circuit, and which is optimized and simple to employ. It should not exhibit the following disadvantages: 
     it should not be delicate to design, in particular if it is wished to make therefrom a basis for a circuit parametrizable as a function of the coefficient by employing a silicon compilation approach, 
     the form and the dimensions of the multiplier should not depend on the coefficient, which would be problematic in certain applications when it is desired to make stacks from these circuits. In fact, this would prevent them being assembled by simple abutment. A loss of space on the circuit would result therefrom. 
     the number of totalling stages must not depend on the coefficient since the delay in obtaining the product would also depend on the coefficient, which would also be a complication in the uses in which several of these multipliers are employed in parallel and in which their results have to be combined whilst conforming with a synchronization. 
     The solution consists in a programmable serial multiplier such as defined in the first paragraph and which comprises: 
     a battery of (r/2)-1 addition cells interconnected in series by a first input, 
     the shift register being formed from (r/2)+1 initializable flip-flops, 
     and connection means which make it possible to program the serial multiplier in order to perform the multiplication by the fixed constant C, either with the aid of the value +C when the constant C contains, in binary notation, a number of 1s less than or equal to the number of 0s, or with the aid of the value -C in the reverse case, the programming being carried out by bringing together at the outputs of the shift register at least part of the inputs of the first addition cell and of the second inputs of the other addition cells, and by rendering the other part inoperative. 
     Thus advantageously, such a multiplier is readily parametrizable as a function of the coefficient employed. Its form and its dimensions do not depend on the coefficient. It is easy to assemble several multipliers by simple abutment. This is reflected by a space saving on the plan of the integrated circuit. When several multipliers are employed together there is no synchronization and computation time problem. Thus, multiplier assemblages with homogeneous characteristics (topography, speed) are available. 
     In the circuit according to the invention the multiplier is partitioned into specified functional blocks connected by a parametrizable interconnection channel. An interconnection diagram corresponds to the programming of the particular coefficient. The form of the blocks and of the channel does not change and may be planned out in advance. An important point for large scale integrated circuit production is to obtain a multiplier the plan of which does not vary too much as a function of the value of the coefficient. The proposed circuit employs a specific number of adders, even if a smaller number is sufficient for a particular value of the constant. The only portion of the multiplier variable as a function of the value of the coefficient is therefore localized in the interconnection channel, thus not affecting the form of the circuit. The optimization relative to the coefficient resides in the fact that only (r/2)-1 addition cells are provided, that is to say one cell less than half the number of bits equal to 1 of the constant expressed in binary notation. In the case where an adder is inactive its input is branched to 0. This wiring is also made in the interconnection channel. An interesting consequence of this arrangement is that the delay in obtaining the product is constant whatever the value of the coefficient. This is particularly useful when this multiplier is integrated into a synchronous &#34;serial bit&#34; processor. 
     The multiplier may operate with multiplicands and/or signed or unsigned coefficients. To operate with a signed fixed constant C, the first input of the first addition cell may be connected up to the said last flip-flop through an inverter, it being possible to initialize either to 1 or to 0 the flip-flop retarding the carry from the said first addition cell. 
     The stacks which it is possible to produce with such a type of multiplier may for example constitute a computational processor for carrying out a linear transform, for example, Fourier transforms, cosine transforms etc. Processors for computing such transforms are well known and it is possible to refer for example to the document FR-2,596,892. 
     Such an implementation of a discreet cosine transformation DCT calls upon a battery of multipliers, adders and subtracters. After each multiplication summation operations are performed. The fixed coefficients are combinations of particular cosine values. This summation may consist of an addition or a subtraction. Moreover, according to the value of the fixed coefficient expressed in binary notation, the number r of bits at the logic 1 state may be greater than/equal to or less than r/2. The multipliers then operate either with a constant +C or with a constant -C (with inverted bits) so that the number of 1s- of the binary notation is equal to or less than r/2. If one of the coefficients has been inverted, to implement the summation operation it then suffices to implement the processor so that an addition operation is replaced by a subtraction operation or vice versa. If both coefficients have been inverted, the change is to be carried out not at this summation, but at the first subsequent summation which is not in this same situation. 
     In this event the invention relates to a computational processor which determines transformed data from input data according to a linear transform which carries out operations for multiplication of at least one multiplicand by at least one constant, then operations for summation of the partial results, characterized in that the said multiplications are carried out in series as described previously, and when a summation operation is to be carried out on two partial results one of which was obtained from a processing by the constant&#39;s oppositely signed number, the said summation operation is performed by inverting the type of operator initially provided, and when a summation operation is to be carried out on two partial results which were both obtained from a processing by a constant with inverted bits, the said summation operation is performed by retaining the type of operator initially provided, the operator type inversion being carried over to the first subsequent summation operation operating on a single inverted partial result. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     The invention will be better understood with the aid of the following figures given by way of non-limiting example in which: 
     FIG. 1 is a diagram of a multiplier according to the invention operating with an unsigned fixed coefficient; 
     FIG. 2A is a diagram of a multiplier with its interconnections for a particular example with an unsigned coefficient; 
     FIG. 2B is a chronogram of the multiplication with D=-86 and C=+35; 
     FIG. 3 is a diagram of the portion of FIG. 1 which is modified in order to operate with a signed fixed coefficient, and 
     FIG. 4 is a diagram of an example linear transform. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED DRAWING 
     FIG. 1 shows a diagram of a serial multiplier operating with an unsigned fixed constant. The device functions in cycles of several clock beats operating on each of the registers. The multiplicand D is a signed 2&#39;s complement variable coded on d bits. The field of application of this multiplier is restricted to coefficients not having more 1 than 0 bits. The coefficient C is a number coded on r bits and consequently the product P is a signed integer coded on p=r+d bits. The multiplicand D is presented serially, bit by bit, with the lowest order first. The sign bit of the multiplicand is extended over r positions to total r+d=p bits. The product is also generated serially, lowest order bit first. The multiplier is composed of three elements: 
     a shift register with (r/2)+1 flip-flops 10 0 , 10 1 , . . . , 10(r/2), traversed by the multiplicand in this order. The register is reset to 0 on initialization. The input of this register and the outputs of all of the flip-flops are connected by the terminals D 0 , D 1 , . . . D(r/2)+1 to an interconnection channel 17 described below. 
     a battery of 1 bit addition cells 11 0 , 11 1 , . . . , 11(r/2)-2, each including a flip-flop 15 0  -15(r/2)-2 for the sum and a flip-flop 14 0  -14(r/2)-2 for the carry. All these flip-flops are also initialized to 0. Each addition cell except the first has its input A j  connected to the sum output of the preceding one, whilst the inputs B j  and the input A 0  of the input cell are connected to the interconnection channel 17. The product P is available at the sum output S(r/2)-2 of the final flip-flop 15(r/2)-2. 
     the interconnection channel 17 enables the inputs B j  of the adders and the input A 0  of the first adder to be connected to any one of the outputs D 0  -D(r/2)+1 of the shift register or else to 0. A particular wiring corresponds in fact to the programming of the value of a given coefficient. 
     The product P is equal to the sum of the partial products P=Σ from i=0 to r-1 P i . Each partial product is itself equal to the product of the multiplicand and the order i bit C i  of the coefficient: P i  =2 i .C.sub. i.D. The sum is produced by the addition cells, each one adding a partial product to the preceding partial total. The multiplication by C i  is obtained by ignoring the partial products where C i  is zero. The multiplication by 2 i  is obtained by selecting a flip-flop of the shift register containing the multiplicand retarded by i positions, and is filled in at the low order end by i zeros. The left-hand (order 0) adder adds up the partial products corresponding to the most significant b 1 bits of the coefficient, whilst the right-hand (order r/2-2) one inserts the partial product corresponding to the least significant 1 bit. Each adder of order j requires one clock period to deliver its result and, to compensate for this delay, the partial product P i  will have to be taken at the output D q  with q=i+j-r/2+2. With the coefficient not having more 1s than 0s, there are therefore at most r/2 1 bits. Each of these bits contributes to forming a partial product, the zero bits not coming into the computation of the product. There are therefore at most r/2 partial products to be added up, which can be achieved with (r/2)-1 adders and (r/2)+1 cells of the shift register. The generation of r-1 zeros at the beginning of the multiplicand necessary for the partial product corresponding to the highest order of the coefficient, is effected by the resetting to zero (RAZ) of the shift register and of the flip-flops of the adders. This produces (-1)+(+1)=r zeros: in all strictness, the flip-flop of the final adder need not be reset to zero. The lowest order bit of the product appears one clock cycle after the start of the operation and the highest order bit p cycles later. The complete computation of the product therefore requires p+1 clock cycles. 
     FIG. 2A shows a diagram of a multiplier according to the invention with its interconnections for a particular example with an unsigned coefficient. 
     Let there be a signed multiplicand, coded on 8 2&#39;s complement bits and equal to -86, and let there be an unsigned coefficient, coded on 6 bits, equal to 35. The product is a signed integer, coded on 14 2&#39;s complement bits, and equals -3010. Referring to the previous notation, we have d=8, r=6, p=8+6=14. (r/2)-1=2 adders and (r/2)+1=4 retard cells are required. The coefficient C=35 may be written C=2 5  +2 1  +2 0 , or in binary notation, 1 0 0 0 1 1. There are therefore as many 1 bits as 0 bits. To perform the multiplication of the multiplicand by (2 5  +2 1 ) the inputs A 0  and B 0  of the adder 13 0  must be connected up respectively to the outputs D 4  and D 0  of the register. The multiplication by 2 0  is carried out by connecting up the input B 1  of the adder 13 1  to the output D 0 , its input A 1  being connected to the flip-flop 15 0 . 
     FIG. 2B shows a chronogram of the multiplication for the example of FIG. 2A. 
     Under the labels 20 0  to 20 4  are shown the data of the multiplicand which show up successively on the outputs D 0  to D 4  at each clock period H. The data issuing from D 0  and D 4  are added up in the adder 13 0  (2 1  and 2 5  coefficient). The result of the sum S 0  and of the carry R 0  are indicated by the labels 22 0  and 21 0 . The sum S 0  is likewise added to the data issuing from D 0  (2 0  coefficient) in the adder 13 1 , and the results of the sum S 1  and of the carry R 1  are indicated by the labels 22 1  and 21 1 . At the start of an addition cycle, an RAZ signal performs the resetting to zero of all of the flip-flops (registers, carries, sums) so as to initialize the operations in each addition cell. The flip-flop for the sum of the final cell does not require this initialization. In binary, the sum S 1   equals 1 1 0 1 0 0 0 0 1 1 1 1 1 0, viz. the value P=-3010. The least significant bit LSB shows up one clock period after the start of the appearance of the datum D 0 . The most significant bit MSB appears last. 
     FIG. 3 shows a diagram of the portion of FIG. 1 which is modified in order to operate with a signed fixed coefficient. The other elements remain the same as those of FIG. 1. In this variant, the final flip-flop 10(r/2) of the shift register is followed by an inverter 30 the output of which constitutes the output D(r/2)+1 to be connected up to the interconnection channel. The first adder 13 0  may have its carry 14 0  initialized to 1 (connection 31) instead of 0 (connection 32). The choice of the 1 or 0 initialization is likewise made by the interconnection channel. When the coefficient is represented in signed 2&#39;s complement binary form nothing changes if it is a positive number. On the other hand, if it is a negative number its most significant bit is at 1 and it is no longer expedient to consider the multiplicand shifted by r-1 positions, but the number oppositely signed from this number. This relates only to the final cell of the shift register and the first of the battery of adders. The inclusion of the oppositely signed number is carried out by inserting the 1&#39;s complemented number (output from the inverter) and by forcing the initial carry to 1, which actually amounts to taking the 2&#39;s complement, that is to say the oppositely signed number. All this being defined from the interconnection channel, the essential property of this set-up is therefore preserved. 
     FIG. 4 shows a diagram of an example linear transform. An effecting of a linear transform calls upon a battery of multipliers which are surrounded by adders and subtracters. This implementation may be applied, among other things, to Fourier transforms and to cosine transforms. The use of &#34;serial bit&#34; operators like the multiplier which has just been described makes it possible to profit to the maximum from the pipelining of the various operations. In these cases, the coefficients are combinations of cosine values of particular angles For these numbers, the restriction of not having more than r/2 one bits is not acceptable. This difficulty is solved in the following way. When a coefficient C has more than r/2 one bits, it is replaced by its oppositely signed number -C and it may easily be verified that C does not then have more than r/2 one bits. As output from the multiplier, the result -P is obtained instead of the result P, and in order to take account of the change of sign the adder (respectively subtracter) situated downstream of the multiplier is replaced by a subtracted (respectively an adder). When both coefficients generating products combined in the same downstream operator fall into this category, the type permutation is not carried out on this operator, but on that situated one stage further on. 
     Let there be four data X 0 , X 1 , X 2 , X 3  which undergo a linear transformation with respect to the data x 0 , x 1 , x 2 , x 3 . The adder 40 1  adds X 3  and X 2  and delivers a result which is multiplied by C 2 . The adder 40 2  adds X 0  and X 1  and delivers a result which is multiplied by C 5 . The subtracter 411 subtracts X 0  from X 1  and delivers a result which is multiplied by C 4 . The data X 2  and X 3  are multiplied by C 3  and C 1  respectively. 
     Let us assume that C 1  /C 4  and C 5  contain more zero bits than one bits. Then, according to their sign, either the multiplier of FIG. 1 or the modified one of FIG. 3 is employed to carry out these multiplications and obtain the results P 1 , P 4 , P 5 . 
     Let us assume that C 2  and C 3  contain fewer zero bits than one bits. Then, according to the invention, the multiplier is wired so as to perform a multiplication by -C 2  and by -C 3  respectively, which will supply results -P 2  and -P 3  respectively. In order to take account of the sign inversion carried out, the adder 40 3  is then replaced by a subtracter 40 3  &#39; to obtain the expected result. By contrast, the results -P 2  and -P 3  which arrive at the (subtraction) operator 41 2  having both been inverted, the nature of the operation carried out by the operator 41 2  is not modified, but the change of operator type is carried over to the subsequent operator or operators. In the present case, the operators 41 4  (subtracter) and 40 5  (adder) are changed into adder and subtracter respectively. The operators 41 3  and 40 4  remain those initially provided.