From 6c523a75561cb3e4ff9e65b1dd0b953c4b028a37 Mon Sep 17 00:00:00 2001 From: mrg Date: Wed, 24 Jun 2020 11:55:44 -0700 Subject: [PATCH] use add_enclosure for npc contacts --- compiler/pgates/pnand2.py | 22 +++++++++++----------- compiler/pgates/pnand3.py | 32 ++++++++++++++++---------------- compiler/pgates/pnor2.py | 24 ++++++++++++------------ 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/compiler/pgates/pnand2.py b/compiler/pgates/pnand2.py index 6a65f721..3974d95b 100644 --- a/compiler/pgates/pnand2.py +++ b/compiler/pgates/pnand2.py @@ -189,11 +189,11 @@ class pnand2(pgate.pgate): active_to_poly_contact, active_to_poly_contact2) - self.route_input_gate(self.pmos1_inst, - self.nmos1_inst, - self.inputA_yoffset, - "A", - position="center") + apin = self.route_input_gate(self.pmos1_inst, + self.nmos1_inst, + self.inputA_yoffset, + "A", + position="center") self.inputB_yoffset = self.inputA_yoffset + 2 * self.m3_pitch # # active contact metal to poly contact metal spacing @@ -206,14 +206,14 @@ class pnand2(pgate.pgate): # active_to_poly_contact2) # This will help with the wells and the input/output placement - self.route_input_gate(self.pmos2_inst, - self.nmos2_inst, - self.inputB_yoffset, - "B", - position="center") + bpin = self.route_input_gate(self.pmos2_inst, + self.nmos2_inst, + self.inputB_yoffset, + "B", + position="center") if OPTS.tech_name == "sky130": - self.enclose_npc() + self.add_enclosure([apin, bpin], "npc", drc("npc_enclose_poly")) def route_output(self): diff --git a/compiler/pgates/pnand3.py b/compiler/pgates/pnand3.py index 0c2bc081..ff988d88 100644 --- a/compiler/pgates/pnand3.py +++ b/compiler/pgates/pnand3.py @@ -227,28 +227,28 @@ class pnand3(pgate.pgate): active_to_poly_contact, active_to_poly_contact2) - self.route_input_gate(self.pmos1_inst, - self.nmos1_inst, - self.inputA_yoffset, - "A", - position="left") + apin = self.route_input_gate(self.pmos1_inst, + self.nmos1_inst, + self.inputA_yoffset, + "A", + position="left") self.inputB_yoffset = self.inputA_yoffset + self.m3_pitch - self.route_input_gate(self.pmos2_inst, - self.nmos2_inst, - self.inputB_yoffset, - "B", - position="center") + bpin = self.route_input_gate(self.pmos2_inst, + self.nmos2_inst, + self.inputB_yoffset, + "B", + position="center") self.inputC_yoffset = self.inputB_yoffset + self.m3_pitch - self.route_input_gate(self.pmos3_inst, - self.nmos3_inst, - self.inputC_yoffset, - "C", - position="right") + cpin = self.route_input_gate(self.pmos3_inst, + self.nmos3_inst, + self.inputC_yoffset, + "C", + position="right") if OPTS.tech_name == "sky130": - self.enclose_npc() + self.add_enclosure([apin, bpin, cpin], "npc", drc("npc_enclose_poly")) def route_output(self): """ Route the Z output """ diff --git a/compiler/pgates/pnor2.py b/compiler/pgates/pnor2.py index 7f75ddd1..908bba82 100644 --- a/compiler/pgates/pnor2.py +++ b/compiler/pgates/pnor2.py @@ -195,24 +195,24 @@ class pnor2(pgate.pgate): self.inputB_yoffset = bottom_pin_offset + self.m1_nonpref_pitch self.inputA_yoffset = self.inputB_yoffset + self.m1_nonpref_pitch - self.route_input_gate(self.pmos2_inst, - self.nmos2_inst, - self.inputB_yoffset, - "B", - position="right", - directions=("V", "V")) + bpin = self.route_input_gate(self.pmos2_inst, + self.nmos2_inst, + self.inputB_yoffset, + "B", + position="right", + directions=("V", "V")) # This will help with the wells and the input/output placement - self.route_input_gate(self.pmos1_inst, - self.nmos1_inst, - self.inputA_yoffset, - "A", - directions=("V", "V")) + apin = self.route_input_gate(self.pmos1_inst, + self.nmos1_inst, + self.inputA_yoffset, + "A", + directions=("V", "V")) self.output_yoffset = self.inputA_yoffset + self.m1_nonpref_pitch if OPTS.tech_name == "sky130": - self.enclose_npc() + self.add_enclosure([apin, bpin], "npc", drc("npc_enclose_poly")) def route_output(self): """ Route the Z output """