From acf3fe83760b239bfb58d7ed51cc5c6e3c42f68e Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 31 Jan 2018 14:31:50 -0800 Subject: [PATCH] Add well around column muxes. --- compiler/hierarchy_layout.py | 20 ++++++++++++++++++++ compiler/single_level_column_mux_array.py | 2 ++ 2 files changed, 22 insertions(+) diff --git a/compiler/hierarchy_layout.py b/compiler/hierarchy_layout.py index 1c136dd9..dc923d44 100644 --- a/compiler/hierarchy_layout.py +++ b/compiler/hierarchy_layout.py @@ -496,6 +496,26 @@ class layout(lef.lef): return blockages + def add_enclosure(self, insts, layer="nwell"): + """ Add a layer that surrounds the given instances. Useful + for creating wells, for example. Doesn't check for minimum widths or + spacings.""" + + xmin=insts[0].lx() + ymin=insts[0].by() + xmax=insts[0].rx() + ymax=insts[0].uy() + for inst in insts: + xmin = min(xmin, inst.lx()) + ymin = min(ymin, inst.by()) + xmax = max(xmax, inst.rx()) + ymax = max(ymax, inst.uy()) + + self.add_rect(layer=layer, + offset=vector(xmin,ymin), + width=xmax-xmin, + height=ymax-ymin) + def pdf_write(self, pdf_name): # NOTE: Currently does not work (Needs further research) #self.pdf_name = self.name + ".pdf" diff --git a/compiler/single_level_column_mux_array.py b/compiler/single_level_column_mux_array.py index 1cadae8d..0e2c8752 100644 --- a/compiler/single_level_column_mux_array.py +++ b/compiler/single_level_column_mux_array.py @@ -40,6 +40,7 @@ class single_level_column_mux_array(design.design): self.setup_layout_constants() self.create_array() self.add_routing() + self.add_enclosure(self.mux_inst, "pwell") def add_modules(self): self.mux = single_level_column_mux(name="single_level_column_mux", @@ -60,6 +61,7 @@ class single_level_column_mux_array(design.design): # mux height plus routing signal height plus well spacing at the top self.height = self.mux.height + self.route_height + drc["pwell_to_nwell"] + def create_array(self): self.mux_inst = []