Skip to content

File ns_pmu_utils.h

FileList > includes-api > ns_pmu_utils.h

Go to the source code of this file

Utilities for setting up and using the Performance Monitoring Unit. More...

Classes

Type Name
struct ns_pmu_config
struct ns_pmu_counter
struct ns_pmu_counters_t
struct ns_pmu_event

Public Types

Type Name
typedef int(* invoke_fp
typedef struct ns_pmu_config ns_pmu_config_t
typedef struct ns_pmu_counter ns_pmu_counter_t
enum ns_pmu_event_counter_size_e
typedef struct ns_pmu_event ns_pmu_event_t

Public Attributes

Type Name
const ns_core_api_t ns_pmu_V0_0_1
const ns_core_api_t ns_pmu_V1_0_0
const ns_core_api_t ns_pmu_current_version
const ns_core_api_t ns_pmu_oldest_supported_version

Public Functions

Type Name
void ns_delta_pmu (ns_pmu_counters_t * s, ns_pmu_counters_t * e, ns_pmu_counters_t * d)
void ns_pmu_characterize_function (invoke_fp func, ns_pmu_config_t * cfg)
void ns_pmu_event_create (ns_pmu_event_t * event, uint32_t eventId, ns_pmu_event_counter_size_e counterSize)
uint32_t ns_pmu_get_counters (ns_pmu_config_t * cfg)
Get PMU counter values.
void ns_pmu_get_name (ns_pmu_config_t * cfg, uint32_t i, char * name)
uint32_t ns_pmu_init (ns_pmu_config_t * cfg)
Initialize and start the PMU profiling syste.
uint32_t ns_pmu_print_counters (ns_pmu_config_t * cfg)
void ns_pmu_reset_config (ns_pmu_config_t * cfg)
void ns_pmu_reset_counters ()

Macros

Type Name
define NS_PMU_API_ID 0xCA000B
define NS_PMU_CURRENT_VERSION NS\_PMU\_V1\_0\_0
define NS_PMU_OLDEST_SUPPORTED_VERSION NS\_PMU\_V0\_0\_1
define NS_PMU_V0_0_1 { .major = 0, .minor = 0, .revision = 1 }
define NS_PMU_V1_0_0 { .major = 1, .minor = 0, .revision = 0 }

Detailed Description

Author:

Ambiq

Version:

0.1

Date:

2024-08-16

Copyright:

Copyright (c) 2024

Public Types Documentation

typedef invoke_fp

typedef int(* invoke_fp) ();

typedef ns_pmu_config_t

typedef struct ns_pmu_config ns_pmu_config_t;

typedef ns_pmu_counter_t

typedef struct ns_pmu_counter ns_pmu_counter_t;

enum ns_pmu_event_counter_size_e

enum ns_pmu_event_counter_size_e {
    NS_PMU_EVENT_COUNTER_SIZE_16 = 0,
    NS_PMU_EVENT_COUNTER_SIZE_32 = 1
};

typedef ns_pmu_event_t

typedef struct ns_pmu_event ns_pmu_event_t;

Public Attributes Documentation

variable ns_pmu_V0_0_1

const ns_core_api_t ns_pmu_V0_0_1;

variable ns_pmu_V1_0_0

const ns_core_api_t ns_pmu_V1_0_0;

variable ns_pmu_current_version

const ns_core_api_t ns_pmu_current_version;

variable ns_pmu_oldest_supported_version

const ns_core_api_t ns_pmu_oldest_supported_version;

Public Functions Documentation

function ns_delta_pmu

void ns_delta_pmu (
    ns_pmu_counters_t * s,
    ns_pmu_counters_t * e,
    ns_pmu_counters_t * d
) 

function ns_pmu_characterize_function

void ns_pmu_characterize_function (
    invoke_fp func,
    ns_pmu_config_t * cfg
) 

function ns_pmu_event_create

void ns_pmu_event_create (
    ns_pmu_event_t * event,
    uint32_t eventId,
    ns_pmu_event_counter_size_e counterSize
) 

function ns_pmu_get_counters

Get PMU counter values.

uint32_t ns_pmu_get_counters (
    ns_pmu_config_t * cfg
) 


function ns_pmu_get_name

void ns_pmu_get_name (
    ns_pmu_config_t * cfg,
    uint32_t i,
    char * name
) 

function ns_pmu_init

Initialize and start the PMU profiling syste.

uint32_t ns_pmu_init (
    ns_pmu_config_t * cfg
) 

Parameters:

  • cfg

Returns:

uint32_t status


function ns_pmu_print_counters

uint32_t ns_pmu_print_counters (
    ns_pmu_config_t * cfg
) 

function ns_pmu_reset_config

void ns_pmu_reset_config (
    ns_pmu_config_t * cfg
) 

function ns_pmu_reset_counters

void ns_pmu_reset_counters () 

Macro Definition Documentation

define NS_PMU_API_ID

#define NS_PMU_API_ID `0xCA000B`

define NS_PMU_CURRENT_VERSION

#define NS_PMU_CURRENT_VERSION `NS_PMU_V1_0_0`

define NS_PMU_OLDEST_SUPPORTED_VERSION

#define NS_PMU_OLDEST_SUPPORTED_VERSION `NS_PMU_V0_0_1`

define NS_PMU_V0_0_1

#define NS_PMU_V0_0_1 `{ .major = 0, .minor = 0, .revision = 1 }`

define NS_PMU_V1_0_0

#define NS_PMU_V1_0_0 `{ .major = 1, .minor = 0, .revision = 0 }`


The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-utils/includes-api/ns_pmu_utils.h