This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to get Cycle Count in FVP Corstone SSE-300 Ethos-U55?

HI, It seems that FVP Corstone SSE-300 Ethos-U55 does no longer has the parameter "Cpu0.has_pmu" which is used to get cycle count (I Used --list-params to see all available parameter and this parameter is not there). Is there any other parameter that can be used to get cycle count? or is there another way to get cycle count? Need Help.

Parents
  • Likely something of that helps

    #include "os_tick.h" // CMSIS OS Tick API
    #include "cmsis_os2.h" // CMSIS RTOS API
    #include "rtx_os.h" // RTX OS definitions
    #include "rtx_evr.h" // RTX Event Recorder definitions

    #include "RTE_Components.h"
    #include CMSIS_device_header

Reply
  • Likely something of that helps

    #include "os_tick.h" // CMSIS OS Tick API
    #include "cmsis_os2.h" // CMSIS RTOS API
    #include "rtx_os.h" // RTX OS definitions
    #include "rtx_evr.h" // RTX Event Recorder definitions

    #include "RTE_Components.h"
    #include CMSIS_device_header

Children
  • I remove #include "core_cm55.h", did not get any error like DWT will be not found. But DWT->CYCCNT returns only zero. Even after including another headers. is there any other solution?

  • // Enable DWT cycle counter
    CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
    DWT->CYCCNT = 0;
    DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
    cyccnt = DWT->CYCCNT;

  • I added this to my code but still its value is Zero.

        uint32_t start_cycles, end_cycles;
        // Enable DWT cycle counter
        CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
        DWT->CYCCNT = 0;
        DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
       
        start_cycles = DWT->CYCCNT;
        printf("start_cycles = %lu\n", start_cycles);
       
        int num_iterations = 50000000;
        int value=0;
        for (int i = 0; i < num_iterations; i++) {          
                value = i*i;
            }
            end_cycles = DWT->CYCCNT;
            printf("end_cycles = %lu\n", end_cycles);

    Is there anything else to consider?