LightningSimV2: Faster and Scalable Simulation for High-Level Synthesis via Graph Compilation and Optimization

Rishov Sarkar,Rachel Paul,Cong Hao
2024-04-17
Abstract:High-Level Synthesis (HLS) enables rapid prototyping of complex hardware designs by translating C or C++ code to low-level RTL code. However, the testing and evaluation of HLS designs still typically rely on slow RTL-level simulators that can take hours to provide feedback, especially for complex designs. A recent work, LightningSim, helps to solve this problem by providing a simulation workflow one to two orders of magnitude faster than RTL simulation. However, it still exhibits inefficiencies due to several types of redundant computation, making it slow for large design simulation and design space exploration. Addressing these inefficiencies, we introduce LightningSimV2, a much faster and scalable simulation tool. LightningSimV2 features three main innovations. First, we perform compile-time static analysis, exploiting the repetitive structures in HLS designs, e.g., loops, to reduce the simulation workload. Second, we propose a novel graph-based simulation approach, with decoupled simulation graph construction step and graph traversal step, significantly reducing repeated computation. Third, benefiting from the decoupled approach, LightningSimV2 can perform incremental stall analysis extremely fast, enabling highly efficient design space exploration of large numbers of complex hardware parameters, e.g., optimal FIFO depths. Moreover, the DSE is well-suited for parallel computing, further improving the DSE efficiency. Compared with LightningSim, LightningSimV2 achieves up to 3.5x speedup in full simulation and up to 577x speed up for incremental DSE. Our code is open-source on GitHub at
Performance,Hardware Architecture
What problem does this paper attempt to address?
The paper attempts to address the issue of inefficiency and slow speed of existing simulation tools when handling complex designs in High-Level Synthesis (HLS). Specifically, traditional RTL-level simulators take hours to provide feedback on complex designs, and even the recently proposed LightningSim, although faster by 1 to 2 orders of magnitude compared to traditional methods, still has some efficiency issues such as redundant calculations due to repeated computations and event scanning, as well as inefficiencies during Design Space Exploration (DSE). These problems limit designers' ability to quickly and accurately evaluate HLS designs, especially when extensive optimization of complex hardware parameters is required. To solve the above issues, the paper proposes LightningSimV2, which improves simulation speed and scalability through the following three main innovations: 1. **Compile-time Static Analysis**: Utilizing repetitive structures in HLS designs (such as loops) to reduce the simulation workload and avoid redundant processing of these patterns. 2. **Graph-based Simulation Method**: Decoupling the simulation graph construction from the graph traversal steps, significantly reducing redundant calculations and speeding up the simulation. 3. **Incremental Stalling Analysis**: By using the decoupled method, LightningSimV2 can perform incremental stalling analysis extremely quickly, supporting efficient design space exploration, particularly for complex hardware parameters in large-scale designs (such as optimal FIFO depth). With these improvements, LightningSimV2 is up to 3.5 times faster than LightningSim in full simulation and up to 577 times faster in incremental DSE, greatly enhancing the evaluation efficiency of HLS designs.