• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Need help in Create labels with required label name, lpp...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 142
  • Views 10605
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help in Create labels with required label name, lpp, co-ordinates. By following conditions.

3nadh143
3nadh143 over 3 years ago
  • 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 

 

  • Cancel
Parents
  • 3nadh143
    3nadh143 over 3 years ago

    Did I miss any information about problem or tool ? could you please help me to complete the code ?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • 3nadh143
    3nadh143 over 3 years ago

    Did I miss any information about problem or tool ? could you please help me to complete the code ?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to 3nadh143

    To be honest, I didn't answer because I didn't really understand what you were trying to do. Your explanation wasn't clear, and to be honest I didn't have time to guess and write some code on the off chance that I'd correctly guessed what you really meant. I can't answer for anyone else who might have considered answering, but I suspect they suffered from the same lack of clarity on what the intent was.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 3nadh143
    3nadh143 over 3 years ago in reply to Andrew Beckett

    Hi Andrew

    Thank for honest reply, let me explain in simple way.

    Problem : I have to create labels with specific label-name, co-ordinates, and Layer-puropse(lpp).

    My idea: I have to create labels on cell (x)  and it had sub-hierarchy cell (y) which already have required labels with correct co-ordinates and layer-purpose(lpp), and the only difference is label name. So if we sort all labels and produce unique label list because some labels has duplicates like same co-ordinates and label names and lpp. And the label names in the sorted list we have to modify according to my input file and pass that final label list to dbcreate to create labels on top level cell (x).

    Hope it is clear to you.

    Thriandh

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 3 years ago in reply to 3nadh143

    Hi Thriandh,

    Like Andrew I didn't answer because I didn't really understand what this is all about. And quite honestly I still don't - well not quite at least. Are you saying that you want to extract all labels in the design hierarchy below cell(y) and then based on that label list create new labels in you current hierarchy level (in cell(x))?

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 3nadh143
    3nadh143 over 3 years ago in reply to mbracht

    Yes Max,
    Correct. the final label list will have modified label name according my input file data. Using that label list we will create labels in top level (x hierarchy). 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to 3nadh143

    This is still really unclear. I think you want two functions and three steps:

    1. Capture label information (text, lpp, coordinate) into a file (you don't want height, orientation, font?)
    2. Manually edit the file to change the labels as you wish
    3. Read the file and create the labels in the top level

    The questions I'd have are how it's going to translate the coordinates from the coordinates within the sub-cell to the top level. If the labels are within an instance that is directly instantiated in the top-level then that would be easy enough - the first function (step 1) could be given an instance id and then transform the coordinates using dbTransformPoint with the inst~>transform  and write those into the file. If it's some lower level cell, the question is how find out how to transform the coordinates - it would need some hierarchical path information to determine the overall transformation to use.

    Also, since you are not saving height, orientation and font for the labels, are you just going to set some defaults for those when recreating the labels?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 3nadh143
    3nadh143 over 3 years ago in reply to Andrew Beckett

    Hi Andrew

    The final outcome is creating labels in top level with modified label names.

    1. Correct Capture unique label information (text, lpp, co-ordinates), printing in file just to verify unique list. Orientation and font and height also same as source.    
    2. Not manually, through code we have to modify label names. This can be done through code by providing input file having data new label-name and old label name to search and replace specific label.
    3. Correct read the file and create the labels in the top level.
    4. Answer to your question.  Yes the labels are with in an instance that is directly instantiated in the top-level. Instead I prefer, is there any option to search the name of the cell under same hierarchy ? it has unique naming convention with suffix naming  "_unique".

    Hope this is clear, if not my-bad.  

    Thrinadh 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information