Skip to content

Commit 636cc88

Browse files
committed
throttler: get board power limit from fwtable
Make board power limit a parameter from the FWTable in SPI. This allows us to follow the product definition properly. The settings are: - p100a = 300W - p150a = 300W - p150b = 300W - p150c = 450W It is not currently defined for the other platforms, so they will get a limit of 0. Signed-off-by: Aaron Fong <[email protected]>
1 parent 4ffc972 commit 636cc88

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

boards/tenstorrent/tt_blackhole/spirom_data_tables/P100A/fw_table.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ chip_limits {
1515
bus_peak_limit: 0
1616
frequency_margin: 0
1717
gddr_thm_limit: 85
18+
board_power_limit: 300
1819
}
1920

2021
feature_enable {

boards/tenstorrent/tt_blackhole/spirom_data_tables/P150A/fw_table.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ chip_limits {
1515
bus_peak_limit: 0
1616
frequency_margin: 0
1717
gddr_thm_limit: 85
18+
board_power_limit: 300
1819
}
1920

2021
feature_enable {

boards/tenstorrent/tt_blackhole/spirom_data_tables/P150B/fw_table.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ chip_limits {
1515
bus_peak_limit: 0
1616
frequency_margin: 0
1717
gddr_thm_limit: 85
18+
board_power_limit: 300
1819
}
1920

2021
feature_enable {

boards/tenstorrent/tt_blackhole/spirom_data_tables/P150C/fw_table.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ chip_limits {
1515
bus_peak_limit: 0
1616
frequency_margin: 0
1717
gddr_thm_limit: 85
18+
board_power_limit: 450
1819
}
1920

2021
feature_enable {

lib/tenstorrent/bh_arc/spirom_protobufs/fw_table.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ message FwTable {
3333
int32 frequency_margin = 11;
3434
uint32 asic_fmin = 12;
3535
uint32 gddr_thm_limit = 13;
36+
uint32 board_power_limit = 14;
3637
}
3738

3839
message FeatureEnable {

lib/tenstorrent/bh_arc/throttler.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <zephyr/sys/util.h>
88
#include <zephyr/logging/log.h>
9+
#include <zephyr/sys/byteorder.h>
910
#include "throttler.h"
1011
#include "aiclk_ppm.h"
1112
#include "cm2dm_msg.h"
@@ -208,7 +209,10 @@ int32_t Dm2CmSetBoardPwrLimit(const uint8_t *data, uint8_t size)
208209
return -1;
209210
}
210211

211-
uint16_t pwr_limit = *(uint16_t *)data;
212+
uint32_t pwr_limit = sys_get_le16(data);
213+
214+
LOG_INF("Cable Power Limit: %u\n", pwr_limit);
215+
pwr_limit = MIN(pwr_limit, get_fw_table()->chip_limits.board_power_limit);
212216

213217
SetThrottlerLimit(kThrottlerBoardPwr, pwr_limit);
214218
UpdateTelemetryBoardPwrLimit(pwr_limit);

0 commit comments

Comments
 (0)