parser for spice macros?

Is there a good tool that will review the contents of Spice macros?

When I try to compile the Spice model for the AD8330, I get the useless warning "bad expression statement" in my old version of Tina Pro. No line number is given. I haven't found anything in the Tina FAQ that says what "bad expression statement" might mean, and there are no forums for Tina I've come across.

I expect that either the model is wrong or that this old version of Tina Pro isn't compatible.

I've looked through the model and don't see any obvious flaws in the formatting.

This is just a hobby thing so I don't want to bother the folks at ADI about this. So I will ask you geniuses here: Is there another tool I can use to just check the format of the Spice model?

Thanks, MW

Reply to
Newsgroups
Loading thread data ...

What do you mean "compile"? It's just a text-based subcircuit declaration.

Did you look at the .OUT file? (Assuming TINA has such a thing ;-)

I see several E and G sources which have "TABLE", also an E source with "LIMIT".

The most likely culprit is the "LIMIT".

Review the manual to see what TINA allows as "behavioral".

You'll probably need to re-write the subcircuit declaration in old-fashioned 2G6 polynomial style.

Surf the web. I seem to recall a post about a behavioral to polynomial executable.

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

Try running you circuit on LTspice. I've had good luck importing Analog Device parts to LTspice. LTspice is free, compatible with most of PSpice syntax, and works well.

--
Mark
Reply to
qrk

In the Tina Netlist Editor there is an button for "analysis-compile". It does some crude checking of the macro listing.

I didn't find an "OUT" file. I guess they don't use it.

This makes sense. None of their example macros is as complicated as this one.

Unfortunately they are pretty silent about the details of the Spice language they support.

This might work.

Thanks for the detailed reply! MW

Reply to
Newsgroups

Fair enough... I haven't tried LTSpice in a long time so I can't remember why I didn't like it. I know it has a lot of fans.

I was able to get the circuit to simulate in LT Spice. I am pretty sure the AD8830 model is working OK... SLOW... but it is a complex model.

I guess the version of Tina that I have is too old to understand the Spice syntax in the AD8330 model, or the Tina guide for using the model is too complicated for me to make work.

Thanks for the suggestion! MW

Reply to
Newsgroups

Hello,

You may get it faster with the following options. Be very careful with cshunt. Too much of it lets the circuit wrongly behave.

.options cshunt=1e-16 .options ptrantau=1u

.tran 0 500u 0 100n uic

Best regards, Helmut

Reply to
Helmut Sennewald

Hi Helmut,

"cshunt" is pretty obvious, but what does "ptrantau" do?

Thanks!

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

"Jim Thompson" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

Hello Jim,

If the DC-solver can't find the operating point, then pseudo-tran is used to find the operating point. There is some contol possible for this feature with "ptrantau" and "ptranmax".

Best regards, Helmut

Reply to
Helmut Sennewald

Thanks!

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

...

You could try running it through LTSpice, and see if that gives you any error or warning messages.

-- Mike --

Reply to
Mike

I think the OP is alluding to disassembling the encrypted models. Ain't going to happen.

About the only thing non-universal in subcircuits is behavioral representation. Some 'Spice' engines may require modern representations be converted back to 2G6 polynomial style.

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

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.