From 0c0729e1edeef33bd084133ceab8f1b2894bc263 Mon Sep 17 00:00:00 2001 From: Sebastian Goeldi Date: Thu, 31 Oct 2024 00:37:51 +0100 Subject: [PATCH 1/3] fix convert to static not taking all metainfo --- src/kfactory/kcell.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kfactory/kcell.py b/src/kfactory/kcell.py index 66588cb6..41954eb3 100644 --- a/src/kfactory/kcell.py +++ b/src/kfactory/kcell.py @@ -2262,12 +2262,16 @@ def convert_to_static(self, recursive: bool = True) -> None: """Convert the KCell to a static cell if it is pdk KCell.""" if self.library().name == self.kcl.name: raise ValueError(f"KCell {self.qname()} is already a static KCell.") + _lib_cell = kcls[self.library.name][self.library_cell_index()] + _lib_cell.set_meta_data() _kdb_cell = self.kcl.layout.cell( self.kcl.convert_cell_to_static(self.cell_index()) ) _kdb_cell.name = self.qname() _ci = _kdb_cell.cell_index() _old_kdb_cell = self._kdb_cell + _kdb_cell.copy_meta_info(_lib_cell._kdb_cell) + self.get_meta_data() if recursive: for ci in self.called_cells(): From 9965a0b3484d688130c663f15fd2ac2887c5625e Mon Sep 17 00:00:00 2001 From: Sebastian Goeldi Date: Thu, 31 Oct 2024 00:42:21 +0100 Subject: [PATCH 2/3] fix small error --- src/kfactory/kcell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kfactory/kcell.py b/src/kfactory/kcell.py index 41954eb3..c7b2684f 100644 --- a/src/kfactory/kcell.py +++ b/src/kfactory/kcell.py @@ -2262,7 +2262,7 @@ def convert_to_static(self, recursive: bool = True) -> None: """Convert the KCell to a static cell if it is pdk KCell.""" if self.library().name == self.kcl.name: raise ValueError(f"KCell {self.qname()} is already a static KCell.") - _lib_cell = kcls[self.library.name][self.library_cell_index()] + _lib_cell = kcls[self.library().name][self.library_cell_index()] _lib_cell.set_meta_data() _kdb_cell = self.kcl.layout.cell( self.kcl.convert_cell_to_static(self.cell_index()) From 71c4056bcee30de2ecfd8f8781b54b9f3777b214 Mon Sep 17 00:00:00 2001 From: Sebastian Goeldi Date: Thu, 31 Oct 2024 00:46:13 +0100 Subject: [PATCH 3/3] fix another function call --- src/kfactory/kcell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kfactory/kcell.py b/src/kfactory/kcell.py index c7b2684f..1821f1c9 100644 --- a/src/kfactory/kcell.py +++ b/src/kfactory/kcell.py @@ -2262,7 +2262,7 @@ def convert_to_static(self, recursive: bool = True) -> None: """Convert the KCell to a static cell if it is pdk KCell.""" if self.library().name == self.kcl.name: raise ValueError(f"KCell {self.qname()} is already a static KCell.") - _lib_cell = kcls[self.library().name][self.library_cell_index()] + _lib_cell = kcls[self.library().name()][self.library_cell_index()] _lib_cell.set_meta_data() _kdb_cell = self.kcl.layout.cell( self.kcl.convert_cell_to_static(self.cell_index())