GetCtrlSpr(ISASI)

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Reads the value of a specific bit in the CTRL register (control register).

Prototype

template <int8_t startBit, int8_t endBit>
__aicore__ static inline int64_t GetCtrlSpr()

Parameters

Table 1 Template parameters

Parameter

Description

startBit

Start bit index.

endBit

End bit index.

Returns

Value of the corresponding bit in the CTRL register.

Constraints

None

Example

The following is an example of reading the value of CTRL[8:6].

int64_t value = AscendC::GetCtrlSpr<6, 8>();