• 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. Getting schematic instances from multiple open schemati...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 144
  • Views 16333
  • 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

Getting schematic instances from multiple open schematics

shajujan
shajujan over 11 years ago

Hi,
 
I want write a skill routine that lets the user interactively select instances from multiple schematics & get those instance names. I tried geAddSelectPoint(), but that will prompt the user to select instances only from the current cellview. I tried dbGetOpenCellViews(), but that will get me all the open cellviews in memory including the ones not open currently.
 
Any ideas on how to get started will be much appreciated.
 
Thanks,
Shaju 
 
 
  • Cancel
  • shajujan
    shajujan over 11 years ago

    On 2nd thoughts the more accurate description is a routine to add every instance that a user selects to a list (across multiple schematics) as he/she is selecting it. I need the instName, cellName & libName (s) to use in another routine.

     

    Shaju

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeks
    tweeks over 11 years ago

    There are at least two solutions:

    1. Since geGetSelSet() only handles one window at a time, temporarily rebind the left mouse button to run a custom procedure that selects and then records the selection in a list.

    2. Let the user select everything they want, then iterate through every open window using hiGetWindowList(), calling geGetSelSet() on each, concatenating the results. 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • shajujan
    shajujan over 11 years ago

    Thanks. Both are excellent suggestions. But I'm doing this to select instances for an ADE-XL session. So I found an easier way to do this & tired using "asiSelectInst" with this code: 

        ;get a unique form handle 

        win  = sprintf( nil "%s" hiGetCurrentWindow() )

        form = concat( 'iphdcopTabForm substring(win 8 strlen(win)) )

     

        ;top level form

        unless( boundp(form) 

            hiCreateAppForm(

                 ?name          form 

                 ?formTitle    "Inphi DC Operating Point Report" 

                 ?initialSize   290:200

                 ?buttonLayout  list(

                                    'Empty 

                                     list( 'Create\ Report 'IPHdcopTabCB )

                                     list( 'Close 'hiFormClose )

                                )

     

                 ?fields        list( 

                                    hiCreateStringField(

                                            ?name           'cell

                                            ?prompt         "Test Bench"

                                            ?defValue       axlGetSessionCellName( ses )

                                            ?editable       nil

                                    ) 

                                    hiCreateCyclicField(

                                            ?name           'test

                                            ?prompt         "Select Test" 

                                            ?choices        cadr( axlGetTests(axldb) )

                                    )

                                    hiCreateRadioField(

                                            ?name           'mode

                                            ?prompt         "Sort by"

                                            ?choices        list("Corner" "Instance")

                                            ?defValue       "Corner"

                                    )

                                    hiCreateButton(

                                            ?name           'select

                                            ?buttonText     "Select Instance"

                                            ?callback       "asiSelectInst('inst ?form form)"

                                    )

                                    hiCreateStringField(

                                            ?name           'inst

                                            ?prompt         "Instances"

                                    )

                                )

            )

        )

     

        form->asiSession = asiGetCurrentSession()

        hiDisplayForm(form)


     But I get this warning when I hit the select button & no instances are selected.

     *Warning* No window and/or doneProc argument passed to

              "astiSelectInst", selection not started

     

    Any ideas? 

     

    Thanks,

    Shaju 

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

    A couple of things. First the callback should be:

                                             ?callback       "asiSelectInst('inst ?form symeval(form))"

    and in fact it might make sense to avoid it needing the "form" global variable, so using:

                                             ?callback       sprintf(nil "asiSelectInst('inst ?form symeval('%s))" form)

    might be better still.

    Secondly it requires the design to be open in a tab. It doesn't do that automatically. I can't see a way of ensuring that happens without using private APIs (and I don't really have time now to debug this fully as I'm travelling at the moment). So I suggest you contact customer support for this.

    Thirdly, your form stores asiSession on the form symbol - you might want to use:

    symeval(form)->asiSession=sevEnvironment(asiGetToolSession(ses testName)) 

    and have this updated based on your cyclic field (as a callback) so that it reflect the "right" session for the test. 

    Not fully debugged, as I said, but I did a little experimentation.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • shajujan
    shajujan over 11 years ago
    Andrew,
     
    Thanks for the response.
     
    symeval(form)->asiSession = sevEnvironment( asiGetToolSession(ses symeval(form)->test->value) )
    *Error* eval: undefined function - asiGetToolSession
      
     
    Shaju 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

     Shaju,

    Apologies - that was a typo. It should have been axlGetToolSession.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • shajujan
    shajujan over 11 years ago

    New code. Same problem. Any help/advice appreciated.

     

     ; Create Menus

    procedure( IPHdcopTabForm()

        prog(( ses axldb hist win form sym )

     

        ;get db & history for this session

        ses   = axlGetWindowSession()

        axldb = axlGetMainSetupDB( ses )

        hist  = axlGetCurrentHistory( ses )

     

        ;check for an open ade-xl session

        unless( ses

            message( sprintf(nil "No active ADE-XL session\n") "ERROR" )

            return(nil)

        )

     

        ;make sure that an active setup is loaded

        if( hist == 0 then

            message( sprintf(nil "No active setup loaded in current ADE-XL session\n") "ERROR" )

            return(nil)

        )

     

        ;get a unique form handle

        win  = sprintf( nil "%s" hiGetCurrentWindow() )

        form = concat( 'iphdcopTabForm substring(win 8 strlen(win)) )

     

        ;top level form

        unless( boundp(form)

            hiCreateAppForm(

                 ?name          form

                 ?formTitle    "Inphi DC Operating Point Report"

                 ?initialSize   290:200

                 ?buttonLayout  list(

                                    'Empty

                                     list( 'Create\ Report 'IPHdcopTabCB )

                                     list( 'Select\ Instances "asiSelectInst('inst)" )

                                     list( 'Close 'hiFormClose )

                                )

     

                 ?fields        list(

                                    hiCreateStringField(

                                            ?name           'cell

                                            ?prompt         "Test Bench"

                                            ?defValue       axlGetSessionCellName( ses )

                                            ?editable       nil

                                    )

                                    hiCreateCyclicField(

                                            ?name           'test

                                            ?prompt         "Select Test"

                                            ?choices        cadr( axlGetTests(axldb) )

                                            ?callback       sprintf( nil "IPHdcopTestCB(symeval('%s))" form )

                                    )

                                    hiCreateRadioField(

                                            ?name           'mode

                                            ?prompt         "Sort by"

                                            ?choices        list("Corner" "Instance")

                                            ?defValue       "Corner"

                                    )

                                    hiCreateStringField(

                                            ?name           'inst

                                            ?prompt         "Instances"

                                            ?defValue       "*"

                                    )

                                )

            )

        )

     

        sym  = symeval( form )

        sym->asiSession = sevEnvironment( axlGetToolSession(ses sym->test->value) )

        hiDisplayForm(form)

        return(t)

     

    ))

    ; Callback for 'test' field

    procedure( IPHdcopTestCB(iphdcopTabForm)

        prog(( ses test )

     

        ses    = axlGetWindowSession()

        test   = iphdcopTabForm->test->value

        printf( "DEBUG> %s\n", test )

     

        iphdcopTabForm->asiSession = sevEnvironment( axlGetToolSession(ses test) )

     

    ))


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • shajujan
    shajujan over 11 years ago
    Does asiSelectInst() work for ADE-XL or it is a ADE-L only function?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Yes, but it requires the test design to have been opened in a tab first, because it doesn't tie up the design with the ADE session id otherwise.

    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