• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
        • Specification
          • Semantics
          • Features
          • States
          • Instructions
          • Encoding
          • Reads-over-writes
          • Execution
          • Decoding
        • Executable
        • Specialized
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Riscv

Specification

Specification of the RISC-V ISA.

We formalize the RISC-V ISA, based on [ISA] and [ISAP].

Since RISC-V is a family of ISAs, depending on base and extensions, we define a notion of features that determine the exact family member. We define a data type (like an abstract syntax) for instructions, and the encoding of these instructions; we define instruction decoding declaratively, as the inverse of encoding. We formalize the possible states of execution, the semantics of the instructions, and how execution proceeds in steps.

This specification is high-level, aimed at maximizing clarity. It is not aimed at being efficiently executable; in fact, since decoding is specified as inverse of encoding, this specification is not fully executable. See executable for an executable refinement.

Subtopics

Semantics
Semantics of instructions.
Features
RISC-V features.
States
Model of states.
Instructions
Model of instructions.
Encoding
Encoding of instructions.
Reads-over-writes
Read-over-write theorems.
Execution
Model of execution.
Decoding
Decoding of instructions.