skip to main content
10.1145/3534879.3534907acmotherconferencesArticle/Chapter ViewAbstractPublication PagesrtnsConference Proceedingsconference-collections
research-article

A Coq Framework for More Trustworthy DRAM Controllers

Published:07 June 2022Publication History

ABSTRACT

In order to prove conformance to memory standards and bound memory access latency, recently proposed real-time DRAM controllers rely on paper and pencil proofs, which can be troubling: they are difficult to read and review, they are often shown only partially and/or rely on abstractions for the sake of conciseness, and they can easily diverge from the controller implementation, as no formal link is established between both. We propose a new framework written in Coq, in which we model a DRAM controller and its expected behaviour as a formal specification. The trustworthiness in our solution comes two-fold: 1) proofs that are typically done on paper and pencil are now done in Coq and thus certified by it’s kernel, and 2) the reviewer’s job develops into making sure that the formal specification matches the standards – instead of performing a thorough check of the underlying mathematical formalism. Our framework provides a generic DRAM model capturing a set of controller properties as proof obligations, which all implementations must comply with. We focus on properties related to the respect of timing constraints imposed by the memory standards, the correctness of the DRAM command protocol and the assertiveness that every incoming request is handled in bounded time. We refine our specification with two implementations based on widely-known arbitration policies – First-in First-Out (FIFO) and Time-Division Multiplexing (TDM). We extract proved code from our model and use it as a “trusted core” on a cycle-accurate DRAM simulator.

References

  1. Balasubramanya Bhat and Frank Mueller. 2011. Making DRAM Refresh Predictable. Real-Time Syst. 47, 5 (2011), 430–453. https://doi.org/10.1007/s11241-011-9129-6Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Per Bjesse, Koen Claessen, Mary Sheeran, and Satnam Singh. 1998. Lava: hardware design in Haskell. ACM SIGPLAN Notices 34, 1 (1998), 174–184.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Sylvie Boldo, François Clément, Florian Faissole, Vincent Martin, and Micaela Mayero. 2017. A Coq formal proof of the Lax-Milgram theorem. In Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs. 79–89.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Felipe Cerqueira, Felix Stutz, and Björn B. Brandenburg. 2016. PROSA: A Case for Readable Mechanized Schedulability Analysis. In Euromicro Conference on Real-Time Systems(ECRTS’16). IEEE, 273–284.Google ScholarGoogle Scholar
  5. 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 Prog. Lang. 1(2017), 1–30.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Leonardo Ecco and Rolf Ernst. 2015. Improved DRAM timing bounds for real-time DRAM controllers with read/write bundling. In Real-Time Systems Symposium(RTSS’15). IEEE, 53–64.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Danlu Guo and Rodolfo Pellizzoni. 2017. A requests bundling DRAM controller for mixed-criticality systems. In Real-Time and Embedded Technology and Applications Symposium(RTAS’17). IEEE, 247–258.Google ScholarGoogle ScholarCross RefCross Ref
  8. Xiaojie Guo, Maxime Lesourd, Mengqi Liu, Lionel Rieg, and Zhong Shao. 2019. Integrating Formal Schedulability Analysis into a Verified OS Kernel. In Computer Aided Verification(CAV’19). Springer, 496–514.Google ScholarGoogle Scholar
  9. Mohamed Hassan and Hiren Patel. 2017. MCXplore: Automating the validation process of DRAM memory controller designs. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 37, 5(2017), 1050–1063.Google ScholarGoogle Scholar
  10. Mohamed Hassan, Hiren Patel, and Rodolfo Pellizzoni. 2015. A framework for scheduling DRAM memory accesses for multi-core mixed-time critical systems. In Real-Time and Embedded Technology and Applications Sym.IEEE, 307–316.Google ScholarGoogle Scholar
  11. Javier Jalle, Eduardo Quinones, Jaume Abella, Luca Fossati, Marco Zulianello, and Francisco J Cazorla. 2014. A dual-criticality memory controller (DCmc): Proposal and evaluation of a space case study. In Real-Time Systems Symposium(RTSS’14). IEEE, 207–217.Google ScholarGoogle ScholarCross RefCross Ref
  12. Joint Electron Device Engineering Council (JEDEC). 2021. DDR4 SDRAM STANDARD.Google ScholarGoogle Scholar
  13. Matthias Jung, Kira Kraft, Taha Soliman, Chirag Sudarshan, Christian Weis, and Norbert Wehn. 2019. Fast validation of DRAM protocols with timed petri nets. In International Symposium on Memory Systems(MEMSYS’19). ACM, 133–147.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Yonghui Li, Benny Akesson, and Kees Goossens. 2014. Dynamic command scheduling for real-time memory controllers. In Euromicro Conference on Real-Time Systems(ECRTS’14). IEEE, 3–14.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Yonghui Li, Benny Akesson, Kai Lampka, and Kees Goossens. 2016. Modeling and verification of dynamic command scheduling for real-time memory controllers. In Real-Time and Embedded Technology and Applications Symposium. IEEE, 1–12.Google ScholarGoogle ScholarCross RefCross Ref
  16. Reza Mirosanlou, Danlu Guo, Mohamed Hassan, and Rodolfo Pellizzoni. 2020. Mcsim: An extensible DRAM memory controller simulator. IEEE Computer Architecture Letters 19, 2 (2020), 105–109.Google ScholarGoogle ScholarCross RefCross Ref
  17. Tobias Nipkow, Lawrence C Paulson, and Markus Wenzel. 2002. Isabelle/HOL: a proof assistant for higher-order logic. Vol. 2283. Springer.Google ScholarGoogle Scholar
  18. Marco Paolieri, Eduardo Quinones, Francisco J Cazorla, and Mateo Valero. 2009. An analyzable memory controller for hard real-time CMPs. IEEE Embedded Systems Letters 1, 4 (2009), 86–90.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Jan Reineke, Isaac Liu, Hiren D Patel, Sungjun Kim, and Edward A Lee. 2011. PRET DRAM controller: Bank privatization for predictability and temporal isolation. In Conference on Hardware/Software Codesign and System Synthesis. IEEE, 99–108.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Scott Rixner, William J Dally, Ujval J Kapasi, Peter Mattson, and John D Owens. 2000. Memory access scheduling. ACM SIGARCH Computer Architecture News 28, 2 (2000), 128–138.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Andreas Schranzhofer, Rodolfo Pellizzoni, Jian-Jia Chen, Lothar Thiele, and Marco Caccamo. 2011. Timing analysis for resource access interference on adaptive resource arbiters. In Real-Time and Embedded Technology and Applications Symposium(RTAS’11). IEEE, 213–222.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Morten Heine Sørensen and Pawel Urzyczyn. 2006. Lectures on the Curry-Howard isomorphism. Elsevier.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Zheng Pei Wu, Yogen Krish, and Rodolfo Pellizzoni. 2013. Worst case analysis of DRAM latency in multi-requestor systems. In Real-Time Systems Symposium(RTSS’13). IEEE, 372–383.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Xin Xin, Youtao Zhang, and Jun Yang. 2019. ROC: DRAM-based Processing with Reduced Operation Cycles. In Proceedings of the 56th Annual Design Automation Conference 2019. 1–6.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Heechul Yun, Rodolfo Pellizzon, and Prathap Kumar Valsan. 2015. Parallelism-aware memory interference delay analysis for COTS multicore systems. In Euromicro Conference on Real-Time Systems(ECRTS’15). IEEE, 184–195.Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Other conferences
    RTNS '22: Proceedings of the 30th International Conference on Real-Time Networks and Systems
    June 2022
    241 pages
    ISBN:9781450396509
    DOI:10.1145/3534879

    Copyright © 2022 ACM

    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 7 June 2022

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
    • Research
    • Refereed limited

    Acceptance Rates

    Overall Acceptance Rate119of255submissions,47%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format .

View HTML Format