| AI Engine-ML v2 Intrinsics User Guide (v2026.1)

Loading...
Searching...
No Matches
Control registers
Scalar Operations » Configuration » Mode Settings

Intrinsics to set, get and clear the control registers. More...

## Miscellaneous control bits
Control saturation mode
unsigned int | get_satmode ()
| Get saturation mode.
void | set_satmode (unsigned int val)
| Set saturation mode.
void | set_sat ()
| Set saturation mode.
void | set_symsat ()
| Set symmetric saturation mode.
void | clr_sat ()
| Clear saturation mode.
unsigned int | get_sat ()
| Get saturation mode.
unsigned int | get_symsat ()
| Get symmetric saturation mode.
unsigned int | get_rnd ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | set_rnd (unsigned int val)
| Set rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_bfloat8_conf ()
| Get control register for BF8 configuration.
void | set_bfloat8_conf (unsigned int val)
| Set control register for BF8 configuration.
unsigned int | get_float8_conf ()
| Get control register for FP8 configuration.
void | set_float8_conf (unsigned int val)
| Set control register for FP8 configuration.
unsigned int | get_fp_conv_sat_conf ()
| Get control register for FP conversion.
void | set_fp_conv_sat_conf (unsigned int val)
| Set control register for FP conversion.
unsigned int | get_fpmulmac_mask ()
| Get floating point exception flag mask for multiply/accumulate instructions.
void | set_fpmulmac_mask (unsigned int val)
| Set floating point exception flag mask for multiply/accumulate instructions.
unsigned int | get_fp2int_mask ()
| Get floating point exception flag mask for float to integer conversions.
void | set_fp2int_mask (unsigned int val)
| Set floating point exception flag mask for float to integer conversions.
unsigned int | get_fp2bf_mask ()
| Get floating point exception flag mask for float to bfloat16 conversions.
void | set_fp2bf_mask (unsigned int val)
| Set floating point exception flag mask for float to bfloat16 conversions.
unsigned int | get_fp2bfp_mask ()
| Get floating point exception flag mask for float to bfp16/bfp13 conversions.
void | set_fp2bfp_mask (unsigned int val)
| Set floating point exception flag mask for float to bfp16/bfp13 conversions.
unsigned int | get_nlf_mask ()
| Get NLF exception mask.
void | set_nlf_mask (unsigned int val)
| Set NLF exception mask.
unsigned int | get_fx2fl_mask ()
| Get fix to float exception mask.
void | set_fx2fl_mask (unsigned int val)
| Set fix to float exception mask.
unsigned int | get_fl2fx_mask ()
| Get float to fix exception mask.
void | set_fl2fx_mask (unsigned int val)
| Set float to fix exception mask.

## Detailed Description

Intrinsics to set, get and clear the control registers.

These registers have values by default after reset.

### Control registers:

Register | Width | Fields | Initial | Meaning
--- | --- | --- | --- | ---
crSat - Saturation Mode | 2 | 1 | 0 | 0 No saturation; truncation of MSBs
|  |  | 0 | 1 Perform saturation
|  |  | 0 | 3 Perform symmetric saturation
crRnd - Rounding Mode | 4 | 1 | 0 | Rounding modes
crFPMask | 5 | 1 | 0 | Flag mask for floating point operations
crF2IMask | 5 | 1 | 0 | Flag mask for float to int conversions
crF2FMask | 5 | 1 | 0 | Flag mask for float to bfloat16 conversions
crF2BMask | 5 | 1 | 0 | Flag mask for float to bfp16/bfp13 conversions
crF2BNorm | 1 | 1 | 0 | Norm mode for float to bfp16 conversions
crMCDEn | 1 | 1 | 1 | MCD output enable
crSCDEn | 1 | 1 | 1 | SCD output enable
crUnpackSize | 1 | 1 | 0 | Size of the unpack operations
crPackSize | 1 | 1 | 0 | Size of dynamic pack operations
crUPSMode | 1 | 1 | 0 | Accumulator mode of UPS operations
crSRSMode | 1 | 1 | 0 | Accumulator mode of SRS operations
vaddSign | 1 | 2 | 0,1 | Sign of dynamic VADD operations
unpackSign | 1 | 2 | 0,1 | Sign of dynamic unpack operations
packSign | 1 | 2 | 0,1 | Sign of dynamic pack operations
upsSign | 1 | 2 | 0,1 | Sign of dynamic UPS operations
srsSign | 1 | 2 | 0,1 | Sign of dynamic SRS operations

## Function Documentation

## ◆ clr_sat()

void clr_sat | ( |  | ) |

Clear saturation mode.

## ◆ get_bfloat8_conf()

unsigned int get_bfloat8_conf | ( |  | ) |

Get control register for BF8 configuration.

## ◆ get_fl2fx_mask()

unsigned int get_fl2fx_mask | ( |  | ) |

Get float to fix exception mask.

## ◆ get_float8_conf()

unsigned int get_float8_conf | ( |  | ) |

Get control register for FP8 configuration.

## ◆ get_fp2bf_mask()

unsigned int get_fp2bf_mask | ( |  | ) |

Get floating point exception flag mask for float to bfloat16 conversions.

## ◆ get_fp2bfp_mask()

unsigned int get_fp2bfp_mask | ( |  | ) |

Get floating point exception flag mask for float to bfp16/bfp13 conversions.

## ◆ get_fp2int_mask()

unsigned int get_fp2int_mask | ( |  | ) |

Get floating point exception flag mask for float to integer conversions.

## ◆ get_fp_conv_sat_conf()

unsigned int get_fp_conv_sat_conf | ( |  | ) |

Get control register for FP conversion.

## ◆ get_fpmulmac_mask()

unsigned int get_fpmulmac_mask | ( |  | ) |

Get floating point exception flag mask for multiply/accumulate instructions.

## ◆ get_fx2fl_mask()

unsigned int get_fx2fl_mask | ( |  | ) |

Get fix to float exception mask.

## ◆ get_nlf_mask()

unsigned int get_nlf_mask | ( |  | ) |

Get NLF exception mask.

## ◆ get_rnd()

unsigned int get_rnd | ( |  | ) |

Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.

Get rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values

## ◆ get_sat()

unsigned int get_sat | ( |  | ) |

Get saturation mode.

## ◆ get_satmode()

unsigned int get_satmode | ( |  | ) |

Get saturation mode.

## ◆ get_symsat()

unsigned int get_symsat | ( |  | ) |

Get symmetric saturation mode.

## ◆ set_bfloat8_conf()

void set_bfloat8_conf | ( | unsigned int | val | ) |

Set control register for BF8 configuration.

## ◆ set_fl2fx_mask()

void set_fl2fx_mask | ( | unsigned int | val | ) |

Set float to fix exception mask.

## ◆ set_float8_conf()

void set_float8_conf | ( | unsigned int | val | ) |

Set control register for FP8 configuration.

## ◆ set_fp2bf_mask()

void set_fp2bf_mask | ( | unsigned int | val | ) |

Set floating point exception flag mask for float to bfloat16 conversions.

## ◆ set_fp2bfp_mask()

void set_fp2bfp_mask | ( | unsigned int | val | ) |

Set floating point exception flag mask for float to bfp16/bfp13 conversions.

## ◆ set_fp2int_mask()

void set_fp2int_mask | ( | unsigned int | val | ) |

Set floating point exception flag mask for float to integer conversions.

## ◆ set_fp_conv_sat_conf()

void set_fp_conv_sat_conf | ( | unsigned int | val | ) |

Set control register for FP conversion.

## ◆ set_fpmulmac_mask()

void set_fpmulmac_mask | ( | unsigned int | val | ) |

Set floating point exception flag mask for multiply/accumulate instructions.

## ◆ set_fx2fl_mask()

void set_fx2fl_mask | ( | unsigned int | val | ) |

Set fix to float exception mask.

## ◆ set_nlf_mask()

void set_nlf_mask | ( | unsigned int | val | ) |

Set NLF exception mask.

## ◆ set_rnd()

void set_rnd | ( | unsigned int | val | ) |

Set rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.

## ◆ set_sat()

void set_sat | ( |  | ) |

Set saturation mode.

## ◆ set_satmode()

void set_satmode | ( | unsigned int | val | ) |

Set saturation mode.

## ◆ set_symsat()

void set_symsat | ( |  | ) |

Set symmetric saturation mode.