TL;DR
This paper introduces DeepTPI, a novel approach for optimizing test point insertion in logic circuits using deep reinforcement learning. By framing test point insertion as a sequential decision-making problem, DeepTPI achieves significantly higher test coverage improvements compared to commercial tools, particularly for complex circuits with random pattern resistant faults.
What Problem Does This Paper Address?
Modern digital circuits, especially those used in safety-critical applications like self-driving cars and healthcare, demand high reliability. Logic Built-In Self-Test (LBIST) is a common technique for ensuring this reliability, but it struggles to detect certain types of faults known as Random Pattern Resistant (RPR) faults. These faults are prevalent in complex circuits and lead to insufficient test coverage. Test Point Insertion (TPI) is a method to mitigate this by adding extra gates (test points) to improve circuit testability. However, finding the optimal placement for these test points is an NP-hard problem. While existing methods range from heuristic approaches to supervised learning, they often fall short on modern circuits due to computational costs, limited accuracy, or being bounded by the performance of heuristic algorithms. This paper addresses the need for a more effective and scalable TPI solution.
Methods
DeepTPI tackles the TPI problem by formulating it as a Reinforcement Learning (RL) task. The core of their approach involves:
- Reinforcement Learning Formulation: The TPI problem is modeled as a Markov Decision Process (MDP). The agent's goal is to sequentially insert test points to maximize the improvement in LBIST test coverage.
- Graph Neural Network (GNN) for State Representation: Circuits are represented as directed graphs. A Graph-based Deep Q-Network (Graph-DQN) is employed to process these graph structures and estimate the value of different actions (test point insertions).
- Deep Q-Learning (DQN): The RL agent is trained using Deep Q-Learning, a value-based method suitable for discrete action spaces and deterministic state transitions.
- Testability-Aware Attention Mechanism: To enhance the GNN's ability to capture crucial information for testability, a novel attention mechanism is introduced. This mechanism differentiates the importance of predecessors and successors of a gate, recognizing that predecessors influence fault activation and successors affect fault propagation.
- Feature-Based Pre-training: To incorporate prior circuit knowledge, node features are enriched with embeddings from a pre-trained model called DeepGate. This model learns general-purpose gate embeddings that capture logic function and structural information.
- Unified AIG Representation: Circuits are converted into an And-Inverter Graph (AIG) format, simplifying the representation by using only AND and NOT gates, which reduces the complexity of the RL problem.
Datasets
- Training Data: 400 sub-circuits extracted from ISCAS89 and ITC99 benchmarks were used for RL training.
- Testing Data: Eight large combinational circuits from ITC and EPFL benchmarks were used for evaluation. These circuits vary in size from 3.4K to 127.4K gates and have no overlap with the training set, demonstrating the model's generalization capabilities.
Key Insights and Ideas
- RL Outperforms Supervised Learning for TPI: Framing TPI as an RL problem allows the agent to learn through interaction, avoiding the need for exhaustive fault simulation or reliance on potentially sub-optimal labels from commercial tools, which is a limitation of prior supervised learning approaches.
- Graph Representation is Key: Modeling circuits as graphs and using GNNs is crucial for capturing the complex interdependencies between logic gates, which is essential for effective testability analysis.
- Testability-Aware Attention is Crucial: Simply aggregating neighbor information is insufficient. The proposed attention mechanism, which specifically considers the roles of predecessors (fault activation) and successors (fault propagation) in testability, significantly improves performance.
- Pre-trained Embeddings Boost Performance: Leveraging pre-trained gate embeddings from DeepGate provides valuable prior knowledge, enabling the RL agent to learn more effectively and achieve better results with less training data.
- AIG Simplification: Converting circuits to AIG simplifies the state space for the RL agent, making the problem more tractable without sacrificing essential circuit information for TPI.
Key Results
- DeepTPI significantly outperforms a state-of-the-art commercial DFT tool in terms of test coverage improvement. On average, DeepTPI achieved a 5.78% test coverage improvement, while the commercial tool achieved 1.96%. This represents a 2.95x improvement.
- For specific circuits like D3, DeepTPI achieved a 4.78% improvement compared to the commercial tool's 0.53%, a nearly 9x difference.
- The testability-aware attention mechanism resulted in an average test coverage improvement of 5.78%, compared to 2.81% for an agent without attention and 3.32% for an agent with normal attention.
- Using pre-trained gate embeddings (DeepGate) led to an average test coverage improvement of 5.78%, compared to 2.93% for an agent trained without pre-training. This is a 1.97x improvement.
- The number of inserted test points was kept at 1.0% of the total gates for testing circuits, demonstrating efficiency in achieving high coverage gains with minimal overhead.
Limitations and Future Work
- Computational Complexity: While DeepTPI achieves superior results, its inference time is approximately 10x longer than the commercial DFT tool. However, the authors argue this is acceptable as TPI is a one-time effort in the DFT phase.
- Future Work: The authors suggest several avenues for future improvement:
- Parallelization: DeepTPI can be parallelized on multi-devices to reduce runtime.
- GNN Iterations: Reducing the number of GNN iterations could also improve efficiency, potentially with more training data.
- Batch Insertion: Inserting multiple test points in a single inference round could further speed up the process.
Summary updated