• 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. SKILL examples to modify Virtuoso label text on schematic...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 142
  • Views 12832
  • 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

SKILL examples to modify Virtuoso label text on schematic & layout

archive
archive over 19 years ago

So others benefit...

Here is a simple SKILL code example for modifying label text in Virtuoso schematic or layout based on a thread from comp.cad.cadence thanks to our good friend Bernd Fischer...

procedure(MyReplaceLabels( libName viewName "tt" )
        let( ( d_libId d_cvId l_cellList l_labelList )

d_libId = ddGetObj( libName )
l_cellList = setof(
                d_cell d_libId~>cells
                member( viewName d_cell~>views~>name )
                )

foreach( d_cell l_cellList

     d_cvId = dbOpenCellViewByType( libName d_cell~>name viewName nil "a" )        

     l_labelList = setof( d_shape d_cvId~>shapes  d_shape~>objType == "label" )

     foreach( d_label l_labelList
        case( d_label~>theLabel
                        ( "VDD"
                                d_label~>theLabel = "vdd!"

                        )
                        ( "VSS"
                                d_label~>theLabel = "gnd!"
                        )
                ) ;; close case
     )

   dbSave( d_cvId )
   dbClose( d_cvId )
)

)

)
;; End of MyReplaceLabels.il


Originally posted in cdnusers.org by John
  • Cancel
Parents
  • archive
    archive over 19 years ago

    So others benefit...

    Here is sample SKILL code to replace all occurances of slash '/' in a given
    layout hierarchy with the underscore '_' that can be modified to fit specific
    requirements as needed.

    If a text label is i_iopad/tied1_75, this program will change that text label
    to i_iopads_tied1_75 for text labels on all levels of the layout hierarchy.

    This SKILL had passed a Virtuoso CIW: Tools -> SKILL -> Survey before posting.

    /*******************************************************************************
    * DISCLAIMER: The following code is provided for Cadence customers to use at *
    * their own risk. The code may require modification to satisfy the *
    * requirements of any user. The code and any modifications to the code may *
    * not be compatible with current or future versions of Cadence products. *
    * THE CODE IS PROVIDED "AS IS" AND WITH NO WARRANTIES, INCLUDING WITHOUT *
    * LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED WARRANTIES OF MERCHANTABILITY *
    * OR FITNESS FOR A PARTICULAR USE. *
    *******************************************************************************/

    procedure(CCSchangeCharInLabel(srcChar dstChar "tt")
    let( (cv mylabels myUniquelabels tmpcv labelText newlab )
    cv = geGetEditCellView()
    ;; search the cell hierarchy for labels that contain 'srcChar'
    ;; The third argument defines the number of hierarchy levels you wish to search
    mylabels=leSearchHierarchy( cv cv~>bBox 32 "label"
    list( list("text" "==" buildString(list(srcChar ) "") ))
    )
    ;; create a list of unique labels
    myUniquelabels = nil
    foreach(x mylabels
    unless(member(x myUniquelabels)
    myUniquelabels = cons(x myUniquelabels)
    )
    )
    ;
    ;
    ;; Do the actual change of labels
    foreach(lab myUniquelabels
    labelText = lab~>theLabel
    newlab = buildString(parseString(labelText srcChar) dstChar)
    printf("Original Label was %s\n" labelText)
    printf("The new Label would be %s\n" newlab)
    ;
    ;
    ;; if label is not in top level, we need to open the instance master in
    ;;edit
    ;; mode to modify the label
    ;
    ;
    if(lab~>cellView~>cellName != cv~>cellName then
    tmpcv = dbOpenCellViewByType(lab~>cellView~>libName lab~>cellView~>cellName
    lab~>cellView~>viewName nil "a")
    lab~>theLabel = newlab
    dbSave(tmpcv)
    dbClose(tmpcv)
    else
    ;; for top level labels
    lab~>theLabel = newlab
    );if
    );foreach
    dbSave(cv)
    ;dbClose(cv)
    );let
    );procedure
    ;
    ; Please make a backup of your original layout data before testing the script.
    ; Thescript actually alters the layout database.
    ; - Save the above SKILL script in a file.
    ; - Load the saved file into the CIW window with the command : load ""
    ; - Open the top level layout cellview in edit mode.
    ; - Type the following command in CIW window to execute the SKILL script:
    ; CCSchangeCharInLabel("/" "_")
    ;
    ;; End of CCSchangeCharInLabel.il


    Originally posted in cdnusers.org by John
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 19 years ago

    So others benefit...

    Here is sample SKILL code to replace all occurances of slash '/' in a given
    layout hierarchy with the underscore '_' that can be modified to fit specific
    requirements as needed.

    If a text label is i_iopad/tied1_75, this program will change that text label
    to i_iopads_tied1_75 for text labels on all levels of the layout hierarchy.

    This SKILL had passed a Virtuoso CIW: Tools -> SKILL -> Survey before posting.

    /*******************************************************************************
    * DISCLAIMER: The following code is provided for Cadence customers to use at *
    * their own risk. The code may require modification to satisfy the *
    * requirements of any user. The code and any modifications to the code may *
    * not be compatible with current or future versions of Cadence products. *
    * THE CODE IS PROVIDED "AS IS" AND WITH NO WARRANTIES, INCLUDING WITHOUT *
    * LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED WARRANTIES OF MERCHANTABILITY *
    * OR FITNESS FOR A PARTICULAR USE. *
    *******************************************************************************/

    procedure(CCSchangeCharInLabel(srcChar dstChar "tt")
    let( (cv mylabels myUniquelabels tmpcv labelText newlab )
    cv = geGetEditCellView()
    ;; search the cell hierarchy for labels that contain 'srcChar'
    ;; The third argument defines the number of hierarchy levels you wish to search
    mylabels=leSearchHierarchy( cv cv~>bBox 32 "label"
    list( list("text" "==" buildString(list(srcChar ) "") ))
    )
    ;; create a list of unique labels
    myUniquelabels = nil
    foreach(x mylabels
    unless(member(x myUniquelabels)
    myUniquelabels = cons(x myUniquelabels)
    )
    )
    ;
    ;
    ;; Do the actual change of labels
    foreach(lab myUniquelabels
    labelText = lab~>theLabel
    newlab = buildString(parseString(labelText srcChar) dstChar)
    printf("Original Label was %s\n" labelText)
    printf("The new Label would be %s\n" newlab)
    ;
    ;
    ;; if label is not in top level, we need to open the instance master in
    ;;edit
    ;; mode to modify the label
    ;
    ;
    if(lab~>cellView~>cellName != cv~>cellName then
    tmpcv = dbOpenCellViewByType(lab~>cellView~>libName lab~>cellView~>cellName
    lab~>cellView~>viewName nil "a")
    lab~>theLabel = newlab
    dbSave(tmpcv)
    dbClose(tmpcv)
    else
    ;; for top level labels
    lab~>theLabel = newlab
    );if
    );foreach
    dbSave(cv)
    ;dbClose(cv)
    );let
    );procedure
    ;
    ; Please make a backup of your original layout data before testing the script.
    ; Thescript actually alters the layout database.
    ; - Save the above SKILL script in a file.
    ; - Load the saved file into the CIW window with the command : load ""
    ; - Open the top level layout cellview in edit mode.
    ; - Type the following command in CIW window to execute the SKILL script:
    ; CCSchangeCharInLabel("/" "_")
    ;
    ;; End of CCSchangeCharInLabel.il


    Originally posted in cdnusers.org by John
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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