Home > Community > Forums > Custom IC SKILL > How to fill a bounding box with as many vias as possible

## Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

 Send yourself a copy

## Subscribe

• RSS
Cadence RSS Feeds

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

## Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Send Yourself A Copy

# How to fill a bounding box with as many vias as possible

Last post Mon, Apr 29 2013 6:29 PM by Quek. 2 replies.
 Started by TauStudent 27 Apr 2013 07:32 AM. Topic has 2 replies and 581 views
• #### Sat, Apr 27 2013 7:32 AM

How to fill a bounding box with as many vias as possible
 Hi,I have a bounding box of the parallel area between to layers of metal, and i want to create a skill method to fill that area with as many vias as possible. this is my first attempt to write a skill program, but it seems like a basic operation every skill programmer probably implemented, so before i sit down to wrestle with it i was wondering maybe someone already have an implementation of it to share ?Thanks for your time.
Filed under:
• Post Points: 5
• #### Sat, Apr 27 2013 9:37 PM

Re: How to fill a bounding box with as many vias as possible
 I managed to come up with this solution :procedure(fillVias(cid bbox viaName)let(()    tf = techGetTechFile(cid)    viaDef = techFindViaDefByName( tf viaName)    viaWidth = 2*car(nth(5 viaDef->params)) + car(nth(6 viaDef->params))     boxWidth = car(cadr(bbox)) - car(car(bbox))    boxHeight = cadr(cadr(bbox)) - cadr(car(bbox))    viasPerRow = int(boxWidth/viaWidth)    viasPerColumn = int(boxHeight/viaWidth)    spacex = (boxWidth- viaWidth*viasPerRow)/(viasPerRow + 1)    spacey = (boxHeight- viaWidth*viasPerColumn)/(viasPerColumn + 1)    x = car(car(bbox))    y = cadr(car(bbox))     for( i 0 viasPerRow-1        for( j 0 viasPerColumn-1           point = x+ (i+0.5)*viaWidth+ (i+1)*spacex :y+ (j+0.5)*viaWidth+ (j+1)*spacey          dbCreateVia(cvId viaDef point "R0")        )    )))It work fine for my needs, assuming the via width = via heightand from looking at the viaDef object (viaDef->??) it seems that car(nth(6 viaDef->params)) gives the inner square width and car(nth(5 viaDef->params)) gives the margin.
• Post Points: 20
• #### Mon, Apr 29 2013 6:29 PM

• Quek
• Joined on Wed, Oct 14 2009
• Singapore, 00-SG
• Posts 991
• Points 15,045
Re: How to fill a bounding box with as many vias as possible
 Hi TauStudentActually there is no need to write a skillscript because Virtuoso already has this function:IC61 : Use "autoVia" functionIC51 : Use "autoCont" function from toolboxBest regardsQuek
• Post Points: 5
###### Sort Posts: Oldest to newest Newest to oldest
 Started by TauStudent at 27 Apr 2013 07:32 AM. Topic has 2 replies.
 About Cadence| Investor Relations| Careers| Terms of Use| Privacy Policy| US Trademarks © Cadence Design Systems, Inc. All Rights Reserved.