• 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. Digital Implementation
  3. all_fanin is returning a point when set to a variable

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 92
  • Views 15584
  • 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

all_fanin is returning a point when set to a variable

0007
0007 over 15 years ago

Hi

I am working on SOC encounter command: all_fanin

it is returning fanin of a particular pin and a pointer.

when I run

set x [all_fanin -to ...]

a pointer is store in x . how to get actula names of the fanin in a list x?

can any one help me out in sorting this issue?

  • Cancel
  • anurag
    anurag over 15 years ago
    Hi,
    all_fanin returns collection. To get this collection you can try query_objects.

    encounter 1> set x [all_fanin -to DTMF_INST/DIGIT_REG_INST/digit_out_reg_7/CK]
    0x4bd
    encounter 2> query_object $x
    DTMF_INST/DIGIT_REG_INST/digit_out_reg_7/CK DTMF_INST/TEST_CONTROL_INST/i_156/Y

    Thanks,
    -Anurag
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 0007
    0007 over 15 years ago

    Thank you Anurag.

    Yeah! query_objects is printing the names of the fanin.

    But it is not able to set the names to a list. I want to do some operations on the fanin.

    index_collection is working but again if you set the output it is settting a pointer

    get_object_name is working for me and is as below:

    set lin [all_fanout -from [dbGet selected.name] -only_cells -endpoints_only]

    foreach_in_collection k $lin {
    selectInst [get_object_name $k]

    if {[dbGet selected.cell.isSequential]} {
    dbSet [dbGet selected].pt $PT
    }
    deselectInst [get_object_name $k]
    }

    }

    Thanks and Regards,

    Anil

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • A Netherton
    A Netherton over 15 years ago

    I notice query_objects used to return a Tcl list, but that stopped at ETS version 7.1

    As Anil noted above, it's possible to return the object name for a single_object_collection.  Can anyone help me get a Tcl list of the object names in a collection that contains more than one object?  I have a Tcl procedure I'd like to pass the list to.

    Thanks and regards,

    Anita

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 0007
    0007 over 15 years ago

    You can use set y  [lindex $x 0]  and work on y where x has all the names but it is considered as a single element.

    x   1 3 4 5455 55     ---- considered as one elemet

    y   1 3 4 5455 55    -------consideres as 6 element list

     You can pass this list to the procedure.

     

    You can run a for loop and use lappend:

    set lis [

    for .......{

    lappend lis name

     }

     

    Regards,

    Anil

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 15 years ago

    Great discussion here folks.  I confirm there was a behavior change in 7.1.USR1 whereby query_object stopped returning a tcl list of object names when passed a collection.

    I've requested a new command be introduced that will provide this functionality.  In the meantime, here's an example procedure that should do this:

    proc user_get_object_names {collection} {
      set objectList {}
      foreach_in_collection item $collection {
        lappend objectList [get_object_name $item]
      }
      return $objectList
    }

    I'm curious why it's beneficial to have this functionality.  I can understand needing to crossover between CTE-TCL and FE-TCL, but not necessarily why it's beneficial to convert a list of objects from a CTE-TCL collection to a tcl list.  I generally either use dbGet -or- a foreach loop -or- a foreach_in_collection loop and don't need to convert collections to lists of names all at once.  If someone had examples where this was beneficial it could help me drive the functionality more urgently.

    Thanks!
    -Bob

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • A Netherton
    A Netherton over 15 years ago

    Thanks, Anil and Bob.

    In answer to your question, Bob, I was trying to reuse an existing tcl procedure.  I have since updated it so I can pass in a collection.

    Thank you both for the support!

    Anita

    • 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