GetCtrlSpr(ISASI)
产品支持情况
产品 |
是否支持 |
|---|---|
Atlas 350 加速卡 |
√ |
x |
|
x |
|
x |
|
x |
|
x |
|
x |
功能说明
读取CTRL寄存器(控制寄存器)特定比特位上的值。
函数原型
template <int8_t startBit, int8_t endBit> __aicore__ static inline int64_t GetCtrlSpr()
参数说明
参数名 |
描述 |
|---|---|
startBit |
起始比特位索引。 |
endBit |
终止比特位索引。 |
返回值说明
CTRL寄存器对应比特位上的值。
约束说明
无
调用示例
如下为读取CTRL[8:6]比特位数值的示例。
int64_t value = AscendC::GetCtrlSpr<6, 8>();
父主题: 系统变量访问