Approximate Logic Synthesis: A Reinforcement Learning-Based Technology Mapping Approach

Ghasem Pasandi, Shahin Nazarian, Massoud Pedram

Introduction

In the traditional semiconductor design flow, logic synthesis is the critical process of transforming an abstract Boolean description into a physical netlist of gates. Historically, this process has demanded strict logical equivalence. However, the rise of error-tolerant applications—such as image processing, machine learning, and search engines—has paved the way for Approximate Logic Synthesis (ALS). By strategically introducing minor errors, ALS can achieve substantial improvements in circuit area, power consumption, and delay.

The primary challenge in ALS is the "error budget" allocation: determining how much error each internal gate can tolerate without exceeding a global output threshold. Existing tools often rely on slow, manual heuristics that do not generalize across different designs. To address this, the authors propose Q-ALS, a framework that leverages Reinforcement Learning (RL) to optimize the technology mapping stage of synthesis.

The Q-ALS Framework

Q-ALS treats technology mapping as a sequential decision-making problem. It employs a Q-learning agent to navigate the circuit graph, where each node represents a state and the actions involve selecting between exact or approximate gate implementations.

The Q-ALS framework overview, illustrating the interaction between the Q-learning agent and the logic synthesis environment.

Key Components of the RL Agent:

  1. State and Action Space: The agent moves through the circuit node by node. For each node, it chooses an implementation from a library, balancing accuracy against physical gains.
  2. Error Metric: The system uses Maximum Hamming Distance (MHD) between the truth tables of exact and approximate versions as the primary local error metric.
  3. Reward Function: The agent is incentivized through a reward system that grants positive points for area or delay reductions that stay within the error budget, and negative points for budget violations or lack of improvement.
  4. Error Propagation: To ensure global accuracy, Q-ALS utilizes Boolean Difference Calculus. This probabilistic method estimates how a local error at an internal gate propagates to the primary outputs, allowing the agent to make informed local decisions that respect global constraints.

Generalization and Scalability

A significant innovation in Q-ALS is its ability to generalize. Standard Q-learning uses a discrete matrix that is specific to the size of the training circuit. To apply the learned knowledge to new, unseen circuits of varying sizes, the authors perform non-linear regression on the trained Q-matrix. This process creates a continuous polynomial function capable of predicting optimal error tolerances for any test network, making the tool highly scalable.

Experimental Results

The framework was evaluated against standard industry benchmarks (MCNC, ITC 99, ISCAS 85) and compared with state-of-the-art ALS tools like SASIMI.

Performance comparison of Q-ALS against state-of-the-art ALS tools across various benchmarks, showing significant improvements in efficiency.

Key Findings:

  • Area and Delay Reduction: Q-ALS achieved up to a 70% reduction in area and a 36% reduction in delay for MCNC benchmarks while maintaining a 95% accuracy threshold. On industrial-scale ITC 99 benchmarks, it averaged a 23% area reduction.
  • Computational Efficiency: The framework demonstrated a runtime reduction of 2.21x to 15.94x compared to competing tools. While initial training takes approximately 5 hours, the inference phase for new circuits is nearly instantaneous.
  • Prioritized Optimization: By focusing on delay reduction as the primary goal and area as a tie-breaker, Q-ALS aligns with the requirements of modern high-performance hardware design.

Conclusion and Future Work

Q-ALS demonstrates that Reinforcement Learning can significantly outperform traditional heuristic-based methods in approximate logic synthesis. By learning generalizable patterns of error tolerance, it offers a practical and efficient solution for designing next-generation, energy-efficient hardware. Future research may expand this approach to include "Error Magnitude" metrics for arithmetic circuits and integrate RL across the entire synthesis pipeline, from logic optimization to physical routing.

Summary updated

BibTeX
@inproceedings{pasandi2019approximate,
  author = {Ghasem Pasandi and Shahin Nazarian and Massoud Pedram},
  title = {{Approximate Logic Synthesis: A Reinforcement Learning-Based Technology Mapping Approach}},
  booktitle = {ISQED},
  year = {2019},
  doi = {10.1109/isqed.2019.8697679},
}
Figure