• 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. How to fetch pin-names and pin-directions?

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 9506
  • 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

How to fetch pin-names and pin-directions?

Sandeep Kailasa
Sandeep Kailasa over 2 years ago

Hello Everyone,

I am trying to get the pin names and their directions.

To get the pinName i am using the command "cv~>conns~>net~>pins~>term~>name", is their any other best way to get pin names.

In my code below  I am using 3 lists in_pins, out_pins and inout_pins to store the pins based on their direction. I copied only part of the code here. I am getting the outputs as nil. Can anyone please help me here.

Code Snippet:

foreach(p cv~>conns~>net~>pins~>term 
      case(p~>direction

            ("output"
            out_pins=cons(p~>name out_pins)
             )
          ("input"
          in_pins=cons(p~>name in_pins)
           )
          ("inputOutput"
          inout_pins=cons(p~>name inout_pins)
          )
     );case

);foreach

Thanks,

Sandeep

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

    Sandeep,

    That is a very convoluted way of getting to the terminal names of the current cellView. It's unnecessarily complicated, will be slow (for a design with a lot of connections) and also the case statement can't work because the cv~>conns~>net~>pins~>term is returning a list of lists - and your code is not dealing with that.

    The out_pins, in_pins and in_out pins will not get set by your code as it stands.

    If instead you just use foreach(p cv~>terminals and leave the rest of the code the same, it will work. In other words, you can get to the terminals for the cellView simply with cv~>terminals .

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sandeep Kailasa
    Sandeep Kailasa over 2 years ago in reply to Andrew Beckett

    Thanks Andrew,

    • In my top cell, there are many cell-instances, I have to report the pins those instances are connected to.
    • After fetching pins, i have to print them accordingly as input pins ,outpins and iopins.

    If I use cv~>terminals , I will be getting all the pins in the Top-cell, but I want to fetch the pins that instances are connected to in Top-cell.

     So , I cannot use cv~>terminals here.

    Sandeep

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Sandeep Kailasa

    Sandeep,

    Well, iterating over cv~>conns~>net~>pins~>term won't do that either. You could iterate over the structure (because each net has a list of pins) by doing this with:

    foreach(net cv~>conns~>net
      foreach(p net~>pins~>term

    and then your case statement inside the inner loop, but you can then end up with the pins listed more than once. It seems a very odd way of going about solving any problem... whatever the problem might be.

    It's really not clear what you're trying to do here. Are you trying to find all the top level pins that are connected to an instance (i.e. omitting any floating top-level pins), or are you trying to find, for each instance, whether that instance is connected to a top level pin and if so, which? Or something else?

    I could give many examples of iterating over the connectivity, but trying to guess what you really want is difficult and showing every possibility is not feasible.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sandeep Kailasa
    Sandeep Kailasa over 2 years ago in reply to Andrew Beckett

    Andrew,

    I want to iterate through each instance in the cell.

    Thanks,

    Sandeep

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Sandeep Kailasa
    Sandeep Kailasa over 2 years ago in reply to Andrew Beckett

    Andrew,

    I want to iterate through each instance in the cell.

    Thanks,

    Sandeep

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Sandeep Kailasa

    Sandeep,

    That still doesn't really explain what you're trying to do, but presumably you want to do something like:

    foreach(inst cv~>instances
      foreach(instTerm inst~>instTerms
        foreach(signal instTerm~>net~>signals
          when(signal~>term
            printf("Instance %s pin %s connects to external pin %s direction %s\n" inst~>name instTerm~>name signal~>term~>name signal~>term~>direction)
          )
        )
      )
    )

    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