Loop Rerolling for Hardware Decompilation
Zachary D. Sisco, Jonathan Balkind, Timothy Sherwood, Ben Hardekopf
Abstract
We introduce the new problem of hardware decompilation . Analogous to software decompilation, hardware decompilation is about analyzing a low-level artifact—in this case a netlist , i.e., a graph of wires and logical gates representing a digital circuit—in order to recover higher-level programming abstractions, and using those abstractions to generate code written in a hardware description language (HDL). The overall problem of hardware decompilation requires a number of pieces. In this paper we focus on one specific piece of the puzzle: a technique we call hardware loop rerolling . Hardware loop rerolling leverages clone detection and program synthesis techniques to identify repeated logic in netlists (such as would be synthesized from loops in the original HDL code) and reroll them into syntactic loops in the recovered HDL code. We evaluate hardware loop rerolling for hardware decompilation over a set of hardware design benchmarks written in the PyRTL HDL and industry standard SystemVerilog. Our implementation identifies and rerolls loops in 52 out of 53 of the netlists in our benchmark suite, and we show three examples of how hardware decompilation can provide concrete benefits: transpilation between HDLs, faster simulation times over netlists (with mean speedup of 6x), and artifact compaction (39% smaller on average).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d44abac3-0bb4-4f23-8cf5-f26bb989ffe2Cited by top-tier papers9
- Programming-by-Demonstration for Long-Horizon Robot TasksNoah Patton, Kia Rahmani, Meghana Missula, Joydeep Biswas et al.POPL 2024 · 11 citations
- BoolE: Exact Symbolic Reasoning via Boolean Equality SaturationJiaqi Yin, Zhan Song, Chen Chen, Qihao Hu et al.DAC 2025 · 6 citations
- Don't Repeat Yourself! Coarse-Grained Circuit Deduplication to Accelerate RTL SimulationHaoyuan Wang, Thomas Nijssen, Scott BeamerASPLOS 2024 · 5 citations
- FPGA Technology Mapping Using Sketch-Guided Program SynthesisGus Henry Smith, Benjamin Kushigian, Vishal Canumalla, Andrew Cheung et al.ASPLOS 2024 · 4 citations
- Control Logic Synthesis: Drawing the Rest of the OWLZachary D. Sisco, Andrew David Alex, Zechen Ma, Yeganeh Aghamohammadi et al.ASPLOS 2024 · 2 citations
Builds on3
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt et al.POPL 2021 · 170 citations
- Synthesizing structured CAD models with equality saturation and inverse transformationsChandrakana Nandi, Max Willsey, Adam Anderson, James R. Wilcox et al.PLDI 2020 · 65 citations
- VeriSketch: Synthesizing Secure Hardware Designs with Timing-Sensitive Information Flow PropertiesArmaiti Ardeshiricham, Yoshiki Takashima, Sicun Gao, Ryan KastnerCCS 2019 · 19 citations
Related papers
- A compiler infrastructure for accelerator generatorsRachit Nigam, Samuel Thomas, Zhijing Li, Adrian SampsonASPLOS 2021 · 54 citations
- Efficiently Exploiting Low Activity Factors to Accelerate RTL SimulationScott Beamer, David DonofrioDAC 2020 · 36 citations
- LLHD: a multi-level intermediate representation for hardware description languagesFabian Schuiki, Andreas Kurth, Tobias Grosser, Luca BeniniPLDI 2020 · 35 citations
- Wire sorts: a language abstraction for safe hardware compositionMichael Christensen, Timothy Sherwood, Jonathan Balkind, Ben HardekopfPLDI 2021 · 13 citations
- Hestia: An Efficient Cross-Level Debugger for High-Level SynthesisRuifan Xu, Jin Luo, Yawen Zhang, Yibo Lin et al.MICRO 2024 · 4 citations
