TT Zephyr Platforms 19.0.0-rc2
Tenstorrent Firmware
Loading...
Searching...
No Matches
aiclk_ppm.c File Reference

Data Structures

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 (AiclkArbMax arb_max, float freq)
void SetAiclkArbMin (AiclkArbMin arb_min, float freq)
void CalculateTargAiclk (void)
void DecreaseAiclk (void)
void IncreaseAiclk (void)
float GetThrottlerArbMax (AiclkArbMax arb_max)
uint32_t GetMaxAiclkForVoltage (uint32_t voltage)
void InitArbMaxVoltage (void)
static int InitAiclkPPM (void)
 SYS_INIT (InitAiclkPPM, APPLICATION, 12)
uint8_t ForceAiclk (uint32_t freq)
uint32_t GetAiclkTarg (void)
void aiclk_set_busy (bool is_busy)
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))

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_set_busy()

void aiclk_set_busy ( bool is_busy)

◆ CalculateTargAiclk()

void CalculateTargAiclk ( void )

◆ DecreaseAiclk()

void DecreaseAiclk ( void )

◆ ForceAiclk()

uint8_t ForceAiclk ( uint32_t freq)

◆ ForceAiclkHandler()

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

◆ get_aiclk_handler()

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

◆ GetAiclkTarg()

uint32_t GetAiclkTarg ( void )

◆ GetMaxAiclkForVoltage()

uint32_t GetMaxAiclkForVoltage ( uint32_t voltage)

◆ GetThrottlerArbMax()

float GetThrottlerArbMax ( AiclkArbMax arb_max)

◆ IncreaseAiclk()

void IncreaseAiclk ( void )

◆ InitAiclkPPM()

int InitAiclkPPM ( void )
static

◆ InitArbMaxVoltage()

void InitArbMaxVoltage ( void )

◆ SetAiclkArbMax()

void SetAiclkArbMax ( AiclkArbMax arb_max,
float freq )

◆ SetAiclkArbMin()

void SetAiclkArbMin ( AiclkArbMin 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 ,
APPLICATION ,
12  )

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

◆ pll_dev_0

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