delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/03/26/15:35:54

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
From: John Doty <jpd AT noqsi DOT com>
Mime-Version: 1.0 (Apple Message framework v1085)
Subject: Re: [geda-user] single row .subckt
Date: Wed, 26 Mar 2014 13:35:29 -0600
In-Reply-To: <CAG4ve9Lx4mFt2JFGk22GXofu4wHi2e2KSZfnpmM75Lyq1BmS8A@mail.gmail.com>
To: geda-user AT delorie DOT com
References: <CAG4ve9+xPw3FvQQtVG5RUqOSZ_ZzYyUkbuFe9nFOZSS-GVxrHA AT mail DOT gmail DOT com> <90989E71-79DC-4CAE-8A33-EBCC26DDBFB4 AT noqsi DOT com> <CAG4ve9K7Q29MvGkK-fvN79Fvd9SmzGdXpycBYCfDAwu59eJhZQ AT mail DOT gmail DOT com> <CAG4ve9Lx4mFt2JFGk22GXofu4wHi2e2KSZfnpmM75Lyq1BmS8A AT mail DOT gmail DOT com>
Message-Id: <E3C6231A-F944-4FA0-8871-2EDE95063BB2@noqsi.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

--Apple-Mail-24-943501891
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=koi8-r


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.

>=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 <svetonomer AT gmail DOT com>:
> Thank you John.
>=20
> This is works even with ? characters :)))
>=20
>=20
> 2014-03-17 6:20 GMT+04:00 John Doty <jpd AT noqsi DOT com>:
>=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

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com



--Apple-Mail-24-943501891
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=koi8-r

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>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:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div =
dir=3D"ltr">Why this is not part of =
geda?<br></div></blockquote><div><br></div>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.</div><div><br><blockquote =
type=3D"cite"><div class=3D"gmail_extra"><br><br><div =
class=3D"gmail_quote">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 <span dir=3D"ltr">&lt;<a =
href=3D"mailto:svetonomer AT gmail DOT com" =
target=3D"_blank">svetonomer AT gmail DOT com</a>&gt;</span>:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Thank =
you John.<br><div><div><div><div><div =
style=3D"width:100%"><br></div></div> </div> </div>This is works even =
with ? characters :)))<br>

</div></div><div class=3D"gmail_extra"><br><br><div =
class=3D"gmail_quote">2014-03-17 6:20 GMT+04:00 John Doty <span =
dir=3D"ltr">&lt;<a href=3D"mailto:jpd AT noqsi DOT com" =
target=3D"_blank">jpd AT noqsi DOT com</a>&gt;</span>:<div><div class=3D"h5">
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style=3D"word-wrap:break-word"><div><div><br><div><div>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><br><blockquote type=3D"cite"><div dir=3D"ltr"><div><div>Hello=
 all.<br></div>I want to place to symbol single row model .subckt.<br>

</div><br>Example of spice:<br><div><br>.SUBCKT opamp 1 2 3 4 5<br>B1 5 =
0 V =3D V(3)&lt;1e5*(V(1)-V(2)) ? V(3) : V(4)&gt;1e5*(V(1)-V(2)) ? V(4) =
: 1e5*(V(1)-V(2))<br>
.ends<br><br>But I do not finded this in wiki.<br></div><div>How I =
understand single row may be only =
.model<br></div><div>refdes=3DU?<br>model =3D =
....<br></div><div>model-name =3D name<br><br></div><div>SUBCKT section =
adds by file mechanism:<br>


<div>refdes=3DX?<br></div><div>model-name =3D =
name<br></div><div>file=3D/file<br></div><br></div><div>Why?<br></div><div=
><br></div></div>
</blockquote></div><div><br></div></div></div>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&nbsp;<a href=3D"https://github.com/noqsi/gnet-spice-noqsi" =
target=3D"_blank">https://github.com/noqsi/gnet-spice-noqsi</a>.<div>

<br></div><div>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:</div>

<div><br></div><div>spice-prototype=3DX? %pinseq =
opamp</div><div>model@</div><div><br></div><div>model=3D.SUBCKT opamp 1 =
2 3 4 5<div><br>B1 5 0 V =3D V(3)&lt;1e5*(V(1)-V(2)) ? V(3) : =
V(4)&gt;1e5*(V(1)-V(2)) ? V(4) : 1e5*(V(1)-V(2))<br>

.ends</div></div><div><br></div><div>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.</div>

<div><br></div><div>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.</div>

<div><br></div><div><div><div><div style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: =
12px; "><font style=3D"font:12.0px Helvetica" face=3D"Helvetica" =
size=3D"3">John Doty<span>&nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;<span>&nbsp;</span><span>&nbsp; =
&nbsp;<span>&nbsp;</span></span></span>Noqsi Aerospace, =
Ltd.</font></div><div style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><a =
href=3D"http://www.noqsi.com/" =
target=3D"_blank">http://www.noqsi.com/</a></div><div style=3D"margin-top:=
 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
font-size: 12px; ">

<font style=3D"font:12.0px Helvetica" face=3D"Helvetica" size=3D"3"><a =
href=3D"mailto:jpd AT noqsi DOT com" =
target=3D"_blank">jpd AT noqsi DOT com</a></font></div><span =
style=3D"font-size:12px"><br></span>
</div>
<br></div></div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div>
</blockquote></div><br><div>
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><p style=3D"margin: =
0.0px 0.0px 0.0px 0.0px"><font face=3D"Helvetica" size=3D"3" =
style=3D"font: 12.0px Helvetica">John Doty<span =
class=3D"Apple-converted-space">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</span><span =
class=3D"Apple-converted-tab">&nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</span></span></span>Noqsi =
Aerospace, Ltd.</font></p><p style=3D"margin: 0.0px 0.0px 0.0px =
0.0px"><a href=3D"http://www.noqsi.com/">http://www.noqsi.com/</a></p><p =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><font face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica"><a =
href=3D"mailto:jpd AT noqsi DOT com">jpd AT noqsi DOT com</a></font></p><br =
class=3D"Apple-interchange-newline"></span></span>
</div>
<br></body></html>=

--Apple-Mail-24-943501891--

- Raw text -


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