Move to incremental approach to improve memory usage on large layouts

This commit is contained in:
jan 2022-04-04 23:05:13 -07:00
commit 8ff8a47784
4 changed files with 177 additions and 105 deletions

View file

@ -10,11 +10,11 @@ import snarled
import snarled.interfaces.masque
connectivity = {
connectivity = [
((1, 0), (1, 2), (2, 0)), #M1 to M2 (via V12)
((1, 0), (1, 3), (3, 0)), #M1 to M3 (via V13)
((2, 0), (2, 3), (3, 0)), #M2 to M3 (via V23)
}
]
#cells, props = gdsii.readfile('connectivity.gds')
@ -22,7 +22,7 @@ cells, props = oasis.readfile('connectivity.oas')
topcell = cells['top']
polys, labels = snarled.interfaces.masque.read_cell(topcell, connectivity)
nets_info = snarled.trace_connectivity(polys, labels, connectivity)
nets_info = snarled.trace_connectivity_preloaded(polys, labels, connectivity)
print('\nFinal nets:')
print([kk for kk in sorted(nets_info.nets.keys()) if isinstance(kk.name, str)])