diff --git a/compiler/precharge.py b/compiler/precharge.py index 5dae0e14..d2a64678 100644 --- a/compiler/precharge.py +++ b/compiler/precharge.py @@ -128,7 +128,7 @@ class precharge(pgate.pgate): """Adds a nwell tap to connect to the vdd rail""" # adds the contact from active to metal1 well_contact_pos = self.upper_pmos1_inst.get_pin("D").center().scale(1,0) \ - + vector(0, self.upper_pmos1_pos.y + self.pmos.height + drc["well_extend_active"]) + + vector(0, self.upper_pmos1_inst.uy() + contact.well.height/2 + drc["well_extend_active"]) self.add_contact_center(layers=("active", "contact", "metal1"), offset=well_contact_pos, implant_type="n",