delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2021/04/25/04:07:45

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
MIME-Version: 1.0
Date: Sun, 25 Apr 2021 10:06:11 +0200
From: mhx AT iae DOT nl
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] xspice integration
In-Reply-To: <07d13043-cd66-88f1-4b6c-172345c864e1@epilitimus.com>
References: <b609b43e-9209-3809-ef0e-d3b1e4b11c3c AT epilitimus DOT com>
<alpine DOT DEB DOT 2 DOT 21 DOT 2104142041100 DOT 7753 AT nimbus>
<9fe0dd9a-cbb8-a51f-f63d-36cd6d3a31c7 AT epilitimus DOT com>
<alpine DOT DEB DOT 2 DOT 21 DOT 2104172241210 DOT 6430 AT nimbus>
<alpine DOT DEB DOT 2 DOT 21 DOT 2104231908590 DOT 5702 AT nimbus>
<4775a561-41ad-5368-271a-998ded5bfbc6 AT epilitimus DOT com>
<alpine DOT DEB DOT 2 DOT 21 DOT 2104232352150 DOT 14831 AT nimbus>
<e2ab51e4-29df-35e0-e16b-4f48dcbc81c8 AT epilitimus DOT com>
<alpine DOT DEB DOT 2 DOT 21 DOT 2104241511400 DOT 1853 AT nimbus>
<07d13043-cd66-88f1-4b6c-172345c864e1 AT epilitimus DOT com>
Message-ID: <0b41c755183717a5531a76db35f7b791@iae.nl>
X-Sender: mhx AT iae DOT nl
User-Agent: Roundcube Webmail/1.2.4
ClaraMail2-Webmail-AuthUser: mhx AT iae DOT nl
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 2021-04-24 23:10, Glenn (glimrick AT epilitimus DOT com) [via 
geda-user AT delorie DOT com] wrote:
> Roland,
>> A few first questions about xspice:
[..]
>> Your backend is called "xspice", but in the example, the resulting
>> .cir file is further processed with ngspice.  Is this temporary,
>> specific to the test, an oversight, or is "x" really a placeholder for
>> "any of the derivatives"?

A backend that supports XSPICE would be quite a step forward (assuming
it can generate netlists that account for all XSPICE vector extensions).

[..]
> Spice understands a specific set of devices namely passives (like
> resistors, capacitors, etc.), various sources (both voltage and
> current), several flavors of transistors (BJT, FET, etc.), and a few
> others. These are the native spice devices which every version of spice
> knows what to do with. Subcircuits are a native device which contain
> other native devices. An analogy would be: native devices are to spice
> what keywords are to the C compiler, subcircuits are to spice what
> functions are to the compiler.
> 
> XSpice is a superset of spice. Among other things it adds a bunch of 
> new
> native devices, gain blocks, flip-flops, etc.

XSPICE is not a SPICE superset. Maybe it should be called a symbiote.
First, XSPICE *adds* a completely new discrete event handler/simulation
engine to SPICE. Second, a new codemodel device is added to the list
of devices that NGSPICE supports. This codemodel can use both the old
analog simulator and the new event-base engine.

Because of the way it is written, XSPICE also adds new syntactic
elements to (NG)SPICE. The most important one is that it becomes
possible to not only handle pins, but also ports: lists of pins,
where each pin can have a specific type. Using ports it is possible
to have subcircuits that handle busses (e.g. a subcircuit that
supports not only a single AND device, but any number of these).

> Any device which spice/xspice (hereafter ngspice, and the
> --enable-xspice is assumed) doesn't know what to do with must be
> converted into some combination of models and subcircuits which are
> known. For example ngspice doesn't know anything about LM555 timers. So
> if a schematic contains an LM555 that device must first be converted
> into something ngspice can work with before it can be simulated.
> Previously this was done by hand.

I prefer to say that it is still done by hand. It still has to be
defined as a subcircuit using resistors, transistors etc., but
it can now also use the codemodel device in addition. And as a bonus,
one can add a dual 556 or quad timer 558 with no other changes
than specifying ports with a different number of pins.

Full support of XSPICE (or NGSPICE) needs changes to the schematic
entry package and the netlister.

-marcel

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019