my own spectre2spice converter

Discussion in 'Cadence' started by kimo, Mar 6, 2005.

  1. kimo

    kimo Guest

    Hi everyone,

    Internally we are developing many research CAD tools that can
    usually read & operate on spice input files. Unfortunately, we have a
    lot of IP on cadence schematics. So, naturally we want to convert the
    spectre output netlists to spice compatible netlists. Is there anyway
    to automatically do this?

    If not, I have a feeling this is hard to do. But I am not sure why. I
    mean is the translation something as simple as:
    myCap (pos neg) capmodel
    becomes:
    CmyCap pos neg capmodel

    Is it that simple, or am I missing something?? I am just asking for
    your help before I start writing a converter script, maybe someone will
    point to something complex I am missing. Coz if it's that simple, why
    hasent anyone written such a converter yet!

    Thanks in advance
     
    kimo, Mar 6, 2005
    #1
  2. People often use the CDL Netlister (File->Export->CDL in the CIW) for this.
    CDL is a subset of SPICE with some additional comments. However, it's not
    entirely SPICE-like.

    Or you could use the hspiceD interface in ADE?

    Regards,

    Andrew.
     
    Andrew Beckett, Mar 7, 2005
    #2
  3. kimo

    kimo Guest

    Well, my library does not have an auCDL view, so I guess I can't use
    the CDL netlister.

    How can I generate the hspiceD netlist?

    Also, if I decide to write the translator, can you please enlighten me
    as to what are the difficulties I can face?
     
    kimo, Mar 7, 2005
    #3
  4. kimo

    S. Badel Guest

    Well, my library does not have an auCDL view, so I guess I can't use
    if you have write access, try copying the symbol or any stopping view to auCdl, it usually is as
    simple as this...
    from within ADE, you can generate an hspice netlist by selecting the appropriate
    simulator. then view it with simulation->netlist->display, and use save as command.
    I think you could rather take advantage of existing converters if needed. that no tool does
    the direct spectre->spice conversion is no luck to you, but you can export and netlist in a
    variety of formats. can't you find one which has a suitable translator.

    I you however wanted to do a converter yourself, i think you could quite easily do a quick tool
    using pattern matching feature of perl or similar language. doesn't look too difficult.

    cheers,

    stéphane
     
    S. Badel, Mar 7, 2005
    #4
  5. kimo

    kimo Guest

    Just one more thing, I notice that in spectre format, there is no way
    to know the component type, something like:

    I2 (pos neg) mymodel

    How can I know, if this is a resistor or a capacitor?? any method?
     
    kimo, Mar 7, 2005
    #5
  6. kimo

    S. Badel Guest

    ideal components in spectre have standard names (resistor, capacitor, inductor, ...), just like they
    have prefixes in spice.
    mosfets and non-ideal components usually have a model definition in a separate file.
    this file would need to have a spice equivalent. (i wouldn't try automating the conversion if i were
    you...)

    ex: spectre file
    include "models.scs"
    subctk mysubckt port1 port2 port3
    ...
    ends mysubckt
    I1 (in out) resistor r=1k
    I2 (pos neg) mymodel param1=1 param2=2
    I3 (net1 net2 net3) mysubckt

    spice file:
    .INCLUDE "models.sp"
    .SUBCKT mysubckt port1 port2 port3
    .ENDS mysubckt
    R1 in out 1k
    I2 pos neg mymodel param1=1 param2=2
    I3 net1 net2 net3 mysubckt

    note, you'll face similar problems with analysis statements and stimuli.

    stéphane
     
    S. Badel, Mar 7, 2005
    #6
  7. kimo

    A. B. Guest

    I think there is one from mentor. If you have access to their tools it
    is called "spect2el". This is written for Eldo, but the syntax is
    fairly spice like.
     
    A. B., Mar 7, 2005
    #7
  8. kimo

    G Vandevalk Guest

    I recall that the default netlisting procedure did take a prefix parameter.
    So you could make resistors Rx and capacitors Cx and devices in your
    spice library Mx ...
     
    G Vandevalk, Mar 9, 2005
    #8
  9. kimo

    fogh Guest

    It is a good thing to look further at how much you want to be able to
    translate, rather than start writing your perl, lex/bison , XSLT or so.

    A few things I can think of are:
    - compact models. If your spectre model file uses some proprietary or
    little-know model , you should find a way to implement it in your spice
    simulator (sometimes possible as a subcircuit)
    - behavioural languages. If the model file uses ahdl or verilogA, you
    may have to rewrite those models for spice , using PWL source,
    controlled sources and such
    - net names can be alphanumeric , model parameters can be passed as
    instance parameters , temperature can be local ...

    There is a fair chance that these are no problem for your application,
    but you probably want to be sure before you start. In many cases you can
    even use a text editor and a few regexps for search/replace and you get
    your spice netlist.
     
    fogh, Mar 13, 2005
    #9
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.