Made another change to the netlist-to-layout procedure so that it

better supports re-entrant use, especially for the use case where
the import was abandoned before saving, or the generated cells
were not saved (which is easy to do, because the top level cell
is always written out to disk, but the rest of the cells will only
be written when "writeall" is executed).  The new code detects
input cells that did not have any layout file (has flag "not-found"
after loading) and deletes them and their instances so that they
can be regenerated from scratch.
This commit is contained in:
Tim Edwards 2023-10-06 19:38:53 -04:00
parent 9e7c104d29
commit eda5f506f3
1 changed files with 20 additions and 1 deletions

View File

@ -172,8 +172,27 @@ proc magic::create_new_pin {pinname portnum {layer m1}} {
proc magic::generate_layout_add {subname subpins complist library} {
global PDKNAMESPACE
# Create a new subcircuit
# Create a new subcircuit.
load $subname -quiet
# In the case where subcells of circuit "subname" do not exist,
# delete the placeholders so that they can be regenerated.
set children [cellname list children $subname]
foreach child $children {
set flags [cellname flags $child]
foreach flag $flags {
if {$flag == "not-found"} {
set insts [cellname list instances $child]
foreach inst $insts {
select cell $inst
delete
}
cellname delete $child
}
}
}
box 0 0 0 0
# Generate pins