TT Zephyr Platforms 19.5.0-rc1
Tenstorrent Firmware
Loading...
Searching...
No Matches
aiclk_ppm.c File Reference

Data Structures

struct  AiclkArb
struct  AiclkPPM

Macros

#define AICLK_FMAX_MAX   1400.0F
#define AICLK_FMAX_MIN   800.0F
#define AICLK_FMIN_MAX   800.0F
#define AICLK_FMIN_MIN   200.0F

Enumerations

enum  ClockControlMode {
  CLOCK_MODE_UNCONTROLLED = 1 ,
  CLOCK_MODE_PPM_FORCED = 2 ,
  CLOCK_MODE_PPM_UNFORCED = 3
}

Functions

void SetAiclkArbMax (enum aiclk_arb_max arb_max, float freq)
void SetAiclkArbMin (enum aiclk_arb_min arb_min, float freq)
void EnableArbMax (enum aiclk_arb_max arb_max, bool enable)
void EnableArbMin (enum aiclk_arb_min arb_min, bool enable)
void CalculateTargAiclk (void)
void DecreaseAiclk (void)
void IncreaseAiclk (void)
float GetThrottlerArbMax (enum aiclk_arb_max arb_max)
uint32_t GetMaxAiclkForVoltage (uint32_t voltage)
void InitArbMaxVoltage (void)
static int InitAiclkPPM (void)
 SYS_INIT (InitAiclkPPM, POST_KERNEL, 102)
uint8_t ForceAiclk (uint32_t freq)
uint32_t GetAiclkTarg (void)
uint32_t GetAiclkFmin (void)
uint32_t GetAiclkFmax (void)
void aiclk_update_busy (void)
uint32_t get_aiclk_effective_arb_min (void)
uint32_t get_aiclk_effective_arb_max (void)
uint32_t get_enabled_arb_min_bitmask (void)
uint32_t get_enabled_arb_max_bitmask (void)
static uint8_t aiclk_busy_handler (const union request *request, struct response *response)
 Handles the request to set AICLK busy or idle.
static uint8_t ForceAiclkHandler (const union request *request, struct response *response)
static uint8_t get_aiclk_handler (const union request *request, struct response *response)
static uint8_t SweepAiclkHandler (const union request *request, struct response *response)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_AICLK_GO_BUSY)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_AICLK_GO_LONG_IDLE)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_FORCE_AICLK)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_GET_AICLK)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_AISWEEP_START)
const STRUCT_SECTION_ITERABLE (msgqueue_handler, registration_for_TT_SMC_MSG_AISWEEP_STOP)

Variables

static const struct device *const pll_dev_0 = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(pll0))
static AiclkPPM aiclk_ppm
static const struct device *const fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable))
static bool last_msg_busy

Macro Definition Documentation

◆ AICLK_FMAX_MAX

#define AICLK_FMAX_MAX   1400.0F

◆ AICLK_FMAX_MIN

#define AICLK_FMAX_MIN   800.0F

◆ AICLK_FMIN_MAX

#define AICLK_FMIN_MAX   800.0F

◆ AICLK_FMIN_MIN

#define AICLK_FMIN_MIN   200.0F

Enumeration Type Documentation

◆ ClockControlMode

Enumerator
CLOCK_MODE_UNCONTROLLED 
CLOCK_MODE_PPM_FORCED 
CLOCK_MODE_PPM_UNFORCED 

Function Documentation

◆ aiclk_busy_handler()

uint8_t aiclk_busy_handler ( const union request * request,
struct response * response )
static

Handles the request to set AICLK busy or idle.

Parameters
[in]requestThe request, of type aiclk_set_speed_rqst_t, with command code MSG_TYPE_AICLK_GO_BUSY to go busy, or MSG_TYPE_AICLK_GO_LONG_IDLE to go idle.
[out]responseThe response to the host
Returns
0 for success

◆ aiclk_update_busy()

void aiclk_update_busy ( void )

◆ CalculateTargAiclk()

void CalculateTargAiclk ( void )

◆ DecreaseAiclk()

void DecreaseAiclk ( void )

◆ EnableArbMax()

void EnableArbMax ( enum aiclk_arb_max arb_max,
bool enable )

◆ EnableArbMin()

void EnableArbMin ( enum aiclk_arb_min arb_min,
bool enable )

◆ ForceAiclk()

uint8_t ForceAiclk ( uint32_t freq)

◆ ForceAiclkHandler()

uint8_t ForceAiclkHandler ( const union request * request,
struct response * response )
static

◆ get_aiclk_effective_arb_max()

uint32_t get_aiclk_effective_arb_max ( void )

◆ get_aiclk_effective_arb_min()

uint32_t get_aiclk_effective_arb_min ( void )

◆ get_aiclk_handler()

uint8_t get_aiclk_handler ( const union request * request,
struct response * response )
static

◆ get_enabled_arb_max_bitmask()

uint32_t get_enabled_arb_max_bitmask ( void )

◆ get_enabled_arb_min_bitmask()

uint32_t get_enabled_arb_min_bitmask ( void )

◆ GetAiclkFmax()

uint32_t GetAiclkFmax ( void )

◆ GetAiclkFmin()

uint32_t GetAiclkFmin ( void )

◆ GetAiclkTarg()

uint32_t GetAiclkTarg ( void )

◆ GetMaxAiclkForVoltage()

uint32_t GetMaxAiclkForVoltage ( uint32_t voltage)

◆ GetThrottlerArbMax()

float GetThrottlerArbMax ( enum aiclk_arb_max arb_max)

◆ IncreaseAiclk()

void IncreaseAiclk ( void )

◆ InitAiclkPPM()

int InitAiclkPPM ( void )
static

◆ InitArbMaxVoltage()

void InitArbMaxVoltage ( void )

◆ SetAiclkArbMax()

void SetAiclkArbMax ( enum aiclk_arb_max arb_max,
float freq )

◆ SetAiclkArbMin()

void SetAiclkArbMin ( enum aiclk_arb_min arb_min,
float freq )

◆ STRUCT_SECTION_ITERABLE() [1/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_AICLK_GO_BUSY  )

◆ STRUCT_SECTION_ITERABLE() [2/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_AICLK_GO_LONG_IDLE  )

◆ STRUCT_SECTION_ITERABLE() [3/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_AISWEEP_START  )

◆ STRUCT_SECTION_ITERABLE() [4/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_AISWEEP_STOP  )

◆ STRUCT_SECTION_ITERABLE() [5/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_FORCE_AICLK  )

◆ STRUCT_SECTION_ITERABLE() [6/6]

const STRUCT_SECTION_ITERABLE ( msgqueue_handler ,
registration_for_TT_SMC_MSG_GET_AICLK  )

◆ SweepAiclkHandler()

uint8_t SweepAiclkHandler ( const union request * request,
struct response * response )
static

◆ SYS_INIT()

SYS_INIT ( InitAiclkPPM ,
POST_KERNEL ,
102  )

Variable Documentation

◆ aiclk_ppm

AiclkPPM aiclk_ppm
static
Initial value:
= {
.fmax = 1400.0F ,
.fmin = 200.0F ,
}

◆ fwtable_dev

const struct device* const fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable))
static

◆ last_msg_busy

bool last_msg_busy
static

◆ pll_dev_0

const struct device* const pll_dev_0 = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(pll0))
static