• 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. Descending into a specific instance using Virtuoso Edit...

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 143
  • Views 21202
  • 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

Descending into a specific instance using Virtuoso Edit-In-Place

DannyRitt
DannyRitt over 9 years ago

Hello,


At a TOP level layout block there are many instances that overlaps each other. Sometimes it can get tricky to select a specific cell and Edit In Place into it. I am looking for a SKILL script to click anywhere on the TOP level, it will pop a window with the instances names underneath. Upon selecting the instance, it will Edit-In-Place into it.

Any directions or tips are greatly appreciated.

Thanks,

Danny

  • Cancel
  • skillUser
    skillUser over 9 years ago
    Which version are you using? In IC616/ICADV121 (and possibly IC615 too?) there is a feature whereby a toolbar ("Show Selection Info") shows information about a shape or instance that would be selected. Also, for me, if I don't have anything selected and choose Edit -> Hierarchy -> Edit in Place (or the 'x' bindkey) the prompt shows "Point a shape in the cellview to be edited in place" and a highlight shows around the cell that the shape is contained in (plus the Selection Info toolbar is updating as the mouse moves around). This is not quite what you're asking for, but I think it would help. Regards, Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago
    Thanks Lawrence, I am using version 6.1.6. The point is that in top level there can be many instances down.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago

    I created the next SKILL code which successfully identifies instances under the cursor. Hover with the mouse above the TOP level and activate the function:

    getInstUnderCursor()

    It will pop a form with the instances under the cursor.

    1. The best way is to simply Click on a TOP level block and then the form will open, showing all instances beneath.

    2. When I select an instance and click: EIP, it fails.

    Any tips are greatly appreciated.

    Thanks,


    Danny

    -----------------------------------------------------------------------

    ;-----------------------------------
    ; Get the Instances under the cursor
    ;-----------------------------------
    procedure(getInstUnderCursor(@optional (point nil))
    let((instList listLegth n cv)
    cv=geGetWindowCellView()

    unless(point point=hiGetPoint(hiGetCurrentWindow()))
    instList=leSearchHierarchy(cv list(point point) 32 "inst" nil)

    ; Remove Duplication  
    instList=myUniqueList(instList)

    if(instList
            then

             listLegth = length( instList )

             for( n 1 listLegth
               instancesList=append1(instancesList nthelem( n instList~>cellName ))
                )
            else printf("Nothing found under the cursor/at given point")
            )
        ; Remove Duplications
        instancesList=myUniqueList(instancesList)
        printf("Detected Instances: %N\n" instancesList)
        selectiveEIPApp()
    ))

    ;---------------------------
    ; Remove List's Duplications
    ;---------------------------
    procedure(myUniqueList(aList)
        let((uTable newList)
            uTable = makeTable("uTable" nil)
            foreach(element aList
                unless(uTable[element]
                    newList = cons(element newList)
                    uTable[element] = t
                )
            )
            reverse(newList)
        )
    )

    ;--------------------
    ; Creating the form
    ;--------------------
    procedure( createSelectiveEIPForm()
       let( (viewInsts viewNameR selectEIP)

         viewNameR=hiCreateStringField(
                    ?name 'viewNameR
                    ?prompt "CellView Name"
                    ?value ""
                    ?callback ""
                    )

         selectEIP = hiCreateButton(
            ?name           'selectEIP
            ?buttonText     "EIP"
            ?callback       "leEditInPlace( hiGetCurrentWindow() list(list(geGetWindowCellView()~>cellName 0 0 0) list(selectiveEIPForm->viewNameR->value 0 1 2) ) )"
                    )


         viewInsts = hiCreateListBoxField(
              ?name    'viewInsts
              ?choices instancesList
              ?multipleSelect nil
                            )

          hiCreateAppForm(
             ?name 'selectiveEIPForm
             ?formTitle "Selective EIP"
             ?fields list(
                        list(viewNameR 0:5 400:30 200)
                        list(viewInsts 0:35 400:80 200)
                        list(selectEIP 0:90 100:30 200)
                         )
             ?callback ""
             ?initialSize list(450 450)
          ) ;hiCreateAppForm

          hiDisplayForm('selectiveEIPForm)

       ) ;let
    ) ;procedure

    ;-------------
    ; Entry point
    ;-------------
    procedure(selectiveEIPApp()
        unless(boundp('selectiveEIPForm)
            createSelectiveEIPForm()
            )
        hiDisplayForm(selectiveEIPForm)
        )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Danny,

    If you pre-select the instance (either interactively, or using the Navigator Assistant - Window→Assistants→Navigator and then selecting from the list), and then do Edit in Place, it will edit in place into that instance. Does that do what you want?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago

    Hi Andrew,

    Yes, but sometimes it can get tricky when you have many instances in the top level block. You need to hover above the top cell trying to "catch" the exact cell that you are interested to descend into. The idea was to click on the TOP level, a window pops with all instances under the cursor, the user selects the instance that he/she interested to descend into and click EIP. Then the window closes and the user is in EIP inside that cell.

    The EIP should go only one level down though. I am not sure that we can identify in SKILL the entire path incase of many instances.

    Thanks,

    Danny

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Danny, that's my point though - if you use the navigator, you get a list of all the instance names and then you can select the one you want before doing edit in place - no need for tricky hovering... So this can be done already without needing SKILL. Not sure if you can descend further down the hierarchy in one shot though - I'd have to try that.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago

    Yes, this is a viable solution.  

    Yet, having a window pop and offers quick selection releases my left tool box for other options.

    Thanks,

    Danny

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago

    The script that I posted already works, the only issue that I have is how to EIP using the command:

    leEditInPlace( hiGetCurrentWindow() list(list(cv~>geGetWindowCellView() 0 0 0) list(selectiveEIPForm->viewInsts->value 0 1 2) ) )
                  
    This command somehow doesn't EIP.

    The script already successfully identifying all instances and load them into the ListBox. Now, per the user's selection it should simply EIP to teh selected instance...

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DannyRitt
    DannyRitt over 9 years ago

    And another approach. This version loads instances under the mouse Click into a form. Upon selecting an instance an EIP operation should be performed, into the selected instance. The issue is with the: leEditInPlace() command.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    procedure(findInstances()
            enterPoints(?addPointProc "inst_Add" ?cmdName "FindInstance")
    )

    procedure(inst_Add(win points)
            let((point obj instList n listLegth )
                    cv = win->cellView
                    instancesList=()
                    when(and(windowp(win) dbobjectp(cv))
                            if(or(cv->cellViewType == "maskLayout" cv->cellViewType == "maskLayoutXL")
                            then
                                    when(point = car(last(points))
                                            when(deGetEIP(win)
                                                    point = geWindowToEditPoint(win point)
                                            )
                                            if(point=hiGetPoint(hiGetCurrentWindow())
                                            then
                                                    let((wbox sz loc inStr div)

                                                         instList=leSearchHierarchy(cv list(point point) 32 "inst" nil)

                                                         ; Remove Duplication  
                                                         instList=myUniqueList(instList)

                                                         if(instList
                                                             then
                                                         listLegth = length( instList )

                                                          for( n 1 listLegth
                                                            instancesList=append1(instancesList nthelem( n instList~>cellName ))
                                                             )
                                                             else printf("Nothing found under the cursor/at given point!\n")
                                                             )
                                                             ; Remove Duplications
                                                             instancesList=myUniqueList(instancesList)
                                                             printf("Detected Instances: %N\n" instancesList)

                                                             ; For first time window opening
                                                             unless(boundp('selectiveEIPForm)
                                                               createSelectiveEIPForm()
                                                              selectiveEIPForm~>viewInsts~>choices=instancesList
                                                              )
                                                              selectiveEIPForm~>viewInsts~>choices=instancesList

                                                             ; Show the Form
                                                             selectiveEIPApp()

                                                           ) ; let
                                            else
                                                    printf("*INFO* No valid instance at point.")
                                            )
                                    )
                            else
                                    printf("*INFO* CellView is not a layout - %s : %s" cv->cellName cv->cellViewType)
                            )
                    )
            )
    )

    ;---------------------------
    ; Remove List's Duplications
    ;---------------------------
    procedure(myUniqueList(aList)
        let((uTable newList)
            uTable = makeTable("uTable" nil)
            foreach(element aList
                unless(uTable[element]
                    newList = cons(element newList)
                    uTable[element] = t
                )
            )
            reverse(newList)
        )
    )


    ;--------------------
    ; Creating the form
    ;--------------------
    procedure( createSelectiveEIPForm()
       let( (viewInsts viewNameR selectEIP)

         viewNameR=hiCreateStringField(
                    ?name 'viewNameR
                    ?prompt "CellView Name"
                    ?value ""
                    ?callback ""
                    )

         selectEIP = hiCreateButton(
            ?name           'selectEIP
            ?buttonText     "EIP"
            ?callback       "leEditInPlace( hiGetCurrentWindow() list(list(cv~>geGetWindowCellView() 0 0 0) list(selectiveEIPForm->viewInsts->value 0 1 2) ) )"
                    )


         viewInsts = hiCreateListBoxField(
              ?name    'viewInsts
              ?choices instancesList
              ?multipleSelect nil
                            )

          hiCreateAppForm(
             ?name 'selectiveEIPForm
             ?formTitle "Selective EIP"
             ?fields list(
                        list(viewNameR 0:5 400:30 200)
                        list(viewInsts 0:35 400:120 200)
                        list(selectEIP 20:120 100:30 200)
                         )
             ?callback ""
             ?initialSize list(450 450)
          ) ;hiCreateAppForm

          hiDisplayForm('selectiveEIPForm)

       ) ;let
    ) ;procedure

    ;-------------
    ; Entry point
    ;-------------
    procedure(selectiveEIPApp()
        unless(boundp('selectiveEIPForm)
            createSelectiveEIPForm()
            )
        hiDisplayForm(selectiveEIPForm)
        )


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Unknown said:
    leEditInPlace( hiGetCurrentWindow() list(list(cv~>geGetWindowCellView() 0 0 0) list(selectiveEIPForm->viewInsts->value 0 1 2) ) )

    There are four problems with this:

    1. The first sublist you're trying to use cv~>geGetWindowCellView() which is going to fail - you can't start from a cellView id and then call a function like that.
    2. The list which is the second argument is expecting to have instance id information. The first sublist has the cellView you're starting from, not the instanceId.
    3. The second sublist you have the name of the instance, not the instanceId (which is a database object)
    4. You are asking it to descend into a particular element of a mosaic - the second row and third column (they're zero-indexed so that's why 1,2 means 2nd and 3rd). I assume that's just because you saw this in the documentation example...

    Anyway, I think you want this (untested, but I think this is roughly it):

    leEditInPlace(hiGetCurrentWindow() list(list(dbFindAnyInstByName(geGetEditCellView() car(selectiveEIPForm->viewInsts->value)) 0 0 0)))

    I think the car is needed because the listbox will have a list of the instance names (you can check this in the CIW after selecting the instances you want).

    Anyway, something like that...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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