processor.risc_v.internal.decoder

Internal implementation of RISC-V decoder.


enum Option : uint3 §

Values

  • HartsShareDMEM = 2 §
    

    Data memory is implemented as internally instantiated tightly coupled memory, with size in bytes specified by DMEM_LENGTH template argument. By default each hart has its separate block of data memory with address space spanning [DMEM_ORIGIN, DMEM_LENGTH). In multi-hart configuration when harts have their own DMEM block the DMEM_LENGTH must be a power of 2. The Option::HartsShareDMEM flags can be specified in CONFIG template argument to enable shared data memory, e.g. to allow programs running on different harts to communicate via memory. With shared DMEM the DMEM_LENGTH does not need to be a power of 2.

  • NoExceptionForCompressedEncoding = 4 §
    

    Disables checking of lower two bits of instruction word which are used for compressed instruction encoding. This allows saving FPGA block RAM by synthesizing out these bits.

enum ControlOp : uint1 §

Values

enum Condition : uint2 §

Values

struct ControlInstr §

Fields

enum ComputeOp : uint3 §

Values

enum LogicalOp : uint2 §

Values

struct BaseInstr §

Fields

enum MulIn : uint1 §

Values

  • Signed §
    
  • Unsigned §
    
enum MulOut : uint1 §

Values

struct MulInstr §

Fields

union ComputeInstr §

Fields

enum MemoryOp : uint1 §

Values

enum MemorySize : uint2 §

Size of memory load/store

Values

  • B §
    

    Byte

  • H §
    

    Half-word

  • W §
    

    Word

struct MemoryInstr §

Fields

enum SystemOp : uint3 §

Values

  • CSRRS_CYCLE §
    
  • CSRRS_INSTRET §
    
  • CSRRS_CYCLEH §
    
  • CSRRS_MHARTID §
    
  • ECALL §
    
  • EBREAK §
    
struct SystemInstr §

Fields

enum InstrKind : uint2 §

Values

  • Compute §
    
  • Control §
    
  • Memory §
    
  • System §
    
struct Decoded §

Fields

template <auto EXTENSIONS, auto CONFIG>
inline Decoded decode_instr(Instr instr, (RVG) -> Format custom_decode) §