Maker Pro
Maker Pro

SPICE model file extensions - *.LIB vs *.MOD

N

Navraj

Take a look at the following two SPICE models:

-Zener Diode, ON Semi
http://www.onsemi.com/pub/Collateral/BZX84C3V0L.LIB

-MOSFET, Zetex
http://www.zetex.com/3.0/spice/2n7000.mod

Here is my question: both files contain subcircuits (which also
include more than one .model statements). Why, then, does one of these
files use a .LIB extension while the other uses a .mod extension? Is
there a difference between the two?

Does SPICE care for these extensions at all, or are these just age-old
conventions (afterall, all SPICE needs is the text contained within).

-Also, take a look at the following page:
http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&category=830

Some files have a .LIB extension while some have a .SP3 extension. But
I can't the difference in format - both are subcircuits with multiple
..model statements.

I've looked at the SPICE user manual - and I didn't find any guidelines
on the proper extensions for device models (unless I missed something,
of course...)
 
A

Andreas B.

Navraj said:
Here is my question: both files contain subcircuits (which also
include more than one .model statements). Why, then, does one of these
files use a .LIB extension while the other uses a .mod extension? Is
there a difference between the two?
Choice I guess..
Does SPICE care for these extensions at all, or are these just age-old
conventions (afterall, all SPICE needs is the text contained within).
It should not, if the contents is understandable.

File extensions is mostly a way to assign a program to deal with specific files, and has no effect on the files content.


Andreas B.
 
K

Kevin Aylward

Navraj said:
Take a look at the following two SPICE models:

-Zener Diode, ON Semi
http://www.onsemi.com/pub/Collateral/BZX84C3V0L.LIB

-MOSFET, Zetex
http://www.zetex.com/3.0/spice/2n7000.mod

Here is my question: both files contain subcircuits (which also
include more than one .model statements). Why, then, does one of
these files use a .LIB extension while the other uses a .mod
extension? Is there a difference between the two?

Does SPICE care for these extensions at all, or are these just age-old
conventions (afterall, all SPICE needs is the text contained within).

-Also, take a look at the following page:
http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&category=830

Some files have a .LIB extension while some have a .SP3 extension.
But I can't the difference in format - both are subcircuits with
multiple .model statements.

I've looked at the SPICE user manual - and I didn't find any
guidelines on the proper extensions for device models (unless I
missed something, of course...)

The .lib and .mod extensions are not part of Spice (e.g. Berkeley). They
are extensions that companies took upon themselves to invent just for
convenience. I think PSpice was the first to use the .mod extension. The
implication is that .mod is for single models in one file, with .lib for
multiple models in a file. Model here means .model or .subckt.

Spice itself don't care what the file name is, or what it contains, it
just loads the it in. However, most GUI spices will use the extension as
a guide to know what to do with it. For example ( :) ), in SuperSpice,
if you drag drop a .lib or .mod file it will load it in as a model file
into the system. If you drag drop and exe file, it thinks it is an
alternate spice engine etc.

Kevin Aylward B.Sc.
[email protected]
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

"There are none more ignorant and useless,than they that seek answers
on their knees, with their eyes closed"
 
Top