<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: the difference between library with FP (softfp) and library with FP (hard) in s32k144 in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701090#M10743</link>
    <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201643"&gt;@Mehul_Patel_NXP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dear Mehul_Patel_NXP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know that Library (soft) will take more time than Library with FP (softfp) or FP instructions (hard). However, FP instructions (hard) use FPU hardware registers, which should take less time than library with FP (softfp), but in reality they do not differ.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on your suggestion, I performed the operation by calling the function, and the result obtained was the same&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_2-1691496427922.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235550i2EBBBBAE03F52D6C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_2-1691496427922.png" alt="zhangchun_2-1691496427922.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My purpose in doing this was to use FP instructions (hard) to improve code execution efficiency, but the result did not achieve my expected goal. During this process, it was found that there was no difference between library with FP (softfp) and FP instructions (hard).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, it has been determined to use FP instructions (hard) by reviewing the assembly and compilation parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_1-1691496402554.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235549iA79A51A7FE3BC24F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_1-1691496402554.png" alt="zhangchun_1-1691496402554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 12:10:55 GMT</pubDate>
    <dc:creator>zhangchun</dc:creator>
    <dc:date>2023-08-08T12:10:55Z</dc:date>
    <item>
      <title>the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1697660#M10704</link>
      <description>&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;I tested library with FP (softfp) and FP instructions(hard) using the attached example.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_0-1690981466857.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234770iE004D7085F6C84E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_0-1690981466857.jpeg" alt="zhangchun_0-1690981466857.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that there is no difference in performance between these two floating-point operations. However, from this document(&lt;A href="https://mp.weixin.qq.com/s?__biz=MzI0MDk0ODcxMw==&amp;amp;mid=2247485157&amp;amp;idx=1&amp;amp;sn=12db72babaf46680886625ef314168c7&amp;amp;chksm=e9124263de65cb75bcb29de659c48dc7aa1b5c756ad2a5ea0fc021419ce428245fe4569a7c6c&amp;amp;scene=21#wechat_redirect" target="_self" rel="nofollow noopener noreferrer"&gt;S32K14x系列MCU使用Tips之硬件FPU特性介绍和使用详解&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;), it can be seen that hard uses fpu registers, which should have a more significant improvement in floating-point performance.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_1-1690981642582.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234773i0F00F9A331215812/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_1-1690981642582.png" alt="zhangchun_1-1690981642582.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I don't quite understand how to use hardware floating-point operations in S32K44&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:12:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1697660#M10704</guid>
      <dc:creator>zhangchun</dc:creator>
      <dc:date>2023-08-02T13:12:41Z</dc:date>
    </item>
    <item>
      <title>回复： the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1700246#M10729</link>
      <description>If library with FP (softfp) or FP instructions (hard) are not used in the compilation options, it will indeed take more time, but there is no difference between library with FP (softfp) and FP instructions (hard), which is still incomprehensible</description>
      <pubDate>Mon, 07 Aug 2023 12:43:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1700246#M10729</guid>
      <dc:creator>zhangchun</dc:creator>
      <dc:date>2023-08-07T12:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1700335#M10731</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/219167"&gt;@zhangchun&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hard FP (floating point) will use the FP instructions of the device whereas soft FP will defer to software emulation of FP operations. That is, FP operations are performed by making a library call and the floating point operations are performed using integer instructions.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The only difference between softfp and hard is the manner in which floating point values are passed and received from functions. (softfp ABI vs. hard ABI).&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Both softfp and hard will generate floating point instructions, but since you do not pass the float values to functions, you will see no difference.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;So, to truly see a difference between a software float operation and a hardware float operation, use the 'soft' option.&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;To understand more about it please check this page:&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html" target="_blank"&gt;https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mehul_Patel_NXP_1-1691423669538.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235364iDDD18AC490BB3F08/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mehul_Patel_NXP_1-1691423669538.png" alt="Mehul_Patel_NXP_1-1691423669538.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, another thing, you can check generate the disassembly file and understand the difference for different float ABI options - soft, hard, and library with FP.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mehul_Patel_NXP_2-1691423875334.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235365iA7973A447396B09E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mehul_Patel_NXP_2-1691423875334.png" alt="Mehul_Patel_NXP_2-1691423875334.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, sometime compiler might optimization also play role, and if the operation is not resource intensive compiler might decide to do differently than you are expecting. You can also check different test case operation to ty out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can change the optimization settings and check accordingly if it improves the performance or not:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mehul_Patel_NXP_3-1691424230427.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235367i1B85B41F605425F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mehul_Patel_NXP_3-1691424230427.png" alt="Mehul_Patel_NXP_3-1691424230427.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please, can you check and tryout, let us know if you are able to get performance improvement accordingly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you, Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Mehul Patel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 16:07:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1700335#M10731</guid>
      <dc:creator>Mehul_Patel_NXP</dc:creator>
      <dc:date>2023-08-07T16:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701090#M10743</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201643"&gt;@Mehul_Patel_NXP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dear Mehul_Patel_NXP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know that Library (soft) will take more time than Library with FP (softfp) or FP instructions (hard). However, FP instructions (hard) use FPU hardware registers, which should take less time than library with FP (softfp), but in reality they do not differ.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on your suggestion, I performed the operation by calling the function, and the result obtained was the same&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_2-1691496427922.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235550i2EBBBBAE03F52D6C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_2-1691496427922.png" alt="zhangchun_2-1691496427922.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My purpose in doing this was to use FP instructions (hard) to improve code execution efficiency, but the result did not achieve my expected goal. During this process, it was found that there was no difference between library with FP (softfp) and FP instructions (hard).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, it has been determined to use FP instructions (hard) by reviewing the assembly and compilation parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_1-1691496402554.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235549iA79A51A7FE3BC24F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_1-1691496402554.png" alt="zhangchun_1-1691496402554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 12:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701090#M10743</guid>
      <dc:creator>zhangchun</dc:creator>
      <dc:date>2023-08-08T12:10:55Z</dc:date>
    </item>
    <item>
      <title>回复： the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701329#M10747</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/219167"&gt;@zhangchun&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand looking at the screenshot that you got the no performance improvement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I feel it may be that because the test case you are trying for performance evaluation is not enough to test, if possible please can you try with more complex floating point operation and more iteration, and check what the result comes. Do also check the disassembly to see what is happening underneath.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you. Kind regards.&lt;/P&gt;
&lt;P&gt;- Mehul Patel&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 19:12:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701329#M10747</guid>
      <dc:creator>Mehul_Patel_NXP</dc:creator>
      <dc:date>2023-08-08T19:12:58Z</dc:date>
    </item>
    <item>
      <title>回复： the difference between library with FP (softfp) and library with FP (hard) in s32k144</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701542#M10755</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201643"&gt;@Mehul_Patel_NXP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dear Mehul_Patel_NXP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a few more questions&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is it necessary to call the math library in cmsis to use the fpu register when using FP (hard) in s32k144? If needed, please tell me how to proceed&lt;/LI&gt;&lt;LI&gt;I am currently trying to use the AMMCLib, but the performance has not improved either（The AMMCLib is designed to improve performance, and in my opinion, floating-point operations are used the FP hard)）&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangchun_0-1691558555301.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235656iF3E8DF1F9C50EC69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangchun_0-1691558555301.png" alt="zhangchun_0-1691558555301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 05:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/the-difference-between-library-with-FP-softfp-and-library-with/m-p/1701542#M10755</guid>
      <dc:creator>zhangchun</dc:creator>
      <dc:date>2023-08-09T05:28:58Z</dc:date>
    </item>
  </channel>
</rss>

