Skip to content

Commit

Permalink
fix convert to static not taking all metainfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-goeldi committed Oct 30, 2024
1 parent 7c572d7 commit 0c0729e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kfactory/kcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 0c0729e

Please sign in to comment.