FIFOAdvisor: A DSE Framework for Automated FIFO Sizing of High-Level Synthesis Designs

Stefan Abi-Karam, Rishov Sarkar, Suhail Basalama, Jason Cong, Callie Hao

Designing high-performance hardware using High-Level Synthesis (HLS) often feels like a balancing act. You want your data to flow through the system as fast as possible, but you don't want to drown your chip in memory buffers. This paper introduces FIFOAdvisor, a framework that automates the tricky task of sizing these buffers (FIFOs) to achieve the perfect balance between speed and resource usage.

TL;DR

FIFOAdvisor is the first automated framework to optimize FIFO sizes for complex HLS designs, including those with unpredictable, data-dependent logic. By leveraging a lightning-fast simulator, it explores thousands of design possibilities in seconds—achieving up to a $10^7\times$ speedup over traditional methods—to find the optimal trade-off between latency and memory usage.

What Problem Does This Paper Address?

In HLS dataflow designs, hardware modules communicate via First-In-First-Out (FIFO) buffers. Sizing these is a classic "Goldilocks" problem:

  • Too small: The system stalls because producers have nowhere to put data, or worse, the entire design deadlocks.
  • Too big: You waste precious on-chip memory (BRAM), leaving less room for actual logic.

Existing tools usually play it safe by over-allocating memory or rely on static analysis that fails when the hardware's behavior depends on the input data (data-dependent control flow). The only reliable way to check for deadlocks in these complex designs is through simulation, but traditional RTL co-simulation is painfully slow, taking hours or days to evaluate just a few configurations.

Methods

FIFOAdvisor transforms FIFO sizing into a multi-objective black-box optimization problem. Its architecture consists of three main pillars:

  1. LightningSim Engine: Instead of slow RTL simulation, it uses LightningSim, a trace-based simulator that is 99.9% cycle-accurate. Crucially, it can re-simulate a design with new FIFO sizes in under 1ms by reusing the initial execution trace.
  2. BRAM Modeling & Pruning: The authors developed an accurate model to predict how many BRAM blocks a FIFO will consume. They use this to "prune" the search space—since BRAM usage grows in discrete steps, there’s no point in testing a FIFO size of 2047 if it uses the same resources as 2048 but performs worse.
  3. Search Optimizers: The framework supports several strategies, including:
  4. Simulated Annealing (SA): A guided search to find the "Pareto frontier" (the set of best possible trade-offs).
  5. Grouped Optimization: A novel approach that recognizes that FIFOs defined in arrays (common in ML kernels) should likely be sized identically, drastically reducing the complexity of the search.
  6. Greedy Search: A fast heuristic that shrinks FIFOs until performance drops.

Datasets

The researchers evaluated FIFOAdvisor using:

  • Stream-HLS Benchmarks: A suite of 21 realistic streaming designs, including linear algebra kernels (gemm, k3mm) and deep learning components (Autoencoder, ResidualBlock).
  • FlowGNN: A complex, real-world hardware accelerator for Graph Neural Networks. This served as a "stress test" because its control flow is highly dependent on the input graph structure, making it impossible to optimize with older static tools.

Key Insights and Ideas

  • Simulation is Mandatory: The authors argue convincingly that for modern HLS, static analysis isn't enough. If your hardware's behavior changes based on the data it's processing, you must simulate to guarantee a deadlock-free design.
  • The Power of Grouping: One of the most effective optimizations was "Grouped" search. By treating arrays of FIFOs as a single unit, the optimizer reached high-quality solutions much faster than by tweaking every single buffer individually.
  • Trace Reuse is the Secret Sauce: The ability to run "incremental simulations" is what makes this practical. Collecting one execution trace and then mathematically adjusting the timing for different FIFO sizes is what enables the massive speedup over RTL simulation.

Key Results

  • Massive Speedup: FIFOAdvisor completed optimization tasks in seconds that would have taken 8 to 16 days using traditional Vitis HLS co-simulation. This represents a geomean speedup of over one million times ($10^6\times$).
  • Memory Savings: Compared to "naive" maximum sizing, FIFOAdvisor reduced BRAM usage by an average of 70-80% while maintaining nearly identical performance.
  • Deadlock Recovery: In cases where a "minimum-size" baseline caused a deadlock, FIFOAdvisor successfully identified the specific buffers that needed to be enlarged to make the design functional with zero BRAM overhead.

Limitations and Future Work

The primary limitation acknowledged is input sensitivity. Currently, FIFOAdvisor optimizes based on a single execution trace (one set of inputs). If a different input triggers a much more complex data pattern, the chosen FIFO sizes might still lead to stalls.

The authors suggest that future versions could extend the framework to optimize across a "suite" of test stimuli simultaneously to ensure robustness. Additionally, while they focused on BRAM, they noted that future work could incorporate Flip-Flop (FF) and UltraRAM (URAM) usage into the optimization model.

Summary updated

BibTeX
@inproceedings{abikaram2026fifoadvisor,
  author = {Stefan Abi-Karam and Rishov Sarkar and Suhail Basalama and Jason Cong and Callie Hao},
  title = {{FIFOAdvisor: A DSE Framework for Automated FIFO Sizing of High-Level Synthesis Designs}},
  booktitle = {ASP-DAC},
  year = {2026},
  doi = {10.1109/asp-dac66049.2026.11420742},
}
Figure