Via Doubler

Discussion in 'Cadence' started by eric.d.fitzsimmons, Jan 16, 2009.

  1. Hi all,

    I have a request from my layout group to come up with a quicker way to
    double a via on a route. Basically, we are routing with the path
    command and with wires not wide enough for two vias one is placed at
    transitions.

    Currently, the user is selecting the via to double and using
    leHiEditProp(), filling out the form to grow the Row or the Column of
    the via and hitting apply.

    I would like to have some code where the user selects a via and could
    "toggle" a double cut via by pressing alt v. Double row if user hits
    the alt v once and and "toggle" to double column if alt v is hit
    twice.

    I have written widgets to manipulate forms with skill in cadence but
    the form that comes up with leHiEditProp() doesn't seem to work that
    way :)

    Any ideas or sharing of code that does similar to this would be
    appreciated!!

    Thanks,
    Eric
     
    eric.d.fitzsimmons, Jan 16, 2009
    #1
  2. This would set the rows to be 2 for all the selected vias. Use ~>column for columns.

    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=2
    )
    )

    This is for IC5141 (which I assume you're using). It's a bit more complicated in
    IC61, because vias a separate objects, and it probably would need the via master
    changing (don't have time to check right now).

    Andrew.
     
    Andrew Beckett, Jan 19, 2009
    #2
  3. Andrew,

    I attached the code that you gave me with a slight change to increment
    and decrement the via selectic. I bound this to
    the wheel on the mouse. The user can select the existing via and add
    to the row or column. It stops if the
    decrement of the row or column is at a count of 1.

    Thank you for your help and if you see something wrong let me know!
    Eric



    procedure(RowAddRoll()
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=selObj~>row+1
    )
    )
    )


    procedure(RowSubRoll()
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    if(selObj~>row==1
    then print("Via size is minimum!")
    else
    selObj~>row=selObj~>row-1
    )
    )
    )
    )



    procedure(ColumnAddRoll()
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>column=selObj~>column+1
    )
    )
    )



    procedure(ColumnSubRoll()
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    if(selObj~>column==1
    then print("Via size is minimum!")
    else
    selObj~>column=selObj~>column-1
    )
    )
    )
    )

    hiSetBindKeys( "Layout" list(
    list("Shift Alt<Btn4Down>" "RowAddRoll()");
    list("Shift Alt<Btn5Down>" "RowSubRoll()");
    list("Ctrl Alt<Btn4Down>" "ColumnAddRoll()");
    list("Ctrl Alt<Btn5Down>" "ColumnSubRoll()");
    ))
     
    eric.d.fitzsimmons, Jan 19, 2009
    #3
  4. I ended up with the code below. If a user selects an existing via,
    the user then can use the "roll" on the mouse to add and subtract rows
    and columns.

    Thank you Andrew for your help!
    Eric



    procedure(RowAddRoll()
    foreach(selObj geGetSelSet()
    if(selObj~>row==nil
    then selObj~>row=1)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=selObj~>row+1
    )
    )
    )
    )

    procedure(RowSubRoll()
    foreach(selObj geGetSelSet()
    if(selObj~>row==nil
    then selObj~>row=1)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    if(selObj~>row==1
    then print("Via size is minimum!")
    else
    selObj~>row=selObj~>row-1
    )
    )
    )
    )
    )


    procedure(ColumnAddRoll()
    foreach(selObj geGetSelSet()
    if(selObj~>column==nil
    then selObj~>column=1)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>column=selObj~>column+1
    )
    )
    )
    )


    procedure(ColumnSubRoll()
    foreach(selObj geGetSelSet()
    if(selObj~>column==nil
    then selObj~>column=1)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    if(selObj~>column==1
    then print("Via size is minimum!")
    else
    selObj~>column=selObj~>column-1
    )
    )
    )
    )
    )

    hiSetBindKeys( "Layout" list(
    list("Shift Alt<Btn4Down>" "RowAddRoll()");
    list("Shift Alt<Btn5Down>" "RowSubRoll()");
    list("Ctrl Alt<Btn4Down>" "ColumnAddRoll()");
    list("Ctrl Alt<Btn5Down>" "ColumnSubRoll()");
    ))
     
    eric.d.fitzsimmons, Jan 19, 2009
    #4
  5. By the way, Eric, you could make these a bit simpler:

    procedure(RowAddRoll(incr)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=max((selObj~>row||1)+incr 1)
    )
    )
    )
    procedure(ColumnAddRoll(incr)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>column=max((selObj~>column||1)+incr 1)
    )
    )
    )

    hiSetBindKeys( "Layout" list(
    list("Shift Alt<Btn4Down>" "RowAddRoll(1)");
    list("Shift Alt<Btn5Down>" "RowAddRoll(-1)");
    list("Ctrl Alt<Btn4Down>" "ColumnAddRoll(1)");
    list("Ctrl Alt<Btn5Down>" "ColumnAddRoll(-1)");
    ))

    Note that your parentheses were in the wrong place in your functions - the
    second foreach loop was actually nested within the other one. I'm sure you
    didn't mean to do that...

    I essentially changed it to do selObj~>row||1 to handle the case where the row
    property was nil - it will be either the row property if it's there, or 1
    otherwise. And then the max() takes care of it going below 1 when you're
    decrementing (incr is -1).

    BTW, I didn't test any of this - it's just a casual observation!

    Regards,

    Andrew.
     
    Andrew Beckett, Jan 20, 2009
    #5
  6. Andrew,

    I am new to skill, have some programming training from college many
    moons ago and really appreciate your
    inputs. I am working in a small group and have been asked to pick up
    Skill code changes.

    I have tried this code and it works perfectly.

    Your Skill skills are legendary.

    Thank you,
    Eric
     
    eric.d.fitzsimmons, Jan 21, 2009
    #6
  7. Eric,

    No problem, and thanks for the compliment. One thing I meant to mention before
    is that it's good practice to give your functions a unique prefix (which should
    begin with a capital letter for customer functions) to minimize the chance of
    clashing with anyone else's function that happens to be called the same thing.
    So call them things like EDFcolumnAddRoll and EDFrowAddRoll (I just used your
    initials), or something like that.

    You may well be doing this internally, but it's good practice, in case anyone
    else hasn't picked up on this (I think it talks about it in the SKILL
    documentation).

    Regards,

    Andrew.
     
    Andrew Beckett, Jan 21, 2009
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.