[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Gnucap and summer of code.
I'll join you on IRC later tonight and I can help you architect what
the behavior should be. I haven't looked at the gnucap source yet so I
don't really have any idea how it would translate into code though.
I'll try to look at the code tonight also and see where/how it could
fit in.
I'll also give you some sample outputs of my netlister so you can see
what to expect from an input standpoint.
On Mon, Mar 30, 2009 at 3:08 PM, al davis <ad151@xxxxxxxxxxxxxxxx> wrote:
> On Monday 30 March 2009, Yamazaki R2 wrote:
>> True, but I work in industry and the only thing I've seen
>> associated with global nodes are voltage sources for power
>> rails. In this case just copying the voltage source into each
>> subckt will work just fine. It was just an idea anyway I
>> don't know what the real implementation of that would be. And
>> by definition a votlage source is any device in your netlist
>> that starts with V.
>
> I understand. I suppose if you use global nodes only in that
> specific way they won't get you in too much trouble.
>
>
>>
>> > If that is all you need, you could make a preprocessor to
>> > do that.
>>
>> I suppose thats true, but most simulators handle the .global
>> statement without any preprocessors.
>
> Actually, most of them use preprocessors internally.
>>
>> > Another possibility is that you could make a preprocessor
>> > that adds the global nodes to all of the "X" port lists,
>> > and to the declaration lines of the subcircuits. That
>> > should be easy.
>> >
>> > Maybe it could be part of your netlister.
>
> Now I see an easy way to implement it, essentially based on the
> preprocessor approach, but internally. It should take about 5
> lines of code added to lang_spice_in.cc. Take ".global" as a
> command that just stores the string. Then on reading
> a ".subckt" line or an instance line (usually "X") that
> references such a subckt, insert the string as extra nodes.
>
> so ..
> =============
> .global dd ff gg
>
> .subckt abcd (ww)
> ....
> .ends
>
> ...
> X1 (pp) abcd
> =============
> would be equivalent to:
> =============
> .subckt abcd (ww dd ff gg)
> ....
> .ends
>
> ...
> X1 (pp dd ff gg) abcd
> =============
>
> I think this is close enough to be useful, but I still have
> questions about the scope rules. It seems to me that it should
> have file scope, and not pass down to included files.
>
> I can look at it in about a week. I'll let you know.
>
>
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user