1. Introduction
Floorplanning is a key stage in the physical design flow of very large-scale integration (VLSI) circuits and printed circuit Boards (PCB) [
1]. With the rapid development of integrated circuit manufacturing technology, the complexity of VLSI/PCB design has increased dramatically, and modern design usually focuses on fixed-outline floorplanning (FOFP) problems [
2]. Compared to layout planning problems without a fixed outline, the FOFP problem is more challenging, due to the additional constraint of placing a large number of modules within a given outline [
3]. Additionally, the usage of an intellectual property (IP) core introduces hard modules into the VLSI floorplan, making it much more challenging to optimize the fixed-outline floorplan of mixed-size modules [
4].
Floorplanning algorithms generally fall into two categories: floorplanning algorithms based on the combinatorial optimization model (FA-COMs) and floorplanning algorithms based on the analytic optimization model (FA-AOMs). By coding the relative positions of modules by combinatorial data structures, FA-COMs formulate floorplanning problems as combinatorial optimization problems addressed by heuristics and metaheuristics [
5,
6,
7,
8]. Although the combinatorial codes can be naturally converted into compact floorplans complying with the nonoverlapping constraint, the combinatorial explosion results in poor performance on large-scale cases. A remedy for this is to implement multilevel methods in which clustering or partitioning strategies are introduced to reduce the scale of the problem [
3,
9,
10]. However, multilevel strategies typically optimize the placement in a local way, which, in turn, makes it difficult to converge to the globally optimal placement of VLSI and PCB designs.
FA-AOMs address analytical floorplanning models with continuous optimization algorithms, contributing to their low complexity and fast convergence in large-scale cases [
11]. A typical FA-AOM consists of two stages: the global floorplanning stage, generating promising results, and the legalization stage that refines the positions of modules to eliminate constraint violations. However, the cooperative design of global floorplanning and legalization is extremely challenging due to the multimodal nonsmooth characteristics of floorplanning models. Global floorplanning is typically implemented by addressing a smoothed optimization model with a first-order gradient-based analytical algorithm [
12,
13]; however, the smoothing approximation can introduce some distortion to the characteristics of the mathematical model, and the first-order analytical algorithm usually converges to a local optimal solution. Legalization can be implemented through the refinement of constraint graphs [
12,
13] or the second-order cone programming strategy [
14], which usually leads to a relatively high complexity that hinders their application in large-scale scenarios.
To address the fixed-outline floorplanning problem efficiently, this paper proposes a fixed-outline floorplanning algorithm based on the conjugate subgradient algorithm (CSA) where Q-learning is introduced to adaptively regulate the step size of the CSA. The main contributions of this paper are as follows:
The nonsmooth wirelength and overlapping metrics are directly optimized by the CSA. Since the CSA searches the solution space using both a deterministic gradient-based search and stochastic exploration, it is much more likely to obtain the optimal floorplan by flexibly regulating its step size.
The CSA is implemented in a population-based search pattern equipped with a dynamical step size regulated based on Q-learning, which contributes to its fast convergence to the optimal floorplan.
Two improved variants are proposed for the CG-based legalization algorithm [
12,
13]. They take less time to obtain legal floorplans with a shorter wirelength.
We propose a CSA-based fixed-outline floorplanning (CSF) algorithm where both global floorplanning and legalization are implemented by the CSA assisted by Q-learning (CSAQ). It strikes a balance between time complexity and floorplan quality, demonstrating competitive performance among the compared algorithms.
The remainder of this paper is organized as follows:
Section 2 reviews related work.
Section 3 introduces some preliminaries. Then, the proposed algorithm developed for fixed-outline floorplanning problems is presented in
Section 4. The numerical experiment is performed in
Section 5 to demonstrate the competitiveness of the proposed algorithm, and, finally, this paper is concluded in
Section 6.
2. Related Work
By formulating the floorplanning problem as an analytic optimization model, Zhan et al. [
15] constructed an algorithm framework consisting of a global floorplanning stage and a legalization stage which exhibited performance superior to
Parquet-4 based on sequence pairs and simulated annealing [
3]. Lin and Hung [
14] modeled global floorplanning as a convex optimization problem where modules are transformed into circles, and a push–pull mode was proposed with consideration of wirelength. Then, second-order cone programming was deployed to legalize the floorplan. By incorporating the electrostatic field model proposed in
eplace [
16], a celebrated algorithm for standard cell placement of VLSI, Li et al. [
13] created an analytic floorplanning algorithm for large-scale floorplanning cases. Then, a horizontal constraint graph (HCG) and a vertical constraint graph (VCG) were constructed to eliminate overlap of the floorplanning results. Huang et al. [
12] further improved the electrostatics-based analytical method for fixed-outline floorplanning in which module rotation and sizing were introduced to obtain floorplanning results with a shorter wirelength. Yu et al. [
17] developed a floorplanning algorithm based on the feasible-seeking approach, achieving better performance than the state-of-the-art floorplanning algorithms.
Since the typical wirelength and overlap metrics of analytical floorplanning models are not smooth, additional smoothing procedures are incorporated to make gradient-based optimization algorithms feasible. Popular smoothing approximation methods for the half-perimeter wirelength (HPWL) include the quadratic model, the logarithm-sum-exponential model, and the
-norm model, and the bell-shaped smoothing method can be adopted to smooth the overlap metric [
18]. In addition, Ray et al. [
19] proposed a nonrecursive approximation to simulate the max function for the nonsmooth HPWL model, and Chan et al. [
20] employed a Helmholtz smoothing technique to approximate the density function. However, the additional smoothing process not only introduces the extra time complexity of the FA-AOM, but also leads to its local convergence to a solution significantly different from that of the original nonsmooth model. Zhu et al. [
21] proposed addressing the nonsmooth analytical optimization model of cell placement with the CSA, and Sun et al. [
22] further developed a CSA-based floorplanning algorithm for scenarios without soft modules.
Recently, reinforcement learning (RL) was introduced to design general floorplanning algorithms. He et al. [
23] employed agents guided by the Q-learning algorithm to alleviate the need for sufficient prior human knowledge in the search process. Mirhoseini et al. [
24] proposed an RL-based method for chip floorplanning and developed an edge-based graph convolutional neural network architecture capable of learning the transferability of chips. By merging RL with a graph convolutional network (GCN), Xu et al. [
25] constructed an end-to-end learning-based floorplanning framework named
GoodFloorplan. Yang et al. [
26] proposed an end-to-end RL framework for learning a floorplanning policy, and promising results were obtained with the assistance of an edge-augmented graph attention network, a position-wise multilayer perceptron, and a gated self-attention mechanism. Moldenhauer et al. [
27] developed an open-source RL environment building upon the gymnasium API and compatible with stable-baselines3. DellaRovere et al. [
28] proposed a hybrid method that combines RL with beam search. By constructing a search tree to expand the state space of the RL agent and periodically pruning it, this approach improves key floorplanning metrics such as area and wirelength. The generalization ability of well-trained RL algorithms can facilitate their potential applications in diverse floorplanning scenarios, but it is challenging to achieve the fast convergence of RL-based floorplanning algorithms in the case of inadequate training data.
5. Experimental Results
To verify the competitiveness of the CSF, we perform numerical experiments on the GSRC and MCNC benchmarks, where the I/O pads are fixed at the given coordinates for all of the test circuits and all modules are set as hard modules. The characteristics of the benchmarks are presented in
Table 2. The compared algorithms are implemented in C++ and run on a 64-bit Windows laptop with 2.4 GHz Intel Core i7-13700H and 16 GB of memory.
As presented in
Table 2, the fixed-outline floorplanning is performed within two different settings of die size. For setting
, the die sizes are generated by (
6) with
and
. The size setting
is cited from Ref. [
17] to validate the wirelength minimization capability of the CSF. Via numerical experiments, we first show how the incorporated Q-learning enhances the performance of the CSF and then compare it with several selected floorplanning algorithms. The comparison is performed for the cases without soft modules to highlight how the CSF efficiently addresses the great challenge of minimizing the wirelength within a fixed outline for the scenarios containing only hard modules.
In the proposed CSAQ, the Q-learning strategy is introduced to automatically regulate the scale factor c of the CSA. Influenced by module sizes and the primary objectives of different stages, we specifically design the following distinct action groups for updating the c across various benchmarks:
For the global floorplanning stage, the following apply:
- −
On GSRC benchmarks, the action groups are [8, 12, 15, 20, 25];
- −
For ami33, the action groups are [80, 100, 120, 140, 160];
- −
For ami49, the action groups are [130, 180, 220, 270, 330].
For the legalization stage, the following apply:
- −
On GSRC benchmarks, the action groups are [0.1, 0.8, 5, 10, 20];
- −
For ami33, the action groups are [1, 8, 30, 60, 90];
- −
For ami49, the action groups are [10, 50, 100, 150, 200].
5.1. The Positive Effects of Q-Learning
The positive effect of Q-learning is validated by comparing the performance of different global floorplanning (GP) and legalization (LA) strategies, where the
of (
10) and (
11) are 0.4, 0.8, and 0.6 respectively. The weights
of (
8) and (
9), as well as the parameters
of the CSA and CSAQ, are presented in
Table 3. The fixed-outline die sizes are set as shown in
of
Table 2.
This study involves multiparameter collaborative optimization and employs a systematic parameter calibration strategy. First, reasonable ranges for parameters are preliminarily delineated based on their functional roles, then a rigorous sensitivity analysis is performed through a single-factor experimental design. While ensuring the stability and generalization performance of parameter combinations, the optimal configuration is finally determined. Given the extensive nature of the complete sensitivity analysis, we present a representative example—taking the average wirelength and computational time from 30 independent runs of the CSF-qq algorithm on the n100 dataset (
Figure 3)—to demonstrate the impact of varying core parameters (e.g.,
) on performance. The calibration of the remaining parameters can be conducted following this methodology.
Table 4 presents the average wirelength (HPWL) and CPU time obtained from 30 independent runs of the CSF-qq algorithm under different parameter settings: learning rate
, discount factor
, and population size
p. The parameters
are used for our primary experiments, while all other settings serve as control cases. The values in parentheses indicate the specific value for each parameter.
The results demonstrate that, when and are varied, the fluctuation in the HPWL is mostly within a 1% range. The variation in CPU time is also within a reasonable margin of stochastic fluctuation, indicating that our algorithm is highly robust to changes in these two parameters. In contrast, varying the population size p to 3 results in more significant changes in both the HPWL and CPU time. This is because a smaller population size reduces population diversity, which naturally leads to faster execution at the cost of inferior HPWL optimization.
5.1.1. The Performance of CSAQ-Based Global Floorplanning
To validate the promising effect of the CSAQ at the global floorplanning stage, we compare two CSF variants: (1) the CSF-cc implementing both global floorplanning and legalization via the CSA, (2) the CSF-qc implementing global floorplanning and legalization via the CSAQ and CSA. Due to the random characteristics of the CSA, the performances are compared using the averaged results of 30 independent runs. The average runtime of a single run of global floorplanning (
), the average runtime of a single run of legalization (
), the average runtime to complete the entire floorplanning process (
), the success rate (SR), the average wirelength (HPWL), and the improvement ratio (IR) of the HPWL are included in
Table 5. Moreover, the one-sided Wilcoxon rank-sum test is performed based on the wirelength data of 30 independent runs. The
p-values and the test results (R) with a significance level of
are also shown in
Table 5, where “+” indicates that CSF-qc significantly outperforms CSF-cc and “∼” means that the difference is not significant. The null hypothesis
for the test posits that the distribution of CSF-qc is stochastically greater than or equal to that of CSF-cc. A
p-value less than the significance level of 0.05 leads to the rejection of
, indicating that the distribution of CSF-qc is statistically significantly smaller than that of CSF-cc.
Compared to CSF-cc, CSF-qc demonstrates an enhanced success rate at the cost of a marginally longer . However, the runtime of legalization is shorter, which indicates that the better floorplanning results obtained by the CSAQ can even shorten the runtime of the legalization implemented by the CSA. Consequently, the CSF-qc can compete with CSF-cc in terms of averaged wirelength for most of the test benchmarks. However, the CSAQ-assisted GP alone cannot improve the floorplanning results to a large extent, and the hypothesis test shows that CSF-qc only outperforms CSF-cc significantly on the n200 case.
5.1.2. The Superiority of CSAQ-Based Legalization to CSA-Based Legalization
The CSF-qc is further compared with the CSF-qq, where both global floorplanning and legalization are implemented by the CSAQ. The results are presented in
Table 6, and the same hypothesis testing procedure is applied.
By employing the Q-learning strategy, the CSAQ leads to significantly better legalization results at the expense of slightly increased runtime. The statistical test indicates that CSF-qq outperforms CSF-qc on four benchmark circuits. Although the test does not demonstrate significant superiority of CSF-qq in the ami49 case, it still beats CSF-qc in terms of the average wirelength.
5.2. Comparison Between CG- and CSAQ-Based Legalization Algorithms
To further confirm the superiority of the CSAQ-based legalization algorithm, we compare the LA-CSAQ (Algorithm 7) with the LA-CG [
13] by starting the legalization with initial floorplans generated by the CSAQ-based global floorplanning algorithm
(Algorithm 4). Meanwhile, two variants of the ILA-CG (Algorithm 6) are investigated to highlight the superiority of the LA-CSAQ. Both variants of the ILA-CG set
with two different probability distributions:
ILA-CGm: , , ;
ILA-CGs: , , .
The statistical results of 30 independent runs are included in
Table 7, where MinW and HWSD represent the wirelength of minimum value and the standard deviation, respectively.
The results show that the improved CG-based legalization algorithms (ILA-CGm and ILA-CGs) generally outperform the LA-CG in terms of both the average wirelength and the minimum wirelength. Since the ILA-CGs always selects the candidate correction relationship contributing to the smallest wirelength, it optimizes the wirelength better than the ILA-CGm. Compared with the CG-based legalization methods, including the LA-CG, ILA-CGm, and ILA-CGs, the LA-CSAQ can obtain legal floorplans with a shorter wirelength, demonstrating its superiority in optimization of wirelength.
From the perspective of the average time and the success rate, the LA-CSAQ obtains legal floorplans with the shortest runtime and the highest success rate, and the significantly smaller HWSD values demonstrate its superior robustness regarding the wirelength of the floorplan. Although both the ILA-CGm and ILA-CGs outperform the LA-CG on circuits ami33, ami49, n100, and n200, none of the CG-based legalization algorithms can eliminate the constraint violations for the n300 circuit, which further confirms the superior performance of the LA-CSAQ in the task of floorplan legalization.
5.3. Comparison Between the CSF and the State-of-the-Art Floorplanning Algorithms
The competitiveness of the proposed CSAQ-based floorplanning algorithm is further validated by comparing CSF-qq (where both global floorplanning and legalization are addressed by the CSAQ) with some selected floorplanning algorithms, Parquet-4.5 [
3], Fast-FA [
8], FFA-CD [
22], and Per-RMAP [
17]. Among them, Parquet-4.5 and Fast-FA are based on the B*-tree coding structure of the floorplan, and the optimization of wirelength is addressed by the simulated annealing algorithm; FFA-CD utilizes the distribution evolution algorithm based on the probability model to optimize the orientation of modules and employs the CSA to optimize the module coordinates; and Per-RMAP models the floorplanning problem as a feasibility-seeking problem and then deals with the floorplanning problem by introducing a perturbed resettable strategy into the method of alternating projection.
For the fixed-outline floorplanning scenario, the introduction of a soft module is beneficial to achieve legal floorplans with a short wirelength. However, this paper is dedicated to a scenario involving fixed-outline floorplanning without soft modules. Note that the experimental data for Fast-FA and Per-RMAP are taken from Ref. [
17], in which the success rates of the benchmark circuits are not presented.
5.3.1. Floorplanning Within Compact Layout Regions
We first validate the performance of CSF-qq on floorplanning scenarios with a tightly arranged layout region by comparing it with Parquet-4.5 and FFA-CD. The layout region is set as the setting
presented in
Table 2. The generated floorplans of CSF-qq on the GSRC benchmarks are illustrated in
Figure 4, and the statistical results of 30 independent runs are presented in
Table 8, where IR represents the wirelength improvement ratio of CSF-qq compared to other methods. Here, the “-” indicates that the data are not provided in the relevant papers.
The numerical results show that CSF-qq is generally competitive with the compared algorithms. Compared to Parquet-4.5, the wirelength on the GSRC benchmarks is improved by 13.31∼23.39%, and the running time is reduced to a large extent. In comparison with FFA-CD, the CSF-qq generates floorplans on n100 and n200 with a shorter wirelength, and the wirelength of problem n300 is −0.14% worse than that of FFA-CD. Since a population-based CSA framework assisted by Q-learning is employed by CSF-qq, its running time on GSRC benchmarks is slightly longer than that of FFA-CD.
Meanwhile, the global convergence of CSF-qq is guaranteed by the optimizer CSAQ. It can address the MCNC benchmarks better, achieving 100% success rate (SR) on
ami49. For
ami33, a higher success rate is achieved at the cost of a certain degree of wirelength optimization performance. In comparison, the SR of Parquet-4.5 is 60%, and there are no reference data available for FFA-CD in Ref. [
22].
5.3.2. Wirelength Minimization Within Spacious Layout Regions
To validate the performance of CSF-qq on the minimization of wirelength, we compare it with two representative algorithms, Fast-SA and Per-RMAP, and the fixed outlines of layout regions are generated according to the setting
presented in
Table 2 [
17]. As presented in
Table 9, CSF-qq outperforms both Fast-SA and Per-RMAP on the GSRC benchmarks in terms of wirelength; however, it obtains a slightly longer wirelength when addressing the MCNC benchmarks. With regard to the running time, both CSF-qq and Per-RMAP beat Fast-SA markedly. Note that the results for Per-RMAP are cited from Ref. [
17], where it is implemented on a server equipped with two-way Intel Xeon Gold 6248R@3.0-GHz CPUs and 768 GB DDR4-2666 MHz memory. CSF-qq is competitive with Per-RMAP in terms of running time.
6. Conclusions
This paper introduces a Q-learning-accelerated conjugate subgradient algorithm (CSF-qq) for fixed-outline floorplanning for directly optimizing the primal nonsmooth model where Q-learning is employed to tune the step size parameter for improved convergence. The incorporation of population-based CSA search with adaptive regulation of step size demonstrates significant improvements in global exploration and exploitation, contributing to both fast convergence and refined optimized wirelength. Experimental results show that CSF-qq achieves competitive wirelength optimization compared to existing methods in hard module-only scenarios.
Nevertheless, the algorithm’s performance is less satisfactory on the small-scale MCNC benchmark than on the GSRC, and its population-based strategy incurs a slight increase in runtime. This performance gap can be attributed to the inherent limitations of the analytical subgradient method when it is applied to the irregular problem structures presented by the MCNC benchmarks, which could be remedied by simultaneous optimization of the module orientations. Future work will focus on enhancing the algorithm through orientation optimization, reducing its time complexity, and scaling it to larger problems and mixed-module floorplanning.