• 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 12835
  • 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 another simple SKILL code example for modifying label text in Virtuoso based on a recent thread from comp.cad.cadence asking...

    > I have a library with a few hundred cells, half of which have layouts
    > that contain multiple labels whose text I would like to change. 
    > In each layout, there is one label with text 'VDD' that I would like to
    > change to 'vdd!', and there is another label with text 'VSS' that I
    > would like to change to 'gnd!'.  The schematics are already correct.
    > Is there a way to do this with SKILL code? 

    /*
    TrChangeStrings.il

    This SKILL sample will search all the labels in your layout view,
    and judge whether the labels contain the old-string you want
    to replace, and then rename them to the desired new-string.

    TrChangeStrings( "oldString" "newString" )
    -OR-
    TrChangeStrings( "oldString" "newString" t );==> test mode won't save
    changes

    Ex. TrChangeStrings( "VDD" "vdd!" )
    Ex. TrChangeStrings( "VDD" "vdd!" t )

    The number of labels changed per cell will be reported along with
    the total number of labels changed.
    */

    procedure( TrChangeStrings( oldstring newstring @optional (test nil) )
      let( ( cv cnt (totalcnt 0) (view "layout") )
             cv=geGetEditCellView()
        cnt=0
        when( test printf("*** TEST MODE *** changes not saved\n") )
            foreach( shape cv~>shapes
              ;when( shape~>objType == "label" && shape~>theLabel ==
    oldstring
              when( shape~>objType == "label" && rexMatchp(oldstring
    shape~>theLabel
    )
                ;shape~>theLabel = newstring
                rexCompile(oldstring)
                shape~>theLabel = rexReplace(shape~>theLabel newstring 0)
                cnt++
              ) ; when label
            ) ; foreach shape
            unless( test dbSave( cv ))
            printf("%s %s : %d labels changed\n" cv~>cellName view cnt)
            totalcnt = totalcnt + cnt
        printf("** Total labels changed : %d\n" totalcnt)
        when( test printf("*** TEST MODE *** changes not saved\n") )
      ) ; let
    ) ;
    ;; End of TrChangeLabels.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 another simple SKILL code example for modifying label text in Virtuoso based on a recent thread from comp.cad.cadence asking...

    > I have a library with a few hundred cells, half of which have layouts
    > that contain multiple labels whose text I would like to change. 
    > In each layout, there is one label with text 'VDD' that I would like to
    > change to 'vdd!', and there is another label with text 'VSS' that I
    > would like to change to 'gnd!'.  The schematics are already correct.
    > Is there a way to do this with SKILL code? 

    /*
    TrChangeStrings.il

    This SKILL sample will search all the labels in your layout view,
    and judge whether the labels contain the old-string you want
    to replace, and then rename them to the desired new-string.

    TrChangeStrings( "oldString" "newString" )
    -OR-
    TrChangeStrings( "oldString" "newString" t );==> test mode won't save
    changes

    Ex. TrChangeStrings( "VDD" "vdd!" )
    Ex. TrChangeStrings( "VDD" "vdd!" t )

    The number of labels changed per cell will be reported along with
    the total number of labels changed.
    */

    procedure( TrChangeStrings( oldstring newstring @optional (test nil) )
      let( ( cv cnt (totalcnt 0) (view "layout") )
             cv=geGetEditCellView()
        cnt=0
        when( test printf("*** TEST MODE *** changes not saved\n") )
            foreach( shape cv~>shapes
              ;when( shape~>objType == "label" && shape~>theLabel ==
    oldstring
              when( shape~>objType == "label" && rexMatchp(oldstring
    shape~>theLabel
    )
                ;shape~>theLabel = newstring
                rexCompile(oldstring)
                shape~>theLabel = rexReplace(shape~>theLabel newstring 0)
                cnt++
              ) ; when label
            ) ; foreach shape
            unless( test dbSave( cv ))
            printf("%s %s : %d labels changed\n" cv~>cellName view cnt)
            totalcnt = totalcnt + cnt
        printf("** Total labels changed : %d\n" totalcnt)
        when( test printf("*** TEST MODE *** changes not saved\n") )
      ) ; let
    ) ;
    ;; End of TrChangeLabels.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