• 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 sample for changing label text, kindly provided by our good
    friend Jay Singh, is more generic than the previous two examples in that
    it can easily be modified to get the desired functionality for any object
    in the design database.

    Prior to posting, this code has passed the Virtuoso SKILL Survey
    CIW: Tools -> SKILL -> Survey
    for all releases from IC400 to IC610 (beta) to date.


    /*************************************************************************
    * 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. *
    *************************************************************************/

    ;; Author : Cadence Design Systems
    ;; FileName: JayChangeLabel.il
    ;; Tested : IC442 IC443
    ;;
    ;; This procedure may be used to traverse through the hierarchy of a library.
    ;; If cellList is specified then the operation will be performed only on cellList.
    ;; default is all cells in the library.
    ;; viewName = layout or schematic
    ;;
    ;; Usage In CIW:
    ;; JayChangeLabel("library_name" "schematic" "old_label" "new_label")
    ;; SKILL LINT SCORE 100 (BEST MAXIMUM IS 100)

    procedure(JayChangeLabel(libName viewName oldLabel newLabel @optional listOfCells)

    let((cv libId cellId cellList)

    libId = ddGetObj(libName)
    if(!listOfCells then
    cellList = libId~>cells
    else
    cellList = nil
    foreach(cellName listOfCells
    cellId = ddGetObj(libName cellName)
    cellList = append(list(cellId) cellList)
    );end foreach
    );end if

    foreach(cell cellList
    foreach(view cell~>views
    ;; using views matching viewName variable.
    if(view~>name == viewName && (cv = dbOpenCellViewByType(libName cell->name
    view~>name "" "a")) then
    printf("\nOpened view %L from cell %L of library %L for edit.\n"
    cv~>viewName cv~>cellName cv~>libName)
    ;; Operate on the desired objects, Here it's shape with the property
    ;; theLabel = oldLabel
    foreach(shape cv~>shapes
    if(shape~>theLabel && (shape~>theLabel == oldLabel) then
    printf("\n Changing the label %L with %L. " shape~>theLabel newLabel )
    shape~>theLabel = newLabel
    );end if
    );end foreach

    dbSave(cv)
    dbClose(cv)
    );end if
    );end foreach view
    );end foreach cell

    ddReleaseObj(libId)
    );let
    );proc JayChangeLabel
    ;; End of JayChangeLabel.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 sample for changing label text, kindly provided by our good
    friend Jay Singh, is more generic than the previous two examples in that
    it can easily be modified to get the desired functionality for any object
    in the design database.

    Prior to posting, this code has passed the Virtuoso SKILL Survey
    CIW: Tools -> SKILL -> Survey
    for all releases from IC400 to IC610 (beta) to date.


    /*************************************************************************
    * 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. *
    *************************************************************************/

    ;; Author : Cadence Design Systems
    ;; FileName: JayChangeLabel.il
    ;; Tested : IC442 IC443
    ;;
    ;; This procedure may be used to traverse through the hierarchy of a library.
    ;; If cellList is specified then the operation will be performed only on cellList.
    ;; default is all cells in the library.
    ;; viewName = layout or schematic
    ;;
    ;; Usage In CIW:
    ;; JayChangeLabel("library_name" "schematic" "old_label" "new_label")
    ;; SKILL LINT SCORE 100 (BEST MAXIMUM IS 100)

    procedure(JayChangeLabel(libName viewName oldLabel newLabel @optional listOfCells)

    let((cv libId cellId cellList)

    libId = ddGetObj(libName)
    if(!listOfCells then
    cellList = libId~>cells
    else
    cellList = nil
    foreach(cellName listOfCells
    cellId = ddGetObj(libName cellName)
    cellList = append(list(cellId) cellList)
    );end foreach
    );end if

    foreach(cell cellList
    foreach(view cell~>views
    ;; using views matching viewName variable.
    if(view~>name == viewName && (cv = dbOpenCellViewByType(libName cell->name
    view~>name "" "a")) then
    printf("\nOpened view %L from cell %L of library %L for edit.\n"
    cv~>viewName cv~>cellName cv~>libName)
    ;; Operate on the desired objects, Here it's shape with the property
    ;; theLabel = oldLabel
    foreach(shape cv~>shapes
    if(shape~>theLabel && (shape~>theLabel == oldLabel) then
    printf("\n Changing the label %L with %L. " shape~>theLabel newLabel )
    shape~>theLabel = newLabel
    );end if
    );end foreach

    dbSave(cv)
    dbClose(cv)
    );end if
    );end foreach view
    );end foreach cell

    ddReleaseObj(libId)
    );let
    );proc JayChangeLabel
    ;; End of JayChangeLabel.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