Abstract
High-level synthesis (HLS) enables designers to customize hardware designs efficiently. However, it is still challenging to foresee the correlation between power consumption and HLS-based applications at an early design stage. To overcome this problem, we introduce HL-Pow, a power modeling framework for FPGA HLS based on state-of-the-art machine learning techniques. HL-Pow incorporates an automated feature construction flow to efficiently identify and extract features that exert a major influence on power consumption, simply based upon HLS results, and a modeling flow that can build an accurate and generic power model applicable to a variety of designs with HLS. By using HL-Pow, the power evaluation process for FPGA designs can be significantly expedited because the power inference of HL-Pow is established on HLS instead of the time-consuming register-transfer level (RTL) implementation flow. Experimental results demonstrate that HL-Pow can achieve accurate power modeling that is only 4.67% (24.02 mW) away from onboard power measurement. To further facilitate power-oriented optimizations, we describe a novel design space exploration (DSE) algorithm built on top of HL-Pow to trade off between latency and power consumption. This algorithm can reach a close approximation of the real Pareto frontier while only requiring running HLS flow for 20% of design points in the entire design space.
Introduction
High-Level Synthesis (HLS) has revolutionized hardware design by allowing engineers to write code in high-level languages like C++ or Python and automatically translate it into hardware (RTL). While HLS tools are effective at estimating speed and area, they traditionally struggle to predict power consumption accurately at an early stage.
Currently, to obtain an accurate power reading, a designer must take the HLS output through a full "Register-Transfer Level" (RTL) implementation flow—involving logic synthesis, placement, and routing—which can take hours or even days. This creates a significant bottleneck. Designers often have to guess which optimization strategies, such as loop unrolling or pipelining, will be power-efficient, leading to long development cycles and sub-optimal hardware. HL-Pow addresses this by providing fast, accurate power estimation directly at the HLS stage.
The HL-Pow Framework
HL-Pow is a machine-learning framework that bypasses the traditional RTL implementation bottleneck. It consists of a two-pronged approach: a power modeling framework and an intelligent Design Space Exploration (DSE) algorithm.
Automated Feature Construction
Instead of waiting for RTL results, HL-Pow extracts features from the HLS Intermediate Representation (IR) and reports:
- Architecture Features: It pulls resource counts (LUTs, DSPs, etc.) and performance metrics from standard HLS reports.
- Activity Features: To capture dynamic power, the tool uses an LLVM-based annotator to instrument the C++ code, tracking signal switching activities during functional simulation.
- Histogram Representation: Because different designs have varying numbers of hardware operators, HL-Pow uses a histogram representation to bin switching activities by operation type (e.g., additions, multiplications). This creates a fixed-length input vector suitable for machine learning models regardless of design complexity.
Machine Learning Models
The authors evaluated several models, including Gradient Boosting Decision Trees (GBDT) and Convolutional Neural Networks (CNNs), to map these high-level features to real-world power values. The CNN model proved most effective at capturing the complex, non-linear relationships between code directives and physical power consumption.
Design Space Exploration (DSE)
To help designers find the best balance between latency and power (the Pareto frontier), the authors developed a novel DSE algorithm built on top of the HL-Pow inference engine.
The algorithm uses a five-step process—Pruning & Division, Initial Sampling, Design Evaluation, Pareto Frontier Search, and Candidate Selection—to navigate the design space. By using Standard Deviation Reduction (SDR) to sample only the most promising design points, the algorithm avoids the need for exhaustive testing of every possible configuration.
Key Results and Insights
The framework was evaluated using the Polybench suite on a Xilinx Zynq UltraScale+ ZCU102 FPGA, with ground-truth power measured via onboard sensors.
- High Accuracy: The CNN model achieved a Mean Absolute Error (MAE) of 4.67% (approx. 24 mW) compared to actual measurements, significantly outperforming traditional high-level models.
- Generalization: Once trained on a specific FPGA platform, HL-Pow can predict power for entirely new applications without retraining, making it a highly versatile tool for hardware developers.
- Efficient Exploration: The DSE algorithm reached a near-perfect approximation of the real Pareto frontier while only requiring HLS runs for 20% of the possible design points. This represents a 5x speedup for designers trying to optimize their hardware.
Conclusion
HL-Pow demonstrates that IR-level analysis is the "sweet spot" for power estimation: it is far more accurate than report-based estimation but significantly faster than RTL simulation. While the current model is platform-specific to the Xilinx UltraScale+, the methodology is portable. Future work may involve cross-platform modeling or integrating these predictions directly into HLS compiler optimization engines.
Summary updated