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 6-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 6-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.
6.5.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
and
. 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.
Chapter 6 Memory-Mapped Divide and Square Root (MMDVSQ)
Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018
NXP Semiconductors
93
Summary of Contents for Kinetis KE1xZ256
Page 2: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 2 NXP Semiconductors...
Page 178: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 178 NXP Semiconductors...
Page 356: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 356 NXP Semiconductors...
Page 410: ...Interrupts Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 410 NXP Semiconductors...
Page 604: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 604 NXP Semiconductors...
Page 634: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 634 NXP Semiconductors...
Page 674: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 674 NXP Semiconductors...
Page 820: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 820 NXP Semiconductors...
Page 1030: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1030 NXP Semiconductors...
Page 1052: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1052 NXP Semiconductors...
Page 1066: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1066 NXP Semiconductors...
Page 1268: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1268 NXP Semiconductors...
Page 1314: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1314 NXP Semiconductors...
Page 1316: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1316 NXP Semiconductors...