my own spectre2spice converter

K

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
 
On 6 Mar 2005 13:25:08 -0800, "kimo" <eng_ak@link.net> wrote:

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
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.
 
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?
 
Well, my library does not have an auCDL view, so I guess I can't use
the CDL netlister.
if you have write access, try copying the symbol or any stopping view to auCdl, it usually is as
simple as this...

How can I generate the hspiceD netlist?
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.

Also, if I decide to write the translator, can you please enlighten me
as to what are the difficulties I can face?
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
 
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?
 
S. Badel wrote:
Well, my library does not have an auCDL view, so I guess I can't use
the CDL netlister.

if you have write access, try copying the symbol or any stopping view to
auCdl, it usually is as simple as this...

How can I generate the hspiceD netlist?

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.

Also, if I decide to write the translator, can you please enlighten me
as to what are the difficulties I can face?

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
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.
 
"kimo" <eng_ak@link.net> wrote in message
news:1110201378.532922.72080@f14g2000cwb.googlegroups.com...
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?
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 ...
 
kimo wrote:
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!
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.
 
Kimo, I have written skill to do this: as mentioned before, starting
with cdl can be easier than starting with spectre format. Mainly
because spectre format allows more freedom than cdl... thing like
case: is clk the same net as Clk... in spectre the answer is no but
it can be a problem for spice.

The major downside to using cdl is you need to poat process to pick up
things that cdl does not understand like ideal sources, inductors,
parasitic caps and so on, but it is not too hard...


David Reynolds
 
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

kimo wrote:
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?
 

Welcome to EDABoard.com

Sponsor

Back
Top