NEORV32 - Software Framework Documentation
Functions
neorv32_cpu_cfu.h File Reference

CPU Core custom functions unit HW driver header file. More...

Go to the source code of this file.

Macros

CFU custom instructions ("intrinsics")
#define neorv32_cfu_cmd0(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 0, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd1(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 1, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd2(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 2, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd3(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 3, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd4(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 4, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd5(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 5, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd6(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 6, RISCV_OPCODE_CUSTOM0)
 
#define neorv32_cfu_cmd7(funct7, rs1, rs2)   CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 7, RISCV_OPCODE_CUSTOM0)
 

Functions

int neorv32_cpu_cfu_available (void)
 

Detailed Description

CPU Core custom functions unit HW driver header file.

Macro Definition Documentation

◆ neorv32_cfu_cmd0

#define neorv32_cfu_cmd0 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 0, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 0 (funct3 = 000)

◆ neorv32_cfu_cmd1

#define neorv32_cfu_cmd1 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 1, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 1 (funct3 = 001)

◆ neorv32_cfu_cmd2

#define neorv32_cfu_cmd2 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 2, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 2 (funct3 = 010)

◆ neorv32_cfu_cmd3

#define neorv32_cfu_cmd3 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 3, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 3 (funct3 = 011)

◆ neorv32_cfu_cmd4

#define neorv32_cfu_cmd4 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 4, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 4 (funct3 = 100)

◆ neorv32_cfu_cmd5

#define neorv32_cfu_cmd5 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 5, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 5 (funct3 = 101)

◆ neorv32_cfu_cmd6

#define neorv32_cfu_cmd6 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 6, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 6 (funct3 = 110)

◆ neorv32_cfu_cmd7

#define neorv32_cfu_cmd7 (   funct7,
  rs1,
  rs2 
)    CUSTOM_INSTR_R2_TYPE(funct7, rs2, rs1, 7, RISCV_OPCODE_CUSTOM0)

CFU custom instruction 7 (funct3 = 111)

Function Documentation

◆ neorv32_cpu_cfu_available()

int neorv32_cpu_cfu_available ( void  )

Check if custom functions unit was synthesized.

Returns
0 if CFU was not synthesized, 1 if CFU is available.