• 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. Rename label and part of instance in multiple layouts

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 149
  • Views 18959
  • 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

Rename label and part of instance in multiple layouts

AnuJoamon
AnuJoamon over 16 years ago

I have many layout cells in my library in which I need to do two changes

  1. I want to replace label xxxABxxx with xxxCDxxx (in a specific layer say "m1" "dg")
  2. Replace instance yyyAByyy from library YYYY to instance zzzCDzzz from library ZZZZ.
  3. Check that there is no instance in the entire library coming either from the same library of one reference library (specified).

Anuj.

 

  • Cancel
Parents
  • dmay
    dmay over 16 years ago

    I'd like to make one suggestion about your piece of code. You have two if statements without a then clause. This syntax is perfectly legal, but will only work if there is only one statement within the if. If you add a second statement, it becomes an implied else statement unless you add a then. I find that it is a clearer coding practice to use when if my if clause is not going to have an else.

    if(a==1
       doThis()
    )

    if(a==1 then
       doThis()
    )

    when(a==1
       doThis()
    )

    All three of the above will do the same thing, but the when statement is the most clear and can avoid the following coding mistake which is difficult to catch:

    if(a==1
       doThis()
       doThisAlso()
    )

    The above statement is actually an implied if/else. The doThisAlso() will only be called if a does not equal 1, unless you add the then to the syntax. I will use the above statement in my code only if it is clear in the context of what I am doing so I avoid confusing anyone who edits my code.

    if(a==1
       b = t
       b = nil
    )

    Notice that it is clear this is two different actions since I wouldn't set b to t and then set it to nil.

    Just my opinion.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 16 years ago

    I'd like to make one suggestion about your piece of code. You have two if statements without a then clause. This syntax is perfectly legal, but will only work if there is only one statement within the if. If you add a second statement, it becomes an implied else statement unless you add a then. I find that it is a clearer coding practice to use when if my if clause is not going to have an else.

    if(a==1
       doThis()
    )

    if(a==1 then
       doThis()
    )

    when(a==1
       doThis()
    )

    All three of the above will do the same thing, but the when statement is the most clear and can avoid the following coding mistake which is difficult to catch:

    if(a==1
       doThis()
       doThisAlso()
    )

    The above statement is actually an implied if/else. The doThisAlso() will only be called if a does not equal 1, unless you add the then to the syntax. I will use the above statement in my code only if it is clear in the context of what I am doing so I avoid confusing anyone who edits my code.

    if(a==1
       b = t
       b = nil
    )

    Notice that it is clear this is two different actions since I wouldn't set b to t and then set it to nil.

    Just my opinion.

    Derek

    • 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