芯片设计交流论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 306|回复: 0

[转贴] Use Calibredrv delete cell name prefix or suffix

[复制链接]

27

主题

1

回帖

91

积分

注册会员

积分
91
发表于 2024-5-9 17:18:04 | 显示全部楼层 |阅读模式
  1. set ingds ./xxx.gds
  2. set outgds ./yyy.gds

  3. ### open source gds
  4. set L [layout create $ingds -dt_expand -preservePaths -preserveTextAttributes]

  5. ### get all cells
  6. set allCell [$L cells]

  7. ### travel each cell
  8. foreach c $allCell {
  9.         ### match the cell have suffix
  10.         if [string match *_suffix $c] {
  11.                 ### set new cell name as no suffix
  12.                 set newc [string map {“_suffix” “”} $c]
  13.                 ### if new cell exists
  14.                 if [$L exists cell $newc] {
  15.                         puts “$newc exist!!!!!!!!!!!!!!”
  16.                 } else {
  17.                         ### change the cell name to new
  18.                         $L cellname $c $newc
  19.                 }
  20.         }
  21. }
  22. $L gdsout $outgds
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|芯片设计交流论坛

GMT+8, 2024-7-27 17:01 , Processed in 0.039437 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表