• 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...

    This SKILL code example from Cadence solution #11094824 will convert symbolic
    pin angle brackets "< >" text to square brackets "[ ]" in a Virtuoso layout.

    Specifically, this sample SKILL code replaces all labels starting with "A"
    and ending with ">" to have delimiters replaced with "[ ]".

    Please note this sample SKILL changes ONLY the labels and does not modify the
    connectivity information on a pin that may have been created using the
    original label.

    This sample SKILL code passed a Virtuoso CIW: Tools -> SKILL -> Survey prior to
    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. *
    *******************************************************************************/
    ; *Solution_No: 11094824
    ; *Title: How to change Pin labels from "<>" to "[]"
    ; Name: CCSchangeLabelDelimiter.il
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Save this code to a file such as CCSchangeLabelDelimiter.il
    ; and then load in CIW as
    ; load("CCSchangeLabelDelimiter.il").
    ; Then type CCSchangeLabelDelimiter() in CIW.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    procedure(CCSchangeLabelDelimiter()
    let( (cv mylabels myUniquelabels tmpcv labelText name
    index newlab)
    ;;cv = geGetEditCellView()
    cv = dbOpenCellViewByType("master" "MUX"
    "layout_test" nil "a")
    ;;search the cell hierarchy for labels that start
    with "A" and end with ">"
    ;;The third argument defines the number of hierarchy
    levels you wish to search
    mylabels=leSearchHierarchy( cv cv~>bBox 32
    "label"
    list( list( "text" "==" "^A" ) list("text"
    "==" ">$"))
    )
    ;;create a list of unique labels
    myUniquelabels = nil
    foreach(x mylabels
    unless(member(x myUniquelabels)
    myUniquelabels = cons(x
    myUniquelabels)
    )
    )
    foreach(lab myUniquelabels
    labelText =
    lab~>theLabel
    name =
    car(parseString(labelText
    "["))
    index=
    car(parseString(cadr(parseString(labelText
    "<")) ">"))
    newlab=
    buildString(list(buildString(list(name
    index ) "[") "]") "")
    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")
    ;;println(lab~>name)
    lab~>theLabel = newlab
    dbSave(tmpcv)
    dbClose(tmpcv)
    )
    ;; for top level labels
    ;;println(lab~>name)
    lab~>theLabel = newlab
    )
    dbSave(cv)
    dbClose(cv)
    );let
    );procedure
    ;
    ; Save this code to a file such as CCSchangeLabelDelimiter.il
    ; Load in the Virtuoso CIW using load("CCSchangeLabelDelimiter.il")
    ; Then type CCSchangeLabelDelimiter() in the CIW.
    ;
    ;; End of CCSchangeLabelDelimiter.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...

    This SKILL code example from Cadence solution #11094824 will convert symbolic
    pin angle brackets "< >" text to square brackets "[ ]" in a Virtuoso layout.

    Specifically, this sample SKILL code replaces all labels starting with "A"
    and ending with ">" to have delimiters replaced with "[ ]".

    Please note this sample SKILL changes ONLY the labels and does not modify the
    connectivity information on a pin that may have been created using the
    original label.

    This sample SKILL code passed a Virtuoso CIW: Tools -> SKILL -> Survey prior to
    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. *
    *******************************************************************************/
    ; *Solution_No: 11094824
    ; *Title: How to change Pin labels from "<>" to "[]"
    ; Name: CCSchangeLabelDelimiter.il
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Save this code to a file such as CCSchangeLabelDelimiter.il
    ; and then load in CIW as
    ; load("CCSchangeLabelDelimiter.il").
    ; Then type CCSchangeLabelDelimiter() in CIW.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    procedure(CCSchangeLabelDelimiter()
    let( (cv mylabels myUniquelabels tmpcv labelText name
    index newlab)
    ;;cv = geGetEditCellView()
    cv = dbOpenCellViewByType("master" "MUX"
    "layout_test" nil "a")
    ;;search the cell hierarchy for labels that start
    with "A" and end with ">"
    ;;The third argument defines the number of hierarchy
    levels you wish to search
    mylabels=leSearchHierarchy( cv cv~>bBox 32
    "label"
    list( list( "text" "==" "^A" ) list("text"
    "==" ">$"))
    )
    ;;create a list of unique labels
    myUniquelabels = nil
    foreach(x mylabels
    unless(member(x myUniquelabels)
    myUniquelabels = cons(x
    myUniquelabels)
    )
    )
    foreach(lab myUniquelabels
    labelText =
    lab~>theLabel
    name =
    car(parseString(labelText
    "["))
    index=
    car(parseString(cadr(parseString(labelText
    "<")) ">"))
    newlab=
    buildString(list(buildString(list(name
    index ) "[") "]") "")
    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")
    ;;println(lab~>name)
    lab~>theLabel = newlab
    dbSave(tmpcv)
    dbClose(tmpcv)
    )
    ;; for top level labels
    ;;println(lab~>name)
    lab~>theLabel = newlab
    )
    dbSave(cv)
    dbClose(cv)
    );let
    );procedure
    ;
    ; Save this code to a file such as CCSchangeLabelDelimiter.il
    ; Load in the Virtuoso CIW using load("CCSchangeLabelDelimiter.il")
    ; Then type CCSchangeLabelDelimiter() in the CIW.
    ;
    ;; End of CCSchangeLabelDelimiter.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