Many library elements perform arithmetic and offer a scaling feature exposed as TP_SHIFT. During this operation, rounding and saturation can occur, configured according to parameters TP_RND and TP_SAT. The modes and values for TP_RND are the same for AIE-ML and AIE-MLv2 devices, but differ from those for AIE devices, as captured in the following table.
| Name | Type | Default | Description |
|---|---|---|---|
| SHIFT | unsigned | 8 | Acc results shift down value. |
| ROUND_MODE | unsigned | 0 | Rounding mode. See table below. |
| SAT_MODE | unsigned | 1 | Saturation mode. 0 - none 1 - saturate 3 - symmetric saturate |
| NITER | unsigned | 8 | Number of iterations to execute. |
| DIFF_TOLERANCE | unsigned | 0 | Tolerance value when comparing output sample with reference model, e.g. 0.0025 for floats and cfloats. |
| STIM_TYPE | unsigned | 0 | Supported types: 0: random 3: impulse 4: all ones 5: incrementing pattern 6: sym incrementing pattern 8: sine wave |
| DATA_SEED | unsigned | 1 | Seed used to generate random numbers for the inputs. |
| NUM_OUTPUTS | unsigned | 1 | Number of output ports. |
| AIE_VARIANT | unsigned | 1 | AI Engine variant to use for metadata validation. Ignored for compilation and simulation purposes. 1: AIE 2: AIE-ML 22: AIE-MLv2 |
| Code | AIE | AIE-ML / AIE-MLv2 |
|---|---|---|
| 0 | rnd_floor* | rnd_floor* |
| 1 | rnd_ceil* | rnd_ceil* |
| 2 | rnd_pos_inf | rnd_sym_floor* |
| 3 | rnd_neg_inf | rnd_sym_ceil* |
| 4 | rnd_sym_inf | n/a |
| 5 | rnd_sym_zero | n/a |
| 6 | rnd_conv_even | n/a |
| 7 | rnd_conv_odd | n/a |
| 8 | n/a | rnd_neg_inf |
| 9 | n/a | rnd_pos_inf |
| 10 | n/a | rnd_sym_zero |
| 11 | n/a | rnd_sym_inf |
| 12 | n/a | rnd_conv_even |
| 13 | n/a | rnd_conv_odd |