Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Fix RP2040 reference wrt setting footprint requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
NoR8quoh1r committed Nov 13, 2024
1 parent 609a57c commit 90891c0
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/faebryk/library/RP2040_ReferenceDesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,30 @@ def __preinit__(self):
)

# Power rails
range_100nF = L.Range.from_center_rel(100 * P.nF, 0.05)
caps_100nF = []
multi_cap = F.MultiCapacitor(6)
self.rp2040.power_io.decoupled.decouple().specialize(
F.MultiCapacitor(6)
).set_equal_capacitance_each(L.Range.from_center_rel(100 * P.nF, 0.05))
multi_cap
).set_equal_capacitance_each(range_100nF)
caps_100nF.extend(multi_cap.capacitors)
self.rp2040.core_regulator.power_in.decoupled.decouple().capacitance.constrain_subset(
L.Range.from_center_rel(1 * P.uF, 0.05)
)
self.rp2040.power_adc.decoupled.decouple().capacitance.constrain_subset(
L.Range.from_center_rel(100 * P.nF, 0.05)
)
self.rp2040.power_usb_phy.decoupled.decouple().capacitance.constrain_subset(
L.Range.from_center_rel(100 * P.nF, 0.05)
)
cap = self.rp2040.power_adc.decoupled.decouple()
cap.capacitance.constrain_subset(range_100nF)
caps_100nF.append(cap)
cap = self.rp2040.power_usb_phy.decoupled.decouple()
cap.capacitance.constrain_subset(range_100nF)
caps_100nF.append(cap)
power_3v3.decoupled.decouple().capacitance.constrain_subset(
L.Range.from_center_rel(10 * P.uF, 0.05)
)
multi_cap = F.MultiCapacitor(2)
self.rp2040.power_core.decoupled.decouple().specialize(
F.MultiCapacitor(2)
).set_equal_capacitance_each(L.Range.from_center_rel(100 * P.nF, 0.05))
multi_cap
).set_equal_capacitance_each(range_100nF)
caps_100nF.extend(multi_cap.capacitors)
self.rp2040.core_regulator.power_out.decoupled.decouple().capacitance.constrain_subset(
L.Range.from_center_rel(1 * P.uF, 0.05)
)
Expand Down Expand Up @@ -172,10 +178,8 @@ def __preinit__(self):
LayoutHeuristicElectricalClosenessDecouplingCaps.add_to_all_suitable_modules( # noqa: E501
self
)
# TODO
# for c in caps:
# if 100 * P.nF in c.capacitance:
# c.add(F.has_footprint_requirement_defined([("0201", 2)]))
for c in caps_100nF:
c.add(F.has_footprint_requirement_defined([("0201", 2)]))

LayoutHeuristicElectricalClosenessPullResistors.add_to_all_suitable_modules(
self
Expand Down

0 comments on commit 90891c0

Please sign in to comment.