Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3578360.3580254acmconferencesArticle/Chapter ViewAbstractPublication PagesccConference Proceedingsconference-collections
research-article
Open access

A Multi-threaded Fast Hardware Compiler for HDLs

Published: 17 February 2023 Publication History

Abstract

A set of new Hardware Description Languages (HDLs) are emerging to ease hardware design. HDL compilation time is a major bottleneck in the designer’s productivity. Moreover, as the HDLs are developed independently, the possibility to share innovations in compilation technology is limited.
We design and implement LiveHD, a new multi-threaded, fast, and generic compilation framework across many HDLs (FIRRTL, Verilog, and Pyrope). We propose new parallel full and bottom-up passes to handle HDLs. The resulting compiler can parallelize all the compiler steps.
LiveHD can achieve 5.5x scalability speedup when elaborating a CHISEL RISC-V Manycore. It also gets from 7.7x to 8.4x scalability speedup for a benchmark designed in all three HDLs. This is achieved with a fast single-threaded LiveHD baseline with 6x speedup compared to compilers such as Scala-FIRRTL and 8.6x against Yosys on Verilog.

References

[1]
[n. d.]. Database and Tool Framework for EDA. https://github.com/The-OpenROAD-Project/OpenDB Online; accessed on 10 April 2020.
[2]
[n. d.]. Protocol Buffers - Google’s data interchange format. https://github.com/protocolbuffers/protobuf Online; accessed on 10 August 2021.
[3]
[n. d.]. slang - SystemVerilog Language Services. https://github.com/MikePopoloski/slang Online; accessed on 5 August 2021.
[4]
2021. XLS: Accelerated HW Synthesis. https://github.com/google/xls Online; accessed on 9 August 2021.
[5]
2022. CIRCT: Circuit IR Compilers and Tools. https://github.com/llvm/circt Online; accessed on 12 August 2022.
[6]
2022. Guide to Rustc Development. https://rustc-dev-guide.rust-lang.org/ Online; accessed on 12 August 2022.
[7]
2022. Rapid Open Hardware Development (ROHD) Framework. https://github.com/intel/rohd Online; accessed on 9 August 2022.
[8]
Jonathan Bachrach, Huy Vo, Brian Richards, Yunsup Lee, Andrew Waterman, Rimas Avižienis, John Wawrzynek, and Krste Asanović. 2012. Chisel: constructing hardware in a scala embedded language. In DAC Design Automation Conference 2012. 1212–1221.
[9]
Giuliano Belinassi. 2021. The Parallel GCC. https://gcc.gnu.org/wiki/ParallelGcc Online; accessed on 28 July 2021.
[10]
Matheus Tavares Bernardino, Giuliano Belinassi, Paulo Meirelles, Eduardo Martins Guerra, and Alfredo Goldman. 2020. Improving Parallelism in Git and GCC: Strategies, Difficulties, and Lessons Learned. IEEE Software.
[11]
Andrew Canis, Jongsok Choi, Mark Aldham, Victor Zhang, Ahmed Kammoona, Tomasz Czajkowski, Stephen D Brown, and Jason H Anderson. 2013. LegUp: An open-source high-level synthesis tool for FPGA-based processor/accelerator systems. ACM Transactions on Embedded Computing Systems (TECS), 13, 2 (2013), 1–27.
[12]
Cliff Click and Michael Paleczny. 1995. A simple graph-based intermediate representation. ACM Sigplan Notices, 30, 3 (1995), 35–49.
[13]
John Clow, Georgios Tzimpragos, Deeksha Dangwal, Sammy Guo, Joseph McMahan, and Timothy Sherwood. 2017. A pythonic approach for rapid hardware prototyping and instrumentation. In Field Programmable Logic and Applications (FPL), 2017 27th International Conference on. 1–7.
[14]
Ron Cytron, Jeanne Ferrante, Barry K Rosen, Mark N Wegman, and F Kenneth Zadeck. 1991. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems (TOPLAS), 13, 4 (1991), 451–490.
[15]
Google Developers. 2022. Perfetto: System profiling, app tracing and trace analysis. https://perfetto.dev/ Online; accessed on 10 August 2022.
[16]
Gilles Duboscq, Thomas Würthinger, Lukas Stadler, Christian Wimmer, Doug Simon, and Hanspeter Mössenböck. 2013. An intermediate representation for speculative optimizations in a dynamic compiler. In Proceedings of the 7th ACM workshop on Virtual machines and intermediate languages. 1–10.
[17]
Schuyler Eldridge, Prithayan Barua, Aliaksei Chapyzhenka, Adam Izraelevitz, Jack Koenig, Chris Lattner, Andrew Lenharth, George Leontiev, Fabian Schuiki, and Ram Sunder. 2021. MLIR as hardware compiler infrastructure. In Workshop on Open-Source EDA Technology (WOSET).
[18]
Geovane Fedrecheski, Laisa CP Costa, and Marcelo K Zuffo. 2016. Elixir programming language evaluation for IoT. In 2016 IEEE International Symposium on Consumer Electronics (ISCE). 105–106.
[19]
Taras Glek and Jan Hubicka. 2010. Optimizing real world applications with GCC link time optimization. arXiv preprint arXiv:1010.2196.
[20]
Matthias Grimmer, Chris Seaton, Roland Schatz, Thomas Würthinger, and Hanspeter Mössenböck. 2015. High-performance cross-language interoperability in a multi-language runtime. In ACM SIGPLAN Notices. 51, 78–90.
[21]
Michael T Heath. 1986. Hypercube Multiprocessors 1986. Siam.
[22]
Adam Izraelevitz, Jack Koenig, Patrick Li, Richard Lin, Angie Wang, Albert Magyar, Donggyu Kim, Colin Schmidt, Chick Markley, and Jim Lawson. 2017. Reusability is FIRRTL ground: Hardware construction languages, compiler frameworks, and transformations. In Proceedings of the 36th International Conference on Computer-Aided Design. 209–216.
[23]
Shunning Jiang, Berkin Ilbeyi, and Christopher Batten. 2018. Mamba: closing the performance gap in productive hardware development frameworks. In 2018 55th ACM/ESDA/IEEE Design Automation Conference (DAC). 1–6.
[24]
Teresa Johnson, Mehdi Amini, and Xinliang David Li. 2017. ThinLTO: scalable and incremental LTO. In 2017 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 111–121.
[25]
Andrew W Keep and R Kent Dybvig. 2013. A nanopass framework for commercial compiler development. In Proceedings of the 18th ACM SIGPLAN international conference on Functional programming. 343–350.
[26]
David Koeplinger, Matthew Feldman, Raghu Prabhakar, Yaqi Zhang, Stefan Hadjis, Ruben Fiszel, Tian Zhao, Luigi Nardi, Ardavan Pedram, and Christos Kozyrakis. 2018. Spatial: A language and compiler for application accelerators. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation. 296–311.
[27]
Chris Lattner and Vikram Adve. 2004. LLVM: A compilation framework for lifelong program analysis & transformation. In Code Generation and Optimization, 2004. CGO 2004. International Symposium on. 75–86.
[28]
Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache, and Oleksandr Zinenko. 2021. MLIR: Scaling compiler infrastructure for domain specific computation. In 2021 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 2–14.
[29]
Derek Lockhart and Christopher Zibrat, Garyd Batten. 2014. PyMTL: A Unified Framework for Vertically Integrated Computer Architecture Research. In Microarchitecture, Proceedings of the 47th Annual IEEE/ACM International Symposium on (MICRO’14). IEEE Computer Society, Washington, DC, USA. 280–292. issn:1072-4451 https://doi.org/10.1109/MICRO.2014.50
[30]
Kingshuk Majumder and Uday Bondhugula. 2021. HIR: An MLIR-based Intermediate Representation for Hardware Accelerator Description. arXiv preprint arXiv:2103.00194.
[31]
Cristian Mattarei, Makai Mann, Clark Barrett, Ross G Daly, Dillon Huff, and Pat Hanrahan. 2018. CoSA: Integrated Verification for Agile Hardware Design. In 2018 Formal Methods in Computer Aided Design (FMCAD). 2–5.
[32]
George C Necula, Scott McPeak, Shree P Rahul, and Westley Weimer. 2002. CIL: Intermediate language and tools for analysis and transformation of C programs. In International Conference on Compiler Construction. 213–228.
[33]
Rachit Nigam, Sachille Atapattu, Samuel Thomas, Zhijing Li, Theodore Bauer, Yuwei Ye, Apurva Koti, Adrian Sampson, and Zhiru Zhang. 2020. Predictable accelerator design with time-sensitive affine types. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 393–407.
[34]
Rachit Nigam, Samuel Thomas, Zhijing Li, and Adrian Sampson. 2021. A compiler infrastructure for accelerator generators. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems. 804–817.
[35]
Rishiyur Nikhil. 2004. Bluespec System Verilog: efficient, correct RTL from high level specifications. In Proceedings. Second ACM and IEEE International Conference on Formal Methods and Models for Co-Design, 2004. MEMOCODE’04. 69–70.
[36]
Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Sebastian Maneth, Stéphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. 2004. An overview of the Scala programming language.
[37]
Maksim Panchenko, Rafael Auler, Laith Sakka, and Guilherme Ottoni. 2021. Lightning bolt: powerful, fast, and scalable binary optimization. In Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction. 119–130.
[38]
Jing Pu, Steven Bell, Xuan Yang, Jeff Setter, Stephen Richardson, Jonathan Ragan-Kelley, and Mark Horowitz. 2017. Programming heterogeneous systems from an image processing DSL. ACM Transactions on Architecture and Code Optimization (TACO), 14, 3 (2017), 1–25.
[39]
Fabian Schuiki, Andreas Kurth, Tobias Grosser, and Luca Benini. 2020. LLHD: A multi-level intermediate representation for hardware description languages. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 258–271.
[40]
Amirali Sharifian, Reza Hojabr, Navid Rahimi, Sihao Liu, Apala Guha, Tony Nowatzki, and Arrvindh Shriraman. 2019. μ ir-an intermediate representation for transforming and optimizing the microarchitecture of application accelerators. In Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture. 940–953.
[41]
Sheng-Hong Wang, Haven Skinner, Sakshi Garg, Hunter Coffman, Kenneth Mayer, Akash Sridhar, Rafael T. Possignolo, and Jose Renau. [n. d.]. Pyrope. http://masc.soe.ucsc.edu/livehd/pyrope/ Online; accessed on 16 August 2021.
[42]
Richard M Stallman. 2009. Using the gnu compiler collection: a gnu manual for gcc version 4.3. 3. CreateSpace.
[43]
Mark Stephenson, Jonathan Babb, and Saman Amarasinghe. 2000. Bidwidth analysis with application to silicon compilation. ACM SIGPLAN Notices, 35, 5 (2000), 108–120.
[44]
Synopsys Inc. [n. d.]. Formality User Guide.
[45]
Jose I. Villar, Jorge Juan, Manual J. Bellido, Julian Viejo, David Guerrero, and J. Decaluwe. 2011. Python as a hardware description language: A case study. In 2011 VII Southern Conference on Programmable Logic (SPL). 117–122. https://doi.org/10.1109/SPL.2011.5782635
[46]
Sheng-Hong Wang, Rafael Trapani Possignolo, Qian Chen, Rohan Ganpati, and Jose Renau. 2019. LGraph: A Unified Data Model and API for Productive Open-Source Hardware Design. In Open-Source EDA Technology, Proceedings of the Second Workshop on (WOSET’19).
[47]
Sheng-Hong Wang, Akash Sridhar, and Jose Renau. 2019. LNAST: A Language Neutral Intermediate Representation for Hardware Description Languages. In Open-Source EDA Technology, Proceedings of the Second Workshop on (WOSET’19).
[48]
Christian Wimmer, Codrut Stancu, Peter Hofer, Vojin Jovanovic, Paul Wögerer, Peter B Kessler, Oleg Pliss, and Thomas Würthinger. 2019. Initialize once, start fast: application initialization at build time. Proceedings of the ACM on Programming Languages, 3, OOPSLA (2019), 1–29.
[49]
Clifford Wolf. 2022. Yosys Open SYnthesis Suite. https://yosyshq.net/yosys/ Online; accessed on 5 August 2022.

Index Terms

  1. A Multi-threaded Fast Hardware Compiler for HDLs

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CC 2023: Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction
    February 2023
    249 pages
    ISBN:9798400700880
    DOI:10.1145/3578360
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 17 February 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Compiler Design
    2. HDL
    3. Parallel Compilation

    Qualifiers

    • Research-article

    Conference

    CC '23
    Sponsor:

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 641
      Total Downloads
    • Downloads (Last 12 months)323
    • Downloads (Last 6 weeks)23
    Reflects downloads up to 10 Nov 2024

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media