分类
calibredrv EDA

Use Calibredrv delete cell name prefix or suffix

set ingds ./xxx.gds
set outgds ./yyy.gds

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

### get all cells
set allCell [$L cells]

### travel each cell
foreach c $allCell {
	### match the cell have suffix
	if [string match *_suffix $c] {
		### set new cell name as no suffix
		set newc [string map {“_suffix” “”} $c]
		### if new cell exists
		if [$L exists cell $newc] {
			puts “$newc exist!!!!!!!!!!!!!!”
		} else {
			### change the cell name to new
			$L cellname $c $newc
		}
	}
}
$L gdsout $outgds

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注