2021 Survey Graph Neural Networks For Eda
2021 Survey Graph Neural Networks For Eda
Abstract—Driven by Moore’s law, the chip design complexity can be conducted by ML while optimizing PPA. Finally,
is steadily increasing. Electronic Design Automation (EDA) has Reinforcement Learning (RL) explores the design space, learns
been able to cope with the challenging very large-scale integra- policies, and executes transformations to get optimal designs
tion process, assuring scalability, reliability, and proper time-
to-market. However, EDA approaches are time and resource- envisioning the future with an “AI-assisted Design Flow”.
demanding, and they often do not guarantee optimal solutions. One enabling factor for using ML in EDA is the huge
To alleviate these, Machine Learning (ML) has been incorporated amount of data that is generated by the EDA tools along
into many stages of the design flow, such as in placement the design process. To apply ML over such data, these
and routing. Many solutions employ Euclidean data and ML have to be pre-processed and labeled. Existing solutions
techniques without considering that many EDA objects are
represented naturally as graphs. The trending Graph Neural use such data as Euclidean data, i.e. representing them in
Networks are an opportunity to solve EDA problems directly a 2-D Euclidean space, allowing the use of ML methods
using graph structures for circuits, intermediate RTLs, and such as Convolutional Neural Networks (CNNs). However,
netlists. In this paper, we present a comprehensive review of the the trending neural network framework for graphs called
existing works linking the EDA flow for chip design and Graph Graph Neural Networks (GNNs) has shown a significant im-
Neural Networks.
Index Terms—Electronic Design Automation, Very Large-scale provement in dealing with data whose structure is intuitively
Integration, Machine Learning, Register-Transfer Level, Graph a graph. Even though GNNs appeared already in 2005, their
Neural Networks recent combination with Deep Learning (DL) operations like
convolution and pooling has drawn significant attention in
I. I NTRODUCTION fields such as molecular graphs [2], recommendation sys-
Over time, the chip design flow has incorporated multiple tems [3], and traffic prediction [4].
software tools to synthesize, simulate, test, and verify different In EDA, the most natural representation of circuits, inter-
electronic designs efficiently and reliably. The compendium of mediate RTL, netlists, and layouts are graphs. Thus, in the last
those tools is called Electronic Design Automation (EDA). two years, few studies have recognized this opportunity and
Those tools automatize the chip design flow sketched in have incorporated the usage of GNNs to solve EDA problems.
Figure 1. Nevertheless, the flow is sequential and time- This survey gives a comprehensive review of some recent
demanding. Often, the design has to be verified and tested to studies using GNNs in different stages of the EDA flow. It
ensure correctness, reliability, and objective closure. But only first provides background on both fields and, successively,
during physical verification and signoff, and testing, the quality a list of the seminal related works. The rest of this survey
of the design in terms of Power, Performance, and Area (PPA) is organized as follows: In Section II, we briefly review the
can be measured. Corrective modifications in intermediate EDA flow and background concepts. In Section III, we provide
steps are often needed, and they result in multiple iterations of a more detailed explanation of the different types of GNNs.
the design flow. Thus, estimations of PPA in earlier stages of In Section IV, we discuss different studies applied to EDA.
the design would reduce the required iterations, increase the Finally, Section V concludes by briefly mentioning some open
reliability of the design while going deeper on the flow, and challenges and future directions.
finally, improve the Quality of Results (QoR).
In the last years, design complexity driven by Moore’s II. BACKGROUND AND D EFINITION
law has increased. Chip capacity has been doubling around In this section, we briefly review background concepts
every two years, which translates into increasing efforts for related to EDA flow, graphs and GNNs.
the design and verification of even more diversified chips.
EDA tools have aimed at coping with the new challenges and A. Electronic Design Automation
provided automated solutions for Very Large-Scale Integration The progress in EDA tools and design methods, and the
(VLSI). EDA tools commonly face NP-complete problems, use of different levels of abstractions on the design flow
which Machine Learning (ML) methods could solve better and have improved the hardware design productivity. Figure 1
faster. Thus, ML has been integrated into EDA, specially to sketches the stages of a modern chip design process. The
logic synthesis, placement, routing, testing and verification [1]. flow starts with the chip specification modeling the desired
In [1], four main areas of action were recognized. First, ML is application. The architecture analysis and prototype of the
used to predict optimal configurations for traditional methods. design represent the design as a collection of interacting
Second, ML learns features of models and their performances modules such as processors, memories, and buses. In the
to predict the behavior of unseen designs without running the functional and logical design, the behavioral description of
costly step of synthesis. Moreover, design space exploration those modules is mapped to Register Transfer Level (RTL)
978-1-6654-3166-8/21/$31.00 ©2021 IEEE blocks using Hardware Description Languagess (HDLs) such
Functional
Architectural Logic Physical
and Logic Fabrication Packaging
Design Synthesis Design
Design
// module.v
Specification Bus
if (input1==1) begin
...
end
else if
...
I/O ASIC end
end
endmodule
Fig. 2. End-to-End flow using EDA objects as graphs. Feature nodes x and ground truth labels (e.g. red and green flags) are collected using EDA tools. One
of the GNNs flavors extracts node embeddings h, which are the inputs to other ML methods for classification or regression at node, graph, or edge level.
comparable or better results than a human designer but takes netlist. The GCN is a key component because it extracts local
hours instead of months. and global information, which is needed by the RL agent.
Wirelength optimization during 2-D placement is analyzed as
D. Placement a case of study.
During placement, the design gates are mapped to the In [27], an autonomous RL agent finds optimal placement
exact locations of the chip layout. The larger the design, parameters in an inductive manner. Netlists are mapped as
the more complex this process is. A poor decision during directed graphs, and nodes and edges features are handcrafted
placement can increase the chip area but also worsen the chip placement-related attributes. GraphSAGE learns the netlist
performance and, even, make it unsuitable for manufacturing embeddings and helps to generalize to new designs.
if the wirelenght is higher than the available routing resources.
Therefore, placement is seen as a constrained optimization E. Routing
problem. ML and specially, GNNs are being explored to ease In this step, the placed components, gates, and clock signals
this steps [24], [25], [26], [27]. are wired while following design rules (e.g. type of permitted
A GAT called Net2 is used to provide pre-placement net angles). These rules determine the complexity of the routing,
and path length estimations in [24]. To that end, they converted which is mostly an NP-hard or NP-complete problem. Thus,
the netlists to directed graphs, where nets represent nodes, and routing tools are mostly based on heuristics, and they do not
edges connect nets in both directions. The number of cells, fan- aim to find an optimal solution. ML methods could enhance
in, fan-out sizes, and areas are used as feature nodes. The edge the routing process by providing earlier estimations, which can
features are defined using clustering and partitioning results. be used to adjust the placement accordingly, and avoid high
The ground truth label for the nodes is the net length obtained area and long wires.
as the half-perimeter wirelength of the bounding box after In [28], a GAT is used to predict routing congestion values
placement. During inference, Net2 predicts the net length per using only a technology-specific gate-level netlist obtained
node, outperforming existing solutions. For instance, Net2a , a after physical design. To that end, the netlists are built as
version targeting accuracy, is 15% more accurate in identifying undirected graphs, where each gate is a node, and the edges are
long nets and paths, and Net2f targeting runtime, is 1000 × defined as the connections between gates that are connected by
faster. a net. The feature nodes are 50-D vectors containing informa-
In [25], GraphSAGE is leveraged to build PL-GNN, a tion about cell types, sizes, pin counts, and logic descriptions.
framework helping placer tools to make beneficial decisions To get the ground truth labels for the nodes, congestion maps
to accelerate and optimize the placement. PL-GNN converts are split into grids, and the congestion value of each grid is
netlists to hypergraphs, where nodes and edges features are taken as a label for the cells that were placed into that grid.
based on the hierarchy and the affinity of the net with The architecture presented in [28] called CongestionNet is not
memory blocks, as this provides information about critical more than an eight-layer GAT following the Equation 5. The
paths. A GNN is used to learn the node embeddings, which node embeddings are used to predict local congestion values.
are clustered by the K-means algorithm to determine optimal Using GATs improves the quality of the predictions, and the
placement groups based on the cell area. This guidance leads inference time is around 19 seconds for circuits with more
the placer tool to a placement that reduces wirelength, power, than one million cells.
and worst slack.
A proof of concept framework mapping the PPA optimiza- F. Testing
tion task in EDA to a RL problem is presented in [26]. This Testing takes place only after the packaging of the design.
RL framework uses GraphSAGE with unsupervised training to The larger the design, the higher the complexity and the
learn node and edges embeddings that can generalize to unseen execution time of the testing tools. Moreover, testing should
guarantee a high coverage, avoiding redundant test cases. Test- [2] J. You et al., “Graph Convolutional Policy Network for Goal-Directed
ing is not scalable, and it strongly relies on human expertise. Molecular Graph Generation,” ArXiv, 2018.
[3] R. Ying et al., “Graph Convolutional Neural Networks for Web-scale
To overcome those challenges, ML is being incorporated into Recommender Systems,” in Proceedings of the 24th ACM SIGKDD
the testing phase. For instance, to reduce test complexity by International Conference on Knowledge Discovery & Data Mining,
providing optimal test points in a design. [29] proposes a 2018.
[4] B. Yu et al., “Spatio-Temporal Graph Convolutional Networks: A Deep
GCN to insert fewer optimal test points on the design while Learning Framework for Traffic Forecasting,” ArXiv, 2017.
maximizing the fault coverage. To that end, a directed graph [5] J. Schreiner et al., “Design Centric Modeling of Digital Hardware,”
is built using the components of the netlist and primary ports in 2016 IEEE International High Level Design Validation and Test
Workshop (HLDVT), 2016.
as the nodes, and the wires between them as edges. The [6] W. L. Hamilton, Graph Representation Learning.
node features are 4-D vectors containing information about [7] L. Lovász et al., “Random Walks on Graphs: A Survey,” Combinatorics,
the logic level of each gate, controllability, and observability Paul erdos is eighty, 1993.
[8] B. Perozzi, R. Al-Rfou, and S. Skiena, “DeepWalk: Online Learning of
attributes. Using Design-for-Test tools, the ground truth labels Social Representations,” ser. KDD ’14, Aug. 2014.
are collected, and the nodes are labeled as “easy-to-observe” [9] A. Grover and J. Leskovec, “Node2vec: Scalable Feature Learning for
or “difficult-to-observe”. The proposed GCN model generates Networks,” in Proceedings of the 22nd ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining, ser. KDD ’16,
the node embeddings using Equation 4, replacing the aggre- Aug. 2016.
gation function with a weighted sum to distinguish between [10] M. Gori et al., “A New Model for Learning in Graph Domains,”
predecessor and successor nodes. in Proceedings. 2005 IEEE International Joint Conference on Neural
Networks, 2005.
Having the node embeddings, a binary node classification [11] T. N. Kipf, “Deep Learning with Graph-Structured Representations,”
is performed. During inference, the nodes of new netlists are Ph.D. dissertation, University of Amsterdam, 2020.
classified into “difficult” or “easy-to-observe”. This informa- [12] Z. Wu et al., “A Comprehensive Survey on Graph Neural Networks,”
IEEE Transactions on Neural Networks and Learning Systems, 2020.
tion is then used by testing tools to reduce the test complexity. [13] F. Scarselli, M. Gori et al., “The Graph Neural Network Model,” IEEE
Compared with commercial test tools, [29] reduces the obser- Transactions on Neural Networks, 2009.
vation points by around 11% while keeping the same coverage. [14] T. N. Kipf et al., “Semi-Supervised Classification with Graph Convolu-
tional Networks,” ArXiv, 2017.
G. Analog Design [15] W. L. Hamilton et al., “Inductive Representation Learning on Large
Graphs,” ArXiv, 2018.
The high complexity of the analog design flow is due [16] P. Veličković et al., “Graph Attention Networks,” ArXiv, 2018.
to the large design space and the signal susceptibility w.r.t. [17] Z. Lin et al., “A Structured Self-attentive Sentence Embedding,” ArXiv,
2017.
noise. Thus, the analog flow could strongly benefit from [18] Y. Ma et al., “Understanding Graphs in EDA: From Shallow to Deep
modern approaches like ML to modernize the methods and Learning,” in ACM Proceedings of the 2020 International Symposium
improve the QoRs. Specially, GNNs are being applied to on Physical Design, 2020.
[19] B. Khailany et al., “Accelerating Chip Design With Machine Learning,”
this field. In [30], a GNN is used to predict net parasitic IEEE Micro, 2020.
capacitance and device parameters. The design schematics are [20] L. Servadei et al., “Cost Optimization at Early Stages of Design Using
converted to hypergraphs and are the inputs to ParaGraph [30], Deep Reinforcement Learning,” ser. MLCAD ’20, 2020.
[21] E. Ustun et al., “Accurate Operation Delay Prediction for FPGA HLS
a version of GNN that combines ideas from GraphSAGE Using Graph Neural Networks,” in Proceedings of the 39th International
and GAT. CircuitGNN [31] uses a GCN to predict magnetic Conference on Computer-Aided Design, ser. ICCAD ’20, 2020.
properties per node using components as nodes and edges as [22] Y. Zhang et al., “GRANNITE: Graph Neural Network Inference for
Transferable Power Estimation,” in 2020 57th ACM/IEEE Design Au-
magnetic and electrical relationships. Circuit Designer [32] tomation Conference (DAC), 2020.
uses a GCN to extract the node embeddings of a circuit, which [23] A. Mirhoseini et al., “A Graph Placement Methodology for Fast Chip
are later used as inputs to an RL agent targeting technology- Design,” Nature, 2021.
[24] Z. Xie et al., “Net2: A Graph Attention Network Method Customized
independent transistor sizing. In [33], a new architecture called for Pre-Placement Net Length Estimation,” in 2021 26th Asia and South
Pooling with Edge Attention (PEA) is introduced to evaluate Pacific Design Automation Conference (ASP-DAC), 2021.
how different placement solutions would affect the analog [25] Y.-C. Lu et al., “VLSI Placement Optimization using Graph Neural
Networks,” 2020.
circuit performance. [26] A. Agnesina et al., “A General Framework for VLSI Tool Parameter
V. C ONCLUSION Optimization with Deep Reinforcement Learning.”
[27] ——, “VLSI Placement Parameter Optimization Using Deep Reinforce-
To the best of our knowledge, our work is the first that ment Learning,” in Proceedings of the 39th International Conference on
collects seminal papers on the crossing between EDA and Computer-Aided Design, ser. ICCAD ’20, 2020.
[28] R. Kirby et al., “CongestionNet: Routing Congestion Prediction Using
modern GNNs. In the presented works, GNNs outperformed Deep Graph Neural Networks,” in 2019 IFIP/IEEE 27th International
the baseline methods. However, as the complexity of circuits Conference on Very Large Scale Integration (VLSI-SoC), 2019.
in EDA continues growing, scalability and heterogeneity are [29] Y. Ma et al., “High Performance Graph Convolutional Networks with
Applications in Testability Analysis,” in Proceedings of the 56th Annual
still open challenges. We expect that the usage of GPUs Design Automation Conference 2019, ser. DAC ’19, 2019.
helps to alleviate this bottleneck. We believe that the high [30] H. Ren et al., “ParaGraph: Layout Parasitics and Device Parameter
potential of ML combined with GNNs will open the door to Prediction using Graph Neural Networks,” in 2020 57th ACM/IEEE
Design Automation Conference (DAC), 2020.
many more solutions targeting the EDA flow. We hope that [31] G. Zhang et al., “Circuit-GNN: Graph Neural Networks for Distributed
using netlist, layouts, and intermediate RTL directly as graph Circuit Design,” in International Conference on Machine Learning,
structures can accelerate the earlier prediction of hardware 2019.
[32] H. Wang et al., “GCN-RL Circuit Designer: Transferable Transistor
metrics, and the usage of RL to solve combinatorial tasks Sizing with Graph Neural Networks and Reinforcement Learning,” in
in the EDA flow. Finally, we also expect that future work 2020 57th ACM/IEEE Design Automation Conference (DAC), 2020.
on GNNs targets some open-graph-related challenges such as [33] Y. Li et al., “A Customized Graph Neural Network Model for Guiding
Analog IC Placement,” in 2020 IEEE/ACM International Conference On
heterogeneity, scalability, and diversity of graphs. Computer Aided Design (ICCAD), 2020.
R EFERENCES
[1] G. Huang et al., “Machine Learning for Electronic Design Automation:
A Survey,” ACM Transactions on Design Automation of Electronic
Systems (TODAES), 2021.