1
2
3
4
5
6
7
\# Before:
\# topcell -> a -> b -> c -> d
\# topcell -> b -> c -> d
\# topcell -> c -> d

\# After:
\# topcell

下面的code保存为flatten.txt. 执行calibredrv flatten.txt

1
2
3
4
5
set lay [layout create "abcd.gds" -dt_expand \
-preservePaths -preserveTextAttributes]
set topcell [$lay topcell]
$lay flatten cell $topcell
$lay gdsout out.gds