|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
1,首先要有stdcell的gds,现在好多都是独立的,不在一个topcellname中
2,找到lef文件,用python处理macro,把要放置的cellname先取出来:macro.list。检查下内容,多的删除
import re
import os
import time
fp = open ("stdcell.lef","r")
fpout = open ("macro.list","w")
aline = fp.readline()
pfind = 0
while (aline !="" ):
if "MACRO" in aline:
pfind = 0
macro_line = aline.strip().split()
macroname =macro_line[1]
print (macroname)
fpout.write (macroname + "\n")
#print(macroname,file=fpout,end="")
aline = fp.readline()
fpout.close()
fp.close()
3 . 查看目标要写成的target_il.il 的格式,把要变化的内容,用脚本答应出来,先看目标格式中的变化内容 ,标红;头尾为加粗紫色
let((cv)
cv = dbOpenCellViewByType("libname" "topcell " "layout" "maskLayout" "a")
cv_co0 = dbOpenCellViewByType("libname" "cellname0" "layout")
dbCreateInst(cv cv_co0 "std0" list(0.130 -0.570) "R0")
cv_co1 = dbOpenCellViewByType("libname" "cellname1" "layout")
dbCreateInst(cv cv_co1 "std1" list(0.130 -0.570) "R0")
。。。#注释行,这里cv_co0/1+。。。:n和cellname0/1+。。。n 就是在同一个lib和topcell要变化的内容
dbSave(cv)
);let
4. python处理 cv_co0和cellname0的内容
import re
import os
import time
fpin = open ("macro.list","r")
fpout =open ("macro_al.il","w")
aline = fpin.readlines()
linenum = 0
for line in aline:
str1 = 'cv_co' + str(linenum)+' = dbOpenCellViewByType("topname" "' + str(line.strip()) + '" "layout")'
#str2 = 'dbCreateInst(cv cv_co' + str(linenum) + ' "std1" list(0.130 -0.570) "R0")'
str2 = 'dbCreateInst(cv cv_co' + str(linenum) + ' "std' + str(linenum) + '" list(0.130 -0.570) "R0")'
print (str1)
print (str2)
fpout.write (str1 + "\n" + str2 + "\n")
linenum = linenum + 1
#pfind = 0
#while (aline !="" ):
# if "MACRO" in aline:
# pfind = 0
# macro_line = aline.strip().split()
# macroname =macro_line[1]
# print (macroname,file=fpout)
#
# aline = fp.readline()
fpout.close()
fpin.close()
5 加上 target的头尾行。然后再ciw中导入这个加头尾行的macro_al.il
6 用virtuoso align加间距横向排列。
这个是半自动加手动,脚本不太熟。但能已经方便很多了
|
|