Spice2 to spice3 library converter

AFAIK, most Spice derivatives, with behavioral capability, will STILL run POLY.

But it shouldn't be too hard to write a script to convert the terms to Algebraic notation.

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson
Loading thread data ...

"sppp" seems dead-ended, no googling gets me anywhere.

Is it true that spice3 won't run POLY?

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Hello!!! I'm looking for program which can be use to conversion POLY directive from spice2 to spice3. (may by linux version??)

-- *** Krzysztof Piecuch *** kris snipped-for-privacy@poczta.onet.pl GG 7084611 *** Linux User #132375 ***

Reply to
Krzysztof Piecuch

W artykule Jim Thompson napisa³(a):

It is OK, but ...

formatting link

where (in 1998 year):

I'm look for this program (sppp) or other. The Author didn't answer me.

--
                         **** Krzysztof Piecuch -- SP9RQA ****
                                   sp9rqa@radio.org.pl
                         **********Linux User #132375*********
Reply to
Krzysztof Piecuch

W artykule Jim Thompson napisa³(a):

spice3f5 for linux

-- **** Krzysztof Piecuch -- SP9RQA **** snipped-for-privacy@radio.org.pl **********Linux User #132375*********

Reply to
Krzysztof Piecuch

Krzysztof Piecuch wrote: : Hello!!! : I'm looking for program which can be use to conversion POLY directive : from spice2 to spice3. : (may by linux version??)

For Linux, use ngspice:

formatting link

Download the sources (either rework or rework-devel are OK), and configure using --enable-xspice. That is, build like this:

../configure --enable-xspice --with-readline make make install

Ngspice with XSpice enabled will properly handle netlists with SPICE 2 POLY constructs.

There is a SPICE on Linux HOWTO at:

formatting link

And this HOWTO talks about ngspice here:

formatting link

(scroll down a ways to get to ngspice.)

Good Luck!

Stuart

Reply to
Stuart Brorson

Why don't you write a program that works on a PC ?:-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

W artykule Stuart Brorson napisa³(a):

Thanks for your answer.

I can not compile this program correctly. Is somebody which has similar problem (debian-3.0, gcc version 2.95.4 20011002).

In file included from ../../../src/include/memory.h:20, from ipc.c:80: .../../../src/include/../misc/stringutil.h:28: conflicting types for `index' /usr/include/string.h:252: previous declaration of `index' .../../../src/include/../misc/stringutil.h:29: conflicting types for `rindex' /usr/include/string.h:255: previous declaration of `rindex' make[4]: *** [ipc.o] Error 1

--
                                    ***  Krzysztof Piecuch ***
                                      kris_gor@poczta.onet.pl
                                            GG 7084611
                                    *** Linux User #132375 ***
Reply to
Krzysztof Piecuch

MacSpice

formatting link

can translate spice2 poly into spice3 B sources rather well. If you don't have access to a Mac just collect all the polys into a fake netlist email it me and I'll send you back a translated version. There is obviously a limit to the number of times I'll do this before I get bored...

Charles

Reply to
Charles DH Williams

Krzysztof Piecuch wrote: : W artykule Stuart Brorson napisa?(a): :> :> ./configure --enable-xspice --with-readline :> make :> make install : I can not compile this program correctly. Is somebody which has similar : problem (debian-3.0, gcc version 2.95.4 20011002).

: In file included from ../../../src/include/memory.h:20, : from ipc.c:80: : ../../../src/include/../misc/stringutil.h:28: : conflicting types for `index' : /usr/include/string.h:252: previous declaration of `index' : ../../../src/include/../misc/stringutil.h:29: : conflicting types for `rindex' : /usr/include/string.h:255: previous declaration of `rindex' : make[4]: *** [ipc.o] Error 1 :

Hmmmm. . . . not good. Can you please e-mail me your config.log file? E-mail to: sdb (AT) cloud9 (DOT) net.

I will look to see if the variables HAVE_STRCHR or HAVE_INDEX are defined.

Also, what version of glibc do you have?

Stuart

Reply to
Stuart Brorson

Because I don't own a PC :-)

Charles.

Reply to
Charles DH Williams

Hi,

I ran into the spice3 not handling POLY() statements issue.. looked for a converter but couldn't find one so I wrote one. It works on a very simple op-amp model, but is still _very_ untested, so watch out.

This gave me considerably more trouble to write than I thought it would. Best way to handle the poly() is almost certainly to compile ngspice with the right options. But if anyone can use a (probably still very buggy) converter... here it is:

spice2to3-2005-03-14.tar.gz on

formatting link

BTW, anyone know of a good Eagle netlist to Spice format converter? Any interest in one?

regards,

Alex

Alex Faveluke alex at dee en el en kay dot com

Krzysztof Piecuch wrote:

directive

Reply to
Alex

Truly strange. EVEN PSpice can read POLY extensions.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Jim,

I've always had the impression that MicroSIM invented the POLY() syntax because it was easier to parse and differentiate then general syntax like V=3*V(x)*I(E1). I see POLY() popularly accredited to SPICE2 in usenet, but the string "POLY" doesn't seem to exist in the the FORTRAN code of 2g6.

Nowadays, even the PSpice doc's frowns on POLY() syntax as obsolete.

--Mike

Reply to
Mike Engelhardt

POLY CAN certainly be confusing.

You sure about POLY not in 2G6? I sure seem to remember using it.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Yep, the MicroSim folks hated that function. It always seemed to invite convergence errors and difficulties in setting up the matrix properly. But, I think it was one of those things that they couldn't really 're-code' from the original...

--
Charlie
--
Edmondson Engineering
Unique Solutions to Unusual Problems
Reply to
Charles Edmondson

Jim,

Opps, you're right. Faulty memory. I just grep'ed the 2g6 source and now I do see the function evpoly(result,itype,lcoef,ncoef,larg, narg,lexp) in the file evpoly.f

--Mike

Reply to
Mike Engelhardt

[snip]

IIRC Charlie IS one of the original MicroSim folks.

And some of the originals are involved in...

formatting link

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Charlie,

I thought you told me you didn't know the original MicroSim folks, one founder of which I used to retain. No matter. Anyway, the POLY() syntax is much better wrt to convergence then the alternative, arbitrary arithmetic expressions. The advantage is that the POLY() syntax limits you to a polynomial with all positive powers. This is everywhere differentiable and is only singular at infinite input. The arbitrary arithmetic expressions can have negative powers and various functions that aren't differentiable everywhere. The reason that the POLY() is obsolete is that it's a terrible syntax for the user, not for the convenience of the simulator author.

--Mike

Reply to
Mike Engelhardt

Jim,

I used to retain one of the original MicroSim founders. Charlie tried to guess which one and said he hardly know so-and-so -- that that predated his association. That's what I based the first sentence on. Anyway, POLY() is much easier to deal with with respect to convergence then arbitrary arithmetic expressions like

E1 1 2 VALUE { if(V(x) < 1, 1/V(x), 1/V(x)/V(x)) }

--Mike

Reply to
Mike Engelhardt

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.