- A preview of this full-text is provided by Springer Nature.
- Learn more
Preview content only
Content available from Journal of Automated Reasoning
This content is subject to copyright. Terms and conditions apply.
Journal of Automated Reasoning (2021) 65:569–598
https://doi.org/10.1007/s10817-020-09579-4
An Isabelle/HOL Formalisation of the SPARC Instruction Set
Architecture and the TSO Memory Model
Zhé Hóu1·David Sanan2·Alwen Tiu3·Yang Liu2·Koh Chuen Hoa4·
Jin Song Dong5
Received: 12 September 2019 / Accepted: 7 August 2020 / Published online: 14 August 2020
© Springer Nature B.V. 2020
Abstract
The SPARC instruction set architecture (ISA) has been used in various processors in work-
stations, embedded systems, and in mission-critical industries such as aviation and space
engineering. Hence, it is important to provide formal frameworks that facilitate the verifica-
tion of hardware and software that run on or interface with these processors. In this work,
we give the first formal model for multi-core SPARC ISA and Total Store Ordering (TSO)
memory model in Isabelle/HOL. We present two levels of modelling for the ISA: The low-
level ISA model, which is executable, covers many features specific to SPARC processors,
such as delayed-write for control registers, windowed general registers, and more complex
memory access. We have tested our model extensively against a LEON3 simulation board,
the test covers both single-step executions and sequential execution of programs. We also
prove some important properties for our formal model, including a non-interference property
for the LEON3 processor. The high-level ISA model is an abstraction of the low-level model
and it provides an interface for memory operations in multi-core processors. On top of the
high-level ISA model, we formalise two TSO memory models: one is an adaptation of the
axiomatic SPARC TSO model (Sindhu et al. in Formal specification of memory models,
Springer, Boston, 1992; SPARC in The SPARC architecture manual version 8, 1992. http://
gaisler.com/doc/sparcv8.pdf), the other is a new operational TSO model which is suitable
for verifying execution results. We prove that the operational model is sound and complete
with respect to the axiomatic model. Finally, we give verification examples with two case
studies drawn from the SPARCv9 manual.
Keywords Instruction set architecture ·Form verification ·Isabelle/HOL ·Weak memory
model ·TSO
1 Introduction
Formal models of instruction set architectures (ISAs) not only provide a rigorous under-
standing of the semantics for instructions, but also are useful in verifying low-level programs
BZhé Hóu
z.hou@griffith.edu.au
Extended author information available on the last page of the article
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.