Need pins from schematic.

Discussion in 'Cadence' started by eric.d.fitzsimmons, Feb 25, 2009.

  1. Hello,

    I want to have some skill that gets the pins(interface terminals) and
    eventually write them out to a file. I think I can figure out the
    latter with some effort, the former I have so far:

    cv = hiGetCurrentWindow();this seems to "pick" the schematic rather
    than the layout, seems ok.
    PinList = cv~>pin~>name

    The first line seems to "pick" the schematic rather than the layout,
    seems ok.
    The second line was my best guess, and doesn't work and returns
    nil. This is what I see
    when I place this code in the CIW.

    Thank you for any help,
    Eric
     
    eric.d.fitzsimmons, Feb 25, 2009
    #1
  2. eric.d.fitzsimmons

    bu-bu Guest

    Hello Eric,

    Open a schematic view and run the following:

    procedure(SchPins()
    let((cv)
    cv = geGetWindowCellView()

    foreach(instance cv~>instances
    if(instance~>cellName == "ipin" || instance~>cellName == "opin"
    || instance~>cellName == "iopin"
    then println(instance~>pin~>term~>name)
    ) ;;if

    ) ;; foreach
    ) ;; let
    ) ;; procedure

    Maybe the code is a little bit heavy, but it works.

    I hope it helps

    Best,

    bubu
     
    bu-bu, Feb 25, 2009
    #2
  3. It works great!
    Thanks bubu!
    Eric
     
    eric.d.fitzsimmons, Feb 25, 2009
    #3
  4. Better would be to directly look at the terminals rather than pins. Pins are
    primarily there to give a physical representation of the connection; terminals
    are the logical connection:

    procedure(ABwriteTerminals(fileName @optional (cv geGetEditCellView()) "td")
    let((prt)
    unless(prt=outfile(fileName)
    error("Could not open %s for writing" fileName)
    ) ; unless
    foreach(term cv~>terminals
    fprintf(prt "%s\n" term~>name)
    ) ; foreach
    close(prt)
    ) ; let
    ) ; procedure

    Then make sure the window you want to process is the current window (hit a key
    in the window, or use a pulldown to make it the "current" window), and then in
    the CIW type:

    ABwriteTerminals("./termReport.txt")

    Regards,

    Andrew.
     
    Andrew Beckett, Feb 26, 2009
    #4
  5. Oh man! That is sweet!

    Thank you,
    Eric
     
    eric.d.fitzsimmons, Feb 26, 2009
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.