![]() |
TT-System-Firmware APIs 19.8.99
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>#include "functional_efuse.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 |
| #define | VF_INTERCEPT 738.687863F |
| #define | VF_COEFF_RO -9.399314F |
| #define | VF_COEFF_FREQ 52.359951F |
| #define | VF_COEFF_RO_SQ -4.295651F |
| #define | VF_COEFF_RO_FREQ 0.000000F |
| #define | VF_COEFF_FREQ_SQ 8.560169F |
| #define | RO_NORM_MEAN 2582.380952F |
| #define | RO_NORM_STD 121.320464F |
| #define | FREQ_NORM_MEAN 1279.761905F |
| #define | FREQ_NORM_STD 189.567027F |
| #define | RO_SS_THRESHOLD 2500.0F |
| #define | FREQ_THRESHOLD_MHZ 1200.0F |
| #define | SS_MARGIN_MV 45.0F |
| #define | FF_LOW_FREQ_MARGIN_MV 25.0F |
| #define | FF_HIGH_FREQ_MARGIN_MV 45.0F |
| #define | VF_QUADRATIC_COEFF 0.00031395F |
| #define | VF_LINEAR_COEFF -0.43953F |
| #define | VF_CONSTANT 828.83F |
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 float | freq_margin_mhz = 300.0F |
| static float | voltage_margin_mv = 150.0F |
| static uint32_t | process_RO |
| static bool | use_process_vf_curve |
| static bool | process_is_ss |
| static float | vf_ro_base |
| static float | vf_freq_linear |
| static const struct device *const | fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable)) |
| #define FF_HIGH_FREQ_MARGIN_MV 45.0F |
| #define FF_LOW_FREQ_MARGIN_MV 25.0F |
| #define FREQ_MARGIN_MAX 300.0F |
| #define FREQ_MARGIN_MIN -300.0F |
| #define FREQ_NORM_MEAN 1279.761905F |
| #define FREQ_NORM_STD 189.567027F |
| #define FREQ_THRESHOLD_MHZ 1200.0F |
| #define RO_NORM_MEAN 2582.380952F |
| #define RO_NORM_STD 121.320464F |
| #define RO_SS_THRESHOLD 2500.0F |
| #define SS_MARGIN_MV 45.0F |
| #define VF_COEFF_FREQ 52.359951F |
| #define VF_COEFF_FREQ_SQ 8.560169F |
| #define VF_COEFF_RO -9.399314F |
| #define VF_COEFF_RO_FREQ 0.000000F |
| #define VF_COEFF_RO_SQ -4.295651F |
| #define VF_CONSTANT 828.83F |
| #define VF_INTERCEPT 738.687863F |
| #define VF_LINEAR_COEFF -0.43953F |
| #define VF_QUADRATIC_COEFF 0.00031395F |
| #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 |
|
static |
|
static |