
For the unsigned integer format used in the MMDVSQ's square root calculation, an
u(nsigned)Qm.n notation requires m+n bits (m+n = 32) for the input radicand. An uQm.n
format produces an uQ(m/2).(n/2) square root. As examples, consider the following
tables involving the square root of 2 and square root of “pi” calculations. As expected, as
the number of fractional bits (n) increases, the error between the calculated square root
and the “actual” result decreases.
Table 32-2. Square Root of 2 Calculations (√2 = 1.4142135623)
RCND [Hex]
RCND Q format
Results [Hex]
RES Q Format
Decimal
% Error
0x0000_0002
uQ32.00
0x0000_0001
uQ16.00
1.0
-29.289%
0x0002_0000
uQ16.16
0x0000_016A
uQ08.08
1.4140625
-0.011%
0x0200_0000
uQ08.24
0x0000_16A0
uQ04.12
1.4140625
-0.011%
0x2000_0000
uQ04.28
0x0000_5A82
uQ02.14
1.4141845703
-0.002%
0x8000_0000
uQ02.30
0x0000_B504
uQ01.15
1.4141845703
-0.002%
Table 32-3. Square Root of Pi Calculations (√Pi = 1.7724538509)
RCND [Hex]
RCND Q format
Results [Hex]
RES Q Format
Decimal
% Error
0x0000_0003
uQ32.0
0x0000_0001
uQ16.00
1.0
-43.581%
0x0003_243F
uQ16.16
0x0000_01C5
uQ08.08
1.76953125
-0.165%
0x0324_3F6A
uQ08.24
0x0000_1C5B
uQ04.12
1.772216769
-0.013%
0x3243_F6A8
uQ04.28
0x0000_716F
uQ02.14
1.7723999023
-0.003%
0xC90F_DAA0
uQ02.30
0x0000_E2DF
uQ01.15
1.7724304199
-0.001%
The application of the Q notation for square root calculations provides a powerful
extension for these types of fractional numeric computations using fixed-point integer
processing hardware.
32.4.2 Execution times
The MMDVSQ module includes early termination logic to finish both divide and square
root calculations as quickly as possible, based on the magnitude of the input operand.
Accordingly, the execution time for the calculations is data dependent as defined in
. In this context, the execution time is defined from the register write
to initiate the calculation until the result register has been updated and available to read.
Stated differently, it represents the time CSR[BUSY] is asserted for a given calculation.
In the following two tables, “x” signals a bit with a don’t care value.
Integer square root
K32 L2A Reference Manual, Rev. 2, 01/2020
864
NXP Semiconductors
Содержание K32 L2A Series
Страница 2: ...K32 L2A Reference Manual Rev 2 01 2020 2 NXP Semiconductors...
Страница 42: ...K32 L2A Reference Manual Rev 2 01 2020 42 NXP Semiconductors...
Страница 122: ...Flash Memory Clock K32 L2A Reference Manual Rev 2 01 2020 122 NXP Semiconductors...
Страница 146: ...Module operation in low power modes K32 L2A Reference Manual Rev 2 01 2020 146 NXP Semiconductors...
Страница 158: ...Debug and security K32 L2A Reference Manual Rev 2 01 2020 158 NXP Semiconductors...
Страница 174: ...Module Signal Description Tables K32 L2A Reference Manual Rev 2 01 2020 174 NXP Semiconductors...
Страница 246: ...Application information K32 L2A Reference Manual Rev 2 01 2020 246 NXP Semiconductors...
Страница 322: ...Kinetis Bootloader Status Error Codes K32 L2A Reference Manual Rev 2 01 2020 322 NXP Semiconductors...
Страница 344: ...Application initialization information K32 L2A Reference Manual Rev 2 01 2020 344 NXP Semiconductors...
Страница 374: ...CMP Trigger Mode K32 L2A Reference Manual Rev 2 01 2020 374 NXP Semiconductors...
Страница 384: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 384 NXP Semiconductors...
Страница 592: ...Application Information K32 L2A Reference Manual Rev 2 01 2020 592 NXP Semiconductors...
Страница 602: ...Initialization and application information K32 L2A Reference Manual Rev 2 01 2020 602 NXP Semiconductors...
Страница 656: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 656 NXP Semiconductors...
Страница 664: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 664 NXP Semiconductors...
Страница 744: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 744 NXP Semiconductors...
Страница 762: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 762 NXP Semiconductors...
Страница 806: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 806 NXP Semiconductors...
Страница 868: ...Integer square root K32 L2A Reference Manual Rev 2 01 2020 868 NXP Semiconductors...
Страница 976: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 976 NXP Semiconductors...
Страница 1012: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1012 NXP Semiconductors...
Страница 1094: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1094 NXP Semiconductors...
Страница 1132: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1132 NXP Semiconductors...
Страница 1182: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1182 NXP Semiconductors...
Страница 1290: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1290 NXP Semiconductors...
Страница 1344: ...USB Voltage Regulator Module Signal Descriptions K32 L2A Reference Manual Rev 2 01 2020 1344 NXP Semiconductors...
Страница 1356: ...Initialization Application Information K32 L2A Reference Manual Rev 2 01 2020 1356 NXP Semiconductors...