• 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 grep and print realpath of netlist and top cell from...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 10843
  • 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 grep and print realpath of netlist and top cell from file

saurabh96
saurabh96 over 4 years ago

Hi there,

i have made three string boxes with browse button.

1)config file - it will pick up the config file path from browse button.

2)source string box 

3)top cell string box

config file info-  

source netlist1

top cell  test21

Now i want that when user select config file , realpath of netlist1 automatically popup in source string box and topcell name pop in top cell string?

User should not input its automatically grep source and topcell from config file and popup i box?

How to do that?

Thanks in advance

regards,

SRV

  • Cancel
Parents
  • saurabh96
    saurabh96 over 4 years ago

    Hello Andrew,

    I am facing one issue as i have created one string field box with browse option it will pickup the setup file....Also there are two more string boxes made ..i.e netlist string field and cell string filed.

    setup file consists of --

    Source "netlist.tcl"
    cell "chklist"

    Now i want that when user selects any setup file from browse option automatically in netlist string field it get filled as it takes the realpath of netlist.tcl(source) from setup file ...same in cell string boxes gets filled as it takes the cell
    i.e chklist from setup file.

    how can i achieve that in callback of netlist and cell..
    any example or guidance will be appreciated.
    ouput will be something like this-



    regards,
    SRV
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • saurabh96
    saurabh96 over 4 years ago

    Hello Andrew,

    I am facing one issue as i have created one string field box with browse option it will pickup the setup file....Also there are two more string boxes made ..i.e netlist string field and cell string filed.

    setup file consists of --

    Source "netlist.tcl"
    cell "chklist"

    Now i want that when user selects any setup file from browse option automatically in netlist string field it get filled as it takes the realpath of netlist.tcl(source) from setup file ...same in cell string boxes gets filled as it takes the cell
    i.e chklist from setup file.

    how can i achieve that in callback of netlist and cell..
    any example or guidance will be appreciated.
    ouput will be something like this-



    regards,
    SRV
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to saurabh96

    Asking the same question in three different posts will not get you an answer any quicker (I combined your multiple posts into one to avoid noise on the forum), especially when you give little detail and seem to just want others to write your code for you (from a rather loosely described specification, also).

    Presumably you'd have a callback on the Setup File field to read and parse the file, and then update the other fields based on that? Given that your various posts have shown different formats for the file, I'm not going to write the details of precisely how you'd read the file, but it's going to be something like:

    procedure(SRVreadSetupFile(form)
      let((prt split removeQuotes commandArg)
        removeQuotes=pcreCompile("['\"]")
        unless(blankstrp(form->setupFile->value)
          prt=infile(form->setupFile->value)
          when(prt
            while(gets(line prt)
              split=parseString(line)
              when(stringp(cadr(split))
                commandArgs=pcreReplace(removeQuotes cadr(split) "" 0)
                case(car(split)
                  (("Source" "source")
                    form->netlistPath->value=simplifyFilename(commandArgs)
                  )
                  ("cell"
                    form->cell->value=commandArgs
                  )
                )
              )
            )
            close(prt)
          )
        )
      )
    )
    
    ; dummy form to test
    hiCreateLayoutForm(
      'forumForm
      "Forum example"
      hiCreateFormLayout(
        'vbox
        ?items list(
          hiCreateStringField(
            ?name 'setupFile
            ?prompt "Setup File"
            ?callback "SRVreadSetupFile(hiGetCurrentForm())"
          )
          hiCreateStringField(
            ?name 'netlistPath
            ?prompt "Netlist Path"
          )
          hiCreateStringField(
            ?name 'cell
            ?prompt "Cell"
          )
        )
      )
    )
    
    hiDisplayForm(forumForm)
    

    Note that you'd be more likely to get a prompt response if you gave some code to show what you'd tried (although I wouldn't have answered sooner, since I was on vacation last week).

    In the example above, put your setup file in the Setup File field and move your cursor outside of the form (or click on another field) to trigger the callback (I didn't bother adding browse buttons etc as I only created the form to illustrate the callback, not to replicate the code you didn't provide.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to Andrew Beckett

    Thanks a lot Andrew,

    i got your point.

    cheers!

    • 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