<?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 P2020 code align with respect to L1 cache lines in PowerQUICC Processors</title>
    <link>https://community.nxp.com/t5/PowerQUICC-Processors/P2020-code-align-with-respect-to-L1-cache-lines/m-p/1330307#M3841</link>
    <description>&lt;P&gt;The following loop :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;li&amp;nbsp; &amp;nbsp;r9,0&lt;/LI&gt;&lt;LI&gt;addi r9,r9,1&lt;/LI&gt;&lt;LI&gt;stw r9,0(r3)&lt;/LI&gt;&lt;LI&gt;b "2."&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;executes 799 loops per unit of time (arbitrary) when fully inside a L1 cache line (32 bytes address boundaries), and executes only 531 loops per the same unit time when a L1 cache line boudary lies inside the loop code.&lt;/P&gt;&lt;P&gt;This is my hypothesis that this performance issue comes from the cache line boundary problem. I could not confirm it using Performance Monitor Counters.&lt;/P&gt;&lt;P&gt;Could you confirm that the change of the loop speed is related to cache line alignment ?&lt;/P&gt;&lt;P&gt;I have read AN2665 (Fecth Fact 2).&lt;/P&gt;&lt;P&gt;I suspect that it is very visible because the loop is very short. What about longer loops/code ?&lt;/P&gt;&lt;P&gt;Should I use function/loop/label alignement options of the compiler ? (this would inserts many nop instructions).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2021 07:30:20 GMT</pubDate>
    <dc:creator>thierrybernier</dc:creator>
    <dc:date>2021-08-27T07:30:20Z</dc:date>
    <item>
      <title>P2020 code align with respect to L1 cache lines</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/P2020-code-align-with-respect-to-L1-cache-lines/m-p/1330307#M3841</link>
      <description>&lt;P&gt;The following loop :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;li&amp;nbsp; &amp;nbsp;r9,0&lt;/LI&gt;&lt;LI&gt;addi r9,r9,1&lt;/LI&gt;&lt;LI&gt;stw r9,0(r3)&lt;/LI&gt;&lt;LI&gt;b "2."&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;executes 799 loops per unit of time (arbitrary) when fully inside a L1 cache line (32 bytes address boundaries), and executes only 531 loops per the same unit time when a L1 cache line boudary lies inside the loop code.&lt;/P&gt;&lt;P&gt;This is my hypothesis that this performance issue comes from the cache line boundary problem. I could not confirm it using Performance Monitor Counters.&lt;/P&gt;&lt;P&gt;Could you confirm that the change of the loop speed is related to cache line alignment ?&lt;/P&gt;&lt;P&gt;I have read AN2665 (Fecth Fact 2).&lt;/P&gt;&lt;P&gt;I suspect that it is very visible because the loop is very short. What about longer loops/code ?&lt;/P&gt;&lt;P&gt;Should I use function/loop/label alignement options of the compiler ? (this would inserts many nop instructions).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 07:30:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/P2020-code-align-with-respect-to-L1-cache-lines/m-p/1330307#M3841</guid>
      <dc:creator>thierrybernier</dc:creator>
      <dc:date>2021-08-27T07:30:20Z</dc:date>
    </item>
  </channel>
</rss>

