Skip to content
11 changes: 7 additions & 4 deletions backend/api/peripherals.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,19 @@
elif peripheral_type == PeripheralType.FPGA_COMPLEX:
return FpgaComplexSchema
else:
return PeripheralSchema
return DefaultPeripheralSchema

Check warning on line 121 in backend/api/peripherals.py

View check run for this annotation

Codecov / codecov/patch

backend/api/peripherals.py#L121

Added line #L121 was not covered by tests

@classmethod
def create_schema(cls, peripheral_type):
schema_ctor = cls.get_schema(peripheral_type)
return schema_ctor()

class DummyOutputSchema(Schema):
pass

class DefaultPeripheralSchema(PeripheralSchema):
output = fields.Nested(DummyOutputSchema, data_key="consumption")

class SpiSchema(PeripheralSchema):
enable = fields.Bool()
usage = fields.Enum(Peripherals_Usage, by_value=True)
Expand Down Expand Up @@ -190,9 +196,6 @@
width = fields.Int()
output = fields.Nested(MemoryOutputSchema, data_key="consumption")

class DummyOutputSchema(Schema):
pass

class ChannelOutputSchema(Schema):
calculated_bandwidth = fields.Number()
noc_power = fields.Number()
Expand Down
12 changes: 12 additions & 0 deletions backend/etc/devices/mpw1/clocking.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@
{ "name": "CLK_INT_CAP", "value": 0.00000003 },
{ "name": "PLL_INT" , "value": 0.0009 },
{ "name": "PLL_AUX" , "value": 0.01 }
],
"static_power": [
{
"rail_type": "Vcc_aux",
"domain": "SOC",
"scenarios": [
{ "type": "worse", "coeffs": [0.00000001, -0.0000003, 0.00004, 0.0332], "factor": 0.555555555555556 },
{ "type": "worse", "coeffs": [0.000000002, 0.0000004, 0.00002, 0.0133], "factor": 0.555555555555556 },
{ "type": "typical", "coeffs": [0.000000003, 0.0000002, 0.00004, 0.0224], "factor": 0.555555555555556 },
{ "type": "typical", "coeffs": [0.0000000004, 0.0000001, 0.000005, 0.0033], "factor": 0.555555555555556 }
]
}
]
}
53 changes: 53 additions & 0 deletions backend/etc/devices/mpw1/gearbox_hp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"type": "gearbox_hp",
"static_power": [
{
"rail_type": "Vcc_core (Gearbox HP)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.00000000003, -0.0000000006, 0.000000001, 0.000006, 0.0002], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.00000000002, -0.000000001, 0.00000001, 0.000004, 0.00005], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_core (HP I/O)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.0001], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.00005], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_hv_aux",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.0000000008, 0.0000002, 0.00001, 0.007], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.000000001, 0.0000002, 0.00021, 0.0003], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_hp_io (1.2V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
},
{
"rail_type": "Vcc_hp_io (1.5V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
},
{
"rail_type": "Vcc_hp_io (1.8V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
}
]
}
53 changes: 53 additions & 0 deletions backend/etc/devices/mpw1/gearbox_hr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"type": "gearbox_hr",
"static_power": [
{
"rail_type": "Vcc_core (Gearbox HR)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.00000000003, -0.0000000007, 0.000000001, 0.000007, 0.0002], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.00000000003, -0.0000000008, 0.000000001, 0.000008, 0.0002], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_core (HR I/O)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.00005], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.00001], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_hr_aux",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.0000000008, 0.0000002, 0.00001, 0.007], "factor": 1.0 },
{ "type": "typical", "coeffs": [0.000000001, 0.0000002, 0.00021, 0.0003], "factor": 1.0 }
]
},
{
"rail_type": "Vcc_hr_io (1.8V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.00001], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
},
{
"rail_type": "Vcc_hr_io (2.5V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
},
{
"rail_type": "Vcc_hr_io (3.3V)",
"domain": "Core",
"scenarios": [
{ "type": "worse", "coeffs": [0.000000000001, -0.00000000003, 0.00000000006, 0.0000003, 0.000009], "factor": 1.25 },
{ "type": "typical", "coeffs": [0.000000000001, -0.00000000006, 0.0000000005, 0.0000002, 0.000003], "factor": 1.25 }
]
}
]
}
2 changes: 2 additions & 0 deletions backend/etc/devices/mpw1/power_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
{ "$ref": "noc.json" },
{ "$ref": "puffcc.json" },
{ "$ref": "rc_osc.json" },
{ "$ref": "gearbox_hp.json" },
{ "$ref": "gearbox_hr.json" },
{ "$ref": "regulator.json" }
]
}
Loading
Loading