FPGA Technology Mapping Using Sketch-Guided Program Synthesis

Gus Henry Smith,Ben Kushigian,Vishal Canumalla,Andrew Cheung,Steven Lyubomirsky,Sorawee Porncharoenwase,René Just,Gilbert Louis Bernstein,Zachary Tatlock
DOI: https://doi.org/10.1145/3620665.3640387
2024-01-30
Abstract:FPGA technology mapping is the process of implementing a hardware design expressed in high-level HDL (hardware design language) code using the low-level, architecture-specific primitives of the target FPGA. As FPGAs become increasingly heterogeneous, achieving high performance requires hardware synthesis tools that better support mapping to complex, highly configurable primitives like digital signal processors (DSPs). Current tools support DSP mapping via handwritten special-case mapping rules, which are laborious to write, error-prone, and often overlook mapping opportunities. We introduce Lakeroad, a principled approach to technology mapping via sketch-guided program synthesis. Lakeroad leverages two techniques -- architecture-independent sketch templates and semantics extraction from HDL -- to provide extensible technology mapping with stronger correctness guarantees and higher coverage of mapping opportunities than state-of-the-art tools. Across representative microbenchmarks, Lakeroad produces 2--3.5$\times$ the number of optimal mappings compared to proprietary state-of-the-art tools and 6--44$\times$ the number of optimal mappings compared to popular open-source tools, while also providing correctness guarantees not given by any other tool.
Hardware Architecture,Programming Languages
What problem does this paper attempt to address?
This paper proposes a solution to the problem of FPGA (Field-Programmable Gate Array) technology mapping. Traditional FPGA mapping tools are inefficient and require manual coding of special rules, especially when dealing with complex and highly configurable hardware modules such as digital signal processors (DSPs), resulting in time-consuming and error-prone processes and potentially missing optimization opportunities. This paper introduces a new method called Lakeroad, which employs sketch-guided program synthesis techniques to provide scalable technology mapping through architecture-independent sketch templates and semantic extraction from hardware description languages (HDLs), ensuring stronger correctness and higher mapping coverage. Compared to existing tools, Lakeroad improves the number of optimal mappings generated in representative microbenchmark tests by 2 to 3.5 times, and by 6 to 44 times for popular open-source tools, while also providing correctness guarantees that other tools lack. By automating semantic extraction from HDL models and utilizing architecture-independent sketch templates, Lakeroad reduces the overhead of supporting new architectures and complex primitives, making technology mapping more comprehensive, scalable, and correct. In summary, this paper aims to efficiently map high-level hardware designs onto the complex structure of FPGAs to improve performance and reduce manual efforts. This goal is achieved by introducing a new program synthesis method called Lakeroad.