X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-TCPREMOTEIP: 207.224.51.38 X-Authenticated-UID: jpd AT noqsi DOT com Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: [geda-user] gnetlist spice-sdb subcircuit parameters From: John Doty In-Reply-To: <201401281710.49108.ad252@freeelectron.net> Date: Tue, 28 Jan 2014 20:09:14 -0700 Message-Id: <84844CBC-E18E-4129-A314-DFFC81759375@noqsi.com> References: <20140128162708 DOT GA5120 AT localhost DOT localdomain> <201401281710 DOT 49108 DOT ad252 AT freeelectron DOT net> To: geda-user AT delorie DOT com X-Mailer: Apple Mail (2.1085) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s0T39DHK017293 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 Precedence: bulk On Jan 28, 2014, at 3:10 PM, al davis wrote: > On Tuesday 28 January 2014, Vladimir Zhbanov wrote: >> Currently, spice-sdb doesn't permit adding parameters to >> subcircuit components with the refdes X?. > > When spice-sdb was written, neither gnucap nor ngspice supported > subcircuit parameters. Now they both do. It goes deeper than that. The approach spice-sdb takes to device parameters is to have a separate scheme function for each device that allows parameters. That function "knows" the names of the parameters, and therefore can determine which symbol attributes represent parameters. This obviously isn't going to work well for parameterized subcircuits. It also doesn't work well for basic devices, since different SPICE dialects accept different parameters. For example, spice-sdb accepts parameters area=, l=, w=, and temp= for a resistor. But recent ngspice releases also accept ac=, m=, scale=, dtemp=, tc1=, tc2=, and noisy=, and do not accept area=. The only reasonable way to navigate this is to put the user in control. This is a reason why spice-noqsi uses a spice-prototype= attribute to define how a symbol instance and its attributes are to be translated into SPICE code. Defaults for specific device= attributes imitate the old spice-sdb behavior. John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com