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

Special-Purpose Registers

CIM Unit Registers (IDs 0-15)

IDRegister NameDescription
0CIM_IBWSpecifies the bit width of input data.
1CIM_OBWSpecifies the bit width of output data.
2CIM_WBWSpecifies the bit width of weights.
3CIM_GSZDefines the size of Macro Groups, indicating the number of Macros per Group. Must adhere to values specified in the configuration file.
4CIM_AGNumber of active Groups in the CIM unit.
5CIM_AENumber of active Elements per column in each Group.
6CIM_GSTEPOffset address for each group's input vector, defined as the step size relative to the previous group or an offset from the address in register rs1.
7CIM_VMASKStarting address for the sparse mask for value-level sparsity.
8CIM_BMETAStarting address for bit-level sparse metadata.
9-15RESERVEDReserved for future extensions.

Vector Unit Registers (IDs 16-31)

IDRegister NameDescription
16VEC_IBW1Bit width for each element of Input Vector 1.
17VEC_IBW2Bit width for each element of Input Vector 2.
18VEC_IBW3Bit width for each element of Input Vector 3.
19VEC_IBW4Bit width for each element of Input Vector 4.
20VEC_OBWBit width for each element of the output vector.
21VEC_IA3Starting address for Input Vector 3.
22VEC_IA4Starting address for Input Vector 4.
23-31RESERVEDReserved for additional instructions or future extensions.

Special-to-General Register Binding

To optimize register utilization, specific special-purpose registers can be bound to general-purpose registers during configuration.

This binding reduces the overhead of frequent assignments and allows registers to serve multiple purposes during different phases of execution.

Binding Configuration Example:

[
    {
        "special": 7,
        "general": 30
    },
    {
        "special": 8,
        "general": 31
    }
]

In the above configuration, special-purpose register 7 (CIM_VMASK) is bound to general-purpose register 30, and register 8 (CIM_BMETA) is bound to general-purpose register 31.

On this page