From 887875959aa84af92291db334898aaa20956e632 Mon Sep 17 00:00:00 2001 From: allexanderbergmans Date: Fri, 3 Jul 2026 12:17:10 +0200 Subject: init --- isa/README.md | 12 ++++++++++++ isa/encoding/base.yaml | 3 +++ isa/opcodes/base.yaml | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 isa/README.md create mode 100644 isa/encoding/base.yaml create mode 100644 isa/opcodes/base.yaml (limited to 'isa') diff --git a/isa/README.md b/isa/README.md new file mode 100644 index 0000000..bf855eb --- /dev/null +++ b/isa/README.md @@ -0,0 +1,12 @@ +# ISA Definition + +Formal, machine-readable specification of the instruction set. + +## Structure + +- `encoding/` — Instruction encoding bitfield definitions (JSON/YAML tables) +- `opcodes/` — Opcode mnemonics, values, operand types +- `extensions/` — Optional ISA extensions (e.g. float, vector, crypto) +- `privileged/` — Privileged architecture: CSRs, traps, memory management + +This directory is the **source of truth** consumed by the generators in `gen/`. diff --git a/isa/encoding/base.yaml b/isa/encoding/base.yaml new file mode 100644 index 0000000..0b4654a --- /dev/null +++ b/isa/encoding/base.yaml @@ -0,0 +1,3 @@ +# Base instruction encoding format +# Instruction width: 32-bit fixed / 16+32 variable +# Format fields: opcode, rd, funct3, rs1, rs2, funct7, imm diff --git a/isa/opcodes/base.yaml b/isa/opcodes/base.yaml new file mode 100644 index 0000000..289bc46 --- /dev/null +++ b/isa/opcodes/base.yaml @@ -0,0 +1,8 @@ +# Base instruction opcode definitions +# Format: mnemonic, encoding, operands, type, description +# e.g.: +# - mnemonic: ADD +# encoding: 0b0000000_?????_?????_000_?????_0110011 +# operands: [rd, rs1, rs2] +# type: R +# description: Add registers -- cgit v1.3