Control the Ethos-U Performance Monitoring Unit (PMU). More...
Functions | |
| void | ETHOSU_PMU_Enable (struct ethosu_driver *drv) |
| Enable the PMU. | |
| void | ETHOSU_PMU_Disable (struct ethosu_driver *drv) |
| Disable the PMU. | |
| void | ETHOSU_PMU_Set_EVTYPER (struct ethosu_driver *drv, uint32_t num, enum ethosu_pmu_event_type type) |
| Set event to count for PMU eventer counter. | |
| uint32_t | ETHOSU_PMU_Get_NumEventCounters (void) |
| Get number of PMU event counters. | |
| uint32_t | ETHOSU_PMU_Get_NumEventCountersForDrv (struct ethosu_driver *drv) |
| Get number of PMU event counters for driver. | |
| enum ethosu_pmu_event_type | ETHOSU_PMU_Get_EVTYPER (struct ethosu_driver *drv, uint32_t num) |
| Get event to count for PMU eventer counter. | |
| void | ETHOSU_PMU_CYCCNT_Reset (struct ethosu_driver *drv) |
| Reset cycle counter. | |
| void | ETHOSU_PMU_EVCNTR_ALL_Reset (struct ethosu_driver *drv) |
| Reset all event counters. | |
| void | ETHOSU_PMU_CNTR_Enable (struct ethosu_driver *drv, uint32_t mask) |
| Enable counters. | |
| void | ETHOSU_PMU_CNTR_Disable (struct ethosu_driver *drv, uint32_t mask) |
| Disable counters. | |
| uint32_t | ETHOSU_PMU_CNTR_Status (struct ethosu_driver *drv) |
| Determine counters activation. | |
| uint64_t | ETHOSU_PMU_Get_CCNTR (struct ethosu_driver *drv) |
| Read cycle counter (64 bit). | |
| void | ETHOSU_PMU_Set_CCNTR (struct ethosu_driver *drv, uint64_t val) |
| Set cycle counter (64 bit). | |
| uint32_t | ETHOSU_PMU_Get_EVCNTR (struct ethosu_driver *drv, uint32_t num) |
| Read event counter. | |
| void | ETHOSU_PMU_Set_EVCNTR (struct ethosu_driver *drv, uint32_t num, uint32_t val) |
| Set event counter value. | |
| uint32_t | ETHOSU_PMU_Get_CNTR_OVS (struct ethosu_driver *drv) |
| Read counter overflow status. | |
| void | ETHOSU_PMU_Set_CNTR_OVS (struct ethosu_driver *drv, uint32_t mask) |
| Clear counter overflow status. | |
| void | ETHOSU_PMU_Set_CNTR_IRQ_Enable (struct ethosu_driver *drv, uint32_t mask) |
| Enable counter overflow interrupt request. | |
| void | ETHOSU_PMU_Set_CNTR_IRQ_Disable (struct ethosu_driver *drv, uint32_t mask) |
| Disable counter overflow interrupt request. | |
| uint32_t | ETHOSU_PMU_Get_IRQ_Enable (struct ethosu_driver *drv) |
| Get counters overflow interrupt request stiinings. | |
| void | ETHOSU_PMU_CNTR_Increment (struct ethosu_driver *drv, uint32_t mask) |
| Software increment event counter. | |
| void | ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event (struct ethosu_driver *drv, enum ethosu_pmu_event_type start_event) |
| Set start event number for the cycle counter. | |
| void | ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event (struct ethosu_driver *drv, enum ethosu_pmu_event_type stop_event) |
| Set stop event number for the cycle counter. | |
| uint32_t | ETHOSU_PMU_Get_QREAD (struct ethosu_driver *drv) |
| Read qread register. | |
| uint32_t | ETHOSU_PMU_Get_STATUS (struct ethosu_driver *drv) |
| Read status register. | |
Control the Ethos-U Performance Monitoring Unit (PMU).
The PMU provides a 64-bit cycle counter and programmable event counters. Use the symbolic values from enum ethosu_pmu_event_type to select events. See PMU example for a complete measurement example.
| void ETHOSU_PMU_Enable | ( | struct ethosu_driver * | drv | ) |
Enable the PMU.
| [in] | drv | Driver handle |
Enables the PMU and requests NPU power.
| void ETHOSU_PMU_Disable | ( | struct ethosu_driver * | drv | ) |
Disable the PMU.
| [in] | drv | Driver handle |
Disables the PMU and releases its NPU power request.
| void ETHOSU_PMU_Set_EVTYPER | ( | struct ethosu_driver * | drv, |
| uint32_t | num, | ||
| enum ethosu_pmu_event_type | type ) |
Set event to count for PMU eventer counter.
| [in] | drv | Driver handle |
| [in] | num | Event counter (0-ETHOSU_PMU_NCOUNTERS) to configure |
| [in] | type | Event to count |
Selects the event counted by an event counter.
| uint32_t ETHOSU_PMU_Get_NumEventCounters | ( | void | ) |
Get number of PMU event counters.
Returns the number of event counters implemented by the compile-time selected NPU. This function is available only in a single-variant build.
| uint32_t ETHOSU_PMU_Get_NumEventCountersForDrv | ( | struct ethosu_driver * | drv | ) |
Get number of PMU event counters for driver.
| drv | Driver handle. |
Returns the number of event counters implemented by the NPU associated with the supplied driver. This function is available in both build modes.
| enum ethosu_pmu_event_type ETHOSU_PMU_Get_EVTYPER | ( | struct ethosu_driver * | drv, |
| uint32_t | num ) |
Get event to count for PMU eventer counter.
| [in] | drv | Driver handle |
| [in] | num | Event counter (0-ETHOSU_PMU_NCOUNTERS) to configure |
Returns the event selected for an event counter.
| void ETHOSU_PMU_CYCCNT_Reset | ( | struct ethosu_driver * | drv | ) |
Reset cycle counter.
| [in] | drv | Driver handle |
Resets the cycle counter to zero.
| void ETHOSU_PMU_EVCNTR_ALL_Reset | ( | struct ethosu_driver * | drv | ) |
Reset all event counters.
| drv | Driver handle. |
Resets all programmable event counters to zero.
| void ETHOSU_PMU_CNTR_Enable | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Enable counters.
| [in] | drv | Driver handle |
| [in] | mask | Counters to enable |
Enables the counters selected by mask.
| void ETHOSU_PMU_CNTR_Disable | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Disable counters.
| [in] | drv | Driver handle |
| [in] | mask | Counters to disable |
Disables the counters selected by mask.
| uint32_t ETHOSU_PMU_CNTR_Status | ( | struct ethosu_driver * | drv | ) |
Determine counters activation.
| [in] | drv | Driver handle |
Returns the enabled state of the cycle and event counters.
| uint64_t ETHOSU_PMU_Get_CCNTR | ( | struct ethosu_driver * | drv | ) |
Read cycle counter (64 bit).
| [in] | drv | Driver handle |
Returns a consistent 64-bit cycle-counter value.
| void ETHOSU_PMU_Set_CCNTR | ( | struct ethosu_driver * | drv, |
| uint64_t | val ) |
Set cycle counter (64 bit).
| [in] | drv | Driver handle |
| [in] | val | Conter value |
Sets the 64-bit cycle-counter value.
| uint32_t ETHOSU_PMU_Get_EVCNTR | ( | struct ethosu_driver * | drv, |
| uint32_t | num ) |
Read event counter.
| [in] | drv | Driver handle |
| [in] | num | Event counter (0-ETHOSU_PMU_NCOUNTERS) |
Returns the value of an event counter.
| void ETHOSU_PMU_Set_EVCNTR | ( | struct ethosu_driver * | drv, |
| uint32_t | num, | ||
| uint32_t | val ) |
Set event counter value.
| [in] | drv | Driver handle |
| [in] | num | Event counter (0-ETHOSU_PMU_NCOUNTERS) |
| [in] | val | Conter value |
Sets the value of an event counter.
| uint32_t ETHOSU_PMU_Get_CNTR_OVS | ( | struct ethosu_driver * | drv | ) |
Read counter overflow status.
| [in] | drv | Driver handle |
Returns the counter-overflow status bits.
| void ETHOSU_PMU_Set_CNTR_OVS | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Clear counter overflow status.
| [in] | drv | Driver handle |
| [in] | mask | Counter overflow status bits to clear |
Clears the counter-overflow status bits selected by mask.
| void ETHOSU_PMU_Set_CNTR_IRQ_Enable | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Enable counter overflow interrupt request.
| [in] | drv | Driver handle |
| [in] | mask | Counter overflow interrupt request bits to set |
Enables overflow interrupt requests for the counters selected by mask.
| void ETHOSU_PMU_Set_CNTR_IRQ_Disable | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Disable counter overflow interrupt request.
| [in] | drv | Driver handle |
| [in] | mask | Counter overflow interrupt request bits to clear |
Disables overflow interrupt requests for the counters selected by mask.
| uint32_t ETHOSU_PMU_Get_IRQ_Enable | ( | struct ethosu_driver * | drv | ) |
Get counters overflow interrupt request stiinings.
| [in] | drv | Driver handle |
Returns the counter-overflow interrupt enable bits.
| void ETHOSU_PMU_CNTR_Increment | ( | struct ethosu_driver * | drv, |
| uint32_t | mask ) |
Software increment event counter.
| [in] | drv | Driver handle |
| [in] | mask | Counters to increment
|
Increments the event counters selected by mask in software.
| void ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event | ( | struct ethosu_driver * | drv, |
| enum ethosu_pmu_event_type | start_event ) |
Set start event number for the cycle counter.
| [in] | drv | Driver handle |
| [in] | start_event | Event to trigger start of the cycle counter |
Selects the event that starts the cycle counter.
| void ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event | ( | struct ethosu_driver * | drv, |
| enum ethosu_pmu_event_type | stop_event ) |
Set stop event number for the cycle counter.
| [in] | drv | Driver handle |
| [in] | stop_event | Event number |
Selects the event that stops the cycle counter.
| uint32_t ETHOSU_PMU_Get_QREAD | ( | struct ethosu_driver * | drv | ) |
Read qread register.
| [in] | drv | Driver handle |
Returns the PMU QREAD register value.
| uint32_t ETHOSU_PMU_Get_STATUS | ( | struct ethosu_driver * | drv | ) |
Read status register.
| [in] | drv | Driver handle |
Returns the PMU status register value.