Skip to content
STIMSMITH

ARM V6 Instruction Set

Concept WIKI v1 · 6/7/2026

The ARM V6 (ARM Version 6) instruction set is the target instruction set architecture (ISA) modeled and verified in the context of the SimSoC full-system simulator and the 'Towards Verified Faithful Simulation' work. The ARMv6 architecture defines 147 instructions whose binary encodings, assembly syntax, and operational semantics are extracted semi-automatically from the ARM Architecture Reference Manual and formalized in the Coq proof assistant, with a corresponding C-based ISS in which each instruction is implemented as a standalone C function verified against the formal model using CompCert C semantics.

ARM V6 Instruction Set

The ARM V6 (also referred to in the evidence as ARM Version 6 or ARMv6) instruction set is the instruction set architecture (ISA) at the center of a formal-verification effort targeting the SimSoC full-system simulator. Within SimSoC, the ARM V6 ISS executes embedded applications by fetching, decoding, and executing real binary code; in the first dynamic-translation mode considered by the verification work, each ARM V6 instruction is translated into a C structure that has an associated semantics function, and it is these C semantic functions that are being verified.

Architecture Reference and Formal Model Construction

No vendor-provided formal specification of the ARM architecture was available, so the formal model was derived from the ARM Architecture Reference Manual using a semi-automated process. The main chapters of the manual used to build the model are:

  • Programmer's Model — introduces the main features of the ARMv6 architecture, including data types, registers, and exceptions.
  • The ARM Instruction Set — explains the general instruction encoding and groups instructions into categories.
  • ARM Instructions — lists all 147 ARM instructions in the ARMv6 architecture in alphabetical order.
  • ARM Addressing Modes — explains the five kinds of addressing modes.

For each of the 147 ARM V6 instructions, the manual provides an encoding table, syntax, a piece of pseudo-code describing its operation, its exceptions, usage, and notes. From these, three kinds of information are extracted: the binary encoding format, the corresponding assembly syntax, and the instruction semantics (an algorithm operating on the processor state). The semantics algorithm may call basic functions defined elsewhere in the manual, for which a Coq library is provided.

The construction of the Coq formal model proceeds in three automated steps:

  1. Extracting information from the PDF of the manual.
  2. Parsing the extracted data into abstract syntax trees (ASTs).
  3. Automated translation from the ASTs into the Coq formal model.

Some information cannot be automatically extracted, notably validity constraints required by the decoder generator, but the most tedious and error-prone part (the pseudo-code semantics) is expressed in a precise and regular style that supports the automated extraction. A dozen documentation problems were uncovered during this process and acknowledged by ARM Ltd., though none were relevant to instruction semantics. The resulting model was also tested on real programs to check that the same results are obtained, providing additional confidence.

ISS Implementation in C

In the SimSoC ISS, each ARM V6 instruction is implemented as a standalone C function. Each such function:

  • has its own correctness proof,
  • consists of a return type, argument variables, local variables, and a function body,
  • modifies the processor state and possibly the memory state (everything is represented in memory on the simulation host machine), and
  • may call basic functions from a supporting library.

The C code of the ISS avoids constructions with "unspecified behavior" in the C language specification and uses only a very limited set of C library functions (e.g., memset(), memcpy()) that do not invoke the operating system.

Example: the BL (Branch and Link) Instruction

The paper gives the C implementation of the ARM BL instruction as a representative example. The function takes a pointer to a SLv6_Processor structure and parameters L, SLv6_Condition cond, and signed_immed_24. Its body checks whether the condition passes; if L == 1, it stores the address of the next instruction in register 14, and then sets the program counter using a sign-extended and shifted immediate offset added to the value of register 15 (the PC).

Proof Methodology

The verification effort proves, in the Coq proof assistant, that the ISS semantics faithfully implement the formal model of the ARM processor. The key elements are:

  • CompCert C supplies the formal operational semantics of the C ISS source code and a verified compiler, giving both executable machine code and a Coq formal semantics for the compiled C program.
  • CompCert Coq library provides formalized properties for words, half-words, bytes, and bitwise operations used to describe the instruction set model.
  • A global memory model with load and store functions supports read/write operations on the concrete side, while the abstract Coq model directly uses the processor state st.
  • The proof for each instruction proceeds in a top-down manner: it follows the structure of the C function body, splitting it into statements and then into expressions, comparing the concrete post-state produced by the C semantics with the abstract post-state produced by the formal model after projecting the concrete state.
  • The proof style is relational, chosen because it is more flexible than functional style when dealing with constraints and fits well with operational semantics.

A dedicated Lemmas Library supports these per-instruction proofs by providing lemmas about memory state changes and the relation between abstract and concrete state modifications during expression evaluation.

SimSoC as the Hosting Simulator

SimSoC is an open-source full system simulator of System-on-Chips that uses the SystemC kernel to simulate hardware parallelism and Transaction Level Modeling (TLM) to model inter-module communications. It includes ISS components to execute embedded applications on various processors, and the ARM V6 ISS is the specific component under formal verification in the cited work. The verification target is the dynamic-translation mode in which a binary decoder translates each instruction into a C structure carrying a semantics function, and it is assumed that a correct decoder exists (the decoder itself is out of scope for the proof).

CITATIONS

11 sources
11 citations
[1] The ARM Version 6 ISS is the verification target integrated within SimSoC, a full system simulator of System-on-Chips available as open source software. Towards Verified Faithful Simulation
[2] In the first dynamic-translation mode of SimSoC, the binary decoder translates each ARM V6 instruction into a C structure that has a semantics function, and it is these C semantic functions that are verified. Towards Verified Faithful Simulation
[3] There are 147 ARM instructions in the ARM V6 architecture; for each, the manual provides an encoding table, syntax, a piece of pseudo-code explaining its operation, exceptions, usage, and notes. Towards Verified Faithful Simulation
[4] The formal model of the ARM architecture in Coq is derived from the architecture reference manual in three automated steps: extracting information from the PDF, parsing the data into abstract syntax trees, and automated translation from the ASTs into the Coq formal model. Towards Verified Faithful Simulation
[5] A dozen documentation problems were found during the extraction process, all acknowledged by ARM Ltd., though none were relevant to instruction semantics. Towards Verified Faithful Simulation
[6] In the C ISS, there is a standalone C function for each ARM V6 instruction, and each function has its own correctness proof. Towards Verified Faithful Simulation
[7] The ARM BL (Branch and Link) instruction is implemented as a C function that conditionally stores the address of the next instruction in register 14 and sets the program counter to the sum of register 15 and a sign-extended, shifted signed immediate. Towards Verified Faithful Simulation
[8] The per-instruction proof is performed in a top-down manner, following the C function body split into statements and then into expressions, comparing the concrete C-state after evaluation with the abstract Coq state produced by the formal model. Towards Verified Faithful Simulation
[9] The proof uses a relational style because it is more flexible than functional style when dealing with constraints and fits well with operational semantics, and relies on a global memory model with load and store functions for read/write operations. Towards Verified Faithful Simulation
[10] CompCert C supplies the formal operational semantics of the ISS source code and produces, on one hand, the Coq formal semantics of the compiled C program and, on the other hand, verified machine code that conforms to this operational semantics. Towards Verified Faithful Simulation
[11] SimSoC uses the SystemC kernel to simulate hardware parallelism and Transaction Level Modeling (TLM) to model communications between modules. Towards Verified Faithful Simulation