Skip to main content

From the Standards to Silicon: Formally Proved Memory Controllers

  • Conference paper
  • First Online:
NASA Formal Methods (NFM 2023)

Abstract

Recent research in both academia and industry has successfully used deductive verification to design hardware and prove its correctness. While tools and languages to write formally proved hardware have been proposed, applications and use cases are often overlooked. In this work, we focus on Dynamic Random Access Memories (DRAM) controllers and the DRAM itself – which has its expected temporal and functional behaviours described in the standards written by the Joint Electron Device Engineering Council (JEDEC). Concretely, we associate an existing Coq DRAM controller framework – which can be used to write DRAM scheduling algorithms that comply with a variety of correctness criteria – to a back-end system that generates proved logically equivalent hardware. This makes it possible to simultaneously enjoy the trustworthiness provided by the Coq framework and use the generated synthesizable hardware in real systems. We validate the approach by using the generated code as a plug-in replacement in an existing DDR4 controller implementation, which includes a host interface (AXI), a physical layer (PHY) from Xilinx, and a model of a memory part Micron MT40A1G8WE-075E:D. We simulate and synthesise the full system.

This research was supported by Labex DigiCosme (project ANR11L- ABEX0045DIGICOSME) operated by ANR as part of the program “Investissement d’Avenir” Idex ParisSaclay (ANR11IDEX000302).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/project-oak/silveroak.

  2. 2.

    CAS commands tell the memory to start the data transfer – its issue date is considered to be the completion date of the corresponding request.

  3. 3.

    https://opentitan.org/.

  4. 4.

    In the listing, the notation stands for circuit composition.

  5. 5.

    Initial register values are omitted from the figure.

  6. 6.

    PREA commands are PRE commands sent to every bank at once.

  7. 7.

    https://github.com/oprecomp/DDR4_controller.

  8. 8.

    Inasmuch as the PHY runs at the system clock frequency (1/4 of the DRAM clock frequency), it expects four command/address per system clock and issues them serially on consecutive DRAM clock cycles on the DRAM bus. This means that the PHY interface provides four command slots: 0,1,2, and 3, which it accepts each system clock. To cope with the different clock domains, we insert CavaDRAM commands always in the first slot. The proofs in CoqDRAM do not lose validity, as lower-bounds still hold. The only proofs that need adapting are REF related proofs, as they are upper bounds on the spacing between REF commands. We write modified version of such constraints considering the different clock domains.

  9. 9.

    https://silm-seminar.gitlabpages.inria.fr/season2/episode5/singh.pdf.

References

  1. Behrmann, G., et al.: Uppaal 4.0 (2006)

    Google Scholar 

  2. Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: hardware design in Haskell. ACM SIGPLAN Notices 34(1), 174–184 (1998)

    Article  Google Scholar 

  3. Bourgeat, T., Clester, I., Erbsen, A., Gruetter, S., Wright, A., Chlipala, A.: A multipurpose formal RISC-V specification. arXiv preprint arXiv:2104.00762 (2021)

  4. Bourgeat, T., Pit-Claudel, C., Chlipala, A.: The essence of Bluespec: a core language for rule-based hardware design. In: 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 243–257 (2020)

    Google Scholar 

  5. Chlipala, A.: Certified Programming with Dependent Types: A Pragmatic Introduction to the Coq Proof Assistant. MIT Press, Cambridge (2022)

    MATH  Google Scholar 

  6. Choi, J., Vijayaraghavan, M., Sherman, B., Chlipala, A., et al.: Kami: a platform for high-level parametric hardware specification and its modular verification (2017)

    Google Scholar 

  7. Datta, A., Singhal, V.: Formal verification of a public-domain DDR2 controller design. In: 21st International Conference on VLSI Design, pp. 475–480. IEEE (2008)

    Google Scholar 

  8. Dworkin, M.J., et al.: Advanced encryption standard (AES) (2001)

    Google Scholar 

  9. Hassan, M., Patel, H.: MCXplore: automating the validation process of DRAM memory controller designs. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 37(5), 1050–1063 (2017)

    Google Scholar 

  10. Joint Electron Device Engineering Council: DDR4 SDRAM standard (2021)

    Google Scholar 

  11. Kayed, M.O., Abdelsalam, M., Guindi, R.: A novel approach for SVA generation of DDR memory protocols based on TDML. In: 2014 15th International Microprocessor Test and Verification Workshop, pp. 61–66. IEEE (2014)

    Google Scholar 

  12. Li, Y., Akesson, B., Lampka, K., Goossens, K.: Modeling and verification of dynamic command scheduling for real-time memory controllers. In: Real-Time and Embedded Technology and Applications Symposium (RTAS), pp. 1–12. IEEE (2016)

    Google Scholar 

  13. Lisboa Malaquias, F., Asavoae, M., Brandner, F.: A Coq framework for more trustworthy DRAM controllers. In: Proceedings of the 30th International Conference on Real-Time Networks and Systems, pp. 140–150. ACM (2022)

    Google Scholar 

  14. Milner, R. (ed.): A Calculus of Communicating Systems. LNCS, vol. 92. Springer, Heidelberg (1980). https://doi.org/10.1007/3-540-10235-3

    Book  MATH  Google Scholar 

  15. Nikhil, R.: Bluespec system verilog: efficient, correct RTL from high level specifications. In: Proceedings 2nd ACM and IEEE International Conference on Formal Methods and Models for Co-Design, pp. 69–70. IEEE (2004)

    Google Scholar 

  16. Park, D.: A new equivalence notion for communicating systems. EATCS Bull. 14, 78–80 (1981)

    Google Scholar 

  17. Pous, D., Sangiorgi, D.: Bisimulation and coinduction enhancements: a historical perspective. Form. Asp. Comput. 31(6), 733–749 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  18. Sangiorgi, D.: Introduction to Bisimulation and Coinduction. Cambridge University Press, Cambridge (2011)

    Book  MATH  Google Scholar 

  19. Steiner, L., Sudarshan, C., Jung, M., Stoffel, D., Wehn, N.: A framework for formal verification of DRAM controllers. arXiv preprint arXiv:2209.14021 (2022)

  20. Sudarshan, C., Lappas, J., Weis, C., Mathew, D.M., Jung, M., Wehn, N.: A lean, low power, low latency DRAM memory controller for transprecision computing. In: Pnevmatikatos, D.N., Pelcat, M., Jung, M. (eds.) SAMOS 2019. LNCS, vol. 11733, pp. 429–441. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-27562-4_31

    Chapter  Google Scholar 

Download references

Acknowledgement

We acknowledge and are grateful for the contributions of Sumantha Chaudhuri, who provided help setting up the simulation environment; Chirag Sudarshan, who made himself available for discussing the implementation of DDR4cntrl; and Lirida Naviner for insightful discussions. This work is supported by the European Union’s Horizon 2020 research and innovation program under grant agreement No. 101070627 (REWIRE).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Felipe Lisboa Malaquias .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Malaquias, F.L., Asavoae, M., Brandner, F. (2023). From the Standards to Silicon: Formally Proved Memory Controllers. In: Rozier, K.Y., Chaudhuri, S. (eds) NASA Formal Methods. NFM 2023. Lecture Notes in Computer Science, vol 13903. Springer, Cham. https://doi.org/10.1007/978-3-031-33170-1_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-33170-1_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-33169-5

  • Online ISBN: 978-3-031-33170-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics