delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/01/27/13:12:44

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=oONn8Xe7zz0CAzrEXSDL6SoZXctqEB8QUU/UnrWWZbY=;
b=Ppoji8FhTSdeIMoJcFiB3YQmj4s5Cz849pkMQnRRwTCXoIdlGFS+hx+tWORcZqvyVd
VwfQCFG2gsfamZEPkP562ROeLPMQGPkVx89maXXGrCodPY1DY0Z9yr+pqvC8cy8bnyLw
stICnGUEvBx4ylsZLQpgaZpPVwhqIRWFgtI6kMROn+bjfOOoPHwLI3vips72gezbxq7/
Rn92tlDKsDsVDqmFx7ixEYA3Y9ILwIbM3MRfTIY4eAjaNgTazHc4n7QC6nOBt4i7sI9J
S1atGyEwFOxWn1pvgiN+zrYP5ZQyHpnTLzNq+HvA+L94HOrVzlsGGhwW54heWkEsCWPc
CfhQ==
MIME-Version: 1.0
X-Received: by 10.194.202.230 with SMTP id kl6mr21770471wjc.9.1390846327248;
Mon, 27 Jan 2014 10:12:07 -0800 (PST)
Date: Mon, 27 Jan 2014 13:12:05 -0500
Message-ID: <CACPio-7RRCWG6Q0j5YdyoSbdYJXJg+vvwVjBCdjYnqQt-vWoDw@mail.gmail.com>
Subject: [geda-user] gnetlist spice-sdb subcircuit parameters
From: Nathan Stewart <therealnathanstewart AT gmail DOT com>
To: "geda-user AT delorie DOT com" <geda-user AT delorie DOT com>
Reply-To: geda-user AT delorie DOT com

--047d7b873a1045edc004f0f7a563
Content-Type: multipart/alternative; boundary=047d7b873a1045edb604f0f7a561

--047d7b873a1045edb604f0f7a561
Content-Type: text/plain; charset=ISO-8859-1

I've used subcircuits with parameters before without issue, but I'm not
certain why I can't now.

I've attached my schematic, but the key attributes are:
refdes=X1
device=PFWR
file=fwr.inc
model=gain=2

(I've tried other variations, but
http://www-mdp.eng.cam.ac.uk/web/CD/engapps/geda/geda-doc/spice-sdb/netlist.htmlsays:

"Active components should call out this name in the "device" attribute to
associate the component with its particular spice model or subcircuit."

fwr.inc contains a simple example:
.SUBCKT PFWR In Out gain=1
B1 Out 0 V=abs(V(in)) * {gain}
.ENDS PFWR

The netlister (spice-sdb) generates (with comments removed)
.SUBCKT PFWR In Out gain=1
B1 Out 0 V=abs(V(in)) * {gain}
.ENDS PFWR

V1 in 0 SIN 0 5 100
X1 in out unknown
.end

The netlister output doesn't really look confused. If I instead of doing it
like that web page suggests, and instead make the device=SUBCKT,
model-name=PFWR, model=gain=2, it does at least get the correct subcircuit
label:
    X1 in out PFWR
but it still doesn't append the subcircuit parameters.

1) What's the correct attribute set to get the netlister to append
subcircuit parameters.
2) Is the netlister broken or is my example broken?

Nate

--047d7b873a1045edb604f0f7a561
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I&#39;ve used subcircuits with parameters before with=
out issue, but I&#39;m not certain why I can&#39;t now.<br><br></div><div>I=
&#39;ve attached my schematic, but the key attributes are:<br>refdes=3DX1<b=
r>
device=3DPFWR<br>file=3Dfwr.inc<br>model=3Dgain=3D2<br><br></div><div>(I&#3=
9;ve tried other variations, but <a href=3D"http://www-mdp.eng.cam.ac.uk/we=
b/CD/engapps/geda/geda-doc/spice-sdb/netlist.html">http://www-mdp.eng.cam.a=
c.uk/web/CD/engapps/geda/geda-doc/spice-sdb/netlist.html</a> says:<br>
<br>&quot;Active components should call out this name
in the &quot;device&quot; attribute to associate the component with its
particular spice model or subcircuit.&quot;<br><br></div><div>fwr.inc conta=
ins a simple example:<br>.SUBCKT PFWR In Out gain=3D1<br>B1 Out 0 V=3Dabs(V=
(in)) * {gain}<br>.ENDS PFWR<br><br></div><div>The netlister (spice-sdb) ge=
nerates (with comments removed)<br>
.SUBCKT PFWR In Out gain=3D1<br>B1 Out 0 V=3Dabs(V(in)) * {gain}<br>.ENDS P=
FWR<br><br>V1 in 0 SIN 0 5 100 <br>X1 in out unknown<br>.end<br><br>The net=
lister output doesn&#39;t really look confused. If I instead of doing it li=
ke that web page suggests, and instead make the device=3DSUBCKT, model-name=
=3DPFWR, model=3Dgain=3D2, it does at least get the correct subcircuit labe=
l:<br>
</div><div>=A0=A0=A0 X1 in out PFWR<br></div><div>but it still doesn&#39;t =
append the subcircuit parameters.<br><br></div><div>1) What&#39;s the corre=
ct attribute set to get the netlister to append subcircuit parameters.<br><=
/div>
<div>2) Is the netlister broken or is my example broken? <br></div><div><br=
></div><div>Nate<br></div><div><br></div><div><br><br></div></div>

--047d7b873a1045edb604f0f7a561--
--047d7b873a1045edc004f0f7a563
Content-Type: application/x-geda-schematic; name="subcir-parm.sch"
Content-Disposition: attachment; filename="subcir-parm.sch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hqy1mvi60

diAyMDExMDExNSAyCkMgNDQwMDAgNDU1MDAgMSAwIDAgcHJlYy1md3Iuc3ltCnsKVCA0NDIwMCA0
NjI1MCA1IDEwIDEgMSAwIDAgMQpyZWZkZXM9WDEKVCA0NDIwMCA0NjkwMCA1IDEwIDAgMSAwIDAg
MQpkZXZpY2U9UEZXUgpUIDQ0MjAwIDQ3MzAwIDUgMTAgMCAwIDAgMCAxCnN5bXZlcnNpb249MC4x
ClQgNDQwMDAgNDU1MDAgNSAxMCAwIDEgMCAwIDEKZmlsZT1md3IuaW5jClQgNDQyMDAgNDYxMDAg
NSAxMCAxIDEgMCAwIDEKbW9kZWw9Z2Fpbj0yCn0KQyA0MzUwMCA0NTcwMCAxIDI3MCAwIHZvbHRh
Z2UtMy5zeW0KewpUIDQ0MjAwIDQ1NTAwIDUgOCAwIDAgMjcwIDAgMQpkZXZpY2U9Vk9MVEFHRV9T
T1VSQ0UKVCA0Mzk1MCA0NTI1MCA1IDEwIDEgMSAwIDAgMQpyZWZkZXM9VjEKVCA0Mzk1MCA0NTA1
MCA1IDEwIDEgMSAwIDAgMQp2YWx1ZT1TSU4gMCA1IDEwMAp9CkMgNDM4MDAgNDQ1MDAgMSAwIDEg
Z25kLTEuc3ltCk4gNDM3MDAgNDU3MDAgNDQwMDAgNDU3MDAgNAp7ClQgNDM3MDAgNDU3MDAgNSAx
MCAxIDEgMCAwIDEKbmV0bmFtZT1pbgp9Ck4gNDUyMDAgNDU3MDAgNDU4MDAgNDU3MDAgNAp7ClQg
NDUyMDAgNDU3MDAgNSAxMCAxIDEgMCAwIDEKbmV0bmFtZT1vdXQKfQo=
--047d7b873a1045edc004f0f7a563--

- Raw text -


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