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 *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 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 673 views
Page 1 of 1 (3 items)
Sort Posts:
  • Sat, Apr 27 2013 7:32 AM

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

    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 Reply

    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 height

    and 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
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,051
    • Points 15,990
    Re: How to fill a bounding box with as many vias as possible Reply

    Hi TauStudent

    Actually there is no need to write a skillscript because Virtuoso already has this function:

    IC61 : Use "autoVia" function
    IC51 : Use "autoCont" function from toolbox

    Best regards
    Quek

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by TauStudent at 27 Apr 2013 07:32 AM. Topic has 2 replies.