Re: [ng-spice] Some bugs, some improvments . . .
On Tue, 10 Oct 2000, Alan Gillespie wrote:
> Michael's subckt fix actually hilights a serious bug in the
> subcircuit expansion of spice. I tried the following test -
>
> .subckt sub1 in out
> vint int 0 pulse 0 1 1u 1u 1u 9u 20u
> esub out 0 ext 0 1
> rin in 0 1
> .ends
>
> vin in 0 pulse 0 1 3u 1u 1u 9u 20u
> vext ext 0 pulse 1 0 6u 1u 1u 9u 20u
> xs1 ext out sub1
>
> The esub line should reference the top level ext node, but instead
> spice looks for s1:ext. The s1 should only be prepended to ext if
> the circuit node actually exists in the subcircuit.
No. "ext" is a local node. The fact that there is one with the same
name externally is irrelevant. The only connections between a subckt
and its parent should be through the argument list. I suppose an
HSPICE style .global would be ok too.
> This probably applies to current controlled sources as well as
> the arbitrary sources.
I assume it is the same for all types, and can only be the same for
all types. If it is possible for it to be different for different
types, this is a serious architecture problem.
Partial thread listing: