From 1a2e0046b103007cf7d40a4b757424866033cddf Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 11 Jun 2020 11:54:34 -0700 Subject: [PATCH] Add contact to gate spacing for precharge --- compiler/pgates/precharge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/pgates/precharge.py b/compiler/pgates/precharge.py index 07b4f21b..f366e5b4 100644 --- a/compiler/pgates/precharge.py +++ b/compiler/pgates/precharge.py @@ -195,7 +195,10 @@ class precharge(design.design): # adds the en contact to connect the gates to the en rail pin_offset = self.lower_pmos_inst.get_pin("G").lr() # This is an extra space down for some techs with contact to active spacing - offset = pin_offset - vector(0, self.poly_space) + contact_space = max(self.poly_space, + self.contact_to_gate) + 0.5 * contact.poly_contact.first_layer_height + print(self.contact_to_gate) + offset = pin_offset - vector(0, contact_space) self.add_via_stack_center(from_layer="poly", to_layer=self.en_layer, offset=offset)