<?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: i.MX8QXP Cortex M4 caches replacement policy in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1157802#M162390</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/79775" target="_self"&gt;&lt;SPAN class=""&gt;david_binet,&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The memory attributes of TCM_L address region is hardwired as non-cacheable. This means M core skips cache controller when accessing TCM_L or even TCM_U whenever these regions are configured.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both of the Code cache and System cache are implemented as below:&lt;/P&gt;
&lt;UL class="ul-list" data-mark="-"&gt;
&lt;LI class="md-list-item md-focus-container"&gt;&lt;SPAN class="md-plain md-expand"&gt;CACHE - 16 KByte size = &lt;/SPAN&gt;&lt;SPAN class="md-pair-s "&gt;&lt;STRONG&gt;&lt;SPAN class="md-plain"&gt;(256 sets) x (32-byte lines) x (2-way set associative)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="md-plain"&gt; for both PS and PC cache on CM4.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="md-list-item md-focus-container"&gt;
&lt;P class="md-end-block md-p md-focus"&gt;&lt;SPAN class="md-plain md-expand"&gt;cache line always in 0x20 address alignment (32-byte in one line)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;You would see there are two ways for each cache with the total size of 16KB for each cache part.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;So I suggest to fill 16KB address continuous data for other memory instead of TCM, for example OCRAM or DDR.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;And in theory this will fully&amp;nbsp; fill the cache line with dirty tags if you don't do a cache clean.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;Hope it helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 04:31:20 GMT</pubDate>
    <dc:creator>Zodiac</dc:creator>
    <dc:date>2020-09-24T04:31:20Z</dc:date>
    <item>
      <title>i.MX8QXP Cortex M4 caches replacement policy</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039339#M153149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently working on the cortex M4 in the i.MX8QXP. I want to fill both caches of the M4 (Code and System caches) with dirty entries. Once, I know both caches are filled, I want to measure how long it takes to clean an invalidate both caches. To do so, I need to know the cache replacement policy for both caches. I don't find the information in the IMX8QXP reference manual.&amp;nbsp; Is there an algorithm I can use to fill both caches with dirty entries?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my understanding from previous discussion on this forum the cache linked to the TCM_L will be kind of hard to fill with dirty entries since the memory map for this region looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/114123iE5ACB24843A30AED/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2020 23:55:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039339#M153149</guid>
      <dc:creator>david_binet</dc:creator>
      <dc:date>2020-06-29T23:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP Cortex M4 caches replacement policy</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039340#M153150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/david.binet@ca.thalesgroup.com"&gt;david.binet@ca.thalesgroup.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I am afraid customers can use only C-functions, provided in the SDK in fsl_cache.c (fsl_cache.h)&lt;/P&gt;&lt;P&gt;to control the caches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2020 05:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039340#M153150</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2020-07-03T05:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP Cortex M4 caches replacement policy</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039341#M153151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The information provided in fsl_cache.c isn't sufficient. From the documentation, I know the L1 data and instruction cache replacement policy of the A35 and also the L2 cache. I'm expecting the same type of information to be provided for both M4 caches.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2020 13:19:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1039341#M153151</guid>
      <dc:creator>david_binet</dc:creator>
      <dc:date>2020-07-20T13:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP Cortex M4 caches replacement policy</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1157802#M162390</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/79775" target="_self"&gt;&lt;SPAN class=""&gt;david_binet,&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The memory attributes of TCM_L address region is hardwired as non-cacheable. This means M core skips cache controller when accessing TCM_L or even TCM_U whenever these regions are configured.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both of the Code cache and System cache are implemented as below:&lt;/P&gt;
&lt;UL class="ul-list" data-mark="-"&gt;
&lt;LI class="md-list-item md-focus-container"&gt;&lt;SPAN class="md-plain md-expand"&gt;CACHE - 16 KByte size = &lt;/SPAN&gt;&lt;SPAN class="md-pair-s "&gt;&lt;STRONG&gt;&lt;SPAN class="md-plain"&gt;(256 sets) x (32-byte lines) x (2-way set associative)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="md-plain"&gt; for both PS and PC cache on CM4.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="md-list-item md-focus-container"&gt;
&lt;P class="md-end-block md-p md-focus"&gt;&lt;SPAN class="md-plain md-expand"&gt;cache line always in 0x20 address alignment (32-byte in one line)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;You would see there are two ways for each cache with the total size of 16KB for each cache part.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;So I suggest to fill 16KB address continuous data for other memory instead of TCM, for example OCRAM or DDR.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;And in theory this will fully&amp;nbsp; fill the cache line with dirty tags if you don't do a cache clean.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="md-plain md-expand"&gt;Hope it helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 04:31:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1157802#M162390</guid>
      <dc:creator>Zodiac</dc:creator>
      <dc:date>2020-09-24T04:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP Cortex M4 caches replacement policy</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1159852#M162606</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/79775"&gt;@david_binet&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P style="box-sizing: border-box; margin: 0px; color: #333f48; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN style="box-sizing: border-box; color: black; font-size: 10pt; font-family: 'Segoe UI', sans-serif;"&gt;&amp;nbsp; "The CM4 subsystem cache uses a single counter to do round robin replacement for the 2-way, set associative cache.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="box-sizing: border-box; margin: 0px; color: #333f48; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN style="box-sizing: border-box; color: black; font-size: 10pt; font-family: 'Segoe UI', sans-serif;"&gt;The replacement algorithm is not LRU or round robin by set, it is a single, one bit state for the whole cache."&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="box-sizing: border-box; margin: 0px; color: #333f48; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuri.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 03:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-Cortex-M4-caches-replacement-policy/m-p/1159852#M162606</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2020-09-28T03:59:06Z</dc:date>
    </item>
  </channel>
</rss>

