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:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TOVHczK+99Y59R2U1+YNoT49nnHcxmM+Yv/FzUBhJGQ=; b=nKlHKup3hTY/SPHWy1DYJ/q2mBO+TtBnR1HzGhsqTeoAt2e+ul0GuQ5j5IUvfildtJ dcAobYTAuf+9bR3Jq5+NkKFqqXbYU24IhypWcfBdjhozSNdl0vmqcs/Z5+nEl/Mem4u5 XHWhhN9EMez5UuY3kbHC8s1a6ENex70xMbdUvfqts+MU59J2YK6cjyd7C0MiF5tQU5+h 7kv61o29j6cPDPzGDif68PfG/bjN/VpPLZ7LW3apVWxsfhIZT4NCgNdsFATDLst7X/W+ wUjPmONRGtUZSkOHyzQ07pXnyx1fJ/YNSPtEWF4o8xJVmIbYsy9/c8fks11oZ2Uk5RZ8 PEHw== MIME-Version: 1.0 X-Received: by 10.182.204.41 with SMTP id kv9mr687615obc.78.1395064953813; Mon, 17 Mar 2014 07:02:33 -0700 (PDT) In-Reply-To: <90989E71-79DC-4CAE-8A33-EBCC26DDBFB4@noqsi.com> References: <90989E71-79DC-4CAE-8A33-EBCC26DDBFB4 AT noqsi DOT com> Date: Mon, 17 Mar 2014 18:02:33 +0400 Message-ID: Subject: Re: [geda-user] single row .subckt From: =?KOI8-R?B?4czFy9PFyiDowdLYy8/X08vJyg==?= To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=e89a8ff1c01c030fd504f4cddf2f 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 --e89a8ff1c01c030fd504f4cddf2f Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Thank you John. This is works even with ? characters :))) 2014-03-17 6:20 GMT+04:00 John Doty : > > On Mar 16, 2014, at 3:21 PM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7= =D3=CB=C9=CA wrote: > > Hello all. > I want to place to symbol single row model .subckt. > > Example of spice: > > .SUBCKT opamp 1 2 3 4 5 > B1 5 0 V =3D V(3)<1e5*(V(1)-V(2)) ? V(3) : V(4)>1e5*(V(1)-V(2)) ? V(4) : > 1e5*(V(1)-V(2)) > .ends > > But I do not finded this in wiki. > How I understand single row may be only .model > refdes=3DU? > model =3D .... > model-name =3D name > > SUBCKT section adds by file mechanism: > refdes=3DX? > model-name =3D name > file=3D/file > > Why? > > > Because the way that the spice and spice-sdb back ends are implemented, > things like this must be implemented as special cases in the code. There > are an unlimited number of such cases, but only a few are actually > implemented. If you want another, you have to modify the Scheme code. > That's a major motivation for https://github.com/noqsi/gnet-spice-noqsi. > > In the spice-noqsi back end, you define how a symbol is to be represented > in the SPICE netlist with a spice-prototype attribute. In this case > (assuming your symbol has pinseq attributes in the correct order for the > other back ends), you could use two multi-line attributes: > > spice-prototype=3DX? %pinseq opamp > model@ > > model=3D.SUBCKT opamp 1 2 3 4 5 > > B1 5 0 V =3D V(3)<1e5*(V(1)-V(2)) ? V(3) : V(4)>1e5*(V(1)-V(2)) ? V(4) : > 1e5*(V(1)-V(2)) > .ends > > You can't put the model directly in the spice-prototype because it > contains the "magic" character "?". I may consider a less crude quoting > mechanism in the future. > > You can also use pin number to specify connections in any order if pinseq > isn't right: this gives you a way around the overloading of pinseq (also > used for slotting). spice-noqsi can also imitate the way gnetlist nativel= y > handles hierarchy when flattening a netlist, allowing you to create > hierarchical SPICE netlists representing circuits drawn for flat printed > circuit designs. > > John Doty Noqsi Aerospace, Ltd. > > http://www.noqsi.com/ > > jpd AT noqsi DOT com > > > --e89a8ff1c01c030fd504f4cddf2f Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable
Thank you John.

This is works even wi= th ? characters :)))


2= 014-03-17 6:20 GMT+04:00 John Doty <jpd AT noqsi DOT com>:

On= Mar 16, 2014, at 3:21 PM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3= =CB=C9=CA wrote:

<= div>Hello all.
I want to place to symbol single row model .subckt.=

Example of spice:

.SUBCKT opamp 1 2 3 4 5
B1 5 0 V= =3D V(3)<1e5*(V(1)-V(2)) ? V(3) : V(4)>1e5*(V(1)-V(2)) ? V(4) : 1e5*= (V(1)-V(2))
.ends

But I do not finded this in wiki.
How I understa= nd single row may be only .model
refdes=3DU?
model =3D ...= .
model-name =3D name

SUBCKT section adds b= y file mechanism:
refdes=3DX?
model-name =3D name
file=3D/fi= le

Why?


Because the way that the spic= e and spice-sdb back ends are implemented, things like this must be impleme= nted as special cases in the code. There are an unlimited number of such ca= ses, but only a few are actually implemented. If you want another, you have= to modify the Scheme code. That's a major motivation for=9Ahttps://github= .com/noqsi/gnet-spice-noqsi.

In the spice-noqsi back end, you define how a symbol is to b= e represented in the SPICE netlist with a spice-prototype attribute. In thi= s case (assuming your symbol has pinseq attributes in the correct order for= the other back ends), you could use two multi-line attributes:

spice-prototype=3DX? %pinseq opamp
model@

model=3D.SUBCKT opamp 1 2 3 4 5

B1= 5 0 V =3D V(3)<1e5*(V(1)-V(2)) ? V(3) : V(4)>1e5*(V(1)-V(2)) ? V(4) = : 1e5*(V(1)-V(2))
.ends

You can't put the model directly i= n the spice-prototype because it contains the "magic" character &= quot;?". I may consider a less crude quoting mechanism in the future.<= /div>

You can also use pin number to specify connections in a= ny order if pinseq isn't right: this gives you a way around the overloa= ding of pinseq (also used for slotting). spice-noqsi can also imitate the w= ay gnetlist natively handles hierarchy when flattening a netlist, allowing = you to create hierarchical SPICE netlists representing circuits drawn for f= lat printed circuit designs.

John Doty=9A =9A =9A =9A =9A=9A=9A =9A= =9ANoqsi Aerospace, Ltd.

http= ://www.noqsi.com/

jpd AT noqsi DOT com




--e89a8ff1c01c030fd504f4cddf2f--