olo_fix_resize¶
Status Information¶
VHDL Source: olo_fix_resize
Bit-true Model: olo_fix_resize
Description¶
This entity changes the format of a fixed-point number. It optionally can execute saturation (if the number of integer bits on the output is reduced) and rounding (if the number of fractional bits is reduced).
Latency of this entity is given by the optional rounding and saturation registers. The default generics lead to a latency of 2 clock cycles.
For details about the fixed-point number format used in Open Logic, refer to the fixed point principles.
Generics¶
| Name | Type | Default | Description |
|---|---|---|---|
| AFmt_g | string | - | Input A format String representation of an en_cl_fix Format_t (e.g. "(1,1,15)") |
| ResultFmt_g | string | - | Format of the result String representation of an en_cl_fix Format_t (e.g. "(0,1,15)") |
| Round_g | string | "Trunc_s" | Rounding mode String representation of an en_cl_fix FixRound_t. |
| Saturate_g | string | "Warn_s" | Saturation mode String representation of an en_cl_fix FixSaturate_t. |
| RoundReg_g | string | "YES" | Presence of rounding pipeline stage "YES": Always implement register "NO": Never implement register "AUTO": Implement register if rounding is needed according to the formats chosen |
| SatReg_g | string | "YES" | Presence of saturation pipeline stage "YES": Always implement register "NO": Never implement register "AUTO": Implement register if saturation is needed according to the formats chosen |
Interfaces¶
Control¶
| Name | In/Out | Length | Default | Description |
|---|---|---|---|---|
| Clk | in | 1 | '0' | Clock Not required if all registers are disabled (RoundReg_g="NO", SatReg_g="NO") |
| Rst | in | 1 | '0' | Reset input (high-active, synchronous to Clk) Not required if all registers are disabled (RoundReg_g="NO", SatReg_g="NO") |
Input Data¶
| Name | In/Out | Length | Default | Description |
|---|---|---|---|---|
| In_A | in | width(AFmt_g) | - | Input data Format: AFmt_g |
| In_Valid | in | 1 | '1' | AXI4-Stream handshaking signal for In_A |
Output Data¶
| Name | In/Out | Length | Default | Description |
|---|---|---|---|---|
| Out_Result | out | width(ResultFmt_g) | N/A | Result data Format ResultFmt_g |
| Out_Valid | out | 1 | N/A | AXI-S handshaking signal for Out_Result |
Detail¶
Below figure shows the implementation of olo_fix_resize
