Skip to content

Commit 2ce7972

Browse files
authored
Refactor static power calculation and combine static power data into component files - Part 2 (#248)
* refactor Vcc_aux rail static power and combine to clocking module * refactor gearbox hp static power calculation * correct gearbox hp static power calculation * refactor gearbox hr static power calculation * refactor Vcc core HP & HR I/O power rail static power calculation * refactor Vcc_hv_aux & Vcc_hr_aux power rail static power calculation * refactor Vcc_hr_io (1.8V/2.5V/3.3V) & Vcc_hp_io (1.2V/1.5V/1.8V) power rail static power calculation * fix project save failure
1 parent 1baa9bc commit 2ce7972

File tree

11 files changed

+255
-951
lines changed

11 files changed

+255
-951
lines changed

backend/api/peripherals.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,19 @@ def get_schema(cls, peripheral_type) -> Type:
118118
elif peripheral_type == PeripheralType.FPGA_COMPLEX:
119119
return FpgaComplexSchema
120120
else:
121-
return PeripheralSchema
121+
return DefaultPeripheralSchema
122122

123123
@classmethod
124124
def create_schema(cls, peripheral_type):
125125
schema_ctor = cls.get_schema(peripheral_type)
126126
return schema_ctor()
127127

128+
class DummyOutputSchema(Schema):
129+
pass
130+
131+
class DefaultPeripheralSchema(PeripheralSchema):
132+
output = fields.Nested(DummyOutputSchema, data_key="consumption")
133+
128134
class SpiSchema(PeripheralSchema):
129135
enable = fields.Bool()
130136
usage = fields.Enum(Peripherals_Usage, by_value=True)
@@ -190,9 +196,6 @@ class MemorySchema(PeripheralSchema):
190196
width = fields.Int()
191197
output = fields.Nested(MemoryOutputSchema, data_key="consumption")
192198

193-
class DummyOutputSchema(Schema):
194-
pass
195-
196199
class ChannelOutputSchema(Schema):
197200
calculated_bandwidth = fields.Number()
198201
noc_power = fields.Number()

backend/etc/devices/mpw1/clocking.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,17 @@
55
{ "name": "CLK_INT_CAP", "value": 0.00000003 },
66
{ "name": "PLL_INT" , "value": 0.0009 },
77
{ "name": "PLL_AUX" , "value": 0.01 }
8+
],
9+
"static_power": [
10+
{
11+
"rail_type": "Vcc_aux",
12+
"domain": "SOC",
13+
"scenarios": [
14+
{ "type": "worse", "coeffs": [0.00000001, -0.0000003, 0.00004, 0.0332], "factor": 0.555555555555556 },
15+
{ "type": "worse", "coeffs": [0.000000002, 0.0000004, 0.00002, 0.0133], "factor": 0.555555555555556 },
16+
{ "type": "typical", "coeffs": [0.000000003, 0.0000002, 0.00004, 0.0224], "factor": 0.555555555555556 },
17+
{ "type": "typical", "coeffs": [0.0000000004, 0.0000001, 0.000005, 0.0033], "factor": 0.555555555555556 }
18+
]
19+
}
820
]
921
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"type": "gearbox_hp",
3+
"static_power": [
4+
{
5+
"rail_type": "Vcc_core (Gearbox HP)",
6+
"domain": "Core",
7+
"scenarios": [
8+
{ "type": "worse", "coeffs": [0.00000000003, -0.0000000006, 0.000000001, 0.000006, 0.0002], "factor": 1.0 },
9+
{ "type": "typical", "coeffs": [0.00000000002, -0.000000001, 0.00000001, 0.000004, 0.00005], "factor": 1.0 }
10+
]
11+
},
12+
{
13+
"rail_type": "Vcc_core (HP I/O)",
14+
"domain": "Core",
15+
"scenarios": [
16+
{ "type": "worse", "coeffs": [0.0001], "factor": 1.0 },
17+
{ "type": "typical", "coeffs": [0.00005], "factor": 1.0 }
18+
]
19+
},
20+
{
21+
"rail_type": "Vcc_hv_aux",
22+
"domain": "Core",
23+
"scenarios": [
24+
{ "type": "worse", "coeffs": [0.0000000008, 0.0000002, 0.00001, 0.007], "factor": 1.0 },
25+
{ "type": "typical", "coeffs": [0.000000001, 0.0000002, 0.00021, 0.0003], "factor": 1.0 }
26+
]
27+
},
28+
{
29+
"rail_type": "Vcc_hp_io (1.2V)",
30+
"domain": "Core",
31+
"scenarios": [
32+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
33+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
34+
]
35+
},
36+
{
37+
"rail_type": "Vcc_hp_io (1.5V)",
38+
"domain": "Core",
39+
"scenarios": [
40+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
41+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
42+
]
43+
},
44+
{
45+
"rail_type": "Vcc_hp_io (1.8V)",
46+
"domain": "Core",
47+
"scenarios": [
48+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
49+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
50+
]
51+
}
52+
]
53+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"type": "gearbox_hr",
3+
"static_power": [
4+
{
5+
"rail_type": "Vcc_core (Gearbox HR)",
6+
"domain": "Core",
7+
"scenarios": [
8+
{ "type": "worse", "coeffs": [0.00000000003, -0.0000000007, 0.000000001, 0.000007, 0.0002], "factor": 1.0 },
9+
{ "type": "typical", "coeffs": [0.00000000003, -0.0000000008, 0.000000001, 0.000008, 0.0002], "factor": 1.0 }
10+
]
11+
},
12+
{
13+
"rail_type": "Vcc_core (HR I/O)",
14+
"domain": "Core",
15+
"scenarios": [
16+
{ "type": "worse", "coeffs": [0.00005], "factor": 1.0 },
17+
{ "type": "typical", "coeffs": [0.00001], "factor": 1.0 }
18+
]
19+
},
20+
{
21+
"rail_type": "Vcc_hr_aux",
22+
"domain": "Core",
23+
"scenarios": [
24+
{ "type": "worse", "coeffs": [0.0000000008, 0.0000002, 0.00001, 0.007], "factor": 1.0 },
25+
{ "type": "typical", "coeffs": [0.000000001, 0.0000002, 0.00021, 0.0003], "factor": 1.0 }
26+
]
27+
},
28+
{
29+
"rail_type": "Vcc_hr_io (1.8V)",
30+
"domain": "Core",
31+
"scenarios": [
32+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.00001], "factor": 1.25 },
33+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
34+
]
35+
},
36+
{
37+
"rail_type": "Vcc_hr_io (2.5V)",
38+
"domain": "Core",
39+
"scenarios": [
40+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
41+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
42+
]
43+
},
44+
{
45+
"rail_type": "Vcc_hr_io (3.3V)",
46+
"domain": "Core",
47+
"scenarios": [
48+
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
49+
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
50+
]
51+
}
52+
]
53+
}

backend/etc/devices/mpw1/power_data.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
{ "$ref": "noc.json" },
2121
{ "$ref": "puffcc.json" },
2222
{ "$ref": "rc_osc.json" },
23+
{ "$ref": "gearbox_hp.json" },
24+
{ "$ref": "gearbox_hr.json" },
2325
{ "$ref": "regulator.json" }
2426
]
2527
}

0 commit comments

Comments
 (0)