• 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. RE: Can't run schematicFind in a nested loop without GU...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 1046
  • 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

RE: Can't run schematicFind in a nested loop without GUI

jorankin
jorankin over 14 years ago

Hello,

   I am using cadence icfb version 6.1.4.500.8. I am writing to see if you can help me with the following:

   I am trying to run the following commands in a nested for loop:

 

hiiSetCurrentForm('schSchFindForm)
schSchFindForm->schFindPropNameCyclic->value="cellName"
schSchFindForm->schFindPropValueString->value="nmos"
schSchFindForm->schFindSearchScope->value="hierarchy"
schSchFindForm->schFindZoomButton->value= t

n=t

i=0;

while(n

       if(i==0

       then

         schFindSelectObject();

       else

        schFindObject("next");

        schFindSelectObject();

        );if

       ...operations on selected instance

       ...logic to figure out if I've found all the instances, set n=nil if I have

);while

 

The problem is that, given the sch SKILL functions, I can't find a way to get out of this loop once I have selected all of the instances without knowing a priori the number of instances I will find. When i have selected all the instances, a window comes up saying that there are no more to search for, but nothing is actually returned that will let me get out of my while loop.

 

Can you help?

 

Thanks,

John

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    John,

    A bit messy (I probably wouldn't use the find user interface for a batch operation like this), but something like:

    lastReached=nil
    first=t
    while(!lastReached
      if(first then
        schFindSelectObject()
        first=nil
      else
        if(schSetCurrentObject("schFindList" "next") then
          schSetCurrentObject("schFindList" "previous")
          schFindObject("next")
          schFindSelectObject()
          ; do what you want here
        else
          lastReached=t
        )
      )
    )

    Bear in mind that some of the functions here (including those in your code) are undocumented and liable to change in future versions.

    Regards,

    Andrew.

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

    Andrew,

        Thanks for your reply. I ended up doing something similar, but I couldn't quite get it to work. I would set lastReached=t when schFindSelectObject() returned nil. But this wouldn't work in conjunction with deselecting all after I went through the loop. So your using the schSetCurrentObject() function is what I needed.

     

         Another problem with using the schFind -related functions is that it won't find all the cells of a certain instName in the hierarchy. For example, if I want to find a cell called "test" within the hierarchy and the cell is inside another cell, for example called "testWrap" and testWrap is placed twice or more within the hierarchy, the schFind functions will only find the "test" cell one time for the "test" cells inside of the "testWrap" cells.

     

        So I ended up having to use another subroutine to find all the cells within the hierarchy called, for example, "test". Then, I'd find the hierarchical location within the cells and then descend to the location of the particular cell I wanted to select. this takes a lot longer than the schematic find function, but it seems to be easier to control.

     

        You mentioned that you would do this in a less interactive way. What kinds of functions would you use? It seems like I have to have a schematic open to do this. Do you have another way in mind?

    Thanks,

    John

    • 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