calibredrv merge GDS file

calibredrv对GDS的操作真的很丰富,比如之前的 利用calibredrv flatten GDS: https://www.chiplayout.net/2462-2.html。 那这次给大家分享一下怎么利用calibredrv合并GDS。

先看贴一下calibredrv合并GDS需要的命令

layout filemerge -in input_file1 [layer_bump1]
[-in input_file2 [layer_bump2] …]
[-infile {
-name filename
[-layerbump layer_bump]
[[-exclude_layer {layer1 …}] |
[-include_layer {layer1 …}]]
} ] …
[-indir directory]
-out output_file
[-mode mode]
[-cblockmode [auto | 0 | 1]]
[-smartdiff [-ignoretext] [-ignoreproperty] [-convertpathtopoly]]
[-noemptycells 0 | 1]
[-createcache 0 | 1]
[-exclude_layer {layer1 …}] |
[-include_layer {layer1 …}]
[-createtop cellname]
[-topcell topcellname]
[-map_cell cellname mapcellname]
[-preserve filterfile]
[-tmp tmpdir]
[-verbose]

看起来很多option,其实通常用到-in和-out就够用了

比如我们要将 file1.gds和file2.gds merge在一起产生新的out.gds

calibredrv -a layout filemerge -in file1.gds -in file2.gds -out out.gds

但我们要避免 file1和file2 top cell 名字一样造成覆盖的情况,还需加上 -rename

calibredrv -a layout filemerge -in file1.gds -in file2.gds -rename -out out.gds

实际情况我们还需要加个 -createtop, 没有这个选项,被merge的两个gds的top的平级的,有了这个选项,两个gds文件中的top cell都将做为指定top的子cell

calibredrv -a layout filemerge -in file1.gds -in file2.gds -in file3.gds -rename -createtop new_top -out out.gds

如果需要merge更多的gds file, 增加-in就可以了

calibredrv -a layout filemerge -in file1.gds -in file2.gds -in file3.gds -rename -createtop new_top -out out.gds

《calibredrv merge GDS file》有10条评论

  1. 有两个gds(带IO的A.gds和dum.gds)做Layout Merge,能否使合并后的gds仍然保持A.gds的名称呢?
    能否指定合并的gds的坐标呢?

    回复
    • 可以的
      先打开来A的gds
      set L [layout create A.gds xxxxxx]
      import B的GDS
      $L import B.gds xxxxx
      $L create ref A的topcell B的topcell x y 0 0 1
      $L gdsout new.gds

      但如果是给每个io加入对应的dummy就要用到循环了
      但如果每个io dummy的的名字和每个io的对应名字一样,直接打开drv,import选 append模式,完了保存就行
      所以,要看具体情况的

      回复
  2. 请问楼主,我只有几个top的gds,现需要merge这几个top gds在一个新的TOP里面,merge的时候能不能指定-in gds的坐标,输出的gds打开就能看到不同名字的gds在对应的位置?谢谢

    回复

回复 Bob 取消回复