• 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. HELP: SKILL code not waiting for calculations

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13347
  • 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

HELP: SKILL code not waiting for calculations

frasheed
frasheed over 10 years ago

 Hello All,

I wrote short code to calculate the biggest the value for upper right x y and lowest vale of x y and then do subtraction to get the width and height:

my code is like:

 procedure(math(bBox corner)
let((x y tx ty)
x = car(caar(bBox))
y = cadr(caar(bBox))
 case(corner
 
  ("lower"
    foreach(s bBox
      tx = caar(s)
      ty = cadar(s)
      if(tx<x
      then
       x=tx
      );if-tx
      if(ty<y
      then
        y=ty
      );if-ty
    );foreach
   result = list(x y)
  );lower
 
    ("upper"
      foreach(s bBox
        tx = caar(s)
        ty = cadar(s)
        if(tx>x
        then
          x=tx
        );if-tx
        if(ty>y
        then
          y=ty
        );if-ty
      );foreach
     result = list(x y)
    );upper
   return(result)
   );case
  ) ; let
) ; procedure

  ll = math(cellView~>instances~>bBox "lower")
 ur = math(cellView~>instances~>bBox "upper")

w = car(ur) - car(ll)        ;Width

h = cadr(ur) - cadr(ll) ; height

viaParams = list(list("cutWidth" w) list("cutHeight" h) list("originOffset" list(w/2 h/2)))
b_db = dbCreateVia(cellView viaDef ll "R0" viaParams)

This is just part of the code , before this I am converting Schematic to layout then this calculation and then placinga via , so when I run this code then I got warning that

dbCreateStdVia: Zero width and/or height value(s) specified for a via cut

and then error:


dbTransformPoint: Invalid point - nil


What I think that SKILL is code is so fast that it doesn't wait for the conversion of all layouts and move to math function and since there is no layout there so It's not calculating width and height, If I manually creat layout and then just run the part of code where its calculating width and height, then its working fine , even This code is working fine with 1 technology (32nm) but not with 14nm.

 any suggestion on this ?

Thanks!

  • Cancel
  • skillUser
    skillUser over 10 years ago

    Hi,

    I think it would be useful to actually include the code section that contains dbTransformPoint since the error is in the arguments passed to that function.  SKILL is single-threaded and statements are processed sequentially in the order written (with a few exceptions, such as code that uses ipcBeginProcess(), hiRegTimer() and UI events are asynchronous).  So you will need to walk through your code in the order it is written.  Providing the actual code segment might allow someone on the forum to provide better help. Also the code to find the width and height of a bounding box can be simplified:

        width  = abs(apply('difference mapcar('car bBox)))
        length = abs(apply('difference mapcar('cadr bBox)))
    

    You can iterate this over each of the bBoxes and use functions like min and max to locate the largest or smallest X or Y ordinate. Ideally SKILL functions written outside of R&D should use an uppercase prefix to prevent your function clashing with any internally defined functions - some code on the forum uses a CCF prefix, for example, or code written by Cadence Customer Support uses a CCS prefix; this shows the origin of the code in addition to avoiding name clashes.

    Hopefully this helps you.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 10 years ago

    Hey Lawrence,

    Thanks for your help , Yeah I was considering the wrong points of bBox

    • 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