This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: Which Clock source is for CPU instruction?

Part Number: TMS570LC4357

Hi all:

   

   In the trm, I find the GCLK is the CPU clock and HCLK is system clock. However, which clock source is for CPU instruction? 

   In my mind, I think GCLK is for  CPU instruction.

Best Wish

Li

  • Hi Li,

    The GCLK is the CPU clock, HCLK is the system clock or the level-2 memory clock, and VCLKx are the peripheral clocks.

    The instructions are executed in GCLK frequency. The Prefetch Unit (PFU) obtains instructions from the L2RAM and L2FMC in HCLK frequency and waits states may be needed.

  • Thanks QJ. 

    If I understand you correct, When I decrease the HCLK, it will cost more time fo PFU to obtain instructions. In this case, the CPU instructions will also be executed slowly at the same time.

    In my application, I want to increase  frequency of  VCLK3. This clock source is for EMIF bus. However, if I change the frequency from 75MHZ to 100HMZ, the HCLK will be 100MHZ as well cause the "HCLK divider abd VCLK3 divider".

    My question is that if  I decrease the frequency of HCLK, Will this cause the CPU to execute instructions longer?

  • Yes, it will take longer to execute the code.

  • Thanks QJ.

        I have one more question how could I test the real latency when I decrease the HCLK? Do you have any demo codes?

    Best Wish

    Li

  • I don't have demo code. 

    You can PMU to measure the cycles for executing your function or a section of your code. 

    If the instructions are already in the instruction cache, and the data is located in SRAM, changing the HCLK might not impact the execution time much.