Visible to Intel only — GUID: hco1423077134374
Ixiasoft
Visible to Intel only — GUID: hco1423077134374
Ixiasoft
14.4.19. Convert
You can optionally perform truncation, biased, or unbiased rounding if the output data type is smaller than the input. The LSB must be a value in the width in bits of the input type.
Parameter | Description |
---|---|
Output data type mode | Determines how the block sets its output data type:
|
Output data type | Specifies the output data type. For example, sfix(16), uint(8). |
Output scaling value | Specifies the output scaling value. For example, 2^-15. |
Rounding method | Determines the rounding mode:
|
Saturation | The Convert block allows saturation, which has an optional clip detect output that outputs 1 if any clipping has occurred. Saturation choices are none, symmetric, or asymmetric. |
Floating point precision | Specifies the floating-point precision. For example, float32_m23. |
For example, for an Add or Mult block, you can select the output word-length and fractional part using dialog.
Specifying the output type is a casting operation, which does not preserve the numerical value, only the underlying bits. This method never adds hardware to a block— just changes the interpretation of the output bits.
For example, for a multiplier with both input data-types, sfix16_En15 has output type sfix32_En30. If you select output format sfix32_En28, the output numerical value multiplies by four. For example, 1*1 input gives an output value of 4.
If the you select output format sfix32_En31, the output numerical value is divided by two. For example 1*1 input gives an output value of 0.5.
If you want to change data-type format in a way that preserves the numerical value, use a convert block, which adds the corresponding hardware. Adding a convert block directly after a primitive block lets you specify the data-type to preserve the numerical value.
For example, a Mult block followed by a Convert block, with input values 1*1 always give output value 1.
Signal | Direction | Type | Description | Vector Data Support | Complex Data Support |
---|---|---|---|---|---|
a | Input | Any fixed-point type | Data | Yes | Yes |
q | Output | Specified fixed-point type | Data | Yes | Yes |