• 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. Using SKILL to replace label text across multiple cells...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 5892
  • 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

Using SKILL to replace label text across multiple cells in a library using partial string match and replace

berryca
berryca over 2 years ago

Hi all, I'm trying to replace label text in hundreds of cells in a library using partial string match. I found some old posts about similar activities and code it for this purpose, but it doesn't work. There are no error codes given, currently it just silently fails. I expect the error to be related to the rexMatchp, rexCompile, or rexReplace functions. If you spot where the error is, please comment!

For more context, the text labels I am trying to replace are of the format: "@AA.BB11C.DD0000EE.FF". They are there for the purpose of marking locations on the cells for software to understand the boundary of the cell and probe pad locations, and they are all slightly different, like a serial number. There are several hundred and are named incorrectly. I am trying to match the partial string "BB11" and change it to "BB12", so that the result would instead be named "@AA.BB12C.DD0000EE.FF"

Here's the code:

procedure( replaceLibLabels( libName findPattern replacePattern viewName "tt" )
let(
( libId cvId cellList labelList )



libId = ddGetObj( libName )
cellList = setof( cell libId~>cells member( viewName cell~>views~>name ))
foreach( cell cellList
cvId = dbOpenCellViewByType( libName cell~>name viewName nil "a" )
labelList = setof( shape cvId~>shapes shape~>objType == "label" && rexMatchp(findPattern shape~>theLabel) == t )
if(labelList
then
rexCompile(findPattern)
foreach( label labelList
rexReplace(label~>theLabel replacePattern 0)
)
dbSave( cvId )
)
dbClose( cvId )
)
))

Thank you!!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Well, the rex functions are pretty limited (I'd use pcreMatchp/pcreCompile/pcreReplace unless you're using IC5141). However I think this should work. Are you using "BB11" as the findPattern argument and "BB12" as the replacePattern argument? 

    If so, adding a few debug messages or using the SKILL debugger in the IDE would be my suggestion - it's very hard to know without suitable test data (and I don't have time to construct something). At a glance the code looks OK but I might have missed something of course.

    Andrew

    • 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