Home > Community > Forums > Custom IC SKILL > How to calculate the length of a routing which is in different metal connected through via

## Email

Recipients email * (separate multiple addresses with commas)

Message *

 Send yourself a copy

## Subscribe

Intro copy of the newsletter section here, some intro copy of the newsletter. Instruction of how to subscribe to this newsletter.

First Name *

Last Name *

Email *

Company / Institution *

 Send Yourself A Copy

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

Last post Wed, Sep 23 2009 12:04 AM by Andrew Beckett. 18 replies.
 Started by AmitBiswas 05 May 2009 11:37 AM. Topic has 18 replies and 5762 views
• #### Tue, May 5 2009 11:37 AM

• AmitBiswas
• Joined on Sun, Jan 25 2009
• Bangalore, Karnataka
• Posts 22
• Points 575
How to calculate the length of a routing which is in different metal connected through via
 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
Filed under:
• Post Points: 20
• #### Wed, May 6 2009 1:38 PM

• dmay
• Joined on Thu, Jul 17 2008
• Allen, TX
• Posts 396
• Points 7,460
Re: How to calculate the length of a routing which is in different metal connected through via
 There is not an easy way to do this in Skill. It can be done, but the code could get complicated depending on whether you are dealing with multiple levels of hierarchy or not. It is not difficult to calculate the length of a path by traversing its points and summing the point to point deltas. You also need to be able to trace the net by going from the metal2 path through the via23 to metal3. Cadence markNet will highlight this for you, but will not return any shapes. So the short answer is no, there isn't any simple skill to do this. Derek
• Post Points: 20
• #### Thu, May 7 2009 1:08 PM

Re: How to calculate the length of a routing which is in different metal connected through via
 These types of traces are usually done with analysis tools such as a DRC/LVS tool. They have a ruleset which describes the layer relationship and can trace the circuit through the various levels and metals. The circuit length is then extracted. If you want to persue it in SKILL, the command you will want to use is dbGetTrueOverlaps. It can find anything in the hierarchy within a bounding box.You can make some assumptions about vias, that they do connect from one level to the next, without having to analyze them.Ted
• Post Points: 20
• #### Tue, Jun 2 2009 8:21 AM

• bharath2k4er
• Joined on Wed, Feb 11 2009
• blr, Karnataka
• Posts 34
• Points 650
Re: How to calculate the length of a routing which is in different metal connected through via
 can i get the length in um..? Is that possible.. this will help me in caluculating the current flow... Thanks,Bharath.  Thanks, Bharath
• Post Points: 20
• #### Tue, Jun 2 2009 8:43 AM

Re: How to calculate the length of a routing which is in different metal connected through via
 This will depend on the extraction tool you are using and how the routing is created. If it is centerline paths, you can probably get the length but if it is polygons, the length calculation is much harder.
• Post Points: 20
• #### Tue, Jun 2 2009 9:12 AM

• bharath2k4er
• Joined on Wed, Feb 11 2009
• blr, Karnataka
• Posts 34
• Points 650
Re: How to calculate the length of a routing which is in different metal connected through via
 Hi,    requirement goes like this... wanted to find the length of a net(it may switch from any layers metal1 to 2 or metal2 to 3...etc).. from source to destination.. I dont want any caluculations.. just the length in um Thanks, Bharath
• Post Points: 20
• #### Tue, Jun 2 2009 9:31 AM

• skillUser
• Joined on Fri, Sep 19 2008
• Austin, TX
• Posts 2,604
• Points 16,180
Re: How to calculate the length of a routing which is in different metal connected through via
 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.ilGroup           Custom IC, Cadence Design SystemsLanguage        SKILLRevision No.    1.2Date Created    Jan 09, 2003 Last ModifiedTested in       IC446, IC50Lint score      100 (best is 100)Description:A short procedure to use the currently selected path object andsum 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 alreadythen 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 CCSgetPathLengthI hope that this helps you,Best regards,Lawrence
• Post Points: 20
• #### Tue, Jun 9 2009 12:13 AM

• bharath2k4er
• Joined on Wed, Feb 11 2009
• blr, Karnataka
• Posts 34
• Points 650
Re: How to calculate the length of a routing which is in different metal connected through via
 Hi Lawrence,          I have worked on the above script.. It is able to give me length of the path.. Path length: 14.88 But, we expect it to give us the length if the metal is switching( say i have metal1 running for 10um and switched to metal2 for other 10um, output should be total drawn length 20um ) Also it is not able to give the length of rectangles and polygons.. Will it be possible to find the length of shapes..?   Thanks, Bharath
• Post Points: 20
• #### Tue, Jun 9 2009 7:11 AM

• dmay
• Joined on Thu, Jul 17 2008
• Allen, TX
• Posts 396
• Points 7,460
Re: How to calculate the length of a routing which is in different metal connected through via
 Lawrence indicated that you will have to do some extra work to handle layer changes. This is not trivial and depends on whether your shapes are all at the top level or spread across multiple levels of hierarchy. It can actually be quite simple if your shapes are all at the top level and you are using VXL. In this case, all shapes on a given net will have the net attribute.netShapes = setof(x geGetEditCellView()~>shapes x~>net~>name=="myNet") If this is not the case, then you could expand Lawrence's script and run dbGetTrueOverlaps for the bounding box of each segment of the path. You could look for vias or contacts that transition to the next metal layer.  Here is some pseudo code (assuming only paths and all shapes/vias at top level of hierarchy):shp = shape under the point ; Lawrence does this with enterPointshpList = list(shp)totL = 0while shp = car(shpList)  unless visited[shp]    visited[shp] = t    shpList = cdr(shpList)    foreach segment on path ; Lawrence does this by looping through obj~>points      L = length of segment      bbox = bounding box of segment      totL = totL + L      connectedShapes = dbGetTrueOverlaps using shp~>lpp and bbox at level 0; find overlapping shapes on same layer      foreach newShp connectedShapes        unless visited[newShp]           shpList = cons(newShp shpList)      overlappingVias = dbGetTrueOverlaps using nil for the layer to only get instances at level 0      foreach via overlappingVias        check for overlapping shapes on the connecting metal (if shp is metal1 and via connects to metal2, look for overlapping metal2)        add new shapes to shpList unless they have already been visitedThis is a very basic idea, but gives you an idea of the complexity involved. You mentioned that you wanted lengths of polygons and rectangles. This is very subjective. The length of a rectangle can be either its width or its height, but you really want to measure based on the direction of current flow which is not always the longer distance. A reasonable approximation for the length of a polygon might be taking the perimeter and dividing by two.Keep in mind, this is a forum to help answer questions and provide help and ideas. It is by no means a design services group. For a complex request like this, don't expect to get a complete piece of working code.Derek
• Post Points: 35
• #### Tue, Jun 9 2009 8:59 AM

• skillUser
• Joined on Fri, Sep 19 2008
• Austin, TX
• Posts 2,604
• Points 16,180
Re: How to calculate the length of a routing which is in different metal connected through via
 Thank you Derek, you are kinder than I would have been :-)It might be possible to guess which direction the path was traveling (for a segment?) and from this you might be able to work out which dimension of a rectangular shape to take into consideration for the path length. I believe that Derek's pseudo-code shows how to"walk the shapes" in a similar fashion to the way that Mark Net does.  I was just looking to see if Mark Net used hilight objects or probes to mark the shapes and if these are available in SKILL, but I could not find the objects associated with the marked net - this would have been a nice way to get the shapes involved, and then the task might have been easier. Even without Mark Net, you can use Derek's example to find the shapes involved, and even copy and merge these in a scratch cellview so that you only have one path/polygon to work with, then it would be a fairly straightforward thing to find the length of such a shape.Another approach is to use extraction tools such as Diva or Assura to follow a path and measure the length, but I do not work with these tools enough to really be able to help in that direction. Apart from this, as Derek mentions, this is not a trivial undertaking, and unlikely to be answered in full in such a forum.Good luck!Regards,Lawrence.
• Post Points: 20
• #### Wed, Jun 10 2009 9:54 AM

• babji
• Joined on Thu, Apr 23 2009
• Posts 24
• Points 360
Re: How to calculate the length of a routing which is in different metal connected through via
 When I wrote this code I made the users select the entire net,  tough not intuitive it is more than enough for most chips we do. But if You want the tool to traverse the path then one way is to ivDRC to trace the entire net and save it a cell ( I'm guessing ivDRC save the result in a view) then just calculate the length of individual metals ( I hope its easy to differentiate which are metals and which are vias)  and sum it.Corrections are  welcome.
• Post Points: 20
• #### Wed, Jun 10 2009 10:56 AM

• skillUser
• Joined on Fri, Sep 19 2008
• Austin, TX
• Posts 2,604
• Points 16,180
Re: How to calculate the length of a routing which is in different metal connected through via
 When you wrote what code? The only code I saw is what I posted.  It is difficult to comment or correct on invisible code.Regards,Lawrence.
• Post Points: 20
• #### Wed, Jun 10 2009 11:12 AM

• babji
• Joined on Thu, Apr 23 2009
• Posts 24
• Points 360
Re: How to calculate the length of a routing which is in different metal connected through via
 I meant the code that I wrote when I was given the same spec. I did not post the code here but I just gave the suggestion.
• Post Points: 5
• #### Tue, Sep 22 2009 7:02 AM

• bharath2k4er
• Joined on Wed, Feb 11 2009
• blr, Karnataka
• Posts 34
• Points 650
Re: How to calculate the length of a routing which is in different metal connected through via
 ist(            ?layer     list("psdm" "drawing")            ?enclosure    -0.150000            ?choppable    nil            ?beginOffset     0.000000            ?endOffset     0.000000            )        )The above one gives psdm enclosing 0.15 on both the sides..but i want it only on side..what should i do for that..?ThanksBharath Thanks, Bharath
• Post Points: 20
• #### Tue, Sep 22 2009 7:07 AM

Re: How to calculate the length of a routing which is in different metal connected through via
 Do it as an offset subpath rather than an enclosure subpath. Then you can specify ?sep and ?width to control the separation (sideways offset) and width of the path.Regards,Andrew.
• Post Points: 20
###### Sort Posts: Oldest to newest Newest to oldest
 Started by AmitBiswas at 05 May 2009 11:37 AM. Topic has 18 replies.