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 Subject: Re: [geda-user] single row .subckt Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-1-1018757744 From: John Doty In-Reply-To: Date: Thu, 27 Mar 2014 10:29:45 -0600 Cc: Peter TB Brett Message-Id: <4902FF6E-678C-41A1-B281-9D925E493B8D@noqsi.com> References: <90989E71-79DC-4CAE-8A33-EBCC26DDBFB4 AT noqsi DOT com> To: geda-user AT delorie DOT com X-Mailer: Apple Mail (2.1085) 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 --Apple-Mail-1-1018757744 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=koi8-r Question for Peter Brett, I think. On Mar 27, 2014, at 9:52 AM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3= =CB=C9=CA wrote: > whats this - "some test cases". > How do this? >=20 >=20 > 2014-03-27 19:45 GMT+04:00 =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3= =CB=C9=CA : > But the useful thing ...=20 > Very flexible >=20 >=20 > 2014-03-26 23:35 GMT+04:00 John Doty : >=20 >=20 > On Mar 25, 2014, at 8:31 AM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7= =D3=CB=C9=CA wrote: >=20 >> Why this is not part of geda? >=20 > Well, I haven't pushed for it to be. I'm not happy with the lack of = documentation (Stuart Brorson has set the standard very high in this = area). I expect the core developers would also like to see some test = cases. >=20 >>=20 >>=20 >> 2014-03-17 18:02 GMT+04:00 =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3= =CB=C9=CA : >> Thank you John. >>=20 >> This is works even with ? characters :))) >>=20 >>=20 >> 2014-03-17 6:20 GMT+04:00 John Doty : >>=20 >>=20 >> 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: >>=20 >>> Hello all. >>> I want to place to symbol single row model .subckt. >>>=20 >>> Example of spice: >>>=20 >>> .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 >>>=20 >>> 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 >>>=20 >>> SUBCKT section adds by file mechanism: >>> refdes=3DX? >>> model-name =3D name >>> file=3D/file >>>=20 >>> Why? >>>=20 >>=20 >>=20 >> 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. >>=20 >> 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: >>=20 >> spice-prototype=3DX? %pinseq opamp >> model@ >>=20 >> model=3D.SUBCKT opamp 1 2 3 4 5 >>=20 >> 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 >>=20 >> 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. >>=20 >> 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 natively handles hierarchy when flattening a netlist, allowing = you to create hierarchical SPICE netlists representing circuits drawn = for flat printed circuit designs. >>=20 >> John Doty Noqsi Aerospace, Ltd. >> http://www.noqsi.com/ >> jpd AT noqsi DOT com >>=20 >>=20 >>=20 >>=20 >=20 > John Doty Noqsi Aerospace, Ltd. > http://www.noqsi.com/ > jpd AT noqsi DOT com >=20 >=20 >=20 >=20 John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com --Apple-Mail-1-1018757744 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=koi8-r
whats this - "some test = cases".
How do this?


2014-03-27 = 19:45 GMT+04:00 =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=CB=C9=CA = <svetonomer AT gmail DOT com>:
But the useful thing = ...
Very = flexible


2014-03-26 23:35 GMT+04:00 John Doty = <jpd AT noqsi DOT com>:


On Mar 25, 2014, = at 8:31 AM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=CB=C9=CA = wrote:

Why this is = not part of geda?

Well, I haven't pushed for it to be. I'm not happy with = the lack of documentation (Stuart Brorson has set the standard very high = in this area). I expect the core developers would also like to see some = test cases.



2014-03-17 = 18:02 GMT+04:00 =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=CB=C9=CA = <svetonomer AT gmail DOT com>:
Thank = you John.

This is works even = with ? characters :)))


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

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





John = Doty        =     =   Noqsi Aerospace, = Ltd.





John Doty              Noqsi = Aerospace, Ltd.

http://www.noqsi.com/

jpd AT noqsi DOT com



= --Apple-Mail-1-1018757744--