• 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 Design
  3. Multiple netlists in single Spectre input file

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 13472
  • 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

Multiple netlists in single Spectre input file

anla
anla over 11 years ago

Hi.

 

Is is possible to have multiple netlists in a single Spectre input file?

For instance, I can run something like

        * single resistor circuit
        .param vd=1 r1=1k dummy=0
        r1 1 0 r=r1
        vdd 1 0 dc=vd
        .dc dummy 0 1 1
        .measure dc i1 find i(vdd) at=1
        .end
        * voltage divider circuit
        .param vd=5 io=1m r1=1k r2=2k dummy=0
        r1 1 2 r=r1
        r2 2 0 r=r2
        vdd 1 0 dc=vd
        iout 2 0 dc=io
        .dc dummy 0 1 1
        .measure dc vout find v(2) at=1
        .end

through SPICE. Two separate simulations are performed sequentially.

Can I do something similar with Spectre? Running the above-mentioned file through Spectre with "spectre +spice" just simulates the single resistor circuit, but does not analyze the voltage divider. Is there a chance to tell Spectre that there are two netlists in on input file when using +spice command line option?

Alternatively, the netlists can be transformed to Spectre:

        // single resistor circuit
        parameters vd=1 r1=1k
        r1 (1 0) resistor r=r1
        v1 (1 0) vsource dc=vd
        dc1 dc
        <<HOW TO SEPARATE THESE SECTIONS??>>
        // voltage divider circuit
        parameters vd=5 io=1m r1=1k r2=2k
        r1 (1 2) resistor r=r1
        r2 (2 0) resistor r=r2
        vdd (1 0) vsource dc=vd
        iout (2 0) isource dc=io
        dc1 dc

Is there a suitable separator to achieve that Spectre runs to separate simulations?

 

Thank you.

André

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    André,

    I think the answer is no - potentially you could use a bunch of altergroups and alter statements between them, but it would be messy and I see no advantage over just running with two separate netlists. If you really want to put everything in a single file, you could do:

            #ifdef SINGLERES
            // single resistor circuit
            parameters vd=1 r1=1k
            r1 (1 0) resistor r=r1
            v1 (1 0) vsource dc=vd
            dc1 dc
            #endif
            #ifdef VOLTAGEDIV
            // voltage divider circuit
            parameters vd=5 io=1m r1=1k r2=2k
            r1 (1 2) resistor r=r1
            r2 (2 0) resistor r=r2
            vdd (1 0) vsource dc=vd
            iout (2 0) isource dc=io
            dc1 dc
            #endif

    and then you could do (in csh):

    foreach circuit (SINGLERES VOLTAGEDIV)
      spectre -raw $circuit.raw -D$circuit combinedfile.scs
    end

    That would give you two sets of results from a single input file. Spectre supports this kind of use of cpp (C pre-processor) directives.

    Regards,

    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