Skip to main content

ISA Description Language

ISA semantics you can compile.

IDL is embedded in the RISC-V Unified Database to describe what every instruction and CSR does. It compiles into a compliant ISS and drives documentation, decoder, and formal model generation.

Quick Reference

Dense syntax cheat sheet — types, operators, builtins, and declaration forms on one page.

Overview

Design goals, use cases, worked example, and language basics.

Data Types

Bits<N>, Boolean, enumerations, bitfields, structs, arrays, tuples.

Variables & Constants

Assignment, naming rules, compile-time vs. runtime.

Literals

Verilog-style, C-style, array, and string literals.

Operators

Precedence table, widening operators, and arithmetic rules.

Type Conversions

Implicit widening, $signed, $bits, $enum casts.

Control Flow

if/else and for loops, including const loop variables.

Functions

Declarations, return values, rules, and builtin functions.

Scope

Global, function, instruction, and CSR scopes.

Builtins

$pc, $encoding, $array_size, $enum_size, and more.

Standard Library

CSR access, extension checks, exceptions, memory operations.

IDL in Instructions

How operation() bodies describe instruction semantics.

IDL in CSRs

sw_read(), sw_write(), field types and reset values.