<?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 Time Base registers TBL &amp; TBU in P-Series</title>
    <link>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772343#M4460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'd like to use the Time Base registers to capture time in my software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm using the HID0[SEL_TBCLK]=0 so the TB is updated every 8 core complex bus (CCB) clocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is : How can i read the TBU and TBL at the same time so i have a good correlation between the 2 registers value ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Some processors i worked with have some kind of freezing mechanism, but i don't see anything like like for the P2020.&lt;/P&gt;&lt;P&gt;in §4.7.3, the EREF_RM describes a 64-bit mode for spr 268 (TBL)&amp;nbsp; in order to read the TB. Is it possible on P2020 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Nov 2017 15:51:08 GMT</pubDate>
    <dc:creator>benjaminchauvel</dc:creator>
    <dc:date>2017-11-13T15:51:08Z</dc:date>
    <item>
      <title>Time Base registers TBL &amp; TBU</title>
      <link>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772343#M4460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'd like to use the Time Base registers to capture time in my software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm using the HID0[SEL_TBCLK]=0 so the TB is updated every 8 core complex bus (CCB) clocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is : How can i read the TBU and TBL at the same time so i have a good correlation between the 2 registers value ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Some processors i worked with have some kind of freezing mechanism, but i don't see anything like like for the P2020.&lt;/P&gt;&lt;P&gt;in §4.7.3, the EREF_RM describes a 64-bit mode for spr 268 (TBL)&amp;nbsp; in order to read the TB. Is it possible on P2020 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 15:51:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772343#M4460</guid>
      <dc:creator>benjaminchauvel</dc:creator>
      <dc:date>2017-11-13T15:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Time Base registers TBL &amp; TBU</title>
      <link>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772344#M4461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not possible to read the entire 64-bit timebase value by one instruction, instruction mfspr reads only 32 bits. The following is said in "Book E: Enhanced PowerPC Architecture", Section 8.4.3 "Reading the Time Base":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;It is not possible to read the entire 64-bit Time Base in a single instruction. mfspr RT, TBL moves from the lower half of the Time Base (TBL) to a GPR, and mfspr RT, TBU extended mnemonic moves from the upper half (TBU) to a GPR. Because of the possibility of a carry from Time Base Lower to Time Base Upper occurring between reads of Time Base Lower and Time Base Upper, a sequence such as the following is necessary to read the Time Base.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;loop:&lt;/P&gt;&lt;P&gt;mfspr Rx,TBU #load from TBU&lt;/P&gt;&lt;P&gt;mfspr Ry,TBL #load from TBL&lt;/P&gt;&lt;P&gt;mfspr Rz,TBU #load from TBU&lt;/P&gt;&lt;P&gt;cmp cr0,0,Rz,Rx #see if 'old' = 'new'&lt;/P&gt;&lt;P&gt;bc 4,2,loop #loop if carry occurred&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The comparison and loop are necessary to ensure that a consistent pair of values has been obtained.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Reading entire 64-bit by one instruction is possible in 64-bit implementations only.&lt;/P&gt;&lt;P&gt;P2020 device (e500v2 core) is 32-bit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Have a great day,&lt;BR /&gt; Alexander&lt;BR /&gt; TIC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt; Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt; -----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 02:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772344#M4461</guid>
      <dc:creator>alexander_yakov</dc:creator>
      <dc:date>2017-11-14T02:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time Base registers TBL &amp; TBU</title>
      <link>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772345#M4462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've totality missed that book. I thought the EREF_RM was the book E.&lt;/P&gt;&lt;P&gt;I would never have asked my question if i had this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should add it to the documentation page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benjamin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 08:35:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772345#M4462</guid>
      <dc:creator>benjaminchauvel</dc:creator>
      <dc:date>2017-11-14T08:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Time Base registers TBL &amp; TBU</title>
      <link>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772346#M4463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This document is publicly available on our site.&lt;/P&gt;&lt;P&gt;Here is a direct link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/user-guide/BOOK_EUM.pdf" title="https://www.nxp.com/docs/en/user-guide/BOOK_EUM.pdf"&gt;https://www.nxp.com/docs/en/user-guide/BOOK_EUM.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 06:54:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Time-Base-registers-TBL-TBU/m-p/772346#M4463</guid>
      <dc:creator>alexander_yakov</dc:creator>
      <dc:date>2017-11-15T06:54:29Z</dc:date>
    </item>
  </channel>
</rss>

