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: Subject: [geda-user] gnetlist spice-sdb subcircuit parameters From: Nathan Stewart To: "geda-user AT delorie DOT com" Content-Type: multipart/mixed; boundary=047d7b873a1045edc004f0f7a563 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
I've used subcircuits with parameters before with= out issue, but I'm not certain why I can't now.

I= 've attached my schematic, but the key attributes are:
refdes=3DX1 device=3DPFWR
file=3Dfwr.inc
model=3Dgain=3D2

(I= 9;ve tried other variations, but http://www-mdp.eng.cam.a= c.uk/web/CD/engapps/geda/geda-doc/spice-sdb/netlist.html says:

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

fwr.inc conta= ins a simple example:
.SUBCKT PFWR In Out gain=3D1
B1 Out 0 V=3Dabs(V= (in)) * {gain}
.ENDS PFWR

The netlister (spice-sdb) ge= nerates (with comments removed)
.SUBCKT PFWR In Out gain=3D1
B1 Out 0 V=3Dabs(V(in)) * {gain}
.ENDS P= FWR

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

The net= lister output doesn'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:
=A0=A0=A0 X1 in out PFWR
but it still doesn't = append the subcircuit parameters.

1) What's the corre= ct attribute set to get the netlister to append subcircuit parameters.
<= /div>
2) Is the netlister broken or is my example broken?
Nate



--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--