- Label name, Co-ordinates and lpp can be taken from one of the sub-cell, And by sorting the all labels in the sub-cell and produce unique label list because some labels has duplicates like same co-ordinates and label names and lpp will present.
- New Label name should be input by file. So that we can replace the label name in sorted list by referring input file.
- input file format (old_label new_label). new_lable is the name I am lookin to replace. old_name is the name already present in sorted list.
- Example: Sorted list will have x_1, x_2 ……....x_100 label names etc and we have to replace x_1, x_10……. with net1,net2…… etc.
- And final label list will have modified label name and old co-ordinates and lpp. And this label list will send to dB-create to create labels in the top cell or zero dept.
I have wrote the skill code for some extent. And not able to produce final output. Can you please help me or guide to produce final output ? past the code I have started with and my sorted label list not producing unique-list.
procedure(mtk_connectCheck_4()
let((cv filePtr filePtr1 removed duplicates labelFile labelList nextline oldname newname final)
cv=geGetWindowCellView()
filePtr=outfile("/tmp/file4.txt")
labels=setof(shape cv~>shapes shape~>objType=="label")
foreach(label labels
unless(member(label removed)
if(duplicates = setof(dup labels dup~>xy == label~>xy && dup~>theLabel == label~>theLabel && dup~>lpp == label~>lpp && dup != label)
then fprintf(filePtr "%L\t\t %L\t\t %L\n" duplicates~>theLabel duplicates~>xy duplicates~>lpp))
removed = nconc(duplicates removed)
); unless
)
close(filePtr)
labelFile=infile("/tmp/pin_info.txt")
filePtr1=outfile("/tmp/file5.txt")
when(labelFile while(gets(nextline labelFile)
labelList = parseString(nextline "\n")
oldname = nth(0 labelList)
newname = nth(1 labelList)
if(final = setof(dup1 labels dup1~>theLabel && (dup1~>theLabel == oldname)) then labels~>theLabel = newname
fprintf(filePtr1 "%L\n" final~>theLabel)
);if
;);foreach
);while
);when
close(labelFile)
close(filePtr1)
);let
);procedure
Thanks,
Thriandh