riscv-formal-nmigen/insns
Donald Sebastian Leung 4d211bb24a Update README.md 2020-08-13 14:28:42 +08:00
..
Insn.py Remove redundant parameter in Insn constructor 2020-08-12 13:16:37 +08:00
InsnAdd.py Remove redundant parameter in InnAdd constructor 2020-08-12 13:20:46 +08:00
InsnAddi.py Remove redundant parameter in InsnAddi constructor 2020-08-12 13:59:14 +08:00
InsnAnd.py Remove redundant parameter in InsnAdd constructor 2020-08-12 13:31:12 +08:00
InsnAndi.py Remove redundant parameter in InsnAndi constructor 2020-08-12 14:03:27 +08:00
InsnAuipc.py Remove redundant parameter in InsnAuipc constructor 2020-08-12 14:23:09 +08:00
InsnBeq.py Add BEQ instruction 2020-08-11 16:46:07 +08:00
InsnBge.py Add BGE instruction 2020-08-11 16:54:16 +08:00
InsnBgeu.py Add BGEU instruction 2020-08-11 16:57:34 +08:00
InsnBlt.py Add BLT instruction 2020-08-11 16:52:34 +08:00
InsnBltu.py Add BLTU instruction 2020-08-11 16:55:58 +08:00
InsnBne.py Add BNE instruction 2020-08-11 16:49:25 +08:00
InsnJal.py Fix JAL instruction 2020-08-12 14:17:45 +08:00
InsnJalr.py Fix JALR instruction 2020-08-12 13:45:04 +08:00
InsnLb.py Remove redundant parameter in InsnLb constructor 2020-08-12 13:50:37 +08:00
InsnLbu.py Remove redundant parameter in InsnLbu instruction 2020-08-12 13:53:28 +08:00
InsnLh.py Remove redundant parameter in InsnLh constructor 2020-08-12 13:52:02 +08:00
InsnLhu.py Remove redundant parameter in InsnLhu constructor 2020-08-12 13:54:13 +08:00
InsnLui.py Remove redundant parameter in InsnLui constructor 2020-08-12 14:22:10 +08:00
InsnLw.py Remove redundant parameter in InsnLw instruction 2020-08-12 13:52:47 +08:00
InsnOr.py Remove redundant parameter in InsnOr constructor 2020-08-12 13:30:12 +08:00
InsnOri.py Remove redundant parameter in InsnOri constructor 2020-08-12 14:02:43 +08:00
InsnRV32IIType.py Add (generic) RV32I I-Type Instruction 2020-08-10 13:32:04 +08:00
InsnRV32IITypeArith.py Remove redundant parameter in InsnRV32IITypeArith constructor 2020-08-12 13:56:44 +08:00
InsnRV32IITypeLoad.py Remove redundant parameter in InsnRV32IITypeLoad constructor 2020-08-12 13:48:50 +08:00
InsnRV32IITypeShift.py Remove redundant parameter in InsnRV32IITypeShift constructor 2020-08-12 13:35:26 +08:00
InsnRV32IRType.py Remove redundant parameter in InsRV32IRType constructor 2020-08-12 13:19:13 +08:00
InsnRV32ISBType.py Remove redundant parameter in InsnRV32ISBType constructor 2020-08-12 14:12:57 +08:00
InsnRV32ISType.py Remove redundant parameter in InsnRV32ISType constructor 2020-08-12 14:06:01 +08:00
InsnRV32IUType.py Remove redundant parameter in InsnRV32IUType constructor 2020-08-12 14:20:17 +08:00
InsnSb.py Remove redundant parameter in InsnSb constructor 2020-08-12 14:06:55 +08:00
InsnSh.py Remove redundant parameter in InsnSh constructor 2020-08-12 14:07:47 +08:00
InsnSll.py Remove redundant parameter from InsnSll constructor 2020-08-12 13:24:24 +08:00
InsnSlli.py Remove redundant parameter in InsnSlli constructor 2020-08-12 13:36:50 +08:00
InsnSlt.py Remove redundant parameter in InsnSlt construcotr 2020-08-12 13:25:40 +08:00
InsnSlti.py Remove redundant prameter in InsnSlti instruction 2020-08-12 14:00:10 +08:00
InsnSltiu.py Remove redundant prameter in InsnSltui instruction 2020-08-12 14:01:00 +08:00
InsnSltu.py Remove redundant parameter in InsnSltu constructor 2020-08-12 13:26:32 +08:00
InsnSra.py Remove redundant parameter in InsnSra constructor 2020-08-12 13:29:21 +08:00
InsnSrai.py Remove redundant parameter in InsnSrai constructor 2020-08-12 13:38:40 +08:00
InsnSrl.py Remove redundant parameter in InsnSrl constructor 2020-08-12 13:28:30 +08:00
InsnSrli.py Remove redundant parameter in InsnSrli constructor 2020-08-12 13:37:54 +08:00
InsnSub.py Remove redundant parameter in IsnnSub constructor 2020-08-12 13:22:33 +08:00
InsnSw.py Fix typo in InsnSw.py 2020-08-13 13:46:16 +08:00
InsnXor.py Remove redundant parameter in InsnXor constructor 2020-08-12 13:27:29 +08:00
InsnXori.py Remove redundant parameter in InsnXori constructor 2020-08-12 14:01:58 +08:00
IsaRV32I.py Add RV32I base ISA 2020-08-13 14:23:55 +08:00
README.md Update README.md 2020-08-13 14:28:42 +08:00

README.md

RISC-V Instructions

Instructions

Below is a table of RISC-V instructions supported by the original riscv-formal framework at the time of writing, categorized by instruction type.

Instruction type Instructions
R-type ADD, ADDW, AND, DIV, DIVU, DIVUW, DIVW, MUL, MULH, MULHSU, MULHU, MULW, OR, REM, REMU, REMUW, REMW, SLL, SLLW, SLT, SLTU, SRA, SRAW, SRL, SRLW, SUB, SUBW, XOR
I-type ADDI, ADDIW, ANDI, JALR, LB, LBU, LD, LH, LHU, LW, LWU, ORI, SLTI, SLTIU, XORI
I-type (shift variation) SLLI, SLLIW, SRAI, SRAIW, SRLI, SRLIW
S-type SB, SD, SH, SW
SB-type BEQ, BGE, BGEU, BLT, BLTU, BNE
U-type AUIPC, LUI
UJ-type JAL
CI-type C_ADD, C_ADDI, C_ADDIW, C_JALR, C_JR, C_LI, C_MV
CI-type (SP variation) C_ADDI16SP
CI-type (ANDI variation) C_ANDI
CI-type (LSP variation, 32 bit version) C_LWSP
CI-type (LSP variation, 64 bit version) C_LDSP
CI-type (LUI variation) C_LUI
CI-type (SLI variation) C_SLLI
CI-type (SRI variation) C_SRAI, C_SRLI
CIW-type C_ADDI4SPN
CS-type (ALU version) C_ADDW, C_AND, C_OR, C_SUB, C_SUBW, C_XOR
CS-type (32 bit version) C_SW
CS-type (64 bit version) C_SD
CSS-type (32 bit version) C_SWSP
CSS-type (64 bit version) C_SDSP
CB-type C_BEQZ, C_BNEZ
CJ-type C_J, C_JAL
CL-type (32 bit version) C_LW
CL-type (64 bit version) C_LD

Class Synopsis

Instructions

Below is a list of instructions currently supported by this port of the riscv-formal framework and is expected to grow over time. The instructions are roughly grouped by instruction type but sometimes with further specializations - the hierarchy of the lists reflects the hierarchy of inheritance in the classes used to represent various instructions.

  • Insn: General RISC-V instruction
    • InsnRV32IRType: RV32I R-Type Instruction
      • InsnAdd: ADD instruction
      • InsnSub: SUB instruction
      • InsnSll: SLL instruction
      • InsnSlt: SLT instruction
      • InsnSltu: SLTU instruction
      • InsnXor: XOR instruction
      • InsnSrl: SRL instruction
      • InsnSra: SRA instruction
      • InsnOr: OR instruction
      • InsnAnd: AND instruction
    • InsnRV32IITypeShift: RV32I I-Type Instruction (Shift Variation)
      • InsnSlli: SLLI instruction
      • InsnSrli: SRLI instruction
      • InsnSrai: SRAI instruction
    • InsnRV32IIType: RV32I I-Type Instruction
      • InsnJalr: JALR instruction
      • InsnRV32IITypeLoad: RV32I I-Type Instruction (Load Variation)
        • InsnLb: LB instruction
        • InsnLh: LH instruction
        • InsnLw: LW instruction
        • InsnLbu: LBU instruction
        • InsnLhu: LHU instruction
      • InsnRV32IITypeArith: RV32I I-Type Instruction (Arithmetic Variation)
        • InsnAddi: ADDI instruction
        • InsnSlti: SLTI instruction
        • InsnSltiu: SLTIU instruction
        • InsnXori: XORI instruction
        • InsnOri: ORI instruction
        • InsnAndi: ANDI instruction
    • InsnRV32ISType: RV32I S-Type Instruction
      • InsnSb: SB instruction
      • InsnSh: SH instruction
      • InsnSw: SW instruction
    • InsnRV32ISBType: RV32I SB-Type Instruction
      • InsnBeq: BEQ instruction
      • InsnBne: BNE instruction
      • InsnBlt: BLT instruction
      • InsnBge: BGE instruction
      • InsnBltu: BLTU instruction
      • InsnBgeu: BGEU instruction
    • InsnJal: JAL instruction
    • InsnRV32IUType: RV32I U-Type Instruction
      • InsnLui: LUI instruction
      • InsnAuipc: AUIPC instruction

ISAs

  • IsaRV32I: RV32I Base ISA

Core-specific constants

The following core-specific constants are currently supported:

Constant Description Valid value(s) Supported by instruction(s) Supported by ISA(s)
RISCV_FORMAL_ILEN Max length of instruction retired by core 32 LUI, AUIPC, JAL, JALR, BEQ, BNE, BLT, BGE, BLTU, BGEU, LB, LH, LW, LBU, LHU, SB, SH, SW, ADDI, SLTI, SLTIU, XORI, ORI, ANDI, SLLI, SRLI, SRAI, ADD, SUB, SLL, SLT, SLTU, XOR, SRL, SRA, OR, AND RV32I
RISCV_FORMAL_XLEN Width of integer registers 32 LUI, AUIPC, JAL, JALR, BEQ, BNE, BLT, BGE, BLTU, BGEU, LB, LH, LW, LBU, LHU, SB, SH, SW, ADDI, SLTI, SLTIU, XORI, ORI, ANDI, SLLI, SRLI, SRAI, ADD, SUB, SLL, SLT, SLTU, XOR, SRL, SRA, OR, AND RV32I
RISCV_FORMAL_CSR_MISA Support for MISA CSRs enabled True, False LUI, AUIPC, JAL, JALR, BEQ, BNE, BLT, BGE, BLTU, BGEU, LB, LH, LW, LBU, LHU, SB, SH, SW, ADDI, SLTI, SLTIU, XORI, ORI, ANDI, SLLI, SRLI, SRAI, ADD, SUB, SLL, SLT, SLTU, XOR, SRL, SRA, OR, AND RV32I
RISCV_FORMAL_COMPRESSED Support for compressed instructions True, False JAL, JALR, BEQ, BNE, BLT, BGE, BLTU, BGEU RV32I
RISCV_FORMAL_ALIGNED_MEM Require aligned memory accesses True, False LB, LH, LW, LBU, LHU, SB, SH, SW RV32I