[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1328408.1328416acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
research-article

Synthesizable high level hardware descriptions: using statically typed two-level languages to guarantee verilog synthesizability

Published: 07 January 2008 Publication History

Abstract

Modern hardware description languages support code-generation constructs like generate/endgenerate in Verilog. These constructs are intended to describe regular or parameterized hardware designs and, when used effectively, can make hardware descriptions shorter, more understandable, and more reusable. In practice, however, designers avoid these constructs because it is difficult to understand and predict the properties of the generated code. Is the generated code even type safe? Is it synthesizable? What physical resources (e.g. combinatorial gates and flip-flops) does it require? It is often impossible to answer these questions without first generating the fully-expanded code. In the Verilog and VHDL communities, this generation process is referred to as elaboration.
This paper proposes a disciplined approach to elaboration in Verilog. By viewing Verilog as a statically typed two-level language, we are able to reflect the distinction between values that are known at elaboration time and values that are part of the circuit computation. This distinction is crucial for determining whether abstractions such as iteration and module parameters are used in a synthesizable manner. To illustrate this idea, we develop a core calculus for Verilog that we call Featherweight Verilog (FV) and an associated static type system. We formally define a preprocessing step analogous to the elaboration phase of Verilog, and the kinds of errors that can occur during this phase. Finally, we show that a well-typed design cannot cause preprocessing errors, and that the result of its expansion is always a synthesizable circuit.

References

[1]
Henk P. Barendregt. The Lambda Calculus: Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, Amsterdam, 1984.
[2]
Bluespec, Inc. Bluespec SystemVerilog Version 3.8 Reference Guide, 2006.
[3]
Jennifer Gillenwater, Gregory Malecha, Cherif Salama, Angela Yun Zhu, Walid Taha, Jim Grundy, and John O'Leary. Synthesizable High Level Hardware Descriptions. Technical report, Rice University and Intel Strategic CAD Labs, http://www.resourceaware.org/twiki/pub/RAP/VPP/FV-TR.pdf, 2007.
[4]
Carsten K. Gomard and Neil D. Jones. A partial evaluator for the untyped lambda-calculus. Journal of Functional Programming, 1(1):21--69, 1991.
[5]
IEEE Standards Board. IEEE Standard Hardware Description Language Based on the Verilog Hardware Description Language. Number 1364--1995 in IEEE Standards. IEEE, 1995.
[6]
IEEE Standards Board. IEEE Standard Verilog Hardware Description Language. Number 1364--2001 in IEEE Standards. IEEE, 2001.
[7]
IEEE Standards Board. IEEE Standard for SystemVerilog-Unified Hardware Design, Specification, and Verification Language. Number 1800--2005 in IEEE Standards. IEEE, 2005.
[8]
IEEE Standards Board. IEEE Standard for Verilog Hardware Description Language. Number 1364--2005 in IEEE Standards. IEEE, 2005.
[9]
IEEE Standards Board. IEEE Standard for Verilog Register Transfer Level Synthesis. Number 1364.1--2002 (IEC 62142:2005) in IEEE Standards. IEEE, 2005.
[10]
Oleg Kiselyov, Kedar Swadi, and Walid Taha. A methodology for generating verified combinatorial circuits. In the International Workshop on Embedded Software (EMSOFT'04), LNCS, Pisa, Italy, 2004. ACM.
[11]
Eugene E. Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic macro expansion. ACM Conference on LISP and Functional Programming, pages 151--161, 1986.
[12]
Sun Microsystems. Opensparc t1 processor file: mul64.v. http://opensparc-t1.sunsource.net/nonav/source/verilog/html/mul64.v.
[13]
Flemming Nielson and Hanne Riis Nielson. Two-level semantics and code generation. Theoretical Computer Science, 56(1):59--133, 1988.
[14]
Opencores.org. Or1200's 32x32 multiply for asic. http://www.opencores.org/cvsweb.shtml/or1k/or1200/rtl/verilog/or1200 amultp2 32x32.v.
[15]
Oregon Graduate Institute Technical Reports. P.O. Box 91000, Portland, OR 97291--1000, USA. Available online from: ftp://cse.ogi.edu/pub/tech-reports/README.html.
[16]
Walid Taha. Multi-Stage Programming: Its Theory and Applications. PhD thesis, Oregon Graduate Institute of Science and Technology, 1999. available from {15}.
[17]
Walid Taha, Stephan Ellner, and Hongwei Xi. Generating imperative, heap--bounded programs in a functional setting. In Proceedings of the Third International Conference on Embedded Software, Philadelphia, PA, 2003.
[18]
Walid Taha and Patricia Johann. Staged notational definitions. In Krzysztof Czarnecki, Frank Pfenning, and Yannis Smaragdakis, editors, Generative Programming and Component Engineering (GPCE), Lecture Notes in Computer Science. Springer-Verlag, 2003.
[19]
Terese. Term Rewriting Systems. Cambridge University Press, 2003.

Cited By

View all
  • (2023)CirFix: Automated Hardware Repair and its Real-World ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2023.326989949:7(3736-3752)Online publication date: Jul-2023
  • (2016)Staging beyond terms: prospects and challengesProceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/2847538.2847548(103-108)Online publication date: 11-Jan-2016
  • (2015)Model Based Testing of VHDL ProgramsProceedings of the 2015 IEEE 39th Annual Computer Software and Applications Conference - Volume 0310.1109/COMPSAC.2015.198(427-432)Online publication date: 1-Jul-2015
  • Show More Cited By

Index Terms

  1. Synthesizable high level hardware descriptions: using statically typed two-level languages to guarantee verilog synthesizability

          Recommendations

          Comments

          Please enable JavaScript to view thecomments powered by Disqus.

          Information & Contributors

          Information

          Published In

          cover image ACM Conferences
          PEPM '08: Proceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
          January 2008
          214 pages
          ISBN:9781595939777
          DOI:10.1145/1328408
          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 ACM 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: 07 January 2008

          Permissions

          Request permissions for this article.

          Check for updates

          Author Tags

          1. code generation
          2. hardware description languages
          3. statically typed two-level languages
          4. synthesizability
          5. verilog elaboration

          Qualifiers

          • Research-article

          Conference

          PEPM08
          PEPM08: Partial Evaluation and Program Manipulation
          January 7 - 8, 2008
          California, San Francisco, USA

          Acceptance Rates

          Overall Acceptance Rate 66 of 120 submissions, 55%

          Contributors

          Other Metrics

          Bibliometrics & Citations

          Bibliometrics

          Article Metrics

          • Downloads (Last 12 months)6
          • Downloads (Last 6 weeks)2
          Reflects downloads up to 31 Dec 2024

          Other Metrics

          Citations

          Cited By

          View all
          • (2023)CirFix: Automated Hardware Repair and its Real-World ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2023.326989949:7(3736-3752)Online publication date: Jul-2023
          • (2016)Staging beyond terms: prospects and challengesProceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/2847538.2847548(103-108)Online publication date: 11-Jan-2016
          • (2015)Model Based Testing of VHDL ProgramsProceedings of the 2015 IEEE 39th Annual Computer Software and Applications Conference - Volume 0310.1109/COMPSAC.2015.198(427-432)Online publication date: 1-Jul-2015
          • (2011)Type-specialized staged programming with process separationHigher-Order and Symbolic Computation10.1007/s10990-012-9089-024:4(341-385)Online publication date: 1-Nov-2011
          • (2011)Static consistency checking for Verilog wire interconnectsHigher-Order and Symbolic Computation10.1007/s10990-011-9072-124:1-2(81-114)Online publication date: 1-Jun-2011
          • (2010)Lightweight modular stagingACM SIGPLAN Notices10.1145/1942788.186831446:2(127-136)Online publication date: 10-Oct-2010
          • (2010)Lightweight modular stagingProceedings of the ninth international conference on Generative programming and component engineering10.1145/1868294.1868314(127-136)Online publication date: 10-Oct-2010
          • (2010)Towards Test Case Generation for Synthesizable VHDL Programs Using Model CheckerProceedings of the 2010 Fourth International Conference on Secure Software Integration and Reliability Improvement Companion10.1109/SSIRI-C.2010.22(46-53)Online publication date: 9-Jun-2010
          • (2009)Static consistency checking for verilog wire interconnectsProceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation10.1145/1480945.1480963(121-130)Online publication date: 19-Jan-2009
          • (2008)Plenary talk III Domain-specific languages2008 International Conference on Computer Engineering & Systems10.1109/ICCES.2008.4772953(xxiii-xxviii)Online publication date: Nov-2008

          View Options

          Login options

          View options

          PDF

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          Media

          Figures

          Other

          Tables

          Share

          Share

          Share this Publication link

          Share on social media