Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Modular Hardware Design of Pipelined Circuits with Hazards

Published: 20 June 2024 Publication History
  • Get Citation Alerts
  • Abstract

    Modular design is critical in reducing hardware designer's cognitive load and development cost. However, it is challenging to modularize high-performance pipelined circuits with structural, data, and control hazards because their resolution---stalling, and bypassing, and discard-and-restarting---introduce cross-stage dependencies. The dependencies could potentially mandate monolithic control logic and create combinational loops, hindering modular design. An effective method to modularize pipelined circuits is valid-ready interfaces, but they apply to a relatively simple form of pipelined circuits only with structural hazards. We propose hazard interfaces, a generalization of valid-ready interfaces that can modularize pipelined circuits not only with structural but also with data and control hazards. The key idea is enveloping the cross-stage dependencies within interfaces. We also design combinators for hazard interfaces in the style of map-reduce that facilitate decomposition of control logic. We implement a compiler (to synthesizable Verilog) for a prototype language supporting hazard interfaces and combinators, and design a sound and efficient type checker that proves the absence of combinational loops. With case studies on 5-stage RISC-V CPU core and 100 Gbps Ethernet NIC, we demonstrate that hazard interfaces indeed facilitate modular design while incurring no noticeable cost in performance, power, and area over reference designs in Chisel and Verilog.

    References

    [1]
    Advanced Micro Devices, Inc. 2022. AXI Register Slice. https://www.xilinx.com/products/intellectual-property/axi-register-slice.html
    [2]
    T Ajayi, D Blaauw, TB Chan, CK Cheng, VA Chhabria, DK Choo, M Coltella, S Dobre, R Dreslinski, and M Fogaça. 2019. OpenROAD: Toward a Self-Driving, Open-Source Digital Layout Implementation Tool Chain. Proc. GOMACTECH, 1105–1110.
    [3]
    Jens Axboe. 2017. fio - Flexible I/O tester. https://fio.readthedocs.io/en/latest/fio_doc.html
    [4]
    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 Proceedings of the 49th Annual Design Automation Conference (DAC ’12). Association for Computing Machinery, New York, NY, USA. 1216–1225. isbn:9781450311991 https://doi.org/10.1145/2228360.2228584
    [5]
    Berkeley Architecture Research. 2021. Sodor Core. https://github.com/ucb-bar/riscv-sodor/tree/sodor-old
    [6]
    Per Bjesse, Koen Claessen, Mary Sheeran, and Satnam Singh. 1998. Lava: hardware design in Haskell. In Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming (ICFP ’98). Association for Computing Machinery, New York, NY, USA. 174–184. isbn:1581130244 https://doi.org/10.1145/289423.289440
    [7]
    Thomas Bourgeat, Clément Pit-Claudel, Adam Chlipala, and Arvind. 2020. The essence of Bluespec: a core language for rule-based hardware design. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 243–257. isbn:9781450376136 https://doi.org/10.1145/3385412.3385965
    [8]
    L.P. Carloni, K.L. McMillan, and A.L. Sangiovanni-Vincentelli. 2001. Theory of latency-insensitive design. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 20, 9 (2001), 1059–1076. https://doi.org/10.1109/43.945302
    [9]
    Christopher Celio. 2018. A Highly Productive Implementation of an Out-of-Order Processor Generator. Ph. D. Dissertation. EECS Department, University of California, Berkeley. http://www2.eecs.berkeley.edu/Pubs/TechRpts/2018/EECS-2018-151.html
    [10]
    Joonwon Choi, Muralidaran Vijayaraghavan, Benjamin Sherman, Adam Chlipala, and Arvind. 2017. Kami: a platform for high-level parametric hardware specification and its modular verification. Proc. ACM Program. Lang., 1, ICFP (2017), Article 24, aug, 30 pages. https://doi.org/10.1145/3110268
    [11]
    Michael Christensen, Timothy Sherwood, Jonathan Balkind, and Ben Hardekopf. 2021. Wire Sorts: A Language Abstraction for Safe Hardware Composition. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2021). Association for Computing Machinery, New York, NY, USA. 175–189. isbn:9781450383912 https://doi.org/10.1145/3453483.3454037
    [12]
    John Clow, Georgios Tzimpragos, Deeksha Dangwal, Sammy Guo, Joseph McMahan, and Timothy Sherwood. 2017. A pythonic approach for rapid hardware prototyping and instrumentation. In 2017 27th International Conference on Field Programmable Logic and Applications (FPL). 1–7. https://doi.org/10.23919/FPL.2017.8056860
    [13]
    Deeksha Dangwal, Georgios Tzimpragos, and Timothy Sherwood. 2020. Agile Hardware Development and Instrumentation With PyRTL. IEEE Micro, 40, 4 (2020), 76–84. https://doi.org/10.1109/MM.2020.2997704
    [14]
    Jeffrey Dean and Sanjay Ghemawat. 2008. MapReduce: Simplified Data Processing on Large Clusters. Commun. ACM, 51, 1 (2008), jan, 107–113. issn:0001-0782 https://doi.org/10.1145/1327452.1327492
    [15]
    David Durst, Matthew Feldman, Dillon Huff, David Akeley, Ross Daly, Gilbert Louis Bernstein, Marco Patrignani, Kayvon Fatahalian, and Pat Hanrahan. 2020. Type-directed scheduling of streaming accelerators. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 408–422. isbn:9781450376136 https://doi.org/10.1145/3385412.3385983
    [16]
    Embedded Microprocessor Benchmark Consortium. 2023. EEMBC. https://www.eembc.org/
    [17]
    Alex Forencich, Alex C. Snoeren, George Porter, and George Papen. 2020. Corundum: An Open-Source 100-Gbps Nic. In 2020 IEEE 28th Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM). 38–46. issn:2576-2621 https://doi.org/10.1109/FCCM48280.2020.00015
    [18]
    Sungsoo Han, Minseong Jang, and Jeehoon Kang. 2023. ShakeFlow: Functional Hardware Description with Latency-Insensitive Interface Combinators. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2 (ASPLOS 2023). Association for Computing Machinery, New York, NY, USA. 702–717. isbn:9781450399166 https://doi.org/10.1145/3575693.3575701
    [19]
    Steven F. Hoover. 2017. Timing-Abstract Circuit Design in Transaction-Level Verilog. In 2017 IEEE International Conference on Computer Design (ICCD). 525–532. issn:1063-6404 https://doi.org/10.1109/ICCD.2017.91
    [20]
    Minseong Jang, Jungin Rhee, Woojin Lee, Shuangshuang Zhao, and Jeehoon Kang. 2024. Modular Hardware Design of Pipelined Circuits with Hazards (artifact and appendix). https://doi.org/10.5281/zenodo.10906305 Project webpage:
    [21]
    Martin Kristien, Bruno Bodin, Michel Steuwer, and Christophe Dubach. 2019. High-level synthesis of functional patterns with Lift. In Proceedings of the 6th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (ARRAY 2019). Association for Computing Machinery, New York, NY, USA. 35–45. isbn:9781450367172 https://doi.org/10.1145/3315454.3329957
    [22]
    Yanbing Li and M. Leeser. 1995. HML: an innovative hardware description language and its translation to VHDL. In Proceedings of ASP-DAC’95/CHDL’95/VLSI’95 with EDA Technofair. 691–696. https://doi.org/10.1109/ASPDAC.1995.486388
    [23]
    R. 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. https://doi.org/10.1109/MEMCOD.2004.1459818
    [24]
    J. O’Donnell. 2002. Overview of hydra: a concurrent language for synchronous digital circuit design. In Proceedings 16th International Parallel and Distributed Processing Symposium. 9 pp–. https://doi.org/10.1109/IPDPS.2002.1016653
    [25]
    Brandon Reagen, Robert Adolf, Yakun Sophia Shao, Gu-Yeon Wei, and David Brooks. 2014. MachSuite: Benchmarks for accelerator design and customized architectures. In 2014 IEEE International Symposium on Workload Characterization (IISWC). 110–119. https://doi.org/10.1109/IISWC.2014.6983050
    [26]
    Mary Sheeran. 1984. muFP, a language for VLSI design. In Proceedings of the 1984 ACM Symposium on LISP and Functional Programming (LFP ’84). Association for Computing Machinery, New York, NY, USA. 104–112. isbn:0897911423 https://doi.org/10.1145/800055.802026
    [27]
    Satnam Singh. 2021. Hardware Design and Verification with Cava. https://talks.ee.ic.ac.uk/talk/index/1224
    [28]
    Frans Skarman and Oscar Gustafsson. 2023. Spade: An Expression-Based HDL With Pipelines. arxiv:2304.03079.
    [29]
    Wilson Snyder. 2024. Verilator. https://www.veripool.org/verilator/
    [30]
    Michael Bedford Taylor. 2018. Basejump STL: systemverilog needs a standard template library for hardware design. In Proceedings of the 55th Annual Design Automation Conference (DAC ’18). Association for Computing Machinery, New York, NY, USA. Article 73, 6 pages. isbn:9781450357005 https://doi.org/10.1145/3195970.3199848
    [31]
    Rinse Wester. 2015. A transformation-based approach to hardware design using higher-order functions. Ph. D. Dissertation. University of Twente. isbn:978-90-365-3887-9 https://doi.org/10.3990/1.9789036538879
    [32]
    Wikipedia contributors. 2024. Finite impulse response — Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=Finite_impulse_response&oldid=1172063361 [Online; accessed 6-April-2024]
    [33]
    Claire Wolf. 2024. Yosys Open SYnthesis Suite. https://yosyshq.net/yosys/
    [34]
    Drew Zagieboylo, Charles Sherk, Gookwon Edward Suh, and Andrew C. Myers. 2022. PDL: A High-Level Hardware Design Language for Pipelined Processors. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2022). Association for Computing Machinery, New York, NY, USA. 719–732. isbn:9781450392655 https://doi.org/10.1145/3519939.3523455
    [35]
    F. Zaruba and L. Benini. 2019. The Cost of Application-Class Processing: Energy and Performance Analysis of a Linux-Ready 1.7-GHz 64-Bit RISC-V Core in 22-nm FDSOI Technology. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 27, 11 (2019), Nov, 2629–2640. issn:1557-9999 https://doi.org/10.1109/TVLSI.2019.2926114

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Proceedings of the ACM on Programming Languages
    Proceedings of the ACM on Programming Languages  Volume 8, Issue PLDI
    June 2024
    2198 pages
    EISSN:2475-1421
    DOI:10.1145/3554317
    Issue’s Table of Contents
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 20 June 2024
    Published in PACMPL Volume 8, Issue PLDI

    Permissions

    Request permissions for this article.

    Check for updates

    Badges

    Author Tags

    1. combinator
    2. functional programming
    3. hardware description language
    4. hazard
    5. pipelining

    Qualifiers

    • Research-article

    Funding Sources

    • IITP(Institute for Information & Communications Technology Planning & Evaluation)

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 187
      Total Downloads
    • Downloads (Last 12 months)187
    • Downloads (Last 6 weeks)187

    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

    Full Access

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media