<?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: Code is slower executing from tightly-coupled (ITC) memory in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869436#M30501</link>
    <description>&lt;P&gt;But would that not also be true if the function was executing from flash?&lt;/P&gt;&lt;P&gt;The function accesses OC SRAM and external DRAM. Both will cause waits, I'm sure, but I can't see how that would make ITC slower than XIP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 06:57:09 GMT</pubDate>
    <dc:creator>expertsleepers</dc:creator>
    <dc:date>2024-05-21T06:57:09Z</dc:date>
    <item>
      <title>Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1861261#M30206</link>
      <description>&lt;P&gt;As an experiment, I tagged a fairly costly function with&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;__RAMFUNC(SRAM_ITC)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;To my surprise, it ran about 10% slower. Could anyone share any insight on why that might be?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is on an iMXRT1062, running from flash (XIP) if not running from ITC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 May 2024 08:51:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1861261#M30206</guid>
      <dc:creator>expertsleepers</dc:creator>
      <dc:date>2024-05-08T08:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862271#M30225</link>
      <description>Interesting. Would you be able to provide a test case? I'd like to reproduce this behaviour.</description>
      <pubDate>Thu, 09 May 2024 07:35:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862271#M30225</guid>
      <dc:creator>Juozas</dc:creator>
      <dc:date>2024-05-09T07:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862295#M30227</link>
      <description>&lt;P&gt;Unfortunately the code in question is part of a very large project. I'd have to try to isolate it into a fresh project - which of course may not exhibit the same behaviour. I'll post if I manage to create a small test case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 07:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862295#M30227</guid>
      <dc:creator>expertsleepers</dc:creator>
      <dc:date>2024-05-09T07:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862329#M30229</link>
      <description>I understand. Following this topic.</description>
      <pubDate>Thu, 09 May 2024 08:12:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1862329#M30229</guid>
      <dc:creator>Juozas</dc:creator>
      <dc:date>2024-05-09T08:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869100#M30489</link>
      <description>&lt;P&gt;It is possible that the function has some routine that expects data contained on another memory inducing some wait states to the execution.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 19:28:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869100#M30489</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2024-05-20T19:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869436#M30501</link>
      <description>&lt;P&gt;But would that not also be true if the function was executing from flash?&lt;/P&gt;&lt;P&gt;The function accesses OC SRAM and external DRAM. Both will cause waits, I'm sure, but I can't see how that would make ITC slower than XIP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 06:57:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869436#M30501</guid>
      <dc:creator>expertsleepers</dc:creator>
      <dc:date>2024-05-21T06:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869521#M30503</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213907"&gt;@expertsleepers&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;does the code you execute from the ITCM call functions that are located in flash or SDRAM/OCRAM? These are now more expensive because the compiler inserts a veneer function.&lt;BR /&gt;When calling Std-Lib functions, it is also not quite obvious where they are located.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 08:30:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869521#M30503</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2024-05-21T08:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869537#M30505</link>
      <description>Ah yes, it could be that.&lt;BR /&gt;Just to be clear, are function calls from ITC to other ITC functions still fast?&lt;BR /&gt;</description>
      <pubDate>Tue, 21 May 2024 08:46:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869537#M30505</guid>
      <dc:creator>expertsleepers</dc:creator>
      <dc:date>2024-05-21T08:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869686#M30511</link>
      <description>&lt;P&gt;This was indeed it.&lt;/P&gt;&lt;P&gt;The full situation was:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The code uses a lot of double precision maths.&lt;/LI&gt;&lt;LI&gt;The project was set to use a single precision floating point ABI, and so was full of function calls instead of .f64 operations.&lt;/LI&gt;&lt;LI&gt;When the code was put in ITCM every one of those function calls went through a veneer.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Having selected a double precision ABI, the function is now twice as fast and doesn't slow down when in ITCM. It doesn't get any faster either, but I'm sure there are more mundane reasons for that. &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;I find it odd that the project was created with the wrong ABI - it was created from a iMXRT1062 template.&lt;/P&gt;&lt;P&gt;This thread was useful regarding the FP ABI:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT/FPU-Type-options-for-MCUXpresso-for-double-precision-floating/m-p/1231125/highlight/true#M12674" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-RT/FPU-Type-options-for-MCUXpresso-for-double-precision-floating/m-p/1231125/highlight/true#M12674&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:32:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869686#M30511</guid>
      <dc:creator>expertsleepers</dc:creator>
      <dc:date>2024-05-21T11:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869707#M30512</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213907"&gt;@expertsleepers&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If the function to be called is a maximum of four megabytes “away” in the address range, a direct jump “BL” can be used without veneer.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:42:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869707#M30512</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2024-05-21T11:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Code is slower executing from tightly-coupled (ITC) memory</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869725#M30514</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213907"&gt;@expertsleepers&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The FPU setting for all M7 cores of the iMXRT family should be FPv5-D16. The only exception is the iMXRT1011, here it must be FPv5-SP-D16.&lt;BR /&gt;For the M4 and M33 cores it is also FPv5-SP-D16.&lt;/P&gt;&lt;P&gt;The reason why it is not faster in the ITCM than when executing from the flash is that the function is probably so small that it fits completely into the cache.&lt;BR /&gt;However, if the code base increases in size, cache trashing occurs. This means that the speed at which the function is executed is no longer deterministic.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:57:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Code-is-slower-executing-from-tightly-coupled-ITC-memory/m-p/1869725#M30514</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2024-05-21T11:57:19Z</dc:date>
    </item>
  </channel>
</rss>

