DIYbanter

DIYbanter (https://www.diybanter.com/)
-   Electronic Schematics (https://www.diybanter.com/electronic-schematics/)
-   -   Interesting Spice Netlisting Quirk (https://www.diybanter.com/electronic-schematics/369457-interesting-spice-netlisting-quirk.html)

Jim Thompson[_3_] April 4th 14 06:59 PM

Interesting Spice Netlisting Quirk
 
This time I'll try not to hit "Send" before I enter some content :-(

In developing Spice models/subcircuits it's useful to include within
the subcircuit declaration the models used.

But if you add a line to your development schematic...

..MODEL D D

It doesn't appear in the netlist, it appears in the .CIR file (this
applies to all Berkeley-adhering Spices, but not to LTspice... LTspice
doesn't use a .CIR file, and the .NET file doesn't function quite the
same way: .NET is more like a .CIR file, everything is in it,
components _and_ test bench, and only exists after a "Run").

Appearing in the .CIR requires going back and manually adding whatever
models you want included to your distribution subcircuit.

Anything manual is a nuisance as well as a possible source of error.

Experimenting I found that creating a part with a two-line "template"
(PSpice speak :)...

** Force Text **
TEXT

causes it to appear in the .NET file exactly like that. Make text...

..MODEL D D

In the netlist, voila, it appears as...

** Force Text **
..MODEL D D

in spite of (in LTspice speak), .MODEL is a "Spice directive"

So I've invented the "dual" of what I devised many years ago where I
wanted to force non-circuit (e.g., test bench) elements out of the
netlist into the .CIR file, I did this "template"...

..INC "C:\PSpice\DeviceLib\Spacer.txt"
Test Bench Element 1
Test Bench Element 2
Test Bench Element 3
| | |

(Taking advantage that "Spice directives" go into the .CIR file,
_unless_ you do the "Force Text" scheme.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

Robert Baer[_3_] April 5th 14 01:27 AM

Interesting Spice Netlisting Quirk
 
Jim Thompson wrote:
This time I'll try not to hit "Send" before I enter some content :-(

In developing Spice models/subcircuits it's useful to include within
the subcircuit declaration the models used.

But if you add a line to your development schematic...

.MODEL D D

It doesn't appear in the netlist, it appears in the .CIR file (this
applies to all Berkeley-adhering Spices, but not to LTspice... LTspice
doesn't use a .CIR file, and the .NET file doesn't function quite the
same way: .NET is more like a .CIR file, everything is in it,
components _and_ test bench, and only exists after a "Run").

Appearing in the .CIR requires going back and manually adding whatever
models you want included to your distribution subcircuit.

Anything manual is a nuisance as well as a possible source of error.

Experimenting I found that creating a part with a two-line "template"
(PSpice speak :)...

** Force Text **
TEXT

causes it to appear in the .NET file exactly like that. Make text...

.MODEL D D

In the netlist, voila, it appears as...

** Force Text **
.MODEL D D

in spite of (in LTspice speak), .MODEL is a "Spice directive"

So I've invented the "dual" of what I devised many years ago where I
wanted to force non-circuit (e.g., test bench) elements out of the
netlist into the .CIR file, I did this "template"...

.INC "C:\PSpice\DeviceLib\Spacer.txt"
Test Bench Element 1
Test Bench Element 2
Test Bench Element 3
| | |

(Taking advantage that "Spice directives" go into the .CIR file,
_unless_ you do the "Force Text" scheme.

...Jim Thompson

Much better..


All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter