• 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. Mixed-Signal Design
  3. Hierarchy dump into a file

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 64
  • Views 8339
  • 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

Hierarchy dump into a file

RaghavendraN
RaghavendraN over 2 years ago

In continuation to the post https://community.cadence.com/cadence_technology_forums/f/mixed-signal-design/55546/skill-script-for-instance-extraction/1387720#1387720 , I would like to dump the hierarchy of the certain nodes of all the instances found using the command CCSPrintTable2(CCSFindCellInHier("search_name")) into a file. Lets say that instance has 5 terminal, I want to dump only 1 terminal node hierarchy into a file. Lets say instance named dff has 4 internal terminals namely clk,d,vdd,vss. But these terminals(clk,d,vdd,vss) aNotes_230118_235326 (1).pdfre connected at one level up with different names(clk_1,d_1,vdd_1,vss_1). I want to use one level up during hierarchial node dump into a file.    

  • Cancel
Parents
  • Saloni Chhabra
    Saloni Chhabra over 2 years ago

    Hi Raghavendra,

    Using the SKILL you have, the information you need about net names corresponding to instance terminals is already being printed in CIW. So, all you need is the same information to be written into a file? And on top of that, you'd like to narrow down this information by providing the cell name and terminal name as inputs to the script?

    Regards,

    Saloni

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RaghavendraN
    RaghavendraN over 2 years ago in reply to Saloni Chhabra

    Yes. That is correct. for the attached pdf in initial thread, terminal name is ck. In the hierarchy that gets printed to the file, i want ck_1 to be the net name at the end of hierarchy sentence. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Saloni Chhabra
    Saloni Chhabra over 2 years ago in reply to RaghavendraN

    You just need to add or replace print commands in the code to direct the output to a file. e.g. I updated CCSPrintTable1 procedure to create a file called 'instinfo.txt'. fprintf is the command to write to a file.

    procedure(CCSPrintTable1(tbl)
    p = outfile("instinfo.txt")
    foreach(key1 tbl
      printf("Hier Inst: %s\n" key1)
      fprintf(p "Hier Inst: %s\n" key1)
    foreach(key2 tbl[key1]
      printf("%-5s Pin %-10L connected to Net %-10L\n" "" key2 tbl[key1][key2])
      fprintf(p "%-5s Pin %-10L connected to Net %-10L\n" "" key2 tbl[key1][key2])
    ) ;foreach
    ) ;foreach
    tbl
    close(p)
    )

    Contents of instinfo.txt:

    Hier Inst: F1
    Pin "F1.PLUS" connected to Net "net3"
    Pin "F1.MINUS" connected to Net "net4"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RaghavendraN
    RaghavendraN over 2 years ago in reply to Saloni Chhabra

    I was expecting contents of file like below:

    F1.net3

    F1.net4

    I I give arguments to the print1 procedure as PLUS, it should print below into a file:

    F1.net3 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Saloni Chhabra
    Saloni Chhabra over 2 years ago in reply to RaghavendraN

    Hi,

    All the information you need is already being extracted by the code - you just need to use the correct fprintf command to present it in a way you prefer.

    procedure(CCSPrintTable1(tbl)
      p = outfile("instinfo.txt")
      foreach(key1 tbl
      printf("Hier Inst: %s\n" key1)
      foreach(key2 tbl[key1]
      printf("%-5s Pin %-10L connected to Net %-10L\n" "" key2 tbl[key1][key2])
      fprintf(p "%s.%s\n" key1 tbl[key1][key2])
      ) ;foreach
      ) ;foreach
      tbl
      close(p)
    )

    This will return the format you asked for in a file called instinfo.txt. You still need to run the code the same way as before i.e. CCSPrintTable1(CCSFindCellInHier("dff"))

    -Saloni

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Saloni Chhabra
    Saloni Chhabra over 2 years ago in reply to RaghavendraN

    Hi,

    All the information you need is already being extracted by the code - you just need to use the correct fprintf command to present it in a way you prefer.

    procedure(CCSPrintTable1(tbl)
      p = outfile("instinfo.txt")
      foreach(key1 tbl
      printf("Hier Inst: %s\n" key1)
      foreach(key2 tbl[key1]
      printf("%-5s Pin %-10L connected to Net %-10L\n" "" key2 tbl[key1][key2])
      fprintf(p "%s.%s\n" key1 tbl[key1][key2])
      ) ;foreach
      ) ;foreach
      tbl
      close(p)
    )

    This will return the format you asked for in a file called instinfo.txt. You still need to run the code the same way as before i.e. CCSPrintTable1(CCSFindCellInHier("dff"))

    -Saloni

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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