DeepTPI: Test Point Insertion with Deep Reinforcement Learning

Zhengyuan Shi, Min Li, Sadaf Khan, Liuzheng Wang, Naixing Wang, Yu Huang, Qiang Xu

Abstract

Test Point Insertion (TPI) is a critical step in enhancing the testability of digital circuits, particularly for Logic Built-In Self-Test (LBIST) applications. Traditional TPI methods rely on heuristics or supervised learning models that are often limited by the sub-optimal performance of existing commercial tools. This paper introduces DeepTPI, a novel framework that reframes TPI as a sequential decision-making problem solved via Deep Reinforcement Learning (DRL). By utilizing a Graph Neural Network (GNN) combined with a Deep Q-Network (DQN) and incorporating circuit-specific semantic features, DeepTPI significantly outperforms state-of-the-art commercial tools, achieving nearly three times the average test coverage improvement on complex modern benchmarks.

Introduction

Modern integrated circuits, especially those used in safety-critical applications like autonomous vehicles and medical devices, rely on Logic Built-In Self-Test (LBIST) to ensure reliability in the field. LBIST typically employs pseudo-random pattern generators to detect hardware faults. However, many circuits contain Random Pattern Resistant (RPR) faults—structural configurations that are statistically unlikely to be activated or observed through random inputs.

To address this, engineers employ Test Point Insertion (TPI), adding control or observation points to the circuit to improve signal controllability and observability. Identifying the optimal locations for these points is an NP-hard problem. Conventional approaches use simulation-based heuristics or supervised learning models trained on heuristic labels. These methods often hit a performance ceiling because they are designed to mimic existing tools rather than discover superior strategies. DeepTPI overcomes these limitations by using Reinforcement Learning to explore the design space directly, guided by the objective of maximizing test coverage.

Methodology

DeepTPI treats the TPI process as a Markov Decision Process (MDP), where an agent iteratively selects gates for test point insertion to maximize a reward based on Test Coverage (TC) improvement.

Unified Graph Representation

To handle diverse circuit architectures, DeepTPI converts designs into And-Inverter Graphs (AIGs). This representation standardizes the circuit into three node types: Primary Inputs (PI), AND gates, and NOT gates (represented as edge attributes). This simplification allows the neural network to process various designs through a consistent structural vocabulary.

Graph-DQN and Semantic Features

The architecture combines a Graph Neural Network (GNN) with a Deep Q-Network (DQN). The GNN generates embeddings for each gate, which the DQN then uses to estimate the "Q-value"—the expected coverage boost—of inserting a test point at that specific location. To enhance the model's understanding of circuit logic, DeepTPI incorporates node embeddings from DeepGate, a pre-trained model that captures circuit semantics, such as signal probability. This provides a more sophisticated starting point than simple one-hot encoding of gate types.

Testability-Aware Attention

Recognizing that signal flow in testing is directional, the framework employs a custom attention mechanism. This mechanism distinguishes between a gate’s predecessors (which influence fault triggering) and its successors (which influence fault propagation). This directionality is crucial for accurately modeling how a test point affects the overall testability of the netlist.

Experimental Evaluation

The model was trained on 400 sub-circuits derived from ISCAS89 and ITC99 benchmarks. Evaluation was conducted on eight large-scale combinational circuits from the ITC and EPFL suites, with gate counts ranging from 3.4K to 127.4K. This setup specifically tested the model's ability to generalize from small training samples to significantly larger, unseen designs.

Results and Discussion

DeepTPI demonstrated substantial improvements over state-of-the-art commercial Design-for-Test (DFT) tools:

  • Coverage Gains: DeepTPI achieved an average test coverage improvement of 5.78%, compared to 1.96% for the commercial baseline.
  • Peak Performance: In the most significant case (benchmark D3), DeepTPI’s coverage improvement was 9.02 times higher than that of the commercial tool.
  • Ablation Insights: The inclusion of testability-aware attention led to a 2.06x improvement over standard attention mechanisms, confirming that modeling the physical reality of signal propagation is vital for TPI tasks.

While DeepTPI offers superior coverage, it currently faces a trade-off in computational speed. For a 27K gate circuit, the framework takes approximately 132 seconds, whereas commercial heuristic tools complete the task in roughly 13 seconds. However, as TPI is typically an offline task performed during the design phase, the significant gains in test quality may outweigh the increased runtime.

Conclusion and Future Work

DeepTPI demonstrates that Reinforcement Learning can effectively break the performance ceiling of traditional TPI heuristics. By learning directly from the circuit's structural and semantic properties, the agent discovers insertion strategies that commercial tools overlook. Future research will focus on reducing computational overhead through parallelization and exploring batch insertion techniques, where multiple test points are placed simultaneously to improve efficiency in multi-million gate designs.

Summary updated

BibTeX
@inproceedings{shi2022deeptpi,
  author = {Zhengyuan Shi and Min Li and Sadaf Khan and Liuzheng Wang and Naixing Wang and Yu Huang and Qiang Xu},
  title = {{DeepTPI: Test Point Insertion with Deep Reinforcement Learning}},
  booktitle = {ITC},
  year = {2022},
  doi = {10.1109/itc50671.2022.00027},
}
Figure