|
TT Zephyr Platforms 19.5.0-rc1
Tenstorrent Firmware
|
#include <zephyr/sys/util.h>#include <zephyr/logging/log.h>#include <zephyr/sys/byteorder.h>#include <zephyr/zbus/zbus.h>#include "throttler.h"#include "aiclk_ppm.h"#include "cm2dm_msg.h"#include <zephyr/drivers/misc/bh_fwtable.h>#include "telemetry_internal.h"#include "telemetry.h"#include "noc2axi.h"#include "tensix_state_msg.h"Data Structures | |
| struct | ThrottlerLimitRange |
| struct | ThrottlerParams |
| struct | Throttler |
Macros | |
| #define | kThrottlerAiclkScaleFactor 500.0F |
| #define | DEFAULT_BOARD_POWER_LIMIT 150 |
| #define | ADVANCE_CIRCULAR_POINTER(pointer, array) |
Enumerations | |
| enum | ThrottlerId { kThrottlerTDP , kThrottlerFastTDC , kThrottlerTDC , kThrottlerThm , kThrottlerBoardPower , kThrottlerGDDRThm , kThrottlerDopplerSlow , kThrottlerCount } |
Functions | |
| LOG_MODULE_REGISTER (throttler) | |
| static void | SetThrottlerLimit (ThrottlerId id, float limit) |
| static void | BroadcastKernelThrottleState (void) |
| static void | InitKernelThrottling (void) |
| static void | SendKernelThrottlingMessage (bool throttle) |
| static void | doppler_tensix_state_callback (const struct zbus_channel *chan) |
| ZBUS_LISTENER_DEFINE (doppler_tensix_state_listener, doppler_tensix_state_callback) | |
| ZBUS_CHAN_ADD_OBS (tensix_state_chan, doppler_tensix_state_listener, 0) | |
| void | InitThrottlers (void) |
| static void | UpdateThrottler (ThrottlerId id, float value) |
| static void | UpdateThrottlerArb (ThrottlerId id) |
| static uint16_t | UpdateMovingAveragePower (uint16_t current_power) |
| static bool | DopplerActive (void) |
| static void | UpdateDoppler (const TelemetryInternalData *telemetry) |
| void | CalculateThrottlers (void) |
| int32_t | Dm2CmSetBoardPowerLimit (const uint8_t *data, uint8_t size) |
Variables | |
| static uint32_t | power_limit |
| static bool | doppler |
| static bool | doppler_slow |
| static bool | doppler_t2 |
| static bool | doppler_t3 |
| static const bool | thermal_throttling = true |
| static const struct device *const | fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable)) |
| static const ThrottlerLimitRange | throttler_limit_ranges [kThrottlerCount] |
| static Throttler | throttler [kThrottlerCount] |
| static uint32_t | throttle_counter |
| static const uint32_t | kKernelThrottleAddress = 0x10 |
| static bool | tensixes_enabled = true |
| static uint16_t | board_power_history [1000] |
| static uint16_t * | board_power_history_cursor = board_power_history |
| static uint32_t | board_power_sum |
| static bool | kernel_nops_enabled |
| static uint8_t | t2_count |
| static uint8_t | t3_count |
| #define ADVANCE_CIRCULAR_POINTER | ( | pointer, | |
| array ) |
| #define DEFAULT_BOARD_POWER_LIMIT 150 |
| #define kThrottlerAiclkScaleFactor 500.0F |
| enum ThrottlerId |
|
static |
| void CalculateThrottlers | ( | void | ) |
|
static |
|
static |
|
static |
| void InitThrottlers | ( | void | ) |
| LOG_MODULE_REGISTER | ( | throttler | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
| ZBUS_CHAN_ADD_OBS | ( | tensix_state_chan | , |
| doppler_tensix_state_listener | , | ||
| 0 | ) |
| ZBUS_LISTENER_DEFINE | ( | doppler_tensix_state_listener | , |
| doppler_tensix_state_callback | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |