|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 wts13588035346 于 2024-12-9 11:15 编辑
这个脚本是根据网上的python脚本icc2enc来修改的,如果修时序的flow为pt write_changes -f icctcl -o timing.tcl,再将该脚本吃进innovus做时序的eco,则可以直接用这个python脚本把timing.tcl转为timing_enc.tcl 脚本如下:
import re
infile = open("timing.tcl", "r")
outfile = open("timing_enc.tcl", "w")
inst_name = ''
for line in infile:
if 'current_instance' in line:
insp_sp = re.split(r'\s+|{|}|', line)
print(inst_sp)
if len(inst_sp)==5:
inst_name=inst_sp[2]+"/"
hinstGuide_name=inst_sp[2]
else:
inst_name=""
hinstGuide_name="\"\""
elif 'insert_buffer' in line:
insert_sp = re.split(r'\s+|\[|{|}\]|-', line)
pin_name=insert_sp[4]
new_cell_name=insert_sp[16]
new_net_name=insert_sp[11]
insert_buff=insert_sp[7]
inset_line="ecoAddRepeater -cell " + insert_buff + " -term " + inst_name + pin_name + " -name " + new_cell_name + " -new_net_name " + new_net_name + " -hinstGuide " + hinstGuide_name + "\n"
outfile.write(insert_line)
elif 'size_cell' in line:
insert_sp = re.split(r'\s+|{|}', line)
cell_name = insert_sp[2]
new_cell_name = insert_sp[5]
insert_lne="ecoChangeCell -inst " + inst_name + cell_name + " -cell " + new_cell_name + "\n"
infile.close()
outfile.close()
|
|