Re: [ng-spice] Some bugs, some improvments . . .


To <ng-spice@ieee.ing.uniroma1.it>
From "Alan Gillespie" <alan.gillespie@analog.com>
Date Tue, 10 Oct 2000 12:30:28 +0100
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice@ieee.ing.uniroma1.it

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.

I haven't checked yet, but I think Michael's fix stops the named
voltage source having the subcircuit prepended to its name.
This will work as long as the required voltage source is at top
level. If it's defined in the subckt, then spice will take the top
level one instead.

This probably applies to current controlled sources as well as
the arbitrary sources.

Does that make sense ? I'll do more tests tonight.

Cheers,

Alan



Partial thread listing: