pass the value of a parameter from "init.s"(cdsSpice) to hspiceS

Discussion in 'Cadence' started by Xuejun Zhang, Jun 24, 2004.

  1. Xuejun Zhang

    Xuejun Zhang Guest

    A parameter is set in the "init.s" file which is written in cdsSpice
    syntax. This parameter is used in the hspice models.

    For example, in the "init.s" the parameter "a" is set using cdsSpice
    command
    "set a=1"

    Then in the hspice model, I will use "a" in some equations, for
    example
    ..param b=a*2

    The questions are,
    how can I translate the value of the parameter "a" to hspiceS.
    I have tried the following method, but not successful,

    1.create a file called "test.s" with content of "\.param a =a".
    2.create a file called "hspice.include" with content of "use test"
    3.inlcude "hspice.include" into the Inlcude/Stimulus File Field with
    the syntax cdsSpice.
    4. generate raw and final netlist.

    The final netlist shows
    .param a 1.000

    as you can see, the symbol "=" is missing, which is needed for hspice.

    So the question is how I can pass the value of a parameter from init.s
    to hspice.

    Thanks
     
    Xuejun Zhang, Jun 24, 2004
    #1
  2. Don't get cdsSpice parameters and hspice parameters mixed up. They are
    completely separate and distinct.

    cdsSpice is used as a preprocessor, and so will expand cdsSpice parameters to
    fixed numbers before the hspice final netlist is created.

    As for doing what you're doing, I can't easily test it right now, but probably
    escaping the = might be a good idea.

    Andrew.
     
    Andrew Beckett, Jul 6, 2004
    #2
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.