<?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 MAC-unit Syntax for CF V1 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MAC-unit-Syntax-for-CF-V1/m-p/194565#M7129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Coldire&amp;nbsp; V1's multiplier/accumulator is described as having a multiply/accumulate/load mode to speed up MAC-operations.&lt;/P&gt;&lt;P&gt;It also can implement&amp;nbsp; circular addressing, so that no overhead is incurred for address-checking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out the syntax, however: it seems that one must write:&lt;/P&gt;&lt;PRE&gt;mac.w&amp;nbsp; D0.L, D1.L, (A0)+&amp;amp;&amp;nbsp; ,&amp;nbsp; D0 ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;... in order to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; word-multiply D0 and D1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; add their product to the accumulator,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; increment A0,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 'and' A0's address with the MASK-register,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; load the value newly-indicated by A0 into D0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I cannot have both the '-' and '&amp;amp;' in the line at the same time. This seems odd, as if A0 must be separately incremented OR it must be separately masked.&lt;/P&gt;&lt;P&gt;What have I missed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wade Hassler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:49:30 GMT</pubDate>
    <dc:creator>wadehassler</dc:creator>
    <dc:date>2020-10-29T09:49:30Z</dc:date>
    <item>
      <title>MAC-unit Syntax for CF V1</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MAC-unit-Syntax-for-CF-V1/m-p/194565#M7129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Coldire&amp;nbsp; V1's multiplier/accumulator is described as having a multiply/accumulate/load mode to speed up MAC-operations.&lt;/P&gt;&lt;P&gt;It also can implement&amp;nbsp; circular addressing, so that no overhead is incurred for address-checking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out the syntax, however: it seems that one must write:&lt;/P&gt;&lt;PRE&gt;mac.w&amp;nbsp; D0.L, D1.L, (A0)+&amp;amp;&amp;nbsp; ,&amp;nbsp; D0 ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;... in order to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; word-multiply D0 and D1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; add their product to the accumulator,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; increment A0,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 'and' A0's address with the MASK-register,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; load the value newly-indicated by A0 into D0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I cannot have both the '-' and '&amp;amp;' in the line at the same time. This seems odd, as if A0 must be separately incremented OR it must be separately masked.&lt;/P&gt;&lt;P&gt;What have I missed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wade Hassler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MAC-unit-Syntax-for-CF-V1/m-p/194565#M7129</guid>
      <dc:creator>wadehassler</dc:creator>
      <dc:date>2020-10-29T09:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: MAC-unit Syntax for CF V1</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MAC-unit-Syntax-for-CF-V1/m-p/194566#M7130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;But I cannot have both the '-' and '&amp;amp;' in the line at the same time.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;As I understand it, you can:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mac.w&amp;nbsp; D0.L, D1.L, -(A0)&amp;amp;&amp;nbsp; ,&amp;nbsp; D0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at other CF instructions and addressing modes available, postincrement (Ax)+ and predecrement -(Ax) are available, but not +(Ax) or (Ax)-.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D0 in your list of steps should&amp;nbsp;be loaded with data at (A0 &amp;amp; mask) frist, and only then A0 should be incremented to point to the next data. In -(Ax) case, A0 is first decremented, and then D0 is loaded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 17:39:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MAC-unit-Syntax-for-CF-V1/m-p/194566#M7130</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-09-06T17:39:01Z</dc:date>
    </item>
  </channel>
</rss>

