• 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. Get right full path of instance with recursion in schem...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14121
  • 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

Get right full path of instance with recursion in schematic

huqy
huqy over 6 years ago

I want to get the full path of specific instance in schematic with the way of recursion.

my core code as below.

procedure(PadHierConnectDeviceinfoCB(cv theform techlib)
  let((file
       outf
       name
       wID
      )
    powernet = nil
    flag = nil
    name = theform~>listbox~>value
    powernet = theform~>powernet~>value
    when(member(powernet name)
      flag = t
     )
    ;printf("flag:%L\n" flag)
    PadHierInfoTbl = makeTable("PadHierInfoTbl" nil)
    metalresTbl = makeTable("metalresTbl" nil)
    cellnamehierTbl = makeTable("cellnamehierTbl" nil)
    file = strcat(cv~>cellName "_PadHierConnectDeviceinfo.log")
    outf = outfile(file)
    foreach(netname name
      if(wID = geValidateWindow(geGetEditCellViewWindow(cv))
          then
              geAddNetProbe(wID list("y0" "drawing") strcat(geGetInstHier(wID) "/" netname))
          else
              artWarn("invalid windowID,probe is failed\n")
         ) ;;if
      fprintf(outf
              "\n**********PadName:%L*****CurrentTopView:%L*****CreateTime:%L**********\n"
              netname
              cv~>cellName
              getCurrentTime()
             )
      fprintf(outf "%-35s %-20s %-15s %-35s\n" "cellName" "TermConnectPad" "total W&R" "instName")
      traverseCvCB(cv netname techlib outf)
     )
    close(outf)
    view(file)
   )
 )

procedure(traverseCvCB(cv netname techlib outf)
  let((nextCellView
       net
       insts
       netnames
       unchecklib
      )
    PadHierInfoTbl = makeTable("PadHierInfoTbl" nil)
    dulcell = makeTable("dulcell" nil)
    unchecklib = list("basic" "analogLib" "sheet_cps" "sheet_61" "US_8ths")
    ;println(cv~>cellName)
    unless(net = dbFindNetByName(cv netname)
      artWarn("cannt find net:%L in currentview:%L\n" netname cv~>cellName)
     )
    ;printf("netname:%L\n" net~>name)
    netnames = uniquelist(net~>instTerms~>term~>name)
    insts = net~>instTerms~>inst
    foreach(netname netnames
      foreach(master insts
        when(member(netname master~>instTerms~>name)
          if((master~>libName == techlib) || (master~>libName == "analogLib")
              then
                  unless(PadHierInfoTbl[master]
                    PadHierInfoTbl[master] = t
                    ;printf("master:%L\n" master~>cellName) 
                    reportCB(techlib master net~>name outf)
                   ) ;;unless
              else
                  ;printf("cv:%L\n" master~>name)
                  unless(member(master~>libName unchecklib)
                    nextCellView = dbOpenCellViewByType(master~>libName
                                                        master~>cellName
                                                        "schematic"
                                                        nil
                                                        "r"
                                                       )
                    unless(PadHierInfoTbl[nextCellView]
                      PadHierInfoTbl[nextCellView] = t
                      traverseCvCB(nextCellView netname techlib outf)
                     ) ;;unless
                   ) ;;unless
             ) ;;if
         ) ;;when
       ) ;;for
     ) ;;foreach
   ) ;let
 ) ;proc

there are some code in the subProcedure "reportCB"  to find specific instance and report it.

in last week I try many ways ,but I cannot get the right path. 

OR is there any function can open it ? just like "show instance" in probe assistance,like below. 

If it is ok, should I use hiCreateReportField?

I am use "sub-version  IC6.1.7-64b.500.21 ".

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    I reformatted your code as without any indentation it was impossible to read (I updated your post with the formatted code). 

    Unfortunately having read through the code, I can't really work out what you're intending it to do - you mention you've tried many ways (and this is one of them) but unless you clearly explain what the code is supposed to do, it's going to be pretty hard to help.

    I think going via customer support is likely to be a good idea here, as this will probably need some time to work out the precise requirements and clarify how this should best be done. So that's what I'd suggest...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • huqy
    huqy over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

     I just want to find specific Instance and it's corresponding path (for convenience, I can find the specific instance in schematic) throuth skill in schematic.

    until now, I can realize the step one,but I cannot find the correct path throuth my skill code which I posted above. 

    I tried many ways means that I modified many times on my code which I posted above, unfortunately I still cannot make it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • huqy
    huqy over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

     I just want to find specific Instance and it's corresponding path (for convenience, I can find the specific instance in schematic) throuth skill in schematic.

    until now, I can realize the step one,but I cannot find the correct path throuth my skill code which I posted above. 

    I tried many ways means that I modified many times on my code which I posted above, unfortunately I still cannot make it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to huqy

    The thing that is not clear is how do you define what is the "specific instance" and what exactly are you expecting the output to look like? I just don't understand what you're providing and what it is expected to compute.

    You've provided some code, but without knowing the precise objectives (ideally with some examples) it's going to be hard to help. That's why I suggested you contact customer support as then you can perhaps have a web-sharing session with the application engineer so that you can show what you're expecting, as maybe it's difficult for you to describe in words.

    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