summaryrefslogtreecommitdiff
path: root/isa
diff options
context:
space:
mode:
Diffstat (limited to 'isa')
-rw-r--r--isa/README.md12
-rw-r--r--isa/encoding/base.yaml3
-rw-r--r--isa/opcodes/base.yaml8
3 files changed, 23 insertions, 0 deletions
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