怎么flatten一个GDS所有层次[更正]

EDA
0 字 / 约 0 分钟
2015/11/18
sh
# 怎么flatten一个GDS所有层次[更正]
# topcell -> a -> b -> c -> d  
# topcell -> b -> c -> d  
# topcell -> c -> d # After:  
# topcell

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

sh
    
    set lay [layout create "abcd.gds" -dt_expand \
    -preservePaths -preserveTextAttributes]
    set topcell [$lay topcell]
    $lay flatten cell $topcell
    $lay gdsout out.gds

最近用到发现上面的不能flatten reference, 更新如下

sh
    # Before:
    # topcell -> a -> b -> c -> d
    # topcell -> b -> c -> d
    # topcell -> c -> d
    set L [layout create "abcd.gds" -dt_expand \
    -preservePaths -preserveTextAttributes]
    layout copy $L newL
    newL gdsout abcd_flatten.gds
    # After:
    # topcell