<?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>LPCXpresso IDE中的主题 Re: Instruction &amp; Clock execution times</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571488#M20616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Feb 20 06:23:24 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Just use &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__ASM volatile ("nop");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;without branch, push, pop it delays 10ns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Core Register -&amp;gt; Cycle &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to count cycles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://infocenter.arm.com/help/topic/com.arm.doc.ddi0337g/DDI0337G_cortex_m3_r2p0_trm.pdf&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;describes that timing isn't as easy as in good old 8051 times:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][B][FONT=Helvetica-Bold]18.1 About instruction timing[/FONT][/B]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Times-Roman][SIZE=2][FONT=Times-Roman][SIZE=2]The timing information in this chapter covers each instruction in addition to interactions[/SIZE][/FONT][/SIZE][/FONT][FONT=Times-Roman][SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]between instructions. It also contains information about factors that influence timings.[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]When looking at timings, it is important to understand the role that the system[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]architecture plays. Every instruction must be fetched and every load/store must go out[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]to the system. These factors are described along with intended system design, and the[/FONT][/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]implications for timing.[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT]So I would suggest to measure this delay with a scope.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Don't use a nop behind another nop, this doesn't work. You also get a 10ns delay.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:22:56 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:22:56Z</dc:date>
    <item>
      <title>Instruction &amp; Clock execution times</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571487#M20615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by deBoogle on Sun Feb 20 04:45:49 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know of creating a very small (10ns) delay. By my calculations one instruction (depending on actual instrction) should take 10ns with CPU = 100MHz.&amp;nbsp; So I figured use asm and put in a NOP.&amp;nbsp; But some sources I have read suggest this may be removed from instruction pipeline by the CPU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have seen the __NOP() function in the CMIS coreM3.h file, but this still uses quite a few (5 or 6) instructions to do the stack pushing and popping.&amp;nbsp; Is it safe for me just to put in an inline asm NOP??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an aside is there anyway of counting total clk cycles used in a delay within LPCXpresso? I have been stepping through the instructions, but the questions is, is one step = 1 clk cycle??? I think it is more likely 1 step = 1 instrction execution regardless of clk cycles used to execute said instruction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;deBoogle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:22:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571487#M20615</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Instruction &amp; Clock execution times</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571488#M20616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Feb 20 06:23:24 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Just use &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__ASM volatile ("nop");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;without branch, push, pop it delays 10ns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Core Register -&amp;gt; Cycle &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to count cycles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://infocenter.arm.com/help/topic/com.arm.doc.ddi0337g/DDI0337G_cortex_m3_r2p0_trm.pdf&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;describes that timing isn't as easy as in good old 8051 times:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][B][FONT=Helvetica-Bold]18.1 About instruction timing[/FONT][/B]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Times-Roman][SIZE=2][FONT=Times-Roman][SIZE=2]The timing information in this chapter covers each instruction in addition to interactions[/SIZE][/FONT][/SIZE][/FONT][FONT=Times-Roman][SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]between instructions. It also contains information about factors that influence timings.[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]When looking at timings, it is important to understand the role that the system[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]architecture plays. Every instruction must be fetched and every load/store must go out[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]to the system. These factors are described along with intended system design, and the[/FONT][/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][FONT=Times-Roman]implications for timing.[/FONT][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT]So I would suggest to measure this delay with a scope.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Don't use a nop behind another nop, this doesn't work. You also get a 10ns delay.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:22:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571488#M20616</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Instruction &amp; Clock execution times</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571489#M20617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by deBoogle on Sun Feb 20 06:41:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you mean by 'don't use a NOP behind another NOP'?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you mean don't use two consecutively?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the quick response by the way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;deBoogle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:22:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Instruction-Clock-execution-times/m-p/571489#M20617</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:22:57Z</dc:date>
    </item>
  </channel>
</rss>

