# Logic Synthesis Strategy Oriented to Low Power Optimization
## 4 The Strategy of Low Power Synthesis  
As in the case of the classic form of BDD, the form of SWBDD can be used to perform decomposition using a horizontal cut line. As usual, the number of bound functions (_num_of_g_) and the cardinality of the bound set (_card(Xb)_) are key. Of course, as before, some optimization methods can be used, such as non-disjoint decomposition [41; 42]. The essence of non-disjoint decomposition is to replace a number of bound functions with input variables, which leads to a reduction in the bound block. Naturally, these variables must meet certain conditions to be able to function as g functions. The number of replaced functions linking the variables x, for non-disjoint decomposition, will be given as _num_ndisj_. It should be emphasized that a reduction in the number of LUTs achieved through non-disjoint decomposition is also beneficial in terms of power consumption reduction. As in the case of the classic form of BDD, the process of finding the best decomposition in the case of SWBDD is also an iterative process, in which it is necessary to determine the value of the cost function for the implementation of a given cost decomposition. The use of SWBDD, thanks to the additional information contained in the nodes of the diagram, allows for the determination of additional parameters. Let _bound_activity_sum_ (_SWsum_) be the cumulative SW value for all nodes above the cut line. The performed numerous experiments allowed us to determine the cost function, which can be determined from the dependence (6)  
\[cost=\left((num\_of\_g-card(Xb))*32+num\_ndisj)*128-bound\_activity\_sum\right. \tag{6}\]  
The additional constants 32 and 128 were introduced only so that the multiplied part of the expression always has a greater effect on the cost value than the remainder. When analyzing the cost function, it can be observed that _num_ndisj_ is always less than 32 and _bound_activity_sum_ is always less than 128. Including _SW_ in the function of decomposition cost causes the parameter associated with dynamic power to be added to the assessment of decomposition efficiency. In this situation, it is possible to propose an algorithm of a new synthesis strategy aimed at limiting the dynamic power consumption in the obtained solutions. The algorithm called PowerdekBDD is an extension of the dekBDD algorithm [39; 40] known from the literature, which takes into account the element of minimizing dynamic power losses in the decomposition process. Figure 5: SWBDD for different variable orderings. Algorithm of Logic Decomposition Oriented to Power Optimization  
The decomposition algorithm consists of the following steps repeated cyclically:  
1. Search for the best bound set in a given step (lowest cost function value). 2. Create a g function for a bound block. 3. Create a function diagram with the top of the diagram (above the cut line) replaced by the variables g.
4. If there are still more variables in the diagram than the number of LUT inputs, go to step 1. The key element during decomposition is finding the appropriate bound set (point 1). Since the bound set corresponds to the part above the cut line in the BDD diagram, searching for the appropriate bound set comes down to changing the order of variables in the diagram at a specific cut level. Checking all order combinations is very time-consuming and has a complexity of \(O(n!/(N-k)!)\). Such complexity is unacceptable in practical applications. In the proposed solution, thanks to the heuristic approach, the complexity was limited to \(O(k*(n-k))\). The pseudocode of the algorithm for searching for the best set of variables related to a given decomposition step is presented in Algorithm 1. The algorithm's parameters are: F function diagram, \(k\) number of LUT block inputs, and n the number of function variables. The order of variables is changed in a double for loop (lines 5, 6).