• 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. How to calculate the length of a routing which is in different...

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 145
  • Views 24892
  • 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

How to calculate the length of a routing which is in different metal connected through via

AmitBiswas
AmitBiswas over 16 years ago
Hi, I am trying to find out the length of one routing by clicking at two points of that routing. Here the routing is in metal2 and metal3 connected through via23. Is there any way to check in SKILL that exactly where that metal is getting connected with other one through via. Consider that all are paths there is no rectangle or polygon. Is it possible to do it using only SKILL or I need to use Assura also.............? Thanks & Regards, Amit
  • Cancel
Parents
  • skillUser
    skillUser over 16 years ago
    Hi Amit and Bharath,

    Although this is by no means a complete answer, the following SKILL code may assist you in finding path lengths.  It will be up to you to work in any layer changes, and associated overlaps, into the calculations. I wrote the code a while ago, so it will not cope with new OA objects such as pathSegs.


    /* CCSgetPathLength.il

    Group           Custom IC, Cadence Design Systems
    Language        SKILL
    Revision No.    1.2
    Date Created    Jan 09, 2003
    Last Modified
    Tested in       IC446, IC50
    Lint score      100 (best is 100)
    Description:

    A short procedure to use the currently selected path object and
    sum the length of each of the segments and print the result in
    the CIW.

    If the user has infix turned on and nothing was selected already
    then the current mouse location is used to select an object -
    this assumes that the procedure is run when a bindkey is pressed.

    ***************************************************

    SCCS Info: @(#) CCSgetPathLength.il 02/05/03.13:32:29 1.2

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

    */

    /***************************************************************
    *                                                              *
    *                      CCSgetPathLength()                      *
    * Uses the selected object, if no object is selected then the  *
    * current mouse pointer location is used (if infix is on). If  *
    *  the object is a path then iterate over the points and sum   *
    *  the length of each segment (works for 45 degree segments).  *
    *  Prints the summed length of the selected path in the CIW.   *
    *                                                              *
    ***************************************************************/

    procedure(CCSgetPathLength(@optional (obj car(geGetSelectedSet()))
                                silent )
      let((prevpt x y (length 0.0))

      ;; if no object is selected, and infix is turned on, then
      ;; use the current mouse location to select the object.
      ;; This is for use with a bindkey, i.e. it is set to run
      ;; this procedure when a key is pressed.

      unless(obj
        when(hiGetCIWindow()->infix
          geSelectPoint(nil enterPoint())
          obj = car(geGetSelectedSet())
        )
      )

      ;; when the selected object is a path object, iterate
      ;; over the list of points and sum the length. This
      ;; assumes orthogonal or 45 degree segments only.

      when(obj~>objType == "path"
        foreach(pt obj~>points

          ;; operate on pairs of points, if no previous point
          ;; then set it to be the same as the first and use
          ;; it in the next iteration.

          if(!prevpt then

            ;; initialise prevpt to be the first point

            prevpt=pt
          else

            ;; for simplicity keep the calculation the same
            ;; regardless of which direction the segment is
            ;; oriented. One of x or y will be 0 unless the
            ;; path segment is not horizontal or vertical.

            x=abs(car(pt) - car(prevpt))
            y=abs(cadr(pt)-cadr(prevpt))
            length = length + sqrt(expt(x 2) + expt(y 2))
            prevpt=pt
          )
        );; foreach
        ;; print the summed length to the CIW, length will
        ;; have a value as it was initialised as 0.0

        unless(silent
          printf("Path length: %5.2f\n" length)
        )

        ;; return the length calculated
        length
      );; when selected object is a path
      );; let
    );; procedure CCSgetPathLength

    I hope that this helps you,

    Best regards,

    Lawrence
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 16 years ago
    Hi Amit and Bharath,

    Although this is by no means a complete answer, the following SKILL code may assist you in finding path lengths.  It will be up to you to work in any layer changes, and associated overlaps, into the calculations. I wrote the code a while ago, so it will not cope with new OA objects such as pathSegs.


    /* CCSgetPathLength.il

    Group           Custom IC, Cadence Design Systems
    Language        SKILL
    Revision No.    1.2
    Date Created    Jan 09, 2003
    Last Modified
    Tested in       IC446, IC50
    Lint score      100 (best is 100)
    Description:

    A short procedure to use the currently selected path object and
    sum the length of each of the segments and print the result in
    the CIW.

    If the user has infix turned on and nothing was selected already
    then the current mouse location is used to select an object -
    this assumes that the procedure is run when a bindkey is pressed.

    ***************************************************

    SCCS Info: @(#) CCSgetPathLength.il 02/05/03.13:32:29 1.2

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

    */

    /***************************************************************
    *                                                              *
    *                      CCSgetPathLength()                      *
    * Uses the selected object, if no object is selected then the  *
    * current mouse pointer location is used (if infix is on). If  *
    *  the object is a path then iterate over the points and sum   *
    *  the length of each segment (works for 45 degree segments).  *
    *  Prints the summed length of the selected path in the CIW.   *
    *                                                              *
    ***************************************************************/

    procedure(CCSgetPathLength(@optional (obj car(geGetSelectedSet()))
                                silent )
      let((prevpt x y (length 0.0))

      ;; if no object is selected, and infix is turned on, then
      ;; use the current mouse location to select the object.
      ;; This is for use with a bindkey, i.e. it is set to run
      ;; this procedure when a key is pressed.

      unless(obj
        when(hiGetCIWindow()->infix
          geSelectPoint(nil enterPoint())
          obj = car(geGetSelectedSet())
        )
      )

      ;; when the selected object is a path object, iterate
      ;; over the list of points and sum the length. This
      ;; assumes orthogonal or 45 degree segments only.

      when(obj~>objType == "path"
        foreach(pt obj~>points

          ;; operate on pairs of points, if no previous point
          ;; then set it to be the same as the first and use
          ;; it in the next iteration.

          if(!prevpt then

            ;; initialise prevpt to be the first point

            prevpt=pt
          else

            ;; for simplicity keep the calculation the same
            ;; regardless of which direction the segment is
            ;; oriented. One of x or y will be 0 unless the
            ;; path segment is not horizontal or vertical.

            x=abs(car(pt) - car(prevpt))
            y=abs(cadr(pt)-cadr(prevpt))
            length = length + sqrt(expt(x 2) + expt(y 2))
            prevpt=pt
          )
        );; foreach
        ;; print the summed length to the CIW, length will
        ;; have a value as it was initialised as 0.0

        unless(silent
          printf("Path length: %5.2f\n" length)
        )

        ;; return the length calculated
        length
      );; when selected object is a path
      );; let
    );; procedure CCSgetPathLength

    I hope that this helps you,

    Best regards,

    Lawrence
    • 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