Skip to main content

On the inclusion of prime factors to calculate the theoretical lower bounds in multiplierless single constant multiplications

Abstract

This paper presents an extension to the theoretical lower bounds for the number of adders and for the adder depth in multiplierless single constant multiplications (SCM). It is shown that the number of prime factors of the constants is key information to extend the current lower bounds in certain cases that have not yet been exposed. Additionally, the hidden theoretical lower bound for the number of adders required to preserve the minimum adder depth is revealed.

1 Introduction

Abundant research has been realized since the past two decades to solve single constant and multiple constant multiplication problems (SCM and MCM, respectively), where the hardware requirements can be reduced by exploiting the constant coefficient characteristics known a priori[1–18]. In these cases, multiplications are performed without using general multipliers and the unique arithmetic operations are additions and subtractions. In addition to these operations, only scaling by powers of two is allowed. These powers of two are implemented using hardwired shifts and therefore are considered with no cost.

Even though MCM and SCM problems are considered closely related, the latter constitutes the fundamental basis for all the constant multiplication problems and is usually solved by specialized, fine-tuned algorithms [1, 3–5, 9–11, 14]. The usual metric to minimize in the SCM algorithms has been the number of arithmetic operations needed to implement the constant multiplier. However, it has been reported that the number of sequentially connected arithmetic operations forming a critical path has the main negative impact in performance and power consumption [3, 7–9, 15–18]. This, currently, has led to substantial research activity targeting both, application-specific integrated circuits (ASICs) [15, 16] and field-programmable gate arrays (FPGAs) [17, 18], where the minimization of the number of arithmetic operations subject to a minimum critical path is the ultimate goal.

Theoretical lower bounds for these two metrics in SCM, MCM, and other related problems have been derived in [12] based on a simple number that can be calculated in advance from the involved constants, namely, their minimum number of signed digits (MNSD). In [12], the theoretical lower bounds were first obtained for the simplest case of constant multiplications, namely, SCM, and then deduced for cases involving multiple constants. Nevertheless, the compromise between the number of arithmetic operations and the critical path was only mentioned and the theoretical lower bound for such compromise still remained hidden. It has been pointed out in literature that using the lowest critical path often results in higher performance and lower power consumption at expenses of increasing the number of arithmetic operations. Similarly, the minimization of the number of arithmetic operations may result in higher area saving at expenses of an increased critical path [3, 7–9, 15, 16].

This paper introduces the extension to the theoretical lower bounds given in [12] for the SCM case. This extension shows that these bounds can be increased in certain cases which have not been exposed in [12] by including the number of prime factors of the constants. Moreover, the theoretical lower bound for the number of arithmetic operations subject to the minimum critical path is revealed. With this, the preliminary estimation of how many extra arithmetic operations are needed to preserve the lowest critical path in a SCM block becomes possible.

This paper is organized as follows: Section 2 presents the key observations from [5] used in [12] as a starting point to develop the current theoretical lower bounds. Section 3 develops an analysis of these SCM lower bounds. From that analysis, in Section 4, we present a detailed development of new theorems that allow the extension of these lower bounds. Section 5 presents the comparison between the proposed lower bounds and the lower bounds from [12]. Finally, concluding remarks and future works are highlighted in Section 6.

2 Key observations for the current lower bounds

The main operation in SCM blocks, called A-operation in [6], is defined as

w= A x u , v = 2 e 1 u + − 1 e 4 2 e 2 v 2 − e 3
(1)

where e1 ≥ 0, e2 ≥ 0 are integers denoting left shifts, e3 ≥ 0 is an integer indicating right shift, e4∈{0, 1} chooses the addition or subtraction operation to be performed, x = {e1, e2, e3, e4} is the parameter set or A-configuration of A x (u,v) and u, v, and w are positive and odd constants. As additions and subtractions have a similar complexity when it comes to hardware implementation, they are usually referred without distinction as A-operations. An SCM block is designed as a network of A-operations represented using directed acyclic graphs (DAGs) with the following characteristics [5, 12, 13]:

  •  Shifts are assumed to be free. Additionally, the sign of the constants formed in the DAG is assumed to be adjusted at some part of the design. Therefore, only positive and odd integers are considered. These constants are known as fundamentals.

  •  For a graph with n A- operations, there are n + 1 vertices and n fundamentals. Every fundamental is obtained as a result of an A- operation.

  •  Each vertex has an in-degree two except for the input vertex which has in-degree zero.

  •  A vertex with in-degree two corresponds to an A- operation.

  •  Each vertex has out-degree larger than or equal to one except for the output vertex which has out-degree zero.

  •  The constant resulting from the last A-operation is known as output fundamental (OF), whereas the constants resulting from previous A-operations are non-output fundamentals (NOFs). In a DAG that does not have the minimum number of A-operations, the constants resulting from the extra A-operations are referred as non-essential fundamentals (NEFs).

The number of A- operations, N A , is frequently called adder cost. However, this value will be referred here as A-cost for consistency. The number of cascaded A- operations, N d , where the output of an A- operation is at least one input of another A- operation, is frequently called logic depth or adder depth and it will be referred here as A-depth.

The following observations from [5] relate the number of nonzero digits of a constant with its A-depth:

  •  Observation A: The sum of two coefficients with k1and k2nonzero digits respectively, has at most k1+ k2nonzero digits.

  •  Observation B: A multiplier graph with A-depth equal to N d can generate coefficients with at most 2Ndnonzero digits.

On the other hand, a multiplicative graph is the graph obtained by cascading two subgraphs such that the resulting OF is a product of the OFs of the two subgraphs (classification of graph structures is detailed in [5] and extended in [13]). An articulation point is the point where the output of the first subgraph is joined with the input of the second subgraph. Since in DAGs the A-operations become nodes, the A-operation whose output is an articulation point can be also referred as an articulation point.

  •  Observation C: If a graph has an articulation point, the graph is multiplicative.

Proofs and more details of these observations can be found in [5].

3 Analysis of the current lower bounds

Consider a given constant c whose MNSD, i.e., the number of digits obtained by representing c in canonic signed digit (CSD), is S(c). The lower bounds L A and L d for the A-cost and the A-depth of the graph for c, respectively, are given in [12] as

L A = L d = log 2 S c
(2)

where ⌈x⌉ is the nearest integer greater than or equal to x. Taking into account that the MNSD can be expressed as 2p – 1 < S(c) ≤ 2p for all p ≥ 1 and p integer, we can note that all values S(c) in the range (2p – 1, 2p] yield the same L A and L d according to (2), with

p= log 2 S c
(3)

We will refer to the range (2p – 1, 2p] as MNSD-range. Note that the function S(c) is the unique information taken from the constants and used in [12] to derive the current lower bounds for constant multiplication problems.

An important characteristic given in [12] and related to the graph structure presented in Figure 1, which will be called here the completely multiplicative (CM) graph, is that if S(c) = 2p (the highest MNSD in the MNSD-range), the lower bound L A  = p will be obtained only with a CM graph.

Figure 1
figure 1

Completely multiplicative (CM) graph.

Is always possible to find a solution with the lower bound L d because the coefficient c can be implemented by summing all its non-zero terms using A-operations arranged in binary tree [12]. Nevertheless, the lower bounds given in (2) do not make any distinction among the constants that have their MNSD included into the MNSD-range.

4 Extension of the current lower bounds

Let us start with the CM-based graph of Figure 2, which consists of the cascade of a subgraph H with p − l A-operations and a CM subgraph with l A-operations. This graph is exploited in [14] to obtain optimal multiplications by rational constants with periodic binary representations, and it has the following characteristics:

  1. 1)

    At the output of every A-operation of the CM subgraph, the MNSD of the resulting constant is at most twice the MNSD of the constant at its inputs, according to Observation A. If the MNSD at the output of the subgraph H, denoted by n H , is the highest possible in H, the maximum resulting MNSD at the overall graph is 2l × n H .

  2. 2)

    If H has the minimum A-depth, the overall graph has the minimum A-depth because the CM subgraph has also the minimum A-depth. The same holds for the A-cost.

  3. 3)

    If H is non-multiplicative, the CM-based graph has l articulation points formed with the minimum A-cost and A-depth and clustered in the higher depth levels. Thus, this graph has the highest MNSD in its first articulation point in comparison to any other graph with l articulation points. Moreover, it can have the maximum MNSD with respect to other graphs with l articulation points.

Figure 2
figure 2

CM-based graph with p A -operations.

Due to their aforementioned characteristics, CM-based graphs will be analyzed in the following to show that the graph of a constant whose MNSD is given in specific intervals into the MNSD-range requires certain multiplicative characteristics to preserve the lower bound L A . It shall be considered henceforth that the MNSD is given in the MNSD-range (2p − 1, 2p] with p > 1, since L A  = L d  = 1 for S(c) = 2 (i.e., when p = 1).

Theorem 1 A constant c whose MNSD is S(c) > 2p − 1 + 1 cannot be obtained with a non-multiplicative graph with p A-operations.

Proof Let us review the simplest case p = 2. There are two possible graphs, one of them additive and the other one multiplicative, as shown in Figure 3 (see also Cost-2 Graphs No. 1 and 2 of Appendix A of [13]). The highest MNSD of any NOF in both graphs is equal to 2. The last A-operation of the non-multiplicative graph only can add one nonzero digit to a constant, thus yielding OFs whose highest MNSD is 2p − 1 + 1 = 3 according to Observation A. The highest MNSD of any OF in the multiplicative graph is equal to 4 because both inputs to the last A-operation can have up to 2 nonzero digits each. Thus, the case p = 2 is a base for the following inductive hypothesis: the highest MNSD of any OF in a non-multiplicative graph with p A-operations is equal to 2p − 1 + 1 for all p > 1. Assuming it as a true statement, let us construct a non-multiplicative graph with p + 1 A-operations, with the aim of obtaining an OF whose MNSD is n = 2p + 2, i.e., the lowest MNSD that contradicts the hypothesis.

Figure 3
figure 3

The two graphs with p = 2 A -operations: (a) additive graph and (b) multiplicative graph.

A non-multiplicative graph with p operations cannot have the inputs of its last A-operation (the A-operation placed at the p-th depth level) coming from the same position because an articulation point is generated and the graph becomes multiplicative (see Observation C). For the sake of clarity, let us identify the two inputs of the last A-operation as a1 and a2. Let us assume, without loss of generality, that a1 comes from the output of a subgraph G1, as shown in Figure 4. This subgraph can be either non-multiplicative or multiplicative (Figure 4a,b, respectively). In the following, we will review each of these two cases, along with the point where a2 can come from.

Figure 4
figure 4

A graph composed by a subgraph G 1 plus a last A -operation. (a) G1 is non-multiplicative graph and (b) G1 is a CM-based multiplicative graph.

If G1 is non-multiplicative (Figure 4a), the highest MNSD of any of its OFs is n1 = 2p − 1 + 1 (this follows from the inductive hypothesis). For the overall graph, the only way to obtain an OF whose MNSD is n = 2p + 2 is having a2 coming from an A-operation that produces constants with an MNSD at least equal to n − n1 = 2p − 1 + 1. From Observation B, we have that this MNSD can be obtained only from the p-th A-operation, which means that a1 and a2 would be coming from the same A-operation, generating an articulation point. If a2 comes from the (p − 1)-th A-operation, the articulation point is avoided and the whole graph can still be non-multiplicative. However, the highest MNSD of a constant generated from the (p − 1)-th A-operation is equal to 2p − 1 (see Observation B) and thus the highest MNSD of the OF in the overall graph is equal to n1 + 2p − 1 = 2p − 1 + 1 + 2p − 1 = 2p + 1.

If G1 is multiplicative (Figure 4b), it can have l articulation points where 1 ≤ l ≤ p − 2. With l articulation points and p operations, the highest MNSD of any OF produced by G1 is n1 = 2l × (2p − l − 1 + 1). This follows from the assumption that G1 is a CM-based graph and from the inductive hypothesis. In order to obtain an OF whose MNSD is n = 2p + 2, a2 must come from an A-operation that produces constants with an MNSD at least equal to n − n1 = 2p − 1 − 2l + 2. Moreover, such A-operation must be placed at a depth level less than the depth level where the first articulation point is placed; otherwise this articulation point will make the whole graph multiplicative. Since G1 has its first articulation point at a depth level equal to p − l, a2 must come from an A-operation placed in a depth level that does not exceed p − l − 1. The highest MNSD of any NOF obtained from an A-operation placed in the (p − l − 1)-th depth level is 2p − l − 1 (from Observation B). Hence, this value should be equal or greater than n − n1 = 2p − 1− 2l + 2 in order to obtain an OF in the overall graph whose MNSD is n = 2p + 2. However, it can be shown that 2p − l − 1 < 2p − 1− 2l + 2 holds. Thus, the highest MNSD of any OF in the overall graph is equal to n1 + 2p − l − 1 = 2l × (2p − l − 1 + 1) + 2p − l − 1 ≤ 2p + 1.

As a result, we have that the inductive hypothesis for a graph with p A-operations implies that it holds for p + 1 A-operations. Therefore, considering this implication along with the base case with p = 2, we prove Theorem 1 by induction on p. ■

Theorem 2 A constant c whose MNSD is S(c) > 2 p − 1 + 2 q − 1 with q = {1, 2,…, (p − 1)} can be obtained by using a graph with p A-operations only if at least q of these operations are articulation points.

Proof Consider that the overall graph is a CM-based graph with l articulation points, where l < p. The highest MNSD of any OF in the overall graph is n = 2l × (2p − l − 1 + 1) = 2p − 1 + 2l (from Theorem 1). Therefore, l has to be at least equal to q in order to achieve n > 2p − 1 + 2q − 1. Note that Theorem 1 corresponds to the case q = 1. ■

Theorem 3 A constant c whose MNSD is S(c) > 3 × 2p − 2 + 1 cannot be obtained by using a non-multiplicative graph with only p + 1 A-operations and A-depth preserved equal to p.

Proof For the simplest case p = 2, there is only one graph with p + 1 = 3 A-operations and A-depth preserved equal to p = 2. This graph is shown in Figure 5 (see also Cost-3 Graph No. 7 of Appendix A of [13]). The highest MNSD of the OF in this graph is 3 × 2 p − 2 + 1 = 4.

Figure 5
figure 5

The unique graph with A -depth equal to p = 2 and p + 1 = 3 A -operations.

Now, we review the case p ≥ 3. Since the A-depth must be preserved equal to p, only p of these operations can be sequentially connected. Consider that a graph G1 with A-cost and A-depth equal to p − 1 is connected to one of the inputs of the last A-operation, as shown in Figure 6. In order to avoid an articulation point, the other input must come from a different position. Thus, this input is connected to the remaining A-operation, which should be placed in the (p − 1)-th depth level to obtain the highest possible MNSD (from Observation B), and whose inputs are identified as a1 and a2. Consider that a1 comes from the A-operation placed in the (p − 2)-th depth level. Let us review the cases when G1 is either non-multiplicative (Figure 6a) or multiplicative (Figure 6b), along with the point where a2 can come from.

Figure 6
figure 6

Subgraph G 1 that has A -depth equal to p − 1 and p − 1 A -operations, plus two extra A -operations. (a) G1 is non-multiplicative graph and (b) G1 is a CM-based multiplicative graph.

If G1 is non-multiplicative (Figure 6a), the highest MNSD of its OFs is n1 = 2p − 2 + 1 (from Theorem 1) and a1 with a2 can come from the A-operation placed in the (p − 2)-th level. Thus, the highest possible MNSD of the OF in the last A-operation is n = n1 + na 1 + na 2, where na 1 and na 2 are the respective highest MNSD in a1 and a2. The highest MNSD of G1 is n1 = 2p − 2 + 1 and na 1 = na 2 = 2p − 2. Therefore, we have n = (2p − 2 + 1) + 2p − 2 + 2p − 2 = 2p − 2 + 1 + 2p − 1 = 3 × 2p − 2 + 1.

If G1 is multiplicative (Figure 6b), consider that it is a CM-based graph with l articulation points, where 1 ≤ l ≤ p − 2. The highest MNSD of its OFs is n1 = 2l × (2p − l − 2 + 1). Similarly, the highest MNSD in a1 is na 1 = 2l − 1 × (2p − l − 2 + 1). To avoid an articulation point, a2 must come from a depth level that does not exceed p − l − 2, thus na 2 = 2p − l − 2. The highest possible MNSD of the OFs in the last A-operation is n = n1 + na 1 + na 2 = 2p − 2 + 2p − 3 + 2l + 2l − 1 + 2p − l − 2, which can be shown to be less or equal to 3 × 2p − 2 + 1. â– 

Theorem 4 A constant c whose MNSD is S(c) > 3 × 2p − 2+ 2q − 1with q = {1, 2,…, (p − 2)} can be obtained by using a non-multiplicative graph whose A-depth is equal to p only if at least p + q + 1 A-operations are used.

Proof Consider p + r A-operations, with r < p. Since the A-depth is equal to p, only p of these operations can be sequentially connected. Let us assume that a graph G1 with A-cost and A-depth equal to p − 1 is connected to one of the inputs of the last A-operation, whereas the other input comes from a different position to avoid an articulation point. Consider that this input comes from a graph G2, formed with r − 1 of the remaining A-operations. To obtain the highest MNSD in G2, we can consider that G2 is a CM graph with its last A-operation placed at the (p − 1)-th depth level. Let us assume that the last of the remaining A-operations is connected to the input of G2, with its inputs being a1 and a2. This is shown in Figure 7. The highest MNSD of any OF from G2 is n2 = 2r − 1 × (na 1 + na 2), where na 1 and na 2 are the respective highest MNSD in a1 and a2.

Figure 7
figure 7

Subgraph G 1 , CM subgraph G 2 , and two extra A -operations. (a) G1 is non- multiplicative graph. (b) G1 is a CM-based multiplicative graph, with r ≤ l and (c) G1 is a CM-based multiplicative graph, with r > l.

If G1 is non-multiplicative (Figure 7a), the highest MNSD of its OFs is n1 = 2p − 2 + 1 (from Theorem 1). Both inputs a1 and a2 can come from the same point because G1 is non-multiplicative, and the highest depth level where this point can be placed is p − r − 1; thus, na 1 = na 2 = 2p − r − 1. Hence, the highest MNSD of any OF in the overall graph is n = n1 + n2 = (2p − 2 + 1) + 2r − 1 × (na 1 + na 2) = (2p − 2 + 1) + 2r − 1 × (2p − r) = (2p − 2 + 1) + 2p − 1 = 3 × 2p − 2 + 1, which clearly is less or equal than 3 × 2p − 2 + 2q − 1 even for the smallest q = 1.

If G1 is multiplicative, consider that it is a CM-based graph with l articulation points, where 1 ≤ l ≤ p − 2. The highest MNSD of its OFs is n1 = 2l × (2p − l − 2 + 1). We can have two cases, depending on whether r is greater than l or not. Let us see each one of these cases.

When r ≤ l (Figure 7b), only either a1 or a2 can come from the A-operation placed in the (p − l − 1)-th depth level but not both, because an articulation point would be generated. If a1 comes from this A-operation, a2 can come from the immediate lower depth level. Thus, na 1 = (2p − l − 2 + 1) and na 2 = 2p − l − 2. Hence, the highest MNSD of any OF in the overall graph is n = n1 + n2 = (2p − 2 + 2l) + 2r − 1 × (na 1 + na 2) = (2p − 2 + 2l) + 2r − 1 × [(2p − l − 2 + 1) + 2p − l − 2] = 2p − 2 + 2l + 2r − 1 × (2p − l − 1 + 1), which can be shown to be less or equal to 3 × 2p − 2 + 2r − 1. Thus, r must be at least equal to q + 1 in order to achieve a value n > 3 × 2p − 2 + 2q − 1.

When r > l (Figure 7c), a1 and a2 can come from the same point because the subgraph H in G1 is non-multiplicative, thus na 1 = na 2 = 2p − r − 1. Hence, the highest MNSD of any OF in the overall graph is n = n1 + n2 = (2p − 2 + 2l) + 2r − 1 × (na 1 + na 2) = (2p − 2 + 2l) + 2r − 1 × (2p − r) = 2p − 2 + 2l + 2p − 1 = 3 × 2p − 2+ 2l. Since l is at most equal to r − 1, we have that the highest value for n is n = 3 × 2p − 2 + 2r − 1. Thus, n > 3 × 2p − 2 + 2q − 1 holds only if r is at least equal to q + 1. â– 

Now, let us introduce the number of prime factors of the constant c, denoted as Ω(c). Note that, along with S(c), Ω(c) is a function that can be known a priori from the constants. Generally speaking, obtaining the prime factors of c is a challenging problem for very large constants (over 110 digits) and it is one of the bases for the Rivest-Shamir-Adleman (RSA) encryption scheme [19]. However, for constants up to 32 bits, which cover the DSP problem sizes of the most practical importance [14], the prime factors of c can be obtained straightforwardly even with the simple sieve approach, such as the one used in the MATLAB function ‘factor’.

The following theorems present the relations between the values Ω(c) and S(c). If the required multiplicative characteristics for the corresponding graph of the constant c, highlighted in the previous theorems, cannot be accomplished due to the value Ω(c), the lower bounds for the A-cost and the A-depth are affected.

Theorem 5 A constant c whose MNSD is S(c) > 2 p − 1 + 2 Ω(c) − 1 only can be obtained by using a graph with at least p + 1 A-operations.

Proof From Theorem 2, it is known that at least Ω(c) articulation points are required if only p A-operations can be used. However, since Ω(c) is the number of prime factors, only up to Ω(c) − 1 articulation points are allowed. Thus, the only solution is using an additional A-operation. By adding one more A-operation, the overall non-multiplicative graph can give an OF whose MNSD is up to 2p + 1, which covers the MNSD-range regardless of the value Ω(c). Therefore, at least p + 1 A-operations are required. ■

Theorem 6 A constant c whose MNSD is S(c) > 3 × 2p − 2+ 2Ω(c) + q − 2with q = {1, 2,…, (p − Ω(c) − 1)} only can be obtained by using a graph with A-depth at least equal to p + 1 if up to p + q A-operations are used, or with at least p + q + 1 A-operations if the minimum A-depth equal to p is preserved.

Proof Let us consider a CM-based graph with p + r A-operations and A-depth equal to p + s, where r < p and s ≥ 0. Since at most Ω(c) − 1 articulation points can be used, its CM subgraph has Ω(c) − 1 A-operations, whereas its non-multiplicative subgraph H has p + r − Ω(c) + 1 A-operations and an A-depth equal to p + s − Ω(c) + 1. According to Theorem 4, the highest MNSD of any OF generated in the subgraph H is 3 × 2p + s − Ω(c) − 1 + 2r − s − 1 and the highest MNSD at the output of the overall graph is n = 2Ω(c) − 1 × (3 × 2p + s–Ω(c) − 1 + 2r − s − 1) = 3 × 2p + s − 2 + 2Ω(c)+r − s − 2. If the A-depth is preserved equal to p, we have s = 0. In such case r needs to be at least equal to q + 1 in order to achieve n > 3 × 2p − 2 + 2Ω(c) + q − 2. On the other hand, if r ≤ q holds, the value s should be at least equal to 1 in order to achieve n > 3 × 2p − 2 + 2Ω(c) + q − 2, implying that the A-depth of the overall graph is at least equal to p + 1. ■

From Theorem 5 and substituting p using (3), the lower bound L A can be expressed as

L A = log 2 S c ; if Ω c ≥ log 2 S c − 2 log 2 S c − 1 + 1 , log 2 S c + 1 ; otherwise .
(4)

Note that if L A = ⌈ log2S(c)⌉ holds, L d will have the same value as L A without requiring any additional A-operation (as given by (2)). From (4), we can see that this only can be accomplished if Ω(c) ≥ log2{S(c) − 2 log 2 S c − 1 } + 1 holds. The argument S(c) − 2 log 2 S c − 1 in the log2{x} operation is always greater than zero and therefore the condition can always be evaluated.

From Theorem 6, we have that if the A-cost is given as N A ≥ ⌈ log2S(c)⌉ + q + 1 and if log2{S(c) − 3 × 2 log 2 S c − 2 } + 2 − Ω(c) > q holds, the A-depth can be kept equal to ⌈ log2S(c)⌉. By noticing that any real number a is greater than an integer b if this integer is given as b = ⌈a⌉ − 1 and applying this observation to q, we obtain q = log 2 S c − 3 × 2 log 2 S c − 2 + 2 − Ω c + 1. In this equality, the log2{x} operation does not yield finite values when S(c) ≤ 3 × 2 log 2 S c − 2 holds. However, according to Theorem 3, the A-depth can be kept equal to ⌈ log2S(c)⌉ by using only one additional A-operation if the condition S(c) ≤ 3 × 2 log 2 S c − 2 + 1 holds. Therefore,

L d = log 2 S c ; if N A ≥ log 2 S c + L EA , log 2 S c + 1 ; otherwise ,
(5)

where L EA , the lower bound for the number of extra A-operations required to generate NEFs and preserve L d = ⌈ log2S(c)⌉, is given as

L EA = 0 ; if Ω c ≥ log 2 S c − 2 log 2 S c − 1 + 1 , 1 ; if S c ≤ 3 × 2 log 2 S c − 2 + 1 , log 2 S c − 3 × 2 log 2 S c − 2 + 2 − Ω c ; otherwise .
(6)

It is worth highlighting that, whereas the lower bound L A only depends on the relation between Ω(c) and S(c), the lower bound L d depends on the A-cost N A . As pointed out in [12], for many problem instances, there is a tradeoff between the A-cost and the A-depth. From (5), we have that such tradeoff is the minimum theoretical value L EA , given in (6).

5 Comparison of proposed and current lower bounds

Let us review a simple example to illustrate how the proposed lower bounds given in (4) and (5)-(6) are more precise with respect to the lower bounds from [12], expressed in (2). To this end, consider the 14-bit integer constant 11,467, whose binary representation is 10110011001011. Its CSD representation is 10 1 ¯ 0 1 ¯ 010 1 ¯ 010 1 ¯ 0 1 ¯ , which can be found from the binary representation by iteratively replacing every string having n ≥ 2 consecutive digits ‘1’ (e.g., 1111, where n = 4) with the string having n − 1 digits ‘0’ between a digit ‘1’ and a digit ‘ 1 ¯ ’, (e.g., 1000 1 ¯ , where n = 4; see [20] for more details). A MATLAB routine to find the CSD representation of an integer is given in [21].

Recall that the value S(c) represents the number of non-zero digits of a minimum signed digit (MSD) representation (such as CSD) of the constant c. Hence, it is clear from the CSD representation of the constant c = 11,467 that S(c) = 8, i.e., there are eight non-zero digits in that representation. Note in passing that, in this particular example, the number of non-zero digits is the same for both, CSD and binary representations. However, this not always occurs. Additionally, we can obtain Ω(c), the number of prime factors of the constant c, using the MATLAB command ‘length(factor(c))’. For the constant c = 11,467, we have Ω(c) = 1, which indicates that 11,467 is a prime number.

The constant 11,467 is known to have an optimal A-cost that does not exceed 4, as mentioned in [20]. A graph with four A-operations that implements the multiplier by 11,467, based on the ‘Leapfrog’ Cost-4 Graph No. 10 of Appendix A of [13], is shown in Figure 8.

Figure 8
figure 8

Graph with four A -operations to implement the multiplier by 11,467.

Let us denote the current lower bounds from [12] as LA,c for the A-cost and Ld,c for the A-depth, which can be obtained using (2). Similarly, we will denote the new lower bounds as LA,new for the A-cost and Ld,new for the A-depth, which can be obtained using (4) and (5)-(6), respectively. All these lower bounds will be calculated by substituting c = 11,467.

The value S(c) = 8 replaced in (2) yields L A,c = ⌈ log2S(c)⌉ = ⌈ log2(8)⌉ = 3. However, besides of S(c) = 8, we also have Ω(c) = 1 as additional information for the new lower bounds. Using S(c) and Ω(c) in (4), we have that the condition Ω c ≥ log 2 S c − 2 log 2 S c − 1 +1 does not hold (in other words, 1≥ log 2 8 − 2 log 2 8 − 1 +1 is a false statement). Therefore, according to (4), the new lower bound for the A-cost of this constant is LA, new = ⌈ log2S(c)⌉ + 1 = ⌈ log2(8)⌉ + 1 = 4. This new lower bound reveals that the solution with A-cost equal to 4, whose graph is presented in Figure 8, is in fact optimal in terms of the A-cost.

On the other hand, recall from [12] that it is always possible to find a solution with the lower bound L d,c given in (2), which in this case is L d,c = ⌈ log2S(c)⌉ = ⌈ log2(8)⌉ = 3. Figure 9 shows a graph that implements the multiplier by 11,467 with the minimum A-depth equal to 3 and five A-operations, based on the ‘Leapfrog’ Cost-5 Graph No. 14 of Appendix A of [13].

Figure 9
figure 9

Graph to implement the multiplier by 11,467 with five A -operations and the minimum A -depth equal to 3.

Since we have L A,c  = L d,c  = 3, with the current lower bounds one can assume that the three A-operations necessary to meet the minimum A-depth might be sufficient to implement the constant multiplier by 11,467. However, from (5) we have that the lower bound Ld, new = ⌈ log2S(c)⌉ = ⌈ log2(8)⌉ = 3 can be preserved if at least L EA extra A-operations are used in addition to the three A-operations dictated by the bound L d,new  = 3. The value for L EA is obtained using (6), where the conditions Ω c ≥ log 2 S c − 2 log 2 S c − 1 +1 and S c ≤3× 2 log 2 S c − 2 +1 do not hold (in other words, 1≥ log 2 8 − 2 log 2 8 − 1 +1 and 8≤3× 2 log 2 8 − 2 +1 are false statements), leading to L EA = log 2 S c − 3 × 2 log 2 S c − 2 + 2 − Ω c = log 2 8 − 3 × 2 log 2 8 − 2 + 2 − 1 = 2. This means that three A-operations are actually not sufficient to preserve the minimum A-depth and at least five A-operations are required. Thus, the solution with A-cost equal to 5 and A-depth equal to 3, whose graph is presented in Figure 9, is in fact optimal in terms of the A-cost subject to the minimum A-depth.

It is clear that the proposed lower bounds are more informative in comparison to the lower bounds from [12]. Similar examples arise with the integer constants 11,093 and 13,003, among others. Finally, Table 1 shows the percentage of constants with improved lower bounds among all the 14-bit odd integer constants and among 10,000 randomly generated constants that can be expressed with B-bits, where 14 < B ≤ 32.

Table 1 Percentage of constants with improved lower bounds

6 Conclusions

This paper has presented an extension of the current theoretical lower bounds for the A-cost and the A-depth in single constant multiplication (SCM) blocks constructed with shifts and A-operations (additions and subtractions). The insight of this work has been the introduction of the number of prime factors of the constant as key information to such extension.

Additionally, a new lower bound has been revealed, namely, the theoretical minimum number of A-operations required to preserve the minimum A-depth, denoted as L EA . This new lower bound is essential because preserving the minimum A-depth has been currently an important objective to design systems with high speed and low power. By knowing L EA it is possible to have an early estimation of how many extra adders would be needed for a given implementation with the lowest A-depth, which is translated to extra chip area. Since for current and future semiconductor technologies leakage power consumption is closely related to chip area and it has a significant impact, the value L EA might provide valuable information to decide in an early stage of design if it is better to pursue a minimization of the A-cost subject to the minimum A-depth or minimize the A-cost subject to a given A-depth greater than the minimum.

As a future work, the current theoretical lower bounds for multiple constant multiplication (MCM) cases can be also extended. The proposed theorems and the extended lower bounds can be used as a basis, and the inclusion of the number of prime factors of the involved constants might, of course, play an important role as it did in this work. The theoretical lower bound for the A-cost required when the minimum A-depth is preserved, as well as the lower bound for the A-depth necessary to obtain the minimum A-cost, can be revealed. Additionally, the formulation of optimal and a suboptimal SCM and MCM algorithms to minimize the A-cost subject to the minimum A-depth can be developed, taking as a basis the theorems developed in this work, where the prime factors of the involved constants can be used as input information.

References

  1. Dempster AG, Macleod MD: Constant integer multiplication using minimum adders. IEEE Proc. Circuits Devices Syst 1994, 141(5):407-413. 10.1049/ip-cds:19941191

    Article  MATH  Google Scholar 

  2. Dempster AG, Macleod MD: Use of minimum-adder multiplier blocks in FIR digital filters. IEEE Trans. Circ. Syst. II 1995, 42(9):569-577. 10.1109/82.466647

    Article  MATH  Google Scholar 

  3. Dempster AG, Dimirsoy SS, Kale I: Designing multiplier blocks with low logic depth, in Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS 2002), vol. 5. Piscataway: IEEE; 2002:773-776.

    Google Scholar 

  4. Gustafsson O, Dempster AG, Wanhammar L: Extended results for minimum-adder constant integer multipliers. In Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS 2002) vol. 1. Piscataway: IEEE; 2002:73-76.

    Google Scholar 

  5. Gustafsson O, Dempster AG, Johansson K, Macleod MD, Wanhammar L: Simplified design of constant coefficient multipliers. Circ. Syst. Signal Process 2006, 25(2):225-251. 10.1007/s00034-005-2505-5

    Article  MathSciNet  MATH  Google Scholar 

  6. Voronenko Y, Püschel M: Multiplierless multiple constant multiplication. ACM Trans. Algorithms 2007, 3(2):1-38.

    Article  Google Scholar 

  7. Faust M, Chip-Hong C: Minimal logic depth adder tree optimization for multiple constant multiplication. In Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS 2010). Paris; 2010:457-460.

    Chapter  Google Scholar 

  8. Johansson K, Gustafsson O, DeBrunner LS, Wanhammar L: Minimum adder depth multiple constant multiplication algorithm for low power FIR filters. In Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS 2011). Rio de Janeiro; 2011:1439-1442.

    Chapter  Google Scholar 

  9. Dempster AG, Macleod MD: Using all signed-digit representations to design single integer multipliers using subexpression elimination. In Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS 2004) vol. 3. Piscataway: IEEE; 2004:165-168.

    Google Scholar 

  10. Thong J, Nicolici N: Time-efficient single constant multiplication based on overlapping digit patterns. IEEE Trans. VLSI Syst 2009, 17(9):1353-1357.

    Article  Google Scholar 

  11. Thong J, Nicolici N: An optimal and practical approach to single constant multiplication. IEEE Trans. Comput. Aided Des 2011, 30(9):1373-1386.

    Article  Google Scholar 

  12. Gustafsson O: Lower bounds for constant multiplication problems. IEEE Trans. Circ. Syst. II 2007, 54(11):974-978.

    Article  Google Scholar 

  13. Meyer-Baese U, Gustafsson O, Dempster A: The canonical minimised adder graph representation. In Proceedings of the SPIE 2008, Independent Component Analyses, Wavelets, Unsupervised Nano-Biomimetic Sensors, and Neural Networks VI, vol. 6979. SPIE; 2008:1-12.

    Google Scholar 

  14. De-Dinechin F: Multiplication by rational constants. IEEE Trans. Circ. Syst. II 2012, 59(2):98-102.

    Article  Google Scholar 

  15. Aksoy L, Costa E, Flores P, Monteiro J: Finding the optimal tradeoff between area and delay in multiple constant multiplications. Elsevier J. Microprocessors Microsystems 2011, 35(8):729-741. 10.1016/j.micpro.2011.08.009

    Article  Google Scholar 

  16. Pan Y, Meher PK: Bit-level optimization of adder trees for multiple constant multiplications for efficient FIR filter implementation. IEEE Trans. Circ. Syst. I 2014, 61(2):455-462.

    Google Scholar 

  17. Mirzaei S, Kastner R, Hosangadi A: Layout aware optimization of high speed fixed coefficient FIR filters for FPGAs. Int. J. Reconfigurable Comput 2010, 4(1):1-17.

    Article  Google Scholar 

  18. Martin K, Martin H, Jens W, Peter Z, Uwe M-B: Multiple constant multiplication with ternary adders. In Proceedings of the 23rd International Conference on Field Programmable Logic and Applications FPL 2013. Porto; 2013:1-8.

    Chapter  Google Scholar 

  19. Hung-Min S, Mu-En W, Wei-Chi T, Hinek MJ: Dual RSA and its security analysis. IEEE Trans. Inf. Theory 2007, 53(8):2922-2933.

    Article  Google Scholar 

  20. Meyer-Baese U: Digital Signal Processing with Field Programmable Gate Arrays. 3rd edition. New York: Springer; 2007. p. 85

    Google Scholar 

  21. MATLAB Central: File Exchange. . Accessed 07 Jul 2014 http://www.mathworks.co.jp/matlabcentral/fileexchange/9730-canonical-signeddigits/content/csdigit.m

Download references

Acknowledgements

This work has been supported by CONACYT Project No. 179587.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David E Troncoso Romero.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors’ original submitted files for images

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0), which permits use, duplication, adaptation, distribution, and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Troncoso Romero, D.E., Meyer-Baese, U. & Dolecek, G.J. On the inclusion of prime factors to calculate the theoretical lower bounds in multiplierless single constant multiplications. EURASIP J. Adv. Signal Process. 2014, 122 (2014). https://doi.org/10.1186/1687-6180-2014-122

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/1687-6180-2014-122

Keywords