• 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. Promote label from level1 to level0(toplevel)

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 142
  • Views 1120
  • 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

Promote label from level1 to level0(toplevel)

Knp
Knp over 2 years ago

Hi,

I want to promote & place only required labels present in lower hierarchy of layout to top level of the layout

- Lower hierarchy has many labels, I don't want all of them to be promoted to top level, so first I extracted all the terminal names present in the top level of schematic present corresponding to top level layout using below code

cv=dbOpenCellView("libName" "cellView" "schematic")

terName=cv~>terminals~>name

tmpout=outfile("./knp")

poport=tmpout

foreach(term terName

fprintf(poport "%s\n" term)

)

Now I have all the labels list which are present in the top level of schematic corresponding the layout and this labels list I will be using to place them at the top level of layout

if -> schematic label/terminal matches(which I have extracted using above code) with the label present in n-1 level of layout, skill code should place a label with same name at same location at top level of the layout

The above three colored statements is my exact requirement ... !!!

Thanks,

knp

  • Cancel
  • AurelBuche
    AurelBuche over 2 years ago

    Hi,

    The code snippet you provide is quite weird...

    Why do you print the terminal names (when you already have them as a list) and why do you replace poport which is an important variable to Virtuoso?

    You will probably find many articles on Cadence Support explaining how to achieve similar things. Anyway here is a custom-made function that should do what you want :

    (defun promote_labels_to_top (@key sch_cv lay_cv @rest _args)
      "Copy labels from lower level of LAY_CV if they match existing terminals in SCH_CV"
      ;; Build a table containing all terminal names
      (let ((table (makeTable 'term_names nil)))
        (foreach term sch_cv->terminals
          (setf table[term->name] t))
        ;; Browse lower level of hierarchy
        (foreach inst lay_cv->instances
          ;; Browse shapes to retrieve labels
          (foreach shape inst->master->shapes
            ;; Here we check both if shape is a label and if it belongs to terminal names
            (when (and shape->theLabel table[shape->theLabel])
              ;; Copy label to top level
              (dbCopyShape shape lay_cv inst->transform)
              )));foreach shape ;foreach inst
        ));let ;def

    You can call it using :

    (promote_labels_to_top ?sch_cv (dbOpenCellView "libName" "cellView" "schematic") ?lay_cv (dbOpenCellView "libName" "cellView" "layout"))

    Cheers

    Aurélien

    • 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