processor.risc_v.isa

RISC-V ISA types, constants and helper functions.


enum Base : uint2 §source

Base ISA identifier

Values

enum Extension : uint1 §source

Standard ISA extension identifier

Values

using Funct7 = uint7 §source
template <Base ISA>
class Types §source

Data types for specified base ISA

Aliases

Types

enum RVG : uint5 §source

General-purpose ISA major opcodes

Values

using Funct3 = uint3 §source
enum Op : Funct3 §source

OP/OP_IMM minor opcodes

Values

enum MulDiv : Funct3 §source

“M” standard extension minor opcodes

Values

enum Branch : Funct3 §source

BRANCH minor opcodes

Values

enum LoadStore : Funct3 §source

LOAD/STORE minor opcodes

Values

enum System : Funct3 §source

SYSTEM minor opcodes

Values

enum MiscMem : Funct3 §source

MISC_MEM mino opcodes

Values

using Reg = uint5 §source
enum ABI : Reg §source

Mnemonics for integer registers in the standard calling convention

Values

template <auto N>
inline int32 sign_extend(uint<N> x) §source

Sign-extend an integer to XLEN bits

struct R_type §source

R-type instruction format

Fields

struct I_type §source

I-type instruction format

Fields

struct S_type §source

S-type instruction format

Fields

struct B_type §source

B-type instruction format

Fields

struct U_type §source

U-type instruction format

Fields

struct J_type §source

J-type instruction format

Fields

union Instr §source
enum Format : uint3 §source
template <Base ISA>
inline Types<ISA>::Decoded decode_format(Instr instr, Format format) §source

Decode instruction word in given instruction format

Arguments

  • Instr instr
    

    Instruction word

  • Format format
    

    Instruction format