The code and documentation for CIMFlow is currently under construction. Stay tuned!
CIMFlow LogoCIMFlow
Instruction Set ArchitectureInstruction DesignInstructions

Vector Operation

VEC_OP

31-2625-2120-1615-1110-65-0
VEC_OP01XX00rsrtrdrefunct
VEC_OP_XX rd,rs,[rt,]re,funct

Performs VEC_OP (Single Instruction, Multiple Data) operations between vectors

  • XX indicates the number of input vectors, supporting 1 to 4 vectors in the operation;
  • When the number of input vectors does not exceed 2, their addresses are specified by GRF[rs] and GRF[rt] respectively; when exceeding 2, their addresses are provided by dedicated registers; the length of input vectors is GRF[re];
  • The write-back address for the result vector is GRF[rd];
  • funct represents the operation type, including RELU, QUAN, etc., used to support operations such as ReLU activation function and quantization; this field can be extended to support new operations.

Example:

VEC_OP_00 $3,$1,$2,RELU

REDUCE

31-2625-2120-1615-1110-65-0
REDUCE010001rsrtrd0 0000funct
REDUCE rd,rs,rt,funct

Performs vector aggregation/reduction operations

  • The input vector address is GRF[rs], its length is GRF[rt], and the result write-back address is GRF[rd];
  • The funct parameter specifies the operation type, including SUM, MAX, etc., used for reduction operations such as summation and finding extreme values; this field can be extended to support new operations.

Example:

REDUCE $3,$1,$2,SUM

On this page