• 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 cell - skill function

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 143
  • Views 8768
  • 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 cell - skill function

swdesigner
swdesigner over 14 years ago

I currently bind my key to call schHiDescend, and work on the form.

 

Is there a way to bypass the form and call a function with the name of an instance in the current cellview to descend into it?

 

Thanks

  • Cancel
  • swdesigner
    swdesigner over 14 years ago

    Thanks Andrew,

     

    I verified this works. I guess the documentation needs to be updated then...

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • swdesigner
    swdesigner over 14 years ago
    Okay, I have basic functionality, but there's still work to do... When I'm browsing a configuration, the schHiDescend form gives me options with the default being what is set in the configuration (hierarchy editor) How can I set my viewNameList to be that...? Any clues would be great. Thanks!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    You could use this code:

    /* abWhichView.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Oct 03, 2005 
    Modified   
    By         
    
    Function which can be used as a label on a symbol, to say
    which view is being used in a config.
    
    Create an ILLabel, with value "abWhichView()"
    
    ***************************************************
    
    SCCS Info: @(#) abWhichView.il 10/03/05.15:07:34 1.1
    
    */
    
    /*******************************************************************
    *                                                                  *
    *                   (abWhichView [instId] [wid])                   *
    *                                                                  *
    *     Returns the name of the view bound in the config, or nil     *
    * if there is no config. instId defaults to ilInst - the currently *
    *     drawn instrane, and wid defaults to the current window.      *
    *                                                                  *
    *******************************************************************/
    
    (procedure (abWhichView @optional (instId ilInst) (wid (hiGetCurrentWindow)))
      (let (pathVector bindInfo)
           (setq pathVector (deGetVector wid))
           (when pathVector
                 (setq bindInfo
                       (hdbBind 
                        pathVector 
                        (dbGetq instId libName)
                        (dbGetq instId cellName)
                        (dbGetq instId viewName)
                        (dbGetq instId name)
                        nil nil nil
                        ))
                 ;-----------------------------------------------------------
                 ; The third entry in the list is the view used
                 ;-----------------------------------------------------------
                 (caddr bindInfo)
                 ) ; when
           ) ; let
      ) ; procedure 
    
     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • swdesigner
    swdesigner over 14 years ago

    Hello Andrew,

             This still doesn't do it. I think what I need already exists.. but I don't know how to get my hands on it.. Let me explain..

     The code you provided gives me the view being used if I'm viewing a config. If not, pathVector doesn't exist. In that case what do I do?

    However, when I use the descend function (default bindkey is 'e'), Cadence already knows what order to give me the views in... if it's a config, it puts the view being used first in the drop-down menu for view.. If it's not a config, and a schematic view exists, it gives me that on top.

    So, the work is already done. How can I get "that" view (that Cadence puts at the top of the list when using the descend dialog) without using the form, through skill.

    Why do I want to bypass the form?

    Because there is a bug that causes a remnant of that form to remain after bindkey based interaction... some of the time.. and it's an annoyance...

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 14 years ago

    Will geSwitch do what you want?

     geSwitch(
    w_windowId
    t_accessMode
    d_instId
    x_iteration
    x_row
    x_col
    [ g_cancel ]
    )
    => t / nil

    Switches into an instance.
    w_windowId->viewNameList is used as a switch for the instance. w_windowId must be a valid Graphics Editor window with at least one stack element, and d_instId must be an instance in the edit cellview in w_windowId.

    Derek

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • swdesigner
    swdesigner over 14 years ago

    Okay, with this and Andrew's code, I have something that works..  and then some!!

    (let (n instId pathVector bindInfo wid myFileSpec)

          (when (instId = car(geGetSelSet() ) )

          n = instId~>name;

          rexCompile(":[0-9]>");

          n = rexReplace(n ">" 1);     to handle arrayed instances

               wid = hiGetCurrentWindow()

              (setq pathVector (deGetVector wid) )

             if( pathVector

                 then

                       (setq bindInfo

                              (hdbBind

                                  pathVector  

                                        (dbGetq instId     libName)

                                        (dbGetq instId cellName)

                                         (dbGetq  instId viewName)

                                         (dbGetq    instId   name)

                                          nil nil nil

                              ) ; setq

                     myFileSpec = list( nil 'instanceName n 'viewNameList caddr(bindInfo) );

                     dePush("myFileSpec wid "read");

              else

                    geSwitch( wid "r" instId 0 0 0)

             ) ; if

         ) ; when

    ) ; let

     

    Thanks guys!!

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • swdesigner
    swdesigner over 14 years ago

    Bottom line, this code doesn't work reliably. My EDA folks suggest that

     

              (setq pathVector (deGetVector wid) )

     

    is the problem - pathVector obtained from the current window is not reliable for binding information. The suggestion was to consider the example in $CDSHOME/tools/hdb/examples/hdbTraverse.il

    My problem - it seems really complicated. Is anyone familiar enough with that exmple to suggest an alternative to deGetVector for setting pathVector?

    Thanks!!

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • swdesigner
    swdesigner over 14 years ago

    Here's the final solution (help from CCS). It does not avoid form interaction unfortunately - but uses hiRegTimer to ensure that the skill interacts with the form after sufficient delay :

    in .cdsinit :

    load("/path/to/CCSDescend.il")

    hiSetBindKey("Schematics" "<Key>e"  "CCSQueryUserSchHiDescend()")
    hiSetBindKey("Schematics" "Ctrl<Key>x" "CCSNoQueryUserSchHiDescend()")

    CCSDescend.il :

     procedure(CCSNoQueryUserSchHiDescend()
        envSetVal("schematic" "descendTarget" 'string "use viewNameList")

        if( (1 < car( geGetSelSet()~>numInst) )
            then
                hiRegTimer("hiFormDone(schDescendIterForm)" 2)
            else
        )
        schHiDescendRead()
    )

    procedure(CCSQueryUserSchHiDescend()

    envSetVal("schematic" "descendTarget" 'string "query user")
    schHiDescendRead()
    )

    • 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