<?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: Cache flush/invalidate in MPC5554/e200z6 in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421128#M939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. When reading the e200z6 documentation, I wondered if doing an invalidation in the way you show could create cache coherency issues if I use the cache in copyback mode. How does data/instruction copyback work when I set L1CSR0[CINV]?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 12:33:19 GMT</pubDate>
    <dc:creator>ricardofranca</dc:creator>
    <dc:date>2015-08-07T12:33:19Z</dc:date>
    <item>
      <title>Cache flush/invalidate in MPC5554/e200z6</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421126#M937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing some experiments with the e200z6 unified cache - specifically, I'm analyzing the effects of flushing and invalidating the entire cache in some application. Currently, I'm invalidating and flushing each cache line individually:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* GreenHills compiler asm syntax */&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__asmleaf void flush_inv_cache_line(unsigned int flushed_way, unsigned int flushed_set) {&lt;/P&gt;&lt;P&gt;%reg flushed_way %reg flushed_set&lt;/P&gt;&lt;P&gt;mfspr r3, l1finv0&lt;/P&gt;&lt;P&gt;insrwi r3, flushed_way, 5, 3&lt;/P&gt;&lt;P&gt;insrwi r3, flushed_set, 7, 20&lt;/P&gt;&lt;P&gt;li r4, 2&lt;/P&gt;&lt;P&gt;rlwimi r3, r4, 0, 30, 31&lt;/P&gt;&lt;P&gt;msync &lt;/P&gt;&lt;P&gt;mtspr l1finv0, r3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void flush_inv_cache(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int j;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 0u; i &amp;lt; 8u; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (j = 0u; j &amp;lt; 128u; j++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flush_inv_cache_line(i, j);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems the code is working correctly, but I wonder if there are more efficient ways of doing this. Is there any way to flush and invalidate the entire cache without these loops?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 13:29:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421126#M937</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2015-08-06T13:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cache flush/invalidate in MPC5554/e200z6</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421127#M938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;this can be found in core reference manual for e200z6:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/55254iD0AE8AAC15E24E33/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 07:09:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421127#M938</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2015-08-07T07:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cache flush/invalidate in MPC5554/e200z6</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421128#M939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. When reading the e200z6 documentation, I wondered if doing an invalidation in the way you show could create cache coherency issues if I use the cache in copyback mode. How does data/instruction copyback work when I set L1CSR0[CINV]?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 12:33:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421128#M939</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2015-08-07T12:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cache flush/invalidate in MPC5554/e200z6</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421129#M940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's a good point. When the cache is invalidated using CINV bit, data are not flushed. This operation is not supported on the device. So, it could cause cache coherency issues. If you use copyback mode, the only way to flush the cache is to use L1FINV0 register and flush each cache line individually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 08:25:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Cache-flush-invalidate-in-MPC5554-e200z6/m-p/421129#M940</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2015-08-10T08:25:13Z</dc:date>
    </item>
  </channel>
</rss>

