| AI Engine-ML Intrinsics User Guide (v2025.2)

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

## Overview

Intrinsics to set,get and clear the control registers.

These registers have values by default afte reset.

### Control registers:

Register | Width | Initial | Meaning
--- | --- | --- | ---
crSat - Saturation Mode | 2 | 0 | 0 – No saturation; truncation of MSBs
|  | 0 | 1 – Perform saturation
|  | 0 | 3 – Perform symmetric saturation
crRnd - Rounding Mode | 4 | 0 | Rounding modes
crFPMask | 5 | 0 | Flag mask for floating point operations
crF2IMask | 5 | 0 | Flag mask for float to int conversions
crF2FMask | 5 | 0 | Flag mask for int to float conversions
crMCDEn | 1 | 1 | MCD output enable
crSCDEn | 1 | 1 | SCD output enable
crVaddSign | 1 | 0 | Sign of dynamic VADD operations
crUnpackSign | 1 | 0 | Sign of dynamic unpack operations
crPackSign | 1 | 0 | Sign of dynamic pack operations
crUPSSign | 1 | 0 | Sign of dynamic UPS operations
crSRSSign | 1 | 0 | Sign of dynamic SRS operations

## Miscellaneous control bits
Control saturation mode
unsigned int | get_satmode ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | set_satmode (unsigned int val)
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | set_sat ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | set_symsat ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | clr_sat ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_sat ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_symsat ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_rnd ()
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
void | set_rnd (unsigned int val)
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_fpmulmac_mask ()
| Floating point exception flag mask for multiply/accumulate instructions.
void | set_fpmulmac_mask (unsigned int val)
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_fp2int_mask ()
| Floating point exception flag mask for float to integer conversions.
void | set_fp2int_mask (unsigned int val)
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.
unsigned int | get_fp2bf_mask ()
| Floating point exception flag mask for float to bfloat16 conversions.
void | set_fp2bf_mask (unsigned int val)
| Control for rounding mode (for Shift-Round-Saturate). See Rounding modes for possible values.

## Function Documentation

## ◆ clr_sat()

void clr_sat | ( |  | ) |

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

## ◆ get_fp2bf_mask()

unsigned int get_fp2bf_mask | ( |  | ) |

Floating point exception flag mask for float to bfloat16 conversions.

## ◆ get_fp2int_mask()

unsigned int get_fp2int_mask | ( |  | ) |

Floating point exception flag mask for float to integer conversions.

## ◆ get_fpmulmac_mask()

unsigned int get_fpmulmac_mask | ( |  | ) |

Floating point exception flag mask for multiply/accumulate instructions.

## ◆ get_rnd()

unsigned int get_rnd | ( |  | ) |

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

## ◆ get_sat()

unsigned int get_sat | ( |  | ) |

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

## ◆ get_satmode()

unsigned int get_satmode | ( |  | ) |

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

## ◆ get_symsat()

unsigned int get_symsat | ( |  | ) |

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

## ◆ set_fp2bf_mask()

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

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

## ◆ set_fp2int_mask()

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

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

## ◆ set_fpmulmac_mask()

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

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

## ◆ set_rnd()

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

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

## ◆ set_sat()

void set_sat | ( |  | ) |

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

## ◆ set_satmode()

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

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

## ◆ set_symsat()

void set_symsat | ( |  | ) |

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