<?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: There is a problem about the clock cycle used by the operator when executed in the MPC5744P in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632250#M5923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;SPAN lang="en"&gt;&lt;SPAN&gt;I have done in accordance with your method and found that for a n1 = n2 + n3 operation, the compiler requires seven instructions.&lt;/SPAN&gt; The disassembly results are as follows&lt;SPAN&gt;:n1 = n2 + n3;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;1&amp;nbsp; e_lhz&amp;nbsp; r9, 10(r31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;2&amp;nbsp; e_rlwinm&amp;nbsp; r10, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;3&amp;nbsp; e_lhz&amp;nbsp; r9, 12(r31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;4&amp;nbsp; e_rlwinm&amp;nbsp; r9, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;5&amp;nbsp; add r9, r10, r9&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;6&amp;nbsp; e_rlwinm&amp;nbsp; r9, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;7&amp;nbsp; e_sth, 8(r31).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;If I use the assembly instructions to achieve a "+" operation in MPC5744P, also need to use seven instructions to achieve this operation?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Apr 2017 06:48:34 GMT</pubDate>
    <dc:creator>dyc09052110</dc:creator>
    <dc:date>2017-04-24T06:48:34Z</dc:date>
    <item>
      <title>There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632248#M5921</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;SPAN lang="en"&gt;&lt;SPAN&gt;&amp;nbsp;When I execute a for (unsigned short&amp;nbsp;i = 0; i &amp;lt;5000; i ++) {} in the MPC5744P, It takes about &amp;nbsp;500us.&amp;nbsp;When I execute a for (unsigned short&amp;nbsp;i = 0; i &amp;lt;5000; i ++) { a = b+c;} in the MPC5744P, It takes about 1000us.The MPC5744P clock speed is 160MHz.But according to the MPC5744P reference manual, the '+' operator takes only one clock cycle, the '*' operator takes two clock cycles, Why this code takes so long time?Or what else should I use to speed up the execution?This question has bothered me for a long time and hope you can help me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:15:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632248#M5921</guid>
      <dc:creator>dyc09052110</dc:creator>
      <dc:date>2017-04-21T09:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632249#M5922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I would recommend to disassemble your C code to see how many and which instructions has been used by compiler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 11:36:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632249#M5922</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2017-04-21T11:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632250#M5923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;SPAN lang="en"&gt;&lt;SPAN&gt;I have done in accordance with your method and found that for a n1 = n2 + n3 operation, the compiler requires seven instructions.&lt;/SPAN&gt; The disassembly results are as follows&lt;SPAN&gt;:n1 = n2 + n3;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;1&amp;nbsp; e_lhz&amp;nbsp; r9, 10(r31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;2&amp;nbsp; e_rlwinm&amp;nbsp; r10, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;3&amp;nbsp; e_lhz&amp;nbsp; r9, 12(r31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;4&amp;nbsp; e_rlwinm&amp;nbsp; r9, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;5&amp;nbsp; add r9, r10, r9&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;6&amp;nbsp; e_rlwinm&amp;nbsp; r9, r9, 0, 16, 31&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;7&amp;nbsp; e_sth, 8(r31).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;If I use the assembly instructions to achieve a "+" operation in MPC5744P, also need to use seven instructions to achieve this operation?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 06:48:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632250#M5923</guid>
      <dc:creator>dyc09052110</dc:creator>
      <dc:date>2017-04-24T06:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632251#M5924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try to change optimization setting of you compiler to higher level.&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/14733i22212B1E6229E78A/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;Also you could try to define operand as register type like this&lt;/P&gt;&lt;P&gt;register int n1, n2, n3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This definition places operand directly into register thus it could shrink generated code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:02:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632251#M5924</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2017-04-24T12:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632252#M5925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been in accordance with the second method you said to optimize the code and achieved some results.I carry out radar signal processing on MPC5744P.But the current program execution speed is still not meet the real-time requirements.&lt;SPAN lang="en"&gt;&lt;SPAN&gt;I would like to know can i&amp;nbsp;write assembly code in the MPC5744P ?If so, what is the instruction set for the MPC5744P and how can I use it in the MPC5744P?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV dir="ltr"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;If not, what module in the MPC5744P can speed up the execution of the code and how can I use these modules?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 07:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632252#M5925</guid>
      <dc:creator>dyc09052110</dc:creator>
      <dc:date>2017-04-25T07:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: There is a problem about the clock cycle used by the operator when executed in the MPC5744P</title>
      <link>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632253#M5926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI:&lt;/P&gt;&lt;P&gt;I want to use LSP intrinsic functions of MPC5744P in S32, but i can not find r&lt;SPAN lang="en"&gt;&lt;SPAN&gt;elated header files. Can you help me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 07:04:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/There-is-a-problem-about-the-clock-cycle-used-by-the-operator/m-p/632253#M5926</guid>
      <dc:creator>dyc09052110</dc:creator>
      <dc:date>2017-05-02T07:04:03Z</dc:date>
    </item>
  </channel>
</rss>

