Litcius/Paper detail

Loop Rerolling for Hardware Decompilation

Zachary D. Sisco, Jonathan Balkind, Timothy Sherwood, Ben Hardekopf

2023Proceedings of the ACM on Programming Languages11 citationsDOIOpen Access PDF

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).

Topics & Concepts

Computer scienceHardware description languageBenchmark (surveying)Programming languageComputer hardwareNetlistHigh-level synthesisParallel computingComputer architectureField-programmable gate arrayGeographyGeodesySoftware Engineering ResearchAdvanced Malware Detection TechniquesSoftware Testing and Debugging Techniques