From 7eb1e2f2d1bc711e6d548613f99accb488b27689 Mon Sep 17 00:00:00 2001 From: mrg Date: Wed, 6 Jan 2021 11:31:16 -0800 Subject: [PATCH] Keep previous pin shapes which were used in router pin connections. --- compiler/base/hierarchy_layout.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 02e67228..1ec5a2f0 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -473,11 +473,25 @@ class layout(): """ self.pin_map = {} + def copy_layout_pin_shapes(self, text): + """ + Copy the shapes of the layout pins as objects. + """ + for s in self.pin_map[text]: + self.add_rect(layer=s.layer, + offset=s.ll(), + width=s.width(), + height=s.height()) + def replace_layout_pin(self, text, pin): """ Remove the old pin and replace with a new one """ + # Keep the shapes as they were used to connect to the router pins + self.copy_layout_pin_shapes(text) + # Remove the shapes as actual pins self.remove_layout_pin(text) + # Add the new pin self.add_layout_pin(text=text, layer=pin.layer, offset=pin.ll(),