Menu

Creating circuit netlists from a script

2024-07-11
2024-07-12
  • Paul Bodenstab

    Paul Bodenstab - 2024-07-11

    I often want to write scripts that just create netlists of various circuits. I
    can easily execute the following on the terminal command line to do this:

    xschem -q -x -n -s -N test.deck test.sch

    All is fine as long as there were no errors found during the netlisting
    process. If any errors/warnings were found then these errors are printed to
    stderr. If I want to capture these errors then I do the following:

    xschem -q -x -n -s -N test.deck test.sch 2>test.err

    This is easy enough as long as I do this manually at the command line or in a
    bash script but it isn't so easy to do in a scripting language like perl.
    Neither of the following constructs work in perl:

    xschem -q -x -n -s -N test.deck test.sch 2>test.err

    or

    system qw/ xschem -q -x -n -s -N /, 'test.deck', 'test.sch', '2>test.err'

    The reason is that both perl constructs take only a full command string and the
    '2>test.err' is actually part of a command line shell that perl doesn't handle.

    Consequently, I am requesting that an additional xschem option to be created
    that allows specifying a file that all stderr output is written to:

    xschem -q -x -n -s -E test.err -N test.deck test.sch

    As far as I know -E in not defined but if it is then another choice can be made.
    Having this option makes saving netlisting errors to a file easy in all of the above
    scenarios.

    Thank you for your consideration.

     
    • stefan

      stefan - 2024-07-12

      The -l log command option is meant to put all stderr messages into a file (log in this case). Unfortunately the erc messages after a netlist were written to stderr instead of the specified log file. The last commit fixes this.
      Add -l log to your netlist command and all stderr messages go to log

       
  • Paul Bodenstab

    Paul Bodenstab - 2024-07-12

    Many thanks Stefan!

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.