• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
        • States
        • Decoding
          • Decode
          • Decode-rtype
          • Decode-stype
          • Decode-itype
          • Decode-btype
          • Get-imm-jtype
          • Get-imm-btype
          • Get-imm-utype
          • Get-imm-stype
          • Get-imm-itype
          • Decode-utype
          • Decode-jtype
          • Get-rs2
          • Get-rs1
          • Get-rd
          • Get-opcode
          • Get-funct7
            • Get-funct3
          • Encoding
          • Features
          • Semantics
          • Execution
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Decoding

    Get-funct7

    Retrieve the funct7 field of an instruction.

    Signature
    (get-funct7 enc) → funct7
    Arguments
    enc — Guard (ubyte32p enc).
    Returns
    funct7 — Type (ubyte7p funct7).

    This is always in the bits 25-31 of the 32-bit encoding, for the formats with an funct7 field [ISA:2.2] [ISA:2.3].

    Definitions and Theorems

    Function: get-funct7

    (defun get-funct7 (enc)
      (declare (xargs :guard (ubyte32p enc)))
      (let ((__function__ 'get-funct7))
        (declare (ignorable __function__))
        (part-select enc :low 25 :high 31)))

    Theorem: ubyte7p-of-get-funct7

    (defthm ubyte7p-of-get-funct7
      (b* ((funct7 (get-funct7 enc)))
        (ubyte7p funct7))
      :rule-classes :rewrite)