Floorplanning of VLSI by Mixed-Variable Optimization
Abstract
By formulating the floorplanning of VLSI as a mixed-variable optimization problem, this paper proposes to solve it by memetic algorithms, where the discrete orientation variables are addressed by the distribution evolutionary algorithm based on a population of probability model (DEA-PPM), and the continuous coordination variables are optimized by the conjugate sub-gradient algorithm (CSA). Accordingly, the fixed-outline floorplanning algorithm based on CSA and DEA-PPM (FFA-CD) and the floorplanning algorithm with golden section strategy (FA-GSS) are proposed for the floorplanning problems with and without fixed-outline constraint. Numerical experiments on GSRC test circuits show that the proposed algorithms are superior to some celebrated B*-tree based floorplanning algorithms, and are expected to be applied to large-scale floorplanning problems due to their low time complexity.
Keywords: VLSI, floorplanning, distribution evolutionary algorithm, conjugate sub-gradient algorithm
1 Introduction
Floorplanning is a critical stage in the physical design of very large-scale integration circuit (VLSI) that determines the performance of VLSI chips to a large extent [1]. It is a complex optimization problem with multiple objectives and constraints, which makes it challenging to develop high-performance algorithms for floorplanning of VLSI [2].
Floorplanning algorithms generally fall into two categories: the floorplanning algorithm based on combinatorial optimization model (FA-COM) and the floorplanning algorithm based on analytic optimization model (FA-AOM). Representing the relative positions of macros by combinatorial coding structures such as the B*-tree, the sequential pair, etc., one can formulate the floorplanning problem as a combinatorial optimization problem, which is then addressed by metaheuristics in the FA-COMs [3, 4, 5, 6]. The combinatorial codes representing relative positions of macros can be naturally decoded into the compact floorplans complying with the non-overlapping constraints, however, the combinatorial explosion contributes to poor performances of FA-COM on large-scale cases. Accordingly, the problem size could be reduced by clustering or partitioning strategies, which in turn makes it hard to converge to the global optimal results of the investigated large-scale floorplanning problems [7, 8].
FA-AOMs address analytical floorplanning models by continuous optimization algorithms, which contributes to their lower time complexities on large-scale cases [9, 10]. Since the optimization results of continuous optimization algorithms do not fulfill the non-overlapping constraints for most cases, a FA-AOM usually consists of the global floorplanning stage and the legalization stage, the first optimizing the overall evaluation index, and the second tuning the positions of macros to eliminate constraint violations of results. Li et al. [11] proposed an analytic floorplanning algorithm for large-scale floorplanning cases, where the fixed-outline global floorplanning was implemented by optimizing the electrostatic field model of global placement. In the legalization stage, horizontal constraint graphs and vertical constraint graphs were constructed to eliminate overlap of floorplanning results. Huang et al. [12] presented an improved electrostatics-based analytical method for fixed-outline floorplanning, which incorporates module rotation and sizing driven by wirelength.
Since some of the evaluation indexes of global floorplanning are not smooth, additional smooth approximation to the optimization objective function could be incorporated to achieve fast convergence of gradient-based optimization algorithms. However, the approximation procedure not only introduces extra time complexity of the FA-AOM, but also leads to its local convergence to an optimal solution significantly different from that of the original non-smooth model. Accordingly, the conjugate subgradient algorithm [13] is employed in this paper to deal with the continuous variables representing coordinates of modules. Meanwhile, we address the orientation of modules by discrete variables, and formulate the floorplanning problem as a mixed-variable optimization problem.
Rest of this paper is organized as follows. Section 2 introduces some preliminaries. Then, the proposed algorithms developed for floorplanning problems with and without fixed-outline constraints are presented in Sections 3 and 4, respectively. Numerical experiment is performed in Section 5 to demonstrate the competitiveness of the proposed algorithms, and Section 6 concludes this paper.
2 Preliminaries
2.1 Problem Statement
Given a collection of rectangular modules and a set of edges (networks) , the VLSI floorplanning problem tries to minimize the total wirelength and the floorplan area by placing modules in approximate positions. Denote the center coordinates of module be , and its orientation is represented by . A floorplan of VLSI is represented by the combination of vectors , and , where , , . Subject to the constraint of placing non-overlaping modules with a fixed outline, the floorplanning problem is formulated as
(1) | ||||
where is the total wirelength, is the sum of overlapping area, and is the sum of width beyond the fixed outline. By the Lagrange multiplier method, it can be transformed into an unconstrained optimization model
(2) |
where , , and are parameters to be confirmed. Here, the square root of is adopted to ensure that all indexes to be minimized are of the same dimension.
Total Wirelength
: The total wirelength is here taken as the total sum of half-perimeter wirelength (HWPL)
(3) |
Sum of Overlapping Area
: The sum of overlapping area is computed by
(4) |
where and represent the overlapping lengths of modules and in the -axis and -axis directions, respectively. Denoting , we know
(5) |
where is confirmed by
(6) |
Denoting , we have
(7) |
where is confirmed by
(8) |
Sum of Width beyond the Fixed Outline
: For floorplanning problems with fixed-outline, the positions of modules must meet the following constraints:
where and are the width and the height of square outline, respectively. Let
and are confirmed by (6) and (8), respectively. Accordingly, can be confirmed by
(9) |
which is smoothed by
(10) |
Let , we get for legitimization of the global floorplanning result the optimization problem
(11) |
2.2 The Conjugate Sub-gradient Algorithm for Optimization of the Coordinate
Zhu et al.[13] proposed to solving the non-smooth continuous optimization model of the global placement by the conjugate sub-gradient algorithm (CSA). With an initial solution , the pseudo code of CSA is presented in Algorithm 1. Because the CSA is not necessarily gradient-descendant, the step size has a significant influence on its convergence performance. The step size is determined by the norm of the conjugate directions together with the control parameter , which is updated as . As an initial study, we set in this paper. The termination-condition 1 is satisfied if is greater than a given budget or several consecutive iterations fails to get a better solution.
2.3 The Distribution Evolutionary Algorithm for Optimization of the Orientation
Besides the coordinate vectors and , the floorplan is also confirmed by the orientation vectors . The orientation of modules is confirmed by clockwise rotation, and we set if the rotation angle is , , . The, optimization of the orientation vectors contributes to a combinatorial optimization problem.
The estimation of distribution algorithm (EDA) is a kind of metaheuristics that can address the combinatorial optimization problem well, but its balance between global exploration and local exploitation is a challenging issue [14]. Xu et al. [15] proposed for the graph coloring problem a distribution evolutionary algorithm based on a population of probability model (DEA-PPM), where a novel probability model and the associated orthogonal search are introduced to achieve well convergence performance on large-scale combinatorial problems.
The core idea of DEA-PPM for floorplanning is to simulate the probability distribution of orientations by constructing a probability matrix
(12) |
where representing the probability that module satisfies
(13) |
Then, the random initialization of generates a distribution matrix
(14) |
The implementation of DEA-PPM is based on distributed population and solution population , which are employed here for the probability distributions and instantiations of orientation, respectively. Global convergence of DEA-PPM is achieved by an orthogonal search on , and the local exploitation are implemented in both the distribution space and the solution space.
3 The Fixed-outline Floorplanning Algorithm Based on CSA and DEA-PPM
3.1 Framework
In this paper, the fixed-outline floorplanning algorithm based on CSA and DEA-PPM (FFA-CD) is proposed to solve the problem of fixed-outline floorplanning, where the DEA-PPM is employed to optimize the orientations of the modules and the CSA is used to optimize the corresponding coordinates of the modules.
The framework of FFA-CD is presented in Algorithm 2. It starts with initialization of the distribution and solution populations and , where consists of orientation combinations of modules. Meanwhile, the corresponding population and of module coordinate is initialized by Latin hypercube sampling [16]. Combining the orientation and coordinates of modules, we get the best coordinate vectors and , as well as the corresponding orientation vector . Then, the while loop of DEA-PPM is implemented to update and , where the CSA is deployed in UpdateXY to get the best module coordinate.
3.2 Evolution of the Distribution Population
In order to better explore the distribution space, DEA-PPM carries out orthogonal exploration for individuals in . Algorithm 3 gives the flow of orthogonal exploration, which aims to change worst individuals in by orthogonal transformation performed on columns of a distribution matrix. Here, is a random integer in and is a random integer in .
In Algorithm 4, the intermediate distribution population is further updated to get . Given , it is updated using and , two orientation combinations selected from and , respectively. Columns of are updated using either a exploitation strategy or a disturbance strategy presented as follows.
The exploitation strategy:
To update the column of , it is first renewed as
(15) |
where is the component of . Then, an local orthogonal transformation is performed as
(16) |
where , . is an orthogonal matrix given by
The disturbance strategy:
In order to prevent the distribution population from premature, the disturbance strategy is performed as
(17) |
where .
3.3 Optimization of the Floorplan with a Fixed Outline
The floorplan is represented by the orientation vector and the coordinate vectors and . In FFA-CD, the evolution of orientation vectors is implemented by iteration of solution population , and the corresponding coordinate vectors are optimized by the function UpdateXY.
3.3.1 Initialization of the module orientation
According to the principle of DEA-PPM, the solution population is obtained by sampling the distribution population . To accelerate the convergence process, the sampling process is performed with inheritance as the process illustrated in Algorithm 5.
3.3.2 Optimization of module position
With the orientation of modules confirmed by the solution population, the position of the modules is optimized by Algorithm 6. For a combination of position vector , the global floorplanning is first implemented by optimizing ; then, the weights of the constraint items is increased to legalize the floorplan approach by lines 4-7, or the legalization process is implemented by lines 9-10. The legalization process based on constraint graphs [10] are implemented Graph(), which is presented in Algorithm 7. To prevent and from falling into inferior local solutions, the coordinates are reinitialized if no better solution is obtained for several times.
The legalization of Algorithm 7 is implemented as follows. Let be the lower-left coordinate of block . is to the left of if it holds
is to the below of if
Denote and as the left-module set and the lower-module set of module , respectively. Then, the - and -coordinates of module are updated by
(18) |
(19) |
4 The Floorplanning Algorithm Based on the Golden Section Strategy
While the analytical optimization method is applied to the floorplanning problem without fixed-outline, it is a challenging task to minimize the floorplan area. In this paper, we proposed a floorplanning algorithm based on the golden section strategy (FA-GSS), where minimization of the floorplan area is achieved by consecutively narrowing the contour of fixed outline.
Minimization of the floorplan area is equivalent to minimizing the blank ratio
(20) |
where is the sum of areas of all modules. As presented in Algorithm 8, we use the golden section strategy to continuously reduce the area of the fixed contour. Given the initial white rate and , where the fixed-outline floorplanning is feasible for but infeasible for , we set
If a legal layout can be obtained for , then =; otherwise, we set =. Repeat the section process until .
5 Experimental Results and Analysis
To verify the performance of the proposed algorithm, we conducted experiments on the well-known test benchmark GSRC. For all test circuits, the I/O pads are fixed at the given coordinates, and the modules of all circuits are hard modules. All experiments are developed in C++ programming language program, and run in Microsoft Windows 10 on a laptop equipped with the AMD Ryzen 7 5800H @ 3.2GHz and 16GB system memory.
5.1 Wirelength Optimization with Fixed-outline Constraints
We first test the performance of FFA-CD on the fixed-outline cases. It is compared with the well-known open source layout planner Parquet-4.5 [17], where the floorplan is represented by the B*-tree and the simulated annealing algorithm to solve the combinatorial optimization model of floorplanning.
According to the given aspect ratio , the width and height of the fixed contour are calculated as [18]
(21) |
where is the summed area of all modules, and is the white rate defined in (20). The experiment set the white rate as , the aspect ratio R as 1, 1.5, 2, and the population number as 5. For different aspect ratios, each experiment was independently run 10 times, and the results were shown in Table 1.
Numerical results demonstrate that FFA-CD outperforms Parquet-4.5 on cases with more than 50 modules, but runs a bit slow for some of the small cases, which is attributed to the compact floorplan of Parquet-4.5. The combinatorial floorplan implemented by Parquet-4.5 could lead to smaller HPWL and shorter runtime, but its performance would degrade significantly while the problem size increases. The iteration mechanism based on CSA ensures that FFA-CD can explore the floorplan space more efficiently. At the same time, DEA-PPM is introduced to explore the rotation strategy, which increases the flexibility of the floorplan and greatly improves the success rate of small-scale problems. Consequently, the success rate of FF-CD was better than or equal to Parquet-4.5 for all cases. Meanwhile, better results on wirelength and tuntime is obtained in several different aspect ratios for the larger-scale cases (n50-n100).
GSRC | R | Parquet-4.5 | FFA-CD | ||||
---|---|---|---|---|---|---|---|
SR(%) | HPWL | CPU(s) | SR(%) | HPWL | CPU(s) | ||
n10 | 1.0 | 60 | 55603 | 0.04 | 100 | 55774 | 0.11 |
1.5 | 60 | 55824 | 0.04 | 100 | 56696 | 0.20 | |
2.0 | 80 | 58247 | 0.04 | 90 | 58236 | 0.31 | |
n30 | 1.0 | 100 | 172173 | 0.28 | 100 | 160208 | 0.41 |
1.5 | 90 | 173657 | 0.34 | 100 | 164237 | 0.28 | |
2.0 | 100 | 174568 | 0.32 | 100 | 166133 | 0.54 | |
n50 | 1.0 | 100 | 209343 | 0.68 | 100 | 185793 | 0.55 |
1.5 | 100 | 211591 | 0.79 | 100 | 189878 | 0.41 | |
2.0 | 100 | 208311 | 0.78 | 100 | 195398 | 0.71 | |
n100 | 1.0 | 100 | 334719 | 2.10 | 100 | 293578 | 0.89 |
1.5 | 100 | 340561 | 2.26 | 100 | 300079 | 1.05 | |
2.0 | 100 | 347708 | 2.26 | 100 | 308811 | 1.02 | |
n200 | 1.0 | 100 | 620097 | 9.03 | 100 | 521140 | 2.38 |
1.5 | 100 | 625069 | 9.07 | 100 | 529918 | 2.53 | |
2.0 | 100 | 649728 | 9.24 | 100 | 541565 | 2.71 | |
n300 | 1.0 | 100 | 768747 | 19.08 | 100 | 588118 | 3.73 |
1.5 | 100 | 787527 | 19.16 | 100 | 606548 | 3.85 | |
2.0 | 100 | 847588 | 19.63 | 100 | 626658 | 4.21 |
5.2 Minimization of Wirelength and Area without Fixed-outline Constraints
For layout planning problems without fixed contour constraints, FA-GSS is used to optimize the wirelength and area. The proposed FA-GSS is compared with Parquet-4.5 and the Hybrid Simulated Annealing Algorithm (HSA) [19], where the population size is set as 5, and we get . Due to the different magnitude of wirelength and area, the cost function to minimized for the floorplanning problem without fixed outline is taken as
(22) |
where and are the minimum values of and , respectively.
The results in Table 1 show that all examples obtain better wirelength and shorter time when the aspect ratio is 1. So, we take in FA-GSS for all test cases. For benchmarks in GSRC, the average , and runtime (CPU) of ten independent runs are collected in Table 2.
GSRC | Parquet-4.5 | HAS | FA-GSS | |||
---|---|---|---|---|---|---|
CPU(s) | CPU(s) | CPU(s) | ||||
n10 | 1.0885 | 0.03 | 1.0799 | 0.11 | 1.0688 | 0.17 |
n30 | 1.1040 | 0.19 | 1.0881 | 0.86 | 1.0959 | 0.69 |
n50 | 1.0871 | 0.47 | 1.0797 | 2.15 | 1.0750 | 1.29 |
n100 | 1.1034 | 1.61 | 1.1040 | 7.94 | 1.0648 | 3.53 |
n200 | 1.1301 | 6.23 | 1.1628 | 37.7 | 1.0713 | 8.96 |
n300 | 1.1765 | 12.87 | 1.2054 | 78.21 | 1.0715 | 15.13 |
The experimental results show that FA-GSS outperforms both Parquet-4.5 and HAS except for the n30 case. Although FA-GSS runs a bit slower than Parquet-4.5 when they are tested by the n30 case, FA-GSS has the smallest rate of increase in run time as the module size increases. This means that FA-GSS is expected to achieve excellent results on larger circuits.
6 Conclusion
In this paper, we formulate the flooplanning problem of VLSI as a mixed-variable optimization problem, where the discrete variables represent module orientations and the coordinates of modules are incorporated by continuous variables. Then, the DEA-PPM is introduced to get the module orientation, and coordinate variables are optimized by the CSA. Experimental results show that the proposed FFA-CD and FA-GSS, respectively developed for floorplanning problems with and without fixed-outline, can generally outperforms the floorplanning algorithms designed based on the B*-tree and the simulated annealing. Attributed to their low time complexity, the proposed algorithms are expected to address large-scale floorplanning problems effectively.
Acknowledgement
This research was partially supported by the National Key R& D Program of China (No.2021ZD0114600) and the Guiding Project of Scientific Research Plan of Hubei Provincial Department of Education (No. B2022394).
References
- [1] Srinivasan B, Venkatesan R, Aljafari B, et al.: A novel multicriteria optimization technique for VLSI floorplanning based on hybridized firefly and ant colony systems. IEEE Access, 11, 14677-14692 (2023)
- [2] Weng Yifan, Chen Zhen, Chen Jianli, et al.: A modified multi-objective simulated annealing algorithm for fixed-outline floorplanning. In: Proc of 2018 IEEE International Conference on Automation, Electronics and Electrical Engineering (AUTEEE), pp. 35-39. IEEE, Shenyang (2018)
- [3] Chen Jianli and Zhu Wenxing.: A hybrid genetic algorithm for VLSI floorplanning. In: Proc of 2010 IEEE International Conference on Intelligent Computing and Intelligent Systems, pp. 128-132. IEEE, Xiamen (2010)
- [4] Du Shimin, Xia Yinshui, Chu Zhufei, ea al.: A stable fixed-outline floorplanning algorithm for soft module. Journal of Electronics & Information Technology, 36(5), 1258-1265 (2014)
- [5] Zou Dexuan, Wang Gai-ge, Pan Gai, et al.: A modified simulated annealing algorithm and an excessive area model for floorplanning using fixed-outline constraints. Frontiers of Information Technology & Electronic Engineering, 17(11), 1228-1244 (2016)
- [6] Ye Yin, Yin Xi, Chen Zhenyi, et al.: A novel method on discrete particle swarm optimization for fixed-outline floorplanning. In: Proc of 2020 IEEE International Conference on Artificial Intelligence and Information Systems (ICAIIS), pp.591-595. IEEE, Dalian (2020)
- [7] Yan J Z, Chu C.: Defer: deferred decision making enabled fixed-outline floorplanning algorithm. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 29(3), 367-381 (2010)
- [8] Ji Pengli, He Kun, Wang Zhengli, et al.: A quasi-newton-based floorplanner for fixed-outline floorplanning. Computers & Operations Research, 129(6), 105225 (2010)
- [9] Lin J M and Hung Z X.: UFO: unified convex optimization algorithms for fixed-outline floorplanning considering pre-placed modules. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 30(7), 1034-1044. (2011)
- [10] Huang Zhipeng, Li Xingquan and Zhu Wenxing.: Optimization models and algorithms for placement of very large scale integrated circuits. Operations Research Transactions, 25(3), 15-36 (2021)
- [11] Li Ximeng, Peng Keyu, Huang Fuxing, et al.: PeF: poisson’s equation based large-scale fixed-outline floorplanning. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 42(6), 2002-2015 (2023)
- [12] F. Huang, D. Liu, X. Li, B. Yu and W. Zhu: Handling orientation and aspect ratio of modules in electrostatics-based large scale fixed-outline floorplanning. In: Proc. of 2023 IEEE/ACM International Conference on Computer Aided Design (ICCAD), pp. 1-9, IEEE, San Francisco(2023).
- [13] Zhu Wenxing, Chen Jianli, Peng Zheng, et al.: Nonsmooth optimization method for VLSI global placement. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 34(4), 642-655 (2015)
- [14] Shude Zhou, Zengqi Sun.: A survey on estimation of distribution algorithms. Acta Automatica Sinica, 02, 113-124 (2007)
- [15] Yongjian Xu, Huabin Cheng, Ning Xu, et al.: A distribution evolutionary algorithm for the graph coloring problem. Swarm and Evolutionary Computation, 80, 101324, (2023)
- [16] XuJie, Lu Haiyan, Zhao Jinjin, et al.: Self-adaptive gaussian keyhole imaging butterfly optimization algorithm based on latin hypercube sampling. Application Research of Computers, 39(9): 2701-2708, 2751 (2022)
- [17] Roy J A, Adya S N, Papa D A, et al.: Min-cut floorplacement. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 25(7), 1313-1326 (2006)
- [18] Zou Dexuan, Hao Guosheng, Pan Gai, et al.: An improved simulated annealing algorithm and area model for the fixed-outline floorplanning with hard modules . InL Proc of 2015 3rd International Symposium on Computational and Business Intelligence (ISCBI), PP. 21-25. IEEE, Bali (2015)
- [19] Chen Jianli, Zhu Wenxing and Ali M.M, et al.: A hybrid simulated annealing algorithm for nonslicing VLSI floorplanning. IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), 41(4), 544-553 (2011)