From a6f5e59e186984a936e3e82c4d2dab66b22817d5 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Mon, 23 Dec 2019 21:49:47 +0000 Subject: [PATCH] Remove unused layers and simplify layer check to work without it. --- compiler/pgates/pgate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/pgates/pgate.py b/compiler/pgates/pgate.py index 9cb73542..7e1fc87f 100644 --- a/compiler/pgates/pgate.py +++ b/compiler/pgates/pgate.py @@ -130,12 +130,12 @@ class pgate(design.design): max_y_offset = self.height + 0.5 * self.m1_width self.nwell_position = middle_position nwell_height = max_y_offset - middle_position.y - if layer["nwell"]: + if "nwell" in layer: self.add_rect(layer="nwell", offset=middle_position, width=self.well_width, height=nwell_height) - if layer["vtg"]: + if "vtg" in layer: self.add_rect(layer="vtg", offset=self.nwell_position, width=self.well_width, @@ -143,12 +143,12 @@ class pgate(design.design): pwell_position = vector(0, -0.5 * self.m1_width) pwell_height = middle_position.y - pwell_position.y - if layer["pwell"]: + if "pwell" in layer: self.add_rect(layer="pwell", offset=pwell_position, width=self.well_width, height=pwell_height) - if layer["vtg"]: + if "vtg" in layer: self.add_rect(layer="vtg", offset=pwell_position, width=self.well_width,