TT Zephyr Platforms 19.0.0-rc2
Tenstorrent Firmware
|
#include <zephyr/sys/util.h>
#include "aiclk_ppm.h"
#include "vf_curve.h"
#include <zephyr/drivers/misc/bh_fwtable.h>
#include <tenstorrent/msgqueue.h>
#include <tenstorrent/smc_msg.h>
Macros | |
#define | FREQ_MARGIN_MAX 300.0F |
#define | FREQ_MARGIN_MIN -300.0F |
#define | VOLTAGE_MARGIN_MAX 150.0F |
#define | VOLTAGE_MARGIN_MIN -150.0F |
Functions | |
void | InitVFCurve (void) |
float | VFCurve (float freq_mhz) |
Calculate the voltage based on the frequency. | |
static uint8_t | get_voltage_curve_from_freq_handler (const union request *request, struct response *response) |
static uint8_t | get_freq_curve_from_voltage_handler (const union request *request, struct response *response) |
REGISTER_MESSAGE (TT_SMC_MSG_GET_VOLTAGE_CURVE_FROM_FREQ, get_voltage_curve_from_freq_handler) | |
REGISTER_MESSAGE (TT_SMC_MSG_GET_FREQ_CURVE_FROM_VOLTAGE, get_freq_curve_from_voltage_handler) |
Variables | |
static const float | vf_quadratic_coeff = 0.00031395F |
static const float | vf_linear_coeff = -0.43953F |
static const float | vf_constant = 828.83F |
static float | freq_margin_mhz = 300.0F |
static float | voltage_margin_mv = 150.0F |
static const struct device *const | fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable)) |
#define FREQ_MARGIN_MAX 300.0F |
#define FREQ_MARGIN_MIN -300.0F |
#define VOLTAGE_MARGIN_MAX 150.0F |
#define VOLTAGE_MARGIN_MIN -150.0F |
|
static |
|
static |
void InitVFCurve | ( | void | ) |
REGISTER_MESSAGE | ( | TT_SMC_MSG_GET_FREQ_CURVE_FROM_VOLTAGE | , |
get_freq_curve_from_voltage_handler | ) |
REGISTER_MESSAGE | ( | TT_SMC_MSG_GET_VOLTAGE_CURVE_FROM_FREQ | , |
get_voltage_curve_from_freq_handler | ) |
float VFCurve | ( | float | freq_mhz | ) |
Calculate the voltage based on the frequency.
freq_mhz | The frequency in MHz |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |