A formal framework to design and prove trustworthy memory controllers

被引:0
作者
Malaquias, Felipe Lisboa [1 ]
Asavoae, Mihail [2 ]
Brandner, Florian [1 ]
机构
[1] Inst Polytech Paris, LTCI, Telecom Paris, Palaiseau, France
[2] Univ Paris Saclay, CEA List, Palaiseau, France
关键词
DRAM; Memory controller; Coq; Formal proof assistant; INTERFERENCE;
D O I
10.1007/s11241-023-09411-3
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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 is two-fold: (1) proofs that are typically done on paper and pencil are now done in Coq and thus certified by its 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 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 assertiveness that timing constraints are respected, every incoming request is handled in bounded time, and the DRAM command protocol is respected. 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.
引用
收藏
页码:664 / 704
页数:41
相关论文
共 40 条
[1]   An Empirical Survey-based Study into Industry Practice in Real-time Systems [J].
Akesson, Benny ;
Nasri, Mitra ;
Nelissen, Geoffrey ;
Altmeyer, Sebastian ;
Davis, Robert, I .
2020 IEEE 41ST REAL-TIME SYSTEMS SYMPOSIUM (RTSS), 2020, :3-11
[2]   Making DRAM refresh predictable [J].
Bhat, Balasubramanya ;
Mueller, Frank .
REAL-TIME SYSTEMS, 2011, 47 (05) :430-453
[3]   Lava: Hardware design in Haskell [J].
Bjesse, P ;
Claessen, K ;
Sheeran, M ;
Singh, S .
ACM SIGPLAN NOTICES, 1999, 34 (01) :174-184
[4]   A Coq Formal Proof of the Lax-Milgram Theorem [J].
Boldo, Sylvie ;
Clement, Francois ;
Faissole, Florian ;
Martin, Vincent ;
Mayero, Micaela .
PROCEEDINGS OF THE 6TH ACM SIGPLAN CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, CPP'17, 2017, :79-89
[5]   The Essence of Bluespec A Core Language for Rule-Based Hardware Design [J].
Bourgeat, Thomas ;
Pit-Claudel, Clement ;
Chlipala, Adam ;
Arvind .
PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, :243-257
[6]  
Bozhko S, 2020, ABSTRACT RESPONSE TI
[7]   PROSA: A Case for Readable Mechanized Schedulability Analysis [J].
Cerqueira, Felipe ;
Stutz, Felix ;
Brandenburg, Bjoern B. .
PROCEEDINGS OF THE 28TH EUROMICRO CONFERENCE ON REAL-TIME SYSTEMS ECRTS 2016, 2016, :273-284
[8]  
Chlipala A., 2022, Certified Programming with Dependent Types: A Pragmatic Introduction to the Coq Proof Assistant
[9]   Hemiola: A DSL and Verification Tools to Guide Design and Proof of Hierarchical Cache-Coherence Protocols [J].
Choi, Joonwon ;
Chlipala, Adam ;
Chlipala, Adam .
COMPUTER AIDED VERIFICATION (CAV 2022), PT II, 2022, 13372 :317-339
[10]  
Choi J, 2017, P ACM PROGRAM LANG, V1, DOI 10.1145/3110268