![]() |
TT-System-Firmware APIs 19.15.99
Tenstorrent Firmware
|
#include <zephyr/kernel.h>#include <zephyr/logging/log.h>#include <zephyr/sys/util.h>#include <zephyr/drivers/misc/bh_fwtable.h>#include <tenstorrent/msgqueue.h>#include <tenstorrent/sys_init_defines.h>#include "vf_curve.h"#include "throttler.h"#include "aiclk_ppm.h"#include "voltage.h"#include "init.h"#include "reg.h"#include "status_reg.h"
Macros | |
| #define | DVFS_MSEC 1 |
| #define | DVFS_TICKS (CONFIG_SYS_CLOCK_TICKS_PER_SEC * DVFS_MSEC / MSEC_PER_SEC) |
| #define | DVFS_ADJUSTMENT_THRESHOLD (DVFS_TICKS * 10 / 100) /* 10% of DVFS interval */ |
| #define | DVFS_ADJUSTMENT_STEP (DVFS_TICKS * 1 / 100) /* 1% of DVFS interval */ |
Functions | |
| LOG_MODULE_REGISTER (dvfs, CONFIG_TT_APP_LOG_LEVEL) | |
| static void | atomic_max_u32 (atomic_t *target, uint32_t value) |
| void | DVFSChange (void) |
| static void | dvfs_work_handler (struct k_work *work) |
| static | K_WORK_DEFINE (dvfs_worker, dvfs_work_handler) |
| static void | dvfs_timer_handler (struct k_timer *timer) |
| static | K_TIMER_DEFINE (dvfs_timer, dvfs_timer_handler, NULL) |
| static int | InitDVFS (void) |
| SYS_INIT_APP (InitDVFS) | |
| int | StartDVFSTimer (void) |
| SYS_INIT_APP (StartDVFSTimer) | |
| void | AdjustDVFSTimer (void) |
| uint8_t | dvfs_counter_handler (const union request *request, struct response *response) |
Variables | |
| static const struct device *const | fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable)) |
| bool | dvfs_enabled |
| static atomic_t | dvfs_dropped_ticks |
| static atomic_t | dvfs_max_period_us |
| static atomic_t | dvfs_max_pass_us |
| static atomic_t *const | dvfs_counters [DVFS_COUNTER_COUNT] |
| #define DVFS_ADJUSTMENT_STEP (DVFS_TICKS * 1 / 100) /* 1% of DVFS interval */ |
| #define DVFS_ADJUSTMENT_THRESHOLD (DVFS_TICKS * 10 / 100) /* 10% of DVFS interval */ |
| #define DVFS_MSEC 1 |
| #define DVFS_TICKS (CONFIG_SYS_CLOCK_TICKS_PER_SEC * DVFS_MSEC / MSEC_PER_SEC) |
| void AdjustDVFSTimer | ( | void | ) |
|
static |
|
static |
| void DVFSChange | ( | void | ) |
|
static |
|
static |
|
static |
| LOG_MODULE_REGISTER | ( | dvfs | , |
| CONFIG_TT_APP_LOG_LEVEL | ) |
| int StartDVFSTimer | ( | void | ) |
| SYS_INIT_APP | ( | InitDVFS | ) |
| SYS_INIT_APP | ( | StartDVFSTimer | ) |
|
static |
|
static |
| bool dvfs_enabled |
|
static |
|
static |
|
static |