delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2015/06/28/04:39:02

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:from:date:message-id:subject:to:content-type;
bh=YSxPZHqzr3Kh+mQk8YY1XnObf5mzq3rOv5izbcL6IZo=;
b=jNA2G37u9bH/+g4TiJxqHcmKQMxgoaXomNDHyaB59BH3u1zAAlE1WYHHmNXOm6+VsS
jMWNChFoiLfcWnBCLmPFKsJDiD3FoVC8aWkMaWQbcWWAo78KNd1A1sRqFUgH3VJ3sEAo
KA8f07uGR2fa5cefWBniq7A6D54U3ZU1yiJIu6ADPEecmLw4TkEl7jLw+sJh3bo7H4kj
uCMK1c5iNlN2tBwEgsnH/M2dmjiJvt+qeSU8p+/tSHlOPHKbwjGUCQZTWvM+dR+aXlD0
ubDheUu6WGFw3CjPIEm0CKNY79A8ethmR475HaLbyNTcp3D0wBMVkwNr2+IcuIaEyvZM
FGDw==
X-Received: by 10.194.91.193 with SMTP id cg1mr14788147wjb.86.1435480706888;
Sun, 28 Jun 2015 01:38:26 -0700 (PDT)
MIME-Version: 1.0
From: "Andrea D'Amore (and DOT damore AT gmail DOT com)" <geda-help AT delorie DOT com>
Date: Sun, 28 Jun 2015 10:38:07 +0200
Message-ID: <CAMonFrTvtcfpcFeb+VZ5yNF=Hn+nOfZmG6c0UuvODcSULa-LPQ@mail.gmail.com>
Subject: [geda-help] Double file inclusion with spice-sdb backend
To: geda-help AT delorie DOT com
Reply-To: geda-help AT delorie DOT com

Hello,
including a file that contains a .model directive using a
spice-include symbol in gschem and then exporting the netlist using
gnetlist's spice-sdb backend results in a netlist where the included
file is present twice.

Is this an intended behavior or a bug? If the former, what's the
rationale for that?

Here's a SSCCE to reproduce the issue, include-test.sch:

    v 20130925 2
    C 45200 52200 1 0 0 spice-directive-1.sym
    {
    T 45300 52500 5 10 0 1 0 0 1
    device=directive
    T 45300 52600 5 10 1 1 0 0 1
    refdes=A1
    T 45300 52300 5 10 1 0 0 0 1
    file=include-test.sim
    }

and include-test.sim:

   V1 0 1 5
   .model MOSN NMOS

Save the schematic and then run

    gnetlist -g spice-sdb -o include-test.cir include-test.sch


The resulting include-test.cir file, removing some comment line, is:

    * gnetlist -v -g spice-sdb -o include-test.cir include-test.sch
    *vvvvvvvv  Included SPICE model from include-test.sim vvvvvvvv
    V1 0 1 5
    .model MOSP PMOS
    *^^^^^^^^  End of included SPICE model from include-test.sim ^^^^^^^^
    *
    *==============  Begin SPICE netlist of main design ============
    *vvvvvvvv  Included SPICE model from include-test.sim vvvvvvvv
    V1 0 1 5
    .model MOSP PMOS
    *^^^^^^^^  End of included SPICE model from include-test.sim ^^^^^^^^
    *
    .end

see how the file is present twice.

Commenting out the .model directive in the simulation file, thus
leaving only the voltage source element, yields the expected output,
with the included file present only once.

I'm using geda package 1.8.2 on Debian 8.


Regards

-- 
Andrea

- Raw text -


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