SFPENCC
tenstorrent_tt_isa)Tenstorrent Wormhole B0 & Blackhole A0
main
userTensix, Vector Unit, BlackholeA0, WormholeB0Summary
Used to set UseLaneFlagsForLaneEnable. When UseLaneFlagsForLaneEnable is true, the per-lane LaneFlags boolean acts as a predication mask on Vector Unit (SFPU) instructions, allowing some lanes to be active whilst others are not.
Syntax / Encoding
TT_SFPENCC(/* u2 */ Imm2, 0, /* u4 */ VD, /* u4 */ Mod1)
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| 32 | Tensix-32b | 10001010xxxxxxxxxxxxxxxxxxxxxxxx | 0xff000000 / 0x8a000000 |
Operands
| Name | Description |
|---|---|
Imm2 | |
VD | |
Mod1 |
Reference Notes
# `SFPENCC` (Enable or disable vector conditional execution)
**Summary:** Used to set `UseLaneFlagsForLaneEnable`. When `UseLaneFlagsForLaneEnable` is `true`, the per-lane `LaneFlags` boolean acts as a predication mask on Vector Unit (SFPU) instructions, allowing some lanes to be active whilst others are not.
**Backend execution unit:** [Vector Unit (SFPU)](VectorUnit.md), simple sub-unit
## Syntax
```c
TT_SFPENCC(/* u2 */ Imm2, 0, /* u4 */ VD, /* u4 */ Mod1)
```
## Encoding

## Functional model
```c
if (Mod1 & 4) { // Reserved instruction modifier
NonContractualBehavior {
Mod1 &= ~4; // Current silicon behavior (not architecturally guaranteed)
}
}
lanewise {
if (VD < 12 || LaneConfig.DISABLE_BACKDOOR_LOAD) {
if (Mod1 & SFPENCC_MOD1_EI) {
UseLaneFlagsForLaneEnable = (Imm2 & SFPENCC_IMM2_E) != 0;
} else if (Mod1 & SFPENCC_MOD1_EC) {
UseLaneFlagsForLaneEnable = !UseLaneFlagsForLaneEnable;
} else {
// UseLaneFlagsForLaneEnable left as-is.
}
if (Mod1 & SFPENCC_MOD1_RI) {
LaneFlags = (Imm2 & SFPENCC_IMM2_R) != 0;
} else {
LaneFlags = true;
}
}
}
```
Supporting definitions:
```c
#define SFPENCC_MOD1_EC 1 // Invert UseLaneFlagsForLaneEnable
#define SFPENCC_MOD1_EI 2 // Set UseLaneFlagsForLaneEnable from SFPENCC_IMM2_E
#define SFPENCC_MOD1_RI 8 // Set LaneFlags from SFPENCC_IMM2_R
#define SFPENCC_IMM2_E 1 // Immediate bit for UseLaneFlagsForLaneEnable
#define SFPENCC_IMM2_R 2 // Immediate bit for LaneFlags
```