• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Multicore DSP » Keystone Multicore Forum (C66, 66A, AM5) » Timing issues
Share
C6000 Multicore DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Training Available
TI provides self-paced online training that introduces the primary components of the KeyStone II family of SoC devices.

  • KeyStone II SoC Overview >
  • KeyStone II Software Overview >
  • KeyStone II ARM Cortex-A15 Corepac Overview >
  • More Information >
  • Check out
    Multicore Mix blog
    • $core_v2_blog.Current.Name

      Geeks UNITE for Geek Pride Day

      Posted 11 hours ago
      by Lauren Reed1
      Happy Geek Pride Day from the Processors team! We wanted to celebrate...
    • $core_v2_blog.Current.Name

      OpenMP - All aboard!

      Posted 2 days ago
      by Debbie Greenstreet
      With so many end products today relying on multicore DSPs for...
    • $core_v2_blog.Current.Name

      A look back: Two years of Multicore Mix

      Posted 3 days ago
      by Lauren Reed1
      A big thank you to everyone who participated in our contest last...

    Forums

    Timing issues

    This question is not answered
    hobo Q
    Posted by hobo Q
    on Apr 07 2012 10:16 AM
    Prodigy30 points

    Hello~

        I use 6678EVM to run a program ,counted use the internal register TSCL, the result is 141984243.Then I use the clock() function to count the same program ,it returns 1102514,how can the two results be so different,which one should I take?? I choose "CPU Execute Cycles" for clock. Thank you~  

    6678 EVM6678
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • RandyP
      Posted by RandyP
      on Apr 08 2012 16:22 PM
      Guru60220 points

      Hobo Q,

      TSCL is single-function counter that will give you the number of clock cycles that occured since the TSC was started after reset. It will not be gated by execution cycles or affected by wait states or CPU stalls.

      You will have to explain more about where you accessed "the clock() function" to get any better explanation. Name the library, tool version, document reference name and document reference page/line, or whatever information will explain exactly what you have used.

      Regards and welcome to the TI E2E Forums,
      RandyP

      Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • hobo Q
      Posted by hobo Q
      on Apr 08 2012 23:43 PM
      Prodigy30 points

      Thank you for your reply.I use clock() function and TSCL like 

      TSCL=0;

      a=TSCL;

      t_start=clock();

      ...

      FUNC();

      ...

      t_stop=clock();

      b=TSCL;

      cycle=b-a;

      t=t_stop-t_start;

      And the FUNC() is my program. The CCS version is 5.1.  Thank you ~

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • hobo Q
      Posted by hobo Q
      on Apr 08 2012 23:45 PM
      Prodigy30 points

      RandyP

      Hobo Q,

      TSCL is single-function counter that will give you the number of clock cycles that occured since the TSC was started after reset. It will not be gated by execution cycles or affected by wait states or CPU stalls.

      You will have to explain more about where you accessed "the clock() function" to get any better explanation. Name the library, tool version, document reference name and document reference page/line, or whatever information will explain exactly what you have used.

      Regards and welcome to the TI E2E Forums,
      RandyP

      Thank you for your reply.I use clock() function and TSCL like 

      TSCL=0;

      a=TSCL;

      t_start=clock();

      ...

      FUNC();

      ...

      t_stop=clock();

      b=TSCL;

      cycle=b-a;

      t=t_stop-t_start;

      And the FUNC() is my program. The CCS version is 5.1.  Thank you ~

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RandyP
      Posted by RandyP
      on Apr 09 2012 06:17 AM
      Guru60220 points

      Hobo Q,

      hobo Q
      Then I use the clock() function to count the same program ,it returns 1102514,how can the two results be so different,which one should I take?? I choose "CPU Execute Cycles" for clock.

      I do not know where the clock() function comes from or what its return value is. Where did you choose "CPU Execute Cycles" for clock()?

      This clock() function is probably not returning the same value as TSCL. Please search through the API documents you have and the help files available to find out what value it returns. Without your help telling where you got it, I am not sure what we can say about it. Which header file declares it?

      1. Try putting the TSCL reads between the clock() calls and see how your cycle count varies.

      2. Keep in mind that the TSCL is only a 32-bit portion of the TSCH/TSCL pair and it will overflow/wrap-around after about 4 seconds at a 1GHz clock rate.

      Regards,
      RandyP

      Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use