@@ -168,7 +168,7 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
168168 float * afr_leak )
169169{
170170 float s_sram , k_sram , s_core , k_core , s_cs , k_cs ;
171- float dk_core , dk_sram , dk_cs ;
171+ float dk_core , dk_sram = 0 , dk_cs ;
172172 float imax = 1000 ;
173173
174174 u32 nclusters = 0 ;
@@ -198,8 +198,8 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
198198 // Since it's obviously wrong, let's just use only the first component
199199 s_core = 1.48461742 ;
200200 k_core = 0.39013552 ;
201- dk_core = 8.558 ;
202- dk_sram = 0.05 ;
201+ dk_core = 1.06975 ;
202+ dk_sram = 0.00625 ;
203203
204204 ncores = 8 ;
205205 adjust_leakages = true;
@@ -216,36 +216,50 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
216216 // Since it's obviously wrong, let's just use only the first component
217217 s_core = 1.21356187 ;
218218 k_core = 0.43328839 ;
219- dk_core = 9.83196 ;
220- dk_sram = 0.07828 ;
219+ dk_core = 0.983196 ;
220+ dk_sram = 0.007828 ;
221221
222222 simple_exps = true;
223223 ncores = 10 ;
224224 adjust_leakages = false; // pre-adjusted?
225225 imax = 24.0 ;
226226 break ;
227227 case T6021 :
228- nclusters += 2 ;
229- case T6020 :
230- nclusters += 2 ;
231- load_fuses (core_leak + 0 , min (4 , nclusters ), 0x29e2cc1f8 , 4 , 13 , 2 , 2 , false);
232- load_fuses (sram_leak + 0 , min (4 , nclusters ), 0x29e2cc208 , 19 , 9 , 1 , 1 , false);
233- load_fuses (cs_leak + 0 , 1 , 0x29e2cc204 , 8 , 12 , 1 , 1 , false);
234- load_fuses (afr_leak + 0 , 1 , 0x29e2cc210 , 0 , 12 , 1 , 1 , false);
235-
228+ nclusters += 4 ;
236229 s_sram = 5.80760758 ;
237230 k_sram = 0.00707453862 ;
238231 // macOS difference: macOS uses a misbehaved piecewise function here
239232 // Since it's obviously wrong, let's just use only the first component
240- s_core = 1.25194765 ;
241- k_core = 0.559222951 ;
242- dk_core = 9.50675529 ;
243- dk_sram = 0.0753 ;
233+ s_core = 1.24554153 ;
234+ k_core = 0.56203084 ;
244235
245236 s_cs = 1.8593429 ;
246237 k_cs = 0.1629485 ;
247238 dk_cs = 4.49158089 ;
248239
240+ goto t602x ;
241+
242+ case T6020 :
243+ nclusters = 2 ;
244+ s_sram = 5.02191218 ;
245+ k_sram = 0.0145621013 ;
246+ // macOS difference: macOS uses a misbehaved piecewise function here
247+ // Since it's obviously wrong, let's just use only the first component
248+ s_core = 1.21006932 ;
249+ k_core = 0.52776378 ;
250+
251+ s_cs = 1.81949284 ;
252+ k_cs = 0.1565765 ;
253+ dk_cs = 1.88830323 ;
254+
255+ t602x :
256+ dk_core = 1.0007 ;
257+ dk_sram = 0.007955 ;
258+ load_fuses (core_leak + 0 , min (4 , nclusters ), 0x29e2cc1f8 , 4 , 13 , 2 , 2 , false);
259+ load_fuses (sram_leak + 0 , min (4 , nclusters ), 0x29e2cc208 , 19 , 9 , 1 , 1 , false);
260+ load_fuses (cs_leak + 0 , 1 , 0x29e2cc204 , 8 , 12 , 1 , 1 , false);
261+ load_fuses (afr_leak + 0 , 1 , 0x29e2cc210 , 0 , 12 , 1 , 1 , false);
262+
249263 simple_exps = true;
250264 ncores = 10 ;
251265 adjust_leakages = false; // pre-adjusted?
@@ -298,15 +312,15 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
298312 sram_v_p = sbase * sbase ; // v ^ 2
299313 else
300314 sram_v_p = sbase * sbase * sbase ; // v ^ 3
301- mw += dk_sram * (sram [idx ].freq / 1000000.f ) * sram_v_p ;
315+ mw += dk_sram * core_count [ j ] * (sram [idx ].freq / 1000000.f ) * sram_v_p ;
302316
303317 float cbase = core [idx ].volt / 750.f ;
304318 float core_v_p ;
305319 if (simple_exps || core [idx ].volt < 750 )
306320 core_v_p = cbase * cbase ; // v ^ 2
307321 else
308322 core_v_p = cbase * cbase * cbase ; // v ^ 3
309- mw += dk_core * (core [idx ].freq / 1000000.f ) * core_v_p ;
323+ mw += dk_core * core_count [ j ] * (core [idx ].freq / 1000000.f ) * core_v_p ;
310324
311325 if (mw > imax * core [idx ].volt )
312326 mw = imax * core [idx ].volt ;
0 commit comments