33MLI Fixed-Point Data Format
44---------------------------
55
6- The MLI Library targets an ARCv2DSP-based platform and implies
6+ The embARC MLI Library targets an ARCv2DSP-based platform and implies
77efficient usage of its DSP Features. Hence, there is some
88specificity of basic data types and arithmetical operations using it
99in comparison with operations using float-point values.
@@ -14,11 +14,21 @@ values interpreted by typical Q notation. The following
1414designation is used:
1515
1616- value of *Qm.n * format have *m * bits for integer part (excluding sign bit),
17- and *n * bits for fractional part.
17+ and *n * bits for fractional part (see the figure below) .
1818
1919- value of *Q.n * format have *n * bits for fractional part\ *. * The rest of the
2020 non-sign bits are assumed to hold an integer part.
2121
22+ .. image :: ../images/01_container1.png
23+ :align: center
24+ :alt: Qmn Container Representation
25+
26+ ..
27+
28+ Regarding to the second notation, number of integer bits can be derived from the container size and number of fractional bits:
29+
30+ .. math :: m\ = cont\_ size\ - n
31+
2232.. note ::
2333 For more information regarding Q notation, see
2434
@@ -56,7 +66,13 @@ see :ref:`data_fmt_conv`.
5666Number of fractional bits must be a non-negative value. The number of
5767fractional bits might be larger than total number of containers
5868significant (not-sign) bits. In this case all bits not present in the
59- container implied equal to sign bit.
69+ container implied equal to sign bit:
70+
71+ .. image :: ../images/02_container2.png
72+ :align: center
73+ :alt: Qmn Container representation with negative integer bits
74+
75+ ..
6076
6177.. admonition :: Example
6278 :class: "admonition tip"
@@ -314,6 +330,8 @@ It depends on the basic operation used by primitive:
314330
315331 Output configurability is specified in description for each primitive.
316332
333+ .. _quant_acc_bit_depth :
334+
317335Quantization: Influence of Accumulator Bit Depth
318336^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
319337
0 commit comments